/* Generated by Cython 0.29.34 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "/io/cuda-python-build-utils/conda-recipe/include/cuda.h",
            "/io/cuda-python-build-utils/conda-recipe/include/cudaProfiler.h",
            "cuda"
        ],
        "extra_compile_args": [
            "-std=c++14",
            "-fpermissive",
            "-Wno-deprecated-declarations",
            "-D _GLIBCXX_ASSERTIONS",
            "-fno-var-tracking-assignments",
            "-O3"
        ],
        "include_dirs": [
            "./cuda",
            "cuda",
            "/opt/conda/conda-bld/cuda-python_1684128562024/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/include",
            "/io/cuda-python-build-utils/conda-recipe/include"
        ],
        "language": "c++",
        "library_dirs": [
            "/opt/conda/conda-bld/cuda-python_1684128562024/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.10/site-packages",
            "/opt/conda/conda-bld/cuda-python_1684128562024/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib"
        ],
        "name": "cuda.cuda",
        "sources": [
            "cuda/cuda.pyx"
        ]
    },
    "module_name": "cuda.cuda"
}
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_34"
#define CYTHON_HEX_VERSION 0x001D22F0
#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 0
  #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 (PY_VERSION_HEX < 0x030C00A5)
  #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) && (PY_VERSION_HEX < 0x030C00A5))
  #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 PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #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 PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #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
  #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__cuda
#define __PYX_HAVE_API__cuda__cuda
/* Early includes */
#include <stdint.h>
#include "cuda.h"
#include "cudaProfiler.h"
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include <vector>
#include <string.h>
#include <stdlib.h>
#include <stddef.h>
#include <limits.h>
#include <stdio.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/cuda.pyx",
  "stringsource",
  "cuda/cuda.pxd",
  "cuda/_lib/utils.pxd",
  "type.pxd",
};

/* "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;

/* "cuda/cuda.pyx":21
 * from cpython.bytes cimport PyBytes_FromStringAndSize
 * 
 * ctypedef unsigned long long signed_char_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long unsigned_char_ptr
 * ctypedef unsigned long long char_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_signed_char_ptr;

/* "cuda/cuda.pyx":22
 * 
 * ctypedef unsigned long long signed_char_ptr
 * ctypedef unsigned long long unsigned_char_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long char_ptr
 * ctypedef unsigned long long short_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_unsigned_char_ptr;

/* "cuda/cuda.pyx":23
 * ctypedef unsigned long long signed_char_ptr
 * ctypedef unsigned long long unsigned_char_ptr
 * ctypedef unsigned long long char_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long short_ptr
 * ctypedef unsigned long long unsigned_short_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_char_ptr;

/* "cuda/cuda.pyx":24
 * ctypedef unsigned long long unsigned_char_ptr
 * ctypedef unsigned long long char_ptr
 * ctypedef unsigned long long short_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long unsigned_short_ptr
 * ctypedef unsigned long long int_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_short_ptr;

/* "cuda/cuda.pyx":25
 * ctypedef unsigned long long char_ptr
 * ctypedef unsigned long long short_ptr
 * ctypedef unsigned long long unsigned_short_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long int_ptr
 * ctypedef unsigned long long long_int_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_unsigned_short_ptr;

/* "cuda/cuda.pyx":26
 * ctypedef unsigned long long short_ptr
 * ctypedef unsigned long long unsigned_short_ptr
 * ctypedef unsigned long long int_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long long_int_ptr
 * ctypedef unsigned long long long_long_int_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_int_ptr;

/* "cuda/cuda.pyx":27
 * ctypedef unsigned long long unsigned_short_ptr
 * ctypedef unsigned long long int_ptr
 * ctypedef unsigned long long long_int_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long long_long_int_ptr
 * ctypedef unsigned long long unsigned_int_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_long_int_ptr;

/* "cuda/cuda.pyx":28
 * ctypedef unsigned long long int_ptr
 * ctypedef unsigned long long long_int_ptr
 * ctypedef unsigned long long long_long_int_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long unsigned_int_ptr
 * ctypedef unsigned long long unsigned_long_int_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_long_long_int_ptr;

/* "cuda/cuda.pyx":29
 * ctypedef unsigned long long long_int_ptr
 * ctypedef unsigned long long long_long_int_ptr
 * ctypedef unsigned long long unsigned_int_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long unsigned_long_int_ptr
 * ctypedef unsigned long long unsigned_long_long_int_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_unsigned_int_ptr;

/* "cuda/cuda.pyx":30
 * ctypedef unsigned long long long_long_int_ptr
 * ctypedef unsigned long long unsigned_int_ptr
 * ctypedef unsigned long long unsigned_long_int_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long unsigned_long_long_int_ptr
 * ctypedef unsigned long long uint32_t_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_unsigned_long_int_ptr;

/* "cuda/cuda.pyx":31
 * ctypedef unsigned long long unsigned_int_ptr
 * ctypedef unsigned long long unsigned_long_int_ptr
 * ctypedef unsigned long long unsigned_long_long_int_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long uint32_t_ptr
 * ctypedef unsigned long long uint64_t_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_unsigned_long_long_int_ptr;

/* "cuda/cuda.pyx":32
 * ctypedef unsigned long long unsigned_long_int_ptr
 * ctypedef unsigned long long unsigned_long_long_int_ptr
 * ctypedef unsigned long long uint32_t_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long uint64_t_ptr
 * ctypedef unsigned long long int32_t_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_uint32_t_ptr;

/* "cuda/cuda.pyx":33
 * ctypedef unsigned long long unsigned_long_long_int_ptr
 * ctypedef unsigned long long uint32_t_ptr
 * ctypedef unsigned long long uint64_t_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long int32_t_ptr
 * ctypedef unsigned long long int64_t_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_uint64_t_ptr;

/* "cuda/cuda.pyx":34
 * ctypedef unsigned long long uint32_t_ptr
 * ctypedef unsigned long long uint64_t_ptr
 * ctypedef unsigned long long int32_t_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long int64_t_ptr
 * ctypedef unsigned long long unsigned_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_int32_t_ptr;

/* "cuda/cuda.pyx":35
 * ctypedef unsigned long long uint64_t_ptr
 * ctypedef unsigned long long int32_t_ptr
 * ctypedef unsigned long long int64_t_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long unsigned_ptr
 * ctypedef unsigned long long unsigned_long_long_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_int64_t_ptr;

/* "cuda/cuda.pyx":36
 * ctypedef unsigned long long int32_t_ptr
 * ctypedef unsigned long long int64_t_ptr
 * ctypedef unsigned long long unsigned_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long unsigned_long_long_ptr
 * ctypedef unsigned long long size_t_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_unsigned_ptr;

/* "cuda/cuda.pyx":37
 * ctypedef unsigned long long int64_t_ptr
 * ctypedef unsigned long long unsigned_ptr
 * ctypedef unsigned long long unsigned_long_long_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long size_t_ptr
 * ctypedef unsigned long long float_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_unsigned_long_long_ptr;

/* "cuda/cuda.pyx":38
 * ctypedef unsigned long long unsigned_ptr
 * ctypedef unsigned long long unsigned_long_long_ptr
 * ctypedef unsigned long long size_t_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long float_ptr
 * ctypedef unsigned long long double_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_size_t_ptr;

/* "cuda/cuda.pyx":39
 * ctypedef unsigned long long unsigned_long_long_ptr
 * ctypedef unsigned long long size_t_ptr
 * ctypedef unsigned long long float_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long double_ptr
 * ctypedef unsigned long long void_ptr
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_float_ptr;

/* "cuda/cuda.pyx":40
 * ctypedef unsigned long long size_t_ptr
 * ctypedef unsigned long long float_ptr
 * ctypedef unsigned long long double_ptr             # <<<<<<<<<<<<<<
 * ctypedef unsigned long long void_ptr
 * 
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_double_ptr;

/* "cuda/cuda.pyx":41
 * ctypedef unsigned long long float_ptr
 * ctypedef unsigned long long double_ptr
 * ctypedef unsigned long long void_ptr             # <<<<<<<<<<<<<<
 * 
 * #: CUDA API version number
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_4cuda_void_ptr;

/*--- Type declarations ---*/
struct __pyx_obj_4cuda_4_lib_5utils_HelperKernelParams;
struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr;
struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemPool_attribute;
struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmem_range_attribute;
struct __pyx_obj_4cuda_4_lib_5utils_HelperCUpointer_attribute;
struct __pyx_obj_4cuda_4_lib_5utils_HelperCUgraphMem_attribute;
struct __pyx_obj_4cuda_4_lib_5utils_HelperCUjit_option;
struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType;
struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper;
struct __pyx_obj_4cuda_4cuda_CUcontext;
struct __pyx_obj_4cuda_4cuda_CUmodule;
struct __pyx_obj_4cuda_4cuda_CUfunction;
struct __pyx_obj_4cuda_4cuda_CUarray;
struct __pyx_obj_4cuda_4cuda_CUmipmappedArray;
struct __pyx_obj_4cuda_4cuda_CUtexref;
struct __pyx_obj_4cuda_4cuda_CUsurfref;
struct __pyx_obj_4cuda_4cuda_CUevent;
struct __pyx_obj_4cuda_4cuda_CUstream;
struct __pyx_obj_4cuda_4cuda_CUgraphicsResource;
struct __pyx_obj_4cuda_4cuda_CUexternalMemory;
struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore;
struct __pyx_obj_4cuda_4cuda_CUgraph;
struct __pyx_obj_4cuda_4cuda_CUgraphNode;
struct __pyx_obj_4cuda_4cuda_CUgraphExec;
struct __pyx_obj_4cuda_4cuda_CUmemoryPool;
struct __pyx_obj_4cuda_4cuda_CUuserObject;
struct __pyx_obj_4cuda_4cuda_CUlinkState;
struct __pyx_obj_4cuda_4cuda_EGLImageKHR;
struct __pyx_obj_4cuda_4cuda_EGLStreamKHR;
struct __pyx_obj_4cuda_4cuda_EGLSyncKHR;
struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection;
struct __pyx_obj_4cuda_4cuda_CUhostFn;
struct __pyx_obj_4cuda_4cuda_CUstreamCallback;
struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize;
struct __pyx_obj_4cuda_4cuda_CUuuid_st;
struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st;
struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st;
struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st;
struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st;
struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st;
struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st;
struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union;
struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st;
struct __pyx_obj_4cuda_4cuda_CUdevprop_st;
struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st;
struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st;
struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st;
struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st;
struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s;
struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s;
struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union;
struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st;
struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st;
struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st;
struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u;
struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st;
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st;
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st;
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st;
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st;
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st;
struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s;
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st;
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st;
struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s;
struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s;
struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s;
struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s;
struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s;
struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u;
struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st;
struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st;
struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st;
struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st;
struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st;
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s;
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st;
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s;
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st;
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s;
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u;
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s;
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st;
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s;
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u;
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s;
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st;
struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st;
struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st;
struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u;
struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s;
struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s;
struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u;
struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u;
struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st;
struct __pyx_obj_4cuda_4cuda_CUmemLocation_st;
struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s;
struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st;
struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st;
struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st;
struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st;
struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st;
struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u;
struct __pyx_obj_4cuda_4cuda_CUeglFrame_st;
struct __pyx_obj_4cuda_4cuda_CUuuid;
struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_v1;
struct __pyx_obj_4cuda_4cuda_CUipcEventHandle;
struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_v1;
struct __pyx_obj_4cuda_4cuda_CUipcMemHandle;
struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_v1;
struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams;
struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS;
struct __pyx_obj_4cuda_4cuda_CUdevprop_v1;
struct __pyx_obj_4cuda_4cuda_CUdevprop;
struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_v1;
struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow;
struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS;
struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS;
struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS;
struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue;
struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute;
struct __pyx_obj_4cuda_4cuda_CUlaunchConfig;
struct __pyx_obj_4cuda_4cuda_CUkernelNodeAttrValue_v1;
struct __pyx_obj_4cuda_4cuda_CUkernelNodeAttrValue;
struct __pyx_obj_4cuda_4cuda_CUstreamAttrValue_v1;
struct __pyx_obj_4cuda_4cuda_CUstreamAttrValue;
struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_v1;
struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount;
struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_v1;
struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam;
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_v2;
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D;
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_v2;
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D;
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER;
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2;
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR;
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2;
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR;
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES;
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS;
struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC;
struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC;
struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC;
struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS;
struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS;
struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS;
struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1;
struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS;
struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_v1;
struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo;
struct __pyx_obj_4cuda_4cuda_CUmemLocation_v1;
struct __pyx_obj_4cuda_4cuda_CUmemLocation;
struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_v1;
struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp;
struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_v1;
struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc;
struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_v1;
struct __pyx_obj_4cuda_4cuda_CUmemPoolProps;
struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_v1;
struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData;
struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS;
struct __pyx_obj_4cuda_4cuda_CUeglFrame_v1;
struct __pyx_obj_4cuda_4cuda_CUeglFrame;
struct __pyx_obj_4cuda_4cuda_cuuint32_t;
struct __pyx_obj_4cuda_4cuda_cuuint64_t;
struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2;
struct __pyx_obj_4cuda_4cuda_CUdeviceptr;
struct __pyx_obj_4cuda_4cuda_CUdevice_v1;
struct __pyx_obj_4cuda_4cuda_CUdevice;
struct __pyx_obj_4cuda_4cuda_CUtexObject_v1;
struct __pyx_obj_4cuda_4cuda_CUtexObject;
struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1;
struct __pyx_obj_4cuda_4cuda_CUsurfObject;
struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1;
struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle;
struct __pyx_obj_4cuda_4cuda_GLenum;
struct __pyx_obj_4cuda_4cuda_GLuint;
struct __pyx_obj_4cuda_4cuda_EGLint;
struct __pyx_obj_4cuda_4cuda_VdpDevice;
struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress;
struct __pyx_obj_4cuda_4cuda_VdpVideoSurface;
struct __pyx_obj_4cuda_4cuda_VdpOutputSurface;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr;
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr;
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;

/* "cuda/_lib/utils.pxd":12
 * from libcpp.vector cimport vector
 * 
 * cdef class HelperKernelParams:             # <<<<<<<<<<<<<<
 *     cdef Py_buffer _pybuffer
 *     cdef bint _pyobj_acquired
 */
struct __pyx_obj_4cuda_4_lib_5utils_HelperKernelParams {
  PyObject_HEAD
  Py_buffer _pybuffer;
  int _pyobj_acquired;
  void **_ckernelParams;
  char *_ckernelParamsData;
  int _length;
  int _malloc_list_created;
};


/* "cuda/_lib/utils.pxd":20
 *     cdef bint _malloc_list_created
 * 
 * cdef class HelperInputVoidPtr:             # <<<<<<<<<<<<<<
 *     cdef Py_buffer _pybuffer
 *     cdef void* _cptr
 */
struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr {
  PyObject_HEAD
  Py_buffer _pybuffer;
  void *_cptr;
  int _pyobj_acquired;
};


/* "cuda/_lib/utils.pxd":25
 *     cdef bint _pyobj_acquired
 * 
 * cdef class HelperCUmemPool_attribute:             # <<<<<<<<<<<<<<
 *     cdef void* _cptr
 *     cdef ccuda.CUmemPool_attribute_enum _attr
 */
struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemPool_attribute {
  PyObject_HEAD
  void *_cptr;
  enum CUmemPool_attribute_enum _attr;
  int _is_getter;
  int _int_val;
  struct __pyx_obj_4cuda_4cuda_cuuint64_t *_cuuint64_t_val;
};


/* "cuda/_lib/utils.pxd":34
 *     cdef cuda.cuuint64_t _cuuint64_t_val
 * 
 * cdef class HelperCUmem_range_attribute:             # <<<<<<<<<<<<<<
 *     cdef void* _cptr
 *     cdef ccuda.CUmem_range_attribute_enum _attr
 */
struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmem_range_attribute {
  PyObject_HEAD
  void *_cptr;
  enum CUmem_range_attribute_enum _attr;
  size_t _data_size;
  int _int_val;
  int *_int_val_list;
};


/* "cuda/_lib/utils.pxd":43
 *     cdef int* _int_val_list # 32 bit integer array
 * 
 * cdef class HelperCUpointer_attribute:             # <<<<<<<<<<<<<<
 *     cdef void* _cptr
 *     cdef ccuda.CUpointer_attribute_enum _attr
 */
struct __pyx_obj_4cuda_4_lib_5utils_HelperCUpointer_attribute {
  PyObject_HEAD
  void *_cptr;
  enum CUpointer_attribute_enum _attr;
  int _is_getter;
  struct __pyx_obj_4cuda_4cuda_CUcontext *_ctx;
  unsigned int _uint;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_devptr;
  void **_void;
  struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS *_token;
  int _bool;
  unsigned PY_LONG_LONG _ull;
  size_t _size;
  struct __pyx_obj_4cuda_4cuda_CUmemoryPool *_mempool;
};


/* "cuda/_lib/utils.pxd":59
 *     cdef cuda.CUmemoryPool _mempool
 * 
 * cdef class HelperCUgraphMem_attribute:             # <<<<<<<<<<<<<<
 *     cdef void* _cptr
 *     cdef ccuda.CUgraphMem_attribute_enum _attr
 */
struct __pyx_obj_4cuda_4_lib_5utils_HelperCUgraphMem_attribute {
  PyObject_HEAD
  void *_cptr;
  enum CUgraphMem_attribute_enum _attr;
  int _is_getter;
  struct __pyx_obj_4cuda_4cuda_cuuint64_t *_cuuint64_t_val;
};


/* "cuda/_lib/utils.pxd":67
 *     cdef cuda.cuuint64_t _cuuint64_t_val
 * 
 * cdef class HelperCUjit_option:             # <<<<<<<<<<<<<<
 *     cdef void* _cptr
 *     cdef ccuda.CUjit_option_enum _attr
 */
struct __pyx_obj_4cuda_4_lib_5utils_HelperCUjit_option {
  PyObject_HEAD
  void *_cptr;
  enum CUjit_option_enum _attr;
  unsigned int _uint;
  float _float;
  char *_charstar;
  enum CUjit_target_enum _target;
  enum CUjit_fallback_enum _fallback;
  int _int;
  enum CUjit_cacheMode_enum _cacheMode;
  std::vector<char *>  _charstarstar;
  struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *_voidstarstar;
};


/* "cuda/_lib/utils.pxd":82
 *     cdef InputVoidPtrPtrHelper _voidstarstar # list of addresses
 * 
 * cdef class HelperCUmemAllocationHandleType:             # <<<<<<<<<<<<<<
 *     cdef void* _cptr
 *     cdef ccuda.CUmemAllocationHandleType_enum _type
 */
struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType {
  PyObject_HEAD
  void *_cptr;
  enum CUmemAllocationHandleType_enum _type;
  int _int;
  void *_handle;
  unsigned int _d3dkmt_handle;
};


/* "cuda/_lib/utils.pxd":91
 *     cdef unsigned int _d3dkmt_handle
 * 
 * cdef class InputVoidPtrPtrHelper:             # <<<<<<<<<<<<<<
 *     cdef void** _cptr
 */
struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper {
  PyObject_HEAD
  void **_cptr;
};


/* "cuda/cuda.pxd":11
 * cimport cuda._lib.utils as utils
 * 
 * cdef class CUcontext:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUcontext {
  PyObject_HEAD
  CUcontext __pyx___val;
  CUcontext *_ptr;
};


/* "cuda/cuda.pxd":25
 *     cdef ccuda.CUcontext* _ptr
 * 
 * cdef class CUmodule:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUmodule {
  PyObject_HEAD
  CUmodule __pyx___val;
  CUmodule *_ptr;
};


/* "cuda/cuda.pxd":39
 *     cdef ccuda.CUmodule* _ptr
 * 
 * cdef class CUfunction:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUfunction {
  PyObject_HEAD
  CUfunction __pyx___val;
  CUfunction *_ptr;
};


/* "cuda/cuda.pxd":53
 *     cdef ccuda.CUfunction* _ptr
 * 
 * cdef class CUarray:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUarray {
  PyObject_HEAD
  CUarray __pyx___val;
  CUarray *_ptr;
};


/* "cuda/cuda.pxd":67
 *     cdef ccuda.CUarray* _ptr
 * 
 * cdef class CUmipmappedArray:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUmipmappedArray {
  PyObject_HEAD
  CUmipmappedArray __pyx___val;
  CUmipmappedArray *_ptr;
};


/* "cuda/cuda.pxd":81
 *     cdef ccuda.CUmipmappedArray* _ptr
 * 
 * cdef class CUtexref:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUtexref {
  PyObject_HEAD
  CUtexref __pyx___val;
  CUtexref *_ptr;
};


/* "cuda/cuda.pxd":95
 *     cdef ccuda.CUtexref* _ptr
 * 
 * cdef class CUsurfref:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUsurfref {
  PyObject_HEAD
  CUsurfref __pyx___val;
  CUsurfref *_ptr;
};


/* "cuda/cuda.pxd":109
 *     cdef ccuda.CUsurfref* _ptr
 * 
 * cdef class CUevent:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUevent {
  PyObject_HEAD
  CUevent __pyx___val;
  CUevent *_ptr;
};


/* "cuda/cuda.pxd":123
 *     cdef ccuda.CUevent* _ptr
 * 
 * cdef class CUstream:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUstream {
  PyObject_HEAD
  CUstream __pyx___val;
  CUstream *_ptr;
};


/* "cuda/cuda.pxd":137
 *     cdef ccuda.CUstream* _ptr
 * 
 * cdef class CUgraphicsResource:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUgraphicsResource {
  PyObject_HEAD
  CUgraphicsResource __pyx___val;
  CUgraphicsResource *_ptr;
};


/* "cuda/cuda.pxd":151
 *     cdef ccuda.CUgraphicsResource* _ptr
 * 
 * cdef class CUexternalMemory:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUexternalMemory {
  PyObject_HEAD
  CUexternalMemory __pyx___val;
  CUexternalMemory *_ptr;
};


/* "cuda/cuda.pxd":165
 *     cdef ccuda.CUexternalMemory* _ptr
 * 
 * cdef class CUexternalSemaphore:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore {
  PyObject_HEAD
  CUexternalSemaphore __pyx___val;
  CUexternalSemaphore *_ptr;
};


/* "cuda/cuda.pxd":179
 *     cdef ccuda.CUexternalSemaphore* _ptr
 * 
 * cdef class CUgraph:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUgraph {
  PyObject_HEAD
  CUgraph __pyx___val;
  CUgraph *_ptr;
};


/* "cuda/cuda.pxd":193
 *     cdef ccuda.CUgraph* _ptr
 * 
 * cdef class CUgraphNode:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUgraphNode {
  PyObject_HEAD
  CUgraphNode __pyx___val;
  CUgraphNode *_ptr;
};


/* "cuda/cuda.pxd":207
 *     cdef ccuda.CUgraphNode* _ptr
 * 
 * cdef class CUgraphExec:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUgraphExec {
  PyObject_HEAD
  CUgraphExec __pyx___val;
  CUgraphExec *_ptr;
};


/* "cuda/cuda.pxd":221
 *     cdef ccuda.CUgraphExec* _ptr
 * 
 * cdef class CUmemoryPool:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUmemoryPool {
  PyObject_HEAD
  CUmemoryPool __pyx___val;
  CUmemoryPool *_ptr;
};


/* "cuda/cuda.pxd":235
 *     cdef ccuda.CUmemoryPool* _ptr
 * 
 * cdef class CUuserObject:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUuserObject {
  PyObject_HEAD
  CUuserObject __pyx___val;
  CUuserObject *_ptr;
};


/* "cuda/cuda.pxd":249
 *     cdef ccuda.CUuserObject* _ptr
 * 
 * cdef class CUlinkState:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUlinkState {
  PyObject_HEAD
  CUlinkState __pyx___val;
  CUlinkState *_ptr;
  PyObject *_keepalive;
};


/* "cuda/cuda.pxd":262
 *     cdef list _keepalive
 * 
 * cdef class EGLImageKHR:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_EGLImageKHR {
  PyObject_HEAD
  __pyx_t_4cuda_5ccuda_EGLImageKHR __pyx___val;
  __pyx_t_4cuda_5ccuda_EGLImageKHR *_ptr;
};


/* "cuda/cuda.pxd":274
 *     cdef ccuda.EGLImageKHR* _ptr
 * 
 * cdef class EGLStreamKHR:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_EGLStreamKHR {
  PyObject_HEAD
  __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx___val;
  __pyx_t_4cuda_5ccuda_EGLStreamKHR *_ptr;
};


/* "cuda/cuda.pxd":286
 *     cdef ccuda.EGLStreamKHR* _ptr
 * 
 * cdef class EGLSyncKHR:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_EGLSyncKHR {
  PyObject_HEAD
  __pyx_t_4cuda_5ccuda_EGLSyncKHR __pyx___val;
  __pyx_t_4cuda_5ccuda_EGLSyncKHR *_ptr;
};


/* "cuda/cuda.pxd":298
 *     cdef ccuda.EGLSyncKHR* _ptr
 * 
 * cdef class CUeglStreamConnection:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection {
  PyObject_HEAD
  __pyx_t_4cuda_5ccuda_CUeglStreamConnection __pyx___val;
  __pyx_t_4cuda_5ccuda_CUeglStreamConnection *_ptr;
};


/* "cuda/cuda.pxd":312
 *     cdef ccuda.CUeglStreamConnection* _ptr
 * 
 * cdef class CUhostFn:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUhostFn {
  PyObject_HEAD
  CUhostFn __pyx___val;
  CUhostFn *_ptr;
};


/* "cuda/cuda.pxd":324
 *     cdef ccuda.CUhostFn* _ptr
 * 
 * cdef class CUstreamCallback:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUstreamCallback {
  PyObject_HEAD
  CUstreamCallback __pyx___val;
  CUstreamCallback *_ptr;
};


/* "cuda/cuda.pxd":336
 *     cdef ccuda.CUstreamCallback* _ptr
 * 
 * cdef class CUoccupancyB2DSize:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize {
  PyObject_HEAD
  CUoccupancyB2DSize __pyx___val;
  CUoccupancyB2DSize *_ptr;
};


/* "cuda/cuda.pxd":348
 *     cdef ccuda.CUoccupancyB2DSize* _ptr
 * 
 * cdef class CUuuid_st:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUuuid_st {
  PyObject_HEAD
  struct CUuuid_st __pyx___val;
  struct CUuuid_st *_ptr;
};


/* "cuda/cuda.pxd":365
 *     cdef ccuda.CUuuid_st* _ptr
 * 
 * cdef class CUipcEventHandle_st:             # <<<<<<<<<<<<<<
 *     """
 *     CUDA IPC event handle
 */
struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st {
  PyObject_HEAD
  struct CUipcEventHandle_st __pyx___val;
  struct CUipcEventHandle_st *_ptr;
};


/* "cuda/cuda.pxd":383
 *     cdef ccuda.CUipcEventHandle_st* _ptr
 * 
 * cdef class CUipcMemHandle_st:             # <<<<<<<<<<<<<<
 *     """
 *     CUDA IPC mem handle
 */
struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st {
  PyObject_HEAD
  struct CUipcMemHandle_st __pyx___val;
  struct CUipcMemHandle_st *_ptr;
};


/* "cuda/cuda.pxd":401
 *     cdef ccuda.CUipcMemHandle_st* _ptr
 * 
 * cdef class CUstreamMemOpWaitValueParams_st:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st {
  PyObject_HEAD
  union CUstreamBatchMemOpParams_union *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_address;
  struct __pyx_obj_4cuda_4cuda_cuuint64_t *_value64;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_alias;
};


/* "cuda/cuda.pxd":428
 *     cdef CUdeviceptr _alias
 * 
 * cdef class CUstreamMemOpWriteValueParams_st:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st {
  PyObject_HEAD
  union CUstreamBatchMemOpParams_union *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_address;
  struct __pyx_obj_4cuda_4cuda_cuuint64_t *_value64;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_alias;
};


/* "cuda/cuda.pxd":455
 *     cdef CUdeviceptr _alias
 * 
 * cdef class CUstreamMemOpFlushRemoteWritesParams_st:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st {
  PyObject_HEAD
  union CUstreamBatchMemOpParams_union *_ptr;
};


/* "cuda/cuda.pxd":473
 *     cdef ccuda.CUstreamBatchMemOpParams_union* _ptr
 * 
 * cdef class CUstreamMemOpMemoryBarrierParams_st:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st {
  PyObject_HEAD
  union CUstreamBatchMemOpParams_union *_ptr;
};


/* "cuda/cuda.pxd":491
 *     cdef ccuda.CUstreamBatchMemOpParams_union* _ptr
 * 
 * cdef class CUstreamBatchMemOpParams_union:             # <<<<<<<<<<<<<<
 *     """
 *     Per-operation parameters for cuStreamBatchMemOp
 */
struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union {
  PyObject_HEAD
  union CUstreamBatchMemOpParams_union __pyx___val;
  union CUstreamBatchMemOpParams_union *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *_waitValue;
  struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *_writeValue;
  struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *_flushRemoteWrites;
  struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *_memoryBarrier;
};


/* "cuda/cuda.pxd":524
 *     cdef CUstreamMemOpMemoryBarrierParams_st _memoryBarrier
 * 
 * cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st {
  PyObject_HEAD
  struct CUDA_BATCH_MEM_OP_NODE_PARAMS_st __pyx___val;
  struct CUDA_BATCH_MEM_OP_NODE_PARAMS_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUcontext *_ctx;
  size_t _paramArray_length;
  CUstreamBatchMemOpParams *_paramArray;
};


/* "cuda/cuda.pxd":550
 *     cdef ccuda.CUstreamBatchMemOpParams* _paramArray
 * 
 * cdef class CUdevprop_st:             # <<<<<<<<<<<<<<
 *     """
 *     Legacy device properties
 */
struct __pyx_obj_4cuda_4cuda_CUdevprop_st {
  PyObject_HEAD
  struct CUdevprop_st __pyx___val;
  struct CUdevprop_st *_ptr;
};


/* "cuda/cuda.pxd":586
 *     cdef ccuda.CUdevprop_st* _ptr
 * 
 * cdef class CUaccessPolicyWindow_st:             # <<<<<<<<<<<<<<
 *     """
 *     Specifies an access policy for a window, a contiguous extent of
 */
struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st {
  PyObject_HEAD
  struct CUaccessPolicyWindow_st __pyx___val;
  struct CUaccessPolicyWindow_st *_ptr;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cbase_ptr;
};


/* "cuda/cuda.pxd":625
 *     cdef utils.HelperInputVoidPtr _cbase_ptr
 * 
 * cdef class CUDA_KERNEL_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     """
 *     GPU kernel node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st {
  PyObject_HEAD
  struct CUDA_KERNEL_NODE_PARAMS_st __pyx___val;
  struct CUDA_KERNEL_NODE_PARAMS_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUfunction *_func;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperKernelParams *_ckernelParams;
};


/* "cuda/cuda.pxd":663
 *     cdef utils.HelperKernelParams _ckernelParams
 * 
 * cdef class CUDA_MEMSET_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     """
 *     Memset node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st {
  PyObject_HEAD
  struct CUDA_MEMSET_NODE_PARAMS_st __pyx___val;
  struct CUDA_MEMSET_NODE_PARAMS_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_dst;
};


/* "cuda/cuda.pxd":692
 *     cdef CUdeviceptr _dst
 * 
 * cdef class CUDA_HOST_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     """
 *     Host node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st {
  PyObject_HEAD
  struct CUDA_HOST_NODE_PARAMS_st __pyx___val;
  struct CUDA_HOST_NODE_PARAMS_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUhostFn *_fn;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cuserData;
};


/* "cuda/cuda.pxd":714
 *     cdef utils.HelperInputVoidPtr _cuserData
 * 
 * cdef class _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s {
  PyObject_HEAD
  union CUlaunchAttributeValue_union *_ptr;
};


/* "cuda/cuda.pxd":734
 *     cdef ccuda.CUlaunchAttributeValue_union* _ptr
 * 
 * cdef class _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s {
  PyObject_HEAD
  union CUlaunchAttributeValue_union *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUevent *_event;
};


/* "cuda/cuda.pxd":755
 *     cdef CUevent _event
 * 
 * cdef class CUlaunchAttributeValue_union:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union {
  PyObject_HEAD
  union CUlaunchAttributeValue_union __pyx___val;
  union CUlaunchAttributeValue_union *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow *_accessPolicyWindow;
  struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *_clusterDim;
  struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *_programmaticEvent;
};


/* "cuda/cuda.pxd":792
 *     cdef _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s _programmaticEvent
 * 
 * cdef class CUlaunchAttribute_st:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st {
  PyObject_HEAD
  struct CUlaunchAttribute_st __pyx___val;
  struct CUlaunchAttribute_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue *_value;
};


/* "cuda/cuda.pxd":812
 *     cdef CUlaunchAttributeValue _value
 * 
 * cdef class CUlaunchConfig_st:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st {
  PyObject_HEAD
  struct CUlaunchConfig_st __pyx___val;
  struct CUlaunchConfig_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUstream *_hStream;
  size_t _attrs_length;
  CUlaunchAttribute *_attrs;
};


/* "cuda/cuda.pxd":850
 *     cdef ccuda.CUlaunchAttribute* _attrs
 * 
 * cdef class CUexecAffinitySmCount_st:             # <<<<<<<<<<<<<<
 *     """
 *     Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT
 */
struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st {
  PyObject_HEAD
  struct CUexecAffinitySmCount_st __pyx___val;
  struct CUexecAffinitySmCount_st *_ptr;
};


/* "cuda/cuda.pxd":868
 *     cdef ccuda.CUexecAffinitySmCount_st* _ptr
 * 
 * cdef class _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u {
  PyObject_HEAD
  struct CUexecAffinityParam_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount *_smCount;
};


/* "cuda/cuda.pxd":885
 *     cdef CUexecAffinitySmCount _smCount
 * 
 * cdef class CUexecAffinityParam_st:             # <<<<<<<<<<<<<<
 *     """
 *     Execution Affinity Parameters
 */
struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st {
  PyObject_HEAD
  struct CUexecAffinityParam_st __pyx___val;
  struct CUexecAffinityParam_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *_param;
};


/* "cuda/cuda.pxd":906
 *     cdef _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u _param
 * 
 * cdef class CUDA_MEMCPY2D_st:             # <<<<<<<<<<<<<<
 *     """
 *     2D memory copy parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st {
  PyObject_HEAD
  struct CUDA_MEMCPY2D_st __pyx___val;
  struct CUDA_MEMCPY2D_st *_ptr;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_csrcHost;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_srcDevice;
  struct __pyx_obj_4cuda_4cuda_CUarray *_srcArray;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cdstHost;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_dstDevice;
  struct __pyx_obj_4cuda_4cuda_CUarray *_dstArray;
};


/* "cuda/cuda.pxd":960
 *     cdef CUarray _dstArray
 * 
 * cdef class CUDA_MEMCPY3D_st:             # <<<<<<<<<<<<<<
 *     """
 *     3D memory copy parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st {
  PyObject_HEAD
  struct CUDA_MEMCPY3D_st __pyx___val;
  struct CUDA_MEMCPY3D_st *_ptr;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_csrcHost;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_srcDevice;
  struct __pyx_obj_4cuda_4cuda_CUarray *_srcArray;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_creserved0;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cdstHost;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_dstDevice;
  struct __pyx_obj_4cuda_4cuda_CUarray *_dstArray;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_creserved1;
};


/* "cuda/cuda.pxd":1035
 *     cdef utils.HelperInputVoidPtr _creserved1
 * 
 * cdef class CUDA_MEMCPY3D_PEER_st:             # <<<<<<<<<<<<<<
 *     """
 *     3D memory cross-context copy parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st {
  PyObject_HEAD
  struct CUDA_MEMCPY3D_PEER_st __pyx___val;
  struct CUDA_MEMCPY3D_PEER_st *_ptr;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_csrcHost;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_srcDevice;
  struct __pyx_obj_4cuda_4cuda_CUarray *_srcArray;
  struct __pyx_obj_4cuda_4cuda_CUcontext *_srcContext;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cdstHost;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_dstDevice;
  struct __pyx_obj_4cuda_4cuda_CUarray *_dstArray;
  struct __pyx_obj_4cuda_4cuda_CUcontext *_dstContext;
};


/* "cuda/cuda.pxd":1111
 *     cdef CUcontext _dstContext
 * 
 * cdef class CUDA_ARRAY_DESCRIPTOR_st:             # <<<<<<<<<<<<<<
 *     """
 *     Array descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st {
  PyObject_HEAD
  struct CUDA_ARRAY_DESCRIPTOR_st __pyx___val;
  struct CUDA_ARRAY_DESCRIPTOR_st *_ptr;
};


/* "cuda/cuda.pxd":1135
 *     cdef ccuda.CUDA_ARRAY_DESCRIPTOR_st* _ptr
 * 
 * cdef class CUDA_ARRAY3D_DESCRIPTOR_st:             # <<<<<<<<<<<<<<
 *     """
 *     3D array descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st {
  PyObject_HEAD
  struct CUDA_ARRAY3D_DESCRIPTOR_st __pyx___val;
  struct CUDA_ARRAY3D_DESCRIPTOR_st *_ptr;
};


/* "cuda/cuda.pxd":1163
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR_st* _ptr
 * 
 * cdef class _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s {
  PyObject_HEAD
  struct CUDA_ARRAY_SPARSE_PROPERTIES_st *_ptr;
};


/* "cuda/cuda.pxd":1183
 *     cdef ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st* _ptr
 * 
 * cdef class CUDA_ARRAY_SPARSE_PROPERTIES_st:             # <<<<<<<<<<<<<<
 *     """
 *     CUDA array sparse properties
 */
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st {
  PyObject_HEAD
  struct CUDA_ARRAY_SPARSE_PROPERTIES_st __pyx___val;
  struct CUDA_ARRAY_SPARSE_PROPERTIES_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *_tileExtent;
};


/* "cuda/cuda.pxd":1211
 *     cdef _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s _tileExtent
 * 
 * cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_st:             # <<<<<<<<<<<<<<
 *     """
 *     CUDA array memory requirements
 */
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st {
  PyObject_HEAD
  struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st __pyx___val;
  struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st *_ptr;
};


/* "cuda/cuda.pxd":1233
 *     cdef ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st* _ptr
 * 
 * cdef class _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s {
  PyObject_HEAD
  struct CUDA_RESOURCE_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUarray *_hArray;
};


/* "cuda/cuda.pxd":1250
 *     cdef CUarray _hArray
 * 
 * cdef class _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s {
  PyObject_HEAD
  struct CUDA_RESOURCE_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *_hMipmappedArray;
};


/* "cuda/cuda.pxd":1267
 *     cdef CUmipmappedArray _hMipmappedArray
 * 
 * cdef class _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s {
  PyObject_HEAD
  struct CUDA_RESOURCE_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_devPtr;
};


/* "cuda/cuda.pxd":1290
 *     cdef CUdeviceptr _devPtr
 * 
 * cdef class _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s {
  PyObject_HEAD
  struct CUDA_RESOURCE_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_devPtr;
};


/* "cuda/cuda.pxd":1317
 *     cdef CUdeviceptr _devPtr
 * 
 * cdef class _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s {
  PyObject_HEAD
  struct CUDA_RESOURCE_DESC_st *_ptr;
};


/* "cuda/cuda.pxd":1333
 *     cdef ccuda.CUDA_RESOURCE_DESC_st* _ptr
 * 
 * cdef class _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u {
  PyObject_HEAD
  struct CUDA_RESOURCE_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *_array;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *_mipmap;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *_linear;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *_pitch2D;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *_reserved;
};


/* "cuda/cuda.pxd":1362
 *     cdef _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s _reserved
 * 
 * cdef class CUDA_RESOURCE_DESC_st:             # <<<<<<<<<<<<<<
 *     """
 *     CUDA Resource descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st {
  PyObject_HEAD
  struct CUDA_RESOURCE_DESC_st __pyx___val;
  struct CUDA_RESOURCE_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *_res;
};


/* "cuda/cuda.pxd":1385
 *     cdef _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u _res
 * 
 * cdef class CUDA_TEXTURE_DESC_st:             # <<<<<<<<<<<<<<
 *     """
 *     Texture descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st {
  PyObject_HEAD
  struct CUDA_TEXTURE_DESC_st __pyx___val;
  struct CUDA_TEXTURE_DESC_st *_ptr;
};


/* "cuda/cuda.pxd":1421
 *     cdef ccuda.CUDA_TEXTURE_DESC_st* _ptr
 * 
 * cdef class CUDA_RESOURCE_VIEW_DESC_st:             # <<<<<<<<<<<<<<
 *     """
 *     Resource view descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st {
  PyObject_HEAD
  struct CUDA_RESOURCE_VIEW_DESC_st __pyx___val;
  struct CUDA_RESOURCE_VIEW_DESC_st *_ptr;
};


/* "cuda/cuda.pxd":1455
 *     cdef ccuda.CUDA_RESOURCE_VIEW_DESC_st* _ptr
 * 
 * cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:             # <<<<<<<<<<<<<<
 *     """
 *     GPU Direct v3 tokens
 */
struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st {
  PyObject_HEAD
  struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st __pyx___val;
  struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *_ptr;
};


/* "cuda/cuda.pxd":1475
 *     cdef ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st* _ptr
 * 
 * cdef class CUDA_LAUNCH_PARAMS_st:             # <<<<<<<<<<<<<<
 *     """
 *     Kernel launch parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st {
  PyObject_HEAD
  struct CUDA_LAUNCH_PARAMS_st __pyx___val;
  struct CUDA_LAUNCH_PARAMS_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUfunction *_function;
  struct __pyx_obj_4cuda_4cuda_CUstream *_hStream;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperKernelParams *_ckernelParams;
};


/* "cuda/cuda.pxd":1514
 *     cdef utils.HelperKernelParams _ckernelParams
 * 
 * cdef class _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s {
  PyObject_HEAD
  struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_chandle;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cname;
};


/* "cuda/cuda.pxd":1534
 *     cdef utils.HelperInputVoidPtr _cname
 * 
 * cdef class _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u {
  PyObject_HEAD
  struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *_win32;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cnvSciBufObject;
};


/* "cuda/cuda.pxd":1556
 *     cdef utils.HelperInputVoidPtr _cnvSciBufObject
 * 
 * cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st:             # <<<<<<<<<<<<<<
 *     """
 *     External memory handle descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st {
  PyObject_HEAD
  struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st __pyx___val;
  struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *_handle;
};


/* "cuda/cuda.pxd":1583
 *     cdef _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u _handle
 * 
 * cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:             # <<<<<<<<<<<<<<
 *     """
 *     External memory buffer descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st {
  PyObject_HEAD
  struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st __pyx___val;
  struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *_ptr;
};


/* "cuda/cuda.pxd":1607
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st* _ptr
 * 
 * cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:             # <<<<<<<<<<<<<<
 *     """
 *     External memory mipmap descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st {
  PyObject_HEAD
  struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st __pyx___val;
  struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *_arrayDesc;
};


/* "cuda/cuda.pxd":1633
 *     cdef CUDA_ARRAY3D_DESCRIPTOR _arrayDesc
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_chandle;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cname;
};


/* "cuda/cuda.pxd":1653
 *     cdef utils.HelperInputVoidPtr _cname
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *_win32;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cnvSciSyncObj;
};


/* "cuda/cuda.pxd":1675
 *     cdef utils.HelperInputVoidPtr _cnvSciSyncObj
 * 
 * cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st:             # <<<<<<<<<<<<<<
 *     """
 *     External semaphore handle descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st __pyx___val;
  struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *_handle;
};


/* "cuda/cuda.pxd":1700
 *     cdef _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u _handle
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *_ptr;
};


/* "cuda/cuda.pxd":1716
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _ptr
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *_ptr;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cfence;
};


/* "cuda/cuda.pxd":1735
 *     cdef utils.HelperInputVoidPtr _cfence
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *_ptr;
};


/* "cuda/cuda.pxd":1751
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _ptr
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *_fence;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *_nvSciSync;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *_keyedMutex;
};


/* "cuda/cuda.pxd":1776
 *     cdef _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s _keyedMutex
 * 
 * cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st:             # <<<<<<<<<<<<<<
 *     """
 *     External semaphore signal parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st __pyx___val;
  struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *_params;
};


/* "cuda/cuda.pxd":1806
 *     cdef _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s _params
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *_ptr;
};


/* "cuda/cuda.pxd":1822
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _ptr
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *_ptr;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cfence;
};


/* "cuda/cuda.pxd":1841
 *     cdef utils.HelperInputVoidPtr _cfence
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *_ptr;
};


/* "cuda/cuda.pxd":1859
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _ptr
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *_fence;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *_nvSciSync;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *_keyedMutex;
};


/* "cuda/cuda.pxd":1884
 *     cdef _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s _keyedMutex
 * 
 * cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st:             # <<<<<<<<<<<<<<
 *     """
 *     External semaphore wait parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st {
  PyObject_HEAD
  struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st __pyx___val;
  struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *_params;
};


/* "cuda/cuda.pxd":1914
 *     cdef _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s _params
 * 
 * cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     """
 *     Semaphore signal node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st {
  PyObject_HEAD
  struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st __pyx___val;
  struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *_ptr;
  size_t _extSemArray_length;
  CUexternalSemaphore *_extSemArray;
  size_t _paramsArray_length;
  CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *_paramsArray;
};


/* "cuda/cuda.pxd":1941
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* _paramsArray
 * 
 * cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     """
 *     Semaphore wait node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st {
  PyObject_HEAD
  struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st __pyx___val;
  struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *_ptr;
  size_t _extSemArray_length;
  CUexternalSemaphore *_extSemArray;
  size_t _paramsArray_length;
  CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *_paramsArray;
};


/* "cuda/cuda.pxd":1968
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* _paramsArray
 * 
 * cdef class _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u {
  PyObject_HEAD
  struct CUarrayMapInfo_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *_mipmap;
  struct __pyx_obj_4cuda_4cuda_CUarray *_array;
};


/* "cuda/cuda.pxd":1988
 *     cdef CUarray _array
 * 
 * cdef class _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s {
  PyObject_HEAD
  struct CUarrayMapInfo_st *_ptr;
};


/* "cuda/cuda.pxd":2018
 *     cdef ccuda.CUarrayMapInfo_st* _ptr
 * 
 * cdef class _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s {
  PyObject_HEAD
  struct CUarrayMapInfo_st *_ptr;
};


/* "cuda/cuda.pxd":2038
 *     cdef ccuda.CUarrayMapInfo_st* _ptr
 * 
 * cdef class _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u {
  PyObject_HEAD
  struct CUarrayMapInfo_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *_sparseLevel;
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *_miptail;
};


/* "cuda/cuda.pxd":2058
 *     cdef _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s _miptail
 * 
 * cdef class _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u {
  PyObject_HEAD
  struct CUarrayMapInfo_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *_memHandle;
};


/* "cuda/cuda.pxd":2075
 *     cdef CUmemGenericAllocationHandle _memHandle
 * 
 * cdef class CUarrayMapInfo_st:             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the CUDA array or CUDA mipmapped array memory mapping
 */
struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st {
  PyObject_HEAD
  struct CUarrayMapInfo_st __pyx___val;
  struct CUarrayMapInfo_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *_resource;
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *_subresource;
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *_memHandle;
};


/* "cuda/cuda.pxd":2117
 *     cdef _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u _memHandle
 * 
 * cdef class CUmemLocation_st:             # <<<<<<<<<<<<<<
 *     """
 *     Specifies a memory location.
 */
struct __pyx_obj_4cuda_4cuda_CUmemLocation_st {
  PyObject_HEAD
  struct CUmemLocation_st __pyx___val;
  struct CUmemLocation_st *_ptr;
};


/* "cuda/cuda.pxd":2137
 *     cdef ccuda.CUmemLocation_st* _ptr
 * 
 * cdef class _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s {
  PyObject_HEAD
  struct CUmemAllocationProp_st *_ptr;
};


/* "cuda/cuda.pxd":2159
 *     cdef ccuda.CUmemAllocationProp_st* _ptr
 * 
 * cdef class CUmemAllocationProp_st:             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the allocation properties for a allocation.
 */
struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st {
  PyObject_HEAD
  struct CUmemAllocationProp_st __pyx___val;
  struct CUmemAllocationProp_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUmemLocation *_location;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cwin32HandleMetaData;
  struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *_allocFlags;
};


/* "cuda/cuda.pxd":2192
 *     cdef _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s _allocFlags
 * 
 * cdef class CUmemAccessDesc_st:             # <<<<<<<<<<<<<<
 *     """
 *     Memory access descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st {
  PyObject_HEAD
  struct CUmemAccessDesc_st __pyx___val;
  struct CUmemAccessDesc_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUmemLocation *_location;
};


/* "cuda/cuda.pxd":2213
 *     cdef CUmemLocation _location
 * 
 * cdef class CUmemPoolProps_st:             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the properties of allocations made from the pool.
 */
struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st {
  PyObject_HEAD
  struct CUmemPoolProps_st __pyx___val;
  struct CUmemPoolProps_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUmemLocation *_location;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *_cwin32SecurityAttributes;
};


/* "cuda/cuda.pxd":2246
 *     cdef utils.HelperInputVoidPtr _cwin32SecurityAttributes
 * 
 * cdef class CUmemPoolPtrExportData_st:             # <<<<<<<<<<<<<<
 *     """
 *     Opaque data for exporting a pool allocation
 */
struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st {
  PyObject_HEAD
  struct CUmemPoolPtrExportData_st __pyx___val;
  struct CUmemPoolPtrExportData_st *_ptr;
};


/* "cuda/cuda.pxd":2264
 *     cdef ccuda.CUmemPoolPtrExportData_st* _ptr
 * 
 * cdef class CUDA_MEM_ALLOC_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *     """
 *     Memory allocation node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st {
  PyObject_HEAD
  struct CUDA_MEM_ALLOC_NODE_PARAMS_st __pyx___val;
  struct CUDA_MEM_ALLOC_NODE_PARAMS_st *_ptr;
  struct __pyx_obj_4cuda_4cuda_CUmemPoolProps *_poolProps;
  size_t _accessDescs_length;
  CUmemAccessDesc *_accessDescs;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *_dptr;
};


/* "cuda/cuda.pxd":2298
 *     cdef CUdeviceptr _dptr
 * 
 * cdef class _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u {
  PyObject_HEAD
  struct __pyx_t_4cuda_5ccuda_CUeglFrame_st *_ptr;
};


/* "cuda/cuda.pxd":2316
 *     cdef ccuda.CUeglFrame_st* _ptr
 * 
 * cdef class CUeglFrame_st:             # <<<<<<<<<<<<<<
 *     """
 *     CUDA EGLFrame structure Descriptor - structure defining one frame
 */
struct __pyx_obj_4cuda_4cuda_CUeglFrame_st {
  PyObject_HEAD
  struct __pyx_t_4cuda_5ccuda_CUeglFrame_st __pyx___val;
  struct __pyx_t_4cuda_5ccuda_CUeglFrame_st *_ptr;
  struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *_frame;
};


/* "cuda/cuda.pxd":2355
 *     cdef _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u _frame
 * 
 * cdef class CUuuid(CUuuid_st):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUuuid {
  struct __pyx_obj_4cuda_4cuda_CUuuid_st __pyx_base;
};


/* "cuda/cuda.pxd":2371
 *     pass
 * 
 * cdef class CUipcEventHandle_v1(CUipcEventHandle_st):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA IPC event handle
 */
struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_v1 {
  struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st __pyx_base;
};


/* "cuda/cuda.pxd":2388
 *     pass
 * 
 * cdef class CUipcEventHandle(CUipcEventHandle_st):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA IPC event handle
 */
struct __pyx_obj_4cuda_4cuda_CUipcEventHandle {
  struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st __pyx_base;
};


/* "cuda/cuda.pxd":2405
 *     pass
 * 
 * cdef class CUipcMemHandle_v1(CUipcMemHandle_st):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA IPC mem handle
 */
struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_v1 {
  struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st __pyx_base;
};


/* "cuda/cuda.pxd":2422
 *     pass
 * 
 * cdef class CUipcMemHandle(CUipcMemHandle_st):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA IPC mem handle
 */
struct __pyx_obj_4cuda_4cuda_CUipcMemHandle {
  struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st __pyx_base;
};


/* "cuda/cuda.pxd":2439
 *     pass
 * 
 * cdef class CUstreamBatchMemOpParams_v1(CUstreamBatchMemOpParams_union):             # <<<<<<<<<<<<<<
 *     """
 *     Per-operation parameters for cuStreamBatchMemOp
 */
struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_v1 {
  struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union __pyx_base;
};


/* "cuda/cuda.pxd":2466
 *     pass
 * 
 * cdef class CUstreamBatchMemOpParams(CUstreamBatchMemOpParams_union):             # <<<<<<<<<<<<<<
 *     """
 *     Per-operation parameters for cuStreamBatchMemOp
 */
struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams {
  struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union __pyx_base;
};


/* "cuda/cuda.pxd":2493
 *     pass
 * 
 * cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS(CUDA_BATCH_MEM_OP_NODE_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS {
  struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":2515
 *     pass
 * 
 * cdef class CUdevprop_v1(CUdevprop_st):             # <<<<<<<<<<<<<<
 *     """
 *     Legacy device properties
 */
struct __pyx_obj_4cuda_4cuda_CUdevprop_v1 {
  struct __pyx_obj_4cuda_4cuda_CUdevprop_st __pyx_base;
};


/* "cuda/cuda.pxd":2550
 *     pass
 * 
 * cdef class CUdevprop(CUdevprop_st):             # <<<<<<<<<<<<<<
 *     """
 *     Legacy device properties
 */
struct __pyx_obj_4cuda_4cuda_CUdevprop {
  struct __pyx_obj_4cuda_4cuda_CUdevprop_st __pyx_base;
};


/* "cuda/cuda.pxd":2585
 *     pass
 * 
 * cdef class CUaccessPolicyWindow_v1(CUaccessPolicyWindow_st):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies an access policy for a window, a contiguous extent of
 */
struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_v1 {
  struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st __pyx_base;
};


/* "cuda/cuda.pxd":2622
 *     pass
 * 
 * cdef class CUaccessPolicyWindow(CUaccessPolicyWindow_st):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies an access policy for a window, a contiguous extent of
 */
struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow {
  struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st __pyx_base;
};


/* "cuda/cuda.pxd":2659
 *     pass
 * 
 * cdef class CUDA_KERNEL_NODE_PARAMS_v1(CUDA_KERNEL_NODE_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     GPU kernel node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":2694
 *     pass
 * 
 * cdef class CUDA_KERNEL_NODE_PARAMS(CUDA_KERNEL_NODE_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     GPU kernel node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS {
  struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":2729
 *     pass
 * 
 * cdef class CUDA_MEMSET_NODE_PARAMS_v1(CUDA_MEMSET_NODE_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     Memset node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":2756
 *     pass
 * 
 * cdef class CUDA_MEMSET_NODE_PARAMS(CUDA_MEMSET_NODE_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     Memset node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":2783
 *     pass
 * 
 * cdef class CUDA_HOST_NODE_PARAMS_v1(CUDA_HOST_NODE_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     Host node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":2802
 *     pass
 * 
 * cdef class CUDA_HOST_NODE_PARAMS(CUDA_HOST_NODE_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     Host node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS {
  struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":2821
 *     pass
 * 
 * cdef class CUlaunchAttributeValue(CUlaunchAttributeValue_union):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue {
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union __pyx_base;
};


/* "cuda/cuda.pxd":2853
 *     pass
 * 
 * cdef class CUlaunchAttribute(CUlaunchAttribute_st):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute {
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st __pyx_base;
};


/* "cuda/cuda.pxd":2871
 *     pass
 * 
 * cdef class CUlaunchConfig(CUlaunchConfig_st):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUlaunchConfig {
  struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st __pyx_base;
};


/* "cuda/cuda.pxd":2905
 *     pass
 * 
 * cdef class CUkernelNodeAttrValue_v1(CUlaunchAttributeValue_union):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUkernelNodeAttrValue_v1 {
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union __pyx_base;
};


/* "cuda/cuda.pxd":2937
 *     pass
 * 
 * cdef class CUkernelNodeAttrValue(CUlaunchAttributeValue_union):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUkernelNodeAttrValue {
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union __pyx_base;
};


/* "cuda/cuda.pxd":2969
 *     pass
 * 
 * cdef class CUstreamAttrValue_v1(CUlaunchAttributeValue_union):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUstreamAttrValue_v1 {
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union __pyx_base;
};


/* "cuda/cuda.pxd":3001
 *     pass
 * 
 * cdef class CUstreamAttrValue(CUlaunchAttributeValue_union):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUstreamAttrValue {
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union __pyx_base;
};


/* "cuda/cuda.pxd":3033
 *     pass
 * 
 * cdef class CUexecAffinitySmCount_v1(CUexecAffinitySmCount_st):             # <<<<<<<<<<<<<<
 *     """
 *     Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT
 */
struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_v1 {
  struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st __pyx_base;
};


/* "cuda/cuda.pxd":3050
 *     pass
 * 
 * cdef class CUexecAffinitySmCount(CUexecAffinitySmCount_st):             # <<<<<<<<<<<<<<
 *     """
 *     Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT
 */
struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount {
  struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st __pyx_base;
};


/* "cuda/cuda.pxd":3067
 *     pass
 * 
 * cdef class CUexecAffinityParam_v1(CUexecAffinityParam_st):             # <<<<<<<<<<<<<<
 *     """
 *     Execution Affinity Parameters
 */
struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_v1 {
  struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st __pyx_base;
};


/* "cuda/cuda.pxd":3086
 *     pass
 * 
 * cdef class CUexecAffinityParam(CUexecAffinityParam_st):             # <<<<<<<<<<<<<<
 *     """
 *     Execution Affinity Parameters
 */
struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam {
  struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st __pyx_base;
};


/* "cuda/cuda.pxd":3105
 *     pass
 * 
 * cdef class CUDA_MEMCPY2D_v2(CUDA_MEMCPY2D_st):             # <<<<<<<<<<<<<<
 *     """
 *     2D memory copy parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_v2 {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st __pyx_base;
};


/* "cuda/cuda.pxd":3152
 *     pass
 * 
 * cdef class CUDA_MEMCPY2D(CUDA_MEMCPY2D_st):             # <<<<<<<<<<<<<<
 *     """
 *     2D memory copy parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st __pyx_base;
};


/* "cuda/cuda.pxd":3199
 *     pass
 * 
 * cdef class CUDA_MEMCPY3D_v2(CUDA_MEMCPY3D_st):             # <<<<<<<<<<<<<<
 *     """
 *     3D memory copy parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_v2 {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st __pyx_base;
};


/* "cuda/cuda.pxd":3265
 *     pass
 * 
 * cdef class CUDA_MEMCPY3D(CUDA_MEMCPY3D_st):             # <<<<<<<<<<<<<<
 *     """
 *     3D memory copy parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st __pyx_base;
};


/* "cuda/cuda.pxd":3331
 *     pass
 * 
 * cdef class CUDA_MEMCPY3D_PEER_v1(CUDA_MEMCPY3D_PEER_st):             # <<<<<<<<<<<<<<
 *     """
 *     3D memory cross-context copy parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st __pyx_base;
};


/* "cuda/cuda.pxd":3398
 *     pass
 * 
 * cdef class CUDA_MEMCPY3D_PEER(CUDA_MEMCPY3D_PEER_st):             # <<<<<<<<<<<<<<
 *     """
 *     3D memory cross-context copy parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st __pyx_base;
};


/* "cuda/cuda.pxd":3465
 *     pass
 * 
 * cdef class CUDA_ARRAY_DESCRIPTOR_v2(CUDA_ARRAY_DESCRIPTOR_st):             # <<<<<<<<<<<<<<
 *     """
 *     Array descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2 {
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st __pyx_base;
};


/* "cuda/cuda.pxd":3488
 *     pass
 * 
 * cdef class CUDA_ARRAY_DESCRIPTOR(CUDA_ARRAY_DESCRIPTOR_st):             # <<<<<<<<<<<<<<
 *     """
 *     Array descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR {
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st __pyx_base;
};


/* "cuda/cuda.pxd":3511
 *     pass
 * 
 * cdef class CUDA_ARRAY3D_DESCRIPTOR_v2(CUDA_ARRAY3D_DESCRIPTOR_st):             # <<<<<<<<<<<<<<
 *     """
 *     3D array descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2 {
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st __pyx_base;
};


/* "cuda/cuda.pxd":3538
 *     pass
 * 
 * cdef class CUDA_ARRAY3D_DESCRIPTOR(CUDA_ARRAY3D_DESCRIPTOR_st):             # <<<<<<<<<<<<<<
 *     """
 *     3D array descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR {
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st __pyx_base;
};


/* "cuda/cuda.pxd":3565
 *     pass
 * 
 * cdef class CUDA_ARRAY_SPARSE_PROPERTIES_v1(CUDA_ARRAY_SPARSE_PROPERTIES_st):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA array sparse properties
 */
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st __pyx_base;
};


/* "cuda/cuda.pxd":3591
 *     pass
 * 
 * cdef class CUDA_ARRAY_SPARSE_PROPERTIES(CUDA_ARRAY_SPARSE_PROPERTIES_st):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA array sparse properties
 */
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES {
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st __pyx_base;
};


/* "cuda/cuda.pxd":3617
 *     pass
 * 
 * cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_v1(CUDA_ARRAY_MEMORY_REQUIREMENTS_st):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA array memory requirements
 */
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st __pyx_base;
};


/* "cuda/cuda.pxd":3638
 *     pass
 * 
 * cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS(CUDA_ARRAY_MEMORY_REQUIREMENTS_st):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA array memory requirements
 */
struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS {
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st __pyx_base;
};


/* "cuda/cuda.pxd":3659
 *     pass
 * 
 * cdef class CUDA_RESOURCE_DESC_v1(CUDA_RESOURCE_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA Resource descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":3680
 *     pass
 * 
 * cdef class CUDA_RESOURCE_DESC(CUDA_RESOURCE_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA Resource descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC {
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":3701
 *     pass
 * 
 * cdef class CUDA_TEXTURE_DESC_v1(CUDA_TEXTURE_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     Texture descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":3736
 *     pass
 * 
 * cdef class CUDA_TEXTURE_DESC(CUDA_TEXTURE_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     Texture descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC {
  struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":3771
 *     pass
 * 
 * cdef class CUDA_RESOURCE_VIEW_DESC_v1(CUDA_RESOURCE_VIEW_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     Resource view descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":3804
 *     pass
 * 
 * cdef class CUDA_RESOURCE_VIEW_DESC(CUDA_RESOURCE_VIEW_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     Resource view descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC {
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":3837
 *     pass
 * 
 * cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st):             # <<<<<<<<<<<<<<
 *     """
 *     GPU Direct v3 tokens
 */
struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st __pyx_base;
};


/* "cuda/cuda.pxd":3856
 *     pass
 * 
 * cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st):             # <<<<<<<<<<<<<<
 *     """
 *     GPU Direct v3 tokens
 */
struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS {
  struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st __pyx_base;
};


/* "cuda/cuda.pxd":3875
 *     pass
 * 
 * cdef class CUDA_LAUNCH_PARAMS_v1(CUDA_LAUNCH_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     Kernel launch parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":3910
 *     pass
 * 
 * cdef class CUDA_LAUNCH_PARAMS(CUDA_LAUNCH_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     Kernel launch parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS {
  struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":3945
 *     pass
 * 
 * cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     External memory handle descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":3970
 *     pass
 * 
 * cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     External memory handle descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":3995
 *     pass
 * 
 * cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     External memory buffer descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":4018
 *     pass
 * 
 * cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     External memory buffer descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":4041
 *     pass
 * 
 * cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     External memory mipmap descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":4065
 *     pass
 * 
 * cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     External memory mipmap descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":4089
 *     pass
 * 
 * cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     External semaphore handle descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":4112
 *     pass
 * 
 * cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st):             # <<<<<<<<<<<<<<
 *     """
 *     External semaphore handle descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st __pyx_base;
};


/* "cuda/cuda.pxd":4135
 *     pass
 * 
 * cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     External semaphore signal parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":4163
 *     pass
 * 
 * cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     External semaphore signal parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":4191
 *     pass
 * 
 * cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     External semaphore wait parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":4219
 *     pass
 * 
 * cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     External semaphore wait parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":4247
 *     pass
 * 
 * cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     Semaphore signal node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":4269
 *     pass
 * 
 * cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     Semaphore signal node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":4291
 *     pass
 * 
 * cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1(CUDA_EXT_SEM_WAIT_NODE_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     Semaphore wait node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":4313
 *     pass
 * 
 * cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS(CUDA_EXT_SEM_WAIT_NODE_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     Semaphore wait node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":4335
 *     pass
 * 
 * cdef class CUarrayMapInfo_v1(CUarrayMapInfo_st):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the CUDA array or CUDA mipmapped array memory mapping
 */
struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_v1 {
  struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st __pyx_base;
};


/* "cuda/cuda.pxd":4373
 *     pass
 * 
 * cdef class CUarrayMapInfo(CUarrayMapInfo_st):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the CUDA array or CUDA mipmapped array memory mapping
 */
struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo {
  struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st __pyx_base;
};


/* "cuda/cuda.pxd":4411
 *     pass
 * 
 * cdef class CUmemLocation_v1(CUmemLocation_st):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies a memory location.
 */
struct __pyx_obj_4cuda_4cuda_CUmemLocation_v1 {
  struct __pyx_obj_4cuda_4cuda_CUmemLocation_st __pyx_base;
};


/* "cuda/cuda.pxd":4430
 *     pass
 * 
 * cdef class CUmemLocation(CUmemLocation_st):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies a memory location.
 */
struct __pyx_obj_4cuda_4cuda_CUmemLocation {
  struct __pyx_obj_4cuda_4cuda_CUmemLocation_st __pyx_base;
};


/* "cuda/cuda.pxd":4449
 *     pass
 * 
 * cdef class CUmemAllocationProp_v1(CUmemAllocationProp_st):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the allocation properties for a allocation.
 */
struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_v1 {
  struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st __pyx_base;
};


/* "cuda/cuda.pxd":4478
 *     pass
 * 
 * cdef class CUmemAllocationProp(CUmemAllocationProp_st):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the allocation properties for a allocation.
 */
struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp {
  struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st __pyx_base;
};


/* "cuda/cuda.pxd":4507
 *     pass
 * 
 * cdef class CUmemAccessDesc_v1(CUmemAccessDesc_st):             # <<<<<<<<<<<<<<
 *     """
 *     Memory access descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_v1 {
  struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st __pyx_base;
};


/* "cuda/cuda.pxd":4526
 *     pass
 * 
 * cdef class CUmemAccessDesc(CUmemAccessDesc_st):             # <<<<<<<<<<<<<<
 *     """
 *     Memory access descriptor
 */
struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc {
  struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st __pyx_base;
};


/* "cuda/cuda.pxd":4545
 *     pass
 * 
 * cdef class CUmemPoolProps_v1(CUmemPoolProps_st):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the properties of allocations made from the pool.
 */
struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_v1 {
  struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st __pyx_base;
};


/* "cuda/cuda.pxd":4575
 *     pass
 * 
 * cdef class CUmemPoolProps(CUmemPoolProps_st):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the properties of allocations made from the pool.
 */
struct __pyx_obj_4cuda_4cuda_CUmemPoolProps {
  struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st __pyx_base;
};


/* "cuda/cuda.pxd":4605
 *     pass
 * 
 * cdef class CUmemPoolPtrExportData_v1(CUmemPoolPtrExportData_st):             # <<<<<<<<<<<<<<
 *     """
 *     Opaque data for exporting a pool allocation
 */
struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_v1 {
  struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st __pyx_base;
};


/* "cuda/cuda.pxd":4622
 *     pass
 * 
 * cdef class CUmemPoolPtrExportData(CUmemPoolPtrExportData_st):             # <<<<<<<<<<<<<<
 *     """
 *     Opaque data for exporting a pool allocation
 */
struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData {
  struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st __pyx_base;
};


/* "cuda/cuda.pxd":4639
 *     pass
 * 
 * cdef class CUDA_MEM_ALLOC_NODE_PARAMS(CUDA_MEM_ALLOC_NODE_PARAMS_st):             # <<<<<<<<<<<<<<
 *     """
 *     Memory allocation node parameters
 */
struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st __pyx_base;
};


/* "cuda/cuda.pxd":4668
 *     pass
 * 
 * cdef class CUeglFrame_v1(CUeglFrame_st):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA EGLFrame structure Descriptor - structure defining one frame
 */
struct __pyx_obj_4cuda_4cuda_CUeglFrame_v1 {
  struct __pyx_obj_4cuda_4cuda_CUeglFrame_st __pyx_base;
};


/* "cuda/cuda.pxd":4705
 *     pass
 * 
 * cdef class CUeglFrame(CUeglFrame_st):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA EGLFrame structure Descriptor - structure defining one frame
 */
struct __pyx_obj_4cuda_4cuda_CUeglFrame {
  struct __pyx_obj_4cuda_4cuda_CUeglFrame_st __pyx_base;
};


/* "cuda/cuda.pxd":4742
 *     pass
 * 
 * cdef class cuuint32_t:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_cuuint32_t {
  PyObject_HEAD
  cuuint32_t __pyx___val;
  cuuint32_t *_ptr;
};


/* "cuda/cuda.pxd":4754
 *     cdef ccuda.cuuint32_t* _ptr
 * 
 * cdef class cuuint64_t:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_cuuint64_t {
  PyObject_HEAD
  cuuint64_t __pyx___val;
  cuuint64_t *_ptr;
};


/* "cuda/cuda.pxd":4766
 *     cdef ccuda.cuuint64_t* _ptr
 * 
 * cdef class CUdeviceptr_v2:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 {
  PyObject_HEAD
  CUdeviceptr_v2 __pyx___val;
  CUdeviceptr_v2 *_ptr;
};


/* "cuda/cuda.pxd":4780
 *     cdef ccuda.CUdeviceptr_v2* _ptr
 * 
 * cdef class CUdeviceptr:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUdeviceptr {
  PyObject_HEAD
  CUdeviceptr __pyx___val;
  CUdeviceptr *_ptr;
};


/* "cuda/cuda.pxd":4794
 *     cdef ccuda.CUdeviceptr* _ptr
 * 
 * cdef class CUdevice_v1:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUdevice_v1 {
  PyObject_HEAD
  CUdevice_v1 __pyx___val;
  CUdevice_v1 *_ptr;
};


/* "cuda/cuda.pxd":4808
 *     cdef ccuda.CUdevice_v1* _ptr
 * 
 * cdef class CUdevice:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUdevice {
  PyObject_HEAD
  CUdevice __pyx___val;
  CUdevice *_ptr;
};


/* "cuda/cuda.pxd":4822
 *     cdef ccuda.CUdevice* _ptr
 * 
 * cdef class CUtexObject_v1:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 {
  PyObject_HEAD
  CUtexObject_v1 __pyx___val;
  CUtexObject_v1 *_ptr;
};


/* "cuda/cuda.pxd":4836
 *     cdef ccuda.CUtexObject_v1* _ptr
 * 
 * cdef class CUtexObject:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUtexObject {
  PyObject_HEAD
  CUtexObject __pyx___val;
  CUtexObject *_ptr;
};


/* "cuda/cuda.pxd":4850
 *     cdef ccuda.CUtexObject* _ptr
 * 
 * cdef class CUsurfObject_v1:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 {
  PyObject_HEAD
  CUsurfObject_v1 __pyx___val;
  CUsurfObject_v1 *_ptr;
};


/* "cuda/cuda.pxd":4864
 *     cdef ccuda.CUsurfObject_v1* _ptr
 * 
 * cdef class CUsurfObject:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUsurfObject {
  PyObject_HEAD
  CUsurfObject __pyx___val;
  CUsurfObject *_ptr;
};


/* "cuda/cuda.pxd":4878
 *     cdef ccuda.CUsurfObject* _ptr
 * 
 * cdef class CUmemGenericAllocationHandle_v1:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 {
  PyObject_HEAD
  CUmemGenericAllocationHandle_v1 __pyx___val;
  CUmemGenericAllocationHandle_v1 *_ptr;
};


/* "cuda/cuda.pxd":4890
 *     cdef ccuda.CUmemGenericAllocationHandle_v1* _ptr
 * 
 * cdef class CUmemGenericAllocationHandle:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle {
  PyObject_HEAD
  CUmemGenericAllocationHandle __pyx___val;
  CUmemGenericAllocationHandle *_ptr;
};


/* "cuda/cuda.pxd":4902
 *     cdef ccuda.CUmemGenericAllocationHandle* _ptr
 * 
 * cdef class GLenum:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_GLenum {
  PyObject_HEAD
  __pyx_t_4cuda_5ccuda_GLenum __pyx___val;
  __pyx_t_4cuda_5ccuda_GLenum *_ptr;
};


/* "cuda/cuda.pxd":4914
 *     cdef ccuda.GLenum* _ptr
 * 
 * cdef class GLuint:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_GLuint {
  PyObject_HEAD
  __pyx_t_4cuda_5ccuda_GLuint __pyx___val;
  __pyx_t_4cuda_5ccuda_GLuint *_ptr;
};


/* "cuda/cuda.pxd":4926
 *     cdef ccuda.GLuint* _ptr
 * 
 * cdef class EGLint:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_EGLint {
  PyObject_HEAD
  __pyx_t_4cuda_5ccuda_EGLint __pyx___val;
  __pyx_t_4cuda_5ccuda_EGLint *_ptr;
};


/* "cuda/cuda.pxd":4938
 *     cdef ccuda.EGLint* _ptr
 * 
 * cdef class VdpDevice:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_VdpDevice {
  PyObject_HEAD
  __pyx_t_4cuda_5ccuda_VdpDevice __pyx___val;
  __pyx_t_4cuda_5ccuda_VdpDevice *_ptr;
};


/* "cuda/cuda.pxd":4950
 *     cdef ccuda.VdpDevice* _ptr
 * 
 * cdef class VdpGetProcAddress:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress {
  PyObject_HEAD
  __pyx_t_4cuda_5ccuda_VdpGetProcAddress __pyx___val;
  __pyx_t_4cuda_5ccuda_VdpGetProcAddress *_ptr;
};


/* "cuda/cuda.pxd":4962
 *     cdef ccuda.VdpGetProcAddress* _ptr
 * 
 * cdef class VdpVideoSurface:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_VdpVideoSurface {
  PyObject_HEAD
  __pyx_t_4cuda_5ccuda_VdpVideoSurface __pyx___val;
  __pyx_t_4cuda_5ccuda_VdpVideoSurface *_ptr;
};


/* "cuda/cuda.pxd":4974
 *     cdef ccuda.VdpVideoSurface* _ptr
 * 
 * cdef class VdpOutputSurface:             # <<<<<<<<<<<<<<
 *     """
 * 
 */
struct __pyx_obj_4cuda_4cuda_VdpOutputSurface {
  PyObject_HEAD
  __pyx_t_4cuda_5ccuda_VdpOutputSurface __pyx___val;
  __pyx_t_4cuda_5ccuda_VdpOutputSurface *_ptr;
};


/* "cuda/cuda.pyx":12825
 * 
 * @cython.embedsignature(True)
 * def cuCtxCreate_v3(paramsArray : List[CUexecAffinityParam], int numParams, unsigned int flags, dev):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context with execution affinity.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 {
  PyObject_HEAD
  PyObject *__pyx_v_paramsArray;
};


/* "cuda/cuda.pyx":12941
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUexecAffinityParam)) for _x in paramsArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUexecAffinityParam]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":13819
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadDataEx(image, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Load a module's data with options.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx {
  PyObject_HEAD
  PyObject *__pyx_v_options;
};


/* "cuda/cuda.pyx":13856
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":14133
 * 
 * @cython.embedsignature(True)
 * def cuLinkCreate(unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Creates a pending JIT linker invocation.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate {
  PyObject_HEAD
  PyObject *__pyx_v_options;
};


/* "cuda/cuda.pyx":14174
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":14190
 * 
 * @cython.embedsignature(True)
 * def cuLinkAddData(state, typename not None : CUjitInputType, data, size_t size, char* name, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Add an input to a pending linker invocation.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData {
  PyObject_HEAD
  PyObject *__pyx_v_options;
};


/* "cuda/cuda.pyx":14232
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":14257
 * 
 * @cython.embedsignature(True)
 * def cuLinkAddFile(state, typename not None : CUjitInputType, char* path, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Add a file input to a pending linker invocation.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile {
  PyObject_HEAD
  PyObject *__pyx_v_options;
};


/* "cuda/cuda.pyx":14297
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":18736
 * 
 * @cython.embedsignature(True)
 * def cuMemMapArrayAsync(mapInfoList : List[CUarrayMapInfo], unsigned int count, hStream):             # <<<<<<<<<<<<<<
 *     """ Maps or unmaps subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync {
  PyObject_HEAD
  PyObject *__pyx_v_mapInfoList;
};


/* "cuda/cuda.pyx":18890
 * 
 *     mapInfoList = [] if mapInfoList is None else mapInfoList
 *     if not all(isinstance(_x, (CUarrayMapInfo)) for _x in mapInfoList):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'mapInfoList' is not instance of type (expected List[ccuda.CUarrayMapInfo]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":18954
 * 
 * @cython.embedsignature(True)
 * def cuMemSetAccess(ptr, size_t size, desc : List[CUmemAccessDesc], size_t count):             # <<<<<<<<<<<<<<
 *     """ Set the access flags for each location specified in `desc` for the given virtual address range.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess {
  PyObject_HEAD
  PyObject *__pyx_v_desc;
};


/* "cuda/cuda.pyx":18985
 *     """
 *     desc = [] if desc is None else desc
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in desc):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'desc' is not instance of type (expected List[ccuda.CUmemAccessDesc]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":19546
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolSetAccess(pool, map : List[CUmemAccessDesc], size_t count):             # <<<<<<<<<<<<<<
 *     """ Controls visibility of pools between devices.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess {
  PyObject_HEAD
  PyObject *__pyx_v_map;
};


/* "cuda/cuda.pyx":19569
 *     """
 *     map = [] if map is None else map
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in map):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'map' is not instance of type (expected List[ccuda.CUmemAccessDesc]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":20551
 * 
 * @cython.embedsignature(True)
 * def cuMemRangeGetAttributes(dataSizes : List[int], attributes : List[CUmem_range_attribute], size_t numAttributes, devPtr, size_t count):             # <<<<<<<<<<<<<<
 *     """ Query attributes of a given memory range.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes {
  PyObject_HEAD
  PyObject *__pyx_v_attributes;
  PyObject *__pyx_v_dataSizes;
};


/* "cuda/cuda.pyx":20611
 * 
 *     attributes = [] if attributes is None else attributes
 *     if not all(isinstance(_x, (CUmem_range_attribute)) for _x in attributes):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUmem_range_attribute]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":20614
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUmem_range_attribute]")
 * 
 *     if not all(isinstance(_x, (int)) for _x in dataSizes):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dataSizes' is not instance of type (expected List[int]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":20682
 * 
 * @cython.embedsignature(True)
 * def cuPointerGetAttributes(unsigned int numAttributes, attributes : List[CUpointer_attribute], ptr):             # <<<<<<<<<<<<<<
 *     """ Returns information about a pointer.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes {
  PyObject_HEAD
  PyObject *__pyx_v_attributes;
};


/* "cuda/cuda.pyx":20759
 * 
 *     attributes = [] if attributes is None else attributes
 *     if not all(isinstance(_x, (CUpointer_attribute)) for _x in attributes):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUpointer_attribute]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":21512
 * 
 * @cython.embedsignature(True)
 * def cuStreamUpdateCaptureDependencies(hStream, dependencies : List[CUgraphNode], size_t numDependencies, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Update the set of dependencies in a capturing stream (11.3+)
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":21557
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":22776
 * 
 * @cython.embedsignature(True)
 * def cuSignalExternalSemaphoresAsync(extSemArray : List[CUexternalSemaphore], paramsArray : List[CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS], unsigned int numExtSems, stream):             # <<<<<<<<<<<<<<
 *     """ Signals a set of external semaphore objects.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync {
  PyObject_HEAD
  PyObject *__pyx_v_extSemArray;
  PyObject *__pyx_v_paramsArray;
};


/* "cuda/cuda.pyx":22861
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) for _x in paramsArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":22865
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":22895
 * 
 * @cython.embedsignature(True)
 * def cuWaitExternalSemaphoresAsync(extSemArray : List[CUexternalSemaphore], paramsArray : List[CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS], unsigned int numExtSems, stream):             # <<<<<<<<<<<<<<
 *     """ Waits on a set of external semaphore objects.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync {
  PyObject_HEAD
  PyObject *__pyx_v_extSemArray;
  PyObject *__pyx_v_paramsArray;
};


/* "cuda/cuda.pyx":22989
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) for _x in paramsArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":22993
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":23352
 * 
 * @cython.embedsignature(True)
 * def cuStreamBatchMemOp(stream, unsigned int count, paramArray : List[CUstreamBatchMemOpParams], unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Batch operations to synchronize the stream via memory operations.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp {
  PyObject_HEAD
  PyObject *__pyx_v_paramArray;
};


/* "cuda/cuda.pyx":23397
 *     """
 *     paramArray = [] if paramArray is None else paramArray
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":23705
 * 
 * @cython.embedsignature(True)
 * def cuStreamBatchMemOp_v2(stream, unsigned int count, paramArray : List[CUstreamBatchMemOpParams], unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Batch operations to synchronize the stream via memory operations.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 {
  PyObject_HEAD
  PyObject *__pyx_v_paramArray;
};


/* "cuda/cuda.pyx":23749
 *     """
 *     paramArray = [] if paramArray is None else paramArray
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":24537
 * 
 * @cython.embedsignature(True)
 * def cuLaunchCooperativeKernelMultiDevice(launchParamsList : List[CUDA_LAUNCH_PARAMS], unsigned int numDevices, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Launches CUDA functions on multiple devices where thread blocks can cooperate and synchronize as they execute.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice {
  PyObject_HEAD
  PyObject *__pyx_v_launchParamsList;
};


/* "cuda/cuda.pyx":24684
 *     """
 *     launchParamsList = [] if launchParamsList is None else launchParamsList
 *     if not all(isinstance(_x, (CUDA_LAUNCH_PARAMS)) for _x in launchParamsList):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'launchParamsList' is not instance of type (expected List[ccuda.CUDA_LAUNCH_PARAMS]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":25282
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddKernelNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a kernel execution node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":25371
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":25483
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemcpyNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, copyParams : CUDA_MEMCPY3D, ctx):             # <<<<<<<<<<<<<<
 *     """ Creates a memcpy node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":25541
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":25644
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemsetNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, memsetParams : CUDA_MEMSET_NODE_PARAMS, ctx):             # <<<<<<<<<<<<<<
 *     """ Creates a memset node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":25692
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":25795
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddHostNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a host execution node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":25831
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":25934
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddChildGraphNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, childGraph):             # <<<<<<<<<<<<<<
 *     """ Creates a child graph node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":25983
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":26054
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEmptyNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Creates an empty node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":26091
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":26121
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEventRecordNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, event):             # <<<<<<<<<<<<<<
 *     """ Creates an event record node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":26167
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":26278
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEventWaitNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, event):             # <<<<<<<<<<<<<<
 *     """ Creates an event wait node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":26326
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":26437
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an external semaphore signal node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":26474
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":26584
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an external semaphore wait node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":26621
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":26731
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddBatchMemOpNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a batch memory operation node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":26771
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":26953
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemAllocNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_MEM_ALLOC_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an allocation node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":27029
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":27099
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemFreeNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, dptr):             # <<<<<<<<<<<<<<
 *     """ Creates a memory free node and adds it to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode {
  PyObject_HEAD
  PyObject *__pyx_v_dependencies;
};


/* "cuda/cuda.pyx":27162
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":27790
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddDependencies(hGraph, from_ : List[CUgraphNode], to : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Adds dependency edges to a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies {
  PyObject_HEAD
  PyObject *__pyx_v_from_;
  PyObject *__pyx_v_to;
};


/* "cuda/cuda.pyx":27821
 *     """
 *     to = [] if to is None else to
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":27825
 * 
 *     from_ = [] if from_ is None else from_
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":27864
 * 
 * @cython.embedsignature(True)
 * def cuGraphRemoveDependencies(hGraph, from_ : List[CUgraphNode], to : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Removes dependency edges from a graph.
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies {
  PyObject_HEAD
  PyObject *__pyx_v_from_;
  PyObject *__pyx_v_to;
};


/* "cuda/cuda.pyx":27899
 *     """
 *     to = [] if to is None else to
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* "cuda/cuda.pyx":27903
 * 
 *     from_ = [] if from_ is None else from_
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr {
  PyObject_HEAD
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *__pyx_outer_scope;
  PyObject *__pyx_v__x;
};


/* --- 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)

/* 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

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* 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

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if CYTHON_FAST_PYCALL
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif // CYTHON_FAST_PYCALL
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#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

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
#if __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize check_size);
#endif

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED 1
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;  // used by FusedFunction for copying defaults
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_Check(obj)  (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(void);

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#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);

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

/* None.proto */
#include <new>

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUipcMem_flags_enum(enum CUipcMem_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemAttach_flags_enum(enum CUmemAttach_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUctx_flags_enum(enum CUctx_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUevent_sched_flags_enum(enum CUevent_sched_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__cl_event_flags_enum(enum cl_event_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__cl_context_flags_enum(enum cl_context_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstream_flags_enum(enum CUstream_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUevent_flags_enum(enum CUevent_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUevent_record_flags_enum(enum CUevent_record_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUevent_wait_flags_enum(enum CUevent_wait_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamWaitValue_flags_enum(enum CUstreamWaitValue_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamWriteValue_flags_enum(enum CUstreamWriteValue_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum(enum CUstreamBatchMemOpType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamMemoryBarrier_flags_enum(enum CUstreamMemoryBarrier_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUoccupancy_flags_enum(enum CUoccupancy_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamUpdateCaptureDependencies_flags_enum(enum CUstreamUpdateCaptureDependencies_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUarray_format_enum(enum CUarray_format_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUaddress_mode_enum(enum CUaddress_mode_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUfilter_mode_enum(enum CUfilter_mode_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUdevice_attribute_enum(enum CUdevice_attribute_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUpointer_attribute_enum(enum CUpointer_attribute_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUfunction_attribute_enum(enum CUfunction_attribute_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUfunc_cache_enum(enum CUfunc_cache_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUsharedconfig_enum(enum CUsharedconfig_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUshared_carveout_enum(enum CUshared_carveout_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemorytype_enum(enum CUmemorytype_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUcomputemode_enum(enum CUcomputemode_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmem_advise_enum(enum CUmem_advise_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmem_range_attribute_enum(enum CUmem_range_attribute_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUjit_option_enum(enum CUjit_option_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUjit_target_enum(enum CUjit_target_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUjit_fallback_enum(enum CUjit_fallback_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUjit_cacheMode_enum(enum CUjit_cacheMode_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUjitInputType_enum(enum CUjitInputType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphicsRegisterFlags_enum(enum CUgraphicsRegisterFlags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphicsMapResourceFlags_enum(enum CUgraphicsMapResourceFlags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUarray_cubemap_face_enum(enum CUarray_cubemap_face_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUlimit_enum(enum CUlimit_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUresourcetype_enum(enum CUresourcetype_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUaccessProperty_enum(enum CUaccessProperty_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphNodeType_enum(enum CUgraphNodeType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUsynchronizationPolicy_enum(enum CUsynchronizationPolicy_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUclusterSchedulingPolicy_enum(enum CUclusterSchedulingPolicy_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(enum CUlaunchAttributeID_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamCaptureStatus_enum(enum CUstreamCaptureStatus_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamCaptureMode_enum(enum CUstreamCaptureMode_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUdriverProcAddress_flags_enum(enum CUdriverProcAddress_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUexecAffinityType_enum(enum CUexecAffinityType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__cudaError_enum(enum cudaError_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUdevice_P2PAttribute_enum(enum CUdevice_P2PAttribute_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(enum CUresourceViewFormat_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUexternalMemoryHandleType_enum(enum CUexternalMemoryHandleType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum(enum CUexternalSemaphoreHandleType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemAllocationHandleType_enum(enum CUmemAllocationHandleType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemAccess_flags_enum(enum CUmemAccess_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemLocationType_enum(enum CUmemLocationType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemAllocationType_enum(enum CUmemAllocationType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemAllocationGranularity_flags_enum(enum CUmemAllocationGranularity_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemRangeHandleType_enum(enum CUmemRangeHandleType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUarraySparseSubresourceType_enum(enum CUarraySparseSubresourceType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemOperationType_enum(enum CUmemOperationType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemHandleType_enum(enum CUmemHandleType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemAllocationCompType_enum(enum CUmemAllocationCompType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphExecUpdateResult_enum(enum CUgraphExecUpdateResult_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemPool_attribute_enum(enum CUmemPool_attribute_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphMem_attribute_enum(enum CUgraphMem_attribute_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUflushGPUDirectRDMAWritesOptions_enum(enum CUflushGPUDirectRDMAWritesOptions_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUGPUDirectRDMAWritesOrdering_enum(enum CUGPUDirectRDMAWritesOrdering_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUflushGPUDirectRDMAWritesScope_enum(enum CUflushGPUDirectRDMAWritesScope_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUflushGPUDirectRDMAWritesTarget_enum(enum CUflushGPUDirectRDMAWritesTarget_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(enum CUgraphDebugDot_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUuserObject_flags_enum(enum CUuserObject_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUuserObjectRetain_flags_enum(enum CUuserObjectRetain_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphInstantiate_flags_enum(enum CUgraphInstantiate_flags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmoduleLoadingMode_enum(enum CUmoduleLoadingMode_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUoutput_mode_enum(enum CUoutput_mode_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglFrameType_enum(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum(enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUGLDeviceList_enum(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUGLmap_flags_enum(enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum value);

/* CIntFromPy.proto */
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *);

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

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

/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value);

/* CIntFromPy.proto */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUstreamBatchMemOpType_enum __Pyx_PyInt_As_enum__CUstreamBatchMemOpType_enum(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUaccessProperty_enum __Pyx_PyInt_As_enum__CUaccessProperty_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUsynchronizationPolicy_enum __Pyx_PyInt_As_enum__CUsynchronizationPolicy_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUclusterSchedulingPolicy_enum __Pyx_PyInt_As_enum__CUclusterSchedulingPolicy_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUlaunchAttributeID_enum __Pyx_PyInt_As_enum__CUlaunchAttributeID_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUexecAffinityType_enum __Pyx_PyInt_As_enum__CUexecAffinityType_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUmemorytype_enum __Pyx_PyInt_As_enum__CUmemorytype_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUarray_format_enum __Pyx_PyInt_As_enum__CUarray_format_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUresourcetype_enum __Pyx_PyInt_As_enum__CUresourcetype_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUaddress_mode_enum __Pyx_PyInt_As_enum__CUaddress_mode_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUfilter_mode_enum __Pyx_PyInt_As_enum__CUfilter_mode_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUresourceViewFormat_enum __Pyx_PyInt_As_enum__CUresourceViewFormat_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUexternalMemoryHandleType_enum __Pyx_PyInt_As_enum__CUexternalMemoryHandleType_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUexternalSemaphoreHandleType_enum __Pyx_PyInt_As_enum__CUexternalSemaphoreHandleType_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUarraySparseSubresourceType_enum __Pyx_PyInt_As_enum__CUarraySparseSubresourceType_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUmemOperationType_enum __Pyx_PyInt_As_enum__CUmemOperationType_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUmemHandleType_enum __Pyx_PyInt_As_enum__CUmemHandleType_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUmemLocationType_enum __Pyx_PyInt_As_enum__CUmemLocationType_enum(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUmemAllocationType_enum __Pyx_PyInt_As_enum__CUmemAllocationType_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUmemAllocationHandleType_enum __Pyx_PyInt_As_enum__CUmemAllocationHandleType_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUmemAccess_flags_enum __Pyx_PyInt_As_enum__CUmemAccess_flags_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum __Pyx_PyInt_As_enum____pyx_t_4cuda_5ccuda_CUeglFrameType_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum __Pyx_PyInt_As_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);

/* CIntFromPy.proto */
static CYTHON_INLINE enum cudaError_enum __Pyx_PyInt_As_enum__cudaError_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE CUdevice_v1 __Pyx_PyInt_As_CUdevice_v1(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUdevice_attribute_enum __Pyx_PyInt_As_enum__CUdevice_attribute_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUflushGPUDirectRDMAWritesTarget_enum __Pyx_PyInt_As_enum__CUflushGPUDirectRDMAWritesTarget_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUflushGPUDirectRDMAWritesScope_enum __Pyx_PyInt_As_enum__CUflushGPUDirectRDMAWritesScope_enum(PyObject *);

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

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUlimit_enum __Pyx_PyInt_As_enum__CUlimit_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUfunc_cache_enum __Pyx_PyInt_As_enum__CUfunc_cache_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUsharedconfig_enum __Pyx_PyInt_As_enum__CUsharedconfig_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUjit_option_enum __Pyx_PyInt_As_enum__CUjit_option_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUjitInputType_enum __Pyx_PyInt_As_enum__CUjitInputType_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUmemRangeHandleType_enum __Pyx_PyInt_As_enum__CUmemRangeHandleType_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUmemAllocationGranularity_flags_enum __Pyx_PyInt_As_enum__CUmemAllocationGranularity_flags_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUmemPool_attribute_enum __Pyx_PyInt_As_enum__CUmemPool_attribute_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUpointer_attribute_enum __Pyx_PyInt_As_enum__CUpointer_attribute_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUmem_advise_enum __Pyx_PyInt_As_enum__CUmem_advise_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUmem_range_attribute_enum __Pyx_PyInt_As_enum__CUmem_range_attribute_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUstreamCaptureMode_enum __Pyx_PyInt_As_enum__CUstreamCaptureMode_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUfunction_attribute_enum __Pyx_PyInt_As_enum__CUfunction_attribute_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUgraphMem_attribute_enum __Pyx_PyInt_As_enum__CUgraphMem_attribute_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUdevice_P2PAttribute_enum __Pyx_PyInt_As_enum__CUdevice_P2PAttribute_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum CUoutput_mode_enum __Pyx_PyInt_As_enum__CUoutput_mode_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum __Pyx_PyInt_As_enum____pyx_t_4cuda_5ccuda_CUGLDeviceList_enum(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(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)

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    PyObject *gi_frame;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);

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

/* 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.ccuda' */
static CUresult (*__pyx_f_4cuda_5ccuda_cuGetErrorString)(CUresult, char const **); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGetErrorName)(CUresult, char const **); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuInit)(unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDriverGetVersion)(int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGet)(CUdevice *, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetCount)(int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetName)(char *, int, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetUuid)(CUuuid *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetUuid_v2)(CUuuid *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetLuid)(char *, unsigned int *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceTotalMem)(size_t *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetTexture1DLinearMaxWidth)(size_t *, CUarray_format, unsigned int, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetAttribute)(int *, CUdevice_attribute, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetNvSciSyncAttributes)(void *, CUdevice, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceSetMemPool)(CUdevice, CUmemoryPool); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetMemPool)(CUmemoryPool *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetDefaultMemPool)(CUmemoryPool *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuFlushGPUDirectRDMAWrites)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetProperties)(CUdevprop *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceComputeCapability)(int *, int *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxRetain)(CUcontext *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxRelease)(CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxSetFlags)(CUdevice, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxGetState)(CUdevice, unsigned int *, int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxReset)(CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetExecAffinitySupport)(int *, CUexecAffinityType, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxCreate)(CUcontext *, unsigned int, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxCreate_v3)(CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxDestroy)(CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxPushCurrent)(CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxPopCurrent)(CUcontext *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxSetCurrent)(CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxGetCurrent)(CUcontext *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxGetDevice)(CUdevice *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxGetFlags)(unsigned int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxSynchronize)(void); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxSetLimit)(CUlimit, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxGetLimit)(size_t *, CUlimit); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxGetCacheConfig)(CUfunc_cache *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxSetCacheConfig)(CUfunc_cache); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxGetSharedMemConfig)(CUsharedconfig *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxSetSharedMemConfig)(CUsharedconfig); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxGetApiVersion)(CUcontext, unsigned int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxGetStreamPriorityRange)(int *, int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxResetPersistingL2Cache)(void); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxGetExecAffinity)(CUexecAffinityParam *, CUexecAffinityType); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxAttach)(CUcontext *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxDetach)(CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuModuleLoad)(CUmodule *, char const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuModuleLoadData)(CUmodule *, void const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuModuleLoadDataEx)(CUmodule *, void const *, unsigned int, CUjit_option *, void **); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuModuleLoadFatBinary)(CUmodule *, void const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuModuleUnload)(CUmodule); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuModuleGetLoadingMode)(CUmoduleLoadingMode *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuModuleGetFunction)(CUfunction *, CUmodule, char const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuModuleGetGlobal)(CUdeviceptr *, size_t *, CUmodule, char const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuModuleGetTexRef)(CUtexref *, CUmodule, char const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuModuleGetSurfRef)(CUsurfref *, CUmodule, char const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuLinkCreate)(unsigned int, CUjit_option *, void **, CUlinkState *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuLinkAddData)(CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuLinkAddFile)(CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuLinkComplete)(CUlinkState, void **, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuLinkDestroy)(CUlinkState); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemGetInfo)(size_t *, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemAlloc)(CUdeviceptr *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemAllocPitch)(CUdeviceptr *, size_t *, size_t, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemFree)(CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemGetAddressRange)(CUdeviceptr *, size_t *, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemAllocHost)(void **, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemFreeHost)(void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemHostAlloc)(void **, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemHostGetDevicePointer)(CUdeviceptr *, void *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemHostGetFlags)(unsigned int *, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemAllocManaged)(CUdeviceptr *, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetByPCIBusId)(CUdevice *, char const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetPCIBusId)(char *, int, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuIpcGetEventHandle)(CUipcEventHandle *, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuIpcOpenEventHandle)(CUevent *, CUipcEventHandle); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuIpcGetMemHandle)(CUipcMemHandle *, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuIpcOpenMemHandle)(CUdeviceptr *, CUipcMemHandle, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuIpcCloseMemHandle)(CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemHostRegister)(void *, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemHostUnregister)(void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpy)(CUdeviceptr, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyPeer)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyHtoD)(CUdeviceptr, void const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyDtoH)(void *, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyDtoD)(CUdeviceptr, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyDtoA)(CUarray, size_t, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyAtoD)(CUdeviceptr, CUarray, size_t, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyHtoA)(CUarray, size_t, void const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyAtoH)(void *, CUarray, size_t, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyAtoA)(CUarray, size_t, CUarray, size_t, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpy2D)(CUDA_MEMCPY2D const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpy2DUnaligned)(CUDA_MEMCPY2D const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpy3D)(CUDA_MEMCPY3D const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpy3DPeer)(CUDA_MEMCPY3D_PEER const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyAsync)(CUdeviceptr, CUdeviceptr, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyPeerAsync)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyHtoDAsync)(CUdeviceptr, void const *, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyDtoHAsync)(void *, CUdeviceptr, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyDtoDAsync)(CUdeviceptr, CUdeviceptr, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyHtoAAsync)(CUarray, size_t, void const *, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpyAtoHAsync)(void *, CUarray, size_t, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpy2DAsync)(CUDA_MEMCPY2D const *, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpy3DAsync)(CUDA_MEMCPY3D const *, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemcpy3DPeerAsync)(CUDA_MEMCPY3D_PEER const *, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemsetD8)(CUdeviceptr, unsigned char, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemsetD16)(CUdeviceptr, unsigned short, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemsetD32)(CUdeviceptr, unsigned int, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemsetD2D8)(CUdeviceptr, size_t, unsigned char, size_t, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemsetD2D16)(CUdeviceptr, size_t, unsigned short, size_t, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemsetD2D32)(CUdeviceptr, size_t, unsigned int, size_t, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemsetD8Async)(CUdeviceptr, unsigned char, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemsetD16Async)(CUdeviceptr, unsigned short, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemsetD32Async)(CUdeviceptr, unsigned int, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemsetD2D8Async)(CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemsetD2D16Async)(CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemsetD2D32Async)(CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuArrayCreate)(CUarray *, CUDA_ARRAY_DESCRIPTOR const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuArrayGetDescriptor)(CUDA_ARRAY_DESCRIPTOR *, CUarray); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuArrayGetSparseProperties)(CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMipmappedArrayGetSparseProperties)(CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuArrayGetMemoryRequirements)(CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMipmappedArrayGetMemoryRequirements)(CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuArrayGetPlane)(CUarray *, CUarray, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuArrayDestroy)(CUarray); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuArray3DCreate)(CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuArray3DGetDescriptor)(CUDA_ARRAY3D_DESCRIPTOR *, CUarray); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMipmappedArrayCreate)(CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMipmappedArrayGetLevel)(CUarray *, CUmipmappedArray, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMipmappedArrayDestroy)(CUmipmappedArray); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemGetHandleForAddressRange)(void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemAddressReserve)(CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemAddressFree)(CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemCreate)(CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemRelease)(CUmemGenericAllocationHandle); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemMap)(CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemMapArrayAsync)(CUarrayMapInfo *, unsigned int, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemUnmap)(CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemSetAccess)(CUdeviceptr, size_t, CUmemAccessDesc const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemGetAccess)(unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemExportToShareableHandle)(void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemImportFromShareableHandle)(CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemGetAllocationGranularity)(size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemGetAllocationPropertiesFromHandle)(CUmemAllocationProp *, CUmemGenericAllocationHandle); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemRetainAllocationHandle)(CUmemGenericAllocationHandle *, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemFreeAsync)(CUdeviceptr, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemAllocAsync)(CUdeviceptr *, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemPoolTrimTo)(CUmemoryPool, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemPoolSetAttribute)(CUmemoryPool, CUmemPool_attribute, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemPoolGetAttribute)(CUmemoryPool, CUmemPool_attribute, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemPoolSetAccess)(CUmemoryPool, CUmemAccessDesc const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemPoolGetAccess)(CUmemAccess_flags *, CUmemoryPool, CUmemLocation *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemPoolCreate)(CUmemoryPool *, CUmemPoolProps const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemPoolDestroy)(CUmemoryPool); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemAllocFromPoolAsync)(CUdeviceptr *, size_t, CUmemoryPool, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemPoolExportToShareableHandle)(void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemPoolImportFromShareableHandle)(CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemPoolExportPointer)(CUmemPoolPtrExportData *, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemPoolImportPointer)(CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuPointerGetAttribute)(void *, CUpointer_attribute, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemPrefetchAsync)(CUdeviceptr, size_t, CUdevice, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemAdvise)(CUdeviceptr, size_t, CUmem_advise, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemRangeGetAttribute)(void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuMemRangeGetAttributes)(void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuPointerSetAttribute)(void const *, CUpointer_attribute, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuPointerGetAttributes)(unsigned int, CUpointer_attribute *, void **, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamCreate)(CUstream *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamCreateWithPriority)(CUstream *, unsigned int, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamGetPriority)(CUstream, int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamGetFlags)(CUstream, unsigned int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamGetCtx)(CUstream, CUcontext *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamWaitEvent)(CUstream, CUevent, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamAddCallback)(CUstream, CUstreamCallback, void *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamBeginCapture)(CUstream, CUstreamCaptureMode); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuThreadExchangeStreamCaptureMode)(CUstreamCaptureMode *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamEndCapture)(CUstream, CUgraph *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamIsCapturing)(CUstream, CUstreamCaptureStatus *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamGetCaptureInfo)(CUstream, CUstreamCaptureStatus *, cuuint64_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamGetCaptureInfo_v2)(CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamUpdateCaptureDependencies)(CUstream, CUgraphNode *, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamAttachMemAsync)(CUstream, CUdeviceptr, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamQuery)(CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamSynchronize)(CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamDestroy)(CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamCopyAttributes)(CUstream, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamGetAttribute)(CUstream, CUstreamAttrID, CUstreamAttrValue *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamSetAttribute)(CUstream, CUstreamAttrID, CUstreamAttrValue const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEventCreate)(CUevent *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEventRecord)(CUevent, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEventRecordWithFlags)(CUevent, CUstream, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEventQuery)(CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEventSynchronize)(CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEventDestroy)(CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEventElapsedTime)(float *, CUevent, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuImportExternalMemory)(CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuExternalMemoryGetMappedBuffer)(CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuExternalMemoryGetMappedMipmappedArray)(CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDestroyExternalMemory)(CUexternalMemory); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuImportExternalSemaphore)(CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuSignalExternalSemaphoresAsync)(CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuWaitExternalSemaphoresAsync)(CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDestroyExternalSemaphore)(CUexternalSemaphore); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamWaitValue32)(CUstream, CUdeviceptr, cuuint32_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamWaitValue64)(CUstream, CUdeviceptr, cuuint64_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamWriteValue32)(CUstream, CUdeviceptr, cuuint32_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamWriteValue64)(CUstream, CUdeviceptr, cuuint64_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamBatchMemOp)(CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamWaitValue32_v2)(CUstream, CUdeviceptr, cuuint32_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamWaitValue64_v2)(CUstream, CUdeviceptr, cuuint64_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamWriteValue32_v2)(CUstream, CUdeviceptr, cuuint32_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamWriteValue64_v2)(CUstream, CUdeviceptr, cuuint64_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuStreamBatchMemOp_v2)(CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuFuncGetAttribute)(int *, CUfunction_attribute, CUfunction); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuFuncSetAttribute)(CUfunction, CUfunction_attribute, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuFuncSetCacheConfig)(CUfunction, CUfunc_cache); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuFuncSetSharedMemConfig)(CUfunction, CUsharedconfig); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuFuncGetModule)(CUmodule *, CUfunction); /*proto*/
static CUresult (*__pyx_f_4cuda_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_5ccuda_cuLaunchKernelEx)(CUlaunchConfig const *, CUfunction, void **, void **); /*proto*/
static CUresult (*__pyx_f_4cuda_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_5ccuda_cuLaunchCooperativeKernelMultiDevice)(CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuLaunchHostFunc)(CUstream, CUhostFn, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuFuncSetBlockShape)(CUfunction, int, int, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuFuncSetSharedSize)(CUfunction, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuParamSetSize)(CUfunction, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuParamSeti)(CUfunction, int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuParamSetf)(CUfunction, int, float); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuParamSetv)(CUfunction, int, void *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuLaunch)(CUfunction); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuLaunchGrid)(CUfunction, int, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuLaunchGridAsync)(CUfunction, int, int, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuParamSetTexRef)(CUfunction, int, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphCreate)(CUgraph *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddKernelNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphKernelNodeGetParams)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphKernelNodeSetParams)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddMemcpyNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphMemcpyNodeGetParams)(CUgraphNode, CUDA_MEMCPY3D *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphMemcpyNodeSetParams)(CUgraphNode, CUDA_MEMCPY3D const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddMemsetNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphMemsetNodeGetParams)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphMemsetNodeSetParams)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddHostNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphHostNodeGetParams)(CUgraphNode, CUDA_HOST_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphHostNodeSetParams)(CUgraphNode, CUDA_HOST_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddChildGraphNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphChildGraphNodeGetGraph)(CUgraphNode, CUgraph *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddEmptyNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddEventRecordNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphEventRecordNodeGetEvent)(CUgraphNode, CUevent *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphEventRecordNodeSetEvent)(CUgraphNode, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddEventWaitNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphEventWaitNodeGetEvent)(CUgraphNode, CUevent *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphEventWaitNodeSetEvent)(CUgraphNode, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddExternalSemaphoresSignalNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresSignalNodeGetParams)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresSignalNodeSetParams)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddExternalSemaphoresWaitNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresWaitNodeGetParams)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresWaitNodeSetParams)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddBatchMemOpNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphBatchMemOpNodeGetParams)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphBatchMemOpNodeSetParams)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExecBatchMemOpNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddMemAllocNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphMemAllocNodeGetParams)(CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddMemFreeNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphMemFreeNodeGetParams)(CUgraphNode, CUdeviceptr *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGraphMemTrim)(CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetGraphMemAttribute)(CUdevice, CUgraphMem_attribute, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceSetGraphMemAttribute)(CUdevice, CUgraphMem_attribute, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphClone)(CUgraph *, CUgraph); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphNodeFindInClone)(CUgraphNode *, CUgraphNode, CUgraph); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphNodeGetType)(CUgraphNode, CUgraphNodeType *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphGetNodes)(CUgraph, CUgraphNode *, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphGetRootNodes)(CUgraph, CUgraphNode *, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphGetEdges)(CUgraph, CUgraphNode *, CUgraphNode *, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphNodeGetDependencies)(CUgraphNode, CUgraphNode *, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphNodeGetDependentNodes)(CUgraphNode, CUgraphNode *, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphAddDependencies)(CUgraph, CUgraphNode const *, CUgraphNode const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphRemoveDependencies)(CUgraph, CUgraphNode const *, CUgraphNode const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphDestroyNode)(CUgraphNode); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphInstantiate)(CUgraphExec *, CUgraph, CUgraphNode *, char *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphInstantiateWithFlags)(CUgraphExec *, CUgraph, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExecKernelNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExecMemcpyNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExecMemsetNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExecHostNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExecChildGraphNodeSetParams)(CUgraphExec, CUgraphNode, CUgraph); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExecEventRecordNodeSetEvent)(CUgraphExec, CUgraphNode, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExecEventWaitNodeSetEvent)(CUgraphExec, CUgraphNode, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExecExternalSemaphoresSignalNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExecExternalSemaphoresWaitNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphNodeSetEnabled)(CUgraphExec, CUgraphNode, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphNodeGetEnabled)(CUgraphExec, CUgraphNode, unsigned int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphUpload)(CUgraphExec, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphLaunch)(CUgraphExec, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExecDestroy)(CUgraphExec); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphDestroy)(CUgraph); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphExecUpdate)(CUgraphExec, CUgraph, CUgraphNode *, CUgraphExecUpdateResult *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphKernelNodeCopyAttributes)(CUgraphNode, CUgraphNode); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphKernelNodeGetAttribute)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphKernelNodeSetAttribute)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphDebugDotPrint)(CUgraph, char const *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuUserObjectCreate)(CUuserObject *, void *, CUhostFn, unsigned int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuUserObjectRetain)(CUuserObject, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuUserObjectRelease)(CUuserObject, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphRetainUserObject)(CUgraph, CUuserObject, unsigned int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphReleaseUserObject)(CUgraph, CUuserObject, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveBlocksPerMultiprocessor)(int *, CUfunction, int, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(int *, CUfunction, int, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialBlockSize)(int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialBlockSizeWithFlags)(int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuOccupancyAvailableDynamicSMemPerBlock)(size_t *, CUfunction, int, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialClusterSize)(int *, CUfunction, CUlaunchConfig const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveClusters)(int *, CUfunction, CUlaunchConfig const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetArray)(CUtexref, CUarray, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetMipmappedArray)(CUtexref, CUmipmappedArray, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetAddress)(size_t *, CUtexref, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetAddress2D)(CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetFormat)(CUtexref, CUarray_format, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetAddressMode)(CUtexref, int, CUaddress_mode); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetFilterMode)(CUtexref, CUfilter_mode); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetMipmapFilterMode)(CUtexref, CUfilter_mode); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetMipmapLevelBias)(CUtexref, float); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetMipmapLevelClamp)(CUtexref, float, float); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetMaxAnisotropy)(CUtexref, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetBorderColor)(CUtexref, float *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefSetFlags)(CUtexref, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefGetAddress)(CUdeviceptr *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefGetArray)(CUarray *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefGetMipmappedArray)(CUmipmappedArray *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefGetAddressMode)(CUaddress_mode *, CUtexref, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefGetFilterMode)(CUfilter_mode *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefGetFormat)(CUarray_format *, int *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefGetMipmapFilterMode)(CUfilter_mode *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefGetMipmapLevelBias)(float *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefGetMipmapLevelClamp)(float *, float *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefGetMaxAnisotropy)(int *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefGetBorderColor)(float *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefGetFlags)(unsigned int *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefCreate)(CUtexref *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexRefDestroy)(CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuSurfRefSetArray)(CUsurfref, CUarray, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuSurfRefGetArray)(CUarray *, CUsurfref); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexObjectCreate)(CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexObjectDestroy)(CUtexObject); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexObjectGetResourceDesc)(CUDA_RESOURCE_DESC *, CUtexObject); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexObjectGetTextureDesc)(CUDA_TEXTURE_DESC *, CUtexObject); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuTexObjectGetResourceViewDesc)(CUDA_RESOURCE_VIEW_DESC *, CUtexObject); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuSurfObjectCreate)(CUsurfObject *, CUDA_RESOURCE_DESC const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuSurfObjectDestroy)(CUsurfObject); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuSurfObjectGetResourceDesc)(CUDA_RESOURCE_DESC *, CUsurfObject); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceCanAccessPeer)(int *, CUdevice, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxEnablePeerAccess)(CUcontext, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuCtxDisablePeerAccess)(CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuDeviceGetP2PAttribute)(int *, CUdevice_P2PAttribute, CUdevice, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsUnregisterResource)(CUgraphicsResource); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsSubResourceGetMappedArray)(CUarray *, CUgraphicsResource, unsigned int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedMipmappedArray)(CUmipmappedArray *, CUgraphicsResource); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedPointer)(CUdeviceptr *, size_t *, CUgraphicsResource); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsResourceSetMapFlags)(CUgraphicsResource, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsMapResources)(unsigned int, CUgraphicsResource *, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsUnmapResources)(unsigned int, CUgraphicsResource *, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGetProcAddress)(char const *, void **, int, cuuint64_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGetExportTable)(void const **, CUuuid const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuProfilerInitialize)(char const *, char const *, CUoutput_mode); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuProfilerStart)(void); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuProfilerStop)(void); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuVDPAUGetDevice)(CUdevice *, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuVDPAUCtxCreate)(CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsVDPAURegisterVideoSurface)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpVideoSurface, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsVDPAURegisterOutputSurface)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpOutputSurface, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsEGLRegisterImage)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_EGLImageKHR, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerConnect)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerConnectWithFlags)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerDisconnect)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerAcquireFrame)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerReleaseFrame)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource, CUstream *); /*proto*/
static CUresult (*__pyx_f_4cuda_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_5ccuda_cuEGLStreamProducerDisconnect)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEGLStreamProducerPresentFrame)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame, CUstream *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEGLStreamProducerReturnFrame)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame *, CUstream *); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedEglFrame)(__pyx_t_4cuda_5ccuda_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuEventCreateFromEGLSync)(CUevent *, __pyx_t_4cuda_5ccuda_EGLSyncKHR, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsGLRegisterBuffer)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGraphicsGLRegisterImage)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, __pyx_t_4cuda_5ccuda_GLenum, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5ccuda_cuGLGetDevices)(unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_5ccuda_CUGLDeviceList); /*proto*/

/* Module declarations from 'libcpp.vector' */

/* Module declarations from 'cuda._lib.utils' */
static PyTypeObject *__pyx_ptype_4cuda_4_lib_5utils_HelperKernelParams = 0;
static PyTypeObject *__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4_lib_5utils_HelperCUmemPool_attribute = 0;
static PyTypeObject *__pyx_ptype_4cuda_4_lib_5utils_HelperCUmem_range_attribute = 0;
static PyTypeObject *__pyx_ptype_4cuda_4_lib_5utils_HelperCUpointer_attribute = 0;
static PyTypeObject *__pyx_ptype_4cuda_4_lib_5utils_HelperCUgraphMem_attribute = 0;
static PyTypeObject *__pyx_ptype_4cuda_4_lib_5utils_HelperCUjit_option = 0;
static PyTypeObject *__pyx_ptype_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType = 0;
static PyTypeObject *__pyx_ptype_4cuda_4_lib_5utils_InputVoidPtrPtrHelper = 0;

/* Module declarations from 'cython' */

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

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

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

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

/* Module declarations from 'cpython.buffer' */

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

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

/* Module declarations from 'cpython' */

/* Module declarations from 'cpython.object' */

/* Module declarations from 'cpython.bytes' */

/* Module declarations from 'cuda.cuda' */
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUcontext = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmodule = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUfunction = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUarray = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmipmappedArray = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUtexref = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUsurfref = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUevent = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUstream = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUgraphicsResource = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUexternalMemory = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUexternalSemaphore = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUgraph = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUgraphNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUgraphExec = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemoryPool = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUuserObject = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUlinkState = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_EGLImageKHR = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_EGLStreamKHR = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_EGLSyncKHR = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUeglStreamConnection = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUhostFn = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUstreamCallback = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUoccupancyB2DSize = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUuuid_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUipcEventHandle_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUipcMemHandle_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUstreamMemOpWaitValueParams_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUstreamMemOpWriteValueParams_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams_union = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUdevprop_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue_union = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUlaunchAttribute_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUlaunchConfig_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUexecAffinityParam_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUarrayMapInfo_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemLocation_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemAllocationProp_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemAccessDesc_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemPoolProps_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUeglFrame_st = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUuuid = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUipcEventHandle_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUipcEventHandle = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUipcMemHandle_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUipcMemHandle = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUdevprop_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUdevprop = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUlaunchAttribute = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUlaunchConfig = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUkernelNodeAttrValue_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUkernelNodeAttrValue = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUstreamAttrValue_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUstreamAttrValue = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUexecAffinityParam_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUexecAffinityParam = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D_v2 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_v2 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUarrayMapInfo_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUarrayMapInfo = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemLocation_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemLocation = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemAllocationProp_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemAllocationProp = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemAccessDesc_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemAccessDesc = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemPoolProps_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemPoolProps = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUeglFrame_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUeglFrame = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_cuuint32_t = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_cuuint64_t = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUdeviceptr_v2 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUdeviceptr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUdevice_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUdevice = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUtexObject_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUtexObject = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUsurfObject_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUsurfObject = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle_v1 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_GLenum = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_GLuint = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_EGLint = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_VdpDevice = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_VdpGetProcAddress = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_VdpVideoSurface = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda_VdpOutputSurface = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_1_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_3_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_5_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_7_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_9_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_11_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_13_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_15_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_17_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_18_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_20_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_22_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_24_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_25_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_27_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_28_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_30_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_32_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_34_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_36_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_38_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_40_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_42_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_44_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_46_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_48_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_50_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_52_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_54_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_56_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_58_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_60_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_62_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_63_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_65_genexpr = 0;
static PyTypeObject *__pyx_ptype_4cuda_4cuda___pyx_scope_struct_66_genexpr = 0;
static int __Pyx_carray_from_py_cuuint64_t(PyObject *, cuuint64_t *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_py_int(int *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_int(int *, Py_ssize_t); /*proto*/
static int __Pyx_carray_from_py_int(PyObject *, int *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_py_unsigned_int(unsigned int *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_unsigned_int(unsigned int *, Py_ssize_t); /*proto*/
static int __Pyx_carray_from_py_unsigned_int(PyObject *, unsigned int *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_py_CUaddress_mode(CUaddress_mode *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_CUaddress_mode(CUaddress_mode *, Py_ssize_t); /*proto*/
static int __Pyx_carray_from_py_CUaddress_mode(PyObject *, CUaddress_mode *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_py_float(float *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_float(float *, Py_ssize_t); /*proto*/
static int __Pyx_carray_from_py_float(PyObject *, float *, Py_ssize_t); /*proto*/
static std::vector<CUjit_option>  __pyx_convert_vector_from_py_CUjit_option(PyObject *); /*proto*/
static std::vector<size_t>  __pyx_convert_vector_from_py_size_t(PyObject *); /*proto*/
static std::vector<CUmem_range_attribute>  __pyx_convert_vector_from_py_CUmem_range_attribute(PyObject *); /*proto*/
static std::vector<CUpointer_attribute>  __pyx_convert_vector_from_py_CUpointer_attribute(PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "cuda.cuda"
extern int __pyx_module_is_main_cuda__cuda;
int __pyx_module_is_main_cuda__cuda = 0;

/* Implementation of 'cuda.cuda' */
static PyObject *__pyx_builtin_hex;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_OverflowError;
static const char __pyx_k_[] = ">";
static const char __pyx_k_N[] = "N";
static const char __pyx_k_f[] = "f";
static const char __pyx_k_p[] = "p";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_y[] = "y : ";
static const char __pyx_k_z[] = "z : ";
static const char __pyx_k_am[] = "am";
static const char __pyx_k_cf[] = "cf";
static const char __pyx_k_cp[] = "cp";
static const char __pyx_k_fd[] = "fd : ";
static const char __pyx_k_fm[] = "fm";
static const char __pyx_k_fn[] = "fn : ";
static const char __pyx_k_id[] = "id : ";
static const char __pyx_k_pf[] = "pf";
static const char __pyx_k_pi[] = "pi";
static const char __pyx_k_pp[] = "pp";
static const char __pyx_k_to[] = "to";
static const char __pyx_k_uc[] = "uc";
static const char __pyx_k_ui[] = "ui";
static const char __pyx_k_us[] = "us";
static const char __pyx_k_Any[] = "Any";
static const char __pyx_k_cam[] = "cam";
static const char __pyx_k_cfm[] = "cfm";
static const char __pyx_k_cfn[] = "cfn";
static const char __pyx_k_cto[] = "cto";
static const char __pyx_k_ctx[] = "ctx : ";
static const char __pyx_k_dev[] = "dev";
static const char __pyx_k_dim[] = "dim";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_dst[] = "dst : ";
static const char __pyx_k_err[] = "err";
static const char __pyx_k_fmt[] = "fmt";
static const char __pyx_k_hex[] = "hex";
static const char __pyx_k_idx[] = "idx";
static const char __pyx_k_int[] = "__int__";
static const char __pyx_k_key[] = "key : ";
static const char __pyx_k_map[] = "map";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_pad[] = "pad : ";
static const char __pyx_k_pam[] = "pam";
static const char __pyx_k_pfm[] = "pfm";
static const char __pyx_k_pfn[] = "pfn";
static const char __pyx_k_ptr[] = "_ptr";
static const char __pyx_k_res[] = "res :\n";
static const char __pyx_k_src[] = "src";
static const char __pyx_k_val[] = "val : ";
static const char __pyx_k_x_2[] = "x : ";
static const char __pyx_k_y_2[] = "y";
static const char __pyx_k_z_2[] = "z";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_List[] = "List";
static const char __pyx_k__128[] = "\n";
static const char __pyx_k__129[] = "";
static const char __pyx_k__165[] = "    ";
static const char __pyx_k__166[] = "_";
static const char __pyx_k__613[] = " ";
static const char __pyx_k__660[] = " < ";
static const char __pyx_k_addr[] = "addr";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_attr[] = "attr";
static const char __pyx_k_bias[] = "bias";
static const char __pyx_k_cctx[] = "cctx";
static const char __pyx_k_cdev[] = "cdev";
static const char __pyx_k_cdst[] = "cdst";
static const char __pyx_k_cfmt[] = "cfmt";
static const char __pyx_k_cmap[] = "cmap";
static const char __pyx_k_conn[] = "conn";
static const char __pyx_k_cptr[] = "cptr";
static const char __pyx_k_csrc[] = "csrc";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_desc[] = "desc";
static const char __pyx_k_dptr[] = "dptr : ";
static const char __pyx_k_dstY[] = "dstY : ";
static const char __pyx_k_dstZ[] = "dstZ : ";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_fd_2[] = "fd";
static const char __pyx_k_fn_2[] = "fn";
static const char __pyx_k_free[] = "free";
static const char __pyx_k_from[] = "from_";
static const char __pyx_k_func[] = "func : ";
static const char __pyx_k_hEnd[] = "hEnd";
static const char __pyx_k_hmod[] = "hmod";
static const char __pyx_k_id_2[] = "id";
static const char __pyx_k_luid[] = "luid";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_name[] = "name : ";
static const char __pyx_k_pCtx[] = "pCtx";
static const char __pyx_k_pStr[] = "pStr";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_pctx[] = "pctx";
static const char __pyx_k_pdev[] = "pdev";
static const char __pyx_k_pdst[] = "pdst";
static const char __pyx_k_pool[] = "pool";
static const char __pyx_k_pptr[] = "pptr";
static const char __pyx_k_prop[] = "prop";
static const char __pyx_k_psrc[] = "psrc";
static const char __pyx_k_pyto[] = "pyto";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_size[] = "size : ";
static const char __pyx_k_srcY[] = "srcY : ";
static const char __pyx_k_srcZ[] = "srcZ : ";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_type[] = "type : ";
static const char __pyx_k_uuid[] = "uuid";
static const char __pyx_k_Depth[] = "Depth : ";
static const char __pyx_k_Flags[] = "Flags : ";
static const char __pyx_k_Pitch[] = "Pitch";
static const char __pyx_k_Tuple[] = "Tuple";
static const char __pyx_k_Width[] = "Width : ";
static const char __pyx_k__1015[] = "\n\n    ";
static const char __pyx_k_alias[] = "alias : ";
static const char __pyx_k_array[] = "array :\n";
static const char __pyx_k_attrs[] = "attrs : ";
static const char __pyx_k_bytes[] = "bytes : ";
static const char __pyx_k_caddr[] = "caddr";
static const char __pyx_k_cattr[] = "cattr";
static const char __pyx_k_cconn[] = "cconn";
static const char __pyx_k_cdata[] = "cdata";
static const char __pyx_k_cdesc[] = "cdesc";
static const char __pyx_k_cdptr[] = "cdptr";
static const char __pyx_k_cfrom[] = "cfrom_";
static const char __pyx_k_cfunc[] = "cfunc";
static const char __pyx_k_chEnd[] = "chEnd";
static const char __pyx_k_chmod[] = "chmod";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_cmode[] = "cmode";
static const char __pyx_k_count[] = "count : ";
static const char __pyx_k_cpool[] = "cpool";
static const char __pyx_k_ctx_2[] = "ctx";
static const char __pyx_k_depth[] = "depth : ";
static const char __pyx_k_dst_2[] = "dst";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_event[] = "event : ";
static const char __pyx_k_extra[] = "extra : ";
static const char __pyx_k_fence[] = "fence : ";
static const char __pyx_k_flags[] = "flags : ";
static const char __pyx_k_fname[] = "fname";
static const char __pyx_k_frame[] = "frame :\n";
static const char __pyx_k_graph[] = "graph";
static const char __pyx_k_hNode[] = "hNode";
static const char __pyx_k_hfunc[] = "hfunc";
static const char __pyx_k_image[] = "image";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_key_2[] = "key";
static const char __pyx_k_layer[] = "layer : ";
static const char __pyx_k_level[] = "level : ";
static const char __pyx_k_limit[] = "limit";
static const char __pyx_k_major[] = "major";
static const char __pyx_k_minor[] = "minor";
static const char __pyx_k_pCopy[] = "pCopy";
static const char __pyx_k_pSize[] = "pSize";
static const char __pyx_k_pad_2[] = "pad";
static const char __pyx_k_paddr[] = "paddr";
static const char __pyx_k_param[] = "param :\n";
static const char __pyx_k_pbase[] = "pbase";
static const char __pyx_k_pbias[] = "pbias";
static const char __pyx_k_pconn[] = "pconn";
static const char __pyx_k_pdptr[] = "pdptr";
static const char __pyx_k_pfunc[] = "pfunc";
static const char __pyx_k_phEnd[] = "phEnd";
static const char __pyx_k_phmod[] = "phmod";
static const char __pyx_k_pitch[] = "pitch : ";
static const char __pyx_k_ppool[] = "ppool";
static const char __pyx_k_psize[] = "psize";
static const char __pyx_k_ptr_2[] = "ptr";
static const char __pyx_k_pyObj[] = "pyObj";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_res_2[] = "res";
static const char __pyx_k_scope[] = "scope";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_total[] = "total";
static const char __pyx_k_usage[] = "usage : ";
static const char __pyx_k_val_2[] = "val";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_width[] = "width : ";
static const char __pyx_k_win32[] = "win32 :\n";
static const char __pyx_k_CUuuid[] = "CUuuid";
static const char __pyx_k_EGLint[] = "<EGLint ";
static const char __pyx_k_Format[] = "Format : ";
static const char __pyx_k_GLenum[] = "<GLenum ";
static const char __pyx_k_GLuint[] = "<GLuint ";
static const char __pyx_k_Height[] = "Height : ";
static const char __pyx_k_Limits[] = "\n    Limits\n    ";
static const char __pyx_k_active[] = "active";
static const char __pyx_k_advice[] = "advice";
static const char __pyx_k_attrib[] = "attrib";
static const char __pyx_k_buffer[] = "buffer";
static const char __pyx_k_carray[] = "carray";
static const char __pyx_k_cerror[] = "cerror";
static const char __pyx_k_cevent[] = "cevent";
static const char __pyx_k_cflags[] = "cflags";
static const char __pyx_k_cgraph[] = "cgraph";
static const char __pyx_k_chNode[] = "chNode";
static const char __pyx_k_chfunc[] = "chfunc";
static const char __pyx_k_cimage[] = "cimage";
static const char __pyx_k_climit[] = "climit";
static const char __pyx_k_cnodes[] = "cnodes";
static const char __pyx_k_config[] = "config";
static const char __pyx_k_cp_ptr[] = "cp_ptr";
static const char __pyx_k_cscope[] = "cscope";
static const char __pyx_k_cstate[] = "cstate";
static const char __pyx_k_ctypes[] = "ctypes";
static const char __pyx_k_cuInit[] = "cuInit";
static const char __pyx_k_cvalue[] = "cvalue";
static const char __pyx_k_cwidth[] = "cwidth";
static const char __pyx_k_devPtr[] = "devPtr : ";
static const char __pyx_k_device[] = "device";
static const char __pyx_k_dptr_2[] = "dptr";
static const char __pyx_k_dstLOD[] = "dstLOD : ";
static const char __pyx_k_dstY_2[] = "dstY";
static const char __pyx_k_dstZ_2[] = "dstZ";
static const char __pyx_k_extMem[] = "extMem";
static const char __pyx_k_extSem[] = "extSem";
static const char __pyx_k_format[] = "format : ";
static const char __pyx_k_func_2[] = "func";
static const char __pyx_k_getPtr[] = "getPtr";
static const char __pyx_k_hArray[] = "hArray : ";
static const char __pyx_k_hEvent[] = "hEvent";
static const char __pyx_k_hGraph[] = "hGraph";
static const char __pyx_k_hStart[] = "hStart";
static const char __pyx_k_handle[] = "handle : ";
static const char __pyx_k_height[] = "height : ";
static const char __pyx_k_id_out[] = "id_out";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_linear[] = "linear :\n";
static const char __pyx_k_mipmap[] = "mipmap :\n";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "name";
static const char __pyx_k_name_3[] = "__name__";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_offset[] = "offset : ";
static const char __pyx_k_option[] = "option";
static const char __pyx_k_pArray[] = "pArray : ";
static const char __pyx_k_pFlags[] = "pFlags";
static const char __pyx_k_pPitch[] = "pPitch : ";
static const char __pyx_k_params[] = "params :\n";
static const char __pyx_k_parray[] = "parray";
static const char __pyx_k_pevent[] = "pevent";
static const char __pyx_k_pflags[] = "pflags";
static const char __pyx_k_pgraph[] = "pgraph";
static const char __pyx_k_phNode[] = "phNode";
static const char __pyx_k_phfunc[] = "phfunc";
static const char __pyx_k_pimage[] = "pimage";
static const char __pyx_k_pstate[] = "pstate";
static const char __pyx_k_pvalue[] = "pvalue";
static const char __pyx_k_pwidth[] = "pwidth";
static const char __pyx_k_pyfrom[] = "pyfrom_";
static const char __pyx_k_pylist[] = "pylist";
static const char __pyx_k_pyname[] = "pyname";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_size_2[] = "size";
static const char __pyx_k_sizeof[] = "sizeof";
static const char __pyx_k_srcLOD[] = "srcLOD : ";
static const char __pyx_k_srcY_2[] = "srcY";
static const char __pyx_k_srcZ_2[] = "srcZ";
static const char __pyx_k_stream[] = "stream";
static const char __pyx_k_symbol[] = "symbol";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_type_2[] = "type";
static const char __pyx_k_typing[] = "typing";
static const char __pyx_k_CUarray[] = "<CUarray ";
static const char __pyx_k_CUevent[] = "<CUevent ";
static const char __pyx_k_CUgraph[] = "<CUgraph ";
static const char __pyx_k_CUlimit[] = "CUlimit";
static const char __pyx_k_Depth_2[] = "Depth";
static const char __pyx_k_Flags_2[] = "Flags";
static const char __pyx_k_IntEnum[] = "IntEnum";
static const char __pyx_k_Width_2[] = "Width";
static const char __pyx_k_address[] = "address : ";
static const char __pyx_k_alias_2[] = "alias";
static const char __pyx_k_array_2[] = "array";
static const char __pyx_k_array_3[] = "array : ";
static const char __pyx_k_attrs_2[] = "attrs";
static const char __pyx_k_bytes_2[] = "bytes";
static const char __pyx_k_cadvice[] = "cadvice";
static const char __pyx_k_cattrib[] = "cattrib";
static const char __pyx_k_cbuffer[] = "cbuffer";
static const char __pyx_k_cconfig[] = "cconfig";
static const char __pyx_k_cdevPtr[] = "cdevPtr";
static const char __pyx_k_cdevice[] = "cdevice";
static const char __pyx_k_cextMem[] = "cextMem";
static const char __pyx_k_cextSem[] = "cextSem";
static const char __pyx_k_chArray[] = "chArray";
static const char __pyx_k_chEvent[] = "chEvent";
static const char __pyx_k_chGraph[] = "chGraph";
static const char __pyx_k_chStart[] = "chStart";
static const char __pyx_k_chandle[] = "chandle";
static const char __pyx_k_cheight[] = "cheight";
static const char __pyx_k_cmipmap[] = "cmipmap";
static const char __pyx_k_cobject[] = "cobject";
static const char __pyx_k_coption[] = "coption";
static const char __pyx_k_count_2[] = "count";
static const char __pyx_k_cstream[] = "cstream";
static const char __pyx_k_ctarget[] = "ctarget";
static const char __pyx_k_depth_2[] = "depth";
static const char __pyx_k_destroy[] = "destroy";
static const char __pyx_k_dstHost[] = "dstHost : ";
static const char __pyx_k_eglSync[] = "eglSync";
static const char __pyx_k_event_2[] = "event";
static const char __pyx_k_extra_2[] = "extra";
static const char __pyx_k_fence_2[] = "fence";
static const char __pyx_k_fence_3[] = "fence :\n";
static const char __pyx_k_flags_2[] = "flags";
static const char __pyx_k_frame_2[] = "frame";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_hStream[] = "hStream : ";
static const char __pyx_k_hTexRef[] = "hTexRef";
static const char __pyx_k_hitProp[] = "hitProp : ";
static const char __pyx_k_layer_2[] = "layer";
static const char __pyx_k_level_2[] = "level";
static const char __pyx_k_memPool[] = "memPool";
static const char __pyx_k_miptail[] = "miptail :\n";
static const char __pyx_k_objType[] = "objType";
static const char __pyx_k_offsetX[] = "offsetX : ";
static const char __pyx_k_offsetY[] = "offsetY : ";
static const char __pyx_k_offsetZ[] = "offsetZ : ";
static const char __pyx_k_options[] = "options";
static const char __pyx_k_ordinal[] = "ordinal";
static const char __pyx_k_pConfig[] = "pConfig";
static const char __pyx_k_pDevPtr[] = "pDevPtr";
static const char __pyx_k_pDevice[] = "pDevice";
static const char __pyx_k_pFormat[] = "pFormat";
static const char __pyx_k_pHandle[] = "pHandle";
static const char __pyx_k_pStream[] = "pStream";
static const char __pyx_k_pTexRef[] = "pTexRef";
static const char __pyx_k_param_2[] = "param";
static const char __pyx_k_pbuffer[] = "pbuffer";
static const char __pyx_k_pconfig[] = "pconfig";
static const char __pyx_k_pdevPtr[] = "pdevPtr";
static const char __pyx_k_pdevice[] = "pdevice";
static const char __pyx_k_peerDev[] = "peerDev";
static const char __pyx_k_pextMem[] = "pextMem";
static const char __pyx_k_pextSem[] = "pextSem";
static const char __pyx_k_pformat[] = "pformat";
static const char __pyx_k_phArray[] = "phArray";
static const char __pyx_k_phEvent[] = "phEvent";
static const char __pyx_k_phGraph[] = "phGraph";
static const char __pyx_k_phStart[] = "phStart";
static const char __pyx_k_phandle[] = "phandle";
static const char __pyx_k_pheight[] = "pheight";
static const char __pyx_k_pitch2D[] = "pitch2D :\n";
static const char __pyx_k_pitch_2[] = "pitch";
static const char __pyx_k_pmipmap[] = "pmipmap";
static const char __pyx_k_pobject[] = "pobject";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_pstream[] = "pstream";
static const char __pyx_k_ptarget[] = "ptarget";
static const char __pyx_k_ptr_out[] = "ptr_out";
static const char __pyx_k_pynodes[] = "pynodes";
static const char __pyx_k_resType[] = "resType : ";
static const char __pyx_k_sizeOut[] = "sizeOut";
static const char __pyx_k_smCount[] = "smCount :\n";
static const char __pyx_k_srcHost[] = "srcHost : ";
static const char __pyx_k_texunit[] = "texunit";
static const char __pyx_k_timeout[] = "timeout";
static const char __pyx_k_usage_2[] = "usage";
static const char __pyx_k_value64[] = "value64 : ";
static const char __pyx_k_value_2[] = "value : ";
static const char __pyx_k_value_3[] = "value :\n";
static const char __pyx_k_version[] = "version";
static const char __pyx_k_width_2[] = "width";
static const char __pyx_k_win32_2[] = "win32";
static const char __pyx_k_CUdevice[] = "<CUdevice ";
static const char __pyx_k_CUhostFn[] = "<CUhostFn ";
static const char __pyx_k_CUmodule[] = "<CUmodule ";
static const char __pyx_k_CUresult[] = "CUresult";
static const char __pyx_k_CUstream[] = "<CUstream ";
static const char __pyx_k_CUtexref[] = "<CUtexref ";
static const char __pyx_k_EGLint_2[] = "EGLint";
static const char __pyx_k_Format_2[] = "Format";
static const char __pyx_k_GLenum_2[] = "GLenum";
static const char __pyx_k_GLuint_2[] = "GLuint";
static const char __pyx_k_Height_2[] = "Height";
static const char __pyx_k_base_ptr[] = "base_ptr : ";
static const char __pyx_k_bytesize[] = "bytesize : ";
static const char __pyx_k_callback[] = "callback";
static const char __pyx_k_cdestroy[] = "cdestroy";
static const char __pyx_k_cdstHost[] = "cdstHost";
static const char __pyx_k_ceglSync[] = "ceglSync";
static const char __pyx_k_chStream[] = "chStream";
static const char __pyx_k_chTexRef[] = "chTexRef";
static const char __pyx_k_cmemPool[] = "cmemPool";
static const char __pyx_k_coptions[] = "coptions";
static const char __pyx_k_cpStream[] = "cpStream";
static const char __pyx_k_cpeerDev[] = "cpeerDev";
static const char __pyx_k_cpformat[] = "cpformat";
static const char __pyx_k_cptr_ptr[] = "cptr_ptr";
static const char __pyx_k_csrcHost[] = "csrcHost";
static const char __pyx_k_cuFormat[] = "cuFormat : ";
static const char __pyx_k_cuLaunch[] = "cuLaunch";
static const char __pyx_k_cuMemMap[] = "cuMemMap";
static const char __pyx_k_cuMemcpy[] = "cuMemcpy";
static const char __pyx_k_cubinOut[] = "cubinOut";
static const char __pyx_k_dataSize[] = "dataSize";
static const char __pyx_k_devPtr_2[] = "devPtr";
static const char __pyx_k_dptr_out[] = "dptr_out";
static const char __pyx_k_dstArray[] = "dstArray : ";
static const char __pyx_k_dstLOD_2[] = "dstLOD";
static const char __pyx_k_dstPitch[] = "dstPitch : ";
static const char __pyx_k_eglFrame[] = "eglFrame";
static const char __pyx_k_eglframe[] = "eglframe";
static const char __pyx_k_fatCubin[] = "fatCubin";
static const char __pyx_k_format_2[] = "format";
static const char __pyx_k_function[] = "function : ";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_gridDimX[] = "gridDimX : ";
static const char __pyx_k_gridDimY[] = "gridDimY : ";
static const char __pyx_k_gridDimZ[] = "gridDimZ : ";
static const char __pyx_k_hArray_2[] = "hArray";
static const char __pyx_k_hSurfRef[] = "hSurfRef";
static const char __pyx_k_handle_2[] = "handle";
static const char __pyx_k_handle_3[] = "handle :\n";
static const char __pyx_k_height_2[] = "height";
static const char __pyx_k_hitRatio[] = "hitRatio : ";
static const char __pyx_k_linear_2[] = "linear";
static const char __pyx_k_location[] = "location :\n";
static const char __pyx_k_maxAniso[] = "maxAniso";
static const char __pyx_k_memPitch[] = "memPitch : ";
static const char __pyx_k_mipLevel[] = "mipLevel";
static const char __pyx_k_mipmap_2[] = "mipmap";
static const char __pyx_k_mipmap_3[] = "mipmap : ";
static const char __pyx_k_missProp[] = "missProp : ";
static const char __pyx_k_module_2[] = "module";
static const char __pyx_k_numAttrs[] = "numAttrs : ";
static const char __pyx_k_numEdges[] = "numEdges";
static const char __pyx_k_numNodes[] = "numNodes";
static const char __pyx_k_numbytes[] = "numbytes";
static const char __pyx_k_offset_2[] = "offset";
static const char __pyx_k_osHandle[] = "osHandle";
static const char __pyx_k_p2pToken[] = "p2pToken : ";
static const char __pyx_k_pArray_2[] = "pArray";
static const char __pyx_k_pPitch_2[] = "pPitch";
static const char __pyx_k_pResDesc[] = "pResDesc";
static const char __pyx_k_pSurfRef[] = "pSurfRef";
static const char __pyx_k_pTexDesc[] = "pTexDesc";
static const char __pyx_k_params_2[] = "params";
static const char __pyx_k_pciBusId[] = "pciBusId";
static const char __pyx_k_pdestroy[] = "pdestroy";
static const char __pyx_k_peglSync[] = "peglSync";
static const char __pyx_k_phStream[] = "phStream";
static const char __pyx_k_phTexRef[] = "phTexRef";
static const char __pyx_k_planeIdx[] = "planeIdx";
static const char __pyx_k_pmemPool[] = "pmemPool";
static const char __pyx_k_pool_out[] = "pool_out";
static const char __pyx_k_ppStream[] = "ppStream";
static const char __pyx_k_ppeerDev[] = "ppeerDev";
static const char __pyx_k_priority[] = "priority : ";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_reserved[] = "reserved : ";
static const char __pyx_k_resource[] = "resource :\n";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_srcArray[] = "srcArray : ";
static const char __pyx_k_srcLOD_2[] = "srcLOD";
static const char __pyx_k_srcPitch[] = "srcPitch : ";
static const char __pyx_k_stateOut[] = "stateOut";
static const char __pyx_k_typename[] = "typename";
static const char __pyx_k_userData[] = "userData : ";
static const char __pyx_k_ByteCount[] = "ByteCount";
static const char __pyx_k_CUarray_2[] = "CUarray";
static const char __pyx_k_CUcontext[] = "<CUcontext ";
static const char __pyx_k_CUdevprop[] = "CUdevprop";
static const char __pyx_k_CUevent_2[] = "CUevent";
static const char __pyx_k_CUgraph_2[] = "CUgraph";
static const char __pyx_k_CUsurfref[] = "<CUsurfref ";
static const char __pyx_k_CUuuid_st[] = "CUuuid_st";
static const char __pyx_k_SIMDWidth[] = "SIMDWidth : ";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_VdpDevice[] = "<VdpDevice ";
static const char __pyx_k_address_2[] = "address";
static const char __pyx_k_alignment[] = "alignment : ";
static const char __pyx_k_allocType[] = "allocType : ";
static const char __pyx_k_arrayDesc[] = "arrayDesc :\n";
static const char __pyx_k_attribute[] = "attribute";
static const char __pyx_k_blockDimX[] = "blockDimX : ";
static const char __pyx_k_blockDimY[] = "blockDimY : ";
static const char __pyx_k_blockDimZ[] = "blockDimZ : ";
static const char __pyx_k_blockSize[] = "blockSize";
static const char __pyx_k_caddr_ptr[] = "caddr_ptr";
static const char __pyx_k_ccallback[] = "ccallback";
static const char __pyx_k_cdata_ptr[] = "cdata_ptr";
static const char __pyx_k_cdesc_ptr[] = "cdesc_ptr";
static const char __pyx_k_cdstArray[] = "cdstArray";
static const char __pyx_k_cfatCubin[] = "cfatCubin";
static const char __pyx_k_chSurfRef[] = "chSurfRef";
static const char __pyx_k_clockRate[] = "clockRate : ";
static const char __pyx_k_cosHandle[] = "cosHandle";
static const char __pyx_k_cprop_ptr[] = "cprop_ptr";
static const char __pyx_k_cresource[] = "cresource";
static const char __pyx_k_csrcArray[] = "csrcArray";
static const char __pyx_k_ctypename[] = "ctypename";
static const char __pyx_k_cuMemFree[] = "cuMemFree";
static const char __pyx_k_cuda_cuda[] = "cuda.cuda";
static const char __pyx_k_cuserData[] = "cuserData";
static const char __pyx_k_dataSizes[] = "dataSizes";
static const char __pyx_k_dstDevice[] = "dstDevice : ";
static const char __pyx_k_dstHeight[] = "dstHeight : ";
static const char __pyx_k_dstHost_2[] = "dstHost";
static const char __pyx_k_dstOffset[] = "dstOffset";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_event_out[] = "event_out";
static const char __pyx_k_frameType[] = "frameType : ";
static const char __pyx_k_graph_out[] = "graph_out";
static const char __pyx_k_hStream_2[] = "hStream";
static const char __pyx_k_hitProp_2[] = "hitProp";
static const char __pyx_k_isEnabled[] = "isEnabled";
static const char __pyx_k_is_getter[] = "is_getter";
static const char __pyx_k_lastLayer[] = "lastLayer : ";
static const char __pyx_k_logBuffer[] = "logBuffer";
static const char __pyx_k_memHandle[] = "memHandle : ";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_miptail_2[] = "miptail";
static const char __pyx_k_numBlocks[] = "numBlocks";
static const char __pyx_k_numLevels[] = "numLevels : ";
static const char __pyx_k_numParams[] = "numParams";
static const char __pyx_k_num_bytes[] = "num_bytes : ";
static const char __pyx_k_nvSciSync[] = "nvSciSync :\n";
static const char __pyx_k_offsetX_2[] = "offsetX";
static const char __pyx_k_offsetY_2[] = "offsetY";
static const char __pyx_k_offsetZ_2[] = "offsetZ";
static const char __pyx_k_operation[] = "operation : ";
static const char __pyx_k_pcallback[] = "pcallback";
static const char __pyx_k_pdstArray[] = "pdstArray";
static const char __pyx_k_phSurfRef[] = "phSurfRef";
static const char __pyx_k_pitch2D_2[] = "pitch2D";
static const char __pyx_k_pmaxAniso[] = "pmaxAniso";
static const char __pyx_k_poolProps[] = "poolProps :\n";
static const char __pyx_k_presource[] = "presource";
static const char __pyx_k_psrcArray[] = "psrcArray";
static const char __pyx_k_pyoptions[] = "pyoptions";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_resType_2[] = "resType";
static const char __pyx_k_reserved0[] = "reserved0 : ";
static const char __pyx_k_reserved1[] = "reserved1 : ";
static const char __pyx_k_resources[] = "resources";
static const char __pyx_k_shareData[] = "shareData";
static const char __pyx_k_smCount_2[] = "smCount";
static const char __pyx_k_srcDevice[] = "srcDevice : ";
static const char __pyx_k_srcHeight[] = "srcHeight : ";
static const char __pyx_k_srcHost_2[] = "srcHost";
static const char __pyx_k_srcOffset[] = "srcOffset";
static const char __pyx_k_texObject[] = "texObject";
static const char __pyx_k_timeoutMs[] = "timeoutMs : ";
static const char __pyx_k_value64_2[] = "value64";
static const char __pyx_k_value_out[] = "value_out";
static const char __pyx_k_vdpDevice[] = "vdpDevice";
static const char __pyx_k_waitValue[] = "waitValue :\n";
static const char __pyx_k_ByteOffset[] = "ByteOffset";
static const char __pyx_k_CU_JIT_FMA[] = "CU_JIT_FMA";
static const char __pyx_k_CU_JIT_FTZ[] = "CU_JIT_FTZ";
static const char __pyx_k_CU_JIT_LTO[] = "CU_JIT_LTO";
static const char __pyx_k_CU_OUT_CSV[] = "CU_OUT_CSV";
static const char __pyx_k_CUdevice_2[] = "CUdevice";
static const char __pyx_k_CUeglFrame[] = "CUeglFrame";
static const char __pyx_k_CUfunction[] = "<CUfunction ";
static const char __pyx_k_CUhostFn_2[] = "CUhostFn";
static const char __pyx_k_CUmodule_2[] = "CUmodule";
static const char __pyx_k_CUstream_2[] = "CUstream";
static const char __pyx_k_CUtexref_2[] = "CUtexref";
static const char __pyx_k_EGLSyncKHR[] = "<EGLSyncKHR ";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_MAX_PLANES[] = "MAX_PLANES";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_allocFlags[] = "allocFlags :\n";
static const char __pyx_k_arrayIndex[] = "arrayIndex";
static const char __pyx_k_attributes[] = "attributes";
static const char __pyx_k_base_ptr_2[] = "base_ptr";
static const char __pyx_k_bufferDesc[] = "bufferDesc";
static const char __pyx_k_bufferSize[] = "bufferSize";
static const char __pyx_k_bytesize_2[] = "bytesize";
static const char __pyx_k_cattribute[] = "cattribute";
static const char __pyx_k_cdataSizes[] = "cdataSizes";
static const char __pyx_k_cdstDevice[] = "cdstDevice";
static const char __pyx_k_childGraph[] = "childGraph";
static const char __pyx_k_cimage_ptr[] = "cimage_ptr";
static const char __pyx_k_clusterDim[] = "clusterDim :\n";
static const char __pyx_k_configFile[] = "configFile";
static const char __pyx_k_copyParams[] = "copyParams";
static const char __pyx_k_cpCopy_ptr[] = "cpCopy_ptr";
static const char __pyx_k_cresources[] = "cresources";
static const char __pyx_k_crootNodes[] = "crootNodes";
static const char __pyx_k_csrcDevice[] = "csrcDevice";
static const char __pyx_k_ctexObject[] = "ctexObject";
static const char __pyx_k_cuFormat_2[] = "cuFormat";
static const char __pyx_k_cuMemAlloc[] = "cuMemAlloc";
static const char __pyx_k_cuMemUnmap[] = "cuMemUnmap";
static const char __pyx_k_cuMemcpy2D[] = "cuMemcpy2D";
static const char __pyx_k_cuMemcpy3D[] = "cuMemcpy3D";
static const char __pyx_k_cuMemsetD8[] = "cuMemsetD8";
static const char __pyx_k_cuuint32_t[] = "<cuuint32_t ";
static const char __pyx_k_cuuint64_t[] = "<cuuint64_t ";
static const char __pyx_k_cvalue_ptr[] = "cvalue_ptr";
static const char __pyx_k_cvdpDevice[] = "cvdpDevice";
static const char __pyx_k_deviceList[] = "deviceList";
static const char __pyx_k_dstArray_2[] = "dstArray";
static const char __pyx_k_dstContext[] = "dstContext : ";
static const char __pyx_k_dstPitch_2[] = "dstPitch";
static const char __pyx_k_extMem_out[] = "extMem_out";
static const char __pyx_k_extSem_out[] = "extSem_out";
static const char __pyx_k_filterMode[] = "filterMode : ";
static const char __pyx_k_firstLayer[] = "firstLayer : ";
static const char __pyx_k_function_2[] = "function";
static const char __pyx_k_gridDimX_2[] = "gridDimX";
static const char __pyx_k_gridDimY_2[] = "gridDimY";
static const char __pyx_k_gridDimZ_2[] = "gridDimZ";
static const char __pyx_k_grid_width[] = "grid_width";
static const char __pyx_k_hGraphExec[] = "hGraphExec";
static const char __pyx_k_handleType[] = "handleType";
static const char __pyx_k_hitRatio_2[] = "hitRatio";
static const char __pyx_k_init_value[] = "init_value";
static const char __pyx_k_keyedMutex[] = "keyedMutex :\n";
static const char __pyx_k_location_2[] = "location";
static const char __pyx_k_memPitch_2[] = "memPitch";
static const char __pyx_k_mipmapDesc[] = "mipmapDesc";
static const char __pyx_k_missProp_2[] = "missProp";
static const char __pyx_k_nodeParams[] = "nodeParams";
static const char __pyx_k_numAttrs_2[] = "numAttrs";
static const char __pyx_k_numDevices[] = "numDevices";
static const char __pyx_k_numExtSems[] = "numExtSems : ";
static const char __pyx_k_numOptions[] = "numOptions";
static const char __pyx_k_object_out[] = "object_out";
static const char __pyx_k_outputFile[] = "outputFile";
static const char __pyx_k_outputMode[] = "outputMode";
static const char __pyx_k_p2pToken_2[] = "p2pToken";
static const char __pyx_k_pTexObject[] = "pTexObject";
static const char __pyx_k_paramArray[] = "paramArray : ";
static const char __pyx_k_params_out[] = "params_out";
static const char __pyx_k_pdstDevice[] = "pdstDevice";
static const char __pyx_k_planeCount[] = "planeCount : ";
static const char __pyx_k_presources[] = "presources";
static const char __pyx_k_priority_2[] = "priority";
static const char __pyx_k_psrcDevice[] = "psrcDevice";
static const char __pyx_k_ptexObject[] = "ptexObject";
static const char __pyx_k_pvdpDevice[] = "pvdpDevice";
static const char __pyx_k_pypciBusId[] = "pypciBusId";
static const char __pyx_k_reserved_2[] = "reserved";
static const char __pyx_k_reserved_3[] = "reserved :\n";
static const char __pyx_k_resource_2[] = "resource";
static const char __pyx_k_srcArray_2[] = "srcArray";
static const char __pyx_k_srcContext[] = "srcContext : ";
static const char __pyx_k_srcPitch_2[] = "srcPitch";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_surfObject[] = "surfObject";
static const char __pyx_k_syncPolicy[] = "syncPolicy : ";
static const char __pyx_k_tileExtent[] = "tileExtent :\n";
static const char __pyx_k_userData_2[] = "userData";
static const char __pyx_k_vdpSurface[] = "vdpSurface";
static const char __pyx_k_writeValue[] = "writeValue :\n";
static const char __pyx_k_CUcontext_2[] = "CUcontext";
static const char __pyx_k_CUctx_flags[] = "CUctx_flags";
static const char __pyx_k_CUdevice_v1[] = "<CUdevice_v1 ";
static const char __pyx_k_CUdeviceptr[] = "<CUdeviceptr ";
static const char __pyx_k_CUgraphExec[] = "<CUgraphExec ";
static const char __pyx_k_CUgraphNode[] = "<CUgraphNode ";
static const char __pyx_k_CUlinkState[] = "<CUlinkState ";
static const char __pyx_k_CUsurfref_2[] = "CUsurfref";
static const char __pyx_k_CUtexObject[] = "<CUtexObject ";
static const char __pyx_k_EGLImageKHR[] = "<EGLImageKHR ";
static const char __pyx_k_Error_codes[] = "\n    Error codes\n    ";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_NumChannels[] = "NumChannels : ";
static const char __pyx_k_SIMDWidth_2[] = "SIMDWidth";
static const char __pyx_k_VdpDevice_2[] = "VdpDevice";
static const char __pyx_k_accessDescs[] = "accessDescs : ";
static const char __pyx_k_addressMode[] = "addressMode : ";
static const char __pyx_k_alignment_2[] = "alignment";
static const char __pyx_k_allocType_2[] = "allocType";
static const char __pyx_k_arrayDesc_2[] = "arrayDesc";
static const char __pyx_k_blockDimX_2[] = "blockDimX";
static const char __pyx_k_blockDimY_2[] = "blockDimY";
static const char __pyx_k_blockDimZ_2[] = "blockDimZ";
static const char __pyx_k_borderColor[] = "borderColor : ";
static const char __pyx_k_cattributes[] = "cattributes";
static const char __pyx_k_cchildGraph[] = "cchildGraph";
static const char __pyx_k_cconfig_ptr[] = "cconfig_ptr";
static const char __pyx_k_cdeviceList[] = "cdeviceList";
static const char __pyx_k_cdstContext[] = "cdstContext";
static const char __pyx_k_chGraphExec[] = "chGraphExec";
static const char __pyx_k_chandleType[] = "chandleType";
static const char __pyx_k_chandle_out[] = "chandle_out";
static const char __pyx_k_chandle_ptr[] = "chandle_ptr";
static const char __pyx_k_clockRate_2[] = "clockRate";
static const char __pyx_k_clusterSize[] = "clusterSize";
static const char __pyx_k_cooperative[] = "cooperative : ";
static const char __pyx_k_coutputMode[] = "coutputMode";
static const char __pyx_k_cparamArray[] = "cparamArray";
static const char __pyx_k_csrcContext[] = "csrcContext";
static const char __pyx_k_csurfObject[] = "csurfObject";
static const char __pyx_k_cuCtxAttach[] = "cuCtxAttach";
static const char __pyx_k_cuCtxCreate[] = "cuCtxCreate";
static const char __pyx_k_cuCtxDetach[] = "cuCtxDetach";
static const char __pyx_k_cuDeviceGet[] = "cuDeviceGet";
static const char __pyx_k_cuMemAdvise[] = "cuMemAdvise";
static const char __pyx_k_cuMemCreate[] = "cuMemCreate";
static const char __pyx_k_cuMemsetD16[] = "cuMemsetD16";
static const char __pyx_k_cuMemsetD32[] = "cuMemsetD32";
static const char __pyx_k_cuParamSetf[] = "cuParamSetf";
static const char __pyx_k_cuParamSeti[] = "cuParamSeti";
static const char __pyx_k_cuParamSetv[] = "cuParamSetv";
static const char __pyx_k_cudaVersion[] = "cudaVersion";
static const char __pyx_k_cvdpSurface[] = "cvdpSurface";
static const char __pyx_k_dstDevice_2[] = "dstDevice";
static const char __pyx_k_dstHeight_2[] = "dstHeight";
static const char __pyx_k_dstXInBytes[] = "dstXInBytes : ";
static const char __pyx_k_elementSize[] = "elementSize : ";
static const char __pyx_k_extSemArray[] = "extSemArray : ";
static const char __pyx_k_extentDepth[] = "extentDepth : ";
static const char __pyx_k_extentWidth[] = "extentWidth : ";
static const char __pyx_k_frameType_2[] = "frameType";
static const char __pyx_k_granularity[] = "granularity";
static const char __pyx_k_grid_height[] = "grid_height";
static const char __pyx_k_handleTypes[] = "handleTypes : ";
static const char __pyx_k_lastLayer_2[] = "lastLayer";
static const char __pyx_k_mapInfoList[] = "mapInfoList";
static const char __pyx_k_maxGridSize[] = "maxGridSize : ";
static const char __pyx_k_memHandle_2[] = "memHandle";
static const char __pyx_k_memHandle_3[] = "memHandle :\n";
static const char __pyx_k_minGridSize[] = "minGridSize";
static const char __pyx_k_miptailSize[] = "miptailSize : ";
static const char __pyx_k_numChannels[] = "numChannels : ";
static const char __pyx_k_numClusters[] = "numClusters";
static const char __pyx_k_numLevels_2[] = "numLevels";
static const char __pyx_k_num_bytes_2[] = "num_bytes";
static const char __pyx_k_nvSciSync_2[] = "nvSciSync";
static const char __pyx_k_operation_2[] = "operation";
static const char __pyx_k_pLevelArray[] = "pLevelArray";
static const char __pyx_k_pPlaneArray[] = "pPlaneArray";
static const char __pyx_k_pSurfObject[] = "pSurfObject";
static const char __pyx_k_paramsArray[] = "paramsArray : ";
static const char __pyx_k_pchildGraph[] = "pchildGraph";
static const char __pyx_k_pdstContext[] = "pdstContext";
static const char __pyx_k_peerContext[] = "peerContext";
static const char __pyx_k_phErrorNode[] = "phErrorNode";
static const char __pyx_k_phGraphExec[] = "phGraphExec";
static const char __pyx_k_phGraphNode[] = "phGraphNode";
static const char __pyx_k_poolProps_2[] = "poolProps";
static const char __pyx_k_psrcContext[] = "psrcContext";
static const char __pyx_k_psurfObject[] = "psurfObject";
static const char __pyx_k_pvdpSurface[] = "pvdpSurface";
static const char __pyx_k_pydataSizes[] = "pydataSizes";
static const char __pyx_k_pyrootNodes[] = "pyrootNodes";
static const char __pyx_k_reserved0_2[] = "reserved0";
static const char __pyx_k_reserved1_2[] = "reserved1";
static const char __pyx_k_sizeInBytes[] = "sizeInBytes : ";
static const char __pyx_k_sparseLevel[] = "sparseLevel :\n";
static const char __pyx_k_srcDevice_2[] = "srcDevice";
static const char __pyx_k_srcHeight_2[] = "srcHeight";
static const char __pyx_k_srcXInBytes[] = "srcXInBytes : ";
static const char __pyx_k_subresource[] = "subresource :\n";
static const char __pyx_k_timeoutMs_2[] = "timeoutMs";
static const char __pyx_k_waitValue_2[] = "waitValue";
static const char __pyx_k_CUDA_SUCCESS[] = "CUDA_SUCCESS";
static const char __pyx_k_CUDA_VERSION[] = "CUDA_VERSION";
static const char __pyx_k_CU_LIMIT_MAX[] = "CU_LIMIT_MAX";
static const char __pyx_k_CU_TRSF_SRGB[] = "CU_TRSF_SRGB";
static const char __pyx_k_CUdevprop_st[] = "CUdevprop_st";
static const char __pyx_k_CUdevprop_v1[] = "CUdevprop_v1";
static const char __pyx_k_CUfunc_cache[] = "CUfunc_cache";
static const char __pyx_k_CUfunction_2[] = "CUfunction";
static const char __pyx_k_CUjit_option[] = "CUjit_option";
static const char __pyx_k_CUjit_target[] = "CUjit_target";
static const char __pyx_k_CUmem_advise[] = "CUmem_advise";
static const char __pyx_k_CUmemoryPool[] = "<CUmemoryPool ";
static const char __pyx_k_CUmemorytype[] = "CUmemorytype";
static const char __pyx_k_CUsurfObject[] = "<CUsurfObject ";
static const char __pyx_k_CUuserObject[] = "<CUuserObject ";
static const char __pyx_k_EGLStreamKHR[] = "<EGLStreamKHR ";
static const char __pyx_k_EGLSyncKHR_2[] = "EGLSyncKHR";
static const char __pyx_k_Memory_types[] = "\n    Memory types\n    ";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_Unknown_type[] = "Unknown type: ";
static const char __pyx_k_WidthInBytes[] = "WidthInBytes : ";
static const char __pyx_k_allocFlags_2[] = "allocFlags";
static const char __pyx_k_cdstHost_ptr[] = "cdstHost_ptr";
static const char __pyx_k_cextSemArray[] = "cextSemArray";
static const char __pyx_k_clusterDim_2[] = "clusterDim";
static const char __pyx_k_cmapInfoList[] = "cmapInfoList";
static const char __pyx_k_cparamsArray[] = "cparamsArray";
static const char __pyx_k_cpeerContext[] = "cpeerContext";
static const char __pyx_k_csrcHost_ptr[] = "csrcHost_ptr";
static const char __pyx_k_cuCtxDestroy[] = "cuCtxDestroy";
static const char __pyx_k_cuEventQuery[] = "cuEventQuery";
static const char __pyx_k_cuGraphClone[] = "cuGraphClone";
static const char __pyx_k_cuLaunchGrid[] = "cuLaunchGrid";
static const char __pyx_k_cuLinkCreate[] = "cuLinkCreate";
static const char __pyx_k_cuMemGetInfo[] = "cuMemGetInfo";
static const char __pyx_k_cuMemRelease[] = "cuMemRelease";
static const char __pyx_k_cuMemcpyAtoA[] = "cuMemcpyAtoA";
static const char __pyx_k_cuMemcpyAtoD[] = "cuMemcpyAtoD";
static const char __pyx_k_cuMemcpyAtoH[] = "cuMemcpyAtoH";
static const char __pyx_k_cuMemcpyDtoA[] = "cuMemcpyDtoA";
static const char __pyx_k_cuMemcpyDtoD[] = "cuMemcpyDtoD";
static const char __pyx_k_cuMemcpyDtoH[] = "cuMemcpyDtoH";
static const char __pyx_k_cuMemcpyHtoA[] = "cuMemcpyHtoA";
static const char __pyx_k_cuMemcpyHtoD[] = "cuMemcpyHtoD";
static const char __pyx_k_cuMemcpyPeer[] = "cuMemcpyPeer";
static const char __pyx_k_cuMemsetD2D8[] = "cuMemsetD2D8";
static const char __pyx_k_cuModuleLoad[] = "cuModuleLoad";
static const char __pyx_k_cuuint32_t_2[] = "cuuint32_t";
static const char __pyx_k_cuuint64_t_2[] = "cuuint64_t";
static const char __pyx_k_dependencies[] = "dependencies";
static const char __pyx_k_dstContext_2[] = "dstContext";
static const char __pyx_k_extentHeight[] = "extentHeight : ";
static const char __pyx_k_filterMode_2[] = "filterMode";
static const char __pyx_k_firstLayer_2[] = "firstLayer";
static const char __pyx_k_graph_length[] = "_graph_length";
static const char __pyx_k_hClonedGraph[] = "hClonedGraph";
static const char __pyx_k_kernelParams[] = "kernelParams : ";
static const char __pyx_k_keyedMutex_2[] = "keyedMutex";
static const char __pyx_k_memsetParams[] = "memsetParams";
static const char __pyx_k_numExtSems_2[] = "numExtSems";
static const char __pyx_k_numRootNodes[] = "numRootNodes";
static const char __pyx_k_nvSciSyncObj[] = "nvSciSyncObj : ";
static const char __pyx_k_optionValues[] = "optionValues";
static const char __pyx_k_pBorderColor[] = "pBorderColor";
static const char __pyx_k_pNumChannels[] = "pNumChannels";
static const char __pyx_k_pResViewDesc[] = "pResViewDesc";
static const char __pyx_k_paramArray_2[] = "paramArray";
static const char __pyx_k_phGraphClone[] = "phGraphClone";
static const char __pyx_k_pitchInBytes[] = "pitchInBytes : ";
static const char __pyx_k_planeCount_2[] = "planeCount";
static const char __pyx_k_ppeerContext[] = "ppeerContext";
static const char __pyx_k_pyattributes[] = "pyattributes";
static const char __pyx_k_regsPerBlock[] = "regsPerBlock : ";
static const char __pyx_k_resourceType[] = "resourceType : ";
static const char __pyx_k_shHandleType[] = "shHandleType";
static const char __pyx_k_srcContext_2[] = "srcContext";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_syncPolicy_2[] = "syncPolicy";
static const char __pyx_k_textureAlign[] = "textureAlign : ";
static const char __pyx_k_tileExtent_2[] = "tileExtent";
static const char __pyx_k_vaSpaceToken[] = "vaSpaceToken : ";
static const char __pyx_k_writeValue_2[] = "writeValue";
static const char __pyx_k_Array_formats[] = "\n    Array formats\n    ";
static const char __pyx_k_CUDA_MEMCPY2D[] = "CUDA_MEMCPY2D";
static const char __pyx_k_CUDA_MEMCPY3D[] = "CUDA_MEMCPY3D";
static const char __pyx_k_CUGLmap_flags[] = "CUGLmap_flags";
static const char __pyx_k_CU_DEVICE_CPU[] = "CU_DEVICE_CPU";
static const char __pyx_k_CU_JIT_TARGET[] = "CU_JIT_TARGET";
static const char __pyx_k_CU_PREFER_PTX[] = "CU_PREFER_PTX";
static const char __pyx_k_CUcomputemode[] = "CUcomputemode";
static const char __pyx_k_CUdevice_v1_2[] = "CUdevice_v1";
static const char __pyx_k_CUdeviceptr_2[] = "CUdeviceptr";
static const char __pyx_k_CUeglFrame_st[] = "CUeglFrame_st";
static const char __pyx_k_CUeglFrame_v1[] = "CUeglFrame_v1";
static const char __pyx_k_CUevent_flags[] = "CUevent_flags";
static const char __pyx_k_CUfilter_mode[] = "CUfilter_mode";
static const char __pyx_k_CUgraphExec_2[] = "CUgraphExec";
static const char __pyx_k_CUgraphNode_2[] = "CUgraphNode";
static const char __pyx_k_CUlinkState_2[] = "CUlinkState";
static const char __pyx_k_CUmemLocation[] = "CUmemLocation";
static const char __pyx_k_CUoutput_mode[] = "CUoutput_mode";
static const char __pyx_k_CUtexObject_2[] = "CUtexObject";
static const char __pyx_k_Compute_Modes[] = "\n    Compute Modes\n    ";
static const char __pyx_k_EGLImageKHR_2[] = "EGLImageKHR";
static const char __pyx_k_EGLint_getPtr[] = "EGLint.getPtr";
static const char __pyx_k_GLenum_getPtr[] = "GLenum.getPtr";
static const char __pyx_k_GLuint_getPtr[] = "GLuint.getPtr";
static const char __pyx_k_NumChannels_2[] = "NumChannels";
static const char __pyx_k_OverflowError[] = "OverflowError";
static const char __pyx_k_accessDescs_2[] = "accessDescs";
static const char __pyx_k_addressMode_2[] = "addressMode";
static const char __pyx_k_borderColor_2[] = "borderColor";
static const char __pyx_k_canAccessPeer[] = "canAccessPeer";
static const char __pyx_k_captureStatus[] = "captureStatus";
static const char __pyx_k_cdependencies[] = "cdependencies";
static const char __pyx_k_ceglframe_ptr[] = "ceglframe_ptr";
static const char __pyx_k_cfatCubin_ptr[] = "cfatCubin_ptr";
static const char __pyx_k_chClonedGraph[] = "chClonedGraph";
static const char __pyx_k_ckernelParams[] = "ckernelParams";
static const char __pyx_k_clocation_ptr[] = "clocation_ptr";
static const char __pyx_k_cooperative_2[] = "cooperative";
static const char __pyx_k_cosHandle_ptr[] = "cosHandle_ptr";
static const char __pyx_k_cpCudaDevices[] = "cpCudaDevices";
static const char __pyx_k_cpResDesc_ptr[] = "cpResDesc_ptr";
static const char __pyx_k_cpTexDesc_ptr[] = "cpTexDesc_ptr";
static const char __pyx_k_cshHandleType[] = "cshHandleType";
static const char __pyx_k_cuArrayCreate[] = "cuArrayCreate";
static const char __pyx_k_cuCtxGetFlags[] = "cuCtxGetFlags";
static const char __pyx_k_cuCtxGetLimit[] = "cuCtxGetLimit";
static const char __pyx_k_cuCtxSetLimit[] = "cuCtxSetLimit";
static const char __pyx_k_cuEventCreate[] = "cuEventCreate";
static const char __pyx_k_cuEventRecord[] = "cuEventRecord";
static const char __pyx_k_cuGraphCreate[] = "cuGraphCreate";
static const char __pyx_k_cuGraphLaunch[] = "cuGraphLaunch";
static const char __pyx_k_cuGraphUpload[] = "cuGraphUpload";
static const char __pyx_k_cuLinkAddData[] = "cuLinkAddData";
static const char __pyx_k_cuLinkAddFile[] = "cuLinkAddFile";
static const char __pyx_k_cuLinkDestroy[] = "cuLinkDestroy";
static const char __pyx_k_cuMemFreeHost[] = "cuMemFreeHost";
static const char __pyx_k_cuMemcpyAsync[] = "cuMemcpyAsync";
static const char __pyx_k_cuMemsetD2D16[] = "cuMemsetD2D16";
static const char __pyx_k_cuMemsetD2D32[] = "cuMemsetD2D32";
static const char __pyx_k_cuStreamQuery[] = "cuStreamQuery";
static const char __pyx_k_cuda_cuda_pyx[] = "cuda/cuda.pyx";
static const char __pyx_k_cuserData_ptr[] = "cuserData_ptr";
static const char __pyx_k_deviceBitMask[] = "deviceBitMask : ";
static const char __pyx_k_driverVersion[] = "driverVersion";
static const char __pyx_k_dstMemoryType[] = "dstMemoryType : ";
static const char __pyx_k_dstXInBytes_2[] = "dstXInBytes";
static const char __pyx_k_elementSize_2[] = "elementSize";
static const char __pyx_k_extSemArray_2[] = "extSemArray";
static const char __pyx_k_extentDepth_2[] = "extentDepth";
static const char __pyx_k_extentWidth_2[] = "extentWidth";
static const char __pyx_k_hOriginalNode[] = "hOriginalNode";
static const char __pyx_k_handleTypes_2[] = "handleTypes";
static const char __pyx_k_leastPriority[] = "leastPriority";
static const char __pyx_k_maxAnisotropy[] = "maxAnisotropy : ";
static const char __pyx_k_maxGridSize_2[] = "maxGridSize";
static const char __pyx_k_maxThreadsDim[] = "maxThreadsDim : ";
static const char __pyx_k_memHandleDesc[] = "memHandleDesc";
static const char __pyx_k_memHandleType[] = "memHandleType : ";
static const char __pyx_k_memoryBarrier[] = "memoryBarrier :\n";
static const char __pyx_k_miptailSize_2[] = "miptailSize";
static const char __pyx_k_numAttributes[] = "numAttributes";
static const char __pyx_k_numChannels_2[] = "numChannels";
static const char __pyx_k_originalGraph[] = "originalGraph";
static const char __pyx_k_pCudaResource[] = "pCudaResource";
static const char __pyx_k_pExecAffinity[] = "pExecAffinity";
static const char __pyx_k_pMilliseconds[] = "pMilliseconds";
static const char __pyx_k_paramsArray_2[] = "paramsArray";
static const char __pyx_k_phClonedGraph[] = "phClonedGraph";
static const char __pyx_k_ppExportTable[] = "ppExportTable";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_semHandleDesc[] = "semHandleDesc";
static const char __pyx_k_shareData_out[] = "shareData_out";
static const char __pyx_k_sizeInBytes_2[] = "sizeInBytes";
static const char __pyx_k_sparseLevel_2[] = "sparseLevel";
static const char __pyx_k_srcMemoryType[] = "srcMemoryType : ";
static const char __pyx_k_srcXInBytes_2[] = "srcXInBytes";
static const char __pyx_k_subresource_2[] = "subresource";
static const char __pyx_k_CUGLDeviceList[] = "CUGLDeviceList";
static const char __pyx_k_CUaddress_mode[] = "CUaddress_mode";
static const char __pyx_k_CUarrayMapInfo[] = "CUarrayMapInfo";
static const char __pyx_k_CUarray_format[] = "CUarray_format";
static const char __pyx_k_CUarray_getPtr[] = "CUarray.getPtr";
static const char __pyx_k_CUdeviceptr_v2[] = "<CUdeviceptr_v2 ";
static const char __pyx_k_CUeglFrameType[] = "CUeglFrameType";
static const char __pyx_k_CUevent_getPtr[] = "CUevent.getPtr";
static const char __pyx_k_CUgraph_getPtr[] = "CUgraph.getPtr";
static const char __pyx_k_CUipcMemHandle[] = "CUipcMemHandle";
static const char __pyx_k_CUipcMem_flags[] = "CUipcMem_flags";
static const char __pyx_k_CUjitInputType[] = "CUjitInputType";
static const char __pyx_k_CUjit_fallback[] = "CUjit_fallback";
static const char __pyx_k_CUlaunchConfig[] = "CUlaunchConfig";
static const char __pyx_k_CUmemPoolProps[] = "CUmemPoolProps";
static const char __pyx_k_CUmemoryPool_2[] = "CUmemoryPool";
static const char __pyx_k_CUresourcetype[] = "CUresourcetype";
static const char __pyx_k_CUsharedconfig[] = "CUsharedconfig";
static const char __pyx_k_CUstreamAttrID[] = "CUstreamAttrID";
static const char __pyx_k_CUstream_flags[] = "CUstream_flags";
static const char __pyx_k_CUsurfObject_2[] = "CUsurfObject";
static const char __pyx_k_CUtexObject_v1[] = "<CUtexObject_v1 ";
static const char __pyx_k_CUuserObject_2[] = "CUuserObject";
static const char __pyx_k_EGLStreamKHR_2[] = "EGLStreamKHR";
static const char __pyx_k_P2P_Attributes[] = "\n    P2P Attributes\n    ";
static const char __pyx_k_Resource_types[] = "\n    Resource types\n    ";
static const char __pyx_k_WidthInBytes_2[] = "WidthInBytes";
static const char __pyx_k_blockSizeLimit[] = "blockSizeLimit";
static const char __pyx_k_chOriginalNode[] = "chOriginalNode";
static const char __pyx_k_cl_event_flags[] = "cl_event_flags";
static const char __pyx_k_coriginalGraph[] = "coriginalGraph";
static const char __pyx_k_cpCudaResource[] = "cpCudaResource";
static const char __pyx_k_cpoolProps_ptr[] = "cpoolProps_ptr";
static const char __pyx_k_cshareData_ptr[] = "cshareData_ptr";
static const char __pyx_k_cuArrayDestroy[] = "cuArrayDestroy";
static const char __pyx_k_cuCtxCreate_v3[] = "cuCtxCreate_v3";
static const char __pyx_k_cuCtxGetDevice[] = "cuCtxGetDevice";
static const char __pyx_k_cuEventDestroy[] = "cuEventDestroy";
static const char __pyx_k_cuGLGetDevices[] = "cuGLGetDevices";
static const char __pyx_k_cuGetErrorName[] = "cuGetErrorName";
static const char __pyx_k_cuGraphDestroy[] = "cuGraphDestroy";
static const char __pyx_k_cuLaunchKernel[] = "cuLaunchKernel";
static const char __pyx_k_cuLinkComplete[] = "cuLinkComplete";
static const char __pyx_k_cuMemAllocHost[] = "cuMemAllocHost";
static const char __pyx_k_cuMemFreeAsync[] = "cuMemFreeAsync";
static const char __pyx_k_cuMemGetAccess[] = "cuMemGetAccess";
static const char __pyx_k_cuMemHostAlloc[] = "cuMemHostAlloc";
static const char __pyx_k_cuMemSetAccess[] = "cuMemSetAccess";
static const char __pyx_k_cuMemcpy3DPeer[] = "cuMemcpy3DPeer";
static const char __pyx_k_cuModuleUnload[] = "cuModuleUnload";
static const char __pyx_k_cuParamSetSize[] = "cuParamSetSize";
static const char __pyx_k_cuProfilerStop[] = "cuProfilerStop";
static const char __pyx_k_cuStreamCreate[] = "cuStreamCreate";
static const char __pyx_k_cuStreamGetCtx[] = "cuStreamGetCtx";
static const char __pyx_k_cuTexRefCreate[] = "cuTexRefCreate";
static const char __pyx_k_deviceNodeMask[] = "deviceNodeMask";
static const char __pyx_k_eglColorFormat[] = "eglColorFormat : ";
static const char __pyx_k_extentHeight_2[] = "extentHeight";
static const char __pyx_k_hErrorNode_out[] = "hErrorNode_out";
static const char __pyx_k_kernelParams_2[] = "kernelParams";
static const char __pyx_k_minBytesToKeep[] = "minBytesToKeep";
static const char __pyx_k_nodeParams_out[] = "nodeParams_out";
static const char __pyx_k_nvSciBufObject[] = "nvSciBufObject : ";
static const char __pyx_k_nvSciSyncObj_2[] = "nvSciSyncObj";
static const char __pyx_k_pAllocateArray[] = "pAllocateArray";
static const char __pyx_k_pExportTableId[] = "pExportTableId";
static const char __pyx_k_phOriginalNode[] = "phOriginalNode";
static const char __pyx_k_pitchInBytes_2[] = "pitchInBytes";
static const char __pyx_k_poriginalGraph[] = "poriginalGraph";
static const char __pyx_k_ppCudaResource[] = "ppCudaResource";
static const char __pyx_k_pydependencies[] = "pydependencies";
static const char __pyx_k_pyoptionValues[] = "pyoptionValues";
static const char __pyx_k_pypCudaDevices[] = "pypCudaDevices";
static const char __pyx_k_regsPerBlock_2[] = "regsPerBlock";
static const char __pyx_k_resourceType_2[] = "resourceType";
static const char __pyx_k_sharedMemBytes[] = "sharedMemBytes : ";
static const char __pyx_k_textureAlign_2[] = "textureAlign";
static const char __pyx_k_vaSpaceToken_2[] = "vaSpaceToken";
static const char __pyx_k_voidStarHelper[] = "voidStarHelper";
static const char __pyx_k_CU_CTX_MAP_HOST[] = "CU_CTX_MAP_HOST";
static const char __pyx_k_CU_JIT_PREC_DIV[] = "CU_JIT_PREC_DIV";
static const char __pyx_k_CUdevice_getPtr[] = "CUdevice.getPtr";
static const char __pyx_k_CUgraphNodeType[] = "CUgraphNodeType";
static const char __pyx_k_CUhostFn_getPtr[] = "CUhostFn.getPtr";
static const char __pyx_k_CUjit_cacheMode[] = "CUjit_cacheMode";
static const char __pyx_k_CUmemAccessDesc[] = "CUmemAccessDesc";
static const char __pyx_k_CUmemHandleType[] = "CUmemHandleType";
static const char __pyx_k_CUmodule_getPtr[] = "CUmodule.getPtr";
static const char __pyx_k_CUstream_getPtr[] = "CUstream.getPtr";
static const char __pyx_k_CUsurfObject_v1[] = "<CUsurfObject_v1 ";
static const char __pyx_k_CUtexref_getPtr[] = "CUtexref.getPtr";
static const char __pyx_k_VdpVideoSurface[] = "<VdpVideoSurface ";
static const char __pyx_k_accessDescCount[] = "accessDescCount : ";
static const char __pyx_k_cbufferDesc_ptr[] = "cbufferDesc_ptr";
static const char __pyx_k_ccopyParams_ptr[] = "ccopyParams_ptr";
static const char __pyx_k_cdependentNodes[] = "cdependentNodes";
static const char __pyx_k_chandle_out_ptr[] = "chandle_out_ptr";
static const char __pyx_k_cmipmapDesc_ptr[] = "cmipmapDesc_ptr";
static const char __pyx_k_cnodeParams_ptr[] = "cnodeParams_ptr";
static const char __pyx_k_compressionType[] = "compressionType : ";
static const char __pyx_k_cuArray3DCreate[] = "cuArray3DCreate";
static const char __pyx_k_cuArrayGetPlane[] = "cuArrayGetPlane";
static const char __pyx_k_cuCtxGetCurrent[] = "cuCtxGetCurrent";
static const char __pyx_k_cuCtxPopCurrent[] = "cuCtxPopCurrent";
static const char __pyx_k_cuCtxSetCurrent[] = "cuCtxSetCurrent";
static const char __pyx_k_cuDeviceGetLuid[] = "cuDeviceGetLuid";
static const char __pyx_k_cuDeviceGetName[] = "cuDeviceGetName";
static const char __pyx_k_cuDeviceGetUuid[] = "cuDeviceGetUuid";
static const char __pyx_k_cuFuncGetModule[] = "cuFuncGetModule";
static const char __pyx_k_cuGraphGetEdges[] = "cuGraphGetEdges";
static const char __pyx_k_cuGraphGetNodes[] = "cuGraphGetNodes";
static const char __pyx_k_cuMemAllocAsync[] = "cuMemAllocAsync";
static const char __pyx_k_cuMemAllocPitch[] = "cuMemAllocPitch";
static const char __pyx_k_cuMemPoolCreate[] = "cuMemPoolCreate";
static const char __pyx_k_cuMemPoolTrimTo[] = "cuMemPoolTrimTo";
static const char __pyx_k_cuMemcpy2DAsync[] = "cuMemcpy2DAsync";
static const char __pyx_k_cuMemcpy3DAsync[] = "cuMemcpy3DAsync";
static const char __pyx_k_cuMemsetD8Async[] = "cuMemsetD8Async";
static const char __pyx_k_cuProfilerStart[] = "cuProfilerStart";
static const char __pyx_k_cuStreamDestroy[] = "cuStreamDestroy";
static const char __pyx_k_cuTexRefDestroy[] = "cuTexRefDestroy";
static const char __pyx_k_cudaDeviceCount[] = "cudaDeviceCount";
static const char __pyx_k_deviceBitMask_2[] = "deviceBitMask";
static const char __pyx_k_dstMemoryType_2[] = "dstMemoryType";
static const char __pyx_k_dynamicSMemSize[] = "dynamicSMemSize";
static const char __pyx_k_dynamicSmemSize[] = "dynamicSmemSize";
static const char __pyx_k_hMipmappedArray[] = "hMipmappedArray : ";
static const char __pyx_k_initialRefcount[] = "initialRefcount";
static const char __pyx_k_lastMipmapLevel[] = "lastMipmapLevel : ";
static const char __pyx_k_maxAnisotropy_2[] = "maxAnisotropy";
static const char __pyx_k_maxThreadsDim_2[] = "maxThreadsDim";
static const char __pyx_k_memHandleType_2[] = "memHandleType";
static const char __pyx_k_memoryBarrier_2[] = "memoryBarrier";
static const char __pyx_k_mipmapLevelBias[] = "mipmapLevelBias : ";
static const char __pyx_k_numDependencies[] = "numDependencies";
static const char __pyx_k_numMipmapLevels[] = "numMipmapLevels";
static const char __pyx_k_pMipmappedArray[] = "pMipmappedArray";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_srcMemoryType_2[] = "srcMemoryType";
static const char __pyx_k_subresourceType[] = "subresourceType : ";
static const char __pyx_k_CUDA_MEMCPY2D_st[] = "CUDA_MEMCPY2D_st";
static const char __pyx_k_CUDA_MEMCPY2D_v2[] = "CUDA_MEMCPY2D_v2";
static const char __pyx_k_CUDA_MEMCPY3D_st[] = "CUDA_MEMCPY3D_st";
static const char __pyx_k_CUDA_MEMCPY3D_v2[] = "CUDA_MEMCPY3D_v2";
static const char __pyx_k_CU_EVENT_DEFAULT[] = "CU_EVENT_DEFAULT";
static const char __pyx_k_CU_JIT_INPUT_PTX[] = "CU_JIT_INPUT_PTX";
static const char __pyx_k_CU_JIT_PREC_SQRT[] = "CU_JIT_PREC_SQRT";
static const char __pyx_k_CU_JIT_WALL_TIME[] = "CU_JIT_WALL_TIME";
static const char __pyx_k_CU_PREFER_BINARY[] = "CU_PREFER_BINARY";
static const char __pyx_k_CU_STREAM_LEGACY[] = "CU_STREAM_LEGACY";
static const char __pyx_k_CUaccessProperty[] = "CUaccessProperty";
static const char __pyx_k_CUcontext_getPtr[] = "CUcontext.getPtr";
static const char __pyx_k_CUdeviceptr_v2_2[] = "CUdeviceptr_v2";
static const char __pyx_k_CUeglColorFormat[] = "CUeglColorFormat";
static const char __pyx_k_CUexternalMemory[] = "<CUexternalMemory ";
static const char __pyx_k_CUipcEventHandle[] = "CUipcEventHandle";
static const char __pyx_k_CUmemLocation_st[] = "CUmemLocation_st";
static const char __pyx_k_CUmemLocation_v1[] = "CUmemLocation_v1";
static const char __pyx_k_CUmipmappedArray[] = "<CUmipmappedArray ";
static const char __pyx_k_CUstreamCallback[] = "<CUstreamCallback ";
static const char __pyx_k_CUsurfref_getPtr[] = "CUsurfref.getPtr";
static const char __pyx_k_CUtexObject_v1_2[] = "CUtexObject_v1";
static const char __pyx_k_CUuuid_st_getPtr[] = "CUuuid_st.getPtr";
static const char __pyx_k_ElementSizeBytes[] = "ElementSizeBytes";
static const char __pyx_k_Event_wait_flags[] = "\n    Event wait flags\n    ";
static const char __pyx_k_Graph_node_types[] = "\n    Graph node types\n    ";
static const char __pyx_k_VdpDevice_getPtr[] = "VdpDevice.getPtr";
static const char __pyx_k_VdpOutputSurface[] = "<VdpOutputSurface ";
static const char __pyx_k_chMipmappedArray[] = "chMipmappedArray";
static const char __pyx_k_cl_context_flags[] = "cl_context_flags";
static const char __pyx_k_cshareableHandle[] = "cshareableHandle";
static const char __pyx_k_cuCtxPushCurrent[] = "cuCtxPushCurrent";
static const char __pyx_k_cuCtxSynchronize[] = "cuCtxSynchronize";
static const char __pyx_k_cuDeviceGetCount[] = "cuDeviceGetCount";
static const char __pyx_k_cuDeviceTotalMem[] = "cuDeviceTotalMem";
static const char __pyx_k_cuGetErrorString[] = "cuGetErrorString";
static const char __pyx_k_cuGetExportTable[] = "cuGetExportTable";
static const char __pyx_k_cuGetProcAddress[] = "cuGetProcAddress";
static const char __pyx_k_cuLaunchHostFunc[] = "cuLaunchHostFunc";
static const char __pyx_k_cuLaunchKernelEx[] = "cuLaunchKernelEx";
static const char __pyx_k_cuMemAddressFree[] = "cuMemAddressFree";
static const char __pyx_k_cuMemPoolDestroy[] = "cuMemPoolDestroy";
static const char __pyx_k_cuMemsetD16Async[] = "cuMemsetD16Async";
static const char __pyx_k_cuMemsetD32Async[] = "cuMemsetD32Async";
static const char __pyx_k_cuModuleLoadData[] = "cuModuleLoadData";
static const char __pyx_k_cuParamSetTexRef[] = "cuParamSetTexRef";
static const char __pyx_k_cuStreamGetFlags[] = "cuStreamGetFlags";
static const char __pyx_k_cuTexRefGetArray[] = "cuTexRefGetArray";
static const char __pyx_k_cuTexRefGetFlags[] = "cuTexRefGetFlags";
static const char __pyx_k_cuTexRefSetArray[] = "cuTexRefSetArray";
static const char __pyx_k_cuTexRefSetFlags[] = "cuTexRefSetFlags";
static const char __pyx_k_cuVDPAUCtxCreate[] = "cuVDPAUCtxCreate";
static const char __pyx_k_cuVDPAUGetDevice[] = "cuVDPAUGetDevice";
static const char __pyx_k_eglColorFormat_2[] = "eglColorFormat";
static const char __pyx_k_firstMipmapLevel[] = "firstMipmapLevel : ";
static const char __pyx_k_greatestPriority[] = "greatestPriority";
static const char __pyx_k_launchParamsList[] = "launchParamsList";
static const char __pyx_k_memOperationType[] = "memOperationType : ";
static const char __pyx_k_mipmapFilterMode[] = "mipmapFilterMode : ";
static const char __pyx_k_nvSciBufObject_2[] = "nvSciBufObject";
static const char __pyx_k_pArrayDescriptor[] = "pArrayDescriptor";
static const char __pyx_k_pCudaDeviceCount[] = "pCudaDeviceCount";
static const char __pyx_k_phMipmappedArray[] = "phMipmappedArray";
static const char __pyx_k_pydependentNodes[] = "pydependentNodes";
static const char __pyx_k_sharedMemBytes_2[] = "sharedMemBytes";
static const char __pyx_k_sparseProperties[] = "sparseProperties";
static const char __pyx_k_updateResult_out[] = "updateResult_out";
static const char __pyx_k_CUDA_ERROR_ASSERT[] = "CUDA_ERROR_ASSERT";
static const char __pyx_k_CUDA_TEXTURE_DESC[] = "CUDA_TEXTURE_DESC";
static const char __pyx_k_CU_AD_FORMAT_HALF[] = "CU_AD_FORMAT_HALF";
static const char __pyx_k_CU_AD_FORMAT_NV12[] = "CU_AD_FORMAT_NV12";
static const char __pyx_k_CU_CTX_FLAGS_MASK[] = "CU_CTX_FLAGS_MASK";
static const char __pyx_k_CU_CTX_SCHED_AUTO[] = "CU_CTX_SCHED_AUTO";
static const char __pyx_k_CU_CTX_SCHED_MASK[] = "CU_CTX_SCHED_MASK";
static const char __pyx_k_CU_CTX_SCHED_SPIN[] = "CU_CTX_SCHED_SPIN";
static const char __pyx_k_CU_DEVICE_INVALID[] = "CU_DEVICE_INVALID";
static const char __pyx_k_CU_JIT_CACHE_MODE[] = "CU_JIT_CACHE_MODE";
static const char __pyx_k_CU_JIT_INPUT_NVVM[] = "CU_JIT_INPUT_NVVM";
static const char __pyx_k_CU_STREAM_DEFAULT[] = "CU_STREAM_DEFAULT";
static const char __pyx_k_CUarrayMapInfo_st[] = "CUarrayMapInfo_st";
static const char __pyx_k_CUarrayMapInfo_v1[] = "CUarrayMapInfo_v1";
static const char __pyx_k_CUfunction_getPtr[] = "CUfunction.getPtr";
static const char __pyx_k_CUipcMemHandle_st[] = "CUipcMemHandle_st";
static const char __pyx_k_CUipcMemHandle_v1[] = "CUipcMemHandle_v1";
static const char __pyx_k_CUlaunchAttribute[] = "CUlaunchAttribute";
static const char __pyx_k_CUlaunchConfig_st[] = "CUlaunchConfig_st";
static const char __pyx_k_CUmemAccess_flags[] = "CUmemAccess_flags";
static const char __pyx_k_CUmemAttach_flags[] = "CUmemAttach_flags";
static const char __pyx_k_CUmemLocationType[] = "CUmemLocationType";
static const char __pyx_k_CUmemPoolProps_st[] = "CUmemPoolProps_st";
static const char __pyx_k_CUmemPoolProps_v1[] = "CUmemPoolProps_v1";
static const char __pyx_k_CUoccupancy_flags[] = "CUoccupancy_flags";
static const char __pyx_k_CUshared_carveout[] = "CUshared_carveout";
static const char __pyx_k_CUstreamAttrValue[] = "CUstreamAttrValue";
static const char __pyx_k_CUsurfObject_v1_2[] = "CUsurfObject_v1";
static const char __pyx_k_Device_properties[] = "\n    Device properties\n    ";
static const char __pyx_k_EGLSyncKHR_getPtr[] = "EGLSyncKHR.getPtr";
static const char __pyx_k_Event_sched_flags[] = "\n    Event sched flags\n    ";
static const char __pyx_k_List_is_too_small[] = "List is too small: ";
static const char __pyx_k_VdpGetProcAddress[] = "<VdpGetProcAddress ";
static const char __pyx_k_VdpVideoSurface_2[] = "VdpVideoSurface";
static const char __pyx_k_accessDescCount_2[] = "accessDescCount";
static const char __pyx_k_captureStatus_out[] = "captureStatus_out";
static const char __pyx_k_cdependencies_out[] = "cdependencies_out";
static const char __pyx_k_claunchParamsList[] = "claunchParamsList";
static const char __pyx_k_cmemsetParams_ptr[] = "cmemsetParams_ptr";
static const char __pyx_k_compressionType_2[] = "compressionType";
static const char __pyx_k_cpResViewDesc_ptr[] = "cpResViewDesc_ptr";
static const char __pyx_k_cuGraphExecUpdate[] = "cuGraphExecUpdate";
static const char __pyx_k_cuIpcGetMemHandle[] = "cuIpcGetMemHandle";
static const char __pyx_k_cuLaunchGridAsync[] = "cuLaunchGridAsync";
static const char __pyx_k_cuMemAllocManaged[] = "cuMemAllocManaged";
static const char __pyx_k_cuMemHostGetFlags[] = "cuMemHostGetFlags";
static const char __pyx_k_cuMemHostRegister[] = "cuMemHostRegister";
static const char __pyx_k_cuMemcpyAtoHAsync[] = "cuMemcpyAtoHAsync";
static const char __pyx_k_cuMemcpyDtoDAsync[] = "cuMemcpyDtoDAsync";
static const char __pyx_k_cuMemcpyDtoHAsync[] = "cuMemcpyDtoHAsync";
static const char __pyx_k_cuMemcpyHtoAAsync[] = "cuMemcpyHtoAAsync";
static const char __pyx_k_cuMemcpyHtoDAsync[] = "cuMemcpyHtoDAsync";
static const char __pyx_k_cuMemcpyPeerAsync[] = "cuMemcpyPeerAsync";
static const char __pyx_k_cuMemsetD2D8Async[] = "cuMemsetD2D8Async";
static const char __pyx_k_cuModuleGetGlobal[] = "cuModuleGetGlobal";
static const char __pyx_k_cuModuleGetTexRef[] = "cuModuleGetTexRef";
static const char __pyx_k_cuStreamWaitEvent[] = "cuStreamWaitEvent";
static const char __pyx_k_cuSurfRefGetArray[] = "cuSurfRefGetArray";
static const char __pyx_k_cuSurfRefSetArray[] = "cuSurfRefSetArray";
static const char __pyx_k_cuTexObjectCreate[] = "cuTexObjectCreate";
static const char __pyx_k_cuTexRefGetFormat[] = "cuTexRefGetFormat";
static const char __pyx_k_cuTexRefSetFormat[] = "cuTexRefSetFormat";
static const char __pyx_k_cuuint32_t_getPtr[] = "cuuint32_t.getPtr";
static const char __pyx_k_cuuint64_t_getPtr[] = "cuuint64_t.getPtr";
static const char __pyx_k_flushRemoteWrites[] = "flushRemoteWrites :\n";
static const char __pyx_k_hMipmappedArray_2[] = "hMipmappedArray";
static const char __pyx_k_lastMipmapLevel_2[] = "lastMipmapLevel";
static const char __pyx_k_mipmapLevelBias_2[] = "mipmapLevelBias";
static const char __pyx_k_miptailFirstLevel[] = "miptailFirstLevel : ";
static const char __pyx_k_numDependentNodes[] = "numDependentNodes";
static const char __pyx_k_nvSciSyncAttrList[] = "nvSciSyncAttrList";
static const char __pyx_k_programmaticEvent[] = "programmaticEvent :\n";
static const char __pyx_k_sharedMemPerBlock[] = "sharedMemPerBlock : ";
static const char __pyx_k_subresourceType_2[] = "subresourceType";
static const char __pyx_k_vdpGetProcAddress[] = "vdpGetProcAddress";
static const char __pyx_k_CUDA_ERROR_TIMEOUT[] = "CUDA_ERROR_TIMEOUT";
static const char __pyx_k_CUDA_ERROR_UNKNOWN[] = "CUDA_ERROR_UNKNOWN";
static const char __pyx_k_CUDA_Ipc_Mem_Flags[] = "\n    CUDA Ipc Mem Flags\n    ";
static const char __pyx_k_CUDA_LAUNCH_PARAMS[] = "CUDA_LAUNCH_PARAMS";
static const char __pyx_k_CUDA_MEMCPY3D_PEER[] = "CUDA_MEMCPY3D_PEER";
static const char __pyx_k_CUDA_RESOURCE_DESC[] = "CUDA_RESOURCE_DESC";
static const char __pyx_k_CU_AD_FORMAT_FLOAT[] = "CU_AD_FORMAT_FLOAT";
static const char __pyx_k_CU_CTX_SCHED_YIELD[] = "CU_CTX_SCHED_YIELD";
static const char __pyx_k_CU_IPC_HANDLE_SIZE[] = "CU_IPC_HANDLE_SIZE";
static const char __pyx_k_CU_JIT_INPUT_CUBIN[] = "CU_JIT_INPUT_CUBIN";
static const char __pyx_k_CU_JIT_LOG_VERBOSE[] = "CU_JIT_LOG_VERBOSE";
static const char __pyx_k_CU_JIT_NUM_OPTIONS[] = "CU_JIT_NUM_OPTIONS";
static const char __pyx_k_CU_MEMORYTYPE_HOST[] = "CU_MEMORYTYPE_HOST";
static const char __pyx_k_CU_MEM_ATTACH_HOST[] = "CU_MEM_ATTACH_HOST";
static const char __pyx_k_CUdevice_attribute[] = "CUdevice_attribute";
static const char __pyx_k_CUdevice_v1_getPtr[] = "CUdevice_v1.getPtr";
static const char __pyx_k_CUdeviceptr_getPtr[] = "CUdeviceptr.getPtr";
static const char __pyx_k_CUevent_wait_flags[] = "CUevent_wait_flags";
static const char __pyx_k_CUexecAffinityType[] = "CUexecAffinityType";
static const char __pyx_k_CUexternalMemory_2[] = "CUexternalMemory";
static const char __pyx_k_CUgraphExec_getPtr[] = "CUgraphExec.getPtr";
static const char __pyx_k_CUgraphNode_getPtr[] = "CUgraphNode.getPtr";
static const char __pyx_k_CUgraphicsResource[] = "<CUgraphicsResource ";
static const char __pyx_k_CUkernelNodeAttrID[] = "CUkernelNodeAttrID";
static const char __pyx_k_CUlinkState_getPtr[] = "CUlinkState.getPtr";
static const char __pyx_k_CUmemAccessDesc_st[] = "CUmemAccessDesc_st";
static const char __pyx_k_CUmemAccessDesc_v1[] = "CUmemAccessDesc_v1";
static const char __pyx_k_CUmemOperationType[] = "CUmemOperationType";
static const char __pyx_k_CUmipmappedArray_2[] = "CUmipmappedArray";
static const char __pyx_k_CUoccupancyB2DSize[] = "<CUoccupancyB2DSize ";
static const char __pyx_k_CUstreamCallback_2[] = "CUstreamCallback";
static const char __pyx_k_CUtexObject_getPtr[] = "CUtexObject.getPtr";
static const char __pyx_k_CUuserObject_flags[] = "CUuserObject_flags";
static const char __pyx_k_EGLImageKHR_getPtr[] = "EGLImageKHR.getPtr";
static const char __pyx_k_Event_record_flags[] = "\n    Event record flags\n    ";
static const char __pyx_k_VdpOutputSurface_2[] = "VdpOutputSurface";
static const char __pyx_k_accessPolicyWindow[] = "accessPolicyWindow :\n";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_cmemHandleDesc_ptr[] = "cmemHandleDesc_ptr";
static const char __pyx_k_cnvSciSyncAttrList[] = "cnvSciSyncAttrList";
static const char __pyx_k_csemHandleDesc_ptr[] = "csemHandleDesc_ptr";
static const char __pyx_k_cuCtxGetApiVersion[] = "cuCtxGetApiVersion";
static const char __pyx_k_cuDeviceGetMemPool[] = "cuDeviceGetMemPool";
static const char __pyx_k_cuDeviceGetUuid_v2[] = "cuDeviceGetUuid_v2";
static const char __pyx_k_cuDeviceSetMemPool[] = "cuDeviceSetMemPool";
static const char __pyx_k_cuDriverGetVersion[] = "cuDriverGetVersion";
static const char __pyx_k_cuEventElapsedTime[] = "cuEventElapsedTime";
static const char __pyx_k_cuEventSynchronize[] = "cuEventSynchronize";
static const char __pyx_k_cuFuncGetAttribute[] = "cuFuncGetAttribute";
static const char __pyx_k_cuFuncSetAttribute[] = "cuFuncSetAttribute";
static const char __pyx_k_cuGraphAddHostNode[] = "cuGraphAddHostNode";
static const char __pyx_k_cuGraphDestroyNode[] = "cuGraphDestroyNode";
static const char __pyx_k_cuGraphExecDestroy[] = "cuGraphExecDestroy";
static const char __pyx_k_cuGraphInstantiate[] = "cuGraphInstantiate";
static const char __pyx_k_cuGraphNodeGetType[] = "cuGraphNodeGetType";
static const char __pyx_k_cuIpcOpenMemHandle[] = "cuIpcOpenMemHandle";
static const char __pyx_k_cuMemMapArrayAsync[] = "cuMemMapArrayAsync";
static const char __pyx_k_cuMemPoolGetAccess[] = "cuMemPoolGetAccess";
static const char __pyx_k_cuMemPoolSetAccess[] = "cuMemPoolSetAccess";
static const char __pyx_k_cuMemPrefetchAsync[] = "cuMemPrefetchAsync";
static const char __pyx_k_cuMemsetD2D16Async[] = "cuMemsetD2D16Async";
static const char __pyx_k_cuMemsetD2D32Async[] = "cuMemsetD2D32Async";
static const char __pyx_k_cuModuleGetSurfRef[] = "cuModuleGetSurfRef";
static const char __pyx_k_cuModuleLoadDataEx[] = "cuModuleLoadDataEx";
static const char __pyx_k_cuStreamBatchMemOp[] = "cuStreamBatchMemOp";
static const char __pyx_k_cuStreamEndCapture[] = "cuStreamEndCapture";
static const char __pyx_k_cuSurfObjectCreate[] = "cuSurfObjectCreate";
static const char __pyx_k_cuTexObjectDestroy[] = "cuTexObjectDestroy";
static const char __pyx_k_cuTexRefGetAddress[] = "cuTexRefGetAddress";
static const char __pyx_k_cuTexRefSetAddress[] = "cuTexRefSetAddress";
static const char __pyx_k_cuUserObjectCreate[] = "cuUserObjectCreate";
static const char __pyx_k_cuUserObjectRetain[] = "cuUserObjectRetain";
static const char __pyx_k_cvdpGetProcAddress[] = "cvdpGetProcAddress";
static const char __pyx_k_firstMipmapLevel_2[] = "firstMipmapLevel";
static const char __pyx_k_maxThreadsPerBlock[] = "maxThreadsPerBlock : ";
static const char __pyx_k_maxWidthInElements[] = "maxWidthInElements";
static const char __pyx_k_memOperationType_2[] = "memOperationType";
static const char __pyx_k_memoryRequirements[] = "memoryRequirements";
static const char __pyx_k_mipmapFilterMode_2[] = "mipmapFilterMode";
static const char __pyx_k_pvdpGetProcAddress[] = "pvdpGetProcAddress";
static const char __pyx_k_pydependencies_out[] = "pydependencies_out";
static const char __pyx_k_CUDA_ARRAY3D_SPARSE[] = "CUDA_ARRAY3D_SPARSE";
static const char __pyx_k_CU_EVENT_SCHED_AUTO[] = "CU_EVENT_SCHED_AUTO";
static const char __pyx_k_CU_EVENT_SCHED_SPIN[] = "CU_EVENT_SCHED_SPIN";
static const char __pyx_k_CU_JIT_FAST_COMPILE[] = "CU_JIT_FAST_COMPILE";
static const char __pyx_k_CU_JIT_INPUT_OBJECT[] = "CU_JIT_INPUT_OBJECT";
static const char __pyx_k_CU_JIT_NEW_SM3X_OPT[] = "CU_JIT_NEW_SM3X_OPT";
static const char __pyx_k_CU_LAUNCH_PARAM_END[] = "CU_LAUNCH_PARAM_END";
static const char __pyx_k_CU_LIMIT_STACK_SIZE[] = "CU_LIMIT_STACK_SIZE";
static const char __pyx_k_CU_MEMORYTYPE_ARRAY[] = "CU_MEMORYTYPE_ARRAY";
static const char __pyx_k_CU_PARAM_TR_DEFAULT[] = "CU_PARAM_TR_DEFAULT";
static const char __pyx_k_CU_SYNC_POLICY_AUTO[] = "CU_SYNC_POLICY_AUTO";
static const char __pyx_k_CU_SYNC_POLICY_SPIN[] = "CU_SYNC_POLICY_SPIN";
static const char __pyx_k_CUdevprop_st_getPtr[] = "CUdevprop_st.getPtr";
static const char __pyx_k_CUevent_sched_flags[] = "CUevent_sched_flags";
static const char __pyx_k_CUexecAffinityParam[] = "CUexecAffinityParam";
static const char __pyx_k_CUexternalSemaphore[] = "<CUexternalSemaphore ";
static const char __pyx_k_CUipcEventHandle_st[] = "CUipcEventHandle_st";
static const char __pyx_k_CUipcEventHandle_v1[] = "CUipcEventHandle_v1";
static const char __pyx_k_CUlaunchAttributeID[] = "CUlaunchAttributeID";
static const char __pyx_k_CUmemAllocationProp[] = "CUmemAllocationProp";
static const char __pyx_k_CUmemAllocationType[] = "CUmemAllocationType";
static const char __pyx_k_CUmemPool_attribute[] = "CUmemPool_attribute";
static const char __pyx_k_CUmemoryPool_getPtr[] = "CUmemoryPool.getPtr";
static const char __pyx_k_CUmoduleLoadingMode[] = "CUmoduleLoadingMode";
static const char __pyx_k_CUpointer_attribute[] = "CUpointer_attribute";
static const char __pyx_k_CUstreamCaptureMode[] = "CUstreamCaptureMode";
static const char __pyx_k_CUsurfObject_getPtr[] = "CUsurfObject.getPtr";
static const char __pyx_k_CUuserObject_getPtr[] = "CUuserObject.getPtr";
static const char __pyx_k_Device_code_formats[] = "\n    Device code formats\n    ";
static const char __pyx_k_EGLStreamKHR_getPtr[] = "EGLStreamKHR.getPtr";
static const char __pyx_k_Function_properties[] = "\n    Function properties\n    ";
static const char __pyx_k_Memory_handle_types[] = "\n    Memory handle types\n    ";
static const char __pyx_k_NVCL_CTX_SCHED_AUTO[] = "NVCL_CTX_SCHED_AUTO";
static const char __pyx_k_NVCL_CTX_SCHED_SPIN[] = "NVCL_CTX_SCHED_SPIN";
static const char __pyx_k_NumPackedComponents[] = "NumPackedComponents";
static const char __pyx_k_Pointer_information[] = "\n    Pointer information\n    ";
static const char __pyx_k_VdpGetProcAddress_2[] = "VdpGetProcAddress";
static const char __pyx_k_cpAllocateArray_ptr[] = "cpAllocateArray_ptr";
static const char __pyx_k_cpExportTableId_ptr[] = "cpExportTableId_ptr";
static const char __pyx_k_cuCtxGetCacheConfig[] = "cuCtxGetCacheConfig";
static const char __pyx_k_cuCtxSetCacheConfig[] = "cuCtxSetCacheConfig";
static const char __pyx_k_cuDeviceGetPCIBusId[] = "cuDeviceGetPCIBusId";
static const char __pyx_k_cuFuncSetBlockShape[] = "cuFuncSetBlockShape";
static const char __pyx_k_cuFuncSetSharedSize[] = "cuFuncSetSharedSize";
static const char __pyx_k_cuGraphAddEmptyNode[] = "cuGraphAddEmptyNode";
static const char __pyx_k_cuGraphGetRootNodes[] = "cuGraphGetRootNodes";
static const char __pyx_k_cuIpcCloseMemHandle[] = "cuIpcCloseMemHandle";
static const char __pyx_k_cuIpcGetEventHandle[] = "cuIpcGetEventHandle";
static const char __pyx_k_cuMemAddressReserve[] = "cuMemAddressReserve";
static const char __pyx_k_cuMemHostUnregister[] = "cuMemHostUnregister";
static const char __pyx_k_cuMemcpy2DUnaligned[] = "cuMemcpy2DUnaligned";
static const char __pyx_k_cuMemcpy3DPeerAsync[] = "cuMemcpy3DPeerAsync";
static const char __pyx_k_cuModuleGetFunction[] = "cuModuleGetFunction";
static const char __pyx_k_cuStreamAddCallback[] = "cuStreamAddCallback";
static const char __pyx_k_cuStreamGetPriority[] = "cuStreamGetPriority";
static const char __pyx_k_cuStreamIsCapturing[] = "cuStreamIsCapturing";
static const char __pyx_k_cuStreamSynchronize[] = "cuStreamSynchronize";
static const char __pyx_k_cuStreamWaitValue32[] = "cuStreamWaitValue32";
static const char __pyx_k_cuStreamWaitValue64[] = "cuStreamWaitValue64";
static const char __pyx_k_cuSurfObjectDestroy[] = "cuSurfObjectDestroy";
static const char __pyx_k_cuUserObjectRelease[] = "cuUserObjectRelease";
static const char __pyx_k_cvoidStarHelper_ptr[] = "cvoidStarHelper_ptr";
static const char __pyx_k_flushRemoteWrites_2[] = "flushRemoteWrites";
static const char __pyx_k_maxMipmapLevelClamp[] = "maxMipmapLevelClamp : ";
static const char __pyx_k_minMipmapLevelClamp[] = "minMipmapLevelClamp : ";
static const char __pyx_k_miptailFirstLevel_2[] = "miptailFirstLevel";
static const char __pyx_k_numDependencies_out[] = "numDependencies_out";
static const char __pyx_k_pMipmappedArrayDesc[] = "pMipmappedArrayDesc";
static const char __pyx_k_programmaticEvent_2[] = "programmaticEvent";
static const char __pyx_k_sharedMemPerBlock_2[] = "sharedMemPerBlock";
static const char __pyx_k_totalConstantMemory[] = "totalConstantMemory : ";
static const char __pyx_k_triggerAtBlockStart[] = "triggerAtBlockStart : ";
static const char __pyx_k_win32HandleMetaData[] = "win32HandleMetaData : ";
static const char __pyx_k_CUDA_ARRAY3D_2DARRAY[] = "CUDA_ARRAY3D_2DARRAY";
static const char __pyx_k_CUDA_ARRAY3D_CUBEMAP[] = "CUDA_ARRAY3D_CUBEMAP";
static const char __pyx_k_CUDA_ARRAY3D_LAYERED[] = "CUDA_ARRAY3D_LAYERED";
static const char __pyx_k_CUDA_ERROR_NOT_FOUND[] = "CUDA_ERROR_NOT_FOUND";
static const char __pyx_k_CUDA_ERROR_NOT_READY[] = "CUDA_ERROR_NOT_READY";
static const char __pyx_k_CUDA_ERROR_NO_DEVICE[] = "CUDA_ERROR_NO_DEVICE";
static const char __pyx_k_CUDA_TEXTURE_DESC_st[] = "CUDA_TEXTURE_DESC_st";
static const char __pyx_k_CUDA_TEXTURE_DESC_v1[] = "CUDA_TEXTURE_DESC_v1";
static const char __pyx_k_CU_CTX_BLOCKING_SYNC[] = "CU_CTX_BLOCKING_SYNC";
static const char __pyx_k_CU_EVENT_SCHED_YIELD[] = "CU_EVENT_SCHED_YIELD";
static const char __pyx_k_CU_JIT_INPUT_LIBRARY[] = "CU_JIT_INPUT_LIBRARY";
static const char __pyx_k_CU_JIT_MAX_REGISTERS[] = "CU_JIT_MAX_REGISTERS";
static const char __pyx_k_CU_MEMORYTYPE_DEVICE[] = "CU_MEMORYTYPE_DEVICE";
static const char __pyx_k_CU_MEM_ATTACH_GLOBAL[] = "CU_MEM_ATTACH_GLOBAL";
static const char __pyx_k_CU_MEM_ATTACH_SINGLE[] = "CU_MEM_ATTACH_SINGLE";
static const char __pyx_k_CU_OCCUPANCY_DEFAULT[] = "CU_OCCUPANCY_DEFAULT";
static const char __pyx_k_CU_STREAM_PER_THREAD[] = "CU_STREAM_PER_THREAD";
static const char __pyx_k_CU_SYNC_POLICY_YIELD[] = "CU_SYNC_POLICY_YIELD";
static const char __pyx_k_CU_TARGET_COMPUTE_30[] = "CU_TARGET_COMPUTE_30";
static const char __pyx_k_CU_TARGET_COMPUTE_32[] = "CU_TARGET_COMPUTE_32";
static const char __pyx_k_CU_TARGET_COMPUTE_35[] = "CU_TARGET_COMPUTE_35";
static const char __pyx_k_CU_TARGET_COMPUTE_37[] = "CU_TARGET_COMPUTE_37";
static const char __pyx_k_CU_TARGET_COMPUTE_50[] = "CU_TARGET_COMPUTE_50";
static const char __pyx_k_CU_TARGET_COMPUTE_52[] = "CU_TARGET_COMPUTE_52";
static const char __pyx_k_CU_TARGET_COMPUTE_53[] = "CU_TARGET_COMPUTE_53";
static const char __pyx_k_CU_TARGET_COMPUTE_60[] = "CU_TARGET_COMPUTE_60";
static const char __pyx_k_CU_TARGET_COMPUTE_61[] = "CU_TARGET_COMPUTE_61";
static const char __pyx_k_CU_TARGET_COMPUTE_62[] = "CU_TARGET_COMPUTE_62";
static const char __pyx_k_CU_TARGET_COMPUTE_70[] = "CU_TARGET_COMPUTE_70";
static const char __pyx_k_CU_TARGET_COMPUTE_72[] = "CU_TARGET_COMPUTE_72";
static const char __pyx_k_CU_TARGET_COMPUTE_75[] = "CU_TARGET_COMPUTE_75";
static const char __pyx_k_CU_TARGET_COMPUTE_80[] = "CU_TARGET_COMPUTE_80";
static const char __pyx_k_CU_TARGET_COMPUTE_86[] = "CU_TARGET_COMPUTE_86";
static const char __pyx_k_CU_TARGET_COMPUTE_87[] = "CU_TARGET_COMPUTE_87";
static const char __pyx_k_CU_TARGET_COMPUTE_89[] = "CU_TARGET_COMPUTE_89";
static const char __pyx_k_CUaccessPolicyWindow[] = "CUaccessPolicyWindow";
static const char __pyx_k_CUarray_cubemap_face[] = "CUarray_cubemap_face";
static const char __pyx_k_CUeglFrame_st_getPtr[] = "CUeglFrame_st.getPtr";
static const char __pyx_k_CUevent_record_flags[] = "CUevent_record_flags";
static const char __pyx_k_CUfunction_attribute[] = "CUfunction_attribute";
static const char __pyx_k_CUgraphMem_attribute[] = "CUgraphMem_attribute";
static const char __pyx_k_CUgraphicsResource_2[] = "CUgraphicsResource";
static const char __pyx_k_CUlaunchAttribute_st[] = "CUlaunchAttribute_st";
static const char __pyx_k_CUmemRangeHandleType[] = "CUmemRangeHandleType";
static const char __pyx_k_CUoccupancyB2DSize_2[] = "CUoccupancyB2DSize";
static const char __pyx_k_CUresourceViewFormat[] = "CUresourceViewFormat";
static const char __pyx_k_CUstreamAttrValue_v1[] = "CUstreamAttrValue_v1";
static const char __pyx_k_Event_creation_flags[] = "\n    Event creation flags\n    ";
static const char __pyx_k_Memory_advise_values[] = "\n    Memory advise values\n    ";
static const char __pyx_k_NVCL_CTX_SCHED_YIELD[] = "NVCL_CTX_SCHED_YIELD";
static const char __pyx_k_Resource_view_format[] = "\n    Resource view format\n    ";
static const char __pyx_k_accessPolicyWindow_2[] = "accessPolicyWindow";
static const char __pyx_k_cshareableHandle_ptr[] = "cshareableHandle_ptr";
static const char __pyx_k_cuArrayGetDescriptor[] = "cuArrayGetDescriptor";
static const char __pyx_k_cuCtxGetExecAffinity[] = "cuCtxGetExecAffinity";
static const char __pyx_k_cuDeviceGetAttribute[] = "cuDeviceGetAttribute";
static const char __pyx_k_cuDeviceGraphMemTrim[] = "cuDeviceGraphMemTrim";
static const char __pyx_k_cuFuncSetCacheConfig[] = "cuFuncSetCacheConfig";
static const char __pyx_k_cuGraphAddKernelNode[] = "cuGraphAddKernelNode";
static const char __pyx_k_cuGraphAddMemcpyNode[] = "cuGraphAddMemcpyNode";
static const char __pyx_k_cuGraphAddMemsetNode[] = "cuGraphAddMemsetNode";
static const char __pyx_k_cuGraphDebugDotPrint[] = "cuGraphDebugDotPrint";
static const char __pyx_k_cuIpcOpenEventHandle[] = "cuIpcOpenEventHandle";
static const char __pyx_k_cuMemGetAddressRange[] = "cuMemGetAddressRange";
static const char __pyx_k_cuProfilerInitialize[] = "cuProfilerInitialize";
static const char __pyx_k_cuStreamBeginCapture[] = "cuStreamBeginCapture";
static const char __pyx_k_cuStreamGetAttribute[] = "cuStreamGetAttribute";
static const char __pyx_k_cuStreamSetAttribute[] = "cuStreamSetAttribute";
static const char __pyx_k_cuStreamWriteValue32[] = "cuStreamWriteValue32";
static const char __pyx_k_cuStreamWriteValue64[] = "cuStreamWriteValue64";
static const char __pyx_k_cuTexRefSetAddress2D[] = "cuTexRefSetAddress2D";
static const char __pyx_k_gpuDirectRDMACapable[] = "gpuDirectRDMACapable : ";
static const char __pyx_k_maxThreadsPerBlock_2[] = "maxThreadsPerBlock";
static const char __pyx_k_pmaxMipmapLevelClamp[] = "pmaxMipmapLevelClamp";
static const char __pyx_k_pminMipmapLevelClamp[] = "pminMipmapLevelClamp";
static const char __pyx_k_requestedHandleTypes[] = "requestedHandleTypes : ";
static const char __pyx_k_CUDA_ARRAY_DESCRIPTOR[] = "CUDA_ARRAY_DESCRIPTOR";
static const char __pyx_k_CUDA_ERROR_INVALID_PC[] = "CUDA_ERROR_INVALID_PC";
static const char __pyx_k_CUDA_ERROR_MAP_FAILED[] = "CUDA_ERROR_MAP_FAILED";
static const char __pyx_k_CUDA_ERROR_NOT_MAPPED[] = "CUDA_ERROR_NOT_MAPPED";
static const char __pyx_k_CUDA_HOST_NODE_PARAMS[] = "CUDA_HOST_NODE_PARAMS";
static const char __pyx_k_CUDA_LAUNCH_PARAMS_st[] = "CUDA_LAUNCH_PARAMS_st";
static const char __pyx_k_CUDA_LAUNCH_PARAMS_v1[] = "CUDA_LAUNCH_PARAMS_v1";
static const char __pyx_k_CUDA_MEMCPY3D_PEER_st[] = "CUDA_MEMCPY3D_PEER_st";
static const char __pyx_k_CUDA_MEMCPY3D_PEER_v1[] = "CUDA_MEMCPY3D_PEER_v1";
static const char __pyx_k_CUDA_Mem_Attach_Flags[] = "\n    CUDA Mem Attach Flags\n    ";
static const char __pyx_k_CUDA_RESOURCE_DESC_st[] = "CUDA_RESOURCE_DESC_st";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1[] = "CUDA_RESOURCE_DESC_v1";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_A[] = "CU_EGL_COLOR_FORMAT_A";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_L[] = "CU_EGL_COLOR_FORMAT_L";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_R[] = "CU_EGL_COLOR_FORMAT_R";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y[] = "CU_EGL_COLOR_FORMAT_Y";
static const char __pyx_k_CU_EVENT_INTERPROCESS[] = "CU_EVENT_INTERPROCESS";
static const char __pyx_k_CU_EVENT_WAIT_DEFAULT[] = "CU_EVENT_WAIT_DEFAULT";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_MAX[] = "CU_FUNC_ATTRIBUTE_MAX";
static const char __pyx_k_CU_GL_DEVICE_LIST_ALL[] = "CU_GL_DEVICE_LIST_ALL";
static const char __pyx_k_CU_MEMORYTYPE_UNIFIED[] = "CU_MEMORYTYPE_UNIFIED";
static const char __pyx_k_CU_OUT_KEY_VALUE_PAIR[] = "CU_OUT_KEY_VALUE_PAIR";
static const char __pyx_k_CUdevice_P2PAttribute[] = "CUdevice_P2PAttribute";
static const char __pyx_k_CUdeviceptr_v2_getPtr[] = "CUdeviceptr_v2.getPtr";
static const char __pyx_k_CUeglStreamConnection[] = "<CUeglStreamConnection ";
static const char __pyx_k_CUexecAffinitySmCount[] = "CUexecAffinitySmCount";
static const char __pyx_k_CUexternalSemaphore_2[] = "CUexternalSemaphore";
static const char __pyx_k_CUgraphDebugDot_flags[] = "CUgraphDebugDot_flags";
static const char __pyx_k_CUkernelNodeAttrValue[] = "CUkernelNodeAttrValue";
static const char __pyx_k_CUmem_range_attribute[] = "CUmem_range_attribute";
static const char __pyx_k_CUstreamCaptureStatus[] = "CUstreamCaptureStatus";
static const char __pyx_k_CUtexObject_v1_getPtr[] = "CUtexObject_v1.getPtr";
static const char __pyx_k_NVCL_EVENT_SCHED_AUTO[] = "NVCL_EVENT_SCHED_AUTO";
static const char __pyx_k_NVCL_EVENT_SCHED_SPIN[] = "NVCL_EVENT_SCHED_SPIN";
static const char __pyx_k_Profiler_Output_Modes[] = "\n    Profiler Output Modes\n    ";
static const char __pyx_k_Stream_creation_flags[] = "\n    Stream creation flags\n    ";
static const char __pyx_k_cuCtxEnablePeerAccess[] = "cuCtxEnablePeerAccess";
static const char __pyx_k_cuDeviceCanAccessPeer[] = "cuDeviceCanAccessPeer";
static const char __pyx_k_cuDeviceGetByPCIBusId[] = "cuDeviceGetByPCIBusId";
static const char __pyx_k_cuDeviceGetProperties[] = "cuDeviceGetProperties";
static const char __pyx_k_cuGraphAddMemFreeNode[] = "cuGraphAddMemFreeNode";
static const char __pyx_k_cuGraphNodeGetEnabled[] = "cuGraphNodeGetEnabled";
static const char __pyx_k_cuGraphNodeSetEnabled[] = "cuGraphNodeSetEnabled";
static const char __pyx_k_cuMemPoolGetAttribute[] = "cuMemPoolGetAttribute";
static const char __pyx_k_cuMemPoolSetAttribute[] = "cuMemPoolSetAttribute";
static const char __pyx_k_cuModuleLoadFatBinary[] = "cuModuleLoadFatBinary";
static const char __pyx_k_cuPointerGetAttribute[] = "cuPointerGetAttribute";
static const char __pyx_k_cuPointerSetAttribute[] = "cuPointerSetAttribute";
static const char __pyx_k_cuStreamBatchMemOp_v2[] = "cuStreamBatchMemOp_v2";
static const char __pyx_k_cuTexRefGetFilterMode[] = "cuTexRefGetFilterMode";
static const char __pyx_k_cuTexRefSetFilterMode[] = "cuTexRefSetFilterMode";
static const char __pyx_k_maxMipmapLevelClamp_2[] = "maxMipmapLevelClamp";
static const char __pyx_k_minMipmapLevelClamp_2[] = "minMipmapLevelClamp";
static const char __pyx_k_totalConstantMemory_2[] = "totalConstantMemory";
static const char __pyx_k_triggerAtBlockStart_2[] = "triggerAtBlockStart";
static const char __pyx_k_win32HandleMetaData_2[] = "win32HandleMetaData";
static const char __pyx_k_CUDA_ERROR_INVALID_PTX[] = "CUDA_ERROR_INVALID_PTX";
static const char __pyx_k_CU_AD_FORMAT_BC1_UNORM[] = "CU_AD_FORMAT_BC1_UNORM";
static const char __pyx_k_CU_AD_FORMAT_BC2_UNORM[] = "CU_AD_FORMAT_BC2_UNORM";
static const char __pyx_k_CU_AD_FORMAT_BC3_UNORM[] = "CU_AD_FORMAT_BC3_UNORM";
static const char __pyx_k_CU_AD_FORMAT_BC4_SNORM[] = "CU_AD_FORMAT_BC4_SNORM";
static const char __pyx_k_CU_AD_FORMAT_BC4_UNORM[] = "CU_AD_FORMAT_BC4_UNORM";
static const char __pyx_k_CU_AD_FORMAT_BC5_SNORM[] = "CU_AD_FORMAT_BC5_SNORM";
static const char __pyx_k_CU_AD_FORMAT_BC5_UNORM[] = "CU_AD_FORMAT_BC5_UNORM";
static const char __pyx_k_CU_AD_FORMAT_BC6H_SF16[] = "CU_AD_FORMAT_BC6H_SF16";
static const char __pyx_k_CU_AD_FORMAT_BC6H_UF16[] = "CU_AD_FORMAT_BC6H_UF16";
static const char __pyx_k_CU_AD_FORMAT_BC7_UNORM[] = "CU_AD_FORMAT_BC7_UNORM";
static const char __pyx_k_CU_COMPUTEMODE_DEFAULT[] = "CU_COMPUTEMODE_DEFAULT";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_RG[] = "CU_EGL_COLOR_FORMAT_RG";
static const char __pyx_k_CU_EVENT_BLOCKING_SYNC[] = "CU_EVENT_BLOCKING_SYNC";
static const char __pyx_k_CU_EVENT_WAIT_EXTERNAL[] = "CU_EVENT_WAIT_EXTERNAL";
static const char __pyx_k_CU_JIT_CACHE_OPTION_CA[] = "CU_JIT_CACHE_OPTION_CA";
static const char __pyx_k_CU_JIT_CACHE_OPTION_CG[] = "CU_JIT_CACHE_OPTION_CG";
static const char __pyx_k_CU_JIT_INFO_LOG_BUFFER[] = "CU_JIT_INFO_LOG_BUFFER";
static const char __pyx_k_CU_JIT_INPUT_FATBINARY[] = "CU_JIT_INPUT_FATBINARY";
static const char __pyx_k_CU_JIT_NUM_INPUT_TYPES[] = "CU_JIT_NUM_INPUT_TYPES";
static const char __pyx_k_CU_MEM_HANDLE_TYPE_MAX[] = "CU_MEM_HANDLE_TYPE_MAX";
static const char __pyx_k_CU_MODULE_LAZY_LOADING[] = "CU_MODULE_LAZY_LOADING";
static const char __pyx_k_CU_RESOURCE_TYPE_ARRAY[] = "CU_RESOURCE_TYPE_ARRAY";
static const char __pyx_k_CU_STREAM_NON_BLOCKING[] = "CU_STREAM_NON_BLOCKING";
static const char __pyx_k_CUexecAffinityParam_st[] = "CUexecAffinityParam_st";
static const char __pyx_k_CUexecAffinityParam_v1[] = "CUexecAffinityParam_v1";
static const char __pyx_k_CUlaunchAttributeValue[] = "CUlaunchAttributeValue";
static const char __pyx_k_CUmemAllocationProp_st[] = "CUmemAllocationProp_st";
static const char __pyx_k_CUmemAllocationProp_v1[] = "CUmemAllocationProp_v1";
static const char __pyx_k_CUmemPoolPtrExportData[] = "CUmemPoolPtrExportData";
static const char __pyx_k_CUstreamBatchMemOpType[] = "CUstreamBatchMemOpType";
static const char __pyx_k_CUsurfObject_v1_getPtr[] = "CUsurfObject_v1.getPtr";
static const char __pyx_k_Caching_modes_for_dlcm[] = "\n    Caching modes for dlcm\n    ";
static const char __pyx_k_Context_creation_flags[] = "\n    Context creation flags\n    ";
static const char __pyx_k_EGLint___reduce_cython[] = "EGLint.__reduce_cython__";
static const char __pyx_k_GLenum___reduce_cython[] = "GLenum.__reduce_cython__";
static const char __pyx_k_GLuint___reduce_cython[] = "GLuint.__reduce_cython__";
static const char __pyx_k_Memory_operation_types[] = "\n    Memory operation types\n    ";
static const char __pyx_k_NVCL_EVENT_SCHED_YIELD[] = "NVCL_EVENT_SCHED_YIELD";
static const char __pyx_k_VdpVideoSurface_getPtr[] = "VdpVideoSurface.getPtr";
static const char __pyx_k_cnvSciSyncAttrList_ptr[] = "cnvSciSyncAttrList_ptr";
static const char __pyx_k_cuArray3DGetDescriptor[] = "cuArray3DGetDescriptor";
static const char __pyx_k_cuCtxDisablePeerAccess[] = "cuCtxDisablePeerAccess";
static const char __pyx_k_cuEventRecordWithFlags[] = "cuEventRecordWithFlags";
static const char __pyx_k_cuGraphAddDependencies[] = "cuGraphAddDependencies";
static const char __pyx_k_cuGraphAddMemAllocNode[] = "cuGraphAddMemAllocNode";
static const char __pyx_k_cuGraphNodeFindInClone[] = "cuGraphNodeFindInClone";
static const char __pyx_k_cuGraphicsMapResources[] = "cuGraphicsMapResources";
static const char __pyx_k_cuImportExternalMemory[] = "cuImportExternalMemory";
static const char __pyx_k_cuMemPoolExportPointer[] = "cuMemPoolExportPointer";
static const char __pyx_k_cuMemPoolImportPointer[] = "cuMemPoolImportPointer";
static const char __pyx_k_cuMemRangeGetAttribute[] = "cuMemRangeGetAttribute";
static const char __pyx_k_cuMipmappedArrayCreate[] = "cuMipmappedArrayCreate";
static const char __pyx_k_cuModuleGetLoadingMode[] = "cuModuleGetLoadingMode";
static const char __pyx_k_cuPointerGetAttributes[] = "cuPointerGetAttributes";
static const char __pyx_k_cuStreamAttachMemAsync[] = "cuStreamAttachMemAsync";
static const char __pyx_k_cuStreamCopyAttributes[] = "cuStreamCopyAttributes";
static const char __pyx_k_cuStreamGetCaptureInfo[] = "cuStreamGetCaptureInfo";
static const char __pyx_k_cuStreamWaitValue32_v2[] = "cuStreamWaitValue32_v2";
static const char __pyx_k_cuStreamWaitValue64_v2[] = "cuStreamWaitValue64_v2";
static const char __pyx_k_cuTexRefGetAddressMode[] = "cuTexRefGetAddressMode";
static const char __pyx_k_cuTexRefGetBorderColor[] = "cuTexRefGetBorderColor";
static const char __pyx_k_cuTexRefSetAddressMode[] = "cuTexRefSetAddressMode";
static const char __pyx_k_cuTexRefSetBorderColor[] = "cuTexRefSetBorderColor";
static const char __pyx_k_gpuDirectRDMACapable_2[] = "gpuDirectRDMACapable";
static const char __pyx_k_requestedHandleTypes_2[] = "requestedHandleTypes";
static const char __pyx_k_CUDA_ARRAY3D_DESCRIPTOR[] = "CUDA_ARRAY3D_DESCRIPTOR";
static const char __pyx_k_CUDA_ERROR_STUB_LIBRARY[] = "CUDA_ERROR_STUB_LIBRARY";
static const char __pyx_k_CUDA_ERROR_UNMAP_FAILED[] = "CUDA_ERROR_UNMAP_FAILED";
static const char __pyx_k_CUDA_KERNEL_NODE_PARAMS[] = "CUDA_KERNEL_NODE_PARAMS";
static const char __pyx_k_CUDA_MEMCPY2D_st_getPtr[] = "CUDA_MEMCPY2D_st.getPtr";
static const char __pyx_k_CUDA_MEMCPY3D_st_getPtr[] = "CUDA_MEMCPY3D_st.getPtr";
static const char __pyx_k_CUDA_MEMSET_NODE_PARAMS[] = "CUDA_MEMSET_NODE_PARAMS";
static const char __pyx_k_CUDA_RESOURCE_VIEW_DESC[] = "CUDA_RESOURCE_VIEW_DESC";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX[] = "CU_DEVICE_ATTRIBUTE_MAX";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BGR[] = "CU_EGL_COLOR_FORMAT_BGR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_MAX[] = "CU_EGL_COLOR_FORMAT_MAX";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_RGB[] = "CU_EGL_COLOR_FORMAT_RGB";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV[] = "CU_EGL_COLOR_FORMAT_YUV";
static const char __pyx_k_CU_EGL_FRAME_TYPE_ARRAY[] = "CU_EGL_FRAME_TYPE_ARRAY";
static const char __pyx_k_CU_EGL_FRAME_TYPE_PITCH[] = "CU_EGL_FRAME_TYPE_PITCH";
static const char __pyx_k_CU_EVENT_DISABLE_TIMING[] = "CU_EVENT_DISABLE_TIMING";
static const char __pyx_k_CU_EVENT_RECORD_DEFAULT[] = "CU_EVENT_RECORD_DEFAULT";
static const char __pyx_k_CU_FUNC_CACHE_PREFER_L1[] = "CU_FUNC_CACHE_PREFER_L1";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_HOST[] = "CU_GRAPH_NODE_TYPE_HOST";
static const char __pyx_k_CU_JIT_ERROR_LOG_BUFFER[] = "CU_JIT_ERROR_LOG_BUFFER";
static const char __pyx_k_CU_MEM_HANDLE_TYPE_NONE[] = "CU_MEM_HANDLE_TYPE_NONE";
static const char __pyx_k_CU_MODULE_EAGER_LOADING[] = "CU_MODULE_EAGER_LOADING";
static const char __pyx_k_CU_RESOURCE_TYPE_LINEAR[] = "CU_RESOURCE_TYPE_LINEAR";
static const char __pyx_k_CU_RES_VIEW_FORMAT_NONE[] = "CU_RES_VIEW_FORMAT_NONE";
static const char __pyx_k_CU_STREAM_WAIT_VALUE_EQ[] = "CU_STREAM_WAIT_VALUE_EQ";
static const char __pyx_k_CU_TRSA_OVERRIDE_FORMAT[] = "CU_TRSA_OVERRIDE_FORMAT";
static const char __pyx_k_CU_TRSF_READ_AS_INTEGER[] = "CU_TRSF_READ_AS_INTEGER";
static const char __pyx_k_CU_TR_ADDRESS_MODE_WRAP[] = "CU_TR_ADDRESS_MODE_WRAP";
static const char __pyx_k_CU_TR_FILTER_MODE_POINT[] = "CU_TR_FILTER_MODE_POINT";
static const char __pyx_k_CUaccessPolicyWindow_st[] = "CUaccessPolicyWindow_st";
static const char __pyx_k_CUaccessPolicyWindow_v1[] = "CUaccessPolicyWindow_v1";
static const char __pyx_k_CUarray___reduce_cython[] = "CUarray.__reduce_cython__";
static const char __pyx_k_CUeglStreamConnection_2[] = "CUeglStreamConnection";
static const char __pyx_k_CUevent___reduce_cython[] = "CUevent.__reduce_cython__";
static const char __pyx_k_CUexternalMemory_getPtr[] = "CUexternalMemory.getPtr";
static const char __pyx_k_CUgraphExecUpdateResult[] = "CUgraphExecUpdateResult";
static const char __pyx_k_CUgraph___reduce_cython[] = "CUgraph.__reduce_cython__";
static const char __pyx_k_CUgraphicsRegisterFlags[] = "CUgraphicsRegisterFlags";
static const char __pyx_k_CUmemAllocationCompType[] = "CUmemAllocationCompType";
static const char __pyx_k_CUmemLocation_st_getPtr[] = "CUmemLocation_st.getPtr";
static const char __pyx_k_CUmipmappedArray_getPtr[] = "CUmipmappedArray.getPtr";
static const char __pyx_k_CUstreamCallback_getPtr[] = "CUstreamCallback.getPtr";
static const char __pyx_k_CUstreamWaitValue_flags[] = "CUstreamWaitValue_flags";
static const char __pyx_k_CUsynchronizationPolicy[] = "CUsynchronizationPolicy";
static const char __pyx_k_VdpOutputSurface_getPtr[] = "VdpOutputSurface.getPtr";
static const char __pyx_k_cuCtxGetSharedMemConfig[] = "cuCtxGetSharedMemConfig";
static const char __pyx_k_cuCtxSetSharedMemConfig[] = "cuCtxSetSharedMemConfig";
static const char __pyx_k_cuDestroyExternalMemory[] = "cuDestroyExternalMemory";
static const char __pyx_k_cuDeviceGetP2PAttribute[] = "cuDeviceGetP2PAttribute";
static const char __pyx_k_cuDevicePrimaryCtxReset[] = "cuDevicePrimaryCtxReset";
static const char __pyx_k_cuGraphAddEventWaitNode[] = "cuGraphAddEventWaitNode";
static const char __pyx_k_cuGraphRetainUserObject[] = "cuGraphRetainUserObject";
static const char __pyx_k_cuMemAllocFromPoolAsync[] = "cuMemAllocFromPoolAsync";
static const char __pyx_k_cuMemRangeGetAttributes[] = "cuMemRangeGetAttributes";
static const char __pyx_k_cuMipmappedArrayDestroy[] = "cuMipmappedArrayDestroy";
static const char __pyx_k_cuStreamWriteValue32_v2[] = "cuStreamWriteValue32_v2";
static const char __pyx_k_cuStreamWriteValue64_v2[] = "cuStreamWriteValue64_v2";
static const char __pyx_k_win32SecurityAttributes[] = "win32SecurityAttributes : ";
static const char __pyx_k_CUDA_ARRAY_DESCRIPTOR_st[] = "CUDA_ARRAY_DESCRIPTOR_st";
static const char __pyx_k_CUDA_ARRAY_DESCRIPTOR_v2[] = "CUDA_ARRAY_DESCRIPTOR_v2";
static const char __pyx_k_CUDA_ERROR_DEINITIALIZED[] = "CUDA_ERROR_DEINITIALIZED";
static const char __pyx_k_CUDA_ERROR_ILLEGAL_STATE[] = "CUDA_ERROR_ILLEGAL_STATE";
static const char __pyx_k_CUDA_ERROR_INVALID_IMAGE[] = "CUDA_ERROR_INVALID_IMAGE";
static const char __pyx_k_CUDA_ERROR_INVALID_VALUE[] = "CUDA_ERROR_INVALID_VALUE";
static const char __pyx_k_CUDA_ERROR_LAUNCH_FAILED[] = "CUDA_ERROR_LAUNCH_FAILED";
static const char __pyx_k_CUDA_ERROR_NOT_PERMITTED[] = "CUDA_ERROR_NOT_PERMITTED";
static const char __pyx_k_CUDA_ERROR_NOT_SUPPORTED[] = "CUDA_ERROR_NOT_SUPPORTED";
static const char __pyx_k_CUDA_ERROR_OUT_OF_MEMORY[] = "CUDA_ERROR_OUT_OF_MEMORY";
static const char __pyx_k_CUDA_HOST_NODE_PARAMS_st[] = "CUDA_HOST_NODE_PARAMS_st";
static const char __pyx_k_CUDA_HOST_NODE_PARAMS_v1[] = "CUDA_HOST_NODE_PARAMS_v1";
static const char __pyx_k_CUDA_Lazy_Loading_status[] = "\n    CUDA Lazy Loading status\n    ";
static const char __pyx_k_CUDA_NVSCISYNC_ATTR_WAIT[] = "CUDA_NVSCISYNC_ATTR_WAIT";
static const char __pyx_k_CU_AD_FORMAT_SIGNED_INT8[] = "CU_AD_FORMAT_SIGNED_INT8";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_ABGR[] = "CU_EGL_COLOR_FORMAT_ABGR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_ARGB[] = "CU_EGL_COLOR_FORMAT_ARGB";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_AYUV[] = "CU_EGL_COLOR_FORMAT_AYUV";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BGRA[] = "CU_EGL_COLOR_FORMAT_BGRA";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_RGBA[] = "CU_EGL_COLOR_FORMAT_RGBA";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_VYUY[] = "CU_EGL_COLOR_FORMAT_VYUY";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUVA[] = "CU_EGL_COLOR_FORMAT_YUVA";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVYU[] = "CU_EGL_COLOR_FORMAT_YVYU";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y_ER[] = "CU_EGL_COLOR_FORMAT_Y_ER";
static const char __pyx_k_CU_EVENT_RECORD_EXTERNAL[] = "CU_EVENT_RECORD_EXTERNAL";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_EMPTY[] = "CU_GRAPH_NODE_TYPE_EMPTY";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_GRAPH[] = "CU_GRAPH_NODE_TYPE_GRAPH";
static const char __pyx_k_CU_JIT_CACHE_OPTION_NONE[] = "CU_JIT_CACHE_OPTION_NONE";
static const char __pyx_k_CU_JIT_FALLBACK_STRATEGY[] = "CU_JIT_FALLBACK_STRATEGY";
static const char __pyx_k_CU_JIT_THREADS_PER_BLOCK[] = "CU_JIT_THREADS_PER_BLOCK";
static const char __pyx_k_CU_MEMHOSTALLOC_PORTABLE[] = "CU_MEMHOSTALLOC_PORTABLE";
static const char __pyx_k_CU_MEM_HANDLE_TYPE_WIN32[] = "CU_MEM_HANDLE_TYPE_WIN32";
static const char __pyx_k_CU_MEM_LOCATION_TYPE_MAX[] = "CU_MEM_LOCATION_TYPE_MAX";
static const char __pyx_k_CU_RESOURCE_TYPE_PITCH2D[] = "CU_RESOURCE_TYPE_PITCH2D";
static const char __pyx_k_CU_STREAM_MEM_OP_BARRIER[] = "CU_STREAM_MEM_OP_BARRIER";
static const char __pyx_k_CU_STREAM_WAIT_VALUE_AND[] = "CU_STREAM_WAIT_VALUE_AND";
static const char __pyx_k_CU_STREAM_WAIT_VALUE_GEQ[] = "CU_STREAM_WAIT_VALUE_GEQ";
static const char __pyx_k_CU_STREAM_WAIT_VALUE_NOR[] = "CU_STREAM_WAIT_VALUE_NOR";
static const char __pyx_k_CU_TRSF_SEAMLESS_CUBEMAP[] = "CU_TRSF_SEAMLESS_CUBEMAP";
static const char __pyx_k_CU_TR_ADDRESS_MODE_CLAMP[] = "CU_TR_ADDRESS_MODE_CLAMP";
static const char __pyx_k_CU_TR_FILTER_MODE_LINEAR[] = "CU_TR_FILTER_MODE_LINEAR";
static const char __pyx_k_CUarrayMapInfo_st_getPtr[] = "CUarrayMapInfo_st.getPtr";
static const char __pyx_k_CUdevice___reduce_cython[] = "CUdevice.__reduce_cython__";
static const char __pyx_k_CUexecAffinitySmCount_st[] = "CUexecAffinitySmCount_st";
static const char __pyx_k_CUexecAffinitySmCount_v1[] = "CUexecAffinitySmCount_v1";
static const char __pyx_k_CUgraphInstantiate_flags[] = "CUgraphInstantiate_flags";
static const char __pyx_k_CUhostFn___reduce_cython[] = "CUhostFn.__reduce_cython__";
static const char __pyx_k_CUipcMemHandle_st_getPtr[] = "CUipcMemHandle_st.getPtr";
static const char __pyx_k_CUkernelNodeAttrValue_v1[] = "CUkernelNodeAttrValue_v1";
static const char __pyx_k_CUlaunchConfig_st_getPtr[] = "CUlaunchConfig_st.getPtr";
static const char __pyx_k_CUmemPoolProps_st_getPtr[] = "CUmemPoolProps_st.getPtr";
static const char __pyx_k_CUmodule___reduce_cython[] = "CUmodule.__reduce_cython__";
static const char __pyx_k_CUstreamBatchMemOpParams[] = "CUstreamBatchMemOpParams";
static const char __pyx_k_CUstreamWriteValue_flags[] = "CUstreamWriteValue_flags";
static const char __pyx_k_CUstream___reduce_cython[] = "CUstream.__reduce_cython__";
static const char __pyx_k_CUtexref___reduce_cython[] = "CUtexref.__reduce_cython__";
static const char __pyx_k_CUuserObjectRetain_flags[] = "CUuserObjectRetain_flags";
static const char __pyx_k_EGLint___setstate_cython[] = "EGLint.__setstate_cython__";
static const char __pyx_k_Execution_Affinity_Types[] = "\n    Execution Affinity Types\n    ";
static const char __pyx_k_GLenum___setstate_cython[] = "GLenum.__setstate_cython__";
static const char __pyx_k_GLuint___setstate_cython[] = "GLuint.__setstate_cython__";
static const char __pyx_k_Sparse_subresource_types[] = "\n    Sparse subresource types\n    ";
static const char __pyx_k_VdpGetProcAddress_getPtr[] = "VdpGetProcAddress.getPtr";
static const char __pyx_k_cpMipmappedArrayDesc_ptr[] = "cpMipmappedArrayDesc_ptr";
static const char __pyx_k_cuDevicePrimaryCtxRetain[] = "cuDevicePrimaryCtxRetain";
static const char __pyx_k_cuEventCreateFromEGLSync[] = "cuEventCreateFromEGLSync";
static const char __pyx_k_cuFuncSetSharedMemConfig[] = "cuFuncSetSharedMemConfig";
static const char __pyx_k_cuGraphAddBatchMemOpNode[] = "cuGraphAddBatchMemOpNode";
static const char __pyx_k_cuGraphAddChildGraphNode[] = "cuGraphAddChildGraphNode";
static const char __pyx_k_cuGraphHostNodeGetParams[] = "cuGraphHostNodeGetParams";
static const char __pyx_k_cuGraphHostNodeSetParams[] = "cuGraphHostNodeSetParams";
static const char __pyx_k_cuGraphReleaseUserObject[] = "cuGraphReleaseUserObject";
static const char __pyx_k_cuGraphicsUnmapResources[] = "cuGraphicsUnmapResources";
static const char __pyx_k_cuMipmappedArrayGetLevel[] = "cuMipmappedArrayGetLevel";
static const char __pyx_k_cuTexRefGetMaxAnisotropy[] = "cuTexRefGetMaxAnisotropy";
static const char __pyx_k_cuTexRefSetMaxAnisotropy[] = "cuTexRefSetMaxAnisotropy";
static const char __pyx_k_pad_length_must_be_64_is[] = "pad length must be 64, is ";
static const char __pyx_k_CUDA_ARRAY3D_SURFACE_LDST[] = "CUDA_ARRAY3D_SURFACE_LDST";
static const char __pyx_k_CUDA_EGL_INFINITE_TIMEOUT[] = "CUDA_EGL_INFINITE_TIMEOUT";
static const char __pyx_k_CUDA_ERROR_ALREADY_MAPPED[] = "CUDA_ERROR_ALREADY_MAPPED";
static const char __pyx_k_CUDA_ERROR_CAPTURED_EVENT[] = "CUDA_ERROR_CAPTURED_EVENT";
static const char __pyx_k_CUDA_ERROR_FILE_NOT_FOUND[] = "CUDA_ERROR_FILE_NOT_FOUND";
static const char __pyx_k_CUDA_ERROR_INVALID_DEVICE[] = "CUDA_ERROR_INVALID_DEVICE";
static const char __pyx_k_CUDA_ERROR_INVALID_HANDLE[] = "CUDA_ERROR_INVALID_HANDLE";
static const char __pyx_k_CUDA_ERROR_INVALID_SOURCE[] = "CUDA_ERROR_INVALID_SOURCE";
static const char __pyx_k_CUDA_ERROR_LAUNCH_TIMEOUT[] = "CUDA_ERROR_LAUNCH_TIMEOUT";
static const char __pyx_k_CUDA_ERROR_TOO_MANY_PEERS[] = "CUDA_ERROR_TOO_MANY_PEERS";
static const char __pyx_k_CU_ACCESS_PROPERTY_NORMAL[] = "CU_ACCESS_PROPERTY_NORMAL";
static const char __pyx_k_CU_AD_FORMAT_SIGNED_INT16[] = "CU_AD_FORMAT_SIGNED_INT16";
static const char __pyx_k_CU_AD_FORMAT_SIGNED_INT32[] = "CU_AD_FORMAT_SIGNED_INT32";
static const char __pyx_k_CU_AD_FORMAT_SNORM_INT8X1[] = "CU_AD_FORMAT_SNORM_INT8X1";
static const char __pyx_k_CU_AD_FORMAT_SNORM_INT8X2[] = "CU_AD_FORMAT_SNORM_INT8X2";
static const char __pyx_k_CU_AD_FORMAT_SNORM_INT8X4[] = "CU_AD_FORMAT_SNORM_INT8X4";
static const char __pyx_k_CU_AD_FORMAT_UNORM_INT8X1[] = "CU_AD_FORMAT_UNORM_INT8X1";
static const char __pyx_k_CU_AD_FORMAT_UNORM_INT8X2[] = "CU_AD_FORMAT_UNORM_INT8X2";
static const char __pyx_k_CU_AD_FORMAT_UNORM_INT8X4[] = "CU_AD_FORMAT_UNORM_INT8X4";
static const char __pyx_k_CU_COMPUTEMODE_PROHIBITED[] = "CU_COMPUTEMODE_PROHIBITED";
static const char __pyx_k_CU_CTX_LMEM_RESIZE_TO_MAX[] = "CU_CTX_LMEM_RESIZE_TO_MAX";
static const char __pyx_k_CU_EXEC_AFFINITY_TYPE_MAX[] = "CU_EXEC_AFFINITY_TYPE_MAX";
static const char __pyx_k_CU_FUNC_CACHE_PREFER_NONE[] = "CU_FUNC_CACHE_PREFER_NONE";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_KERNEL[] = "CU_GRAPH_NODE_TYPE_KERNEL";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_MEMCPY[] = "CU_GRAPH_NODE_TYPE_MEMCPY";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_MEMSET[] = "CU_GRAPH_NODE_TYPE_MEMSET";
static const char __pyx_k_CU_GRAPH_USER_OBJECT_MOVE[] = "CU_GRAPH_USER_OBJECT_MOVE";
static const char __pyx_k_CU_JIT_GENERATE_LINE_INFO[] = "CU_JIT_GENERATE_LINE_INFO";
static const char __pyx_k_CU_JIT_OPTIMIZATION_LEVEL[] = "CU_JIT_OPTIMIZATION_LEVEL";
static const char __pyx_k_CU_LIMIT_MALLOC_HEAP_SIZE[] = "CU_LIMIT_MALLOC_HEAP_SIZE";
static const char __pyx_k_CU_LIMIT_PRINTF_FIFO_SIZE[] = "CU_LIMIT_PRINTF_FIFO_SIZE";
static const char __pyx_k_CU_MEMHOSTALLOC_DEVICEMAP[] = "CU_MEMHOSTALLOC_DEVICEMAP";
static const char __pyx_k_CU_MEM_OPERATION_TYPE_MAP[] = "CU_MEM_OPERATION_TYPE_MAP";
static const char __pyx_k_CU_TR_ADDRESS_MODE_BORDER[] = "CU_TR_ADDRESS_MODE_BORDER";
static const char __pyx_k_CU_TR_ADDRESS_MODE_MIRROR[] = "CU_TR_ADDRESS_MODE_MIRROR";
static const char __pyx_k_CUarray___setstate_cython[] = "CUarray.__setstate_cython__";
static const char __pyx_k_CUclusterSchedulingPolicy[] = "CUclusterSchedulingPolicy";
static const char __pyx_k_CUcontext___reduce_cython[] = "CUcontext.__reduce_cython__";
static const char __pyx_k_CUdriverProcAddress_flags[] = "CUdriverProcAddress_flags";
static const char __pyx_k_CUevent___setstate_cython[] = "CUevent.__setstate_cython__";
static const char __pyx_k_CUgraph___setstate_cython[] = "CUgraph.__setstate_cython__";
static const char __pyx_k_CUgraphicsResource_getPtr[] = "CUgraphicsResource.getPtr";
static const char __pyx_k_CUmemAccessDesc_st_getPtr[] = "CUmemAccessDesc_st.getPtr";
static const char __pyx_k_CUmemAllocationHandleType[] = "CUmemAllocationHandleType";
static const char __pyx_k_CUmemPoolPtrExportData_st[] = "CUmemPoolPtrExportData_st";
static const char __pyx_k_CUmemPoolPtrExportData_v1[] = "CUmemPoolPtrExportData_v1";
static const char __pyx_k_CUoccupancyB2DSize_getPtr[] = "CUoccupancyB2DSize.getPtr";
static const char __pyx_k_CUsurfref___reduce_cython[] = "CUsurfref.__reduce_cython__";
static const char __pyx_k_CUuuid_st___reduce_cython[] = "CUuuid_st.__reduce_cython__";
static const char __pyx_k_Occupancy_calculator_flag[] = "\n    Occupancy calculator flag\n    ";
static const char __pyx_k_VdpDevice___reduce_cython[] = "VdpDevice.__reduce_cython__";
static const char __pyx_k_cuDeviceComputeCapability[] = "cuDeviceComputeCapability";
static const char __pyx_k_cuDeviceGetDefaultMemPool[] = "cuDeviceGetDefaultMemPool";
static const char __pyx_k_cuDevicePrimaryCtxRelease[] = "cuDevicePrimaryCtxRelease";
static const char __pyx_k_cuGraphAddEventRecordNode[] = "cuGraphAddEventRecordNode";
static const char __pyx_k_cuGraphRemoveDependencies[] = "cuGraphRemoveDependencies";
static const char __pyx_k_cuGraphicsGLRegisterImage[] = "cuGraphicsGLRegisterImage";
static const char __pyx_k_cuImportExternalSemaphore[] = "cuImportExternalSemaphore";
static const char __pyx_k_cuLaunchCooperativeKernel[] = "cuLaunchCooperativeKernel";
static const char __pyx_k_cuMemHostGetDevicePointer[] = "cuMemHostGetDevicePointer";
static const char __pyx_k_cuStreamGetCaptureInfo_v2[] = "cuStreamGetCaptureInfo_v2";
static const char __pyx_k_cuTexObjectGetTextureDesc[] = "cuTexObjectGetTextureDesc";
static const char __pyx_k_cuTexRefGetMipmappedArray[] = "cuTexRefGetMipmappedArray";
static const char __pyx_k_cuTexRefSetMipmappedArray[] = "cuTexRefSetMipmappedArray";
static const char __pyx_k_win32SecurityAttributes_2[] = "win32SecurityAttributes";
static const char __pyx_k_CUDA_ARRAY3D_DEPTH_TEXTURE[] = "CUDA_ARRAY3D_DEPTH_TEXTURE";
static const char __pyx_k_CUDA_ARRAY3D_DESCRIPTOR_st[] = "CUDA_ARRAY3D_DESCRIPTOR_st";
static const char __pyx_k_CUDA_ARRAY3D_DESCRIPTOR_v2[] = "CUDA_ARRAY3D_DESCRIPTOR_v2";
static const char __pyx_k_CUDA_ERROR_ARRAY_IS_MAPPED[] = "CUDA_ERROR_ARRAY_IS_MAPPED";
static const char __pyx_k_CUDA_ERROR_EXTERNAL_DEVICE[] = "CUDA_ERROR_EXTERNAL_DEVICE";
static const char __pyx_k_CUDA_ERROR_ILLEGAL_ADDRESS[] = "CUDA_ERROR_ILLEGAL_ADDRESS";
static const char __pyx_k_CUDA_ERROR_INVALID_CONTEXT[] = "CUDA_ERROR_INVALID_CONTEXT";
static const char __pyx_k_CUDA_ERROR_MPS_RPC_FAILURE[] = "CUDA_ERROR_MPS_RPC_FAILURE";
static const char __pyx_k_CUDA_ERROR_NOT_INITIALIZED[] = "CUDA_ERROR_NOT_INITIALIZED";
static const char __pyx_k_CUDA_KERNEL_NODE_PARAMS_st[] = "CUDA_KERNEL_NODE_PARAMS_st";
static const char __pyx_k_CUDA_KERNEL_NODE_PARAMS_v1[] = "CUDA_KERNEL_NODE_PARAMS_v1";
static const char __pyx_k_CUDA_MEMSET_NODE_PARAMS_st[] = "CUDA_MEMSET_NODE_PARAMS_st";
static const char __pyx_k_CUDA_MEMSET_NODE_PARAMS_v1[] = "CUDA_MEMSET_NODE_PARAMS_v1";
static const char __pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS[] = "CUDA_MEM_ALLOC_NODE_PARAMS";
static const char __pyx_k_CUDA_NVSCISYNC_ATTR_SIGNAL[] = "CUDA_NVSCISYNC_ATTR_SIGNAL";
static const char __pyx_k_CUDA_RESOURCE_VIEW_DESC_st[] = "CUDA_RESOURCE_VIEW_DESC_st";
static const char __pyx_k_CUDA_RESOURCE_VIEW_DESC_v1[] = "CUDA_RESOURCE_VIEW_DESC_v1";
static const char __pyx_k_CU_AD_FORMAT_SNORM_INT16X1[] = "CU_AD_FORMAT_SNORM_INT16X1";
static const char __pyx_k_CU_AD_FORMAT_SNORM_INT16X2[] = "CU_AD_FORMAT_SNORM_INT16X2";
static const char __pyx_k_CU_AD_FORMAT_SNORM_INT16X4[] = "CU_AD_FORMAT_SNORM_INT16X4";
static const char __pyx_k_CU_AD_FORMAT_UNORM_INT16X1[] = "CU_AD_FORMAT_UNORM_INT16X1";
static const char __pyx_k_CU_AD_FORMAT_UNORM_INT16X2[] = "CU_AD_FORMAT_UNORM_INT16X2";
static const char __pyx_k_CU_AD_FORMAT_UNORM_INT16X4[] = "CU_AD_FORMAT_UNORM_INT16X4";
static const char __pyx_k_CU_AD_FORMAT_UNSIGNED_INT8[] = "CU_AD_FORMAT_UNSIGNED_INT8";
static const char __pyx_k_CU_CTX_SCHED_BLOCKING_SYNC[] = "CU_CTX_SCHED_BLOCKING_SYNC";
static const char __pyx_k_CU_CUBEMAP_FACE_NEGATIVE_X[] = "CU_CUBEMAP_FACE_NEGATIVE_X";
static const char __pyx_k_CU_CUBEMAP_FACE_NEGATIVE_Y[] = "CU_CUBEMAP_FACE_NEGATIVE_Y";
static const char __pyx_k_CU_CUBEMAP_FACE_NEGATIVE_Z[] = "CU_CUBEMAP_FACE_NEGATIVE_Z";
static const char __pyx_k_CU_CUBEMAP_FACE_POSITIVE_X[] = "CU_CUBEMAP_FACE_POSITIVE_X";
static const char __pyx_k_CU_CUBEMAP_FACE_POSITIVE_Y[] = "CU_CUBEMAP_FACE_POSITIVE_Y";
static const char __pyx_k_CU_CUBEMAP_FACE_POSITIVE_Z[] = "CU_CUBEMAP_FACE_POSITIVE_Z";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10_ER[] = "CU_EGL_COLOR_FORMAT_Y10_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y12_ER[] = "CU_EGL_COLOR_FORMAT_Y12_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV_ER[] = "CU_EGL_COLOR_FORMAT_YUV_ER";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_NUM_REGS[] = "CU_FUNC_ATTRIBUTE_NUM_REGS";
static const char __pyx_k_CU_FUNC_CACHE_PREFER_EQUAL[] = "CU_FUNC_CACHE_PREFER_EQUAL";
static const char __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR[] = "CU_GRAPH_EXEC_UPDATE_ERROR";
static const char __pyx_k_CU_JIT_GENERATE_DEBUG_INFO[] = "CU_JIT_GENERATE_DEBUG_INFO";
static const char __pyx_k_CU_JIT_GLOBAL_SYMBOL_COUNT[] = "CU_JIT_GLOBAL_SYMBOL_COUNT";
static const char __pyx_k_CU_JIT_GLOBAL_SYMBOL_NAMES[] = "CU_JIT_GLOBAL_SYMBOL_NAMES";
static const char __pyx_k_CU_LAUNCH_ATTRIBUTE_IGNORE[] = "CU_LAUNCH_ATTRIBUTE_IGNORE";
static const char __pyx_k_CU_LAUNCH_PARAM_END_AS_INT[] = "CU_LAUNCH_PARAM_END_AS_INT";
static const char __pyx_k_CU_MEM_ALLOCATION_TYPE_MAX[] = "CU_MEM_ALLOCATION_TYPE_MAX";
static const char __pyx_k_CU_MEM_HANDLE_TYPE_GENERIC[] = "CU_MEM_HANDLE_TYPE_GENERIC";
static const char __pyx_k_CU_STREAM_WAIT_VALUE_FLUSH[] = "CU_STREAM_WAIT_VALUE_FLUSH";
static const char __pyx_k_CUdevice___setstate_cython[] = "CUdevice.__setstate_cython__";
static const char __pyx_k_CUeglResourceLocationFlags[] = "CUeglResourceLocationFlags";
static const char __pyx_k_CUexternalMemoryHandleType[] = "CUexternalMemoryHandleType";
static const char __pyx_k_CUexternalSemaphore_getPtr[] = "CUexternalSemaphore.getPtr";
static const char __pyx_k_CUfunction___reduce_cython[] = "CUfunction.__reduce_cython__";
static const char __pyx_k_CUgraphicsMapResourceFlags[] = "CUgraphicsMapResourceFlags";
static const char __pyx_k_CUhostFn___setstate_cython[] = "CUhostFn.__setstate_cython__";
static const char __pyx_k_CUipcEventHandle_st_getPtr[] = "CUipcEventHandle_st.getPtr";
static const char __pyx_k_CUmodule___setstate_cython[] = "CUmodule.__setstate_cython__";
static const char __pyx_k_CUstream___setstate_cython[] = "CUstream.__setstate_cython__";
static const char __pyx_k_CUtexref___setstate_cython[] = "CUtexref.__setstate_cython__";
static const char __pyx_k_EGLSyncKHR___reduce_cython[] = "EGLSyncKHR.__reduce_cython__";
static const char __pyx_k_Online_compilation_targets[] = "\n    Online compilation targets\n    ";
static const char __pyx_k_blockSizeToDynamicSMemSize[] = "blockSizeToDynamicSMemSize";
static const char __pyx_k_cuArrayGetSparseProperties[] = "cuArrayGetSparseProperties";
static const char __pyx_k_cuDestroyExternalSemaphore[] = "cuDestroyExternalSemaphore";
static const char __pyx_k_cuDevicePrimaryCtxGetState[] = "cuDevicePrimaryCtxGetState";
static const char __pyx_k_cuDevicePrimaryCtxSetFlags[] = "cuDevicePrimaryCtxSetFlags";
static const char __pyx_k_cuEGLStreamConsumerConnect[] = "cuEGLStreamConsumerConnect";
static const char __pyx_k_cuEGLStreamProducerConnect[] = "cuEGLStreamProducerConnect";
static const char __pyx_k_cuFlushGPUDirectRDMAWrites[] = "cuFlushGPUDirectRDMAWrites";
static const char __pyx_k_cuGraphKernelNodeGetParams[] = "cuGraphKernelNodeGetParams";
static const char __pyx_k_cuGraphKernelNodeSetParams[] = "cuGraphKernelNodeSetParams";
static const char __pyx_k_cuGraphMemcpyNodeGetParams[] = "cuGraphMemcpyNodeGetParams";
static const char __pyx_k_cuGraphMemcpyNodeSetParams[] = "cuGraphMemcpyNodeSetParams";
static const char __pyx_k_cuGraphMemsetNodeGetParams[] = "cuGraphMemsetNodeGetParams";
static const char __pyx_k_cuGraphMemsetNodeSetParams[] = "cuGraphMemsetNodeSetParams";
static const char __pyx_k_cuGraphNodeGetDependencies[] = "cuGraphNodeGetDependencies";
static const char __pyx_k_cuGraphicsEGLRegisterImage[] = "cuGraphicsEGLRegisterImage";
static const char __pyx_k_cuGraphicsGLRegisterBuffer[] = "cuGraphicsGLRegisterBuffer";
static const char __pyx_k_cuStreamCreateWithPriority[] = "cuStreamCreateWithPriority";
static const char __pyx_k_cuTexObjectGetResourceDesc[] = "cuTexObjectGetResourceDesc";
static const char __pyx_k_cuTexRefGetMipmapLevelBias[] = "cuTexRefGetMipmapLevelBias";
static const char __pyx_k_cuTexRefSetMipmapLevelBias[] = "cuTexRefSetMipmapLevelBias";
static const char __pyx_k_cuuint32_t___reduce_cython[] = "cuuint32_t.__reduce_cython__";
static const char __pyx_k_cuuint64_t___reduce_cython[] = "cuuint64_t.__reduce_cython__";
static const char __pyx_k_CUDA_ARRAY3D_TEXTURE_GATHER[] = "CUDA_ARRAY3D_TEXTURE_GATHER";
static const char __pyx_k_CUDA_ERROR_ALREADY_ACQUIRED[] = "CUDA_ERROR_ALREADY_ACQUIRED";
static const char __pyx_k_CUDA_ERROR_OPERATING_SYSTEM[] = "CUDA_ERROR_OPERATING_SYSTEM";
static const char __pyx_k_CUDA_ERROR_SYSTEM_NOT_READY[] = "CUDA_ERROR_SYSTEM_NOT_READY";
static const char __pyx_k_CUDA_TEXTURE_DESC_st_getPtr[] = "CUDA_TEXTURE_DESC_st.getPtr";
static const char __pyx_k_CUDA_memory_pool_attributes[] = "\n    CUDA memory pool attributes\n    ";
static const char __pyx_k_CU_AD_FORMAT_BC1_UNORM_SRGB[] = "CU_AD_FORMAT_BC1_UNORM_SRGB";
static const char __pyx_k_CU_AD_FORMAT_BC2_UNORM_SRGB[] = "CU_AD_FORMAT_BC2_UNORM_SRGB";
static const char __pyx_k_CU_AD_FORMAT_BC3_UNORM_SRGB[] = "CU_AD_FORMAT_BC3_UNORM_SRGB";
static const char __pyx_k_CU_AD_FORMAT_BC7_UNORM_SRGB[] = "CU_AD_FORMAT_BC7_UNORM_SRGB";
static const char __pyx_k_CU_AD_FORMAT_UNSIGNED_INT16[] = "CU_AD_FORMAT_UNSIGNED_INT16";
static const char __pyx_k_CU_AD_FORMAT_UNSIGNED_INT32[] = "CU_AD_FORMAT_UNSIGNED_INT32";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_AYUV_ER[] = "CU_EGL_COLOR_FORMAT_AYUV_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_UYVY_ER[] = "CU_EGL_COLOR_FORMAT_UYVY_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_VYUY_ER[] = "CU_EGL_COLOR_FORMAT_VYUY_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUVA_ER[] = "CU_EGL_COLOR_FORMAT_YUVA_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUYV_ER[] = "CU_EGL_COLOR_FORMAT_YUYV_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVYU_ER[] = "CU_EGL_COLOR_FORMAT_YVYU_ER";
static const char __pyx_k_CU_FUNC_CACHE_PREFER_SHARED[] = "CU_FUNC_CACHE_PREFER_SHARED";
static const char __pyx_k_CU_GET_PROC_ADDRESS_DEFAULT[] = "CU_GET_PROC_ADDRESS_DEFAULT";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_MEM_FREE[] = "CU_GRAPH_NODE_TYPE_MEM_FREE";
static const char __pyx_k_CU_LAUNCH_PARAM_BUFFER_SIZE[] = "CU_LAUNCH_PARAM_BUFFER_SIZE";
static const char __pyx_k_CU_MEMHOSTREGISTER_IOMEMORY[] = "CU_MEMHOSTREGISTER_IOMEMORY";
static const char __pyx_k_CU_MEMHOSTREGISTER_PORTABLE[] = "CU_MEMHOSTREGISTER_PORTABLE";
static const char __pyx_k_CU_MEM_ALLOCATION_COMP_NONE[] = "CU_MEM_ALLOCATION_COMP_NONE";
static const char __pyx_k_CU_MEM_LOCATION_TYPE_DEVICE[] = "CU_MEM_LOCATION_TYPE_DEVICE";
static const char __pyx_k_CU_MEM_OPERATION_TYPE_UNMAP[] = "CU_MEM_OPERATION_TYPE_UNMAP";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_MAPPED[] = "CU_POINTER_ATTRIBUTE_MAPPED";
static const char __pyx_k_CU_RES_VIEW_FORMAT_SINT_1X8[] = "CU_RES_VIEW_FORMAT_SINT_1X8";
static const char __pyx_k_CU_RES_VIEW_FORMAT_SINT_2X8[] = "CU_RES_VIEW_FORMAT_SINT_2X8";
static const char __pyx_k_CU_RES_VIEW_FORMAT_SINT_4X8[] = "CU_RES_VIEW_FORMAT_SINT_4X8";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UINT_1X8[] = "CU_RES_VIEW_FORMAT_UINT_1X8";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UINT_2X8[] = "CU_RES_VIEW_FORMAT_UINT_2X8";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UINT_4X8[] = "CU_RES_VIEW_FORMAT_UINT_4X8";
static const char __pyx_k_CUcontext___setstate_cython[] = "CUcontext.__setstate_cython__";
static const char __pyx_k_CUdevice_v1___reduce_cython[] = "CUdevice_v1.__reduce_cython__";
static const char __pyx_k_CUdeviceptr___reduce_cython[] = "CUdeviceptr.__reduce_cython__";
static const char __pyx_k_CUgraphExec___reduce_cython[] = "CUgraphExec.__reduce_cython__";
static const char __pyx_k_CUgraphNode___reduce_cython[] = "CUgraphNode.__reduce_cython__";
static const char __pyx_k_CUlaunchAttribute_st_getPtr[] = "CUlaunchAttribute_st.getPtr";
static const char __pyx_k_CUlinkState___reduce_cython[] = "CUlinkState.__reduce_cython__";
static const char __pyx_k_CUstreamBatchMemOpParams_v1[] = "CUstreamBatchMemOpParams_v1";
static const char __pyx_k_CUstreamMemoryBarrier_flags[] = "CUstreamMemoryBarrier_flags";
static const char __pyx_k_CUsurfref___setstate_cython[] = "CUsurfref.__setstate_cython__";
static const char __pyx_k_CUtexObject___reduce_cython[] = "CUtexObject.__reduce_cython__";
static const char __pyx_k_CUuuid_st___setstate_cython[] = "CUuuid_st.__setstate_cython__";
static const char __pyx_k_EGLImageKHR___reduce_cython[] = "EGLImageKHR.__reduce_cython__";
static const char __pyx_k_NVCL_event_scheduling_flags[] = "\n    NVCL event scheduling flags\n    ";
static const char __pyx_k_VdpDevice___setstate_cython[] = "VdpDevice.__setstate_cython__";
static const char __pyx_k_cblockSizeToDynamicSMemSize[] = "cblockSizeToDynamicSMemSize";
static const char __pyx_k_cuCtxGetStreamPriorityRange[] = "cuCtxGetStreamPriorityRange";
static const char __pyx_k_cuCtxResetPersistingL2Cache[] = "cuCtxResetPersistingL2Cache";
static const char __pyx_k_cuGraphInstantiateWithFlags[] = "cuGraphInstantiateWithFlags";
static const char __pyx_k_cuGraphMemFreeNodeGetParams[] = "cuGraphMemFreeNodeGetParams";
static const char __pyx_k_cuLinkCreate_locals_genexpr[] = "cuLinkCreate.<locals>.genexpr";
static const char __pyx_k_cuMemRetainAllocationHandle[] = "cuMemRetainAllocationHandle";
static const char __pyx_k_cuSurfObjectGetResourceDesc[] = "cuSurfObjectGetResourceDesc";
static const char __pyx_k_cuTexRefGetMipmapFilterMode[] = "cuTexRefGetMipmapFilterMode";
static const char __pyx_k_cuTexRefGetMipmapLevelClamp[] = "cuTexRefGetMipmapLevelClamp";
static const char __pyx_k_cuTexRefSetMipmapFilterMode[] = "cuTexRefSetMipmapFilterMode";
static const char __pyx_k_cuTexRefSetMipmapLevelClamp[] = "cuTexRefSetMipmapLevelClamp";
static const char __pyx_k_pblockSizeToDynamicSMemSize[] = "pblockSizeToDynamicSMemSize";
static const char __pyx_k_Array_indices_for_cube_faces[] = "\n    Array indices for cube faces\n    ";
static const char __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES[] = "CUDA_ARRAY_SPARSE_PROPERTIES";
static const char __pyx_k_CUDA_ERROR_ECC_UNCORRECTABLE[] = "CUDA_ERROR_ECC_UNCORRECTABLE";
static const char __pyx_k_CUDA_ERROR_NO_BINARY_FOR_GPU[] = "CUDA_ERROR_NO_BINARY_FOR_GPU";
static const char __pyx_k_CUDA_ERROR_PROFILER_DISABLED[] = "CUDA_ERROR_PROFILER_DISABLED";
static const char __pyx_k_CUDA_ERROR_UNSUPPORTED_LIMIT[] = "CUDA_ERROR_UNSUPPORTED_LIMIT";
static const char __pyx_k_CUDA_LAUNCH_PARAMS_st_getPtr[] = "CUDA_LAUNCH_PARAMS_st.getPtr";
static const char __pyx_k_CUDA_MEMCPY3D_PEER_st_getPtr[] = "CUDA_MEMCPY3D_PEER_st.getPtr";
static const char __pyx_k_CUDA_RESOURCE_DESC_st_getPtr[] = "CUDA_RESOURCE_DESC_st.getPtr";
static const char __pyx_k_CU_ACCESS_PROPERTY_STREAMING[] = "CU_ACCESS_PROPERTY_STREAMING";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_UYVY_422[] = "CU_EGL_COLOR_FORMAT_UYVY_422";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUYV_422[] = "CU_EGL_COLOR_FORMAT_YUYV_422";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y_709_ER[] = "CU_EGL_COLOR_FORMAT_Y_709_ER";
static const char __pyx_k_CU_EVENT_SCHED_BLOCKING_SYNC[] = "CU_EVENT_SCHED_BLOCKING_SYNC";
static const char __pyx_k_CU_GL_DEVICE_LIST_NEXT_FRAME[] = "CU_GL_DEVICE_LIST_NEXT_FRAME";
static const char __pyx_k_CU_GRAPH_EXEC_UPDATE_SUCCESS[] = "CU_GRAPH_EXEC_UPDATE_SUCCESS";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_MEM_ALLOC[] = "CU_GRAPH_NODE_TYPE_MEM_ALLOC";
static const char __pyx_k_CU_JIT_TARGET_FROM_CUCONTEXT[] = "CU_JIT_TARGET_FROM_CUCONTEXT";
static const char __pyx_k_CU_LAUNCH_ATTRIBUTE_PRIORITY[] = "CU_LAUNCH_ATTRIBUTE_PRIORITY";
static const char __pyx_k_CU_MEMHOSTREGISTER_DEVICEMAP[] = "CU_MEMHOSTREGISTER_DEVICEMAP";
static const char __pyx_k_CU_MEMHOSTREGISTER_READ_ONLY[] = "CU_MEMHOSTREGISTER_READ_ONLY";
static const char __pyx_k_CU_MEM_ACCESS_FLAGS_PROT_MAX[] = "CU_MEM_ACCESS_FLAGS_PROT_MAX";
static const char __pyx_k_CU_MEM_HANDLE_TYPE_WIN32_KMT[] = "CU_MEM_HANDLE_TYPE_WIN32_KMT";
static const char __pyx_k_CU_MEM_LOCATION_TYPE_INVALID[] = "CU_MEM_LOCATION_TYPE_INVALID";
static const char __pyx_k_CU_MEM_RANGE_HANDLE_TYPE_MAX[] = "CU_MEM_RANGE_HANDLE_TYPE_MAX";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_CONTEXT[] = "CU_POINTER_ATTRIBUTE_CONTEXT";
static const char __pyx_k_CU_RES_VIEW_FORMAT_SINT_1X16[] = "CU_RES_VIEW_FORMAT_SINT_1X16";
static const char __pyx_k_CU_RES_VIEW_FORMAT_SINT_1X32[] = "CU_RES_VIEW_FORMAT_SINT_1X32";
static const char __pyx_k_CU_RES_VIEW_FORMAT_SINT_2X16[] = "CU_RES_VIEW_FORMAT_SINT_2X16";
static const char __pyx_k_CU_RES_VIEW_FORMAT_SINT_2X32[] = "CU_RES_VIEW_FORMAT_SINT_2X32";
static const char __pyx_k_CU_RES_VIEW_FORMAT_SINT_4X16[] = "CU_RES_VIEW_FORMAT_SINT_4X16";
static const char __pyx_k_CU_RES_VIEW_FORMAT_SINT_4X32[] = "CU_RES_VIEW_FORMAT_SINT_4X32";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UINT_1X16[] = "CU_RES_VIEW_FORMAT_UINT_1X16";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UINT_1X32[] = "CU_RES_VIEW_FORMAT_UINT_1X32";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UINT_2X16[] = "CU_RES_VIEW_FORMAT_UINT_2X16";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UINT_2X32[] = "CU_RES_VIEW_FORMAT_UINT_2X32";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UINT_4X16[] = "CU_RES_VIEW_FORMAT_UINT_4X16";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UINT_4X32[] = "CU_RES_VIEW_FORMAT_UINT_4X32";
static const char __pyx_k_CU_SHAREDMEM_CARVEOUT_MAX_L1[] = "CU_SHAREDMEM_CARVEOUT_MAX_L1";
static const char __pyx_k_CU_SYNC_POLICY_BLOCKING_SYNC[] = "CU_SYNC_POLICY_BLOCKING_SYNC";
static const char __pyx_k_CUarraySparseSubresourceType[] = "CUarraySparseSubresourceType";
static const char __pyx_k_CUdevprop_st___reduce_cython[] = "CUdevprop_st.__reduce_cython__";
static const char __pyx_k_CUeglStreamConnection_getPtr[] = "CUeglStreamConnection.getPtr";
static const char __pyx_k_CUfunction___setstate_cython[] = "CUfunction.__setstate_cython__";
static const char __pyx_k_CUlaunchAttributeValue_union[] = "CUlaunchAttributeValue_union";
static const char __pyx_k_CUmemGenericAllocationHandle[] = "<CUmemGenericAllocationHandle ";
static const char __pyx_k_CUmemoryPool___reduce_cython[] = "CUmemoryPool.__reduce_cython__";
static const char __pyx_k_CUsurfObject___reduce_cython[] = "CUsurfObject.__reduce_cython__";
static const char __pyx_k_CUuserObject___reduce_cython[] = "CUuserObject.__reduce_cython__";
static const char __pyx_k_EGLStreamKHR___reduce_cython[] = "EGLStreamKHR.__reduce_cython__";
static const char __pyx_k_EGLSyncKHR___setstate_cython[] = "EGLSyncKHR.__setstate_cython__";
static const char __pyx_k_External_memory_handle_types[] = "\n    External memory handle types\n    ";
static const char __pyx_k_NVCL_CTX_SCHED_BLOCKING_SYNC[] = "NVCL_CTX_SCHED_BLOCKING_SYNC";
static const char __pyx_k_Shared_memory_configurations[] = "\n    Shared memory configurations\n    ";
static const char __pyx_k_cuArrayGetMemoryRequirements[] = "cuArrayGetMemoryRequirements";
static const char __pyx_k_cuDeviceGetGraphMemAttribute[] = "cuDeviceGetGraphMemAttribute";
static const char __pyx_k_cuDeviceSetGraphMemAttribute[] = "cuDeviceSetGraphMemAttribute";
static const char __pyx_k_cuGraphEventWaitNodeGetEvent[] = "cuGraphEventWaitNodeGetEvent";
static const char __pyx_k_cuGraphEventWaitNodeSetEvent[] = "cuGraphEventWaitNodeSetEvent";
static const char __pyx_k_cuGraphExecHostNodeSetParams[] = "cuGraphExecHostNodeSetParams";
static const char __pyx_k_cuGraphMemAllocNodeGetParams[] = "cuGraphMemAllocNodeGetParams";
static const char __pyx_k_cuGraphNodeGetDependentNodes[] = "cuGraphNodeGetDependentNodes";
static const char __pyx_k_cuGraphicsUnregisterResource[] = "cuGraphicsUnregisterResource";
static const char __pyx_k_cuLinkAddData_locals_genexpr[] = "cuLinkAddData.<locals>.genexpr";
static const char __pyx_k_cuLinkAddFile_locals_genexpr[] = "cuLinkAddFile.<locals>.genexpr";
static const char __pyx_k_cuMemExportToShareableHandle[] = "cuMemExportToShareableHandle";
static const char __pyx_k_cuOccupancyMaxActiveClusters[] = "cuOccupancyMaxActiveClusters";
static const char __pyx_k_cuuint32_t___setstate_cython[] = "cuuint32_t.__setstate_cython__";
static const char __pyx_k_cuuint64_t___setstate_cython[] = "cuuint64_t.__setstate_cython__";
static const char __pyx_k_reserved_length_must_be_4_is[] = "reserved length must be 4, is ";
static const char __pyx_k_CUDA_ARRAY3D_COLOR_ATTACHMENT[] = "CUDA_ARRAY3D_COLOR_ATTACHMENT";
static const char __pyx_k_CUDA_ARRAY3D_DEFERRED_MAPPING[] = "CUDA_ARRAY3D_DEFERRED_MAPPING";
static const char __pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS[] = "CUDA_BATCH_MEM_OP_NODE_PARAMS";
static const char __pyx_k_CUDA_ERROR_DEVICE_UNAVAILABLE[] = "CUDA_ERROR_DEVICE_UNAVAILABLE";
static const char __pyx_k_CUDA_ERROR_MISALIGNED_ADDRESS[] = "CUDA_ERROR_MISALIGNED_ADDRESS";
static const char __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS[] = "CUDA_EXT_SEM_WAIT_NODE_PARAMS";
static const char __pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS_st[] = "CUDA_MEM_ALLOC_NODE_PARAMS_st";
static const char __pyx_k_CUGPUDirectRDMAWritesOrdering[] = "CUGPUDirectRDMAWritesOrdering";
static const char __pyx_k_CU_ACCESS_PROPERTY_PERSISTING[] = "CU_ACCESS_PROPERTY_PERSISTING";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_PITCH[] = "CU_DEVICE_ATTRIBUTE_MAX_PITCH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_WARP_SIZE[] = "CU_DEVICE_ATTRIBUTE_WARP_SIZE";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_PTX_VERSION[] = "CU_FUNC_ATTRIBUTE_PTX_VERSION";
static const char __pyx_k_CU_GL_MAP_RESOURCE_FLAGS_NONE[] = "CU_GL_MAP_RESOURCE_FLAGS_NONE";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_WAIT_EVENT[] = "CU_GRAPH_NODE_TYPE_WAIT_EVENT";
static const char __pyx_k_CU_MEMHOSTALLOC_WRITECOMBINED[] = "CU_MEMHOSTALLOC_WRITECOMBINED";
static const char __pyx_k_CU_MEMPOOL_ATTR_USED_MEM_HIGH[] = "CU_MEMPOOL_ATTR_USED_MEM_HIGH";
static const char __pyx_k_CU_MEM_ACCESS_FLAGS_PROT_NONE[] = "CU_MEM_ACCESS_FLAGS_PROT_NONE";
static const char __pyx_k_CU_MEM_ACCESS_FLAGS_PROT_READ[] = "CU_MEM_ACCESS_FLAGS_PROT_READ";
static const char __pyx_k_CU_MEM_ADVISE_SET_ACCESSED_BY[] = "CU_MEM_ADVISE_SET_ACCESSED_BY";
static const char __pyx_k_CU_MEM_ADVISE_SET_READ_MOSTLY[] = "CU_MEM_ADVISE_SET_READ_MOSTLY";
static const char __pyx_k_CU_MEM_ALLOCATION_TYPE_PINNED[] = "CU_MEM_ALLOCATION_TYPE_PINNED";
static const char __pyx_k_CU_MEM_CREATE_USAGE_TILE_POOL[] = "CU_MEM_CREATE_USAGE_TILE_POOL";
static const char __pyx_k_CU_RES_VIEW_FORMAT_FLOAT_1X16[] = "CU_RES_VIEW_FORMAT_FLOAT_1X16";
static const char __pyx_k_CU_RES_VIEW_FORMAT_FLOAT_1X32[] = "CU_RES_VIEW_FORMAT_FLOAT_1X32";
static const char __pyx_k_CU_RES_VIEW_FORMAT_FLOAT_2X16[] = "CU_RES_VIEW_FORMAT_FLOAT_2X16";
static const char __pyx_k_CU_RES_VIEW_FORMAT_FLOAT_2X32[] = "CU_RES_VIEW_FORMAT_FLOAT_2X32";
static const char __pyx_k_CU_RES_VIEW_FORMAT_FLOAT_4X16[] = "CU_RES_VIEW_FORMAT_FLOAT_4X16";
static const char __pyx_k_CU_RES_VIEW_FORMAT_FLOAT_4X32[] = "CU_RES_VIEW_FORMAT_FLOAT_4X32";
static const char __pyx_k_CU_RES_VIEW_FORMAT_SIGNED_BC4[] = "CU_RES_VIEW_FORMAT_SIGNED_BC4";
static const char __pyx_k_CU_RES_VIEW_FORMAT_SIGNED_BC5[] = "CU_RES_VIEW_FORMAT_SIGNED_BC5";
static const char __pyx_k_CU_SHAREDMEM_CARVEOUT_DEFAULT[] = "CU_SHAREDMEM_CARVEOUT_DEFAULT";
static const char __pyx_k_CU_STREAM_CAPTURE_MODE_GLOBAL[] = "CU_STREAM_CAPTURE_MODE_GLOBAL";
static const char __pyx_k_CU_STREAM_CAPTURE_STATUS_NONE[] = "CU_STREAM_CAPTURE_STATUS_NONE";
static const char __pyx_k_CU_STREAM_WRITE_VALUE_DEFAULT[] = "CU_STREAM_WRITE_VALUE_DEFAULT";
static const char __pyx_k_CUdevice_v1___setstate_cython[] = "CUdevice_v1.__setstate_cython__";
static const char __pyx_k_CUdeviceptr___setstate_cython[] = "CUdeviceptr.__setstate_cython__";
static const char __pyx_k_CUeglFrame_st___reduce_cython[] = "CUeglFrame_st.__reduce_cython__";
static const char __pyx_k_CUexecAffinityParam_st_getPtr[] = "CUexecAffinityParam_st.getPtr";
static const char __pyx_k_CUexternalSemaphoreHandleType[] = "CUexternalSemaphoreHandleType";
static const char __pyx_k_CUgraphExec___setstate_cython[] = "CUgraphExec.__setstate_cython__";
static const char __pyx_k_CUgraphNode___setstate_cython[] = "CUgraphNode.__setstate_cython__";
static const char __pyx_k_CUlinkState___setstate_cython[] = "CUlinkState.__setstate_cython__";
static const char __pyx_k_CUmemAllocationProp_st_getPtr[] = "CUmemAllocationProp_st.getPtr";
static const char __pyx_k_CUtexObject___setstate_cython[] = "CUtexObject.__setstate_cython__";
static const char __pyx_k_EGLImageKHR___setstate_cython[] = "EGLImageKHR.__setstate_cython__";
static const char __pyx_k_Function_cache_configurations[] = "\n    Function cache configurations\n    ";
static const char __pyx_k_NVCL_context_scheduling_flags[] = "\n    NVCL context scheduling flags\n    ";
static const char __pyx_k_cuCtxCreate_v3_locals_genexpr[] = "cuCtxCreate_v3.<locals>.genexpr";
static const char __pyx_k_cuEGLStreamConsumerDisconnect[] = "cuEGLStreamConsumerDisconnect";
static const char __pyx_k_cuEGLStreamProducerDisconnect[] = "cuEGLStreamProducerDisconnect";
static const char __pyx_k_cuGraphChildGraphNodeGetGraph[] = "cuGraphChildGraphNodeGetGraph";
static const char __pyx_k_cuGraphKernelNodeGetAttribute[] = "cuGraphKernelNodeGetAttribute";
static const char __pyx_k_cuGraphKernelNodeSetAttribute[] = "cuGraphKernelNodeSetAttribute";
static const char __pyx_k_cuGraphicsResourceSetMapFlags[] = "cuGraphicsResourceSetMapFlags";
static const char __pyx_k_cuMemGetAllocationGranularity[] = "cuMemGetAllocationGranularity";
static const char __pyx_k_cuMemGetHandleForAddressRange[] = "cuMemGetHandleForAddressRange";
static const char __pyx_k_cuMemSetAccess_locals_genexpr[] = "cuMemSetAccess.<locals>.genexpr";
static const char __pyx_k_cuWaitExternalSemaphoresAsync[] = "cuWaitExternalSemaphoresAsync";
static const char __pyx_k_reserved_length_must_be_64_is[] = "reserved length must be 64, is ";
static const char __pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS[] = "CUDA_ARRAY_MEMORY_REQUIREMENTS";
static const char __pyx_k_CUDA_ERROR_DEVICE_NOT_LICENSED[] = "CUDA_ERROR_DEVICE_NOT_LICENSED";
static const char __pyx_k_CUDA_ERROR_ILLEGAL_INSTRUCTION[] = "CUDA_ERROR_ILLEGAL_INSTRUCTION";
static const char __pyx_k_CUDA_ERROR_NOT_MAPPED_AS_ARRAY[] = "CUDA_ERROR_NOT_MAPPED_AS_ARRAY";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_DEDICATED[] = "CUDA_EXTERNAL_MEMORY_DEDICATED";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CLOCK_RATE[] = "CU_DEVICE_ATTRIBUTE_CLOCK_RATE";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_INTEGRATED[] = "CU_DEVICE_ATTRIBUTE_INTEGRATED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_PCI_BUS_ID[] = "CU_DEVICE_ATTRIBUTE_PCI_BUS_ID";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_TCC_DRIVER[] = "CU_DEVICE_ATTRIBUTE_TCC_DRIVER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_BCCR[] = "CU_EGL_COLOR_FORMAT_BAYER_BCCR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_BGGR[] = "CU_EGL_COLOR_FORMAT_BAYER_BGGR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_CBRC[] = "CU_EGL_COLOR_FORMAT_BAYER_CBRC";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_CRBC[] = "CU_EGL_COLOR_FORMAT_BAYER_CRBC";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_GBRG[] = "CU_EGL_COLOR_FORMAT_BAYER_GBRG";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_GRBG[] = "CU_EGL_COLOR_FORMAT_BAYER_GRBG";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_RCCB[] = "CU_EGL_COLOR_FORMAT_BAYER_RCCB";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_RGGB[] = "CU_EGL_COLOR_FORMAT_BAYER_RGGB";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10_709_ER[] = "CU_EGL_COLOR_FORMAT_Y10_709_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y12_709_ER[] = "CU_EGL_COLOR_FORMAT_Y12_709_ER";
static const char __pyx_k_CU_EXEC_AFFINITY_TYPE_SM_COUNT[] = "CU_EXEC_AFFINITY_TYPE_SM_COUNT";
static const char __pyx_k_CU_JIT_GLOBAL_SYMBOL_ADDRESSES[] = "CU_JIT_GLOBAL_SYMBOL_ADDRESSES";
static const char __pyx_k_CU_JIT_REFERENCED_KERNEL_COUNT[] = "CU_JIT_REFERENCED_KERNEL_COUNT";
static const char __pyx_k_CU_JIT_REFERENCED_KERNEL_NAMES[] = "CU_JIT_REFERENCED_KERNEL_NAMES";
static const char __pyx_k_CU_LAUNCH_PARAM_BUFFER_POINTER[] = "CU_LAUNCH_PARAM_BUFFER_POINTER";
static const char __pyx_k_CU_MEM_ALLOCATION_COMP_GENERIC[] = "CU_MEM_ALLOCATION_COMP_GENERIC";
static const char __pyx_k_CU_MEM_ALLOCATION_TYPE_INVALID[] = "CU_MEM_ALLOCATION_TYPE_INVALID";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_BUFFER_ID[] = "CU_POINTER_ATTRIBUTE_BUFFER_ID";
static const char __pyx_k_CU_RES_VIEW_FORMAT_SIGNED_BC6H[] = "CU_RES_VIEW_FORMAT_SIGNED_BC6H";
static const char __pyx_k_CU_STREAM_CAPTURE_MODE_RELAXED[] = "CU_STREAM_CAPTURE_MODE_RELAXED";
static const char __pyx_k_CU_STREAM_MEM_OP_WAIT_VALUE_32[] = "CU_STREAM_MEM_OP_WAIT_VALUE_32";
static const char __pyx_k_CU_STREAM_MEM_OP_WAIT_VALUE_64[] = "CU_STREAM_MEM_OP_WAIT_VALUE_64";
static const char __pyx_k_CU_TRSF_NORMALIZED_COORDINATES[] = "CU_TRSF_NORMALIZED_COORDINATES";
static const char __pyx_k_CUaccessPolicyWindow_st_getPtr[] = "CUaccessPolicyWindow_st.getPtr";
static const char __pyx_k_CUdeviceptr_v2___reduce_cython[] = "CUdeviceptr_v2.__reduce_cython__";
static const char __pyx_k_CUdevprop_st___setstate_cython[] = "CUdevprop_st.__setstate_cython__";
static const char __pyx_k_CUmemGenericAllocationHandle_2[] = "CUmemGenericAllocationHandle";
static const char __pyx_k_CUmemoryPool___setstate_cython[] = "CUmemoryPool.__setstate_cython__";
static const char __pyx_k_CUstreamBatchMemOpParams_union[] = "CUstreamBatchMemOpParams_union";
static const char __pyx_k_CUsurfObject___setstate_cython[] = "CUsurfObject.__setstate_cython__";
static const char __pyx_k_CUtexObject_v1___reduce_cython[] = "CUtexObject_v1.__reduce_cython__";
static const char __pyx_k_CUuserObject___setstate_cython[] = "CUuserObject.__setstate_cython__";
static const char __pyx_k_EGLStreamKHR___setstate_cython[] = "EGLStreamKHR.__setstate_cython__";
static const char __pyx_k_NVCL_EVENT_SCHED_BLOCKING_SYNC[] = "NVCL_EVENT_SCHED_BLOCKING_SYNC";
static const char __pyx_k_Resource_location_flags_sysmem[] = "\n    Resource location flags- sysmem or vidmem  For CUDA context on\n    iGPU, since video and system memory are equivalent - these flags\n    will not have an effect on the execution.  For CUDA context on\n    dGPU, applications can use the flag\n    :py:obj:`~.CUeglResourceLocationFlags` to give a hint about the\n    desired location.  :py:obj:`~.CU_EGL_RESOURCE_LOCATION_SYSMEM` -\n    the frame data is made resident on the system memory to be accessed\n    by CUDA.  :py:obj:`~.CU_EGL_RESOURCE_LOCATION_VIDMEM` - the frame\n    data is made resident on the dedicated video memory to be accessed\n    by CUDA.  There may be an additional latency due to new allocation\n    and data migration, if the frame is produced on a different memory.\n    ";
static const char __pyx_k_Specifies_the_type_of_location[] = "\n    Specifies the type of location\n    ";
static const char __pyx_k_cuDeviceGetExecAffinitySupport[] = "cuDeviceGetExecAffinitySupport";
static const char __pyx_k_cuDeviceGetNvSciSyncAttributes[] = "cuDeviceGetNvSciSyncAttributes";
static const char __pyx_k_cuEGLStreamProducerReturnFrame[] = "cuEGLStreamProducerReturnFrame";
static const char __pyx_k_cuGraphBatchMemOpNodeGetParams[] = "cuGraphBatchMemOpNodeGetParams";
static const char __pyx_k_cuGraphBatchMemOpNodeSetParams[] = "cuGraphBatchMemOpNodeSetParams";
static const char __pyx_k_cuGraphEventRecordNodeGetEvent[] = "cuGraphEventRecordNodeGetEvent";
static const char __pyx_k_cuGraphEventRecordNodeSetEvent[] = "cuGraphEventRecordNodeSetEvent";
static const char __pyx_k_cuGraphExecKernelNodeSetParams[] = "cuGraphExecKernelNodeSetParams";
static const char __pyx_k_cuGraphExecMemcpyNodeSetParams[] = "cuGraphExecMemcpyNodeSetParams";
static const char __pyx_k_cuGraphExecMemsetNodeSetParams[] = "cuGraphExecMemsetNodeSetParams";
static const char __pyx_k_cuMemImportFromShareableHandle[] = "cuMemImportFromShareableHandle";
static const char __pyx_k_cuTexObjectGetResourceViewDesc[] = "cuTexObjectGetResourceViewDesc";
static const char __pyx_k_Access_flags_that_specify_the_l[] = "\n    Access flags that specify the level of access the current context's\n    device has on the memory referenced.\n    ";
static const char __pyx_k_Argument_map_is_not_instance_of[] = "Argument 'map' is not instance of type (expected List[ccuda.CUmemAccessDesc]";
static const char __pyx_k_Bitmasks_for_py_obj_CU_DEVICE_A[] = "\n    Bitmasks for\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS`\n    ";
static const char __pyx_k_CUDA_ARRAY_DESCRIPTOR_st_getPtr[] = "CUDA_ARRAY_DESCRIPTOR_st.getPtr";
static const char __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_st[] = "CUDA_ARRAY_SPARSE_PROPERTIES_st";
static const char __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1[] = "_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s";
static const char __pyx_k_CUDA_EGL_Color_Format_The_diffe[] = "\n    CUDA EGL Color Format - The different planar and multiplanar\n    formats currently supported for CUDA_EGL interops. Three channel\n    formats are currently not supported for\n    :py:obj:`~.CU_EGL_FRAME_TYPE_ARRAY`\n    ";
static const char __pyx_k_CUDA_ERROR_COMPAT_NOT_SUPPORTED[] = "CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE";
static const char __pyx_k_CUDA_ERROR_CONTEXT_IS_DESTROYED[] = "CUDA_ERROR_CONTEXT_IS_DESTROYED";
static const char __pyx_k_CUDA_ERROR_HARDWARE_STACK_ERROR[] = "CUDA_ERROR_HARDWARE_STACK_ERROR";
static const char __pyx_k_CUDA_ERROR_INVALID_CLUSTER_SIZE[] = "CUDA_ERROR_INVALID_CLUSTER_SIZE";
static const char __pyx_k_CUDA_ERROR_MPS_SERVER_NOT_READY[] = "CUDA_ERROR_MPS_SERVER_NOT_READY";
static const char __pyx_k_CUDA_ERROR_NVLINK_UNCORRECTABLE[] = "CUDA_ERROR_NVLINK_UNCORRECTABLE";
static const char __pyx_k_CUDA_ERROR_SHARED_OBJECT_SYMBOL[] = "CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND";
static const char __pyx_k_CUDA_ERROR_STREAM_CAPTURE_MERGE[] = "CUDA_ERROR_STREAM_CAPTURE_MERGE";
static const char __pyx_k_CUDA_ERROR_STREAM_CAPTURE_WRONG[] = "CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s";
static const char __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS[] = "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st";
static const char __pyx_k_CUDA_EglFrame_type_array_or_poi[] = "\n    CUDA EglFrame type - array or pointer\n    ";
static const char __pyx_k_CUDA_GRAPH_INSTANTIATE_FLAG_USE[] = "CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY";
static const char __pyx_k_CUDA_HOST_NODE_PARAMS_st_getPtr[] = "CUDA_HOST_NODE_PARAMS_st.getPtr";
static const char __pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS_st_2[] = "CUDA_MEM_ALLOC_NODE_PARAMS_st.__reduce_cython__";
static const char __pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS_st_3[] = "CUDA_MEM_ALLOC_NODE_PARAMS_st.__setstate_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s";
static const char __pyx_k_CUDA_TEXTURE_DESC_st___setstate[] = "CUDA_TEXTURE_DESC_st.__setstate_cython__";
static const char __pyx_k_CUDA_devices_corresponding_to_a[] = "\n    CUDA devices corresponding to an OpenGL device\n    ";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_COOPERATIVE[] = "CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_ECC_ENABLED[] = "CU_DEVICE_ATTRIBUTE_ECC_ENABLED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_GPU_OVERLAP[] = "CU_DEVICE_ATTRIBUTE_GPU_OVERLAP";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE[] = "CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_HOST_NATIVE[] = "CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_KERNEL_EXEC[] = "CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_THREADS[] = "CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_SPARSE_CUDA[] = "CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED";
static const char __pyx_k_CU_EGL_RESOURCE_LOCATION_SYSMEM[] = "CU_EGL_RESOURCE_LOCATION_SYSMEM";
static const char __pyx_k_CU_EGL_RESOURCE_LOCATION_VIDMEM[] = "CU_EGL_RESOURCE_LOCATION_VIDMEM";
static const char __pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES[] = "CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_CACHE_MODE_CA[] = "CU_FUNC_ATTRIBUTE_CACHE_MODE_CA";
static const char __pyx_k_CU_GL_DEVICE_LIST_CURRENT_FRAME[] = "CU_GL_DEVICE_LIST_CURRENT_FRAME";
static const char __pyx_k_CU_GRAPHICS_REGISTER_FLAGS_NONE[] = "CU_GRAPHICS_REGISTER_FLAGS_NONE";
static const char __pyx_k_CU_GRAPHICS_REGISTER_FLAGS_READ[] = "CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL[] = "CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY[] = "CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET[] = "CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS";
static const char __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_NODE[] = "CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED";
static const char __pyx_k_CU_GRAPH_MEM_ATTR_USED_MEM_HIGH[] = "CU_GRAPH_MEM_ATTR_USED_MEM_HIGH";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_BATCH_MEM_OP[] = "CU_GRAPH_NODE_TYPE_BATCH_MEM_OP";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_EVENT_RECORD[] = "CU_GRAPH_NODE_TYPE_EVENT_RECORD";
static const char __pyx_k_CU_KERNEL_NODE_ATTRIBUTE_ACCESS[] = "CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW";
static const char __pyx_k_CU_LAUNCH_ATTRIBUTE_COOPERATIVE[] = "CU_LAUNCH_ATTRIBUTE_COOPERATIVE";
static const char __pyx_k_CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH[] = "CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH";
static const char __pyx_k_CU_MEM_ADVISE_UNSET_ACCESSED_BY[] = "CU_MEM_ADVISE_UNSET_ACCESSED_BY";
static const char __pyx_k_CU_MEM_ADVISE_UNSET_READ_MOSTLY[] = "CU_MEM_ADVISE_UNSET_READ_MOSTLY";
static const char __pyx_k_CU_MEM_RANGE_ATTRIBUTE_ACCESSED[] = "CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_IS_MANAGED[] = "CU_POINTER_ATTRIBUTE_IS_MANAGED";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_P2P_TOKENS[] = "CU_POINTER_ATTRIBUTE_P2P_TOKENS";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_RANGE_SIZE[] = "CU_POINTER_ATTRIBUTE_RANGE_SIZE";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC1[] = "CU_RES_VIEW_FORMAT_UNSIGNED_BC1";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC2[] = "CU_RES_VIEW_FORMAT_UNSIGNED_BC2";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC3[] = "CU_RES_VIEW_FORMAT_UNSIGNED_BC3";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC4[] = "CU_RES_VIEW_FORMAT_UNSIGNED_BC4";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC5[] = "CU_RES_VIEW_FORMAT_UNSIGNED_BC5";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC7[] = "CU_RES_VIEW_FORMAT_UNSIGNED_BC7";
static const char __pyx_k_CU_SHARED_MEM_CONFIG_EIGHT_BYTE[] = "CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE";
static const char __pyx_k_CU_STREAM_CAPTURE_STATUS_ACTIVE[] = "CU_STREAM_CAPTURE_STATUS_ACTIVE";
static const char __pyx_k_CU_STREAM_MEM_OP_WRITE_VALUE_32[] = "CU_STREAM_MEM_OP_WRITE_VALUE_32";
static const char __pyx_k_CU_STREAM_MEM_OP_WRITE_VALUE_64[] = "CU_STREAM_MEM_OP_WRITE_VALUE_64";
static const char __pyx_k_CU_STREAM_WRITE_VALUE_NO_MEMORY[] = "CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u";
static const char __pyx_k_CUeglFrame_st___setstate_cython[] = "CUeglFrame_st.__setstate_cython__";
static const char __pyx_k_CUeglFrame_v1_CUeglFrame_v1_CUe[] = "_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u";
static const char __pyx_k_CUexecAffinityParam_st___reduce[] = "CUexecAffinityParam_st.__reduce_cython__";
static const char __pyx_k_CUexecAffinityParam_v1_CUexecAf[] = "_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u";
static const char __pyx_k_CUexecAffinitySmCount_st_getPtr[] = "CUexecAffinitySmCount_st.getPtr";
static const char __pyx_k_CUflushGPUDirectRDMAWritesScope[] = "CUflushGPUDirectRDMAWritesScope";
static const char __pyx_k_CUlaunchAttributeValue_CUlaunch[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s";
static const char __pyx_k_CUlaunchAttribute_st___setstate[] = "CUlaunchAttribute_st.__setstate_cython__";
static const char __pyx_k_CUmemAllocationProp_st___reduce[] = "CUmemAllocationProp_st.__reduce_cython__";
static const char __pyx_k_CUmemAllocationProp_v1_CUmemAll[] = "_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s";
static const char __pyx_k_CUmemGenericAllocationHandle_v1[] = "<CUmemGenericAllocationHandle_v1 ";
static const char __pyx_k_CUstreamMemOpWaitValueParams_st[] = "CUstreamMemOpWaitValueParams_st";
static const char __pyx_k_CUsurfObject_v1___reduce_cython[] = "CUsurfObject_v1.__reduce_cython__";
static const char __pyx_k_Cluster_scheduling_policies_The[] = "\n    Cluster scheduling policies. These may be passed to\n    :py:obj:`~.cuFuncSetAttribute`\n    ";
static const char __pyx_k_Cubin_matching_fallback_strateg[] = "\n    Cubin matching fallback strategies\n    ";
static const char __pyx_k_Defines_the_allocation_types_av[] = "\n    Defines the allocation types available\n    ";
static const char __pyx_k_External_semaphore_handle_types[] = "\n    External semaphore handle types\n    ";
static const char __pyx_k_Flag_for_requesting_different_o[] = "\n    Flag for requesting different optimal and required granularities\n    for an allocation.\n    ";
static const char __pyx_k_Flags_for_instantiating_a_graph[] = "\n    Flags for instantiating a graph\n    ";
static const char __pyx_k_Flags_for_mapping_and_unmapping[] = "\n    Flags for mapping and unmapping interop resources\n    ";
static const char __pyx_k_Flags_for_py_obj_cuStreamMemory[] = "\n    Flags for :py:obj:`~.cuStreamMemoryBarrier`\n    ";
static const char __pyx_k_Flags_for_py_obj_cuStreamUpdate[] = "\n    Flags for :py:obj:`~.cuStreamUpdateCaptureDependencies`\n    ";
static const char __pyx_k_Flags_for_py_obj_cuStreamWaitVa[] = "\n    Flags for :py:obj:`~.cuStreamWaitValue32` and\n    :py:obj:`~.cuStreamWaitValue64`\n    ";
static const char __pyx_k_Flags_for_py_obj_cuStreamWriteV[] = "\n    Flags for :py:obj:`~.cuStreamWriteValue32`\n    ";
static const char __pyx_k_Flags_for_retaining_user_object[] = "\n    Flags for retaining user object references for graphs\n    ";
static const char __pyx_k_Flags_for_specifying_particular[] = "\n    Flags for specifying particular handle types\n    ";
static const char __pyx_k_Flags_for_user_objects_for_grap[] = "\n    Flags for user objects for graphs\n    ";
static const char __pyx_k_Flags_to_map_or_unmap_a_resourc[] = "\n    Flags to map or unmap a resource\n    ";
static const char __pyx_k_Flags_to_register_a_graphics_re[] = "\n    Flags to register a graphics resource\n    ";
static const char __pyx_k_Flags_to_specify_search_options[] = "\n    Flags to specify search options. For more details see\n    :py:obj:`~.cuGetProcAddress`\n    ";
static const char __pyx_k_Online_compiler_and_linker_opti[] = "\n    Online compiler and linker options\n    ";
static const char __pyx_k_Operations_for_py_obj_cuStreamB[] = "\n    Operations for :py:obj:`~.cuStreamBatchMemOp`\n    ";
static const char __pyx_k_Platform_native_ordering_for_GP[] = "\n    Platform native ordering for GPUDirect RDMA writes\n    ";
static const char __pyx_k_Possible_modes_for_stream_captu[] = "\n    Possible modes for stream capture thread interactions. For more\n    details see :py:obj:`~.cuStreamBeginCapture` and\n    :py:obj:`~.cuThreadExchangeStreamCaptureMode`\n    ";
static const char __pyx_k_Possible_stream_capture_statuse[] = "\n    Possible stream capture statuses returned by\n    :py:obj:`~.cuStreamIsCapturing`\n    ";
static const char __pyx_k_Shared_memory_carveout_configur[] = "\n    Shared memory carveout configurations. These may be passed to\n    :py:obj:`~.cuFuncSetAttribute`\n    ";
static const char __pyx_k_Specifies_compression_attribute[] = "\n    Specifies compression attribute for an allocation.\n    ";
static const char __pyx_k_Specifies_performance_hint_with[] = "\n    Specifies performance hint with :py:obj:`~.CUaccessPolicyWindow`\n    for hitProp and missProp members.\n    ";
static const char __pyx_k_Specifies_the_handle_type_for_a[] = "\n    Specifies the handle type for address range\n    ";
static const char __pyx_k_Specifies_the_memory_protection[] = "\n    Specifies the memory protection flags for mapping.\n    ";
static const char __pyx_k_Texture_reference_addressing_mo[] = "\n    Texture reference addressing modes\n    ";
static const char __pyx_k_Texture_reference_filtering_mod[] = "\n    Texture reference filtering modes\n    ";
static const char __pyx_k_The_additional_write_options_fo[] = "\n    The additional write options for :py:obj:`~.cuGraphDebugDotPrint`\n    ";
static const char __pyx_k_The_scopes_for_py_obj_cuFlushGP[] = "\n    The scopes for :py:obj:`~.cuFlushGPUDirectRDMAWrites`\n    ";
static const char __pyx_k_The_targets_for_py_obj_cuFlushG[] = "\n    The targets for :py:obj:`~.cuFlushGPUDirectRDMAWrites`\n    ";
static const char __pyx_k_VdpVideoSurface___reduce_cython[] = "VdpVideoSurface.__reduce_cython__";
static const char __pyx_k_cuEGLStreamConsumerAcquireFrame[] = "cuEGLStreamConsumerAcquireFrame";
static const char __pyx_k_cuEGLStreamConsumerReleaseFrame[] = "cuEGLStreamConsumerReleaseFrame";
static const char __pyx_k_cuEGLStreamProducerPresentFrame[] = "cuEGLStreamProducerPresentFrame";
static const char __pyx_k_cuExternalMemoryGetMappedBuffer[] = "cuExternalMemoryGetMappedBuffer";
static const char __pyx_k_cuGraphAddBatchMemOpNode_locals[] = "cuGraphAddBatchMemOpNode.<locals>.genexpr";
static const char __pyx_k_cuGraphAddChildGraphNode_locals[] = "cuGraphAddChildGraphNode.<locals>.genexpr";
static const char __pyx_k_cuGraphKernelNodeCopyAttributes[] = "cuGraphKernelNodeCopyAttributes";
static const char __pyx_k_cuSignalExternalSemaphoresAsync[] = "cuSignalExternalSemaphoresAsync.<locals>.genexpr";
static const char __pyx_k_Argument_attributes_is_not_insta[] = "Argument 'attributes' is not instance of type (expected List[ccuda.CUmem_range_attribute]";
static const char __pyx_k_Argument_conn_is_not_instance_of[] = "Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found ";
static const char __pyx_k_Argument_dataSizes_is_not_instan[] = "Argument 'dataSizes' is not instance of type (expected List[int]";
static const char __pyx_k_Argument_dependencies_is_not_ins[] = "Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]";
static const char __pyx_k_Argument_desc_is_not_instance_of[] = "Argument 'desc' is not instance of type (expected List[ccuda.CUmemAccessDesc]";
static const char __pyx_k_Argument_extSemArray_is_not_inst[] = "Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]";
static const char __pyx_k_Argument_from__is_not_instance_o[] = "Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]";
static const char __pyx_k_Argument_launchParamsList_is_not[] = "Argument 'launchParamsList' is not instance of type (expected List[ccuda.CUDA_LAUNCH_PARAMS]";
static const char __pyx_k_Argument_mapInfoList_is_not_inst[] = "Argument 'mapInfoList' is not instance of type (expected List[ccuda.CUarrayMapInfo]";
static const char __pyx_k_Argument_options_is_not_instance[] = "Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]";
static const char __pyx_k_Argument_pCudaResource_is_not_in[] = "Argument 'pCudaResource' is not instance of type (expected <class 'int, cuda.CUgraphicsResource'>, found ";
static const char __pyx_k_Argument_pStream_is_not_instance[] = "Argument 'pStream' is not instance of type (expected <class 'int, cuda.CUstream'>, found ";
static const char __pyx_k_Argument_paramArray_is_not_insta[] = "Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]";
static const char __pyx_k_Argument_paramsArray_is_not_inst[] = "Argument 'paramsArray' is not instance of type (expected List[ccuda.CUexecAffinityParam]";
static const char __pyx_k_Argument_resources_is_not_instan[] = "Argument 'resources' is not instance of type (expected <class 'int, cuda.CUgraphicsResource'>, found ";
static const char __pyx_k_Argument_to_is_not_instance_of_t[] = "Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]";
static const char __pyx_k_Argument_vdpGetProcAddress_is_no[] = "Argument 'vdpGetProcAddress' is not instance of type (expected <class 'int, cuda.VdpGetProcAddress'>, found ";
static const char __pyx_k_CUDA_ARRAY3D_DESCRIPTOR_st___red[] = "CUDA_ARRAY3D_DESCRIPTOR_st.__reduce_cython__";
static const char __pyx_k_CUDA_ARRAY3D_DESCRIPTOR_st___set[] = "CUDA_ARRAY3D_DESCRIPTOR_st.__setstate_cython__";
static const char __pyx_k_CUDA_ARRAY3D_DESCRIPTOR_st_getPt[] = "CUDA_ARRAY3D_DESCRIPTOR_st.getPtr";
static const char __pyx_k_CUDA_ARRAY_DESCRIPTOR_st___reduc[] = "CUDA_ARRAY_DESCRIPTOR_st.__reduce_cython__";
static const char __pyx_k_CUDA_ARRAY_DESCRIPTOR_st___setst[] = "CUDA_ARRAY_DESCRIPTOR_st.__setstate_cython__";
static const char __pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_s[] = "CUDA_ARRAY_MEMORY_REQUIREMENTS_st";
static const char __pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_v[] = "CUDA_ARRAY_MEMORY_REQUIREMENTS_v1";
static const char __pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS_st[] = "CUDA_BATCH_MEM_OP_NODE_PARAMS_st";
static const char __pyx_k_CUDA_COOPERATIVE_LAUNCH_MULTI_DE[] = "CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC";
static const char __pyx_k_CUDA_ERROR_CONTEXT_ALREADY_CURRE[] = "CUDA_ERROR_CONTEXT_ALREADY_CURRENT";
static const char __pyx_k_CUDA_ERROR_CONTEXT_ALREADY_IN_US[] = "CUDA_ERROR_CONTEXT_ALREADY_IN_USE";
static const char __pyx_k_CUDA_ERROR_COOPERATIVE_LAUNCH_TO[] = "CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE";
static const char __pyx_k_CUDA_ERROR_GRAPH_EXEC_UPDATE_FAI[] = "CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE";
static const char __pyx_k_CUDA_ERROR_HOST_MEMORY_ALREADY_R[] = "CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED";
static const char __pyx_k_CUDA_ERROR_HOST_MEMORY_NOT_REGIS[] = "CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED";
static const char __pyx_k_CUDA_ERROR_INVALID_ADDRESS_SPACE[] = "CUDA_ERROR_INVALID_ADDRESS_SPACE";
static const char __pyx_k_CUDA_ERROR_INVALID_GRAPHICS_CONT[] = "CUDA_ERROR_INVALID_GRAPHICS_CONTEXT";
static const char __pyx_k_CUDA_ERROR_JIT_COMPILATION_DISAB[] = "CUDA_ERROR_JIT_COMPILATION_DISABLED";
static const char __pyx_k_CUDA_ERROR_JIT_COMPILER_NOT_FOUN[] = "CUDA_ERROR_JIT_COMPILER_NOT_FOUND";
static const char __pyx_k_CUDA_ERROR_LAUNCH_INCOMPATIBLE_T[] = "CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING";
static const char __pyx_k_CUDA_ERROR_LAUNCH_OUT_OF_RESOURC[] = "CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES";
static const char __pyx_k_CUDA_ERROR_MPS_CLIENT_TERMINATED[] = "CUDA_ERROR_MPS_CLIENT_TERMINATED";
static const char __pyx_k_CUDA_ERROR_MPS_CONNECTION_FAILED[] = "CUDA_ERROR_MPS_CONNECTION_FAILED";
static const char __pyx_k_CUDA_ERROR_MPS_MAX_CLIENTS_REACH[] = "CUDA_ERROR_MPS_MAX_CLIENTS_REACHED";
static const char __pyx_k_CUDA_ERROR_MPS_MAX_CONNECTIONS_R[] = "CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED";
static const char __pyx_k_CUDA_ERROR_NOT_MAPPED_AS_POINTER[] = "CUDA_ERROR_NOT_MAPPED_AS_POINTER";
static const char __pyx_k_CUDA_ERROR_PEER_ACCESS_ALREADY_E[] = "CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED";
static const char __pyx_k_CUDA_ERROR_PEER_ACCESS_NOT_ENABL[] = "CUDA_ERROR_PEER_ACCESS_NOT_ENABLED";
static const char __pyx_k_CUDA_ERROR_PEER_ACCESS_UNSUPPORT[] = "CUDA_ERROR_PEER_ACCESS_UNSUPPORTED";
static const char __pyx_k_CUDA_ERROR_PRIMARY_CONTEXT_ACTIV[] = "CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE";
static const char __pyx_k_CUDA_ERROR_PROFILER_ALREADY_STAR[] = "CUDA_ERROR_PROFILER_ALREADY_STARTED";
static const char __pyx_k_CUDA_ERROR_PROFILER_ALREADY_STOP[] = "CUDA_ERROR_PROFILER_ALREADY_STOPPED";
static const char __pyx_k_CUDA_ERROR_PROFILER_NOT_INITIALI[] = "CUDA_ERROR_PROFILER_NOT_INITIALIZED";
static const char __pyx_k_CUDA_ERROR_SHARED_OBJECT_INIT_FA[] = "CUDA_ERROR_SHARED_OBJECT_INIT_FAILED";
static const char __pyx_k_CUDA_ERROR_STREAM_CAPTURE_IMPLIC[] = "CUDA_ERROR_STREAM_CAPTURE_IMPLICIT";
static const char __pyx_k_CUDA_ERROR_STREAM_CAPTURE_INVALI[] = "CUDA_ERROR_STREAM_CAPTURE_INVALIDATED";
static const char __pyx_k_CUDA_ERROR_STREAM_CAPTURE_ISOLAT[] = "CUDA_ERROR_STREAM_CAPTURE_ISOLATION";
static const char __pyx_k_CUDA_ERROR_STREAM_CAPTURE_UNJOIN[] = "CUDA_ERROR_STREAM_CAPTURE_UNJOINED";
static const char __pyx_k_CUDA_ERROR_STREAM_CAPTURE_UNMATC[] = "CUDA_ERROR_STREAM_CAPTURE_UNMATCHED";
static const char __pyx_k_CUDA_ERROR_STREAM_CAPTURE_UNSUPP[] = "CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED";
static const char __pyx_k_CUDA_ERROR_SYSTEM_DRIVER_MISMATC[] = "CUDA_ERROR_SYSTEM_DRIVER_MISMATCH";
static const char __pyx_k_CUDA_ERROR_UNSUPPORTED_EXEC_AFFI[] = "CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY";
static const char __pyx_k_CUDA_ERROR_UNSUPPORTED_PTX_VERSI[] = "CUDA_ERROR_UNSUPPORTED_PTX_VERSION";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC[] = "CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC[] = "CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A[] = "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_2[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_3[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_4[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_5[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_6[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_7[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_8[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D[] = "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_2[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_3[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_4[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_5[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_6[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_7[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_8[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_9[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P[] = "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_S[] = "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR[] = "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKI[] = "CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC";
static const char __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st[] = "CUDA_EXT_SEM_WAIT_NODE_PARAMS_st";
static const char __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1[] = "CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1";
static const char __pyx_k_CUDA_GRAPH_INSTANTIATE_FLAG_AUTO[] = "CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH";
static const char __pyx_k_CUDA_HOST_NODE_PARAMS_st___reduc[] = "CUDA_HOST_NODE_PARAMS_st.__reduce_cython__";
static const char __pyx_k_CUDA_HOST_NODE_PARAMS_st___setst[] = "CUDA_HOST_NODE_PARAMS_st.__setstate_cython__";
static const char __pyx_k_CUDA_KERNEL_NODE_PARAMS_st___red[] = "CUDA_KERNEL_NODE_PARAMS_st.__reduce_cython__";
static const char __pyx_k_CUDA_KERNEL_NODE_PARAMS_st___set[] = "CUDA_KERNEL_NODE_PARAMS_st.__setstate_cython__";
static const char __pyx_k_CUDA_KERNEL_NODE_PARAMS_st_getPt[] = "CUDA_KERNEL_NODE_PARAMS_st.getPtr";
static const char __pyx_k_CUDA_LAUNCH_PARAMS_st___reduce_c[] = "CUDA_LAUNCH_PARAMS_st.__reduce_cython__";
static const char __pyx_k_CUDA_LAUNCH_PARAMS_st___setstate[] = "CUDA_LAUNCH_PARAMS_st.__setstate_cython__";
static const char __pyx_k_CUDA_MEMCPY2D_st___reduce_cython[] = "CUDA_MEMCPY2D_st.__reduce_cython__";
static const char __pyx_k_CUDA_MEMCPY2D_st___setstate_cyth[] = "CUDA_MEMCPY2D_st.__setstate_cython__";
static const char __pyx_k_CUDA_MEMCPY3D_PEER_st___reduce_c[] = "CUDA_MEMCPY3D_PEER_st.__reduce_cython__";
static const char __pyx_k_CUDA_MEMCPY3D_PEER_st___setstate[] = "CUDA_MEMCPY3D_PEER_st.__setstate_cython__";
static const char __pyx_k_CUDA_MEMCPY3D_st___reduce_cython[] = "CUDA_MEMCPY3D_st.__reduce_cython__";
static const char __pyx_k_CUDA_MEMCPY3D_st___setstate_cyth[] = "CUDA_MEMCPY3D_st.__setstate_cython__";
static const char __pyx_k_CUDA_MEMSET_NODE_PARAMS_st___red[] = "CUDA_MEMSET_NODE_PARAMS_st.__reduce_cython__";
static const char __pyx_k_CUDA_MEMSET_NODE_PARAMS_st___set[] = "CUDA_MEMSET_NODE_PARAMS_st.__setstate_cython__";
static const char __pyx_k_CUDA_MEMSET_NODE_PARAMS_st_getPt[] = "CUDA_MEMSET_NODE_PARAMS_st.getPtr";
static const char __pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS_st_ge[] = "CUDA_MEM_ALLOC_NODE_PARAMS_st.getPtr";
static const char __pyx_k_CUDA_POINTER_ATTRIBUTE_ACCESS_FL[] = "CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS";
static const char __pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN[] = "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st";
static const char __pyx_k_CUDA_RESOURCE_DESC_st___reduce_c[] = "CUDA_RESOURCE_DESC_st.__reduce_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_st___setstate[] = "CUDA_RESOURCE_DESC_st.__setstate_cython__";
static const char __pyx_k_CUDA_RESOURCE_VIEW_DESC_st___red[] = "CUDA_RESOURCE_VIEW_DESC_st.__reduce_cython__";
static const char __pyx_k_CUDA_RESOURCE_VIEW_DESC_st___set[] = "CUDA_RESOURCE_VIEW_DESC_st.__setstate_cython__";
static const char __pyx_k_CUDA_RESOURCE_VIEW_DESC_st_getPt[] = "CUDA_RESOURCE_VIEW_DESC_st.getPtr";
static const char __pyx_k_CUDA_TEXTURE_DESC_st___reduce_cy[] = "CUDA_TEXTURE_DESC_st.__reduce_cython__";
static const char __pyx_k_CU_ARRAY_SPARSE_PROPERTIES_SINGL[] = "CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL";
static const char __pyx_k_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE[] = "CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL";
static const char __pyx_k_CU_CLUSTER_SCHEDULING_POLICY_DEF[] = "CU_CLUSTER_SCHEDULING_POLICY_DEFAULT";
static const char __pyx_k_CU_CLUSTER_SCHEDULING_POLICY_LOA[] = "CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING";
static const char __pyx_k_CU_CLUSTER_SCHEDULING_POLICY_SPR[] = "CU_CLUSTER_SCHEDULING_POLICY_SPREAD";
static const char __pyx_k_CU_COMPUTEMODE_EXCLUSIVE_PROCESS[] = "CU_COMPUTEMODE_EXCLUSIVE_PROCESS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE[] = "CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_FLUSH_RE[] = "CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST[] = "CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GA[] = "CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_64_B[] = "CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_HOST[] = "CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE[] = "CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CLUSTER_LAUN[] = "CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPA[] = "CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_COMPUTE_MODE[] = "CU_DEVICE_ATTRIBUTE_COMPUTE_MODE";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_COMPUTE_PREE[] = "CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CONCURRENT_K[] = "CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CONCURRENT_M[] = "CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_DEFERRED_MAP[] = "CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_DIRECT_MANAG[] = "CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPP[] = "CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_GENERIC_COMP[] = "CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CA[] = "CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_GLOBAL_MEMOR[] = "CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R[] = "CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_HOST_REGISTE[] = "CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZ[] = "CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_LOCAL_L1_CAC[] = "CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MANAGED_MEMO[] = "CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_ACCESS_P[] = "CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_P[] = "CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI[] = "CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM[] = "CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_PERSISTI[] = "CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_REGISTER[] = "CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M[] = "CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK[] = "CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MEMORY_POOLS[] = "CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPP[] = "CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MULTIPROCESS[] = "CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BO[] = "CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEM[] = "CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_PCI_DEVICE_I[] = "CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_I[] = "CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_READ_ONLY_HO[] = "CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_REGISTERS_PE[] = "CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_RESERVED_SHA[] = "CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_SHARED_MEMOR[] = "CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_SINGLE_TO_DO[] = "CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_STREAM_PRIOR[] = "CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_SURFACE_ALIG[] = "CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_TEXTURE_ALIG[] = "CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_TEXTURE_PITC[] = "CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_TIMELINE_SEM[] = "CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_TOTAL_CONSTA[] = "CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_UNIFIED_ADDR[] = "CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDR[] = "CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMO[] = "CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED";
static const char __pyx_k_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_A[] = "CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED";
static const char __pyx_k_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_S[] = "CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED";
static const char __pyx_k_CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARR[] = "CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED";
static const char __pyx_k_CU_DEVICE_P2P_ATTRIBUTE_NATIVE_A[] = "CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED";
static const char __pyx_k_CU_DEVICE_P2P_ATTRIBUTE_PERFORMA[] = "CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_BGGR[] = "CU_EGL_COLOR_FORMAT_BAYER10_BGGR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_CCCC[] = "CU_EGL_COLOR_FORMAT_BAYER10_CCCC";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_GBRG[] = "CU_EGL_COLOR_FORMAT_BAYER10_GBRG";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_GRBG[] = "CU_EGL_COLOR_FORMAT_BAYER10_GRBG";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_RGGB[] = "CU_EGL_COLOR_FORMAT_BAYER10_RGGB";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_BCCR[] = "CU_EGL_COLOR_FORMAT_BAYER12_BCCR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_BGGR[] = "CU_EGL_COLOR_FORMAT_BAYER12_BGGR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_CBRC[] = "CU_EGL_COLOR_FORMAT_BAYER12_CBRC";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_CCCC[] = "CU_EGL_COLOR_FORMAT_BAYER12_CCCC";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_CRBC[] = "CU_EGL_COLOR_FORMAT_BAYER12_CRBC";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_GBRG[] = "CU_EGL_COLOR_FORMAT_BAYER12_GBRG";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_GRBG[] = "CU_EGL_COLOR_FORMAT_BAYER12_GRBG";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_RCCB[] = "CU_EGL_COLOR_FORMAT_BAYER12_RCCB";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_RGGB[] = "CU_EGL_COLOR_FORMAT_BAYER12_RGGB";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER14_BGGR[] = "CU_EGL_COLOR_FORMAT_BAYER14_BGGR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER14_GBRG[] = "CU_EGL_COLOR_FORMAT_BAYER14_GBRG";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER14_GRBG[] = "CU_EGL_COLOR_FORMAT_BAYER14_GRBG";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER14_RGGB[] = "CU_EGL_COLOR_FORMAT_BAYER14_RGGB";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER20_BGGR[] = "CU_EGL_COLOR_FORMAT_BAYER20_BGGR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER20_GBRG[] = "CU_EGL_COLOR_FORMAT_BAYER20_GBRG";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER20_GRBG[] = "CU_EGL_COLOR_FORMAT_BAYER20_GRBG";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER20_RGGB[] = "CU_EGL_COLOR_FORMAT_BAYER20_RGGB";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_ISP_BG[] = "CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_ISP_GB[] = "CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_ISP_GR[] = "CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_ISP_RG[] = "CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42[] = "CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_44[] = "CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_42[] = "CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_44[] = "CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_PLANA[] = "CU_EGL_COLOR_FORMAT_YUV420_PLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_SEMIP[] = "CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV422_PLANA[] = "CU_EGL_COLOR_FORMAT_YUV422_PLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV422_SEMIP[] = "CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV444_PLANA[] = "CU_EGL_COLOR_FORMAT_YUV444_PLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV444_SEMIP[] = "CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_PLANA[] = "CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_SEMIP[] = "CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU422_PLANA[] = "CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU422_SEMIP[] = "CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU444_PLANA[] = "CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU444_SEMIP[] = "CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR";
static const char __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D[] = "CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP";
static const char __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_N[] = "CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF";
static const char __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O[] = "CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD";
static const char __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP[] = "CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_BINARY_VERSION[] = "CU_FUNC_ATTRIBUTE_BINARY_VERSION";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDU[] = "CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_M[] = "CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_CONST_SIZE_BYT[] = "CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYT[] = "CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SH[] = "CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_MAX_THREADS_PE[] = "CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_NON_PORTABLE_C[] = "CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_PREFERRED_SHAR[] = "CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST[] = "CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_SHARED_SIZE_BY[] = "CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES";
static const char __pyx_k_CU_GET_PROC_ADDRESS_LEGACY_STREA[] = "CU_GET_PROC_ADDRESS_LEGACY_STREAM";
static const char __pyx_k_CU_GET_PROC_ADDRESS_PER_THREAD_D[] = "CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM";
static const char __pyx_k_CU_GL_MAP_RESOURCE_FLAGS_READ_ON[] = "CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY";
static const char __pyx_k_CU_GL_MAP_RESOURCE_FLAGS_WRITE_D[] = "CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD";
static const char __pyx_k_CU_GPU_DIRECT_RDMA_WRITES_ORDERI[] = "CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE";
static const char __pyx_k_CU_GRAPHICS_MAP_RESOURCE_FLAGS_N[] = "CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE";
static const char __pyx_k_CU_GRAPHICS_MAP_RESOURCE_FLAGS_R[] = "CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY";
static const char __pyx_k_CU_GRAPHICS_MAP_RESOURCE_FLAGS_W[] = "CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD";
static const char __pyx_k_CU_GRAPHICS_REGISTER_FLAGS_SURFA[] = "CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST";
static const char __pyx_k_CU_GRAPHICS_REGISTER_FLAGS_TEXTU[] = "CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER";
static const char __pyx_k_CU_GRAPHICS_REGISTER_FLAGS_WRITE[] = "CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_M[] = "CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_N[] = "CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEM[] = "CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES[] = "CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NO[] = "CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALL[] = "CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FRE[] = "CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME[] = "CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE[] = "CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE";
static const char __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_ATTRI[] = "CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED";
static const char __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_FUNCT[] = "CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED";
static const char __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_NOT_S[] = "CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED";
static const char __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_PARAM[] = "CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED";
static const char __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_TOPOL[] = "CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED";
static const char __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_UNSUP[] = "CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE";
static const char __pyx_k_CU_GRAPH_MEM_ATTR_RESERVED_MEM_C[] = "CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT";
static const char __pyx_k_CU_GRAPH_MEM_ATTR_RESERVED_MEM_H[] = "CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH";
static const char __pyx_k_CU_GRAPH_MEM_ATTR_USED_MEM_CURRE[] = "CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIG[] = "CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL";
static const char __pyx_k_CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAI[] = "CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT";
static const char __pyx_k_CU_IPC_MEM_LAZY_ENABLE_PEER_ACCE[] = "CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS";
static const char __pyx_k_CU_JIT_ERROR_LOG_BUFFER_SIZE_BYT[] = "CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES";
static const char __pyx_k_CU_JIT_INFO_LOG_BUFFER_SIZE_BYTE[] = "CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES";
static const char __pyx_k_CU_JIT_OPTIMIZE_UNUSED_DEVICE_VA[] = "CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES";
static const char __pyx_k_CU_JIT_REFERENCED_VARIABLE_COUNT[] = "CU_JIT_REFERENCED_VARIABLE_COUNT";
static const char __pyx_k_CU_JIT_REFERENCED_VARIABLE_NAMES[] = "CU_JIT_REFERENCED_VARIABLE_NAMES";
static const char __pyx_k_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER[] = "CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION";
static const char __pyx_k_CU_KERNEL_NODE_ATTRIBUTE_COOPERA[] = "CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE";
static const char __pyx_k_CU_KERNEL_NODE_ATTRIBUTE_PRIORIT[] = "CU_KERNEL_NODE_ATTRIBUTE_PRIORITY";
static const char __pyx_k_CU_LAUNCH_ATTRIBUTE_ACCESS_POLIC[] = "CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW";
static const char __pyx_k_CU_LAUNCH_ATTRIBUTE_CLUSTER_DIME[] = "CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION";
static const char __pyx_k_CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHE[] = "CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE";
static const char __pyx_k_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC[] = "CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION";
static const char __pyx_k_CU_LAUNCH_ATTRIBUTE_SYNCHRONIZAT[] = "CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY";
static const char __pyx_k_CU_LAUNCH_PARAM_BUFFER_POINTER_A[] = "CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT";
static const char __pyx_k_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_I[] = "CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT";
static const char __pyx_k_CU_LIMIT_DEV_RUNTIME_PENDING_LAU[] = "CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT";
static const char __pyx_k_CU_LIMIT_MAX_L2_FETCH_GRANULARIT[] = "CU_LIMIT_MAX_L2_FETCH_GRANULARITY";
static const char __pyx_k_CU_LIMIT_PERSISTING_L2_CACHE_SIZ[] = "CU_LIMIT_PERSISTING_L2_CACHE_SIZE";
static const char __pyx_k_CU_MEMPOOL_ATTR_RELEASE_THRESHOL[] = "CU_MEMPOOL_ATTR_RELEASE_THRESHOLD";
static const char __pyx_k_CU_MEMPOOL_ATTR_RESERVED_MEM_CUR[] = "CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT";
static const char __pyx_k_CU_MEMPOOL_ATTR_RESERVED_MEM_HIG[] = "CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH";
static const char __pyx_k_CU_MEMPOOL_ATTR_REUSE_ALLOW_INTE[] = "CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES";
static const char __pyx_k_CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPO[] = "CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC";
static const char __pyx_k_CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVE[] = "CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES";
static const char __pyx_k_CU_MEMPOOL_ATTR_USED_MEM_CURRENT[] = "CU_MEMPOOL_ATTR_USED_MEM_CURRENT";
static const char __pyx_k_CU_MEM_ACCESS_FLAGS_PROT_READWRI[] = "CU_MEM_ACCESS_FLAGS_PROT_READWRITE";
static const char __pyx_k_CU_MEM_ADVISE_SET_PREFERRED_LOCA[] = "CU_MEM_ADVISE_SET_PREFERRED_LOCATION";
static const char __pyx_k_CU_MEM_ADVISE_UNSET_PREFERRED_LO[] = "CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION";
static const char __pyx_k_CU_MEM_ALLOC_GRANULARITY_MINIMUM[] = "CU_MEM_ALLOC_GRANULARITY_MINIMUM";
static const char __pyx_k_CU_MEM_ALLOC_GRANULARITY_RECOMME[] = "CU_MEM_ALLOC_GRANULARITY_RECOMMENDED";
static const char __pyx_k_CU_MEM_HANDLE_TYPE_POSIX_FILE_DE[] = "CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR";
static const char __pyx_k_CU_MEM_RANGE_ATTRIBUTE_LAST_PREF[] = "CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION";
static const char __pyx_k_CU_MEM_RANGE_ATTRIBUTE_PREFERRED[] = "CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION";
static const char __pyx_k_CU_MEM_RANGE_ATTRIBUTE_READ_MOST[] = "CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY";
static const char __pyx_k_CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF[] = "CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD";
static const char __pyx_k_CU_OCCUPANCY_DISABLE_CACHING_OVE[] = "CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_ACCESS_FLAG[] = "CU_POINTER_ATTRIBUTE_ACCESS_FLAGS";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_ALLOWED_HAN[] = "CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_DEVICE_ORDI[] = "CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_DEVICE_POIN[] = "CU_POINTER_ATTRIBUTE_DEVICE_POINTER";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_HOST_POINTE[] = "CU_POINTER_ATTRIBUTE_HOST_POINTER";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_IS_GPU_DIRE[] = "CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_IS_LEGACY_C[] = "CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_MAPPING_BAS[] = "CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_MAPPING_SIZ[] = "CU_POINTER_ATTRIBUTE_MAPPING_SIZE";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_MEMORY_BLOC[] = "CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_MEMORY_TYPE[] = "CU_POINTER_ATTRIBUTE_MEMORY_TYPE";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_MEMPOOL_HAN[] = "CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_RANGE_START[] = "CU_POINTER_ATTRIBUTE_RANGE_START_ADDR";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_SYNC_MEMOPS[] = "CU_POINTER_ATTRIBUTE_SYNC_MEMOPS";
static const char __pyx_k_CU_RESOURCE_TYPE_MIPMAPPED_ARRAY[] = "CU_RESOURCE_TYPE_MIPMAPPED_ARRAY";
static const char __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC6H[] = "CU_RES_VIEW_FORMAT_UNSIGNED_BC6H";
static const char __pyx_k_CU_SHAREDMEM_CARVEOUT_MAX_SHARED[] = "CU_SHAREDMEM_CARVEOUT_MAX_SHARED";
static const char __pyx_k_CU_SHARED_MEM_CONFIG_DEFAULT_BAN[] = "CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE";
static const char __pyx_k_CU_SHARED_MEM_CONFIG_FOUR_BYTE_B[] = "CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE";
static const char __pyx_k_CU_STREAM_ADD_CAPTURE_DEPENDENCI[] = "CU_STREAM_ADD_CAPTURE_DEPENDENCIES";
static const char __pyx_k_CU_STREAM_ATTRIBUTE_ACCESS_POLIC[] = "CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW";
static const char __pyx_k_CU_STREAM_ATTRIBUTE_SYNCHRONIZAT[] = "CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY";
static const char __pyx_k_CU_STREAM_CAPTURE_MODE_THREAD_LO[] = "CU_STREAM_CAPTURE_MODE_THREAD_LOCAL";
static const char __pyx_k_CU_STREAM_CAPTURE_STATUS_INVALID[] = "CU_STREAM_CAPTURE_STATUS_INVALIDATED";
static const char __pyx_k_CU_STREAM_MEMORY_BARRIER_TYPE_GP[] = "CU_STREAM_MEMORY_BARRIER_TYPE_GPU";
static const char __pyx_k_CU_STREAM_MEMORY_BARRIER_TYPE_SY[] = "CU_STREAM_MEMORY_BARRIER_TYPE_SYS";
static const char __pyx_k_CU_STREAM_MEM_OP_FLUSH_REMOTE_WR[] = "CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES";
static const char __pyx_k_CU_STREAM_SET_CAPTURE_DEPENDENCI[] = "CU_STREAM_SET_CAPTURE_DEPENDENCIES";
static const char __pyx_k_CU_TRSF_DISABLE_TRILINEAR_OPTIMI[] = "CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION";
static const char __pyx_k_CU_USER_OBJECT_NO_DESTRUCTOR_SYN[] = "CU_USER_OBJECT_NO_DESTRUCTOR_SYNC";
static const char __pyx_k_CUaccessPolicyWindow_st___reduce[] = "CUaccessPolicyWindow_st.__reduce_cython__";
static const char __pyx_k_CUaccessPolicyWindow_st___setsta[] = "CUaccessPolicyWindow_st.__setstate_cython__";
static const char __pyx_k_CUarrayMapInfo_st___reduce_cytho[] = "CUarrayMapInfo_st.__reduce_cython__";
static const char __pyx_k_CUarrayMapInfo_st___setstate_cyt[] = "CUarrayMapInfo_st.__setstate_cython__";
static const char __pyx_k_CUdeviceptr_v2___setstate_cython[] = "CUdeviceptr_v2.__setstate_cython__";
static const char __pyx_k_CUeglStreamConnection___reduce_c[] = "CUeglStreamConnection.__reduce_cython__";
static const char __pyx_k_CUeglStreamConnection___setstate[] = "CUeglStreamConnection.__setstate_cython__";
static const char __pyx_k_CUexecAffinityParam_st___setstat[] = "CUexecAffinityParam_st.__setstate_cython__";
static const char __pyx_k_CUexecAffinitySmCount_st___reduc[] = "CUexecAffinitySmCount_st.__reduce_cython__";
static const char __pyx_k_CUexecAffinitySmCount_st___setst[] = "CUexecAffinitySmCount_st.__setstate_cython__";
static const char __pyx_k_CUexternalMemory___reduce_cython[] = "CUexternalMemory.__reduce_cython__";
static const char __pyx_k_CUexternalMemory___setstate_cyth[] = "CUexternalMemory.__setstate_cython__";
static const char __pyx_k_CUexternalSemaphore___reduce_cyt[] = "CUexternalSemaphore.__reduce_cython__";
static const char __pyx_k_CUexternalSemaphore___setstate_c[] = "CUexternalSemaphore.__setstate_cython__";
static const char __pyx_k_CUflushGPUDirectRDMAWritesOption[] = "CUflushGPUDirectRDMAWritesOptions";
static const char __pyx_k_CUflushGPUDirectRDMAWritesTarget[] = "CUflushGPUDirectRDMAWritesTarget";
static const char __pyx_k_CUgraphicsResource___reduce_cyth[] = "CUgraphicsResource.__reduce_cython__";
static const char __pyx_k_CUgraphicsResource___setstate_cy[] = "CUgraphicsResource.__setstate_cython__";
static const char __pyx_k_CUipcEventHandle_st___reduce_cyt[] = "CUipcEventHandle_st.__reduce_cython__";
static const char __pyx_k_CUipcEventHandle_st___setstate_c[] = "CUipcEventHandle_st.__setstate_cython__";
static const char __pyx_k_CUipcMemHandle_st___reduce_cytho[] = "CUipcMemHandle_st.__reduce_cython__";
static const char __pyx_k_CUipcMemHandle_st___setstate_cyt[] = "CUipcMemHandle_st.__setstate_cython__";
static const char __pyx_k_CUlaunchAttributeValue_union___r[] = "CUlaunchAttributeValue_union.__reduce_cython__";
static const char __pyx_k_CUlaunchAttributeValue_union___s[] = "CUlaunchAttributeValue_union.__setstate_cython__";
static const char __pyx_k_CUlaunchAttributeValue_union_get[] = "CUlaunchAttributeValue_union.getPtr";
static const char __pyx_k_CUlaunchAttribute_st___reduce_cy[] = "CUlaunchAttribute_st.__reduce_cython__";
static const char __pyx_k_CUlaunchConfig_st___reduce_cytho[] = "CUlaunchConfig_st.__reduce_cython__";
static const char __pyx_k_CUlaunchConfig_st___setstate_cyt[] = "CUlaunchConfig_st.__setstate_cython__";
static const char __pyx_k_CUmemAccessDesc_st___reduce_cyth[] = "CUmemAccessDesc_st.__reduce_cython__";
static const char __pyx_k_CUmemAccessDesc_st___setstate_cy[] = "CUmemAccessDesc_st.__setstate_cython__";
static const char __pyx_k_CUmemAllocationGranularity_flags[] = "CUmemAllocationGranularity_flags";
static const char __pyx_k_CUmemAllocationProp_st___setstat[] = "CUmemAllocationProp_st.__setstate_cython__";
static const char __pyx_k_CUmemGenericAllocationHandle___r[] = "CUmemGenericAllocationHandle.__reduce_cython__";
static const char __pyx_k_CUmemGenericAllocationHandle___s[] = "CUmemGenericAllocationHandle.__setstate_cython__";
static const char __pyx_k_CUmemGenericAllocationHandle_get[] = "CUmemGenericAllocationHandle.getPtr";
static const char __pyx_k_CUmemLocation_st___reduce_cython[] = "CUmemLocation_st.__reduce_cython__";
static const char __pyx_k_CUmemLocation_st___setstate_cyth[] = "CUmemLocation_st.__setstate_cython__";
static const char __pyx_k_CUmemPoolProps_st___reduce_cytho[] = "CUmemPoolProps_st.__reduce_cython__";
static const char __pyx_k_CUmemPoolProps_st___setstate_cyt[] = "CUmemPoolProps_st.__setstate_cython__";
static const char __pyx_k_CUmemPoolPtrExportData_st___redu[] = "CUmemPoolPtrExportData_st.__reduce_cython__";
static const char __pyx_k_CUmemPoolPtrExportData_st___sets[] = "CUmemPoolPtrExportData_st.__setstate_cython__";
static const char __pyx_k_CUmemPoolPtrExportData_st_getPtr[] = "CUmemPoolPtrExportData_st.getPtr";
static const char __pyx_k_CUmipmappedArray___reduce_cython[] = "CUmipmappedArray.__reduce_cython__";
static const char __pyx_k_CUmipmappedArray___setstate_cyth[] = "CUmipmappedArray.__setstate_cython__";
static const char __pyx_k_CUoccupancyB2DSize___reduce_cyth[] = "CUoccupancyB2DSize.__reduce_cython__";
static const char __pyx_k_CUoccupancyB2DSize___setstate_cy[] = "CUoccupancyB2DSize.__setstate_cython__";
static const char __pyx_k_CUstreamBatchMemOpParams_union_2[] = "CUstreamBatchMemOpParams_union.__reduce_cython__";
static const char __pyx_k_CUstreamBatchMemOpParams_union_3[] = "CUstreamBatchMemOpParams_union.__setstate_cython__";
static const char __pyx_k_CUstreamBatchMemOpParams_union_g[] = "CUstreamBatchMemOpParams_union.getPtr";
static const char __pyx_k_CUstreamCallback___reduce_cython[] = "CUstreamCallback.__reduce_cython__";
static const char __pyx_k_CUstreamCallback___setstate_cyth[] = "CUstreamCallback.__setstate_cython__";
static const char __pyx_k_CUstreamMemOpFlushRemoteWritesPa[] = "CUstreamMemOpFlushRemoteWritesParams_st";
static const char __pyx_k_CUstreamMemOpMemoryBarrierParams[] = "CUstreamMemOpMemoryBarrierParams_st";
static const char __pyx_k_CUstreamMemOpWriteValueParams_st[] = "CUstreamMemOpWriteValueParams_st";
static const char __pyx_k_CUstreamUpdateCaptureDependencie[] = "CUstreamUpdateCaptureDependencies_flags";
static const char __pyx_k_CUsurfObject_v1___setstate_cytho[] = "CUsurfObject_v1.__setstate_cython__";
static const char __pyx_k_CUtexObject_v1___setstate_cython[] = "CUtexObject_v1.__setstate_cython__";
static const char __pyx_k_Failed_to_allocate_length_x_size[] = "Failed to allocate length x size memory: ";
static const char __pyx_k_VdpGetProcAddress___reduce_cytho[] = "VdpGetProcAddress.__reduce_cython__";
static const char __pyx_k_VdpGetProcAddress___setstate_cyt[] = "VdpGetProcAddress.__setstate_cython__";
static const char __pyx_k_VdpOutputSurface___reduce_cython[] = "VdpOutputSurface.__reduce_cython__";
static const char __pyx_k_VdpOutputSurface___setstate_cyth[] = "VdpOutputSurface.__setstate_cython__";
static const char __pyx_k_VdpVideoSurface___setstate_cytho[] = "VdpVideoSurface.__setstate_cython__";
static const char __pyx_k_clusterSchedulingPolicyPreferenc[] = "clusterSchedulingPolicyPreference : ";
static const char __pyx_k_cuDeviceGetTexture1DLinearMaxWid[] = "cuDeviceGetTexture1DLinearMaxWidth";
static const char __pyx_k_cuEGLStreamConsumerConnectWithFl[] = "cuEGLStreamConsumerConnectWithFlags";
static const char __pyx_k_cuExternalMemoryGetMappedMipmapp[] = "cuExternalMemoryGetMappedMipmappedArray";
static const char __pyx_k_cuGraphAddDependencies_locals_ge[] = "cuGraphAddDependencies.<locals>.genexpr";
static const char __pyx_k_cuGraphAddEmptyNode_locals_genex[] = "cuGraphAddEmptyNode.<locals>.genexpr";
static const char __pyx_k_cuGraphAddEventRecordNode_locals[] = "cuGraphAddEventRecordNode.<locals>.genexpr";
static const char __pyx_k_cuGraphAddEventWaitNode_locals_g[] = "cuGraphAddEventWaitNode.<locals>.genexpr";
static const char __pyx_k_cuGraphAddExternalSemaphoresSign[] = "cuGraphAddExternalSemaphoresSignalNode.<locals>.genexpr";
static const char __pyx_k_cuGraphAddExternalSemaphoresWait[] = "cuGraphAddExternalSemaphoresWaitNode.<locals>.genexpr";
static const char __pyx_k_cuGraphAddHostNode_locals_genexp[] = "cuGraphAddHostNode.<locals>.genexpr";
static const char __pyx_k_cuGraphAddKernelNode_locals_gene[] = "cuGraphAddKernelNode.<locals>.genexpr";
static const char __pyx_k_cuGraphAddMemAllocNode_locals_ge[] = "cuGraphAddMemAllocNode.<locals>.genexpr";
static const char __pyx_k_cuGraphAddMemFreeNode_locals_gen[] = "cuGraphAddMemFreeNode.<locals>.genexpr";
static const char __pyx_k_cuGraphAddMemcpyNode_locals_gene[] = "cuGraphAddMemcpyNode.<locals>.genexpr";
static const char __pyx_k_cuGraphAddMemsetNode_locals_gene[] = "cuGraphAddMemsetNode.<locals>.genexpr";
static const char __pyx_k_cuGraphExecBatchMemOpNodeSetPara[] = "cuGraphExecBatchMemOpNodeSetParams";
static const char __pyx_k_cuGraphExecChildGraphNodeSetPara[] = "cuGraphExecChildGraphNodeSetParams";
static const char __pyx_k_cuGraphExecEventRecordNodeSetEve[] = "cuGraphExecEventRecordNodeSetEvent";
static const char __pyx_k_cuGraphExecEventWaitNodeSetEvent[] = "cuGraphExecEventWaitNodeSetEvent";
static const char __pyx_k_cuGraphExecExternalSemaphoresSig[] = "cuGraphExecExternalSemaphoresSignalNodeSetParams";
static const char __pyx_k_cuGraphExecExternalSemaphoresWai[] = "cuGraphExecExternalSemaphoresWaitNodeSetParams";
static const char __pyx_k_cuGraphExternalSemaphoresSignalN[] = "cuGraphExternalSemaphoresSignalNodeGetParams";
static const char __pyx_k_cuGraphExternalSemaphoresWaitNod[] = "cuGraphExternalSemaphoresWaitNodeGetParams";
static const char __pyx_k_cuGraphRemoveDependencies_locals[] = "cuGraphRemoveDependencies.<locals>.genexpr";
static const char __pyx_k_cuGraphicsResourceGetMappedEglFr[] = "cuGraphicsResourceGetMappedEglFrame";
static const char __pyx_k_cuGraphicsResourceGetMappedMipma[] = "cuGraphicsResourceGetMappedMipmappedArray";
static const char __pyx_k_cuGraphicsResourceGetMappedPoint[] = "cuGraphicsResourceGetMappedPointer";
static const char __pyx_k_cuGraphicsSubResourceGetMappedAr[] = "cuGraphicsSubResourceGetMappedArray";
static const char __pyx_k_cuGraphicsVDPAURegisterOutputSur[] = "cuGraphicsVDPAURegisterOutputSurface";
static const char __pyx_k_cuGraphicsVDPAURegisterVideoSurf[] = "cuGraphicsVDPAURegisterVideoSurface";
static const char __pyx_k_cuLaunchCooperativeKernelMultiDe[] = "cuLaunchCooperativeKernelMultiDevice.<locals>.genexpr";
static const char __pyx_k_cuMemGetAllocationPropertiesFrom[] = "cuMemGetAllocationPropertiesFromHandle";
static const char __pyx_k_cuMemMapArrayAsync_locals_genexp[] = "cuMemMapArrayAsync.<locals>.genexpr";
static const char __pyx_k_cuMemPoolExportToShareableHandle[] = "cuMemPoolExportToShareableHandle";
static const char __pyx_k_cuMemPoolImportFromShareableHand[] = "cuMemPoolImportFromShareableHandle";
static const char __pyx_k_cuMemPoolSetAccess_locals_genexp[] = "cuMemPoolSetAccess.<locals>.genexpr";
static const char __pyx_k_cuMemRangeGetAttributes_locals_g[] = "cuMemRangeGetAttributes.<locals>.genexpr";
static const char __pyx_k_cuMipmappedArrayGetMemoryRequire[] = "cuMipmappedArrayGetMemoryRequirements";
static const char __pyx_k_cuMipmappedArrayGetSparsePropert[] = "cuMipmappedArrayGetSparseProperties";
static const char __pyx_k_cuModuleLoadDataEx_locals_genexp[] = "cuModuleLoadDataEx.<locals>.genexpr";
static const char __pyx_k_cuOccupancyAvailableDynamicSMemP[] = "cuOccupancyAvailableDynamicSMemPerBlock";
static const char __pyx_k_cuOccupancyMaxActiveBlocksPerMul[] = "cuOccupancyMaxActiveBlocksPerMultiprocessor";
static const char __pyx_k_cuOccupancyMaxPotentialBlockSize[] = "cuOccupancyMaxPotentialBlockSize";
static const char __pyx_k_cuOccupancyMaxPotentialClusterSi[] = "cuOccupancyMaxPotentialClusterSize";
static const char __pyx_k_cuPointerGetAttributes_locals_ge[] = "cuPointerGetAttributes.<locals>.genexpr";
static const char __pyx_k_cuStreamBatchMemOp_locals_genexp[] = "cuStreamBatchMemOp.<locals>.genexpr";
static const char __pyx_k_cuStreamBatchMemOp_v2_locals_gen[] = "cuStreamBatchMemOp_v2.<locals>.genexpr";
static const char __pyx_k_cuStreamUpdateCaptureDependencie[] = "cuStreamUpdateCaptureDependencies.<locals>.genexpr";
static const char __pyx_k_cuThreadExchangeStreamCaptureMod[] = "cuThreadExchangeStreamCaptureMode";
static const char __pyx_k_cuWaitExternalSemaphoresAsync_lo[] = "cuWaitExternalSemaphoresAsync.<locals>.genexpr";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_not_enough_values_found_during_a[] = "not enough values found during array assignment, expected 3, got";
static const char __pyx_k_programmaticStreamSerializationA[] = "programmaticStreamSerializationAllowed : ";
static const char __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_st_2[] = "CUDA_ARRAY_SPARSE_PROPERTIES_st.getPtr";
static const char __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_st_3[] = "CUDA_ARRAY_SPARSE_PROPERTIES_st.__reduce_cython__";
static const char __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_st_4[] = "CUDA_ARRAY_SPARSE_PROPERTIES_st.__setstate_cython__";
static const char __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1_2[] = "CUDA_ARRAY_SPARSE_PROPERTIES_v1";
static const char __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1_3[] = "_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.getPtr";
static const char __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1_4[] = "_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.__reduce_cython__";
static const char __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1_5[] = "_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_2[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_3[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_4[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_5[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_6[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_7[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_8[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_10[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_11[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_12[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_13[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_14[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_15[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_16[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_2[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_3[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_4[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_5[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_6[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_7[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_8[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_9[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.__reduce_cython__";
static const char __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_2[] = "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1";
static const char __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3[] = "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS";
static const char __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_4[] = "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.getPtr";
static const char __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_5[] = "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.__reduce_cython__";
static const char __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_6[] = "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.__setstate_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_2[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_3[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_4[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_5[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_6[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_7[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.getPtr";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_8[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.__reduce_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_9[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.__setstate_cython__";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_COOPERATIVE_2[] = "CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_2[] = "CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_3[] = "CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_THREADS_2[] = "CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR";
static const char __pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_2[] = "CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS";
static const char __pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_3[] = "CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER";
static const char __pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_4[] = "CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES";
static const char __pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_5[] = "CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_2[] = "CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_2[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_3[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_4[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_5[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_6[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.getPtr";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_7[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.__reduce_cython__";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_8[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.__setstate_cython__";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_9[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.getPtr";
static const char __pyx_k_CUeglFrame_v1_CUeglFrame_v1_CUe_2[] = "_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.getPtr";
static const char __pyx_k_CUeglFrame_v1_CUeglFrame_v1_CUe_3[] = "_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.__reduce_cython__";
static const char __pyx_k_CUeglFrame_v1_CUeglFrame_v1_CUe_4[] = "_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.__setstate_cython__";
static const char __pyx_k_CUexecAffinityParam_v1_CUexecAf_2[] = "_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.getPtr";
static const char __pyx_k_CUexecAffinityParam_v1_CUexecAf_3[] = "_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.__reduce_cython__";
static const char __pyx_k_CUexecAffinityParam_v1_CUexecAf_4[] = "_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.__setstate_cython__";
static const char __pyx_k_CUlaunchAttributeValue_CUlaunch_2[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s";
static const char __pyx_k_CUlaunchAttributeValue_CUlaunch_3[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.getPtr";
static const char __pyx_k_CUlaunchAttributeValue_CUlaunch_4[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.__reduce_cython__";
static const char __pyx_k_CUlaunchAttributeValue_CUlaunch_5[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.__setstate_cython__";
static const char __pyx_k_CUlaunchAttributeValue_CUlaunch_6[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.getPtr";
static const char __pyx_k_CUlaunchAttributeValue_CUlaunch_7[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.__reduce_cython__";
static const char __pyx_k_CUlaunchAttributeValue_CUlaunch_8[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.__setstate_cython__";
static const char __pyx_k_CUmemAllocationProp_v1_CUmemAll_2[] = "_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.getPtr";
static const char __pyx_k_CUmemAllocationProp_v1_CUmemAll_3[] = "_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.__reduce_cython__";
static const char __pyx_k_CUmemAllocationProp_v1_CUmemAll_4[] = "_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.__setstate_cython__";
static const char __pyx_k_CUmemGenericAllocationHandle_v1_2[] = "CUmemGenericAllocationHandle_v1";
static const char __pyx_k_CUmemGenericAllocationHandle_v1_3[] = "CUmemGenericAllocationHandle_v1.getPtr";
static const char __pyx_k_CUmemGenericAllocationHandle_v1_4[] = "CUmemGenericAllocationHandle_v1.__reduce_cython__";
static const char __pyx_k_CUmemGenericAllocationHandle_v1_5[] = "CUmemGenericAllocationHandle_v1.__setstate_cython__";
static const char __pyx_k_CUstreamMemOpWaitValueParams_st_2[] = "CUstreamMemOpWaitValueParams_st.getPtr";
static const char __pyx_k_CUstreamMemOpWaitValueParams_st_3[] = "CUstreamMemOpWaitValueParams_st.__reduce_cython__";
static const char __pyx_k_CUstreamMemOpWaitValueParams_st_4[] = "CUstreamMemOpWaitValueParams_st.__setstate_cython__";
static const char __pyx_k_cuSignalExternalSemaphoresAsync_2[] = "cuSignalExternalSemaphoresAsync";
static const char __pyx_k_Argument_attributes_is_not_insta_2[] = "Argument 'attributes' is not instance of type (expected List[ccuda.CUpointer_attribute]";
static const char __pyx_k_Argument_paramsArray_is_not_inst_2[] = "Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS]";
static const char __pyx_k_Argument_paramsArray_is_not_inst_3[] = "Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS]";
static const char __pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_2[] = "CUDA_ARRAY_MEMORY_REQUIREMENTS_st.getPtr";
static const char __pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_3[] = "CUDA_ARRAY_MEMORY_REQUIREMENTS_st.__reduce_cython__";
static const char __pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_4[] = "CUDA_ARRAY_MEMORY_REQUIREMENTS_st.__setstate_cython__";
static const char __pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_2[] = "CUDA_BATCH_MEM_OP_NODE_PARAMS_st.getPtr";
static const char __pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3[] = "CUDA_BATCH_MEM_OP_NODE_PARAMS_st.__reduce_cython__";
static const char __pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_4[] = "CUDA_BATCH_MEM_OP_NODE_PARAMS_st.__setstate_cython__";
static const char __pyx_k_CUDA_COOPERATIVE_LAUNCH_MULTI_DE_2[] = "CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_2[] = "CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_3[] = "CUDA_EXTERNAL_MEMORY_BUFFER_DESC";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_4[] = "CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_5[] = "CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_6[] = "CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_2[] = "CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_3[] = "CUDA_EXTERNAL_MEMORY_HANDLE_DESC";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_4[] = "CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_5[] = "CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_6[] = "CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_2[] = "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_3[] = "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_4[] = "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_5[] = "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_6[] = "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_2[] = "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_3[] = "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_4[] = "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_5[] = "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_6[] = "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_2[] = "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_3[] = "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_4[] = "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_5[] = "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_6[] = "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_2[] = "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_3[] = "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_4[] = "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_5[] = "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_6[] = "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_10[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_11[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_12[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_13[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.__setstate_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_14[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.getPtr";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_15[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.__reduce_cython__";
static const char __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_16[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.__setstate_cython__";
static const char __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_2[] = "CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.getPtr";
static const char __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_3[] = "CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.__reduce_cython__";
static const char __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_4[] = "CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.__setstate_cython__";
static const char __pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_2[] = "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1";
static const char __pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_3[] = "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS";
static const char __pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_4[] = "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.getPtr";
static const char __pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_5[] = "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.__reduce_cython__";
static const char __pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_6[] = "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.__setstate_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_10[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.getPtr";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_11[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.__reduce_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_12[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.__setstate_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_13[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.getPtr";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_14[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.__reduce_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_15[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.__setstate_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_16[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.getPtr";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_17[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.__reduce_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_18[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.__setstate_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_19[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.getPtr";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_20[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.__reduce_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_21[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.__setstate_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_22[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.getPtr";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_23[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.__reduce_cython__";
static const char __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_24[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.__setstate_cython__";
static const char __pyx_k_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_2[] = "CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_64_B_2[] = "CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V2";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE_2[] = "CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE_3[] = "CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPA_2[] = "CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_2[] = "CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_3[] = "CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_4[] = "CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_2[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_3[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_4[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_5[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_6[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_7[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_8[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_9[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_2[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_3[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_4[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_5[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_6[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_7[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_8[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_9[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI_2[] = "CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI_3[] = "CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_2[] = "CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_3[] = "CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_REGISTER_2[] = "CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M_2[] = "CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M_3[] = "CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BO_2[] = "CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEM_2[] = "CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_2[] = "CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_3[] = "CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_4[] = "CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_5[] = "CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_6[] = "CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_7[] = "CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_8[] = "CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_44_2[] = "CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_44_3[] = "CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_42_2[] = "CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_42_3[] = "CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_44_2[] = "CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_44_3[] = "CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_PLANA_2[] = "CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_PLANA_3[] = "CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_PLANA_4[] = "CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_2[] = "CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_3[] = "CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_4[] = "CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV422_PLANA_2[] = "CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV422_SEMIP_2[] = "CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV444_PLANA_2[] = "CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YUV444_SEMIP_2[] = "CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_PLANA_2[] = "CU_EGL_COLOR_FORMAT_YVU420_PLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_PLANA_3[] = "CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_PLANA_4[] = "CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_2[] = "CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_3[] = "CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_4[] = "CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU422_PLANA_2[] = "CU_EGL_COLOR_FORMAT_YVU422_PLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU422_SEMIP_2[] = "CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU444_PLANA_2[] = "CU_EGL_COLOR_FORMAT_YVU444_PLANAR";
static const char __pyx_k_CU_EGL_COLOR_FORMAT_YVU444_SEMIP_2[] = "CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER";
static const char __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_2[] = "CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE";
static const char __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_3[] = "CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE";
static const char __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_4[] = "CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT";
static const char __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O_2[] = "CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32";
static const char __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O_3[] = "CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT";
static const char __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_2[] = "CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32";
static const char __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_3[] = "CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT";
static const char __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_4[] = "CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE";
static const char __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_5[] = "CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE";
static const char __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_6[] = "CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC";
static const char __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_7[] = "CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX";
static const char __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_8[] = "CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT";
static const char __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_9[] = "CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST_2[] = "CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT";
static const char __pyx_k_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST_3[] = "CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH";
static const char __pyx_k_CU_GPU_DIRECT_RDMA_WRITES_ORDERI_2[] = "CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER";
static const char __pyx_k_CU_GPU_DIRECT_RDMA_WRITES_ORDERI_3[] = "CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES";
static const char __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEM_2[] = "CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS";
static const char __pyx_k_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_2[] = "CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE";
static const char __pyx_k_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_2[] = "CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_2[] = "CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_3[] = "CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ";
static const char __pyx_k_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_4[] = "CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_10[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.__reduce_cython__";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_11[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.__setstate_cython__";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_12[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.getPtr";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_13[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.__reduce_cython__";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_14[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.__setstate_cython__";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_15[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.getPtr";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_16[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.__reduce_cython__";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_17[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.__setstate_cython__";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_18[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.getPtr";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_19[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.__reduce_cython__";
static const char __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_20[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.__setstate_cython__";
static const char __pyx_k_CUstreamMemOpFlushRemoteWritesPa_2[] = "CUstreamMemOpFlushRemoteWritesParams_st.getPtr";
static const char __pyx_k_CUstreamMemOpFlushRemoteWritesPa_3[] = "CUstreamMemOpFlushRemoteWritesParams_st.__reduce_cython__";
static const char __pyx_k_CUstreamMemOpFlushRemoteWritesPa_4[] = "CUstreamMemOpFlushRemoteWritesParams_st.__setstate_cython__";
static const char __pyx_k_CUstreamMemOpMemoryBarrierParams_2[] = "CUstreamMemOpMemoryBarrierParams_st.getPtr";
static const char __pyx_k_CUstreamMemOpMemoryBarrierParams_3[] = "CUstreamMemOpMemoryBarrierParams_st.__reduce_cython__";
static const char __pyx_k_CUstreamMemOpMemoryBarrierParams_4[] = "CUstreamMemOpMemoryBarrierParams_st.__setstate_cython__";
static const char __pyx_k_CUstreamMemOpWriteValueParams_st_2[] = "CUstreamMemOpWriteValueParams_st.getPtr";
static const char __pyx_k_CUstreamMemOpWriteValueParams_st_3[] = "CUstreamMemOpWriteValueParams_st.__reduce_cython__";
static const char __pyx_k_CUstreamMemOpWriteValueParams_st_4[] = "CUstreamMemOpWriteValueParams_st.__setstate_cython__";
static const char __pyx_k_clusterSchedulingPolicyPreferenc_2[] = "clusterSchedulingPolicyPreference";
static const char __pyx_k_cuGraphAddExternalSemaphoresSign_2[] = "cuGraphAddExternalSemaphoresSignalNode";
static const char __pyx_k_cuGraphAddExternalSemaphoresWait_2[] = "cuGraphAddExternalSemaphoresWaitNode";
static const char __pyx_k_cuGraphExternalSemaphoresSignalN_2[] = "cuGraphExternalSemaphoresSignalNodeSetParams";
static const char __pyx_k_cuGraphExternalSemaphoresWaitNod_2[] = "cuGraphExternalSemaphoresWaitNodeSetParams";
static const char __pyx_k_cuLaunchCooperativeKernelMultiDe_2[] = "cuLaunchCooperativeKernelMultiDevice";
static const char __pyx_k_cuOccupancyMaxActiveBlocksPerMul_2[] = "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags";
static const char __pyx_k_cuOccupancyMaxPotentialBlockSize_2[] = "cuOccupancyMaxPotentialBlockSizeWithFlags";
static const char __pyx_k_cuStreamUpdateCaptureDependencie_2[] = "cuStreamUpdateCaptureDependencies";
static const char __pyx_k_programmaticStreamSerializationA_2[] = "programmaticStreamSerializationAllowed";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_10[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_11[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_12[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_13[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_14[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_10[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_11[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_12[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_13[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_14[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_15[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_16[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_17[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_18[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_19[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_20[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_21[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_22[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_23[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_24[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_25[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_26[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_27[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_28[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT";
static const char __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_29[] = "CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH";
static const char __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_10[] = "CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32";
static PyObject *__pyx_kp_u_;
static PyObject *__pyx_kp_s_Access_flags_that_specify_the_l;
static PyObject *__pyx_n_s_Any;
static PyObject *__pyx_kp_u_Argument_attributes_is_not_insta;
static PyObject *__pyx_kp_u_Argument_attributes_is_not_insta_2;
static PyObject *__pyx_kp_u_Argument_conn_is_not_instance_of;
static PyObject *__pyx_kp_u_Argument_dataSizes_is_not_instan;
static PyObject *__pyx_kp_u_Argument_dependencies_is_not_ins;
static PyObject *__pyx_kp_u_Argument_desc_is_not_instance_of;
static PyObject *__pyx_kp_u_Argument_extSemArray_is_not_inst;
static PyObject *__pyx_kp_u_Argument_from__is_not_instance_o;
static PyObject *__pyx_kp_u_Argument_launchParamsList_is_not;
static PyObject *__pyx_kp_u_Argument_mapInfoList_is_not_inst;
static PyObject *__pyx_kp_u_Argument_map_is_not_instance_of;
static PyObject *__pyx_kp_u_Argument_options_is_not_instance;
static PyObject *__pyx_kp_u_Argument_pCudaResource_is_not_in;
static PyObject *__pyx_kp_u_Argument_pStream_is_not_instance;
static PyObject *__pyx_kp_u_Argument_paramArray_is_not_insta;
static PyObject *__pyx_kp_u_Argument_paramsArray_is_not_inst;
static PyObject *__pyx_kp_u_Argument_paramsArray_is_not_inst_2;
static PyObject *__pyx_kp_u_Argument_paramsArray_is_not_inst_3;
static PyObject *__pyx_kp_u_Argument_resources_is_not_instan;
static PyObject *__pyx_kp_u_Argument_to_is_not_instance_of_t;
static PyObject *__pyx_kp_u_Argument_vdpGetProcAddress_is_no;
static PyObject *__pyx_kp_s_Array_formats;
static PyObject *__pyx_kp_s_Array_indices_for_cube_faces;
static PyObject *__pyx_kp_s_Bitmasks_for_py_obj_CU_DEVICE_A;
static PyObject *__pyx_n_s_ByteCount;
static PyObject *__pyx_n_s_ByteOffset;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_2DARRAY;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_COLOR_ATTACHMENT;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_CUBEMAP;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_DEFERRED_MAPPING;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_DEPTH_TEXTURE;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR;
static PyObject *__pyx_n_u_CUDA_ARRAY3D_DESCRIPTOR;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_st;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_st___red;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_st___set;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_st_getPt;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_v2;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_LAYERED;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_SPARSE;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_SURFACE_LDST;
static PyObject *__pyx_n_s_CUDA_ARRAY3D_TEXTURE_GATHER;
static PyObject *__pyx_n_s_CUDA_ARRAY_DESCRIPTOR;
static PyObject *__pyx_n_u_CUDA_ARRAY_DESCRIPTOR;
static PyObject *__pyx_n_s_CUDA_ARRAY_DESCRIPTOR_st;
static PyObject *__pyx_n_s_CUDA_ARRAY_DESCRIPTOR_st___reduc;
static PyObject *__pyx_n_s_CUDA_ARRAY_DESCRIPTOR_st___setst;
static PyObject *__pyx_n_s_CUDA_ARRAY_DESCRIPTOR_st_getPtr;
static PyObject *__pyx_n_s_CUDA_ARRAY_DESCRIPTOR_v2;
static PyObject *__pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS;
static PyObject *__pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_s;
static PyObject *__pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_2;
static PyObject *__pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_3;
static PyObject *__pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_4;
static PyObject *__pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_v;
static PyObject *__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES;
static PyObject *__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_st;
static PyObject *__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_st_2;
static PyObject *__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_st_3;
static PyObject *__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_st_4;
static PyObject *__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1;
static PyObject *__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1_2;
static PyObject *__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1_3;
static PyObject *__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1_4;
static PyObject *__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1_5;
static PyObject *__pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS;
static PyObject *__pyx_n_u_CUDA_BATCH_MEM_OP_NODE_PARAMS;
static PyObject *__pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS_st;
static PyObject *__pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_2;
static PyObject *__pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3;
static PyObject *__pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_4;
static PyObject *__pyx_n_s_CUDA_COOPERATIVE_LAUNCH_MULTI_DE;
static PyObject *__pyx_n_s_CUDA_COOPERATIVE_LAUNCH_MULTI_DE_2;
static PyObject *__pyx_kp_s_CUDA_EGL_Color_Format_The_diffe;
static PyObject *__pyx_n_s_CUDA_EGL_INFINITE_TIMEOUT;
static PyObject *__pyx_n_s_CUDA_ERROR_ALREADY_ACQUIRED;
static PyObject *__pyx_n_s_CUDA_ERROR_ALREADY_MAPPED;
static PyObject *__pyx_n_s_CUDA_ERROR_ARRAY_IS_MAPPED;
static PyObject *__pyx_n_s_CUDA_ERROR_ASSERT;
static PyObject *__pyx_n_s_CUDA_ERROR_CAPTURED_EVENT;
static PyObject *__pyx_n_s_CUDA_ERROR_COMPAT_NOT_SUPPORTED;
static PyObject *__pyx_n_s_CUDA_ERROR_CONTEXT_ALREADY_CURRE;
static PyObject *__pyx_n_s_CUDA_ERROR_CONTEXT_ALREADY_IN_US;
static PyObject *__pyx_n_s_CUDA_ERROR_CONTEXT_IS_DESTROYED;
static PyObject *__pyx_n_s_CUDA_ERROR_COOPERATIVE_LAUNCH_TO;
static PyObject *__pyx_n_s_CUDA_ERROR_DEINITIALIZED;
static PyObject *__pyx_n_s_CUDA_ERROR_DEVICE_NOT_LICENSED;
static PyObject *__pyx_n_s_CUDA_ERROR_DEVICE_UNAVAILABLE;
static PyObject *__pyx_n_s_CUDA_ERROR_ECC_UNCORRECTABLE;
static PyObject *__pyx_n_s_CUDA_ERROR_EXTERNAL_DEVICE;
static PyObject *__pyx_n_s_CUDA_ERROR_FILE_NOT_FOUND;
static PyObject *__pyx_n_s_CUDA_ERROR_GRAPH_EXEC_UPDATE_FAI;
static PyObject *__pyx_n_s_CUDA_ERROR_HARDWARE_STACK_ERROR;
static PyObject *__pyx_n_s_CUDA_ERROR_HOST_MEMORY_ALREADY_R;
static PyObject *__pyx_n_s_CUDA_ERROR_HOST_MEMORY_NOT_REGIS;
static PyObject *__pyx_n_s_CUDA_ERROR_ILLEGAL_ADDRESS;
static PyObject *__pyx_n_s_CUDA_ERROR_ILLEGAL_INSTRUCTION;
static PyObject *__pyx_n_s_CUDA_ERROR_ILLEGAL_STATE;
static PyObject *__pyx_n_s_CUDA_ERROR_INVALID_ADDRESS_SPACE;
static PyObject *__pyx_n_s_CUDA_ERROR_INVALID_CLUSTER_SIZE;
static PyObject *__pyx_n_s_CUDA_ERROR_INVALID_CONTEXT;
static PyObject *__pyx_n_s_CUDA_ERROR_INVALID_DEVICE;
static PyObject *__pyx_n_s_CUDA_ERROR_INVALID_GRAPHICS_CONT;
static PyObject *__pyx_n_s_CUDA_ERROR_INVALID_HANDLE;
static PyObject *__pyx_n_s_CUDA_ERROR_INVALID_IMAGE;
static PyObject *__pyx_n_s_CUDA_ERROR_INVALID_PC;
static PyObject *__pyx_n_s_CUDA_ERROR_INVALID_PTX;
static PyObject *__pyx_n_s_CUDA_ERROR_INVALID_SOURCE;
static PyObject *__pyx_n_s_CUDA_ERROR_INVALID_VALUE;
static PyObject *__pyx_n_s_CUDA_ERROR_JIT_COMPILATION_DISAB;
static PyObject *__pyx_n_s_CUDA_ERROR_JIT_COMPILER_NOT_FOUN;
static PyObject *__pyx_n_s_CUDA_ERROR_LAUNCH_FAILED;
static PyObject *__pyx_n_s_CUDA_ERROR_LAUNCH_INCOMPATIBLE_T;
static PyObject *__pyx_n_s_CUDA_ERROR_LAUNCH_OUT_OF_RESOURC;
static PyObject *__pyx_n_s_CUDA_ERROR_LAUNCH_TIMEOUT;
static PyObject *__pyx_n_s_CUDA_ERROR_MAP_FAILED;
static PyObject *__pyx_n_s_CUDA_ERROR_MISALIGNED_ADDRESS;
static PyObject *__pyx_n_s_CUDA_ERROR_MPS_CLIENT_TERMINATED;
static PyObject *__pyx_n_s_CUDA_ERROR_MPS_CONNECTION_FAILED;
static PyObject *__pyx_n_s_CUDA_ERROR_MPS_MAX_CLIENTS_REACH;
static PyObject *__pyx_n_s_CUDA_ERROR_MPS_MAX_CONNECTIONS_R;
static PyObject *__pyx_n_s_CUDA_ERROR_MPS_RPC_FAILURE;
static PyObject *__pyx_n_s_CUDA_ERROR_MPS_SERVER_NOT_READY;
static PyObject *__pyx_n_s_CUDA_ERROR_NOT_FOUND;
static PyObject *__pyx_n_s_CUDA_ERROR_NOT_INITIALIZED;
static PyObject *__pyx_n_s_CUDA_ERROR_NOT_MAPPED;
static PyObject *__pyx_n_s_CUDA_ERROR_NOT_MAPPED_AS_ARRAY;
static PyObject *__pyx_n_s_CUDA_ERROR_NOT_MAPPED_AS_POINTER;
static PyObject *__pyx_n_s_CUDA_ERROR_NOT_PERMITTED;
static PyObject *__pyx_n_s_CUDA_ERROR_NOT_READY;
static PyObject *__pyx_n_s_CUDA_ERROR_NOT_SUPPORTED;
static PyObject *__pyx_n_s_CUDA_ERROR_NO_BINARY_FOR_GPU;
static PyObject *__pyx_n_s_CUDA_ERROR_NO_DEVICE;
static PyObject *__pyx_n_s_CUDA_ERROR_NVLINK_UNCORRECTABLE;
static PyObject *__pyx_n_s_CUDA_ERROR_OPERATING_SYSTEM;
static PyObject *__pyx_n_s_CUDA_ERROR_OUT_OF_MEMORY;
static PyObject *__pyx_n_s_CUDA_ERROR_PEER_ACCESS_ALREADY_E;
static PyObject *__pyx_n_s_CUDA_ERROR_PEER_ACCESS_NOT_ENABL;
static PyObject *__pyx_n_s_CUDA_ERROR_PEER_ACCESS_UNSUPPORT;
static PyObject *__pyx_n_s_CUDA_ERROR_PRIMARY_CONTEXT_ACTIV;
static PyObject *__pyx_n_s_CUDA_ERROR_PROFILER_ALREADY_STAR;
static PyObject *__pyx_n_s_CUDA_ERROR_PROFILER_ALREADY_STOP;
static PyObject *__pyx_n_s_CUDA_ERROR_PROFILER_DISABLED;
static PyObject *__pyx_n_s_CUDA_ERROR_PROFILER_NOT_INITIALI;
static PyObject *__pyx_n_s_CUDA_ERROR_SHARED_OBJECT_INIT_FA;
static PyObject *__pyx_n_s_CUDA_ERROR_SHARED_OBJECT_SYMBOL;
static PyObject *__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_IMPLIC;
static PyObject *__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_INVALI;
static PyObject *__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_ISOLAT;
static PyObject *__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_MERGE;
static PyObject *__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_UNJOIN;
static PyObject *__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_UNMATC;
static PyObject *__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_UNSUPP;
static PyObject *__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_WRONG;
static PyObject *__pyx_n_s_CUDA_ERROR_STUB_LIBRARY;
static PyObject *__pyx_n_s_CUDA_ERROR_SYSTEM_DRIVER_MISMATC;
static PyObject *__pyx_n_s_CUDA_ERROR_SYSTEM_NOT_READY;
static PyObject *__pyx_n_s_CUDA_ERROR_TIMEOUT;
static PyObject *__pyx_n_s_CUDA_ERROR_TOO_MANY_PEERS;
static PyObject *__pyx_n_s_CUDA_ERROR_UNKNOWN;
static PyObject *__pyx_n_s_CUDA_ERROR_UNMAP_FAILED;
static PyObject *__pyx_n_s_CUDA_ERROR_UNSUPPORTED_EXEC_AFFI;
static PyObject *__pyx_n_s_CUDA_ERROR_UNSUPPORTED_LIMIT;
static PyObject *__pyx_n_s_CUDA_ERROR_UNSUPPORTED_PTX_VERSI;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_2;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_3;
static PyObject *__pyx_n_u_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_3;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_4;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_5;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_6;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_DEDICATED;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_2;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_3;
static PyObject *__pyx_n_u_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_3;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_4;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_5;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_6;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_2;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_3;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_4;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_5;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_6;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_7;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_8;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_2;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_3;
static PyObject *__pyx_n_u_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_3;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_4;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_5;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_6;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_2;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_3;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_4;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_5;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_6;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_7;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_8;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_2;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_3;
static PyObject *__pyx_n_u_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_3;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_4;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_5;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_6;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_10;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_11;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_12;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_13;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_14;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_15;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_16;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_2;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_3;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_4;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_5;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_6;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_7;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_8;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_9;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_2;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_3;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_4;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_5;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_6;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_S;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_2;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_3;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_4;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_5;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_6;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_10;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_11;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_12;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_13;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_14;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_15;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_16;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_2;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_3;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_4;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_5;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_6;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_7;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_8;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_9;
static PyObject *__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKI;
static PyObject *__pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS;
static PyObject *__pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_2;
static PyObject *__pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3;
static PyObject *__pyx_n_u_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3;
static PyObject *__pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_4;
static PyObject *__pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_5;
static PyObject *__pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_6;
static PyObject *__pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS;
static PyObject *__pyx_n_u_CUDA_EXT_SEM_WAIT_NODE_PARAMS;
static PyObject *__pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st;
static PyObject *__pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_2;
static PyObject *__pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_3;
static PyObject *__pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_4;
static PyObject *__pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1;
static PyObject *__pyx_kp_s_CUDA_EglFrame_type_array_or_poi;
static PyObject *__pyx_n_s_CUDA_GRAPH_INSTANTIATE_FLAG_AUTO;
static PyObject *__pyx_n_s_CUDA_GRAPH_INSTANTIATE_FLAG_USE;
static PyObject *__pyx_n_s_CUDA_HOST_NODE_PARAMS;
static PyObject *__pyx_n_u_CUDA_HOST_NODE_PARAMS;
static PyObject *__pyx_n_s_CUDA_HOST_NODE_PARAMS_st;
static PyObject *__pyx_n_s_CUDA_HOST_NODE_PARAMS_st___reduc;
static PyObject *__pyx_n_s_CUDA_HOST_NODE_PARAMS_st___setst;
static PyObject *__pyx_n_s_CUDA_HOST_NODE_PARAMS_st_getPtr;
static PyObject *__pyx_n_s_CUDA_HOST_NODE_PARAMS_v1;
static PyObject *__pyx_kp_s_CUDA_Ipc_Mem_Flags;
static PyObject *__pyx_n_s_CUDA_KERNEL_NODE_PARAMS;
static PyObject *__pyx_n_u_CUDA_KERNEL_NODE_PARAMS;
static PyObject *__pyx_n_s_CUDA_KERNEL_NODE_PARAMS_st;
static PyObject *__pyx_n_s_CUDA_KERNEL_NODE_PARAMS_st___red;
static PyObject *__pyx_n_s_CUDA_KERNEL_NODE_PARAMS_st___set;
static PyObject *__pyx_n_s_CUDA_KERNEL_NODE_PARAMS_st_getPt;
static PyObject *__pyx_n_s_CUDA_KERNEL_NODE_PARAMS_v1;
static PyObject *__pyx_n_s_CUDA_LAUNCH_PARAMS;
static PyObject *__pyx_n_s_CUDA_LAUNCH_PARAMS_st;
static PyObject *__pyx_n_s_CUDA_LAUNCH_PARAMS_st___reduce_c;
static PyObject *__pyx_n_s_CUDA_LAUNCH_PARAMS_st___setstate;
static PyObject *__pyx_n_s_CUDA_LAUNCH_PARAMS_st_getPtr;
static PyObject *__pyx_n_s_CUDA_LAUNCH_PARAMS_v1;
static PyObject *__pyx_kp_s_CUDA_Lazy_Loading_status;
static PyObject *__pyx_n_s_CUDA_MEMCPY2D;
static PyObject *__pyx_n_u_CUDA_MEMCPY2D;
static PyObject *__pyx_n_s_CUDA_MEMCPY2D_st;
static PyObject *__pyx_n_s_CUDA_MEMCPY2D_st___reduce_cython;
static PyObject *__pyx_n_s_CUDA_MEMCPY2D_st___setstate_cyth;
static PyObject *__pyx_n_s_CUDA_MEMCPY2D_st_getPtr;
static PyObject *__pyx_n_s_CUDA_MEMCPY2D_v2;
static PyObject *__pyx_n_s_CUDA_MEMCPY3D;
static PyObject *__pyx_n_u_CUDA_MEMCPY3D;
static PyObject *__pyx_n_s_CUDA_MEMCPY3D_PEER;
static PyObject *__pyx_n_u_CUDA_MEMCPY3D_PEER;
static PyObject *__pyx_n_s_CUDA_MEMCPY3D_PEER_st;
static PyObject *__pyx_n_s_CUDA_MEMCPY3D_PEER_st___reduce_c;
static PyObject *__pyx_n_s_CUDA_MEMCPY3D_PEER_st___setstate;
static PyObject *__pyx_n_s_CUDA_MEMCPY3D_PEER_st_getPtr;
static PyObject *__pyx_n_s_CUDA_MEMCPY3D_PEER_v1;
static PyObject *__pyx_n_s_CUDA_MEMCPY3D_st;
static PyObject *__pyx_n_s_CUDA_MEMCPY3D_st___reduce_cython;
static PyObject *__pyx_n_s_CUDA_MEMCPY3D_st___setstate_cyth;
static PyObject *__pyx_n_s_CUDA_MEMCPY3D_st_getPtr;
static PyObject *__pyx_n_s_CUDA_MEMCPY3D_v2;
static PyObject *__pyx_n_s_CUDA_MEMSET_NODE_PARAMS;
static PyObject *__pyx_n_u_CUDA_MEMSET_NODE_PARAMS;
static PyObject *__pyx_n_s_CUDA_MEMSET_NODE_PARAMS_st;
static PyObject *__pyx_n_s_CUDA_MEMSET_NODE_PARAMS_st___red;
static PyObject *__pyx_n_s_CUDA_MEMSET_NODE_PARAMS_st___set;
static PyObject *__pyx_n_s_CUDA_MEMSET_NODE_PARAMS_st_getPt;
static PyObject *__pyx_n_s_CUDA_MEMSET_NODE_PARAMS_v1;
static PyObject *__pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS;
static PyObject *__pyx_n_u_CUDA_MEM_ALLOC_NODE_PARAMS;
static PyObject *__pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS_st;
static PyObject *__pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS_st_2;
static PyObject *__pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS_st_3;
static PyObject *__pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS_st_ge;
static PyObject *__pyx_kp_s_CUDA_Mem_Attach_Flags;
static PyObject *__pyx_n_s_CUDA_NVSCISYNC_ATTR_SIGNAL;
static PyObject *__pyx_n_s_CUDA_NVSCISYNC_ATTR_WAIT;
static PyObject *__pyx_n_s_CUDA_POINTER_ATTRIBUTE_ACCESS_FL;
static PyObject *__pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN;
static PyObject *__pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_2;
static PyObject *__pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_3;
static PyObject *__pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_4;
static PyObject *__pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_5;
static PyObject *__pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_6;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC;
static PyObject *__pyx_n_u_CUDA_RESOURCE_DESC;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_st;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_st___reduce_c;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_st___setstate;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_st_getPtr;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_10;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_11;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_12;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_13;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_14;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_15;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_16;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_17;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_18;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_19;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_2;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_20;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_21;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_22;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_23;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_24;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_3;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_4;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_5;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_6;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_7;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_8;
static PyObject *__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_9;
static PyObject *__pyx_n_s_CUDA_RESOURCE_VIEW_DESC;
static PyObject *__pyx_n_u_CUDA_RESOURCE_VIEW_DESC;
static PyObject *__pyx_n_s_CUDA_RESOURCE_VIEW_DESC_st;
static PyObject *__pyx_n_s_CUDA_RESOURCE_VIEW_DESC_st___red;
static PyObject *__pyx_n_s_CUDA_RESOURCE_VIEW_DESC_st___set;
static PyObject *__pyx_n_s_CUDA_RESOURCE_VIEW_DESC_st_getPt;
static PyObject *__pyx_n_s_CUDA_RESOURCE_VIEW_DESC_v1;
static PyObject *__pyx_n_s_CUDA_SUCCESS;
static PyObject *__pyx_n_s_CUDA_TEXTURE_DESC;
static PyObject *__pyx_n_u_CUDA_TEXTURE_DESC;
static PyObject *__pyx_n_s_CUDA_TEXTURE_DESC_st;
static PyObject *__pyx_n_s_CUDA_TEXTURE_DESC_st___reduce_cy;
static PyObject *__pyx_n_s_CUDA_TEXTURE_DESC_st___setstate;
static PyObject *__pyx_n_s_CUDA_TEXTURE_DESC_st_getPtr;
static PyObject *__pyx_n_s_CUDA_TEXTURE_DESC_v1;
static PyObject *__pyx_n_s_CUDA_VERSION;
static PyObject *__pyx_kp_s_CUDA_devices_corresponding_to_a;
static PyObject *__pyx_kp_s_CUDA_memory_pool_attributes;
static PyObject *__pyx_n_s_CUGLDeviceList;
static PyObject *__pyx_n_s_CUGLmap_flags;
static PyObject *__pyx_n_s_CUGPUDirectRDMAWritesOrdering;
static PyObject *__pyx_n_s_CU_ACCESS_PROPERTY_NORMAL;
static PyObject *__pyx_n_s_CU_ACCESS_PROPERTY_PERSISTING;
static PyObject *__pyx_n_s_CU_ACCESS_PROPERTY_STREAMING;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC1_UNORM;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC1_UNORM_SRGB;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC2_UNORM;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC2_UNORM_SRGB;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC3_UNORM;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC3_UNORM_SRGB;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC4_SNORM;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC4_UNORM;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC5_SNORM;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC5_UNORM;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC6H_SF16;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC6H_UF16;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC7_UNORM;
static PyObject *__pyx_n_s_CU_AD_FORMAT_BC7_UNORM_SRGB;
static PyObject *__pyx_n_s_CU_AD_FORMAT_FLOAT;
static PyObject *__pyx_n_s_CU_AD_FORMAT_HALF;
static PyObject *__pyx_n_s_CU_AD_FORMAT_NV12;
static PyObject *__pyx_n_s_CU_AD_FORMAT_SIGNED_INT16;
static PyObject *__pyx_n_s_CU_AD_FORMAT_SIGNED_INT32;
static PyObject *__pyx_n_s_CU_AD_FORMAT_SIGNED_INT8;
static PyObject *__pyx_n_s_CU_AD_FORMAT_SNORM_INT16X1;
static PyObject *__pyx_n_s_CU_AD_FORMAT_SNORM_INT16X2;
static PyObject *__pyx_n_s_CU_AD_FORMAT_SNORM_INT16X4;
static PyObject *__pyx_n_s_CU_AD_FORMAT_SNORM_INT8X1;
static PyObject *__pyx_n_s_CU_AD_FORMAT_SNORM_INT8X2;
static PyObject *__pyx_n_s_CU_AD_FORMAT_SNORM_INT8X4;
static PyObject *__pyx_n_s_CU_AD_FORMAT_UNORM_INT16X1;
static PyObject *__pyx_n_s_CU_AD_FORMAT_UNORM_INT16X2;
static PyObject *__pyx_n_s_CU_AD_FORMAT_UNORM_INT16X4;
static PyObject *__pyx_n_s_CU_AD_FORMAT_UNORM_INT8X1;
static PyObject *__pyx_n_s_CU_AD_FORMAT_UNORM_INT8X2;
static PyObject *__pyx_n_s_CU_AD_FORMAT_UNORM_INT8X4;
static PyObject *__pyx_n_s_CU_AD_FORMAT_UNSIGNED_INT16;
static PyObject *__pyx_n_s_CU_AD_FORMAT_UNSIGNED_INT32;
static PyObject *__pyx_n_s_CU_AD_FORMAT_UNSIGNED_INT8;
static PyObject *__pyx_n_s_CU_ARRAY_SPARSE_PROPERTIES_SINGL;
static PyObject *__pyx_n_s_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE;
static PyObject *__pyx_n_s_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_2;
static PyObject *__pyx_n_s_CU_CLUSTER_SCHEDULING_POLICY_DEF;
static PyObject *__pyx_n_s_CU_CLUSTER_SCHEDULING_POLICY_LOA;
static PyObject *__pyx_n_s_CU_CLUSTER_SCHEDULING_POLICY_SPR;
static PyObject *__pyx_n_s_CU_COMPUTEMODE_DEFAULT;
static PyObject *__pyx_n_s_CU_COMPUTEMODE_EXCLUSIVE_PROCESS;
static PyObject *__pyx_n_s_CU_COMPUTEMODE_PROHIBITED;
static PyObject *__pyx_n_s_CU_CTX_BLOCKING_SYNC;
static PyObject *__pyx_n_s_CU_CTX_FLAGS_MASK;
static PyObject *__pyx_n_s_CU_CTX_LMEM_RESIZE_TO_MAX;
static PyObject *__pyx_n_s_CU_CTX_MAP_HOST;
static PyObject *__pyx_n_s_CU_CTX_SCHED_AUTO;
static PyObject *__pyx_n_s_CU_CTX_SCHED_BLOCKING_SYNC;
static PyObject *__pyx_n_s_CU_CTX_SCHED_MASK;
static PyObject *__pyx_n_s_CU_CTX_SCHED_SPIN;
static PyObject *__pyx_n_s_CU_CTX_SCHED_YIELD;
static PyObject *__pyx_n_s_CU_CUBEMAP_FACE_NEGATIVE_X;
static PyObject *__pyx_n_s_CU_CUBEMAP_FACE_NEGATIVE_Y;
static PyObject *__pyx_n_s_CU_CUBEMAP_FACE_NEGATIVE_Z;
static PyObject *__pyx_n_s_CU_CUBEMAP_FACE_POSITIVE_X;
static PyObject *__pyx_n_s_CU_CUBEMAP_FACE_POSITIVE_Y;
static PyObject *__pyx_n_s_CU_CUBEMAP_FACE_POSITIVE_Z;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_FLUSH_RE;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GA;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_64_B;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_64_B_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_HOST;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE_3;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CLOCK_RATE;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CLUSTER_LAUN;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPA;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPA_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_COMPUTE_MODE;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_COMPUTE_PREE;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CONCURRENT_K;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_CONCURRENT_M;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_COOPERATIVE;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_COOPERATIVE_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_DEFERRED_MAP;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_DIRECT_MANAG;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPP;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_ECC_ENABLED;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_GENERIC_COMP;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CA;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_GLOBAL_MEMOR;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_3;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_4;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_OVERLAP;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_3;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_HOST_NATIVE;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_HOST_REGISTE;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_INTEGRATED;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_KERNEL_EXEC;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZ;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_LOCAL_L1_CAC;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MANAGED_MEMO;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_10;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_11;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_12;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_13;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_14;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_3;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_4;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_5;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_6;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_7;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_8;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_9;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_10;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_11;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_12;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_13;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_14;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_15;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_16;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_17;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_18;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_19;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_20;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_21;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_22;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_23;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_24;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_25;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_26;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_27;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_28;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_29;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_3;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_4;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_5;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_6;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_7;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_8;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_9;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_ACCESS_P;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_P;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI_3;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_3;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_PERSISTI;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_PITCH;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_REGISTER;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_REGISTER_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M_3;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_THREADS;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_THREADS_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MEMORY_POOLS;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPP;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MULTIPROCESS;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BO;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BO_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEM;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEM_2;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_PCI_BUS_ID;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_PCI_DEVICE_I;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_I;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_READ_ONLY_HO;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_REGISTERS_PE;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_RESERVED_SHA;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_SHARED_MEMOR;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_SINGLE_TO_DO;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_SPARSE_CUDA;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_STREAM_PRIOR;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_SURFACE_ALIG;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_TCC_DRIVER;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_TEXTURE_ALIG;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_TEXTURE_PITC;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_TIMELINE_SEM;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_TOTAL_CONSTA;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_UNIFIED_ADDR;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDR;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMO;
static PyObject *__pyx_n_s_CU_DEVICE_ATTRIBUTE_WARP_SIZE;
static PyObject *__pyx_n_s_CU_DEVICE_CPU;
static PyObject *__pyx_n_s_CU_DEVICE_INVALID;
static PyObject *__pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_A;
static PyObject *__pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_S;
static PyObject *__pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARR;
static PyObject *__pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_NATIVE_A;
static PyObject *__pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_PERFORMA;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_A;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_ABGR;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_ARGB;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_AYUV;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_AYUV_ER;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_BGGR;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_CCCC;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_GBRG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_GRBG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_RGGB;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_BCCR;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_BGGR;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_CBRC;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_CCCC;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_CRBC;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_GBRG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_GRBG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_RCCB;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_RGGB;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER14_BGGR;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER14_GBRG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER14_GRBG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER14_RGGB;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER20_BGGR;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER20_GBRG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER20_GRBG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER20_RGGB;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_BCCR;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_BGGR;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_CBRC;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_CRBC;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_GBRG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_GRBG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_ISP_BG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_ISP_GB;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_ISP_GR;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_ISP_RG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_RCCB;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_RGGB;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BGR;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_BGRA;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_L;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_MAX;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_R;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_RG;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_RGB;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_RGBA;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_UYVY_422;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_UYVY_ER;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_VYUY;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_VYUY_ER;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_3;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_4;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_5;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_6;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_7;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_8;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_44;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_44_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_44_3;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10_709_ER;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10_ER;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_42;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_42_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_42_3;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_44;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_44_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_44_3;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12_709_ER;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12_ER;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_PLANA;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_PLANA_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_PLANA_3;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_PLANA_4;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_SEMIP;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_3;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_4;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV422_PLANA;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV422_PLANA_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV422_SEMIP;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV422_SEMIP_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV444_PLANA;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV444_PLANA_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV444_SEMIP;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV444_SEMIP_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUVA;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUVA_ER;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV_ER;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUYV_422;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YUYV_ER;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_PLANA;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_PLANA_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_PLANA_3;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_PLANA_4;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_SEMIP;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_3;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_4;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU422_PLANA;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU422_PLANA_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU422_SEMIP;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU422_SEMIP_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU444_PLANA;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU444_PLANA_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU444_SEMIP;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU444_SEMIP_2;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVYU;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_YVYU_ER;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y_709_ER;
static PyObject *__pyx_n_s_CU_EGL_COLOR_FORMAT_Y_ER;
static PyObject *__pyx_n_s_CU_EGL_FRAME_TYPE_ARRAY;
static PyObject *__pyx_n_s_CU_EGL_FRAME_TYPE_PITCH;
static PyObject *__pyx_n_s_CU_EGL_RESOURCE_LOCATION_SYSMEM;
static PyObject *__pyx_n_s_CU_EGL_RESOURCE_LOCATION_VIDMEM;
static PyObject *__pyx_n_s_CU_EVENT_BLOCKING_SYNC;
static PyObject *__pyx_n_s_CU_EVENT_DEFAULT;
static PyObject *__pyx_n_s_CU_EVENT_DISABLE_TIMING;
static PyObject *__pyx_n_s_CU_EVENT_INTERPROCESS;
static PyObject *__pyx_n_s_CU_EVENT_RECORD_DEFAULT;
static PyObject *__pyx_n_s_CU_EVENT_RECORD_EXTERNAL;
static PyObject *__pyx_n_s_CU_EVENT_SCHED_AUTO;
static PyObject *__pyx_n_s_CU_EVENT_SCHED_BLOCKING_SYNC;
static PyObject *__pyx_n_s_CU_EVENT_SCHED_SPIN;
static PyObject *__pyx_n_s_CU_EVENT_SCHED_YIELD;
static PyObject *__pyx_n_s_CU_EVENT_WAIT_DEFAULT;
static PyObject *__pyx_n_s_CU_EVENT_WAIT_EXTERNAL;
static PyObject *__pyx_n_s_CU_EXEC_AFFINITY_TYPE_MAX;
static PyObject *__pyx_n_s_CU_EXEC_AFFINITY_TYPE_SM_COUNT;
static PyObject *__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D;
static PyObject *__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_2;
static PyObject *__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_3;
static PyObject *__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_4;
static PyObject *__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_N;
static PyObject *__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O;
static PyObject *__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O_2;
static PyObject *__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O_3;
static PyObject *__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP;
static PyObject *__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_10;
static PyObject *__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_2;
static PyObject *__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_3;
static PyObject *__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_4;
static PyObject *__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_5;
static PyObject *__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_6;
static PyObject *__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_7;
static PyObject *__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_8;
static PyObject *__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_9;
static PyObject *__pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES;
static PyObject *__pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_2;
static PyObject *__pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_3;
static PyObject *__pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_4;
static PyObject *__pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_5;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_BINARY_VERSION;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_CACHE_MODE_CA;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDU;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_M;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_CONST_SIZE_BYT;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYT;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_MAX;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SH;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_MAX_THREADS_PE;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_NON_PORTABLE_C;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_NUM_REGS;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_PREFERRED_SHAR;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_PTX_VERSION;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST_2;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST_3;
static PyObject *__pyx_n_s_CU_FUNC_ATTRIBUTE_SHARED_SIZE_BY;
static PyObject *__pyx_n_s_CU_FUNC_CACHE_PREFER_EQUAL;
static PyObject *__pyx_n_s_CU_FUNC_CACHE_PREFER_L1;
static PyObject *__pyx_n_s_CU_FUNC_CACHE_PREFER_NONE;
static PyObject *__pyx_n_s_CU_FUNC_CACHE_PREFER_SHARED;
static PyObject *__pyx_n_s_CU_GET_PROC_ADDRESS_DEFAULT;
static PyObject *__pyx_n_s_CU_GET_PROC_ADDRESS_LEGACY_STREA;
static PyObject *__pyx_n_s_CU_GET_PROC_ADDRESS_PER_THREAD_D;
static PyObject *__pyx_n_s_CU_GL_DEVICE_LIST_ALL;
static PyObject *__pyx_n_s_CU_GL_DEVICE_LIST_CURRENT_FRAME;
static PyObject *__pyx_n_s_CU_GL_DEVICE_LIST_NEXT_FRAME;
static PyObject *__pyx_n_s_CU_GL_MAP_RESOURCE_FLAGS_NONE;
static PyObject *__pyx_n_s_CU_GL_MAP_RESOURCE_FLAGS_READ_ON;
static PyObject *__pyx_n_s_CU_GL_MAP_RESOURCE_FLAGS_WRITE_D;
static PyObject *__pyx_n_s_CU_GPU_DIRECT_RDMA_WRITES_ORDERI;
static PyObject *__pyx_n_s_CU_GPU_DIRECT_RDMA_WRITES_ORDERI_2;
static PyObject *__pyx_n_s_CU_GPU_DIRECT_RDMA_WRITES_ORDERI_3;
static PyObject *__pyx_n_s_CU_GRAPHICS_MAP_RESOURCE_FLAGS_N;
static PyObject *__pyx_n_s_CU_GRAPHICS_MAP_RESOURCE_FLAGS_R;
static PyObject *__pyx_n_s_CU_GRAPHICS_MAP_RESOURCE_FLAGS_W;
static PyObject *__pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_NONE;
static PyObject *__pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_READ;
static PyObject *__pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_SURFA;
static PyObject *__pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_TEXTU;
static PyObject *__pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_WRITE;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_M;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_N;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEM;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEM_2;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NO;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_2;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALL;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FRE;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME;
static PyObject *__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE;
static PyObject *__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR;
static PyObject *__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_ATTRI;
static PyObject *__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_FUNCT;
static PyObject *__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_NODE;
static PyObject *__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_NOT_S;
static PyObject *__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_PARAM;
static PyObject *__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_TOPOL;
static PyObject *__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_UNSUP;
static PyObject *__pyx_n_s_CU_GRAPH_EXEC_UPDATE_SUCCESS;
static PyObject *__pyx_n_s_CU_GRAPH_MEM_ATTR_RESERVED_MEM_C;
static PyObject *__pyx_n_s_CU_GRAPH_MEM_ATTR_RESERVED_MEM_H;
static PyObject *__pyx_n_s_CU_GRAPH_MEM_ATTR_USED_MEM_CURRE;
static PyObject *__pyx_n_s_CU_GRAPH_MEM_ATTR_USED_MEM_HIGH;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_BATCH_MEM_OP;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_EMPTY;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_EVENT_RECORD;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIG;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAI;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_GRAPH;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_HOST;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_KERNEL;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_MEMCPY;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_MEMSET;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_MEM_ALLOC;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_MEM_FREE;
static PyObject *__pyx_n_s_CU_GRAPH_NODE_TYPE_WAIT_EVENT;
static PyObject *__pyx_n_s_CU_GRAPH_USER_OBJECT_MOVE;
static PyObject *__pyx_n_s_CU_IPC_HANDLE_SIZE;
static PyObject *__pyx_n_s_CU_IPC_MEM_LAZY_ENABLE_PEER_ACCE;
static PyObject *__pyx_n_s_CU_JIT_CACHE_MODE;
static PyObject *__pyx_n_s_CU_JIT_CACHE_OPTION_CA;
static PyObject *__pyx_n_s_CU_JIT_CACHE_OPTION_CG;
static PyObject *__pyx_n_s_CU_JIT_CACHE_OPTION_NONE;
static PyObject *__pyx_n_s_CU_JIT_ERROR_LOG_BUFFER;
static PyObject *__pyx_n_s_CU_JIT_ERROR_LOG_BUFFER_SIZE_BYT;
static PyObject *__pyx_n_s_CU_JIT_FALLBACK_STRATEGY;
static PyObject *__pyx_n_s_CU_JIT_FAST_COMPILE;
static PyObject *__pyx_n_s_CU_JIT_FMA;
static PyObject *__pyx_n_s_CU_JIT_FTZ;
static PyObject *__pyx_n_s_CU_JIT_GENERATE_DEBUG_INFO;
static PyObject *__pyx_n_s_CU_JIT_GENERATE_LINE_INFO;
static PyObject *__pyx_n_s_CU_JIT_GLOBAL_SYMBOL_ADDRESSES;
static PyObject *__pyx_n_s_CU_JIT_GLOBAL_SYMBOL_COUNT;
static PyObject *__pyx_n_s_CU_JIT_GLOBAL_SYMBOL_NAMES;
static PyObject *__pyx_n_s_CU_JIT_INFO_LOG_BUFFER;
static PyObject *__pyx_n_s_CU_JIT_INFO_LOG_BUFFER_SIZE_BYTE;
static PyObject *__pyx_n_s_CU_JIT_INPUT_CUBIN;
static PyObject *__pyx_n_s_CU_JIT_INPUT_FATBINARY;
static PyObject *__pyx_n_s_CU_JIT_INPUT_LIBRARY;
static PyObject *__pyx_n_s_CU_JIT_INPUT_NVVM;
static PyObject *__pyx_n_s_CU_JIT_INPUT_OBJECT;
static PyObject *__pyx_n_s_CU_JIT_INPUT_PTX;
static PyObject *__pyx_n_s_CU_JIT_LOG_VERBOSE;
static PyObject *__pyx_n_s_CU_JIT_LTO;
static PyObject *__pyx_n_s_CU_JIT_MAX_REGISTERS;
static PyObject *__pyx_n_s_CU_JIT_NEW_SM3X_OPT;
static PyObject *__pyx_n_s_CU_JIT_NUM_INPUT_TYPES;
static PyObject *__pyx_n_s_CU_JIT_NUM_OPTIONS;
static PyObject *__pyx_n_s_CU_JIT_OPTIMIZATION_LEVEL;
static PyObject *__pyx_n_s_CU_JIT_OPTIMIZE_UNUSED_DEVICE_VA;
static PyObject *__pyx_n_s_CU_JIT_PREC_DIV;
static PyObject *__pyx_n_s_CU_JIT_PREC_SQRT;
static PyObject *__pyx_n_s_CU_JIT_REFERENCED_KERNEL_COUNT;
static PyObject *__pyx_n_s_CU_JIT_REFERENCED_KERNEL_NAMES;
static PyObject *__pyx_n_s_CU_JIT_REFERENCED_VARIABLE_COUNT;
static PyObject *__pyx_n_s_CU_JIT_REFERENCED_VARIABLE_NAMES;
static PyObject *__pyx_n_s_CU_JIT_TARGET;
static PyObject *__pyx_n_s_CU_JIT_TARGET_FROM_CUCONTEXT;
static PyObject *__pyx_n_s_CU_JIT_THREADS_PER_BLOCK;
static PyObject *__pyx_n_s_CU_JIT_WALL_TIME;
static PyObject *__pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_ACCESS;
static PyObject *__pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER;
static PyObject *__pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_2;
static PyObject *__pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_COOPERA;
static PyObject *__pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_PRIORIT;
static PyObject *__pyx_n_s_CU_LAUNCH_ATTRIBUTE_ACCESS_POLIC;
static PyObject *__pyx_n_s_CU_LAUNCH_ATTRIBUTE_CLUSTER_DIME;
static PyObject *__pyx_n_s_CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHE;
static PyObject *__pyx_n_s_CU_LAUNCH_ATTRIBUTE_COOPERATIVE;
static PyObject *__pyx_n_s_CU_LAUNCH_ATTRIBUTE_IGNORE;
static PyObject *__pyx_n_s_CU_LAUNCH_ATTRIBUTE_PRIORITY;
static PyObject *__pyx_n_s_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC;
static PyObject *__pyx_n_s_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_2;
static PyObject *__pyx_n_s_CU_LAUNCH_ATTRIBUTE_SYNCHRONIZAT;
static PyObject *__pyx_n_s_CU_LAUNCH_PARAM_BUFFER_POINTER;
static PyObject *__pyx_n_s_CU_LAUNCH_PARAM_BUFFER_POINTER_A;
static PyObject *__pyx_n_s_CU_LAUNCH_PARAM_BUFFER_SIZE;
static PyObject *__pyx_n_s_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_I;
static PyObject *__pyx_n_s_CU_LAUNCH_PARAM_END;
static PyObject *__pyx_n_s_CU_LAUNCH_PARAM_END_AS_INT;
static PyObject *__pyx_n_s_CU_LIMIT_DEV_RUNTIME_PENDING_LAU;
static PyObject *__pyx_n_s_CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH;
static PyObject *__pyx_n_s_CU_LIMIT_MALLOC_HEAP_SIZE;
static PyObject *__pyx_n_s_CU_LIMIT_MAX;
static PyObject *__pyx_n_s_CU_LIMIT_MAX_L2_FETCH_GRANULARIT;
static PyObject *__pyx_n_s_CU_LIMIT_PERSISTING_L2_CACHE_SIZ;
static PyObject *__pyx_n_s_CU_LIMIT_PRINTF_FIFO_SIZE;
static PyObject *__pyx_n_s_CU_LIMIT_STACK_SIZE;
static PyObject *__pyx_n_s_CU_MEMHOSTALLOC_DEVICEMAP;
static PyObject *__pyx_n_s_CU_MEMHOSTALLOC_PORTABLE;
static PyObject *__pyx_n_s_CU_MEMHOSTALLOC_WRITECOMBINED;
static PyObject *__pyx_n_s_CU_MEMHOSTREGISTER_DEVICEMAP;
static PyObject *__pyx_n_s_CU_MEMHOSTREGISTER_IOMEMORY;
static PyObject *__pyx_n_s_CU_MEMHOSTREGISTER_PORTABLE;
static PyObject *__pyx_n_s_CU_MEMHOSTREGISTER_READ_ONLY;
static PyObject *__pyx_n_s_CU_MEMORYTYPE_ARRAY;
static PyObject *__pyx_n_s_CU_MEMORYTYPE_DEVICE;
static PyObject *__pyx_n_s_CU_MEMORYTYPE_HOST;
static PyObject *__pyx_n_s_CU_MEMORYTYPE_UNIFIED;
static PyObject *__pyx_n_s_CU_MEMPOOL_ATTR_RELEASE_THRESHOL;
static PyObject *__pyx_n_s_CU_MEMPOOL_ATTR_RESERVED_MEM_CUR;
static PyObject *__pyx_n_s_CU_MEMPOOL_ATTR_RESERVED_MEM_HIG;
static PyObject *__pyx_n_s_CU_MEMPOOL_ATTR_REUSE_ALLOW_INTE;
static PyObject *__pyx_n_s_CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPO;
static PyObject *__pyx_n_s_CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVE;
static PyObject *__pyx_n_s_CU_MEMPOOL_ATTR_USED_MEM_CURRENT;
static PyObject *__pyx_n_s_CU_MEMPOOL_ATTR_USED_MEM_HIGH;
static PyObject *__pyx_n_s_CU_MEM_ACCESS_FLAGS_PROT_MAX;
static PyObject *__pyx_n_s_CU_MEM_ACCESS_FLAGS_PROT_NONE;
static PyObject *__pyx_n_s_CU_MEM_ACCESS_FLAGS_PROT_READ;
static PyObject *__pyx_n_s_CU_MEM_ACCESS_FLAGS_PROT_READWRI;
static PyObject *__pyx_n_s_CU_MEM_ADVISE_SET_ACCESSED_BY;
static PyObject *__pyx_n_s_CU_MEM_ADVISE_SET_PREFERRED_LOCA;
static PyObject *__pyx_n_s_CU_MEM_ADVISE_SET_READ_MOSTLY;
static PyObject *__pyx_n_s_CU_MEM_ADVISE_UNSET_ACCESSED_BY;
static PyObject *__pyx_n_s_CU_MEM_ADVISE_UNSET_PREFERRED_LO;
static PyObject *__pyx_n_s_CU_MEM_ADVISE_UNSET_READ_MOSTLY;
static PyObject *__pyx_n_s_CU_MEM_ALLOCATION_COMP_GENERIC;
static PyObject *__pyx_n_s_CU_MEM_ALLOCATION_COMP_NONE;
static PyObject *__pyx_n_s_CU_MEM_ALLOCATION_TYPE_INVALID;
static PyObject *__pyx_n_s_CU_MEM_ALLOCATION_TYPE_MAX;
static PyObject *__pyx_n_s_CU_MEM_ALLOCATION_TYPE_PINNED;
static PyObject *__pyx_n_s_CU_MEM_ALLOC_GRANULARITY_MINIMUM;
static PyObject *__pyx_n_s_CU_MEM_ALLOC_GRANULARITY_RECOMME;
static PyObject *__pyx_n_s_CU_MEM_ATTACH_GLOBAL;
static PyObject *__pyx_n_s_CU_MEM_ATTACH_HOST;
static PyObject *__pyx_n_s_CU_MEM_ATTACH_SINGLE;
static PyObject *__pyx_n_s_CU_MEM_CREATE_USAGE_TILE_POOL;
static PyObject *__pyx_n_s_CU_MEM_HANDLE_TYPE_GENERIC;
static PyObject *__pyx_n_s_CU_MEM_HANDLE_TYPE_MAX;
static PyObject *__pyx_n_s_CU_MEM_HANDLE_TYPE_NONE;
static PyObject *__pyx_n_s_CU_MEM_HANDLE_TYPE_POSIX_FILE_DE;
static PyObject *__pyx_n_s_CU_MEM_HANDLE_TYPE_WIN32;
static PyObject *__pyx_n_s_CU_MEM_HANDLE_TYPE_WIN32_KMT;
static PyObject *__pyx_n_s_CU_MEM_LOCATION_TYPE_DEVICE;
static PyObject *__pyx_n_s_CU_MEM_LOCATION_TYPE_INVALID;
static PyObject *__pyx_n_s_CU_MEM_LOCATION_TYPE_MAX;
static PyObject *__pyx_n_s_CU_MEM_OPERATION_TYPE_MAP;
static PyObject *__pyx_n_s_CU_MEM_OPERATION_TYPE_UNMAP;
static PyObject *__pyx_n_s_CU_MEM_RANGE_ATTRIBUTE_ACCESSED;
static PyObject *__pyx_n_s_CU_MEM_RANGE_ATTRIBUTE_LAST_PREF;
static PyObject *__pyx_n_s_CU_MEM_RANGE_ATTRIBUTE_PREFERRED;
static PyObject *__pyx_n_s_CU_MEM_RANGE_ATTRIBUTE_READ_MOST;
static PyObject *__pyx_n_s_CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF;
static PyObject *__pyx_n_s_CU_MEM_RANGE_HANDLE_TYPE_MAX;
static PyObject *__pyx_n_s_CU_MODULE_EAGER_LOADING;
static PyObject *__pyx_n_s_CU_MODULE_LAZY_LOADING;
static PyObject *__pyx_n_s_CU_OCCUPANCY_DEFAULT;
static PyObject *__pyx_n_s_CU_OCCUPANCY_DISABLE_CACHING_OVE;
static PyObject *__pyx_n_s_CU_OUT_CSV;
static PyObject *__pyx_n_s_CU_OUT_KEY_VALUE_PAIR;
static PyObject *__pyx_n_s_CU_PARAM_TR_DEFAULT;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_ACCESS_FLAG;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_2;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_3;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_4;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_ALLOWED_HAN;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_BUFFER_ID;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_CONTEXT;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_DEVICE_ORDI;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_DEVICE_POIN;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_HOST_POINTE;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_IS_GPU_DIRE;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_IS_LEGACY_C;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_IS_MANAGED;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_MAPPED;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_MAPPING_BAS;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_MAPPING_SIZ;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_MEMORY_BLOC;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_MEMORY_TYPE;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_MEMPOOL_HAN;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_P2P_TOKENS;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_RANGE_SIZE;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_RANGE_START;
static PyObject *__pyx_n_s_CU_POINTER_ATTRIBUTE_SYNC_MEMOPS;
static PyObject *__pyx_n_s_CU_PREFER_BINARY;
static PyObject *__pyx_n_s_CU_PREFER_PTX;
static PyObject *__pyx_n_s_CU_RESOURCE_TYPE_ARRAY;
static PyObject *__pyx_n_s_CU_RESOURCE_TYPE_LINEAR;
static PyObject *__pyx_n_s_CU_RESOURCE_TYPE_MIPMAPPED_ARRAY;
static PyObject *__pyx_n_s_CU_RESOURCE_TYPE_PITCH2D;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_1X16;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_1X32;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_2X16;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_2X32;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_4X16;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_4X32;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_NONE;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_SIGNED_BC4;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_SIGNED_BC5;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_SIGNED_BC6H;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_1X16;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_1X32;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_1X8;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_2X16;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_2X32;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_2X8;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_4X16;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_4X32;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_4X8;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_1X16;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_1X32;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_1X8;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_2X16;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_2X32;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_2X8;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_4X16;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_4X32;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_4X8;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC1;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC2;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC3;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC4;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC5;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC6H;
static PyObject *__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC7;
static PyObject *__pyx_n_s_CU_SHAREDMEM_CARVEOUT_DEFAULT;
static PyObject *__pyx_n_s_CU_SHAREDMEM_CARVEOUT_MAX_L1;
static PyObject *__pyx_n_s_CU_SHAREDMEM_CARVEOUT_MAX_SHARED;
static PyObject *__pyx_n_s_CU_SHARED_MEM_CONFIG_DEFAULT_BAN;
static PyObject *__pyx_n_s_CU_SHARED_MEM_CONFIG_EIGHT_BYTE;
static PyObject *__pyx_n_s_CU_SHARED_MEM_CONFIG_FOUR_BYTE_B;
static PyObject *__pyx_n_s_CU_STREAM_ADD_CAPTURE_DEPENDENCI;
static PyObject *__pyx_n_s_CU_STREAM_ATTRIBUTE_ACCESS_POLIC;
static PyObject *__pyx_n_s_CU_STREAM_ATTRIBUTE_SYNCHRONIZAT;
static PyObject *__pyx_n_s_CU_STREAM_CAPTURE_MODE_GLOBAL;
static PyObject *__pyx_n_s_CU_STREAM_CAPTURE_MODE_RELAXED;
static PyObject *__pyx_n_s_CU_STREAM_CAPTURE_MODE_THREAD_LO;
static PyObject *__pyx_n_s_CU_STREAM_CAPTURE_STATUS_ACTIVE;
static PyObject *__pyx_n_s_CU_STREAM_CAPTURE_STATUS_INVALID;
static PyObject *__pyx_n_s_CU_STREAM_CAPTURE_STATUS_NONE;
static PyObject *__pyx_n_s_CU_STREAM_DEFAULT;
static PyObject *__pyx_n_s_CU_STREAM_LEGACY;
static PyObject *__pyx_n_s_CU_STREAM_MEMORY_BARRIER_TYPE_GP;
static PyObject *__pyx_n_s_CU_STREAM_MEMORY_BARRIER_TYPE_SY;
static PyObject *__pyx_n_s_CU_STREAM_MEM_OP_BARRIER;
static PyObject *__pyx_n_s_CU_STREAM_MEM_OP_FLUSH_REMOTE_WR;
static PyObject *__pyx_n_s_CU_STREAM_MEM_OP_WAIT_VALUE_32;
static PyObject *__pyx_n_s_CU_STREAM_MEM_OP_WAIT_VALUE_64;
static PyObject *__pyx_n_s_CU_STREAM_MEM_OP_WRITE_VALUE_32;
static PyObject *__pyx_n_s_CU_STREAM_MEM_OP_WRITE_VALUE_64;
static PyObject *__pyx_n_s_CU_STREAM_NON_BLOCKING;
static PyObject *__pyx_n_s_CU_STREAM_PER_THREAD;
static PyObject *__pyx_n_s_CU_STREAM_SET_CAPTURE_DEPENDENCI;
static PyObject *__pyx_n_s_CU_STREAM_WAIT_VALUE_AND;
static PyObject *__pyx_n_s_CU_STREAM_WAIT_VALUE_EQ;
static PyObject *__pyx_n_s_CU_STREAM_WAIT_VALUE_FLUSH;
static PyObject *__pyx_n_s_CU_STREAM_WAIT_VALUE_GEQ;
static PyObject *__pyx_n_s_CU_STREAM_WAIT_VALUE_NOR;
static PyObject *__pyx_n_s_CU_STREAM_WRITE_VALUE_DEFAULT;
static PyObject *__pyx_n_s_CU_STREAM_WRITE_VALUE_NO_MEMORY;
static PyObject *__pyx_n_s_CU_SYNC_POLICY_AUTO;
static PyObject *__pyx_n_s_CU_SYNC_POLICY_BLOCKING_SYNC;
static PyObject *__pyx_n_s_CU_SYNC_POLICY_SPIN;
static PyObject *__pyx_n_s_CU_SYNC_POLICY_YIELD;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_30;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_32;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_35;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_37;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_50;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_52;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_53;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_60;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_61;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_62;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_70;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_72;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_75;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_80;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_86;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_87;
static PyObject *__pyx_n_s_CU_TARGET_COMPUTE_89;
static PyObject *__pyx_n_s_CU_TRSA_OVERRIDE_FORMAT;
static PyObject *__pyx_n_s_CU_TRSF_DISABLE_TRILINEAR_OPTIMI;
static PyObject *__pyx_n_s_CU_TRSF_NORMALIZED_COORDINATES;
static PyObject *__pyx_n_s_CU_TRSF_READ_AS_INTEGER;
static PyObject *__pyx_n_s_CU_TRSF_SEAMLESS_CUBEMAP;
static PyObject *__pyx_n_s_CU_TRSF_SRGB;
static PyObject *__pyx_n_s_CU_TR_ADDRESS_MODE_BORDER;
static PyObject *__pyx_n_s_CU_TR_ADDRESS_MODE_CLAMP;
static PyObject *__pyx_n_s_CU_TR_ADDRESS_MODE_MIRROR;
static PyObject *__pyx_n_s_CU_TR_ADDRESS_MODE_WRAP;
static PyObject *__pyx_n_s_CU_TR_FILTER_MODE_LINEAR;
static PyObject *__pyx_n_s_CU_TR_FILTER_MODE_POINT;
static PyObject *__pyx_n_s_CU_USER_OBJECT_NO_DESTRUCTOR_SYN;
static PyObject *__pyx_n_s_CUaccessPolicyWindow;
static PyObject *__pyx_n_s_CUaccessPolicyWindow_st;
static PyObject *__pyx_n_s_CUaccessPolicyWindow_st___reduce;
static PyObject *__pyx_n_s_CUaccessPolicyWindow_st___setsta;
static PyObject *__pyx_n_s_CUaccessPolicyWindow_st_getPtr;
static PyObject *__pyx_n_s_CUaccessPolicyWindow_v1;
static PyObject *__pyx_n_s_CUaccessProperty;
static PyObject *__pyx_n_s_CUaddress_mode;
static PyObject *__pyx_kp_u_CUarray;
static PyObject *__pyx_n_s_CUarrayMapInfo;
static PyObject *__pyx_n_s_CUarrayMapInfo_st;
static PyObject *__pyx_n_s_CUarrayMapInfo_st___reduce_cytho;
static PyObject *__pyx_n_s_CUarrayMapInfo_st___setstate_cyt;
static PyObject *__pyx_n_s_CUarrayMapInfo_st_getPtr;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_10;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_11;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_12;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_13;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_14;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_15;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_16;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_17;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_18;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_19;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_2;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_20;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_3;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_4;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_5;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_6;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_7;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_8;
static PyObject *__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_9;
static PyObject *__pyx_n_s_CUarraySparseSubresourceType;
static PyObject *__pyx_n_s_CUarray_2;
static PyObject *__pyx_n_s_CUarray___reduce_cython;
static PyObject *__pyx_n_s_CUarray___setstate_cython;
static PyObject *__pyx_n_s_CUarray_cubemap_face;
static PyObject *__pyx_n_s_CUarray_format;
static PyObject *__pyx_n_s_CUarray_getPtr;
static PyObject *__pyx_n_s_CUclusterSchedulingPolicy;
static PyObject *__pyx_n_s_CUcomputemode;
static PyObject *__pyx_kp_u_CUcontext;
static PyObject *__pyx_n_s_CUcontext_2;
static PyObject *__pyx_n_s_CUcontext___reduce_cython;
static PyObject *__pyx_n_s_CUcontext___setstate_cython;
static PyObject *__pyx_n_s_CUcontext_getPtr;
static PyObject *__pyx_n_s_CUctx_flags;
static PyObject *__pyx_kp_u_CUdevice;
static PyObject *__pyx_n_s_CUdevice_2;
static PyObject *__pyx_n_s_CUdevice_P2PAttribute;
static PyObject *__pyx_n_s_CUdevice___reduce_cython;
static PyObject *__pyx_n_s_CUdevice___setstate_cython;
static PyObject *__pyx_n_s_CUdevice_attribute;
static PyObject *__pyx_n_s_CUdevice_getPtr;
static PyObject *__pyx_kp_u_CUdevice_v1;
static PyObject *__pyx_n_s_CUdevice_v1_2;
static PyObject *__pyx_n_s_CUdevice_v1___reduce_cython;
static PyObject *__pyx_n_s_CUdevice_v1___setstate_cython;
static PyObject *__pyx_n_s_CUdevice_v1_getPtr;
static PyObject *__pyx_kp_u_CUdeviceptr;
static PyObject *__pyx_n_s_CUdeviceptr_2;
static PyObject *__pyx_n_s_CUdeviceptr___reduce_cython;
static PyObject *__pyx_n_s_CUdeviceptr___setstate_cython;
static PyObject *__pyx_n_s_CUdeviceptr_getPtr;
static PyObject *__pyx_kp_u_CUdeviceptr_v2;
static PyObject *__pyx_n_s_CUdeviceptr_v2_2;
static PyObject *__pyx_n_s_CUdeviceptr_v2___reduce_cython;
static PyObject *__pyx_n_s_CUdeviceptr_v2___setstate_cython;
static PyObject *__pyx_n_s_CUdeviceptr_v2_getPtr;
static PyObject *__pyx_n_s_CUdevprop;
static PyObject *__pyx_n_s_CUdevprop_st;
static PyObject *__pyx_n_s_CUdevprop_st___reduce_cython;
static PyObject *__pyx_n_s_CUdevprop_st___setstate_cython;
static PyObject *__pyx_n_s_CUdevprop_st_getPtr;
static PyObject *__pyx_n_s_CUdevprop_v1;
static PyObject *__pyx_n_s_CUdriverProcAddress_flags;
static PyObject *__pyx_n_s_CUeglColorFormat;
static PyObject *__pyx_n_s_CUeglFrame;
static PyObject *__pyx_n_u_CUeglFrame;
static PyObject *__pyx_n_s_CUeglFrameType;
static PyObject *__pyx_n_s_CUeglFrame_st;
static PyObject *__pyx_n_s_CUeglFrame_st___reduce_cython;
static PyObject *__pyx_n_s_CUeglFrame_st___setstate_cython;
static PyObject *__pyx_n_s_CUeglFrame_st_getPtr;
static PyObject *__pyx_n_s_CUeglFrame_v1;
static PyObject *__pyx_n_s_CUeglFrame_v1_CUeglFrame_v1_CUe;
static PyObject *__pyx_n_s_CUeglFrame_v1_CUeglFrame_v1_CUe_2;
static PyObject *__pyx_n_s_CUeglFrame_v1_CUeglFrame_v1_CUe_3;
static PyObject *__pyx_n_s_CUeglFrame_v1_CUeglFrame_v1_CUe_4;
static PyObject *__pyx_n_s_CUeglResourceLocationFlags;
static PyObject *__pyx_kp_u_CUeglStreamConnection;
static PyObject *__pyx_n_s_CUeglStreamConnection_2;
static PyObject *__pyx_n_s_CUeglStreamConnection___reduce_c;
static PyObject *__pyx_n_s_CUeglStreamConnection___setstate;
static PyObject *__pyx_n_s_CUeglStreamConnection_getPtr;
static PyObject *__pyx_kp_u_CUevent;
static PyObject *__pyx_n_s_CUevent_2;
static PyObject *__pyx_n_s_CUevent___reduce_cython;
static PyObject *__pyx_n_s_CUevent___setstate_cython;
static PyObject *__pyx_n_s_CUevent_flags;
static PyObject *__pyx_n_s_CUevent_getPtr;
static PyObject *__pyx_n_s_CUevent_record_flags;
static PyObject *__pyx_n_s_CUevent_sched_flags;
static PyObject *__pyx_n_s_CUevent_wait_flags;
static PyObject *__pyx_n_s_CUexecAffinityParam;
static PyObject *__pyx_n_s_CUexecAffinityParam_st;
static PyObject *__pyx_n_s_CUexecAffinityParam_st___reduce;
static PyObject *__pyx_n_s_CUexecAffinityParam_st___setstat;
static PyObject *__pyx_n_s_CUexecAffinityParam_st_getPtr;
static PyObject *__pyx_n_s_CUexecAffinityParam_v1;
static PyObject *__pyx_n_s_CUexecAffinityParam_v1_CUexecAf;
static PyObject *__pyx_n_s_CUexecAffinityParam_v1_CUexecAf_2;
static PyObject *__pyx_n_s_CUexecAffinityParam_v1_CUexecAf_3;
static PyObject *__pyx_n_s_CUexecAffinityParam_v1_CUexecAf_4;
static PyObject *__pyx_n_s_CUexecAffinitySmCount;
static PyObject *__pyx_n_s_CUexecAffinitySmCount_st;
static PyObject *__pyx_n_s_CUexecAffinitySmCount_st___reduc;
static PyObject *__pyx_n_s_CUexecAffinitySmCount_st___setst;
static PyObject *__pyx_n_s_CUexecAffinitySmCount_st_getPtr;
static PyObject *__pyx_n_s_CUexecAffinitySmCount_v1;
static PyObject *__pyx_n_s_CUexecAffinityType;
static PyObject *__pyx_kp_u_CUexternalMemory;
static PyObject *__pyx_n_s_CUexternalMemoryHandleType;
static PyObject *__pyx_n_s_CUexternalMemory_2;
static PyObject *__pyx_n_s_CUexternalMemory___reduce_cython;
static PyObject *__pyx_n_s_CUexternalMemory___setstate_cyth;
static PyObject *__pyx_n_s_CUexternalMemory_getPtr;
static PyObject *__pyx_kp_u_CUexternalSemaphore;
static PyObject *__pyx_n_s_CUexternalSemaphoreHandleType;
static PyObject *__pyx_n_s_CUexternalSemaphore_2;
static PyObject *__pyx_n_s_CUexternalSemaphore___reduce_cyt;
static PyObject *__pyx_n_s_CUexternalSemaphore___setstate_c;
static PyObject *__pyx_n_s_CUexternalSemaphore_getPtr;
static PyObject *__pyx_n_s_CUfilter_mode;
static PyObject *__pyx_n_s_CUflushGPUDirectRDMAWritesOption;
static PyObject *__pyx_n_s_CUflushGPUDirectRDMAWritesScope;
static PyObject *__pyx_n_s_CUflushGPUDirectRDMAWritesTarget;
static PyObject *__pyx_n_s_CUfunc_cache;
static PyObject *__pyx_kp_u_CUfunction;
static PyObject *__pyx_n_s_CUfunction_2;
static PyObject *__pyx_n_s_CUfunction___reduce_cython;
static PyObject *__pyx_n_s_CUfunction___setstate_cython;
static PyObject *__pyx_n_s_CUfunction_attribute;
static PyObject *__pyx_n_s_CUfunction_getPtr;
static PyObject *__pyx_kp_u_CUgraph;
static PyObject *__pyx_n_s_CUgraphDebugDot_flags;
static PyObject *__pyx_kp_u_CUgraphExec;
static PyObject *__pyx_n_s_CUgraphExecUpdateResult;
static PyObject *__pyx_n_s_CUgraphExec_2;
static PyObject *__pyx_n_s_CUgraphExec___reduce_cython;
static PyObject *__pyx_n_s_CUgraphExec___setstate_cython;
static PyObject *__pyx_n_s_CUgraphExec_getPtr;
static PyObject *__pyx_n_s_CUgraphInstantiate_flags;
static PyObject *__pyx_n_s_CUgraphMem_attribute;
static PyObject *__pyx_kp_u_CUgraphNode;
static PyObject *__pyx_n_s_CUgraphNodeType;
static PyObject *__pyx_n_s_CUgraphNode_2;
static PyObject *__pyx_n_s_CUgraphNode___reduce_cython;
static PyObject *__pyx_n_s_CUgraphNode___setstate_cython;
static PyObject *__pyx_n_s_CUgraphNode_getPtr;
static PyObject *__pyx_n_s_CUgraph_2;
static PyObject *__pyx_n_s_CUgraph___reduce_cython;
static PyObject *__pyx_n_s_CUgraph___setstate_cython;
static PyObject *__pyx_n_s_CUgraph_getPtr;
static PyObject *__pyx_n_s_CUgraphicsMapResourceFlags;
static PyObject *__pyx_n_s_CUgraphicsRegisterFlags;
static PyObject *__pyx_kp_u_CUgraphicsResource;
static PyObject *__pyx_n_s_CUgraphicsResource_2;
static PyObject *__pyx_n_s_CUgraphicsResource___reduce_cyth;
static PyObject *__pyx_n_s_CUgraphicsResource___setstate_cy;
static PyObject *__pyx_n_s_CUgraphicsResource_getPtr;
static PyObject *__pyx_kp_u_CUhostFn;
static PyObject *__pyx_n_s_CUhostFn_2;
static PyObject *__pyx_n_s_CUhostFn___reduce_cython;
static PyObject *__pyx_n_s_CUhostFn___setstate_cython;
static PyObject *__pyx_n_s_CUhostFn_getPtr;
static PyObject *__pyx_n_s_CUipcEventHandle;
static PyObject *__pyx_n_u_CUipcEventHandle;
static PyObject *__pyx_n_s_CUipcEventHandle_st;
static PyObject *__pyx_n_s_CUipcEventHandle_st___reduce_cyt;
static PyObject *__pyx_n_s_CUipcEventHandle_st___setstate_c;
static PyObject *__pyx_n_s_CUipcEventHandle_st_getPtr;
static PyObject *__pyx_n_s_CUipcEventHandle_v1;
static PyObject *__pyx_n_s_CUipcMemHandle;
static PyObject *__pyx_n_u_CUipcMemHandle;
static PyObject *__pyx_n_s_CUipcMemHandle_st;
static PyObject *__pyx_n_s_CUipcMemHandle_st___reduce_cytho;
static PyObject *__pyx_n_s_CUipcMemHandle_st___setstate_cyt;
static PyObject *__pyx_n_s_CUipcMemHandle_st_getPtr;
static PyObject *__pyx_n_s_CUipcMemHandle_v1;
static PyObject *__pyx_n_s_CUipcMem_flags;
static PyObject *__pyx_n_s_CUjitInputType;
static PyObject *__pyx_n_s_CUjit_cacheMode;
static PyObject *__pyx_n_s_CUjit_fallback;
static PyObject *__pyx_n_s_CUjit_option;
static PyObject *__pyx_n_s_CUjit_target;
static PyObject *__pyx_n_s_CUkernelNodeAttrID;
static PyObject *__pyx_n_s_CUkernelNodeAttrValue;
static PyObject *__pyx_n_u_CUkernelNodeAttrValue;
static PyObject *__pyx_n_s_CUkernelNodeAttrValue_v1;
static PyObject *__pyx_n_s_CUlaunchAttribute;
static PyObject *__pyx_n_s_CUlaunchAttributeID;
static PyObject *__pyx_n_s_CUlaunchAttributeValue;
static PyObject *__pyx_n_s_CUlaunchAttributeValue_CUlaunch;
static PyObject *__pyx_n_s_CUlaunchAttributeValue_CUlaunch_2;
static PyObject *__pyx_n_s_CUlaunchAttributeValue_CUlaunch_3;
static PyObject *__pyx_n_s_CUlaunchAttributeValue_CUlaunch_4;
static PyObject *__pyx_n_s_CUlaunchAttributeValue_CUlaunch_5;
static PyObject *__pyx_n_s_CUlaunchAttributeValue_CUlaunch_6;
static PyObject *__pyx_n_s_CUlaunchAttributeValue_CUlaunch_7;
static PyObject *__pyx_n_s_CUlaunchAttributeValue_CUlaunch_8;
static PyObject *__pyx_n_s_CUlaunchAttributeValue_union;
static PyObject *__pyx_n_s_CUlaunchAttributeValue_union___r;
static PyObject *__pyx_n_s_CUlaunchAttributeValue_union___s;
static PyObject *__pyx_n_s_CUlaunchAttributeValue_union_get;
static PyObject *__pyx_n_s_CUlaunchAttribute_st;
static PyObject *__pyx_n_s_CUlaunchAttribute_st___reduce_cy;
static PyObject *__pyx_n_s_CUlaunchAttribute_st___setstate;
static PyObject *__pyx_n_s_CUlaunchAttribute_st_getPtr;
static PyObject *__pyx_n_s_CUlaunchConfig;
static PyObject *__pyx_n_u_CUlaunchConfig;
static PyObject *__pyx_n_s_CUlaunchConfig_st;
static PyObject *__pyx_n_s_CUlaunchConfig_st___reduce_cytho;
static PyObject *__pyx_n_s_CUlaunchConfig_st___setstate_cyt;
static PyObject *__pyx_n_s_CUlaunchConfig_st_getPtr;
static PyObject *__pyx_n_s_CUlimit;
static PyObject *__pyx_kp_u_CUlinkState;
static PyObject *__pyx_n_s_CUlinkState_2;
static PyObject *__pyx_n_s_CUlinkState___reduce_cython;
static PyObject *__pyx_n_s_CUlinkState___setstate_cython;
static PyObject *__pyx_n_s_CUlinkState_getPtr;
static PyObject *__pyx_n_s_CUmemAccessDesc;
static PyObject *__pyx_n_s_CUmemAccessDesc_st;
static PyObject *__pyx_n_s_CUmemAccessDesc_st___reduce_cyth;
static PyObject *__pyx_n_s_CUmemAccessDesc_st___setstate_cy;
static PyObject *__pyx_n_s_CUmemAccessDesc_st_getPtr;
static PyObject *__pyx_n_s_CUmemAccessDesc_v1;
static PyObject *__pyx_n_s_CUmemAccess_flags;
static PyObject *__pyx_n_s_CUmemAllocationCompType;
static PyObject *__pyx_n_s_CUmemAllocationGranularity_flags;
static PyObject *__pyx_n_s_CUmemAllocationHandleType;
static PyObject *__pyx_n_s_CUmemAllocationProp;
static PyObject *__pyx_n_u_CUmemAllocationProp;
static PyObject *__pyx_n_s_CUmemAllocationProp_st;
static PyObject *__pyx_n_s_CUmemAllocationProp_st___reduce;
static PyObject *__pyx_n_s_CUmemAllocationProp_st___setstat;
static PyObject *__pyx_n_s_CUmemAllocationProp_st_getPtr;
static PyObject *__pyx_n_s_CUmemAllocationProp_v1;
static PyObject *__pyx_n_s_CUmemAllocationProp_v1_CUmemAll;
static PyObject *__pyx_n_s_CUmemAllocationProp_v1_CUmemAll_2;
static PyObject *__pyx_n_s_CUmemAllocationProp_v1_CUmemAll_3;
static PyObject *__pyx_n_s_CUmemAllocationProp_v1_CUmemAll_4;
static PyObject *__pyx_n_s_CUmemAllocationType;
static PyObject *__pyx_n_s_CUmemAttach_flags;
static PyObject *__pyx_kp_u_CUmemGenericAllocationHandle;
static PyObject *__pyx_n_s_CUmemGenericAllocationHandle_2;
static PyObject *__pyx_n_s_CUmemGenericAllocationHandle___r;
static PyObject *__pyx_n_s_CUmemGenericAllocationHandle___s;
static PyObject *__pyx_n_s_CUmemGenericAllocationHandle_get;
static PyObject *__pyx_kp_u_CUmemGenericAllocationHandle_v1;
static PyObject *__pyx_n_s_CUmemGenericAllocationHandle_v1_2;
static PyObject *__pyx_n_s_CUmemGenericAllocationHandle_v1_3;
static PyObject *__pyx_n_s_CUmemGenericAllocationHandle_v1_4;
static PyObject *__pyx_n_s_CUmemGenericAllocationHandle_v1_5;
static PyObject *__pyx_n_s_CUmemHandleType;
static PyObject *__pyx_n_s_CUmemLocation;
static PyObject *__pyx_n_u_CUmemLocation;
static PyObject *__pyx_n_s_CUmemLocationType;
static PyObject *__pyx_n_s_CUmemLocation_st;
static PyObject *__pyx_n_s_CUmemLocation_st___reduce_cython;
static PyObject *__pyx_n_s_CUmemLocation_st___setstate_cyth;
static PyObject *__pyx_n_s_CUmemLocation_st_getPtr;
static PyObject *__pyx_n_s_CUmemLocation_v1;
static PyObject *__pyx_n_s_CUmemOperationType;
static PyObject *__pyx_n_s_CUmemPoolProps;
static PyObject *__pyx_n_u_CUmemPoolProps;
static PyObject *__pyx_n_s_CUmemPoolProps_st;
static PyObject *__pyx_n_s_CUmemPoolProps_st___reduce_cytho;
static PyObject *__pyx_n_s_CUmemPoolProps_st___setstate_cyt;
static PyObject *__pyx_n_s_CUmemPoolProps_st_getPtr;
static PyObject *__pyx_n_s_CUmemPoolProps_v1;
static PyObject *__pyx_n_s_CUmemPoolPtrExportData;
static PyObject *__pyx_n_u_CUmemPoolPtrExportData;
static PyObject *__pyx_n_s_CUmemPoolPtrExportData_st;
static PyObject *__pyx_n_s_CUmemPoolPtrExportData_st___redu;
static PyObject *__pyx_n_s_CUmemPoolPtrExportData_st___sets;
static PyObject *__pyx_n_s_CUmemPoolPtrExportData_st_getPtr;
static PyObject *__pyx_n_s_CUmemPoolPtrExportData_v1;
static PyObject *__pyx_n_s_CUmemPool_attribute;
static PyObject *__pyx_n_s_CUmemRangeHandleType;
static PyObject *__pyx_n_s_CUmem_advise;
static PyObject *__pyx_n_s_CUmem_range_attribute;
static PyObject *__pyx_kp_u_CUmemoryPool;
static PyObject *__pyx_n_s_CUmemoryPool_2;
static PyObject *__pyx_n_s_CUmemoryPool___reduce_cython;
static PyObject *__pyx_n_s_CUmemoryPool___setstate_cython;
static PyObject *__pyx_n_s_CUmemoryPool_getPtr;
static PyObject *__pyx_n_s_CUmemorytype;
static PyObject *__pyx_kp_u_CUmipmappedArray;
static PyObject *__pyx_n_s_CUmipmappedArray_2;
static PyObject *__pyx_n_s_CUmipmappedArray___reduce_cython;
static PyObject *__pyx_n_s_CUmipmappedArray___setstate_cyth;
static PyObject *__pyx_n_s_CUmipmappedArray_getPtr;
static PyObject *__pyx_kp_u_CUmodule;
static PyObject *__pyx_n_s_CUmoduleLoadingMode;
static PyObject *__pyx_n_s_CUmodule_2;
static PyObject *__pyx_n_s_CUmodule___reduce_cython;
static PyObject *__pyx_n_s_CUmodule___setstate_cython;
static PyObject *__pyx_n_s_CUmodule_getPtr;
static PyObject *__pyx_kp_u_CUoccupancyB2DSize;
static PyObject *__pyx_n_s_CUoccupancyB2DSize_2;
static PyObject *__pyx_n_s_CUoccupancyB2DSize___reduce_cyth;
static PyObject *__pyx_n_s_CUoccupancyB2DSize___setstate_cy;
static PyObject *__pyx_n_s_CUoccupancyB2DSize_getPtr;
static PyObject *__pyx_n_s_CUoccupancy_flags;
static PyObject *__pyx_n_s_CUoutput_mode;
static PyObject *__pyx_n_s_CUpointer_attribute;
static PyObject *__pyx_n_s_CUresourceViewFormat;
static PyObject *__pyx_n_s_CUresourcetype;
static PyObject *__pyx_n_s_CUresult;
static PyObject *__pyx_n_s_CUshared_carveout;
static PyObject *__pyx_n_s_CUsharedconfig;
static PyObject *__pyx_kp_u_CUstream;
static PyObject *__pyx_n_s_CUstreamAttrID;
static PyObject *__pyx_n_s_CUstreamAttrValue;
static PyObject *__pyx_n_u_CUstreamAttrValue;
static PyObject *__pyx_n_s_CUstreamAttrValue_v1;
static PyObject *__pyx_n_s_CUstreamBatchMemOpParams;
static PyObject *__pyx_n_s_CUstreamBatchMemOpParams_union;
static PyObject *__pyx_n_s_CUstreamBatchMemOpParams_union_2;
static PyObject *__pyx_n_s_CUstreamBatchMemOpParams_union_3;
static PyObject *__pyx_n_s_CUstreamBatchMemOpParams_union_g;
static PyObject *__pyx_n_s_CUstreamBatchMemOpParams_v1;
static PyObject *__pyx_n_s_CUstreamBatchMemOpType;
static PyObject *__pyx_kp_u_CUstreamCallback;
static PyObject *__pyx_n_s_CUstreamCallback_2;
static PyObject *__pyx_n_s_CUstreamCallback___reduce_cython;
static PyObject *__pyx_n_s_CUstreamCallback___setstate_cyth;
static PyObject *__pyx_n_s_CUstreamCallback_getPtr;
static PyObject *__pyx_n_s_CUstreamCaptureMode;
static PyObject *__pyx_n_s_CUstreamCaptureStatus;
static PyObject *__pyx_n_s_CUstreamMemOpFlushRemoteWritesPa;
static PyObject *__pyx_n_s_CUstreamMemOpFlushRemoteWritesPa_2;
static PyObject *__pyx_n_s_CUstreamMemOpFlushRemoteWritesPa_3;
static PyObject *__pyx_n_s_CUstreamMemOpFlushRemoteWritesPa_4;
static PyObject *__pyx_n_s_CUstreamMemOpMemoryBarrierParams;
static PyObject *__pyx_n_s_CUstreamMemOpMemoryBarrierParams_2;
static PyObject *__pyx_n_s_CUstreamMemOpMemoryBarrierParams_3;
static PyObject *__pyx_n_s_CUstreamMemOpMemoryBarrierParams_4;
static PyObject *__pyx_n_s_CUstreamMemOpWaitValueParams_st;
static PyObject *__pyx_n_s_CUstreamMemOpWaitValueParams_st_2;
static PyObject *__pyx_n_s_CUstreamMemOpWaitValueParams_st_3;
static PyObject *__pyx_n_s_CUstreamMemOpWaitValueParams_st_4;
static PyObject *__pyx_n_s_CUstreamMemOpWriteValueParams_st;
static PyObject *__pyx_n_s_CUstreamMemOpWriteValueParams_st_2;
static PyObject *__pyx_n_s_CUstreamMemOpWriteValueParams_st_3;
static PyObject *__pyx_n_s_CUstreamMemOpWriteValueParams_st_4;
static PyObject *__pyx_n_s_CUstreamMemoryBarrier_flags;
static PyObject *__pyx_n_s_CUstreamUpdateCaptureDependencie;
static PyObject *__pyx_n_s_CUstreamWaitValue_flags;
static PyObject *__pyx_n_s_CUstreamWriteValue_flags;
static PyObject *__pyx_n_s_CUstream_2;
static PyObject *__pyx_n_s_CUstream___reduce_cython;
static PyObject *__pyx_n_s_CUstream___setstate_cython;
static PyObject *__pyx_n_s_CUstream_flags;
static PyObject *__pyx_n_s_CUstream_getPtr;
static PyObject *__pyx_kp_u_CUsurfObject;
static PyObject *__pyx_n_s_CUsurfObject_2;
static PyObject *__pyx_n_s_CUsurfObject___reduce_cython;
static PyObject *__pyx_n_s_CUsurfObject___setstate_cython;
static PyObject *__pyx_n_s_CUsurfObject_getPtr;
static PyObject *__pyx_kp_u_CUsurfObject_v1;
static PyObject *__pyx_n_s_CUsurfObject_v1_2;
static PyObject *__pyx_n_s_CUsurfObject_v1___reduce_cython;
static PyObject *__pyx_n_s_CUsurfObject_v1___setstate_cytho;
static PyObject *__pyx_n_s_CUsurfObject_v1_getPtr;
static PyObject *__pyx_kp_u_CUsurfref;
static PyObject *__pyx_n_s_CUsurfref_2;
static PyObject *__pyx_n_s_CUsurfref___reduce_cython;
static PyObject *__pyx_n_s_CUsurfref___setstate_cython;
static PyObject *__pyx_n_s_CUsurfref_getPtr;
static PyObject *__pyx_n_s_CUsynchronizationPolicy;
static PyObject *__pyx_kp_u_CUtexObject;
static PyObject *__pyx_n_s_CUtexObject_2;
static PyObject *__pyx_n_s_CUtexObject___reduce_cython;
static PyObject *__pyx_n_s_CUtexObject___setstate_cython;
static PyObject *__pyx_n_s_CUtexObject_getPtr;
static PyObject *__pyx_kp_u_CUtexObject_v1;
static PyObject *__pyx_n_s_CUtexObject_v1_2;
static PyObject *__pyx_n_s_CUtexObject_v1___reduce_cython;
static PyObject *__pyx_n_s_CUtexObject_v1___setstate_cython;
static PyObject *__pyx_n_s_CUtexObject_v1_getPtr;
static PyObject *__pyx_kp_u_CUtexref;
static PyObject *__pyx_n_s_CUtexref_2;
static PyObject *__pyx_n_s_CUtexref___reduce_cython;
static PyObject *__pyx_n_s_CUtexref___setstate_cython;
static PyObject *__pyx_n_s_CUtexref_getPtr;
static PyObject *__pyx_kp_u_CUuserObject;
static PyObject *__pyx_n_s_CUuserObjectRetain_flags;
static PyObject *__pyx_n_s_CUuserObject_2;
static PyObject *__pyx_n_s_CUuserObject___reduce_cython;
static PyObject *__pyx_n_s_CUuserObject___setstate_cython;
static PyObject *__pyx_n_s_CUuserObject_flags;
static PyObject *__pyx_n_s_CUuserObject_getPtr;
static PyObject *__pyx_n_s_CUuuid;
static PyObject *__pyx_n_u_CUuuid;
static PyObject *__pyx_n_s_CUuuid_st;
static PyObject *__pyx_n_s_CUuuid_st___reduce_cython;
static PyObject *__pyx_n_s_CUuuid_st___setstate_cython;
static PyObject *__pyx_n_s_CUuuid_st_getPtr;
static PyObject *__pyx_kp_s_Caching_modes_for_dlcm;
static PyObject *__pyx_kp_s_Cluster_scheduling_policies_The;
static PyObject *__pyx_kp_s_Compute_Modes;
static PyObject *__pyx_kp_s_Context_creation_flags;
static PyObject *__pyx_kp_s_Cubin_matching_fallback_strateg;
static PyObject *__pyx_kp_s_Defines_the_allocation_types_av;
static PyObject *__pyx_kp_u_Depth;
static PyObject *__pyx_n_s_Depth_2;
static PyObject *__pyx_kp_s_Device_code_formats;
static PyObject *__pyx_kp_s_Device_properties;
static PyObject *__pyx_kp_u_EGLImageKHR;
static PyObject *__pyx_n_s_EGLImageKHR_2;
static PyObject *__pyx_n_s_EGLImageKHR___reduce_cython;
static PyObject *__pyx_n_s_EGLImageKHR___setstate_cython;
static PyObject *__pyx_n_s_EGLImageKHR_getPtr;
static PyObject *__pyx_kp_u_EGLStreamKHR;
static PyObject *__pyx_n_s_EGLStreamKHR_2;
static PyObject *__pyx_n_s_EGLStreamKHR___reduce_cython;
static PyObject *__pyx_n_s_EGLStreamKHR___setstate_cython;
static PyObject *__pyx_n_s_EGLStreamKHR_getPtr;
static PyObject *__pyx_kp_u_EGLSyncKHR;
static PyObject *__pyx_n_s_EGLSyncKHR_2;
static PyObject *__pyx_n_s_EGLSyncKHR___reduce_cython;
static PyObject *__pyx_n_s_EGLSyncKHR___setstate_cython;
static PyObject *__pyx_n_s_EGLSyncKHR_getPtr;
static PyObject *__pyx_kp_u_EGLint;
static PyObject *__pyx_n_s_EGLint_2;
static PyObject *__pyx_n_s_EGLint___reduce_cython;
static PyObject *__pyx_n_s_EGLint___setstate_cython;
static PyObject *__pyx_n_s_EGLint_getPtr;
static PyObject *__pyx_n_s_ElementSizeBytes;
static PyObject *__pyx_kp_s_Error_codes;
static PyObject *__pyx_kp_s_Event_creation_flags;
static PyObject *__pyx_kp_s_Event_record_flags;
static PyObject *__pyx_kp_s_Event_sched_flags;
static PyObject *__pyx_kp_s_Event_wait_flags;
static PyObject *__pyx_kp_s_Execution_Affinity_Types;
static PyObject *__pyx_kp_s_External_memory_handle_types;
static PyObject *__pyx_kp_s_External_semaphore_handle_types;
static PyObject *__pyx_kp_u_Failed_to_allocate_length_x_size;
static PyObject *__pyx_kp_s_Flag_for_requesting_different_o;
static PyObject *__pyx_kp_u_Flags;
static PyObject *__pyx_n_s_Flags_2;
static PyObject *__pyx_kp_s_Flags_for_instantiating_a_graph;
static PyObject *__pyx_kp_s_Flags_for_mapping_and_unmapping;
static PyObject *__pyx_kp_s_Flags_for_py_obj_cuStreamMemory;
static PyObject *__pyx_kp_s_Flags_for_py_obj_cuStreamUpdate;
static PyObject *__pyx_kp_s_Flags_for_py_obj_cuStreamWaitVa;
static PyObject *__pyx_kp_s_Flags_for_py_obj_cuStreamWriteV;
static PyObject *__pyx_kp_s_Flags_for_retaining_user_object;
static PyObject *__pyx_kp_s_Flags_for_specifying_particular;
static PyObject *__pyx_kp_s_Flags_for_user_objects_for_grap;
static PyObject *__pyx_kp_s_Flags_to_map_or_unmap_a_resourc;
static PyObject *__pyx_kp_s_Flags_to_register_a_graphics_re;
static PyObject *__pyx_kp_s_Flags_to_specify_search_options;
static PyObject *__pyx_kp_u_Format;
static PyObject *__pyx_n_s_Format_2;
static PyObject *__pyx_kp_s_Function_cache_configurations;
static PyObject *__pyx_kp_s_Function_properties;
static PyObject *__pyx_kp_u_GLenum;
static PyObject *__pyx_n_s_GLenum_2;
static PyObject *__pyx_n_s_GLenum___reduce_cython;
static PyObject *__pyx_n_s_GLenum___setstate_cython;
static PyObject *__pyx_n_s_GLenum_getPtr;
static PyObject *__pyx_kp_u_GLuint;
static PyObject *__pyx_n_s_GLuint_2;
static PyObject *__pyx_n_s_GLuint___reduce_cython;
static PyObject *__pyx_n_s_GLuint___setstate_cython;
static PyObject *__pyx_n_s_GLuint_getPtr;
static PyObject *__pyx_kp_s_Graph_node_types;
static PyObject *__pyx_kp_u_Height;
static PyObject *__pyx_n_s_Height_2;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_n_s_IntEnum;
static PyObject *__pyx_kp_s_Limits;
static PyObject *__pyx_n_s_List;
static PyObject *__pyx_kp_u_List_is_too_small;
static PyObject *__pyx_n_s_MAX_PLANES;
static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_kp_s_Memory_advise_values;
static PyObject *__pyx_kp_s_Memory_handle_types;
static PyObject *__pyx_kp_s_Memory_operation_types;
static PyObject *__pyx_kp_s_Memory_types;
static PyObject *__pyx_n_s_N;
static PyObject *__pyx_n_s_NVCL_CTX_SCHED_AUTO;
static PyObject *__pyx_n_s_NVCL_CTX_SCHED_BLOCKING_SYNC;
static PyObject *__pyx_n_s_NVCL_CTX_SCHED_SPIN;
static PyObject *__pyx_n_s_NVCL_CTX_SCHED_YIELD;
static PyObject *__pyx_n_s_NVCL_EVENT_SCHED_AUTO;
static PyObject *__pyx_n_s_NVCL_EVENT_SCHED_BLOCKING_SYNC;
static PyObject *__pyx_n_s_NVCL_EVENT_SCHED_SPIN;
static PyObject *__pyx_n_s_NVCL_EVENT_SCHED_YIELD;
static PyObject *__pyx_kp_s_NVCL_context_scheduling_flags;
static PyObject *__pyx_kp_s_NVCL_event_scheduling_flags;
static PyObject *__pyx_kp_u_NumChannels;
static PyObject *__pyx_n_s_NumChannels_2;
static PyObject *__pyx_n_s_NumPackedComponents;
static PyObject *__pyx_kp_s_Occupancy_calculator_flag;
static PyObject *__pyx_kp_s_Online_compilation_targets;
static PyObject *__pyx_kp_s_Online_compiler_and_linker_opti;
static PyObject *__pyx_kp_s_Operations_for_py_obj_cuStreamB;
static PyObject *__pyx_n_s_OverflowError;
static PyObject *__pyx_kp_s_P2P_Attributes;
static PyObject *__pyx_n_s_Pitch;
static PyObject *__pyx_kp_s_Platform_native_ordering_for_GP;
static PyObject *__pyx_kp_s_Pointer_information;
static PyObject *__pyx_kp_s_Possible_modes_for_stream_captu;
static PyObject *__pyx_kp_s_Possible_stream_capture_statuse;
static PyObject *__pyx_kp_s_Profiler_Output_Modes;
static PyObject *__pyx_kp_s_Resource_location_flags_sysmem;
static PyObject *__pyx_kp_s_Resource_types;
static PyObject *__pyx_kp_s_Resource_view_format;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_kp_u_SIMDWidth;
static PyObject *__pyx_n_s_SIMDWidth_2;
static PyObject *__pyx_kp_s_Shared_memory_carveout_configur;
static PyObject *__pyx_kp_s_Shared_memory_configurations;
static PyObject *__pyx_kp_s_Sparse_subresource_types;
static PyObject *__pyx_kp_s_Specifies_compression_attribute;
static PyObject *__pyx_kp_s_Specifies_performance_hint_with;
static PyObject *__pyx_kp_s_Specifies_the_handle_type_for_a;
static PyObject *__pyx_kp_s_Specifies_the_memory_protection;
static PyObject *__pyx_kp_s_Specifies_the_type_of_location;
static PyObject *__pyx_kp_s_Stream_creation_flags;
static PyObject *__pyx_kp_s_Texture_reference_addressing_mo;
static PyObject *__pyx_kp_s_Texture_reference_filtering_mod;
static PyObject *__pyx_kp_s_The_additional_write_options_fo;
static PyObject *__pyx_kp_s_The_scopes_for_py_obj_cuFlushGP;
static PyObject *__pyx_kp_s_The_targets_for_py_obj_cuFlushG;
static PyObject *__pyx_n_s_Tuple;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_u_Unknown_type;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_kp_u_VdpDevice;
static PyObject *__pyx_n_s_VdpDevice_2;
static PyObject *__pyx_n_s_VdpDevice___reduce_cython;
static PyObject *__pyx_n_s_VdpDevice___setstate_cython;
static PyObject *__pyx_n_s_VdpDevice_getPtr;
static PyObject *__pyx_kp_u_VdpGetProcAddress;
static PyObject *__pyx_n_s_VdpGetProcAddress_2;
static PyObject *__pyx_n_s_VdpGetProcAddress___reduce_cytho;
static PyObject *__pyx_n_s_VdpGetProcAddress___setstate_cyt;
static PyObject *__pyx_n_s_VdpGetProcAddress_getPtr;
static PyObject *__pyx_kp_u_VdpOutputSurface;
static PyObject *__pyx_n_s_VdpOutputSurface_2;
static PyObject *__pyx_n_s_VdpOutputSurface___reduce_cython;
static PyObject *__pyx_n_s_VdpOutputSurface___setstate_cyth;
static PyObject *__pyx_n_s_VdpOutputSurface_getPtr;
static PyObject *__pyx_kp_u_VdpVideoSurface;
static PyObject *__pyx_n_s_VdpVideoSurface_2;
static PyObject *__pyx_n_s_VdpVideoSurface___reduce_cython;
static PyObject *__pyx_n_s_VdpVideoSurface___setstate_cytho;
static PyObject *__pyx_n_s_VdpVideoSurface_getPtr;
static PyObject *__pyx_kp_u_Width;
static PyObject *__pyx_kp_u_WidthInBytes;
static PyObject *__pyx_n_s_WidthInBytes_2;
static PyObject *__pyx_n_s_Width_2;
static PyObject *__pyx_kp_s__1015;
static PyObject *__pyx_kp_u__128;
static PyObject *__pyx_kp_u__129;
static PyObject *__pyx_kp_u__165;
static PyObject *__pyx_n_u__166;
static PyObject *__pyx_kp_b__613;
static PyObject *__pyx_kp_u__660;
static PyObject *__pyx_kp_u_accessDescCount;
static PyObject *__pyx_n_s_accessDescCount_2;
static PyObject *__pyx_kp_u_accessDescs;
static PyObject *__pyx_n_s_accessDescs_2;
static PyObject *__pyx_kp_u_accessPolicyWindow;
static PyObject *__pyx_n_s_accessPolicyWindow_2;
static PyObject *__pyx_n_s_active;
static PyObject *__pyx_n_s_addr;
static PyObject *__pyx_kp_u_address;
static PyObject *__pyx_kp_u_addressMode;
static PyObject *__pyx_n_s_addressMode_2;
static PyObject *__pyx_n_s_address_2;
static PyObject *__pyx_n_s_advice;
static PyObject *__pyx_kp_u_alias;
static PyObject *__pyx_n_s_alias_2;
static PyObject *__pyx_kp_u_alignment;
static PyObject *__pyx_n_s_alignment_2;
static PyObject *__pyx_kp_u_allocFlags;
static PyObject *__pyx_n_s_allocFlags_2;
static PyObject *__pyx_kp_u_allocType;
static PyObject *__pyx_n_s_allocType_2;
static PyObject *__pyx_n_s_am;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_kp_u_array;
static PyObject *__pyx_kp_u_arrayDesc;
static PyObject *__pyx_n_s_arrayDesc_2;
static PyObject *__pyx_n_s_arrayIndex;
static PyObject *__pyx_n_s_array_2;
static PyObject *__pyx_kp_u_array_3;
static PyObject *__pyx_n_s_attr;
static PyObject *__pyx_n_s_attrib;
static PyObject *__pyx_n_s_attribute;
static PyObject *__pyx_n_s_attributes;
static PyObject *__pyx_kp_u_attrs;
static PyObject *__pyx_n_s_attrs_2;
static PyObject *__pyx_kp_u_base_ptr;
static PyObject *__pyx_n_s_base_ptr_2;
static PyObject *__pyx_n_s_bias;
static PyObject *__pyx_kp_u_blockDimX;
static PyObject *__pyx_n_s_blockDimX_2;
static PyObject *__pyx_kp_u_blockDimY;
static PyObject *__pyx_n_s_blockDimY_2;
static PyObject *__pyx_kp_u_blockDimZ;
static PyObject *__pyx_n_s_blockDimZ_2;
static PyObject *__pyx_n_s_blockSize;
static PyObject *__pyx_n_s_blockSizeLimit;
static PyObject *__pyx_n_s_blockSizeToDynamicSMemSize;
static PyObject *__pyx_kp_u_borderColor;
static PyObject *__pyx_n_s_borderColor_2;
static PyObject *__pyx_n_s_buffer;
static PyObject *__pyx_n_s_bufferDesc;
static PyObject *__pyx_n_s_bufferSize;
static PyObject *__pyx_kp_u_bytes;
static PyObject *__pyx_n_s_bytes_2;
static PyObject *__pyx_kp_u_bytesize;
static PyObject *__pyx_n_s_bytesize_2;
static PyObject *__pyx_n_s_caddr;
static PyObject *__pyx_n_s_caddr_ptr;
static PyObject *__pyx_n_s_cadvice;
static PyObject *__pyx_n_s_callback;
static PyObject *__pyx_n_s_cam;
static PyObject *__pyx_n_s_canAccessPeer;
static PyObject *__pyx_n_s_captureStatus;
static PyObject *__pyx_n_s_captureStatus_out;
static PyObject *__pyx_n_s_carray;
static PyObject *__pyx_n_s_cattr;
static PyObject *__pyx_n_s_cattrib;
static PyObject *__pyx_n_s_cattribute;
static PyObject *__pyx_n_s_cattributes;
static PyObject *__pyx_n_s_cblockSizeToDynamicSMemSize;
static PyObject *__pyx_n_s_cbuffer;
static PyObject *__pyx_n_s_cbufferDesc_ptr;
static PyObject *__pyx_n_s_ccallback;
static PyObject *__pyx_n_s_cchildGraph;
static PyObject *__pyx_n_s_cconfig;
static PyObject *__pyx_n_s_cconfig_ptr;
static PyObject *__pyx_n_s_cconn;
static PyObject *__pyx_n_s_ccopyParams_ptr;
static PyObject *__pyx_n_s_cctx;
static PyObject *__pyx_n_s_cdata;
static PyObject *__pyx_n_s_cdataSizes;
static PyObject *__pyx_n_s_cdata_ptr;
static PyObject *__pyx_n_s_cdependencies;
static PyObject *__pyx_n_s_cdependencies_out;
static PyObject *__pyx_n_s_cdependentNodes;
static PyObject *__pyx_n_s_cdesc;
static PyObject *__pyx_n_s_cdesc_ptr;
static PyObject *__pyx_n_s_cdestroy;
static PyObject *__pyx_n_s_cdev;
static PyObject *__pyx_n_s_cdevPtr;
static PyObject *__pyx_n_s_cdevice;
static PyObject *__pyx_n_s_cdeviceList;
static PyObject *__pyx_n_s_cdptr;
static PyObject *__pyx_n_s_cdst;
static PyObject *__pyx_n_s_cdstArray;
static PyObject *__pyx_n_s_cdstContext;
static PyObject *__pyx_n_s_cdstDevice;
static PyObject *__pyx_n_s_cdstHost;
static PyObject *__pyx_n_s_cdstHost_ptr;
static PyObject *__pyx_n_s_ceglSync;
static PyObject *__pyx_n_s_ceglframe_ptr;
static PyObject *__pyx_n_s_cerror;
static PyObject *__pyx_n_s_cevent;
static PyObject *__pyx_n_s_cextMem;
static PyObject *__pyx_n_s_cextSem;
static PyObject *__pyx_n_s_cextSemArray;
static PyObject *__pyx_n_s_cf;
static PyObject *__pyx_n_s_cfatCubin;
static PyObject *__pyx_n_s_cfatCubin_ptr;
static PyObject *__pyx_n_s_cflags;
static PyObject *__pyx_n_s_cfm;
static PyObject *__pyx_n_s_cfmt;
static PyObject *__pyx_n_s_cfn;
static PyObject *__pyx_n_s_cfrom;
static PyObject *__pyx_n_s_cfunc;
static PyObject *__pyx_n_s_cgraph;
static PyObject *__pyx_n_s_chArray;
static PyObject *__pyx_n_s_chClonedGraph;
static PyObject *__pyx_n_s_chEnd;
static PyObject *__pyx_n_s_chEvent;
static PyObject *__pyx_n_s_chGraph;
static PyObject *__pyx_n_s_chGraphExec;
static PyObject *__pyx_n_s_chMipmappedArray;
static PyObject *__pyx_n_s_chNode;
static PyObject *__pyx_n_s_chOriginalNode;
static PyObject *__pyx_n_s_chStart;
static PyObject *__pyx_n_s_chStream;
static PyObject *__pyx_n_s_chSurfRef;
static PyObject *__pyx_n_s_chTexRef;
static PyObject *__pyx_n_s_chandle;
static PyObject *__pyx_n_s_chandleType;
static PyObject *__pyx_n_s_chandle_out;
static PyObject *__pyx_n_s_chandle_out_ptr;
static PyObject *__pyx_n_s_chandle_ptr;
static PyObject *__pyx_n_s_cheight;
static PyObject *__pyx_n_s_chfunc;
static PyObject *__pyx_n_s_childGraph;
static PyObject *__pyx_n_s_chmod;
static PyObject *__pyx_n_s_cimage;
static PyObject *__pyx_n_s_cimage_ptr;
static PyObject *__pyx_n_s_ckernelParams;
static PyObject *__pyx_n_s_cl_context_flags;
static PyObject *__pyx_n_s_cl_event_flags;
static PyObject *__pyx_n_s_claunchParamsList;
static PyObject *__pyx_n_s_climit;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_clocation_ptr;
static PyObject *__pyx_kp_u_clockRate;
static PyObject *__pyx_n_s_clockRate_2;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_kp_u_clusterDim;
static PyObject *__pyx_n_s_clusterDim_2;
static PyObject *__pyx_kp_u_clusterSchedulingPolicyPreferenc;
static PyObject *__pyx_n_s_clusterSchedulingPolicyPreferenc_2;
static PyObject *__pyx_n_s_clusterSize;
static PyObject *__pyx_n_s_cmap;
static PyObject *__pyx_n_s_cmapInfoList;
static PyObject *__pyx_n_s_cmemHandleDesc_ptr;
static PyObject *__pyx_n_s_cmemPool;
static PyObject *__pyx_n_s_cmemsetParams_ptr;
static PyObject *__pyx_n_s_cmipmap;
static PyObject *__pyx_n_s_cmipmapDesc_ptr;
static PyObject *__pyx_n_s_cmode;
static PyObject *__pyx_n_s_cnodeParams_ptr;
static PyObject *__pyx_n_s_cnodes;
static PyObject *__pyx_n_s_cnvSciSyncAttrList;
static PyObject *__pyx_n_s_cnvSciSyncAttrList_ptr;
static PyObject *__pyx_n_s_cobject;
static PyObject *__pyx_kp_u_compressionType;
static PyObject *__pyx_n_s_compressionType_2;
static PyObject *__pyx_n_s_config;
static PyObject *__pyx_n_s_configFile;
static PyObject *__pyx_n_s_conn;
static PyObject *__pyx_kp_u_cooperative;
static PyObject *__pyx_n_s_cooperative_2;
static PyObject *__pyx_n_s_coption;
static PyObject *__pyx_n_s_coptions;
static PyObject *__pyx_n_s_copyParams;
static PyObject *__pyx_n_s_coriginalGraph;
static PyObject *__pyx_n_s_cosHandle;
static PyObject *__pyx_n_s_cosHandle_ptr;
static PyObject *__pyx_kp_u_count;
static PyObject *__pyx_n_s_count_2;
static PyObject *__pyx_n_s_coutputMode;
static PyObject *__pyx_n_s_cp;
static PyObject *__pyx_n_s_cpAllocateArray_ptr;
static PyObject *__pyx_n_s_cpCopy_ptr;
static PyObject *__pyx_n_s_cpCudaDevices;
static PyObject *__pyx_n_s_cpCudaResource;
static PyObject *__pyx_n_s_cpExportTableId_ptr;
static PyObject *__pyx_n_s_cpMipmappedArrayDesc_ptr;
static PyObject *__pyx_n_s_cpResDesc_ptr;
static PyObject *__pyx_n_s_cpResViewDesc_ptr;
static PyObject *__pyx_n_s_cpStream;
static PyObject *__pyx_n_s_cpTexDesc_ptr;
static PyObject *__pyx_n_s_cp_ptr;
static PyObject *__pyx_n_s_cparamArray;
static PyObject *__pyx_n_s_cparamsArray;
static PyObject *__pyx_n_s_cpeerContext;
static PyObject *__pyx_n_s_cpeerDev;
static PyObject *__pyx_n_s_cpformat;
static PyObject *__pyx_n_s_cpool;
static PyObject *__pyx_n_s_cpoolProps_ptr;
static PyObject *__pyx_n_s_cprop_ptr;
static PyObject *__pyx_n_s_cptr;
static PyObject *__pyx_n_s_cptr_ptr;
static PyObject *__pyx_n_s_cresource;
static PyObject *__pyx_n_s_cresources;
static PyObject *__pyx_n_s_crootNodes;
static PyObject *__pyx_n_s_cscope;
static PyObject *__pyx_n_s_csemHandleDesc_ptr;
static PyObject *__pyx_n_s_cshHandleType;
static PyObject *__pyx_n_s_cshareData_ptr;
static PyObject *__pyx_n_s_cshareableHandle;
static PyObject *__pyx_n_s_cshareableHandle_ptr;
static PyObject *__pyx_n_s_csrc;
static PyObject *__pyx_n_s_csrcArray;
static PyObject *__pyx_n_s_csrcContext;
static PyObject *__pyx_n_s_csrcDevice;
static PyObject *__pyx_n_s_csrcHost;
static PyObject *__pyx_n_s_csrcHost_ptr;
static PyObject *__pyx_n_s_cstate;
static PyObject *__pyx_n_s_cstream;
static PyObject *__pyx_n_s_csurfObject;
static PyObject *__pyx_n_s_ctarget;
static PyObject *__pyx_n_s_ctexObject;
static PyObject *__pyx_n_s_cto;
static PyObject *__pyx_kp_u_ctx;
static PyObject *__pyx_n_s_ctx_2;
static PyObject *__pyx_n_s_ctypename;
static PyObject *__pyx_n_s_ctypes;
static PyObject *__pyx_n_s_cuArray3DCreate;
static PyObject *__pyx_n_s_cuArray3DGetDescriptor;
static PyObject *__pyx_n_s_cuArrayCreate;
static PyObject *__pyx_n_s_cuArrayDestroy;
static PyObject *__pyx_n_s_cuArrayGetDescriptor;
static PyObject *__pyx_n_s_cuArrayGetMemoryRequirements;
static PyObject *__pyx_n_s_cuArrayGetPlane;
static PyObject *__pyx_n_s_cuArrayGetSparseProperties;
static PyObject *__pyx_n_s_cuCtxAttach;
static PyObject *__pyx_n_s_cuCtxCreate;
static PyObject *__pyx_n_s_cuCtxCreate_v3;
static PyObject *__pyx_n_s_cuCtxCreate_v3_locals_genexpr;
static PyObject *__pyx_n_s_cuCtxDestroy;
static PyObject *__pyx_n_s_cuCtxDetach;
static PyObject *__pyx_n_s_cuCtxDisablePeerAccess;
static PyObject *__pyx_n_s_cuCtxEnablePeerAccess;
static PyObject *__pyx_n_s_cuCtxGetApiVersion;
static PyObject *__pyx_n_s_cuCtxGetCacheConfig;
static PyObject *__pyx_n_s_cuCtxGetCurrent;
static PyObject *__pyx_n_s_cuCtxGetDevice;
static PyObject *__pyx_n_s_cuCtxGetExecAffinity;
static PyObject *__pyx_n_s_cuCtxGetFlags;
static PyObject *__pyx_n_s_cuCtxGetLimit;
static PyObject *__pyx_n_s_cuCtxGetSharedMemConfig;
static PyObject *__pyx_n_s_cuCtxGetStreamPriorityRange;
static PyObject *__pyx_n_s_cuCtxPopCurrent;
static PyObject *__pyx_n_s_cuCtxPushCurrent;
static PyObject *__pyx_n_s_cuCtxResetPersistingL2Cache;
static PyObject *__pyx_n_s_cuCtxSetCacheConfig;
static PyObject *__pyx_n_s_cuCtxSetCurrent;
static PyObject *__pyx_n_s_cuCtxSetLimit;
static PyObject *__pyx_n_s_cuCtxSetSharedMemConfig;
static PyObject *__pyx_n_s_cuCtxSynchronize;
static PyObject *__pyx_n_s_cuDestroyExternalMemory;
static PyObject *__pyx_n_s_cuDestroyExternalSemaphore;
static PyObject *__pyx_n_s_cuDeviceCanAccessPeer;
static PyObject *__pyx_n_s_cuDeviceComputeCapability;
static PyObject *__pyx_n_s_cuDeviceGet;
static PyObject *__pyx_n_s_cuDeviceGetAttribute;
static PyObject *__pyx_n_s_cuDeviceGetByPCIBusId;
static PyObject *__pyx_n_s_cuDeviceGetCount;
static PyObject *__pyx_n_s_cuDeviceGetDefaultMemPool;
static PyObject *__pyx_n_s_cuDeviceGetExecAffinitySupport;
static PyObject *__pyx_n_s_cuDeviceGetGraphMemAttribute;
static PyObject *__pyx_n_s_cuDeviceGetLuid;
static PyObject *__pyx_n_s_cuDeviceGetMemPool;
static PyObject *__pyx_n_s_cuDeviceGetName;
static PyObject *__pyx_n_s_cuDeviceGetNvSciSyncAttributes;
static PyObject *__pyx_n_s_cuDeviceGetP2PAttribute;
static PyObject *__pyx_n_s_cuDeviceGetPCIBusId;
static PyObject *__pyx_n_s_cuDeviceGetProperties;
static PyObject *__pyx_n_s_cuDeviceGetTexture1DLinearMaxWid;
static PyObject *__pyx_n_s_cuDeviceGetUuid;
static PyObject *__pyx_n_s_cuDeviceGetUuid_v2;
static PyObject *__pyx_n_s_cuDeviceGraphMemTrim;
static PyObject *__pyx_n_s_cuDevicePrimaryCtxGetState;
static PyObject *__pyx_n_s_cuDevicePrimaryCtxRelease;
static PyObject *__pyx_n_s_cuDevicePrimaryCtxReset;
static PyObject *__pyx_n_s_cuDevicePrimaryCtxRetain;
static PyObject *__pyx_n_s_cuDevicePrimaryCtxSetFlags;
static PyObject *__pyx_n_s_cuDeviceSetGraphMemAttribute;
static PyObject *__pyx_n_s_cuDeviceSetMemPool;
static PyObject *__pyx_n_s_cuDeviceTotalMem;
static PyObject *__pyx_n_s_cuDriverGetVersion;
static PyObject *__pyx_n_s_cuEGLStreamConsumerAcquireFrame;
static PyObject *__pyx_n_s_cuEGLStreamConsumerConnect;
static PyObject *__pyx_n_s_cuEGLStreamConsumerConnectWithFl;
static PyObject *__pyx_n_s_cuEGLStreamConsumerDisconnect;
static PyObject *__pyx_n_s_cuEGLStreamConsumerReleaseFrame;
static PyObject *__pyx_n_s_cuEGLStreamProducerConnect;
static PyObject *__pyx_n_s_cuEGLStreamProducerDisconnect;
static PyObject *__pyx_n_s_cuEGLStreamProducerPresentFrame;
static PyObject *__pyx_n_s_cuEGLStreamProducerReturnFrame;
static PyObject *__pyx_n_s_cuEventCreate;
static PyObject *__pyx_n_s_cuEventCreateFromEGLSync;
static PyObject *__pyx_n_s_cuEventDestroy;
static PyObject *__pyx_n_s_cuEventElapsedTime;
static PyObject *__pyx_n_s_cuEventQuery;
static PyObject *__pyx_n_s_cuEventRecord;
static PyObject *__pyx_n_s_cuEventRecordWithFlags;
static PyObject *__pyx_n_s_cuEventSynchronize;
static PyObject *__pyx_n_s_cuExternalMemoryGetMappedBuffer;
static PyObject *__pyx_n_s_cuExternalMemoryGetMappedMipmapp;
static PyObject *__pyx_n_s_cuFlushGPUDirectRDMAWrites;
static PyObject *__pyx_kp_u_cuFormat;
static PyObject *__pyx_n_s_cuFormat_2;
static PyObject *__pyx_n_s_cuFuncGetAttribute;
static PyObject *__pyx_n_s_cuFuncGetModule;
static PyObject *__pyx_n_s_cuFuncSetAttribute;
static PyObject *__pyx_n_s_cuFuncSetBlockShape;
static PyObject *__pyx_n_s_cuFuncSetCacheConfig;
static PyObject *__pyx_n_s_cuFuncSetSharedMemConfig;
static PyObject *__pyx_n_s_cuFuncSetSharedSize;
static PyObject *__pyx_n_s_cuGLGetDevices;
static PyObject *__pyx_n_s_cuGetErrorName;
static PyObject *__pyx_n_s_cuGetErrorString;
static PyObject *__pyx_n_s_cuGetExportTable;
static PyObject *__pyx_n_s_cuGetProcAddress;
static PyObject *__pyx_n_s_cuGraphAddBatchMemOpNode;
static PyObject *__pyx_n_s_cuGraphAddBatchMemOpNode_locals;
static PyObject *__pyx_n_s_cuGraphAddChildGraphNode;
static PyObject *__pyx_n_s_cuGraphAddChildGraphNode_locals;
static PyObject *__pyx_n_s_cuGraphAddDependencies;
static PyObject *__pyx_n_s_cuGraphAddDependencies_locals_ge;
static PyObject *__pyx_n_s_cuGraphAddEmptyNode;
static PyObject *__pyx_n_s_cuGraphAddEmptyNode_locals_genex;
static PyObject *__pyx_n_s_cuGraphAddEventRecordNode;
static PyObject *__pyx_n_s_cuGraphAddEventRecordNode_locals;
static PyObject *__pyx_n_s_cuGraphAddEventWaitNode;
static PyObject *__pyx_n_s_cuGraphAddEventWaitNode_locals_g;
static PyObject *__pyx_n_s_cuGraphAddExternalSemaphoresSign;
static PyObject *__pyx_n_s_cuGraphAddExternalSemaphoresSign_2;
static PyObject *__pyx_n_s_cuGraphAddExternalSemaphoresWait;
static PyObject *__pyx_n_s_cuGraphAddExternalSemaphoresWait_2;
static PyObject *__pyx_n_s_cuGraphAddHostNode;
static PyObject *__pyx_n_s_cuGraphAddHostNode_locals_genexp;
static PyObject *__pyx_n_s_cuGraphAddKernelNode;
static PyObject *__pyx_n_s_cuGraphAddKernelNode_locals_gene;
static PyObject *__pyx_n_s_cuGraphAddMemAllocNode;
static PyObject *__pyx_n_s_cuGraphAddMemAllocNode_locals_ge;
static PyObject *__pyx_n_s_cuGraphAddMemFreeNode;
static PyObject *__pyx_n_s_cuGraphAddMemFreeNode_locals_gen;
static PyObject *__pyx_n_s_cuGraphAddMemcpyNode;
static PyObject *__pyx_n_s_cuGraphAddMemcpyNode_locals_gene;
static PyObject *__pyx_n_s_cuGraphAddMemsetNode;
static PyObject *__pyx_n_s_cuGraphAddMemsetNode_locals_gene;
static PyObject *__pyx_n_s_cuGraphBatchMemOpNodeGetParams;
static PyObject *__pyx_n_s_cuGraphBatchMemOpNodeSetParams;
static PyObject *__pyx_n_s_cuGraphChildGraphNodeGetGraph;
static PyObject *__pyx_n_s_cuGraphClone;
static PyObject *__pyx_n_s_cuGraphCreate;
static PyObject *__pyx_n_s_cuGraphDebugDotPrint;
static PyObject *__pyx_n_s_cuGraphDestroy;
static PyObject *__pyx_n_s_cuGraphDestroyNode;
static PyObject *__pyx_n_s_cuGraphEventRecordNodeGetEvent;
static PyObject *__pyx_n_s_cuGraphEventRecordNodeSetEvent;
static PyObject *__pyx_n_s_cuGraphEventWaitNodeGetEvent;
static PyObject *__pyx_n_s_cuGraphEventWaitNodeSetEvent;
static PyObject *__pyx_n_s_cuGraphExecBatchMemOpNodeSetPara;
static PyObject *__pyx_n_s_cuGraphExecChildGraphNodeSetPara;
static PyObject *__pyx_n_s_cuGraphExecDestroy;
static PyObject *__pyx_n_s_cuGraphExecEventRecordNodeSetEve;
static PyObject *__pyx_n_s_cuGraphExecEventWaitNodeSetEvent;
static PyObject *__pyx_n_s_cuGraphExecExternalSemaphoresSig;
static PyObject *__pyx_n_s_cuGraphExecExternalSemaphoresWai;
static PyObject *__pyx_n_s_cuGraphExecHostNodeSetParams;
static PyObject *__pyx_n_s_cuGraphExecKernelNodeSetParams;
static PyObject *__pyx_n_s_cuGraphExecMemcpyNodeSetParams;
static PyObject *__pyx_n_s_cuGraphExecMemsetNodeSetParams;
static PyObject *__pyx_n_s_cuGraphExecUpdate;
static PyObject *__pyx_n_s_cuGraphExternalSemaphoresSignalN;
static PyObject *__pyx_n_s_cuGraphExternalSemaphoresSignalN_2;
static PyObject *__pyx_n_s_cuGraphExternalSemaphoresWaitNod;
static PyObject *__pyx_n_s_cuGraphExternalSemaphoresWaitNod_2;
static PyObject *__pyx_n_s_cuGraphGetEdges;
static PyObject *__pyx_n_s_cuGraphGetNodes;
static PyObject *__pyx_n_s_cuGraphGetRootNodes;
static PyObject *__pyx_n_s_cuGraphHostNodeGetParams;
static PyObject *__pyx_n_s_cuGraphHostNodeSetParams;
static PyObject *__pyx_n_s_cuGraphInstantiate;
static PyObject *__pyx_n_s_cuGraphInstantiateWithFlags;
static PyObject *__pyx_n_s_cuGraphKernelNodeCopyAttributes;
static PyObject *__pyx_n_s_cuGraphKernelNodeGetAttribute;
static PyObject *__pyx_n_s_cuGraphKernelNodeGetParams;
static PyObject *__pyx_n_s_cuGraphKernelNodeSetAttribute;
static PyObject *__pyx_n_s_cuGraphKernelNodeSetParams;
static PyObject *__pyx_n_s_cuGraphLaunch;
static PyObject *__pyx_n_s_cuGraphMemAllocNodeGetParams;
static PyObject *__pyx_n_s_cuGraphMemFreeNodeGetParams;
static PyObject *__pyx_n_s_cuGraphMemcpyNodeGetParams;
static PyObject *__pyx_n_s_cuGraphMemcpyNodeSetParams;
static PyObject *__pyx_n_s_cuGraphMemsetNodeGetParams;
static PyObject *__pyx_n_s_cuGraphMemsetNodeSetParams;
static PyObject *__pyx_n_s_cuGraphNodeFindInClone;
static PyObject *__pyx_n_s_cuGraphNodeGetDependencies;
static PyObject *__pyx_n_s_cuGraphNodeGetDependentNodes;
static PyObject *__pyx_n_s_cuGraphNodeGetEnabled;
static PyObject *__pyx_n_s_cuGraphNodeGetType;
static PyObject *__pyx_n_s_cuGraphNodeSetEnabled;
static PyObject *__pyx_n_s_cuGraphReleaseUserObject;
static PyObject *__pyx_n_s_cuGraphRemoveDependencies;
static PyObject *__pyx_n_s_cuGraphRemoveDependencies_locals;
static PyObject *__pyx_n_s_cuGraphRetainUserObject;
static PyObject *__pyx_n_s_cuGraphUpload;
static PyObject *__pyx_n_s_cuGraphicsEGLRegisterImage;
static PyObject *__pyx_n_s_cuGraphicsGLRegisterBuffer;
static PyObject *__pyx_n_s_cuGraphicsGLRegisterImage;
static PyObject *__pyx_n_s_cuGraphicsMapResources;
static PyObject *__pyx_n_s_cuGraphicsResourceGetMappedEglFr;
static PyObject *__pyx_n_s_cuGraphicsResourceGetMappedMipma;
static PyObject *__pyx_n_s_cuGraphicsResourceGetMappedPoint;
static PyObject *__pyx_n_s_cuGraphicsResourceSetMapFlags;
static PyObject *__pyx_n_s_cuGraphicsSubResourceGetMappedAr;
static PyObject *__pyx_n_s_cuGraphicsUnmapResources;
static PyObject *__pyx_n_s_cuGraphicsUnregisterResource;
static PyObject *__pyx_n_s_cuGraphicsVDPAURegisterOutputSur;
static PyObject *__pyx_n_s_cuGraphicsVDPAURegisterVideoSurf;
static PyObject *__pyx_n_s_cuImportExternalMemory;
static PyObject *__pyx_n_s_cuImportExternalSemaphore;
static PyObject *__pyx_n_s_cuInit;
static PyObject *__pyx_n_s_cuIpcCloseMemHandle;
static PyObject *__pyx_n_s_cuIpcGetEventHandle;
static PyObject *__pyx_n_s_cuIpcGetMemHandle;
static PyObject *__pyx_n_s_cuIpcOpenEventHandle;
static PyObject *__pyx_n_s_cuIpcOpenMemHandle;
static PyObject *__pyx_n_s_cuLaunch;
static PyObject *__pyx_n_s_cuLaunchCooperativeKernel;
static PyObject *__pyx_n_s_cuLaunchCooperativeKernelMultiDe;
static PyObject *__pyx_n_s_cuLaunchCooperativeKernelMultiDe_2;
static PyObject *__pyx_n_s_cuLaunchGrid;
static PyObject *__pyx_n_s_cuLaunchGridAsync;
static PyObject *__pyx_n_s_cuLaunchHostFunc;
static PyObject *__pyx_n_s_cuLaunchKernel;
static PyObject *__pyx_n_s_cuLaunchKernelEx;
static PyObject *__pyx_n_s_cuLinkAddData;
static PyObject *__pyx_n_s_cuLinkAddData_locals_genexpr;
static PyObject *__pyx_n_s_cuLinkAddFile;
static PyObject *__pyx_n_s_cuLinkAddFile_locals_genexpr;
static PyObject *__pyx_n_s_cuLinkComplete;
static PyObject *__pyx_n_s_cuLinkCreate;
static PyObject *__pyx_n_s_cuLinkCreate_locals_genexpr;
static PyObject *__pyx_n_s_cuLinkDestroy;
static PyObject *__pyx_n_s_cuMemAddressFree;
static PyObject *__pyx_n_s_cuMemAddressReserve;
static PyObject *__pyx_n_s_cuMemAdvise;
static PyObject *__pyx_n_s_cuMemAlloc;
static PyObject *__pyx_n_s_cuMemAllocAsync;
static PyObject *__pyx_n_s_cuMemAllocFromPoolAsync;
static PyObject *__pyx_n_s_cuMemAllocHost;
static PyObject *__pyx_n_s_cuMemAllocManaged;
static PyObject *__pyx_n_s_cuMemAllocPitch;
static PyObject *__pyx_n_s_cuMemCreate;
static PyObject *__pyx_n_s_cuMemExportToShareableHandle;
static PyObject *__pyx_n_s_cuMemFree;
static PyObject *__pyx_n_s_cuMemFreeAsync;
static PyObject *__pyx_n_s_cuMemFreeHost;
static PyObject *__pyx_n_s_cuMemGetAccess;
static PyObject *__pyx_n_s_cuMemGetAddressRange;
static PyObject *__pyx_n_s_cuMemGetAllocationGranularity;
static PyObject *__pyx_n_s_cuMemGetAllocationPropertiesFrom;
static PyObject *__pyx_n_s_cuMemGetHandleForAddressRange;
static PyObject *__pyx_n_s_cuMemGetInfo;
static PyObject *__pyx_n_s_cuMemHostAlloc;
static PyObject *__pyx_n_s_cuMemHostGetDevicePointer;
static PyObject *__pyx_n_s_cuMemHostGetFlags;
static PyObject *__pyx_n_s_cuMemHostRegister;
static PyObject *__pyx_n_s_cuMemHostUnregister;
static PyObject *__pyx_n_s_cuMemImportFromShareableHandle;
static PyObject *__pyx_n_s_cuMemMap;
static PyObject *__pyx_n_s_cuMemMapArrayAsync;
static PyObject *__pyx_n_s_cuMemMapArrayAsync_locals_genexp;
static PyObject *__pyx_n_s_cuMemPoolCreate;
static PyObject *__pyx_n_s_cuMemPoolDestroy;
static PyObject *__pyx_n_s_cuMemPoolExportPointer;
static PyObject *__pyx_n_s_cuMemPoolExportToShareableHandle;
static PyObject *__pyx_n_s_cuMemPoolGetAccess;
static PyObject *__pyx_n_s_cuMemPoolGetAttribute;
static PyObject *__pyx_n_s_cuMemPoolImportFromShareableHand;
static PyObject *__pyx_n_s_cuMemPoolImportPointer;
static PyObject *__pyx_n_s_cuMemPoolSetAccess;
static PyObject *__pyx_n_s_cuMemPoolSetAccess_locals_genexp;
static PyObject *__pyx_n_s_cuMemPoolSetAttribute;
static PyObject *__pyx_n_s_cuMemPoolTrimTo;
static PyObject *__pyx_n_s_cuMemPrefetchAsync;
static PyObject *__pyx_n_s_cuMemRangeGetAttribute;
static PyObject *__pyx_n_s_cuMemRangeGetAttributes;
static PyObject *__pyx_n_s_cuMemRangeGetAttributes_locals_g;
static PyObject *__pyx_n_s_cuMemRelease;
static PyObject *__pyx_n_s_cuMemRetainAllocationHandle;
static PyObject *__pyx_n_s_cuMemSetAccess;
static PyObject *__pyx_n_s_cuMemSetAccess_locals_genexpr;
static PyObject *__pyx_n_s_cuMemUnmap;
static PyObject *__pyx_n_s_cuMemcpy;
static PyObject *__pyx_n_s_cuMemcpy2D;
static PyObject *__pyx_n_s_cuMemcpy2DAsync;
static PyObject *__pyx_n_s_cuMemcpy2DUnaligned;
static PyObject *__pyx_n_s_cuMemcpy3D;
static PyObject *__pyx_n_s_cuMemcpy3DAsync;
static PyObject *__pyx_n_s_cuMemcpy3DPeer;
static PyObject *__pyx_n_s_cuMemcpy3DPeerAsync;
static PyObject *__pyx_n_s_cuMemcpyAsync;
static PyObject *__pyx_n_s_cuMemcpyAtoA;
static PyObject *__pyx_n_s_cuMemcpyAtoD;
static PyObject *__pyx_n_s_cuMemcpyAtoH;
static PyObject *__pyx_n_s_cuMemcpyAtoHAsync;
static PyObject *__pyx_n_s_cuMemcpyDtoA;
static PyObject *__pyx_n_s_cuMemcpyDtoD;
static PyObject *__pyx_n_s_cuMemcpyDtoDAsync;
static PyObject *__pyx_n_s_cuMemcpyDtoH;
static PyObject *__pyx_n_s_cuMemcpyDtoHAsync;
static PyObject *__pyx_n_s_cuMemcpyHtoA;
static PyObject *__pyx_n_s_cuMemcpyHtoAAsync;
static PyObject *__pyx_n_s_cuMemcpyHtoD;
static PyObject *__pyx_n_s_cuMemcpyHtoDAsync;
static PyObject *__pyx_n_s_cuMemcpyPeer;
static PyObject *__pyx_n_s_cuMemcpyPeerAsync;
static PyObject *__pyx_n_s_cuMemsetD16;
static PyObject *__pyx_n_s_cuMemsetD16Async;
static PyObject *__pyx_n_s_cuMemsetD2D16;
static PyObject *__pyx_n_s_cuMemsetD2D16Async;
static PyObject *__pyx_n_s_cuMemsetD2D32;
static PyObject *__pyx_n_s_cuMemsetD2D32Async;
static PyObject *__pyx_n_s_cuMemsetD2D8;
static PyObject *__pyx_n_s_cuMemsetD2D8Async;
static PyObject *__pyx_n_s_cuMemsetD32;
static PyObject *__pyx_n_s_cuMemsetD32Async;
static PyObject *__pyx_n_s_cuMemsetD8;
static PyObject *__pyx_n_s_cuMemsetD8Async;
static PyObject *__pyx_n_s_cuMipmappedArrayCreate;
static PyObject *__pyx_n_s_cuMipmappedArrayDestroy;
static PyObject *__pyx_n_s_cuMipmappedArrayGetLevel;
static PyObject *__pyx_n_s_cuMipmappedArrayGetMemoryRequire;
static PyObject *__pyx_n_s_cuMipmappedArrayGetSparsePropert;
static PyObject *__pyx_n_s_cuModuleGetFunction;
static PyObject *__pyx_n_s_cuModuleGetGlobal;
static PyObject *__pyx_n_s_cuModuleGetLoadingMode;
static PyObject *__pyx_n_s_cuModuleGetSurfRef;
static PyObject *__pyx_n_s_cuModuleGetTexRef;
static PyObject *__pyx_n_s_cuModuleLoad;
static PyObject *__pyx_n_s_cuModuleLoadData;
static PyObject *__pyx_n_s_cuModuleLoadDataEx;
static PyObject *__pyx_n_s_cuModuleLoadDataEx_locals_genexp;
static PyObject *__pyx_n_s_cuModuleLoadFatBinary;
static PyObject *__pyx_n_s_cuModuleUnload;
static PyObject *__pyx_n_s_cuOccupancyAvailableDynamicSMemP;
static PyObject *__pyx_n_s_cuOccupancyMaxActiveBlocksPerMul;
static PyObject *__pyx_n_s_cuOccupancyMaxActiveBlocksPerMul_2;
static PyObject *__pyx_n_s_cuOccupancyMaxActiveClusters;
static PyObject *__pyx_n_s_cuOccupancyMaxPotentialBlockSize;
static PyObject *__pyx_n_s_cuOccupancyMaxPotentialBlockSize_2;
static PyObject *__pyx_n_s_cuOccupancyMaxPotentialClusterSi;
static PyObject *__pyx_n_s_cuParamSetSize;
static PyObject *__pyx_n_s_cuParamSetTexRef;
static PyObject *__pyx_n_s_cuParamSetf;
static PyObject *__pyx_n_s_cuParamSeti;
static PyObject *__pyx_n_s_cuParamSetv;
static PyObject *__pyx_n_s_cuPointerGetAttribute;
static PyObject *__pyx_n_s_cuPointerGetAttributes;
static PyObject *__pyx_n_s_cuPointerGetAttributes_locals_ge;
static PyObject *__pyx_n_s_cuPointerSetAttribute;
static PyObject *__pyx_n_s_cuProfilerInitialize;
static PyObject *__pyx_n_s_cuProfilerStart;
static PyObject *__pyx_n_s_cuProfilerStop;
static PyObject *__pyx_n_s_cuSignalExternalSemaphoresAsync;
static PyObject *__pyx_n_s_cuSignalExternalSemaphoresAsync_2;
static PyObject *__pyx_n_s_cuStreamAddCallback;
static PyObject *__pyx_n_s_cuStreamAttachMemAsync;
static PyObject *__pyx_n_s_cuStreamBatchMemOp;
static PyObject *__pyx_n_s_cuStreamBatchMemOp_locals_genexp;
static PyObject *__pyx_n_s_cuStreamBatchMemOp_v2;
static PyObject *__pyx_n_s_cuStreamBatchMemOp_v2_locals_gen;
static PyObject *__pyx_n_s_cuStreamBeginCapture;
static PyObject *__pyx_n_s_cuStreamCopyAttributes;
static PyObject *__pyx_n_s_cuStreamCreate;
static PyObject *__pyx_n_s_cuStreamCreateWithPriority;
static PyObject *__pyx_n_s_cuStreamDestroy;
static PyObject *__pyx_n_s_cuStreamEndCapture;
static PyObject *__pyx_n_s_cuStreamGetAttribute;
static PyObject *__pyx_n_s_cuStreamGetCaptureInfo;
static PyObject *__pyx_n_s_cuStreamGetCaptureInfo_v2;
static PyObject *__pyx_n_s_cuStreamGetCtx;
static PyObject *__pyx_n_s_cuStreamGetFlags;
static PyObject *__pyx_n_s_cuStreamGetPriority;
static PyObject *__pyx_n_s_cuStreamIsCapturing;
static PyObject *__pyx_n_s_cuStreamQuery;
static PyObject *__pyx_n_s_cuStreamSetAttribute;
static PyObject *__pyx_n_s_cuStreamSynchronize;
static PyObject *__pyx_n_s_cuStreamUpdateCaptureDependencie;
static PyObject *__pyx_n_s_cuStreamUpdateCaptureDependencie_2;
static PyObject *__pyx_n_s_cuStreamWaitEvent;
static PyObject *__pyx_n_s_cuStreamWaitValue32;
static PyObject *__pyx_n_s_cuStreamWaitValue32_v2;
static PyObject *__pyx_n_s_cuStreamWaitValue64;
static PyObject *__pyx_n_s_cuStreamWaitValue64_v2;
static PyObject *__pyx_n_s_cuStreamWriteValue32;
static PyObject *__pyx_n_s_cuStreamWriteValue32_v2;
static PyObject *__pyx_n_s_cuStreamWriteValue64;
static PyObject *__pyx_n_s_cuStreamWriteValue64_v2;
static PyObject *__pyx_n_s_cuSurfObjectCreate;
static PyObject *__pyx_n_s_cuSurfObjectDestroy;
static PyObject *__pyx_n_s_cuSurfObjectGetResourceDesc;
static PyObject *__pyx_n_s_cuSurfRefGetArray;
static PyObject *__pyx_n_s_cuSurfRefSetArray;
static PyObject *__pyx_n_s_cuTexObjectCreate;
static PyObject *__pyx_n_s_cuTexObjectDestroy;
static PyObject *__pyx_n_s_cuTexObjectGetResourceDesc;
static PyObject *__pyx_n_s_cuTexObjectGetResourceViewDesc;
static PyObject *__pyx_n_s_cuTexObjectGetTextureDesc;
static PyObject *__pyx_n_s_cuTexRefCreate;
static PyObject *__pyx_n_s_cuTexRefDestroy;
static PyObject *__pyx_n_s_cuTexRefGetAddress;
static PyObject *__pyx_n_s_cuTexRefGetAddressMode;
static PyObject *__pyx_n_s_cuTexRefGetArray;
static PyObject *__pyx_n_s_cuTexRefGetBorderColor;
static PyObject *__pyx_n_s_cuTexRefGetFilterMode;
static PyObject *__pyx_n_s_cuTexRefGetFlags;
static PyObject *__pyx_n_s_cuTexRefGetFormat;
static PyObject *__pyx_n_s_cuTexRefGetMaxAnisotropy;
static PyObject *__pyx_n_s_cuTexRefGetMipmapFilterMode;
static PyObject *__pyx_n_s_cuTexRefGetMipmapLevelBias;
static PyObject *__pyx_n_s_cuTexRefGetMipmapLevelClamp;
static PyObject *__pyx_n_s_cuTexRefGetMipmappedArray;
static PyObject *__pyx_n_s_cuTexRefSetAddress;
static PyObject *__pyx_n_s_cuTexRefSetAddress2D;
static PyObject *__pyx_n_s_cuTexRefSetAddressMode;
static PyObject *__pyx_n_s_cuTexRefSetArray;
static PyObject *__pyx_n_s_cuTexRefSetBorderColor;
static PyObject *__pyx_n_s_cuTexRefSetFilterMode;
static PyObject *__pyx_n_s_cuTexRefSetFlags;
static PyObject *__pyx_n_s_cuTexRefSetFormat;
static PyObject *__pyx_n_s_cuTexRefSetMaxAnisotropy;
static PyObject *__pyx_n_s_cuTexRefSetMipmapFilterMode;
static PyObject *__pyx_n_s_cuTexRefSetMipmapLevelBias;
static PyObject *__pyx_n_s_cuTexRefSetMipmapLevelClamp;
static PyObject *__pyx_n_s_cuTexRefSetMipmappedArray;
static PyObject *__pyx_n_s_cuThreadExchangeStreamCaptureMod;
static PyObject *__pyx_n_s_cuUserObjectCreate;
static PyObject *__pyx_n_s_cuUserObjectRelease;
static PyObject *__pyx_n_s_cuUserObjectRetain;
static PyObject *__pyx_n_s_cuVDPAUCtxCreate;
static PyObject *__pyx_n_s_cuVDPAUGetDevice;
static PyObject *__pyx_n_s_cuWaitExternalSemaphoresAsync;
static PyObject *__pyx_n_s_cuWaitExternalSemaphoresAsync_lo;
static PyObject *__pyx_n_s_cubinOut;
static PyObject *__pyx_n_s_cudaDeviceCount;
static PyObject *__pyx_n_s_cudaVersion;
static PyObject *__pyx_n_s_cuda_cuda;
static PyObject *__pyx_kp_s_cuda_cuda_pyx;
static PyObject *__pyx_n_s_cuserData;
static PyObject *__pyx_n_s_cuserData_ptr;
static PyObject *__pyx_kp_u_cuuint32_t;
static PyObject *__pyx_n_s_cuuint32_t_2;
static PyObject *__pyx_n_s_cuuint32_t___reduce_cython;
static PyObject *__pyx_n_s_cuuint32_t___setstate_cython;
static PyObject *__pyx_n_s_cuuint32_t_getPtr;
static PyObject *__pyx_kp_u_cuuint64_t;
static PyObject *__pyx_n_s_cuuint64_t_2;
static PyObject *__pyx_n_s_cuuint64_t___reduce_cython;
static PyObject *__pyx_n_s_cuuint64_t___setstate_cython;
static PyObject *__pyx_n_s_cuuint64_t_getPtr;
static PyObject *__pyx_n_s_cvalue;
static PyObject *__pyx_n_s_cvalue_ptr;
static PyObject *__pyx_n_s_cvdpDevice;
static PyObject *__pyx_n_s_cvdpGetProcAddress;
static PyObject *__pyx_n_s_cvdpSurface;
static PyObject *__pyx_n_s_cvoidStarHelper_ptr;
static PyObject *__pyx_n_s_cwidth;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_dataSize;
static PyObject *__pyx_n_s_dataSizes;
static PyObject *__pyx_n_s_dependencies;
static PyObject *__pyx_kp_u_depth;
static PyObject *__pyx_n_s_depth_2;
static PyObject *__pyx_n_s_desc;
static PyObject *__pyx_n_s_destroy;
static PyObject *__pyx_n_s_dev;
static PyObject *__pyx_kp_u_devPtr;
static PyObject *__pyx_n_s_devPtr_2;
static PyObject *__pyx_n_s_device;
static PyObject *__pyx_kp_u_deviceBitMask;
static PyObject *__pyx_n_s_deviceBitMask_2;
static PyObject *__pyx_n_s_deviceList;
static PyObject *__pyx_n_s_deviceNodeMask;
static PyObject *__pyx_n_s_dim;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_kp_u_dptr;
static PyObject *__pyx_n_s_dptr_2;
static PyObject *__pyx_n_s_dptr_out;
static PyObject *__pyx_n_s_driverVersion;
static PyObject *__pyx_kp_u_dst;
static PyObject *__pyx_kp_u_dstArray;
static PyObject *__pyx_n_s_dstArray_2;
static PyObject *__pyx_kp_u_dstContext;
static PyObject *__pyx_n_s_dstContext_2;
static PyObject *__pyx_kp_u_dstDevice;
static PyObject *__pyx_n_s_dstDevice_2;
static PyObject *__pyx_kp_u_dstHeight;
static PyObject *__pyx_n_s_dstHeight_2;
static PyObject *__pyx_kp_u_dstHost;
static PyObject *__pyx_n_s_dstHost_2;
static PyObject *__pyx_kp_u_dstLOD;
static PyObject *__pyx_n_s_dstLOD_2;
static PyObject *__pyx_kp_u_dstMemoryType;
static PyObject *__pyx_n_s_dstMemoryType_2;
static PyObject *__pyx_n_s_dstOffset;
static PyObject *__pyx_kp_u_dstPitch;
static PyObject *__pyx_n_s_dstPitch_2;
static PyObject *__pyx_kp_u_dstXInBytes;
static PyObject *__pyx_n_s_dstXInBytes_2;
static PyObject *__pyx_kp_u_dstY;
static PyObject *__pyx_n_s_dstY_2;
static PyObject *__pyx_kp_u_dstZ;
static PyObject *__pyx_n_s_dstZ_2;
static PyObject *__pyx_n_s_dst_2;
static PyObject *__pyx_n_s_dynamicSMemSize;
static PyObject *__pyx_n_s_dynamicSmemSize;
static PyObject *__pyx_kp_u_eglColorFormat;
static PyObject *__pyx_n_s_eglColorFormat_2;
static PyObject *__pyx_n_s_eglFrame;
static PyObject *__pyx_n_s_eglSync;
static PyObject *__pyx_n_s_eglframe;
static PyObject *__pyx_kp_u_elementSize;
static PyObject *__pyx_n_s_elementSize_2;
static PyObject *__pyx_n_s_enum;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_err;
static PyObject *__pyx_n_s_error;
static PyObject *__pyx_kp_u_event;
static PyObject *__pyx_n_s_event_2;
static PyObject *__pyx_n_s_event_out;
static PyObject *__pyx_n_s_extMem;
static PyObject *__pyx_n_s_extMem_out;
static PyObject *__pyx_n_s_extSem;
static PyObject *__pyx_kp_u_extSemArray;
static PyObject *__pyx_n_s_extSemArray_2;
static PyObject *__pyx_n_s_extSem_out;
static PyObject *__pyx_kp_u_extentDepth;
static PyObject *__pyx_n_s_extentDepth_2;
static PyObject *__pyx_kp_u_extentHeight;
static PyObject *__pyx_n_s_extentHeight_2;
static PyObject *__pyx_kp_u_extentWidth;
static PyObject *__pyx_n_s_extentWidth_2;
static PyObject *__pyx_kp_u_extra;
static PyObject *__pyx_n_s_extra_2;
static PyObject *__pyx_n_s_f;
static PyObject *__pyx_n_s_fatCubin;
static PyObject *__pyx_kp_u_fd;
static PyObject *__pyx_n_s_fd_2;
static PyObject *__pyx_kp_u_fence;
static PyObject *__pyx_n_s_fence_2;
static PyObject *__pyx_kp_u_fence_3;
static PyObject *__pyx_kp_u_filterMode;
static PyObject *__pyx_n_s_filterMode_2;
static PyObject *__pyx_kp_u_firstLayer;
static PyObject *__pyx_n_s_firstLayer_2;
static PyObject *__pyx_kp_u_firstMipmapLevel;
static PyObject *__pyx_n_s_firstMipmapLevel_2;
static PyObject *__pyx_kp_u_flags;
static PyObject *__pyx_n_s_flags_2;
static PyObject *__pyx_kp_u_flushRemoteWrites;
static PyObject *__pyx_n_s_flushRemoteWrites_2;
static PyObject *__pyx_n_s_fm;
static PyObject *__pyx_n_s_fmt;
static PyObject *__pyx_kp_u_fn;
static PyObject *__pyx_n_s_fn_2;
static PyObject *__pyx_n_s_fname;
static PyObject *__pyx_kp_u_format;
static PyObject *__pyx_n_s_format_2;
static PyObject *__pyx_kp_u_frame;
static PyObject *__pyx_kp_u_frameType;
static PyObject *__pyx_n_s_frameType_2;
static PyObject *__pyx_n_s_frame_2;
static PyObject *__pyx_n_s_free;
static PyObject *__pyx_n_s_from;
static PyObject *__pyx_kp_u_func;
static PyObject *__pyx_n_s_func_2;
static PyObject *__pyx_kp_u_function;
static PyObject *__pyx_n_s_function_2;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_s_getPtr;
static PyObject *__pyx_n_u_getPtr;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_kp_u_gpuDirectRDMACapable;
static PyObject *__pyx_n_s_gpuDirectRDMACapable_2;
static PyObject *__pyx_n_s_granularity;
static PyObject *__pyx_n_s_graph;
static PyObject *__pyx_n_s_graph_length;
static PyObject *__pyx_n_s_graph_out;
static PyObject *__pyx_n_s_greatestPriority;
static PyObject *__pyx_kp_u_gridDimX;
static PyObject *__pyx_n_s_gridDimX_2;
static PyObject *__pyx_kp_u_gridDimY;
static PyObject *__pyx_n_s_gridDimY_2;
static PyObject *__pyx_kp_u_gridDimZ;
static PyObject *__pyx_n_s_gridDimZ_2;
static PyObject *__pyx_n_s_grid_height;
static PyObject *__pyx_n_s_grid_width;
static PyObject *__pyx_kp_u_hArray;
static PyObject *__pyx_n_s_hArray_2;
static PyObject *__pyx_n_s_hClonedGraph;
static PyObject *__pyx_n_s_hEnd;
static PyObject *__pyx_n_s_hErrorNode_out;
static PyObject *__pyx_n_s_hEvent;
static PyObject *__pyx_n_s_hGraph;
static PyObject *__pyx_n_s_hGraphExec;
static PyObject *__pyx_kp_u_hMipmappedArray;
static PyObject *__pyx_n_s_hMipmappedArray_2;
static PyObject *__pyx_n_s_hNode;
static PyObject *__pyx_n_s_hOriginalNode;
static PyObject *__pyx_n_s_hStart;
static PyObject *__pyx_kp_u_hStream;
static PyObject *__pyx_n_s_hStream_2;
static PyObject *__pyx_n_s_hSurfRef;
static PyObject *__pyx_n_s_hTexRef;
static PyObject *__pyx_kp_u_handle;
static PyObject *__pyx_n_s_handleType;
static PyObject *__pyx_kp_u_handleTypes;
static PyObject *__pyx_n_s_handleTypes_2;
static PyObject *__pyx_n_s_handle_2;
static PyObject *__pyx_kp_u_handle_3;
static PyObject *__pyx_kp_u_height;
static PyObject *__pyx_n_s_height_2;
static PyObject *__pyx_n_s_hex;
static PyObject *__pyx_n_s_hfunc;
static PyObject *__pyx_kp_u_hitProp;
static PyObject *__pyx_n_s_hitProp_2;
static PyObject *__pyx_kp_u_hitRatio;
static PyObject *__pyx_n_s_hitRatio_2;
static PyObject *__pyx_n_s_hmod;
static PyObject *__pyx_kp_u_id;
static PyObject *__pyx_n_s_id_2;
static PyObject *__pyx_n_s_id_out;
static PyObject *__pyx_n_s_idx;
static PyObject *__pyx_n_s_image;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_init_value;
static PyObject *__pyx_n_s_initialRefcount;
static PyObject *__pyx_n_s_int;
static PyObject *__pyx_n_s_isEnabled;
static PyObject *__pyx_n_s_is_getter;
static PyObject *__pyx_kp_u_kernelParams;
static PyObject *__pyx_n_s_kernelParams_2;
static PyObject *__pyx_kp_u_key;
static PyObject *__pyx_n_s_key_2;
static PyObject *__pyx_kp_u_keyedMutex;
static PyObject *__pyx_n_s_keyedMutex_2;
static PyObject *__pyx_kp_u_lastLayer;
static PyObject *__pyx_n_s_lastLayer_2;
static PyObject *__pyx_kp_u_lastMipmapLevel;
static PyObject *__pyx_n_s_lastMipmapLevel_2;
static PyObject *__pyx_n_s_launchParamsList;
static PyObject *__pyx_kp_u_layer;
static PyObject *__pyx_n_s_layer_2;
static PyObject *__pyx_n_s_leastPriority;
static PyObject *__pyx_n_s_length;
static PyObject *__pyx_kp_u_level;
static PyObject *__pyx_n_s_level_2;
static PyObject *__pyx_n_s_limit;
static PyObject *__pyx_kp_u_linear;
static PyObject *__pyx_n_s_linear_2;
static PyObject *__pyx_kp_u_location;
static PyObject *__pyx_n_s_location_2;
static PyObject *__pyx_n_s_logBuffer;
static PyObject *__pyx_n_s_luid;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_major;
static PyObject *__pyx_n_s_map;
static PyObject *__pyx_n_s_mapInfoList;
static PyObject *__pyx_n_s_maxAniso;
static PyObject *__pyx_kp_u_maxAnisotropy;
static PyObject *__pyx_n_s_maxAnisotropy_2;
static PyObject *__pyx_kp_u_maxGridSize;
static PyObject *__pyx_n_s_maxGridSize_2;
static PyObject *__pyx_kp_u_maxMipmapLevelClamp;
static PyObject *__pyx_n_s_maxMipmapLevelClamp_2;
static PyObject *__pyx_kp_u_maxThreadsDim;
static PyObject *__pyx_n_s_maxThreadsDim_2;
static PyObject *__pyx_kp_u_maxThreadsPerBlock;
static PyObject *__pyx_n_s_maxThreadsPerBlock_2;
static PyObject *__pyx_n_s_maxWidthInElements;
static PyObject *__pyx_kp_u_memHandle;
static PyObject *__pyx_n_s_memHandleDesc;
static PyObject *__pyx_kp_u_memHandleType;
static PyObject *__pyx_n_s_memHandleType_2;
static PyObject *__pyx_n_s_memHandle_2;
static PyObject *__pyx_kp_u_memHandle_3;
static PyObject *__pyx_kp_u_memOperationType;
static PyObject *__pyx_n_s_memOperationType_2;
static PyObject *__pyx_kp_u_memPitch;
static PyObject *__pyx_n_s_memPitch_2;
static PyObject *__pyx_n_s_memPool;
static PyObject *__pyx_kp_u_memoryBarrier;
static PyObject *__pyx_n_s_memoryBarrier_2;
static PyObject *__pyx_n_s_memoryRequirements;
static PyObject *__pyx_n_s_memsetParams;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_minBytesToKeep;
static PyObject *__pyx_n_s_minGridSize;
static PyObject *__pyx_kp_u_minMipmapLevelClamp;
static PyObject *__pyx_n_s_minMipmapLevelClamp_2;
static PyObject *__pyx_n_s_minor;
static PyObject *__pyx_n_s_mipLevel;
static PyObject *__pyx_kp_u_mipmap;
static PyObject *__pyx_n_s_mipmapDesc;
static PyObject *__pyx_kp_u_mipmapFilterMode;
static PyObject *__pyx_n_s_mipmapFilterMode_2;
static PyObject *__pyx_kp_u_mipmapLevelBias;
static PyObject *__pyx_n_s_mipmapLevelBias_2;
static PyObject *__pyx_n_s_mipmap_2;
static PyObject *__pyx_kp_u_mipmap_3;
static PyObject *__pyx_kp_u_miptail;
static PyObject *__pyx_kp_u_miptailFirstLevel;
static PyObject *__pyx_n_s_miptailFirstLevel_2;
static PyObject *__pyx_kp_u_miptailSize;
static PyObject *__pyx_n_s_miptailSize_2;
static PyObject *__pyx_n_s_miptail_2;
static PyObject *__pyx_kp_u_missProp;
static PyObject *__pyx_n_s_missProp_2;
static PyObject *__pyx_n_s_mode;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_module_2;
static PyObject *__pyx_kp_u_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_name_3;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_nodeParams;
static PyObject *__pyx_n_s_nodeParams_out;
static PyObject *__pyx_kp_u_not_enough_values_found_during_a;
static PyObject *__pyx_n_s_numAttributes;
static PyObject *__pyx_kp_u_numAttrs;
static PyObject *__pyx_n_s_numAttrs_2;
static PyObject *__pyx_n_s_numBlocks;
static PyObject *__pyx_kp_u_numChannels;
static PyObject *__pyx_n_s_numChannels_2;
static PyObject *__pyx_n_s_numClusters;
static PyObject *__pyx_n_s_numDependencies;
static PyObject *__pyx_n_s_numDependencies_out;
static PyObject *__pyx_n_s_numDependentNodes;
static PyObject *__pyx_n_s_numDevices;
static PyObject *__pyx_n_s_numEdges;
static PyObject *__pyx_kp_u_numExtSems;
static PyObject *__pyx_n_s_numExtSems_2;
static PyObject *__pyx_kp_u_numLevels;
static PyObject *__pyx_n_s_numLevels_2;
static PyObject *__pyx_n_s_numMipmapLevels;
static PyObject *__pyx_n_s_numNodes;
static PyObject *__pyx_n_s_numOptions;
static PyObject *__pyx_n_s_numParams;
static PyObject *__pyx_n_s_numRootNodes;
static PyObject *__pyx_kp_u_num_bytes;
static PyObject *__pyx_n_s_num_bytes_2;
static PyObject *__pyx_n_s_numbytes;
static PyObject *__pyx_kp_u_nvSciBufObject;
static PyObject *__pyx_n_s_nvSciBufObject_2;
static PyObject *__pyx_kp_u_nvSciSync;
static PyObject *__pyx_n_s_nvSciSyncAttrList;
static PyObject *__pyx_kp_u_nvSciSyncObj;
static PyObject *__pyx_n_s_nvSciSyncObj_2;
static PyObject *__pyx_n_s_nvSciSync_2;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_objType;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_object_out;
static PyObject *__pyx_kp_u_offset;
static PyObject *__pyx_kp_u_offsetX;
static PyObject *__pyx_n_s_offsetX_2;
static PyObject *__pyx_kp_u_offsetY;
static PyObject *__pyx_n_s_offsetY_2;
static PyObject *__pyx_kp_u_offsetZ;
static PyObject *__pyx_n_s_offsetZ_2;
static PyObject *__pyx_n_s_offset_2;
static PyObject *__pyx_kp_u_operation;
static PyObject *__pyx_n_s_operation_2;
static PyObject *__pyx_n_s_option;
static PyObject *__pyx_n_s_optionValues;
static PyObject *__pyx_n_s_options;
static PyObject *__pyx_n_s_ordinal;
static PyObject *__pyx_n_s_originalGraph;
static PyObject *__pyx_n_s_osHandle;
static PyObject *__pyx_n_s_outputFile;
static PyObject *__pyx_n_s_outputMode;
static PyObject *__pyx_n_s_p;
static PyObject *__pyx_kp_u_p2pToken;
static PyObject *__pyx_n_s_p2pToken_2;
static PyObject *__pyx_n_s_pAllocateArray;
static PyObject *__pyx_kp_u_pArray;
static PyObject *__pyx_n_s_pArrayDescriptor;
static PyObject *__pyx_n_s_pArray_2;
static PyObject *__pyx_n_s_pBorderColor;
static PyObject *__pyx_n_s_pConfig;
static PyObject *__pyx_n_s_pCopy;
static PyObject *__pyx_n_s_pCtx;
static PyObject *__pyx_n_s_pCudaDeviceCount;
static PyObject *__pyx_n_s_pCudaResource;
static PyObject *__pyx_n_s_pDevPtr;
static PyObject *__pyx_n_s_pDevice;
static PyObject *__pyx_n_s_pExecAffinity;
static PyObject *__pyx_n_s_pExportTableId;
static PyObject *__pyx_n_s_pFlags;
static PyObject *__pyx_n_s_pFormat;
static PyObject *__pyx_n_s_pHandle;
static PyObject *__pyx_n_s_pLevelArray;
static PyObject *__pyx_n_s_pMilliseconds;
static PyObject *__pyx_n_s_pMipmappedArray;
static PyObject *__pyx_n_s_pMipmappedArrayDesc;
static PyObject *__pyx_n_s_pNumChannels;
static PyObject *__pyx_kp_u_pPitch;
static PyObject *__pyx_n_s_pPitch_2;
static PyObject *__pyx_n_s_pPlaneArray;
static PyObject *__pyx_n_s_pResDesc;
static PyObject *__pyx_n_s_pResViewDesc;
static PyObject *__pyx_n_s_pSize;
static PyObject *__pyx_n_s_pStr;
static PyObject *__pyx_n_s_pStream;
static PyObject *__pyx_n_s_pSurfObject;
static PyObject *__pyx_n_s_pSurfRef;
static PyObject *__pyx_n_s_pTexDesc;
static PyObject *__pyx_n_s_pTexObject;
static PyObject *__pyx_n_s_pTexRef;
static PyObject *__pyx_kp_u_pad;
static PyObject *__pyx_n_s_pad_2;
static PyObject *__pyx_kp_u_pad_length_must_be_64_is;
static PyObject *__pyx_n_s_paddr;
static PyObject *__pyx_n_s_pam;
static PyObject *__pyx_kp_u_param;
static PyObject *__pyx_kp_u_paramArray;
static PyObject *__pyx_n_s_paramArray_2;
static PyObject *__pyx_n_s_param_2;
static PyObject *__pyx_kp_u_params;
static PyObject *__pyx_kp_u_paramsArray;
static PyObject *__pyx_n_s_paramsArray_2;
static PyObject *__pyx_n_s_params_2;
static PyObject *__pyx_n_s_params_out;
static PyObject *__pyx_n_s_parray;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_pbase;
static PyObject *__pyx_n_s_pbias;
static PyObject *__pyx_n_s_pblockSizeToDynamicSMemSize;
static PyObject *__pyx_n_s_pbuffer;
static PyObject *__pyx_n_s_pcallback;
static PyObject *__pyx_n_s_pchildGraph;
static PyObject *__pyx_n_s_pciBusId;
static PyObject *__pyx_n_s_pconfig;
static PyObject *__pyx_n_s_pconn;
static PyObject *__pyx_n_s_pctx;
static PyObject *__pyx_n_s_pdestroy;
static PyObject *__pyx_n_s_pdev;
static PyObject *__pyx_n_s_pdevPtr;
static PyObject *__pyx_n_s_pdevice;
static PyObject *__pyx_n_s_pdptr;
static PyObject *__pyx_n_s_pdst;
static PyObject *__pyx_n_s_pdstArray;
static PyObject *__pyx_n_s_pdstContext;
static PyObject *__pyx_n_s_pdstDevice;
static PyObject *__pyx_n_s_peerContext;
static PyObject *__pyx_n_s_peerDev;
static PyObject *__pyx_n_s_peglSync;
static PyObject *__pyx_n_s_pevent;
static PyObject *__pyx_n_s_pextMem;
static PyObject *__pyx_n_s_pextSem;
static PyObject *__pyx_n_s_pf;
static PyObject *__pyx_n_s_pflags;
static PyObject *__pyx_n_s_pfm;
static PyObject *__pyx_n_s_pfn;
static PyObject *__pyx_n_s_pformat;
static PyObject *__pyx_n_s_pfunc;
static PyObject *__pyx_n_s_pgraph;
static PyObject *__pyx_n_s_phArray;
static PyObject *__pyx_n_s_phClonedGraph;
static PyObject *__pyx_n_s_phEnd;
static PyObject *__pyx_n_s_phErrorNode;
static PyObject *__pyx_n_s_phEvent;
static PyObject *__pyx_n_s_phGraph;
static PyObject *__pyx_n_s_phGraphClone;
static PyObject *__pyx_n_s_phGraphExec;
static PyObject *__pyx_n_s_phGraphNode;
static PyObject *__pyx_n_s_phMipmappedArray;
static PyObject *__pyx_n_s_phNode;
static PyObject *__pyx_n_s_phOriginalNode;
static PyObject *__pyx_n_s_phStart;
static PyObject *__pyx_n_s_phStream;
static PyObject *__pyx_n_s_phSurfRef;
static PyObject *__pyx_n_s_phTexRef;
static PyObject *__pyx_n_s_phandle;
static PyObject *__pyx_n_s_pheight;
static PyObject *__pyx_n_s_phfunc;
static PyObject *__pyx_n_s_phmod;
static PyObject *__pyx_n_s_pi;
static PyObject *__pyx_n_s_pimage;
static PyObject *__pyx_kp_u_pitch;
static PyObject *__pyx_kp_u_pitch2D;
static PyObject *__pyx_n_s_pitch2D_2;
static PyObject *__pyx_kp_u_pitchInBytes;
static PyObject *__pyx_n_s_pitchInBytes_2;
static PyObject *__pyx_n_s_pitch_2;
static PyObject *__pyx_kp_u_planeCount;
static PyObject *__pyx_n_s_planeCount_2;
static PyObject *__pyx_n_s_planeIdx;
static PyObject *__pyx_n_s_pmaxAniso;
static PyObject *__pyx_n_s_pmaxMipmapLevelClamp;
static PyObject *__pyx_n_s_pmemPool;
static PyObject *__pyx_n_s_pminMipmapLevelClamp;
static PyObject *__pyx_n_s_pmipmap;
static PyObject *__pyx_n_s_pobject;
static PyObject *__pyx_n_s_pool;
static PyObject *__pyx_kp_u_poolProps;
static PyObject *__pyx_n_s_poolProps_2;
static PyObject *__pyx_n_s_pool_out;
static PyObject *__pyx_n_s_poriginalGraph;
static PyObject *__pyx_n_s_pp;
static PyObject *__pyx_n_s_ppCudaResource;
static PyObject *__pyx_n_s_ppExportTable;
static PyObject *__pyx_n_s_ppStream;
static PyObject *__pyx_n_s_ppeerContext;
static PyObject *__pyx_n_s_ppeerDev;
static PyObject *__pyx_n_s_ppool;
static PyObject *__pyx_n_s_pptr;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_presource;
static PyObject *__pyx_n_s_presources;
static PyObject *__pyx_kp_u_priority;
static PyObject *__pyx_n_s_priority_2;
static PyObject *__pyx_kp_u_programmaticEvent;
static PyObject *__pyx_n_s_programmaticEvent_2;
static PyObject *__pyx_kp_u_programmaticStreamSerializationA;
static PyObject *__pyx_n_s_programmaticStreamSerializationA_2;
static PyObject *__pyx_n_s_prop;
static PyObject *__pyx_n_s_psize;
static PyObject *__pyx_n_s_psrc;
static PyObject *__pyx_n_s_psrcArray;
static PyObject *__pyx_n_s_psrcContext;
static PyObject *__pyx_n_s_psrcDevice;
static PyObject *__pyx_n_s_pstate;
static PyObject *__pyx_n_s_pstream;
static PyObject *__pyx_n_s_psurfObject;
static PyObject *__pyx_n_s_ptarget;
static PyObject *__pyx_n_s_ptexObject;
static PyObject *__pyx_n_s_ptr;
static PyObject *__pyx_n_s_ptr_2;
static PyObject *__pyx_n_s_ptr_out;
static PyObject *__pyx_n_s_pvalue;
static PyObject *__pyx_n_s_pvdpDevice;
static PyObject *__pyx_n_s_pvdpGetProcAddress;
static PyObject *__pyx_n_s_pvdpSurface;
static PyObject *__pyx_n_s_pwidth;
static PyObject *__pyx_n_s_pyObj;
static PyObject *__pyx_n_s_pyattributes;
static PyObject *__pyx_n_s_pydataSizes;
static PyObject *__pyx_n_s_pydependencies;
static PyObject *__pyx_n_s_pydependencies_out;
static PyObject *__pyx_n_s_pydependentNodes;
static PyObject *__pyx_n_s_pyfrom;
static PyObject *__pyx_n_s_pylist;
static PyObject *__pyx_n_s_pyname;
static PyObject *__pyx_n_s_pynodes;
static PyObject *__pyx_n_s_pyoptionValues;
static PyObject *__pyx_n_s_pyoptions;
static PyObject *__pyx_n_s_pypCudaDevices;
static PyObject *__pyx_n_s_pypciBusId;
static PyObject *__pyx_n_s_pyrootNodes;
static PyObject *__pyx_n_s_pyto;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_kp_u_regsPerBlock;
static PyObject *__pyx_n_s_regsPerBlock_2;
static PyObject *__pyx_kp_u_requestedHandleTypes;
static PyObject *__pyx_n_s_requestedHandleTypes_2;
static PyObject *__pyx_kp_u_res;
static PyObject *__pyx_kp_u_resType;
static PyObject *__pyx_n_s_resType_2;
static PyObject *__pyx_n_s_res_2;
static PyObject *__pyx_kp_u_reserved;
static PyObject *__pyx_kp_u_reserved0;
static PyObject *__pyx_n_s_reserved0_2;
static PyObject *__pyx_kp_u_reserved1;
static PyObject *__pyx_n_s_reserved1_2;
static PyObject *__pyx_n_s_reserved_2;
static PyObject *__pyx_kp_u_reserved_3;
static PyObject *__pyx_kp_u_reserved_length_must_be_4_is;
static PyObject *__pyx_kp_u_reserved_length_must_be_64_is;
static PyObject *__pyx_kp_u_resource;
static PyObject *__pyx_kp_u_resourceType;
static PyObject *__pyx_n_s_resourceType_2;
static PyObject *__pyx_n_s_resource_2;
static PyObject *__pyx_n_s_resources;
static PyObject *__pyx_n_s_scope;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_semHandleDesc;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_shHandleType;
static PyObject *__pyx_n_s_shareData;
static PyObject *__pyx_n_s_shareData_out;
static PyObject *__pyx_kp_u_sharedMemBytes;
static PyObject *__pyx_n_s_sharedMemBytes_2;
static PyObject *__pyx_kp_u_sharedMemPerBlock;
static PyObject *__pyx_n_s_sharedMemPerBlock_2;
static PyObject *__pyx_kp_u_size;
static PyObject *__pyx_kp_u_sizeInBytes;
static PyObject *__pyx_n_s_sizeInBytes_2;
static PyObject *__pyx_n_s_sizeOut;
static PyObject *__pyx_n_s_size_2;
static PyObject *__pyx_n_s_sizeof;
static PyObject *__pyx_kp_u_smCount;
static PyObject *__pyx_n_s_smCount_2;
static PyObject *__pyx_kp_u_sparseLevel;
static PyObject *__pyx_n_s_sparseLevel_2;
static PyObject *__pyx_n_s_sparseProperties;
static PyObject *__pyx_n_s_src;
static PyObject *__pyx_kp_u_srcArray;
static PyObject *__pyx_n_s_srcArray_2;
static PyObject *__pyx_kp_u_srcContext;
static PyObject *__pyx_n_s_srcContext_2;
static PyObject *__pyx_kp_u_srcDevice;
static PyObject *__pyx_n_s_srcDevice_2;
static PyObject *__pyx_kp_u_srcHeight;
static PyObject *__pyx_n_s_srcHeight_2;
static PyObject *__pyx_kp_u_srcHost;
static PyObject *__pyx_n_s_srcHost_2;
static PyObject *__pyx_kp_u_srcLOD;
static PyObject *__pyx_n_s_srcLOD_2;
static PyObject *__pyx_kp_u_srcMemoryType;
static PyObject *__pyx_n_s_srcMemoryType_2;
static PyObject *__pyx_n_s_srcOffset;
static PyObject *__pyx_kp_u_srcPitch;
static PyObject *__pyx_n_s_srcPitch_2;
static PyObject *__pyx_kp_u_srcXInBytes;
static PyObject *__pyx_n_s_srcXInBytes_2;
static PyObject *__pyx_kp_u_srcY;
static PyObject *__pyx_n_s_srcY_2;
static PyObject *__pyx_kp_u_srcZ;
static PyObject *__pyx_n_s_srcZ_2;
static PyObject *__pyx_n_s_startswith;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_n_s_stateOut;
static PyObject *__pyx_n_s_stream;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_kp_u_subresource;
static PyObject *__pyx_kp_u_subresourceType;
static PyObject *__pyx_n_s_subresourceType_2;
static PyObject *__pyx_n_s_subresource_2;
static PyObject *__pyx_n_s_surfObject;
static PyObject *__pyx_n_s_symbol;
static PyObject *__pyx_kp_u_syncPolicy;
static PyObject *__pyx_n_s_syncPolicy_2;
static PyObject *__pyx_n_s_target;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_texObject;
static PyObject *__pyx_kp_u_textureAlign;
static PyObject *__pyx_n_s_textureAlign_2;
static PyObject *__pyx_n_s_texunit;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_kp_u_tileExtent;
static PyObject *__pyx_n_s_tileExtent_2;
static PyObject *__pyx_n_s_timeout;
static PyObject *__pyx_kp_u_timeoutMs;
static PyObject *__pyx_n_s_timeoutMs_2;
static PyObject *__pyx_n_s_to;
static PyObject *__pyx_n_s_total;
static PyObject *__pyx_kp_u_totalConstantMemory;
static PyObject *__pyx_n_s_totalConstantMemory_2;
static PyObject *__pyx_kp_u_triggerAtBlockStart;
static PyObject *__pyx_n_s_triggerAtBlockStart_2;
static PyObject *__pyx_kp_u_type;
static PyObject *__pyx_n_s_type_2;
static PyObject *__pyx_n_s_typename;
static PyObject *__pyx_n_s_typing;
static PyObject *__pyx_n_s_uc;
static PyObject *__pyx_n_s_ui;
static PyObject *__pyx_n_s_updateResult_out;
static PyObject *__pyx_n_s_us;
static PyObject *__pyx_kp_u_usage;
static PyObject *__pyx_n_s_usage_2;
static PyObject *__pyx_kp_u_userData;
static PyObject *__pyx_n_s_userData_2;
static PyObject *__pyx_n_s_uuid;
static PyObject *__pyx_kp_u_vaSpaceToken;
static PyObject *__pyx_n_s_vaSpaceToken_2;
static PyObject *__pyx_kp_u_val;
static PyObject *__pyx_n_s_val_2;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_kp_u_value64;
static PyObject *__pyx_n_s_value64_2;
static PyObject *__pyx_kp_u_value_2;
static PyObject *__pyx_kp_u_value_3;
static PyObject *__pyx_n_s_value_out;
static PyObject *__pyx_n_s_vdpDevice;
static PyObject *__pyx_n_s_vdpGetProcAddress;
static PyObject *__pyx_n_s_vdpSurface;
static PyObject *__pyx_n_s_version;
static PyObject *__pyx_n_s_voidStarHelper;
static PyObject *__pyx_kp_u_waitValue;
static PyObject *__pyx_n_s_waitValue_2;
static PyObject *__pyx_kp_u_width;
static PyObject *__pyx_n_s_width_2;
static PyObject *__pyx_kp_u_win32;
static PyObject *__pyx_kp_u_win32HandleMetaData;
static PyObject *__pyx_n_s_win32HandleMetaData_2;
static PyObject *__pyx_kp_u_win32SecurityAttributes;
static PyObject *__pyx_n_s_win32SecurityAttributes_2;
static PyObject *__pyx_n_s_win32_2;
static PyObject *__pyx_kp_u_writeValue;
static PyObject *__pyx_n_s_writeValue_2;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_u_x;
static PyObject *__pyx_kp_u_x_2;
static PyObject *__pyx_kp_u_y;
static PyObject *__pyx_n_s_y_2;
static PyObject *__pyx_kp_u_z;
static PyObject *__pyx_n_s_z_2;
static PyObject *__pyx_n_s_zip;
static int __pyx_pf_4cuda_4cuda_9CUcontext___cinit__(struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_9CUcontext_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUcontext_4__repr__(struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUcontext_6__index__(struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUcontext_8__int__(struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUcontext_10getPtr(struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUcontext_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUcontext_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_8CUmodule___cinit__(struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_8CUmodule_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUmodule_4__repr__(struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUmodule_6__index__(struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUmodule_8__int__(struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUmodule_10getPtr(struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUmodule_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUmodule_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_10CUfunction___cinit__(struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_10CUfunction_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10CUfunction_4__repr__(struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10CUfunction_6__index__(struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10CUfunction_8__int__(struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10CUfunction_10getPtr(struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10CUfunction_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10CUfunction_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_7CUarray___cinit__(struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_7CUarray_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUarray_4__repr__(struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUarray_6__index__(struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUarray_8__int__(struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUarray_10getPtr(struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUarray_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUarray_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUmipmappedArray___cinit__(struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUmipmappedArray_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUmipmappedArray_4__repr__(struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUmipmappedArray_6__index__(struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUmipmappedArray_8__int__(struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUmipmappedArray_10getPtr(struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUmipmappedArray_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUmipmappedArray_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_8CUtexref___cinit__(struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_8CUtexref_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUtexref_4__repr__(struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUtexref_6__index__(struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUtexref_8__int__(struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUtexref_10getPtr(struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUtexref_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUtexref_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_9CUsurfref___cinit__(struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_9CUsurfref_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUsurfref_4__repr__(struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUsurfref_6__index__(struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUsurfref_8__int__(struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUsurfref_10getPtr(struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUsurfref_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUsurfref_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_7CUevent___cinit__(struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_7CUevent_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUevent_4__repr__(struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUevent_6__index__(struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUevent_8__int__(struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUevent_10getPtr(struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUevent_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUevent_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_8CUstream___cinit__(struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_8CUstream_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUstream_4__repr__(struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUstream_6__index__(struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUstream_8__int__(struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUstream_10getPtr(struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUstream_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUstream_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_18CUgraphicsResource___cinit__(struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_18CUgraphicsResource_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUgraphicsResource_4__repr__(struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUgraphicsResource_6__index__(struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUgraphicsResource_8__int__(struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUgraphicsResource_10getPtr(struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUgraphicsResource_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUgraphicsResource_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUexternalMemory___cinit__(struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUexternalMemory_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUexternalMemory_4__repr__(struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUexternalMemory_6__index__(struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUexternalMemory_8__int__(struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUexternalMemory_10getPtr(struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUexternalMemory_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUexternalMemory_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_19CUexternalSemaphore___cinit__(struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_19CUexternalSemaphore_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_19CUexternalSemaphore_4__repr__(struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_19CUexternalSemaphore_6__index__(struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_19CUexternalSemaphore_8__int__(struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_19CUexternalSemaphore_10getPtr(struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_19CUexternalSemaphore_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_19CUexternalSemaphore_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_7CUgraph___cinit__(struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_7CUgraph_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUgraph_4__repr__(struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUgraph_6__index__(struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUgraph_8__int__(struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUgraph_10getPtr(struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUgraph_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_7CUgraph_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_11CUgraphNode___cinit__(struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_11CUgraphNode_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphNode_4__repr__(struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphNode_6__index__(struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphNode_8__int__(struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphNode_10getPtr(struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphNode_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphNode_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_11CUgraphExec___cinit__(struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_11CUgraphExec_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphExec_4__repr__(struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphExec_6__index__(struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphExec_8__int__(struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphExec_10getPtr(struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphExec_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphExec_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUmemoryPool___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUmemoryPool_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUmemoryPool_4__repr__(struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUmemoryPool_6__index__(struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUmemoryPool_8__int__(struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUmemoryPool_10getPtr(struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUmemoryPool_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUmemoryPool_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUuserObject___cinit__(struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUuserObject_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUuserObject_4__repr__(struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUuserObject_6__index__(struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUuserObject_8__int__(struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUuserObject_10getPtr(struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUuserObject_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUuserObject_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_11CUlinkState___cinit__(struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_11CUlinkState_2__init__(struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUlinkState_4__repr__(struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUlinkState_6__index__(struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUlinkState_8__int__(struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUlinkState_10getPtr(struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUlinkState_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUlinkState_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_11EGLImageKHR___cinit__(struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_11EGLImageKHR_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11EGLImageKHR_4__repr__(struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11EGLImageKHR_6__index__(struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11EGLImageKHR_8__int__(struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11EGLImageKHR_10getPtr(struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11EGLImageKHR_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11EGLImageKHR_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_12EGLStreamKHR___cinit__(struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_12EGLStreamKHR_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12EGLStreamKHR_4__repr__(struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12EGLStreamKHR_6__index__(struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12EGLStreamKHR_8__int__(struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12EGLStreamKHR_10getPtr(struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12EGLStreamKHR_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12EGLStreamKHR_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_10EGLSyncKHR___cinit__(struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_10EGLSyncKHR_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10EGLSyncKHR_4__repr__(struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10EGLSyncKHR_6__index__(struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10EGLSyncKHR_8__int__(struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10EGLSyncKHR_10getPtr(struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10EGLSyncKHR_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10EGLSyncKHR_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUeglStreamConnection___cinit__(struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUeglStreamConnection_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUeglStreamConnection_4__repr__(struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUeglStreamConnection_6__index__(struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUeglStreamConnection_8__int__(struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUeglStreamConnection_10getPtr(struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUeglStreamConnection_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUeglStreamConnection_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_8CUhostFn___cinit__(struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_8CUhostFn_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUhostFn_4__repr__(struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUhostFn_6__index__(struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUhostFn_8__int__(struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUhostFn_10getPtr(struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUhostFn_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUhostFn_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUstreamCallback___cinit__(struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUstreamCallback_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUstreamCallback_4__repr__(struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUstreamCallback_6__index__(struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUstreamCallback_8__int__(struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUstreamCallback_10getPtr(struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUstreamCallback_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUstreamCallback_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize___cinit__(struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_4__repr__(struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_6__index__(struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_8__int__(struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_10getPtr(struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_9CUuuid_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_9CUuuid_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_9CUuuid_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUuuid_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUuuid_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUuuid_st_5bytes___get__(struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUuuid_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9CUuuid_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_4getPtr(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_6__repr__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9operation___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9operation_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, PyObject *__pyx_v_operation); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7address___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7address_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, PyObject *__pyx_v_address); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7value64___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7value64_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, PyObject *__pyx_v_value64); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5alias___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5alias_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, PyObject *__pyx_v_alias); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_4getPtr(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_6__repr__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9operation___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9operation_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, PyObject *__pyx_v_operation); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7address___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7address_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, PyObject *__pyx_v_address); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7value64___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7value64_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, PyObject *__pyx_v_value64); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5alias___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5alias_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, PyObject *__pyx_v_alias); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_4getPtr(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_6__repr__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9operation___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9operation_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self, PyObject *__pyx_v_operation); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_4getPtr(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_6__repr__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9operation___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9operation_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self, PyObject *__pyx_v_operation); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union___cinit__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_2__init__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_6getPtr(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_8__repr__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9operation___get__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9operation_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, PyObject *__pyx_v_operation); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9waitValue___get__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9waitValue_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_waitValue); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10writeValue___get__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10writeValue_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_writeValue); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_17flushRemoteWrites___get__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_17flushRemoteWrites_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_flushRemoteWrites); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13memoryBarrier___get__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13memoryBarrier_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_memoryBarrier); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3pad___get__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3pad_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, PyObject *__pyx_v_pad); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_4__dealloc__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3ctx___get__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3ctx_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_ctx); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5count___get__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5count_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_count); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10paramArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10paramArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUdevprop_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_12CUdevprop_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_18maxThreadsPerBlock___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_18maxThreadsPerBlock_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_maxThreadsPerBlock); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_13maxThreadsDim___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_13maxThreadsDim_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, PyObject *__pyx_v_maxThreadsDim); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_11maxGridSize___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_11maxGridSize_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, PyObject *__pyx_v_maxGridSize); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_17sharedMemPerBlock___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_17sharedMemPerBlock_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_sharedMemPerBlock); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_19totalConstantMemory___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_19totalConstantMemory_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_totalConstantMemory); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_9SIMDWidth___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_9SIMDWidth_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_SIMDWidth); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_8memPitch___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_8memPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_memPitch); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_12regsPerBlock___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_12regsPerBlock_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_regsPerBlock); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_9clockRate___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_9clockRate_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_clockRate); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_12textureAlign___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_12textureAlign_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_textureAlign); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8base_ptr___get__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8base_ptr_2__set__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, PyObject *__pyx_v_base_ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_9num_bytes___get__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_9num_bytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, size_t __pyx_v_num_bytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8hitRatio___get__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8hitRatio_2__set__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, float __pyx_v_hitRatio); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_7hitProp___get__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_7hitProp_2__set__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, PyObject *__pyx_v_hitProp); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8missProp___get__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8missProp_2__set__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, PyObject *__pyx_v_missProp); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4func___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4func_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimX___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimX_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_gridDimX); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_gridDimY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_gridDimZ); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimX___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimX_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_blockDimX); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_blockDimY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_blockDimZ); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_14sharedMemBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_14sharedMemBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_sharedMemBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12kernelParams___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12kernelParams_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_kernelParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5extra___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5extra_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_extra); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3dst___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3dst_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_dst); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5pitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5pitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, size_t __pyx_v_pitch); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5value___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5value_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11elementSize___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11elementSize_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_elementSize); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5width___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5width_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, size_t __pyx_v_width); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, size_t __pyx_v_height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2fn___get__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2fn_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_fn); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8userData___get__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8userData_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_userData); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1x___get__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1x_2__set__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self, unsigned int __pyx_v_x); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1y___get__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1y_2__set__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self, unsigned int __pyx_v_y); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1z___get__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1z_2__set__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self, unsigned int __pyx_v_z); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5event___get__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5event_2__set__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self, PyObject *__pyx_v_event); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5flags___get__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5flags_2__set__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_19triggerAtBlockStart___get__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_19triggerAtBlockStart_2__set__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self, int __pyx_v_triggerAtBlockStart); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union___cinit__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_2__init__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_6getPtr(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_8__repr__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_3pad___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_3pad_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, PyObject *__pyx_v_pad); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_18accessPolicyWindow___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_18accessPolicyWindow_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow *__pyx_v_accessPolicyWindow); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_11cooperative___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_11cooperative_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, int __pyx_v_cooperative); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10syncPolicy___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10syncPolicy_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, PyObject *__pyx_v_syncPolicy); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10clusterDim___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10clusterDim_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_clusterDim); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_33clusterSchedulingPolicyPreference___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_33clusterSchedulingPolicyPreference_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, PyObject *__pyx_v_clusterSchedulingPolicyPreference); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_38programmaticStreamSerializationAllowed___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_38programmaticStreamSerializationAllowed_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, int __pyx_v_programmaticStreamSerializationAllowed); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_17programmaticEvent___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_17programmaticEvent_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_programmaticEvent); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_8priority___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_8priority_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, int __pyx_v_priority); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_2id___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_2id_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self, PyObject *__pyx_v_id); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_5value___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_5value_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_4__dealloc__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimX___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimX_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_gridDimX); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimY___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimY_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_gridDimY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimZ___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_gridDimZ); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimX___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimX_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_blockDimX); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimY___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimY_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_blockDimY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimZ___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_blockDimZ); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_14sharedMemBytes___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_14sharedMemBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_sharedMemBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_7hStream___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_7hStream_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_5attrs___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_5attrs_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8numAttrs___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8numAttrs_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_numAttrs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_3val___get__(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_3val_2__set__(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self, unsigned int __pyx_v_val); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7smCount___get__(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7smCount_2__set__(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount *__pyx_v_smCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_4type___get__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_4type_2__set__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self, PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_5param___get__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_5param_2__set__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_param); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_11srcXInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_11srcXInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_srcXInBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4srcY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4srcY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_srcY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_13srcMemoryType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_13srcMemoryType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_srcMemoryType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_7srcHost___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_7srcHost_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_srcHost); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_9srcDevice___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_9srcDevice_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_srcDevice); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_srcArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcPitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_srcPitch); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_11dstXInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_11dstXInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_dstXInBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4dstY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4dstY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_dstY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_13dstMemoryType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_13dstMemoryType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_dstMemoryType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_7dstHost___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_7dstHost_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_dstHost); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_9dstDevice___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_9dstDevice_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_dstDevice); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_dstArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstPitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_dstPitch); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_12WidthInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_12WidthInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_WidthInBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_6Height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_6Height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_Height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_11srcXInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_11srcXInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_srcXInBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_srcY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_srcZ); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6srcLOD___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6srcLOD_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_srcLOD); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_13srcMemoryType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_13srcMemoryType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_srcMemoryType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_7srcHost___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_7srcHost_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_srcHost); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcDevice___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcDevice_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_srcDevice); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_srcArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved0___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved0_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_reserved0); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcPitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_srcPitch); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcHeight___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcHeight_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_srcHeight); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_11dstXInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_11dstXInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_dstXInBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_dstY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_dstZ); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6dstLOD___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6dstLOD_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_dstLOD); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_13dstMemoryType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_13dstMemoryType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_dstMemoryType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_7dstHost___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_7dstHost_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_dstHost); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstDevice___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstDevice_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_dstDevice); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_dstArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved1___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved1_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_reserved1); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstPitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_dstPitch); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstHeight___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstHeight_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_dstHeight); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_12WidthInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_12WidthInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_WidthInBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6Height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6Height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_Height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_5Depth___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_5Depth_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_Depth); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11srcXInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11srcXInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_srcXInBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_srcY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_srcZ); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6srcLOD___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6srcLOD_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_srcLOD); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13srcMemoryType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13srcMemoryType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_srcMemoryType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7srcHost___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7srcHost_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_srcHost); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcDevice___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcDevice_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_srcDevice); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_srcArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10srcContext___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10srcContext_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_srcContext); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcPitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_srcPitch); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcHeight___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcHeight_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_srcHeight); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11dstXInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11dstXInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_dstXInBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_dstY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_dstZ); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6dstLOD___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6dstLOD_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_dstLOD); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13dstMemoryType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13dstMemoryType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_dstMemoryType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7dstHost___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7dstHost_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_dstHost); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstDevice___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstDevice_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_dstDevice); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_dstArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10dstContext___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10dstContext_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_dstContext); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstPitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_dstPitch); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstHeight___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstHeight_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_dstHeight); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12WidthInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12WidthInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_WidthInBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6Height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6Height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_Height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5Depth___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5Depth_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_Depth); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5Width___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5Width_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, size_t __pyx_v_Width); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, size_t __pyx_v_Height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Format___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Format_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, PyObject *__pyx_v_Format); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11NumChannels___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11NumChannels_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, unsigned int __pyx_v_NumChannels); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Width___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Width_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, size_t __pyx_v_Width); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, size_t __pyx_v_Height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Depth___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Depth_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, size_t __pyx_v_Depth); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Format___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Format_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, PyObject *__pyx_v_Format); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11NumChannels___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11NumChannels_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, unsigned int __pyx_v_NumChannels); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5width___get__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5width_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self, unsigned int __pyx_v_width); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6height___get__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6height_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self, unsigned int __pyx_v_height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5depth___get__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5depth_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self, unsigned int __pyx_v_depth); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10tileExtent___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10tileExtent_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_tileExtent); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_17miptailFirstLevel___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_17miptailFirstLevel_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, unsigned int __pyx_v_miptailFirstLevel); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11miptailSize___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11miptailSize_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_miptailSize); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4size___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4size_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self, size_t __pyx_v_size); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9alignment___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9alignment_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self, size_t __pyx_v_alignment); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6hArray___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6hArray_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self, PyObject *__pyx_v_hArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_15hMipmappedArray___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_15hMipmappedArray_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self, PyObject *__pyx_v_hMipmappedArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6devPtr___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6devPtr_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, PyObject *__pyx_v_devPtr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6format___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6format_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11numChannels___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11numChannels_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, unsigned int __pyx_v_numChannels); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11sizeInBytes___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11sizeInBytes_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, size_t __pyx_v_sizeInBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6devPtr___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6devPtr_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, PyObject *__pyx_v_devPtr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6format___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6format_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11numChannels___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11numChannels_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, unsigned int __pyx_v_numChannels); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5width___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5width_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, size_t __pyx_v_width); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6height___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6height_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, size_t __pyx_v_height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_12pitchInBytes___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_12pitchInBytes_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, size_t __pyx_v_pitchInBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5array___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5array_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_array); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6mipmap___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6mipmap_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_mipmap); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6linear___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6linear_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_linear); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7pitch2D___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7pitch2D_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_pitch2D); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7resType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7resType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self, PyObject *__pyx_v_resType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3res___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3res_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_res); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11addressMode___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11addressMode_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, PyObject *__pyx_v_addressMode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10filterMode___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10filterMode_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, PyObject *__pyx_v_filterMode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13maxAnisotropy___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13maxAnisotropy_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, unsigned int __pyx_v_maxAnisotropy); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_16mipmapFilterMode___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_16mipmapFilterMode_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, PyObject *__pyx_v_mipmapFilterMode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_15mipmapLevelBias___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_15mipmapLevelBias_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, float __pyx_v_mipmapLevelBias); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19minMipmapLevelClamp___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19minMipmapLevelClamp_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, float __pyx_v_minMipmapLevelClamp); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19maxMipmapLevelClamp___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19maxMipmapLevelClamp_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, float __pyx_v_maxMipmapLevelClamp); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11borderColor___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11borderColor_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, PyObject *__pyx_v_borderColor); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6format___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6format_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5width___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5width_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, size_t __pyx_v_width); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, size_t __pyx_v_height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5depth___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5depth_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, size_t __pyx_v_depth); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_16firstMipmapLevel___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_16firstMipmapLevel_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, unsigned int __pyx_v_firstMipmapLevel); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_15lastMipmapLevel___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_15lastMipmapLevel_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, unsigned int __pyx_v_lastMipmapLevel); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10firstLayer___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10firstLayer_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, unsigned int __pyx_v_firstLayer); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9lastLayer___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9lastLayer_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, unsigned int __pyx_v_lastLayer); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8p2pToken___get__(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8p2pToken_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_p2pToken); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12vaSpaceToken___get__(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12vaSpaceToken_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self, unsigned int __pyx_v_vaSpaceToken); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8function___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8function_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_function); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimX___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimX_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_gridDimX); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_gridDimY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_gridDimZ); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimX___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimX_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_blockDimX); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_blockDimY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_blockDimZ); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_14sharedMemBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_14sharedMemBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_sharedMemBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7hStream___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7hStream_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12kernelParams___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12kernelParams_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_kernelParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6handle___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6handle_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, PyObject *__pyx_v_handle); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4name___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4name_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2fd___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2fd_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self, int __pyx_v_fd); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5win32___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5win32_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_win32); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_14nvSciBufObject___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_14nvSciBufObject_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self, PyObject *__pyx_v_nvSciBufObject); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4type___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4type_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6handle___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6handle_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_handle); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4size___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4size_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_size); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6offset___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6offset_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_offset); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4size___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4size_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_size); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6offset___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6offset_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_offset); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9arrayDesc___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9arrayDesc_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_arrayDesc); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9numLevels___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9numLevels_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, unsigned int __pyx_v_numLevels); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6handle___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6handle_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, PyObject *__pyx_v_handle); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4name___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4name_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2fd___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2fd_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self, int __pyx_v_fd); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5win32___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5win32_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_win32); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_12nvSciSyncObj___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_12nvSciSyncObj_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self, PyObject *__pyx_v_nvSciSyncObj); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4type___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4type_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6handle___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6handle_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_handle); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5value___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5value_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_value); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5fence___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5fence_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, PyObject *__pyx_v_fence); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3key___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3key_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_key); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5fence___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5fence_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_fence); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9nvSciSync___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9nvSciSync_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_nvSciSync); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10keyedMutex___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10keyedMutex_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_keyedMutex); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6params___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6params_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_params); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5value___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5value_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_value); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5fence___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5fence_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, PyObject *__pyx_v_fence); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3key___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3key_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_key); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9timeoutMs___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9timeoutMs_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, unsigned int __pyx_v_timeoutMs); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5fence___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5fence_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_fence); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9nvSciSync___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9nvSciSync_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_nvSciSync); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10keyedMutex___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10keyedMutex_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_keyedMutex); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6params___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6params_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_params); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_4__dealloc__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11extSemArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11extSemArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11paramsArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11paramsArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10numExtSems___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10numExtSems_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_numExtSems); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_4__dealloc__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11extSemArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11extSemArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11paramsArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11paramsArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10numExtSems___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10numExtSems_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_numExtSems); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6mipmap___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6mipmap_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self, PyObject *__pyx_v_mipmap); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5array___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5array_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self, PyObject *__pyx_v_array); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5level___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5level_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_level); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5layer___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5layer_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_layer); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetX___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetX_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_offsetX); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetY___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetY_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_offsetY); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetZ___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetZ_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_offsetZ); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentWidth___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentWidth_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_extentWidth); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_12extentHeight___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_12extentHeight_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_extentHeight); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentDepth___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentDepth_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_extentDepth); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5layer___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5layer_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self, unsigned int __pyx_v_layer); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6offset___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6offset_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_offset); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4size___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4size_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_size); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11sparseLevel___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11sparseLevel_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_sparseLevel); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7miptail___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7miptail_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_miptail); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9memHandle___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9memHandle_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self, PyObject *__pyx_v_memHandle); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_12resourceType___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_12resourceType_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, PyObject *__pyx_v_resourceType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8resource___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8resource_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_resource); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_15subresourceType___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_15subresourceType_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, PyObject *__pyx_v_subresourceType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_11subresource___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_11subresource_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_subresource); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_16memOperationType___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_16memOperationType_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, PyObject *__pyx_v_memOperationType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_13memHandleType___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_13memHandleType_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, PyObject *__pyx_v_memHandleType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_9memHandle___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_9memHandle_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_memHandle); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_6offset___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_6offset_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_offset); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_13deviceBitMask___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_13deviceBitMask_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, unsigned int __pyx_v_deviceBitMask); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUmemLocation_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUmemLocation_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_16CUmemLocation_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUmemLocation_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUmemLocation_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUmemLocation_st_4type___get__(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUmemLocation_st_4type_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self, PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUmemLocation_st_2id___get__(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_16CUmemLocation_st_2id_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self, int __pyx_v_id); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUmemLocation_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16CUmemLocation_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_15compressionType___get__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_15compressionType_2__set__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, unsigned char __pyx_v_compressionType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_20gpuDirectRDMACapable___get__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_20gpuDirectRDMACapable_2__set__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, unsigned char __pyx_v_gpuDirectRDMACapable); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5usage___get__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5usage_2__set__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, unsigned short __pyx_v_usage); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_4type___get__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_4type_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_20requestedHandleTypes___get__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_20requestedHandleTypes_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, PyObject *__pyx_v_requestedHandleTypes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_8location___get__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_8location_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUmemLocation *__pyx_v_location); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_19win32HandleMetaData___get__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_19win32HandleMetaData_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, PyObject *__pyx_v_win32HandleMetaData); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_10allocFlags___get__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_10allocFlags_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_allocFlags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_8location___get__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_8location_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUmemLocation *__pyx_v_location); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self, PyObject *__pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_9allocType___get__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_9allocType_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, PyObject *__pyx_v_allocType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_11handleTypes___get__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_11handleTypes_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, PyObject *__pyx_v_handleTypes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8location___get__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8location_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUmemLocation *__pyx_v_location); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_23win32SecurityAttributes___get__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_23win32SecurityAttributes_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, PyObject *__pyx_v_win32SecurityAttributes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self, PyObject *__pyx_v_reserved); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4__dealloc__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9poolProps___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9poolProps_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUmemPoolProps *__pyx_v_poolProps); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11accessDescs___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11accessDescs_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_15accessDescCount___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_15accessDescCount_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, size_t __pyx_v_accessDescCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8bytesize___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8bytesize_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, size_t __pyx_v_bytesize); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4dptr___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4dptr_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_dptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pArray___get__(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pArray_2__set__(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self, PyObject *__pyx_v_pArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pPitch___get__(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pPitch_2__set__(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self, PyObject *__pyx_v_pPitch); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_13CUeglFrame_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_5frame___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5frame_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_frame); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_5width___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5width_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, unsigned int __pyx_v_width); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_6height___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_6height_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, unsigned int __pyx_v_height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_5depth___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5depth_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, unsigned int __pyx_v_depth); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_5pitch___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5pitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, unsigned int __pyx_v_pitch); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_10planeCount___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_10planeCount_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, unsigned int __pyx_v_planeCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_11numChannels___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_11numChannels_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, unsigned int __pyx_v_numChannels); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_9frameType___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_9frameType_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, PyObject *__pyx_v_frameType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_14eglColorFormat___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_14eglColorFormat_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, PyObject *__pyx_v_eglColorFormat); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_8cuFormat___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_8cuFormat_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, PyObject *__pyx_v_cuFormat); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_10cuuint32_t___cinit__(struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self, uint32_t __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_10cuuint32_t_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10cuuint32_t_4__repr__(struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10cuuint32_t_6__int__(struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10cuuint32_t_8getPtr(struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10cuuint32_t_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10cuuint32_t_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_10cuuint64_t___cinit__(struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self, uint64_t __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_10cuuint64_t_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10cuuint64_t_4__repr__(struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10cuuint64_t_6__int__(struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10cuuint64_t_8getPtr(struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10cuuint64_t_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10cuuint64_t_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_14CUdeviceptr_v2___cinit__(struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_4__repr__(struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_6__int__(struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_8getPtr(struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_11CUdeviceptr___cinit__(struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_11CUdeviceptr_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUdeviceptr_4__repr__(struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUdeviceptr_6__int__(struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUdeviceptr_8getPtr(struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUdeviceptr_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUdeviceptr_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_11CUdevice_v1___cinit__(struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self, int __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_11CUdevice_v1_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUdevice_v1_4__repr__(struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUdevice_v1_6__int__(struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUdevice_v1_8getPtr(struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUdevice_v1_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUdevice_v1_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_8CUdevice___cinit__(struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self, int __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_8CUdevice_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUdevice_4__repr__(struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUdevice_6__int__(struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUdevice_8getPtr(struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUdevice_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8CUdevice_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_14CUtexObject_v1___cinit__(struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_14CUtexObject_v1_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14CUtexObject_v1_4__repr__(struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14CUtexObject_v1_6__int__(struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14CUtexObject_v1_8getPtr(struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14CUtexObject_v1_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14CUtexObject_v1_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_11CUtexObject___cinit__(struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_11CUtexObject_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUtexObject_4__repr__(struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUtexObject_6__int__(struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUtexObject_8getPtr(struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUtexObject_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_11CUtexObject_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_15CUsurfObject_v1___cinit__(struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_15CUsurfObject_v1_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_15CUsurfObject_v1_4__repr__(struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_15CUsurfObject_v1_6__int__(struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_15CUsurfObject_v1_8getPtr(struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_15CUsurfObject_v1_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_15CUsurfObject_v1_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_12CUsurfObject___cinit__(struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_12CUsurfObject_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUsurfObject_4__repr__(struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUsurfObject_6__int__(struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUsurfObject_8getPtr(struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUsurfObject_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12CUsurfObject_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_4__repr__(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_6__int__(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_8getPtr(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_4__repr__(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_6__int__(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_8getPtr(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_6GLenum___cinit__(struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self, unsigned int __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_6GLenum_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6GLenum_4__repr__(struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6GLenum_6__int__(struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6GLenum_8getPtr(struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6GLenum_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6GLenum_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_6GLuint___cinit__(struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self, unsigned int __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_6GLuint_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6GLuint_4__repr__(struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6GLuint_6__int__(struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6GLuint_8getPtr(struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6GLuint_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6GLuint_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_6EGLint___cinit__(struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self, unsigned int __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_6EGLint_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6EGLint_4__repr__(struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6EGLint_6__int__(struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6EGLint_8getPtr(struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6EGLint_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6EGLint_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_9VdpDevice___cinit__(struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self, uint32_t __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_9VdpDevice_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9VdpDevice_4__repr__(struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9VdpDevice_6__int__(struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9VdpDevice_8getPtr(struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9VdpDevice_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_9VdpDevice_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_17VdpGetProcAddress___cinit__(struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_17VdpGetProcAddress_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17VdpGetProcAddress_4__repr__(struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17VdpGetProcAddress_6__int__(struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17VdpGetProcAddress_8getPtr(struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17VdpGetProcAddress_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_17VdpGetProcAddress_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_15VdpVideoSurface___cinit__(struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self, uint32_t __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_15VdpVideoSurface_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_15VdpVideoSurface_4__repr__(struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_15VdpVideoSurface_6__int__(struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_15VdpVideoSurface_8getPtr(struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_15VdpVideoSurface_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_15VdpVideoSurface_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4cuda_4cuda_16VdpOutputSurface___cinit__(struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self, uint32_t __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr); /* proto */
static void __pyx_pf_4cuda_4cuda_16VdpOutputSurface_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16VdpOutputSurface_4__repr__(struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16VdpOutputSurface_6__int__(struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16VdpOutputSurface_8getPtr(struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16VdpOutputSurface_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16VdpOutputSurface_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_cuGetErrorString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_error); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_2cuGetErrorName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_error); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_4cuInit(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_6cuDriverGetVersion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_8cuDeviceGet(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_ordinal); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_10cuDeviceGetCount(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12cuDeviceGetName(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_length, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14cuDeviceGetUuid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_16cuDeviceGetUuid_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18cuDeviceGetLuid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20cuDeviceTotalMem(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22cuDeviceGetTexture1DLinearMaxWidth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pformat, unsigned int __pyx_v_numChannels, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24cuDeviceGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attrib, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_26cuDeviceGetNvSciSyncAttributes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_nvSciSyncAttrList, PyObject *__pyx_v_dev, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_28cuDeviceSetMemPool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev, PyObject *__pyx_v_pool); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_30cuDeviceGetMemPool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_32cuDeviceGetDefaultMemPool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_34cuFlushGPUDirectRDMAWrites(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_target, PyObject *__pyx_v_scope); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_36cuDeviceGetProperties(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38cuDeviceComputeCapability(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_40cuDevicePrimaryCtxRetain(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_42cuDevicePrimaryCtxRelease(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_44cuDevicePrimaryCtxSetFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_46cuDevicePrimaryCtxGetState(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_48cuDevicePrimaryCtxReset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_50cuDeviceGetExecAffinitySupport(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_typename, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_52cuCtxCreate(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14cuCtxCreate_v3_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_54cuCtxCreate_v3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_paramsArray, int __pyx_v_numParams, unsigned int __pyx_v_flags, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_56cuCtxDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ctx); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_58cuCtxPushCurrent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ctx); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_60cuCtxPopCurrent(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_62cuCtxSetCurrent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ctx); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_64cuCtxGetCurrent(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_66cuCtxGetDevice(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_68cuCtxGetFlags(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_70cuCtxSynchronize(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_72cuCtxSetLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_limit, size_t __pyx_v_value); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_74cuCtxGetLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_limit); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_76cuCtxGetCacheConfig(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_78cuCtxSetCacheConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_80cuCtxGetSharedMemConfig(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_82cuCtxSetSharedMemConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_84cuCtxGetApiVersion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ctx); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_86cuCtxGetStreamPriorityRange(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_88cuCtxResetPersistingL2Cache(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_90cuCtxGetExecAffinity(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_typename); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_92cuCtxAttach(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_94cuCtxDetach(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ctx); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_96cuModuleLoad(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_fname); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_98cuModuleLoadData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_image); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18cuModuleLoadDataEx_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_100cuModuleLoadDataEx(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_image, unsigned int __pyx_v_numOptions, PyObject *__pyx_v_options, PyObject *__pyx_v_optionValues); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_102cuModuleLoadFatBinary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fatCubin); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_104cuModuleUnload(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hmod); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_106cuModuleGetLoadingMode(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_108cuModuleGetFunction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hmod, char *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_110cuModuleGetGlobal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hmod, char *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_112cuModuleGetTexRef(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hmod, char *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_114cuModuleGetSurfRef(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hmod, char *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_12cuLinkCreate_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_116cuLinkCreate(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_numOptions, PyObject *__pyx_v_options, PyObject *__pyx_v_optionValues); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13cuLinkAddData_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_118cuLinkAddData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_state, PyObject *__pyx_v_typename, PyObject *__pyx_v_data, size_t __pyx_v_size, char *__pyx_v_name, unsigned int __pyx_v_numOptions, PyObject *__pyx_v_options, PyObject *__pyx_v_optionValues); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_13cuLinkAddFile_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_120cuLinkAddFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_state, PyObject *__pyx_v_typename, char *__pyx_v_path, unsigned int __pyx_v_numOptions, PyObject *__pyx_v_options, PyObject *__pyx_v_optionValues); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_122cuLinkComplete(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_124cuLinkDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_126cuMemGetInfo(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_128cuMemAlloc(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_bytesize); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_130cuMemAllocPitch(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_WidthInBytes, size_t __pyx_v_Height, unsigned int __pyx_v_ElementSizeBytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_132cuMemFree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_134cuMemGetAddressRange(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_136cuMemAllocHost(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_bytesize); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_138cuMemFreeHost(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_140cuMemHostAlloc(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_142cuMemHostGetDevicePointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_144cuMemHostGetFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_146cuMemAllocManaged(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_bytesize, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_148cuDeviceGetByPCIBusId(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_pciBusId); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_150cuDeviceGetPCIBusId(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_length, PyObject *__pyx_v_dev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_152cuIpcGetEventHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_154cuIpcOpenEventHandle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUipcEventHandle *__pyx_v_handle); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_156cuIpcGetMemHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_158cuIpcOpenMemHandle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUipcMemHandle *__pyx_v_handle, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_160cuIpcCloseMemHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_162cuMemHostRegister(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_164cuMemHostUnregister(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_166cuMemcpy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src, size_t __pyx_v_ByteCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_168cuMemcpyPeer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_dstContext, PyObject *__pyx_v_srcDevice, PyObject *__pyx_v_srcContext, size_t __pyx_v_ByteCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_170cuMemcpyHtoD(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_srcHost, size_t __pyx_v_ByteCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_172cuMemcpyDtoH(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstHost, PyObject *__pyx_v_srcDevice, size_t __pyx_v_ByteCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_174cuMemcpyDtoD(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_srcDevice, size_t __pyx_v_ByteCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_176cuMemcpyDtoA(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstArray, size_t __pyx_v_dstOffset, PyObject *__pyx_v_srcDevice, size_t __pyx_v_ByteCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_178cuMemcpyAtoD(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_180cuMemcpyHtoA(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstArray, size_t __pyx_v_dstOffset, PyObject *__pyx_v_srcHost, size_t __pyx_v_ByteCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_182cuMemcpyAtoH(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstHost, PyObject *__pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_184cuMemcpyAtoA(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstArray, size_t __pyx_v_dstOffset, PyObject *__pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_186cuMemcpy2D(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D *__pyx_v_pCopy); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_188cuMemcpy2DUnaligned(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D *__pyx_v_pCopy); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_190cuMemcpy3D(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_pCopy); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_192cuMemcpy3DPeer(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER *__pyx_v_pCopy); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_194cuMemcpyAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_196cuMemcpyPeerAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_dstContext, PyObject *__pyx_v_srcDevice, PyObject *__pyx_v_srcContext, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_198cuMemcpyHtoDAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_srcHost, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_200cuMemcpyDtoHAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstHost, PyObject *__pyx_v_srcDevice, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_202cuMemcpyDtoDAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_srcDevice, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_204cuMemcpyHtoAAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstArray, size_t __pyx_v_dstOffset, PyObject *__pyx_v_srcHost, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_206cuMemcpyAtoHAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstHost, PyObject *__pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_208cuMemcpy2DAsync(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D *__pyx_v_pCopy, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_210cuMemcpy3DAsync(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_pCopy, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_212cuMemcpy3DPeerAsync(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER *__pyx_v_pCopy, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_214cuMemsetD8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_216cuMemsetD16(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_218cuMemsetD32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_220cuMemsetD2D8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_222cuMemsetD2D16(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_224cuMemsetD2D32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_226cuMemsetD8Async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_228cuMemsetD16Async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_230cuMemsetD32Async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_232cuMemsetD2D8Async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_234cuMemsetD2D16Async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_236cuMemsetD2D32Async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_238cuArrayCreate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR *__pyx_v_pAllocateArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_240cuArrayGetDescriptor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_242cuArrayGetSparseProperties(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_array); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_244cuMipmappedArrayGetSparseProperties(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mipmap); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_246cuArrayGetMemoryRequirements(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_array, PyObject *__pyx_v_device); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_248cuMipmappedArrayGetMemoryRequirements(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mipmap, PyObject *__pyx_v_device); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_250cuArrayGetPlane(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hArray, unsigned int __pyx_v_planeIdx); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_252cuArrayDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_254cuArray3DCreate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_pAllocateArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_256cuArray3DGetDescriptor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_258cuMipmappedArrayCreate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_pMipmappedArrayDesc, unsigned int __pyx_v_numMipmapLevels); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_260cuMipmappedArrayGetLevel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hMipmappedArray, unsigned int __pyx_v_level); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_262cuMipmappedArrayDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hMipmappedArray); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_264cuMemGetHandleForAddressRange(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dptr, size_t __pyx_v_size, PyObject *__pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_266cuMemAddressReserve(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_size, size_t __pyx_v_alignment, PyObject *__pyx_v_addr, unsigned PY_LONG_LONG __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_268cuMemAddressFree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr, size_t __pyx_v_size); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_270cuMemCreate(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_size, struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp *__pyx_v_prop, unsigned PY_LONG_LONG __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_272cuMemRelease(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_handle); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_274cuMemMap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_offset, PyObject *__pyx_v_handle, unsigned PY_LONG_LONG __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18cuMemMapArrayAsync_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_276cuMemMapArrayAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mapInfoList, unsigned int __pyx_v_count, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_278cuMemUnmap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr, size_t __pyx_v_size); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_14cuMemSetAccess_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_280cuMemSetAccess(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr, size_t __pyx_v_size, PyObject *__pyx_v_desc, size_t __pyx_v_count); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_282cuMemGetAccess(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUmemLocation *__pyx_v_location, PyObject *__pyx_v_ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_284cuMemExportToShareableHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_handle, PyObject *__pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_286cuMemImportFromShareableHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_osHandle, PyObject *__pyx_v_shHandleType); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_288cuMemGetAllocationGranularity(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp *__pyx_v_prop, PyObject *__pyx_v_option); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_290cuMemGetAllocationPropertiesFromHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_handle); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_292cuMemRetainAllocationHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_addr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_294cuMemFreeAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dptr, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_296cuMemAllocAsync(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_bytesize, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_298cuMemPoolTrimTo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool, size_t __pyx_v_minBytesToKeep); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_300cuMemPoolSetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool, PyObject *__pyx_v_attr, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_302cuMemPoolGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool, PyObject *__pyx_v_attr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18cuMemPoolSetAccess_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_304cuMemPoolSetAccess(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool, PyObject *__pyx_v_map, size_t __pyx_v_count); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_306cuMemPoolGetAccess(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_memPool, struct __pyx_obj_4cuda_4cuda_CUmemLocation *__pyx_v_location); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_308cuMemPoolCreate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUmemPoolProps *__pyx_v_poolProps); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_310cuMemPoolDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_312cuMemAllocFromPoolAsync(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_bytesize, PyObject *__pyx_v_pool, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_314cuMemPoolExportToShareableHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool, PyObject *__pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_316cuMemPoolImportFromShareableHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_handle, PyObject *__pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_318cuMemPoolExportPointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_320cuMemPoolImportPointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool, struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData *__pyx_v_shareData); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_322cuPointerGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attribute, PyObject *__pyx_v_ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_324cuMemPrefetchAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_devPtr, size_t __pyx_v_count, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_326cuMemAdvise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_devPtr, size_t __pyx_v_count, PyObject *__pyx_v_advice, PyObject *__pyx_v_device); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_328cuMemRangeGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_dataSize, PyObject *__pyx_v_attribute, PyObject *__pyx_v_devPtr, size_t __pyx_v_count); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_23cuMemRangeGetAttributes_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_23cuMemRangeGetAttributes_3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_330cuMemRangeGetAttributes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dataSizes, PyObject *__pyx_v_attributes, size_t __pyx_v_numAttributes, PyObject *__pyx_v_devPtr, size_t __pyx_v_count); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_332cuPointerSetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_attribute, PyObject *__pyx_v_ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22cuPointerGetAttributes_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_334cuPointerGetAttributes(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_numAttributes, PyObject *__pyx_v_attributes, PyObject *__pyx_v_ptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_336cuStreamCreate(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_338cuStreamCreateWithPriority(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags, int __pyx_v_priority); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_340cuStreamGetPriority(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_342cuStreamGetFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_344cuStreamGetCtx(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_346cuStreamWaitEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_hEvent, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_348cuStreamAddCallback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_callback, PyObject *__pyx_v_userData, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_350cuStreamBeginCapture(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_mode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_352cuThreadExchangeStreamCaptureMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_354cuStreamEndCapture(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_356cuStreamIsCapturing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_358cuStreamGetCaptureInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_360cuStreamGetCaptureInfo_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_33cuStreamUpdateCaptureDependencies_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_362cuStreamUpdateCaptureDependencies(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_364cuStreamAttachMemAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_dptr, size_t __pyx_v_length, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_366cuStreamQuery(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_368cuStreamSynchronize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_370cuStreamDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_372cuStreamCopyAttributes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_374cuStreamGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_attr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_376cuStreamSetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_attr, struct __pyx_obj_4cuda_4cuda_CUstreamAttrValue *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_378cuEventCreate(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_380cuEventRecord(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hEvent, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_382cuEventRecordWithFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hEvent, PyObject *__pyx_v_hStream, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_384cuEventQuery(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hEvent); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_386cuEventSynchronize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hEvent); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_388cuEventDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hEvent); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_390cuEventElapsedTime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStart, PyObject *__pyx_v_hEnd); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_392cuImportExternalMemory(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC *__pyx_v_memHandleDesc); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_394cuExternalMemoryGetMappedBuffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extMem, struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC *__pyx_v_bufferDesc); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_396cuExternalMemoryGetMappedMipmappedArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extMem, struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC *__pyx_v_mipmapDesc); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_398cuDestroyExternalMemory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extMem); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_400cuImportExternalSemaphore(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC *__pyx_v_semHandleDesc); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_402cuSignalExternalSemaphoresAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extSemArray, PyObject *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_404cuWaitExternalSemaphoresAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extSemArray, PyObject *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_406cuDestroyExternalSemaphore(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extSem); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_408cuStreamWaitValue32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_410cuStreamWaitValue64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_412cuStreamWriteValue32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_414cuStreamWriteValue64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18cuStreamBatchMemOp_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_416cuStreamBatchMemOp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, unsigned int __pyx_v_count, PyObject *__pyx_v_paramArray, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_418cuStreamWaitValue32_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_420cuStreamWaitValue64_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_422cuStreamWriteValue32_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_424cuStreamWriteValue64_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21cuStreamBatchMemOp_v2_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_426cuStreamBatchMemOp_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, unsigned int __pyx_v_count, PyObject *__pyx_v_paramArray, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_428cuFuncGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attrib, PyObject *__pyx_v_hfunc); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_430cuFuncSetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, PyObject *__pyx_v_attrib, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_432cuFuncSetCacheConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, PyObject *__pyx_v_config); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_434cuFuncSetSharedMemConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, PyObject *__pyx_v_config); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_436cuFuncGetModule(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_438cuLaunchKernel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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, PyObject *__pyx_v_hStream, PyObject *__pyx_v_kernelParams, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_extra); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_440cuLaunchKernelEx(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUlaunchConfig *__pyx_v_config, PyObject *__pyx_v_f, PyObject *__pyx_v_kernelParams, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_extra); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_442cuLaunchCooperativeKernel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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, PyObject *__pyx_v_hStream, PyObject *__pyx_v_kernelParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_36cuLaunchCooperativeKernelMultiDevice_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_444cuLaunchCooperativeKernelMultiDevice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_launchParamsList, unsigned int __pyx_v_numDevices, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_446cuLaunchHostFunc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_fn, PyObject *__pyx_v_userData); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_448cuFuncSetBlockShape(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_450cuFuncSetSharedSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, unsigned int __pyx_v_numbytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_452cuParamSetSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, unsigned int __pyx_v_numbytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_454cuParamSeti(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, int __pyx_v_offset, unsigned int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_456cuParamSetf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, int __pyx_v_offset, float __pyx_v_value); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_458cuParamSetv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, int __pyx_v_offset, PyObject *__pyx_v_ptr, unsigned int __pyx_v_numbytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_460cuLaunch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_462cuLaunchGrid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_464cuLaunchGridAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_466cuParamSetTexRef(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, int __pyx_v_texunit, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_468cuGraphCreate(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20cuGraphAddKernelNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_470cuGraphAddKernelNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_472cuGraphKernelNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_474cuGraphKernelNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20cuGraphAddMemcpyNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_476cuGraphAddMemcpyNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_copyParams, PyObject *__pyx_v_ctx); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_478cuGraphMemcpyNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_480cuGraphMemcpyNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_20cuGraphAddMemsetNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_482cuGraphAddMemsetNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *__pyx_v_memsetParams, PyObject *__pyx_v_ctx); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_484cuGraphMemsetNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_486cuGraphMemsetNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_18cuGraphAddHostNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_488cuGraphAddHostNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_490cuGraphHostNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_492cuGraphHostNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24cuGraphAddChildGraphNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_494cuGraphAddChildGraphNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, PyObject *__pyx_v_childGraph); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_496cuGraphChildGraphNodeGetGraph(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_19cuGraphAddEmptyNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_498cuGraphAddEmptyNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_25cuGraphAddEventRecordNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_500cuGraphAddEventRecordNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, PyObject *__pyx_v_event); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_502cuGraphEventRecordNodeGetEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_504cuGraphEventRecordNodeSetEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, PyObject *__pyx_v_event); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_23cuGraphAddEventWaitNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_506cuGraphAddEventWaitNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, PyObject *__pyx_v_event); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_508cuGraphEventWaitNodeGetEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_510cuGraphEventWaitNodeSetEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, PyObject *__pyx_v_event); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_38cuGraphAddExternalSemaphoresSignalNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_512cuGraphAddExternalSemaphoresSignalNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_514cuGraphExternalSemaphoresSignalNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_516cuGraphExternalSemaphoresSignalNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_36cuGraphAddExternalSemaphoresWaitNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_518cuGraphAddExternalSemaphoresWaitNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_520cuGraphExternalSemaphoresWaitNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_522cuGraphExternalSemaphoresWaitNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_24cuGraphAddBatchMemOpNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_524cuGraphAddBatchMemOpNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_526cuGraphBatchMemOpNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_528cuGraphBatchMemOpNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_530cuGraphExecBatchMemOpNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22cuGraphAddMemAllocNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_532cuGraphAddMemAllocNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_534cuGraphMemAllocNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_21cuGraphAddMemFreeNode_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_536cuGraphAddMemFreeNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, PyObject *__pyx_v_dptr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_538cuGraphMemFreeNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_540cuDeviceGraphMemTrim(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_device); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_542cuDeviceGetGraphMemAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_device, PyObject *__pyx_v_attr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_544cuDeviceSetGraphMemAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_device, PyObject *__pyx_v_attr, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_546cuGraphClone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_originalGraph); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_548cuGraphNodeFindInClone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hOriginalNode, PyObject *__pyx_v_hClonedGraph); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_550cuGraphNodeGetType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_552cuGraphGetNodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, size_t __pyx_v_numNodes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_554cuGraphGetRootNodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, size_t __pyx_v_numRootNodes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_556cuGraphGetEdges(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, size_t __pyx_v_numEdges); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_558cuGraphNodeGetDependencies(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, size_t __pyx_v_numDependencies); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_560cuGraphNodeGetDependentNodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, size_t __pyx_v_numDependentNodes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22cuGraphAddDependencies_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_22cuGraphAddDependencies_3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_562cuGraphAddDependencies(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_from_, PyObject *__pyx_v_to, size_t __pyx_v_numDependencies); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_25cuGraphRemoveDependencies_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_25cuGraphRemoveDependencies_3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_564cuGraphRemoveDependencies(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_from_, PyObject *__pyx_v_to, size_t __pyx_v_numDependencies); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_566cuGraphDestroyNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_568cuGraphInstantiate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, char *__pyx_v_logBuffer, size_t __pyx_v_bufferSize); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_570cuGraphInstantiateWithFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, unsigned PY_LONG_LONG __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_572cuGraphExecKernelNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_574cuGraphExecMemcpyNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_copyParams, PyObject *__pyx_v_ctx); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_576cuGraphExecMemsetNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *__pyx_v_memsetParams, PyObject *__pyx_v_ctx); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_578cuGraphExecHostNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_580cuGraphExecChildGraphNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, PyObject *__pyx_v_childGraph); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_582cuGraphExecEventRecordNodeSetEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, PyObject *__pyx_v_event); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_584cuGraphExecEventWaitNodeSetEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, PyObject *__pyx_v_event); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_586cuGraphExecExternalSemaphoresSignalNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_588cuGraphExecExternalSemaphoresWaitNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_nodeParams); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_590cuGraphNodeSetEnabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, unsigned int __pyx_v_isEnabled); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_592cuGraphNodeGetEnabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_594cuGraphUpload(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_596cuGraphLaunch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_598cuGraphExecDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_600cuGraphDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_602cuGraphExecUpdate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hGraph); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_604cuGraphKernelNodeCopyAttributes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_606cuGraphKernelNodeGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, PyObject *__pyx_v_attr); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_608cuGraphKernelNodeSetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, PyObject *__pyx_v_attr, struct __pyx_obj_4cuda_4cuda_CUkernelNodeAttrValue *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_610cuGraphDebugDotPrint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, char *__pyx_v_path, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_612cuUserObjectCreate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr, PyObject *__pyx_v_destroy, unsigned int __pyx_v_initialRefcount, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_614cuUserObjectRetain(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_object, unsigned int __pyx_v_count); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_616cuUserObjectRelease(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_object, unsigned int __pyx_v_count); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_618cuGraphRetainUserObject(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_graph, PyObject *__pyx_v_object, unsigned int __pyx_v_count, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_620cuGraphReleaseUserObject(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_graph, PyObject *__pyx_v_object, unsigned int __pyx_v_count); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_622cuOccupancyMaxActiveBlocksPerMultiprocessor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_624cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_626cuOccupancyMaxPotentialBlockSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, PyObject *__pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_628cuOccupancyMaxPotentialBlockSizeWithFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, PyObject *__pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_630cuOccupancyAvailableDynamicSMemPerBlock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, int __pyx_v_numBlocks, int __pyx_v_blockSize); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_632cuOccupancyMaxPotentialClusterSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, struct __pyx_obj_4cuda_4cuda_CUlaunchConfig *__pyx_v_config); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_634cuOccupancyMaxActiveClusters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, struct __pyx_obj_4cuda_4cuda_CUlaunchConfig *__pyx_v_config); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_636cuTexRefSetArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, PyObject *__pyx_v_hArray, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_638cuTexRefSetMipmappedArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, PyObject *__pyx_v_hMipmappedArray, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_640cuTexRefSetAddress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, PyObject *__pyx_v_dptr, size_t __pyx_v_numbytes); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_642cuTexRefSetAddress2D(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR *__pyx_v_desc, PyObject *__pyx_v_dptr, size_t __pyx_v_Pitch); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_644cuTexRefSetFormat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, PyObject *__pyx_v_fmt, int __pyx_v_NumPackedComponents); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_646cuTexRefSetAddressMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, int __pyx_v_dim, PyObject *__pyx_v_am); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_648cuTexRefSetFilterMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, PyObject *__pyx_v_fm); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_650cuTexRefSetMipmapFilterMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, PyObject *__pyx_v_fm); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_652cuTexRefSetMipmapLevelBias(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, float __pyx_v_bias); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_654cuTexRefSetMipmapLevelClamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, float __pyx_v_minMipmapLevelClamp, float __pyx_v_maxMipmapLevelClamp); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_656cuTexRefSetMaxAnisotropy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, unsigned int __pyx_v_maxAniso); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_658cuTexRefSetBorderColor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, float __pyx_v_pBorderColor); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_660cuTexRefSetFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_662cuTexRefGetAddress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_664cuTexRefGetArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_666cuTexRefGetMipmappedArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_668cuTexRefGetAddressMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, int __pyx_v_dim); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_670cuTexRefGetFilterMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_672cuTexRefGetFormat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_674cuTexRefGetMipmapFilterMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_676cuTexRefGetMipmapLevelBias(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_678cuTexRefGetMipmapLevelClamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_680cuTexRefGetMaxAnisotropy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_682cuTexRefGetBorderColor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_684cuTexRefGetFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_686cuTexRefCreate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_688cuTexRefDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_690cuSurfRefSetArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hSurfRef, PyObject *__pyx_v_hArray, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_692cuSurfRefGetArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hSurfRef); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_694cuTexObjectCreate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC *__pyx_v_pResDesc, struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC *__pyx_v_pTexDesc, struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC *__pyx_v_pResViewDesc); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_696cuTexObjectDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_texObject); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_698cuTexObjectGetResourceDesc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_texObject); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_700cuTexObjectGetTextureDesc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_texObject); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_702cuTexObjectGetResourceViewDesc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_texObject); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_704cuSurfObjectCreate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC *__pyx_v_pResDesc); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_706cuSurfObjectDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_surfObject); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_708cuSurfObjectGetResourceDesc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_surfObject); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_710cuDeviceCanAccessPeer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev, PyObject *__pyx_v_peerDev); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_712cuCtxEnablePeerAccess(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_peerContext, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_714cuCtxDisablePeerAccess(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_peerContext); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_716cuDeviceGetP2PAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attrib, PyObject *__pyx_v_srcDevice, PyObject *__pyx_v_dstDevice); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_718cuGraphicsUnregisterResource(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_resource); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_720cuGraphicsSubResourceGetMappedArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_resource, unsigned int __pyx_v_arrayIndex, unsigned int __pyx_v_mipLevel); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_722cuGraphicsResourceGetMappedMipmappedArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_resource); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_724cuGraphicsResourceGetMappedPointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_resource); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_726cuGraphicsResourceSetMapFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_resource, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_728cuGraphicsMapResources(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_count, PyObject *__pyx_v_resources, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_730cuGraphicsUnmapResources(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_count, PyObject *__pyx_v_resources, PyObject *__pyx_v_hStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_732cuGetProcAddress(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_symbol, int __pyx_v_cudaVersion, PyObject *__pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_734cuGetExportTable(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUuuid *__pyx_v_pExportTableId); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_736cuProfilerInitialize(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_configFile, char *__pyx_v_outputFile, PyObject *__pyx_v_outputMode); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_738cuProfilerStart(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_740cuProfilerStop(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_742cuVDPAUGetDevice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vdpDevice, PyObject *__pyx_v_vdpGetProcAddress); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_744cuVDPAUCtxCreate(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags, PyObject *__pyx_v_device, PyObject *__pyx_v_vdpDevice, PyObject *__pyx_v_vdpGetProcAddress); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_746cuGraphicsVDPAURegisterVideoSurface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vdpSurface, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_748cuGraphicsVDPAURegisterOutputSurface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vdpSurface, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_750cuGraphicsEGLRegisterImage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_image, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_752cuEGLStreamConsumerConnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_754cuEGLStreamConsumerConnectWithFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_756cuEGLStreamConsumerDisconnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_758cuEGLStreamConsumerAcquireFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn, PyObject *__pyx_v_pCudaResource, PyObject *__pyx_v_pStream, unsigned int __pyx_v_timeout); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_760cuEGLStreamConsumerReleaseFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn, PyObject *__pyx_v_pCudaResource, PyObject *__pyx_v_pStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_762cuEGLStreamProducerConnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_width, PyObject *__pyx_v_height); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_764cuEGLStreamProducerDisconnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_766cuEGLStreamProducerPresentFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn, struct __pyx_obj_4cuda_4cuda_CUeglFrame *__pyx_v_eglframe, PyObject *__pyx_v_pStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_768cuEGLStreamProducerReturnFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn, struct __pyx_obj_4cuda_4cuda_CUeglFrame *__pyx_v_eglframe, PyObject *__pyx_v_pStream); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_770cuGraphicsResourceGetMappedEglFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_resource, unsigned int __pyx_v_index, unsigned int __pyx_v_mipLevel); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_772cuEventCreateFromEGLSync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_eglSync, unsigned int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_774cuGraphicsGLRegisterBuffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_buffer, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_776cuGraphicsGLRegisterImage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_image, PyObject *__pyx_v_target, unsigned int __pyx_v_Flags); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_778cuGLGetDevices(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_cudaDeviceCount, PyObject *__pyx_v_deviceList); /* proto */
static PyObject *__pyx_pf_4cuda_4cuda_780sizeof(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objType); /* proto */
static PyObject *__pyx_tp_new_4cuda_4cuda_CUcontext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmodule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUfunction(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUarray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmipmappedArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUtexref(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUsurfref(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUevent(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUstream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUgraphicsResource(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUexternalMemory(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUexternalSemaphore(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUgraph(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUgraphNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUgraphExec(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemoryPool(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUuserObject(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUlinkState(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_EGLImageKHR(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_EGLStreamKHR(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_EGLSyncKHR(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUeglStreamConnection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUhostFn(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamCallback(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUoccupancyB2DSize(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUuuid_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUipcEventHandle_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUipcMemHandle_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamMemOpWaitValueParams_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamMemOpWriteValueParams_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamBatchMemOpParams_union(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUdevprop_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUaccessPolicyWindow_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUlaunchAttributeValue_union(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUlaunchAttribute_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUlaunchConfig_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUexecAffinitySmCount_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUexecAffinityParam_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY2D_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_TEXTURE_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUarrayMapInfo_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemLocation_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemAllocationProp_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemAccessDesc_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemPoolProps_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemPoolPtrExportData_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUeglFrame_st(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUuuid(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUipcEventHandle_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUipcEventHandle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUipcMemHandle_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUipcMemHandle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamBatchMemOpParams_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamBatchMemOpParams(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUdevprop_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUdevprop(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUaccessPolicyWindow_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUaccessPolicyWindow(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_HOST_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUlaunchAttributeValue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUlaunchAttribute(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUlaunchConfig(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUkernelNodeAttrValue_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUkernelNodeAttrValue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamAttrValue_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamAttrValue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUexecAffinitySmCount_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUexecAffinitySmCount(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUexecAffinityParam_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUexecAffinityParam(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY2D_v2(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY2D(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_v2(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_PEER(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_DESC(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_TEXTURE_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_TEXTURE_DESC(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_LAUNCH_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUarrayMapInfo_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUarrayMapInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemLocation_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemLocation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemAllocationProp_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemAllocationProp(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemAccessDesc_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemAccessDesc(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemPoolProps_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemPoolProps(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemPoolPtrExportData_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemPoolPtrExportData(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUeglFrame_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUeglFrame(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_cuuint32_t(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_cuuint64_t(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUdeviceptr_v2(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUdeviceptr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUdevice_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUdevice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUtexObject_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUtexObject(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUsurfObject_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUsurfObject(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemGenericAllocationHandle_v1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemGenericAllocationHandle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_GLenum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_GLuint(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_EGLint(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_VdpDevice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_VdpGetProcAddress(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_VdpVideoSurface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda_VdpOutputSurface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_9_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_11_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_13_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_15_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_17_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_18_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_20_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_22_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_24_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_25_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_27_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_28_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_30_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_32_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_34_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_36_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_38_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_40_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_42_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_44_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_46_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_48_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_50_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_52_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_54_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_56_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_58_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_60_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_62_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_63_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_65_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_66_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_127;
static PyObject *__pyx_int_256;
static PyObject *__pyx_int_neg_129;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_codeobj__2;
static PyObject *__pyx_codeobj__3;
static PyObject *__pyx_codeobj__5;
static PyObject *__pyx_codeobj__7;
static PyObject *__pyx_codeobj__8;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__121;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__146;
static PyObject *__pyx_tuple__148;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__156;
static PyObject *__pyx_tuple__158;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__168;
static PyObject *__pyx_tuple__170;
static PyObject *__pyx_tuple__173;
static PyObject *__pyx_tuple__175;
static PyObject *__pyx_tuple__178;
static PyObject *__pyx_tuple__180;
static PyObject *__pyx_tuple__183;
static PyObject *__pyx_tuple__185;
static PyObject *__pyx_tuple__188;
static PyObject *__pyx_tuple__190;
static PyObject *__pyx_tuple__193;
static PyObject *__pyx_tuple__195;
static PyObject *__pyx_tuple__198;
static PyObject *__pyx_tuple__200;
static PyObject *__pyx_tuple__203;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__208;
static PyObject *__pyx_tuple__210;
static PyObject *__pyx_tuple__213;
static PyObject *__pyx_tuple__215;
static PyObject *__pyx_tuple__218;
static PyObject *__pyx_tuple__220;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__225;
static PyObject *__pyx_tuple__228;
static PyObject *__pyx_tuple__230;
static PyObject *__pyx_tuple__233;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__238;
static PyObject *__pyx_tuple__240;
static PyObject *__pyx_tuple__243;
static PyObject *__pyx_tuple__245;
static PyObject *__pyx_tuple__248;
static PyObject *__pyx_tuple__250;
static PyObject *__pyx_tuple__253;
static PyObject *__pyx_tuple__255;
static PyObject *__pyx_tuple__258;
static PyObject *__pyx_tuple__260;
static PyObject *__pyx_tuple__263;
static PyObject *__pyx_tuple__265;
static PyObject *__pyx_tuple__268;
static PyObject *__pyx_tuple__270;
static PyObject *__pyx_tuple__273;
static PyObject *__pyx_tuple__275;
static PyObject *__pyx_tuple__278;
static PyObject *__pyx_tuple__280;
static PyObject *__pyx_tuple__283;
static PyObject *__pyx_tuple__285;
static PyObject *__pyx_tuple__288;
static PyObject *__pyx_tuple__290;
static PyObject *__pyx_tuple__293;
static PyObject *__pyx_tuple__295;
static PyObject *__pyx_tuple__298;
static PyObject *__pyx_tuple__300;
static PyObject *__pyx_tuple__303;
static PyObject *__pyx_tuple__305;
static PyObject *__pyx_tuple__308;
static PyObject *__pyx_tuple__310;
static PyObject *__pyx_tuple__313;
static PyObject *__pyx_tuple__315;
static PyObject *__pyx_tuple__318;
static PyObject *__pyx_tuple__320;
static PyObject *__pyx_tuple__323;
static PyObject *__pyx_tuple__325;
static PyObject *__pyx_tuple__328;
static PyObject *__pyx_tuple__330;
static PyObject *__pyx_tuple__333;
static PyObject *__pyx_tuple__335;
static PyObject *__pyx_tuple__338;
static PyObject *__pyx_tuple__340;
static PyObject *__pyx_tuple__343;
static PyObject *__pyx_tuple__345;
static PyObject *__pyx_tuple__348;
static PyObject *__pyx_tuple__350;
static PyObject *__pyx_tuple__353;
static PyObject *__pyx_tuple__355;
static PyObject *__pyx_tuple__358;
static PyObject *__pyx_tuple__360;
static PyObject *__pyx_tuple__363;
static PyObject *__pyx_tuple__365;
static PyObject *__pyx_tuple__368;
static PyObject *__pyx_tuple__370;
static PyObject *__pyx_tuple__373;
static PyObject *__pyx_tuple__375;
static PyObject *__pyx_tuple__378;
static PyObject *__pyx_tuple__380;
static PyObject *__pyx_tuple__383;
static PyObject *__pyx_tuple__385;
static PyObject *__pyx_tuple__388;
static PyObject *__pyx_tuple__390;
static PyObject *__pyx_tuple__393;
static PyObject *__pyx_tuple__395;
static PyObject *__pyx_tuple__398;
static PyObject *__pyx_tuple__400;
static PyObject *__pyx_tuple__403;
static PyObject *__pyx_tuple__405;
static PyObject *__pyx_tuple__408;
static PyObject *__pyx_tuple__410;
static PyObject *__pyx_tuple__413;
static PyObject *__pyx_tuple__415;
static PyObject *__pyx_tuple__418;
static PyObject *__pyx_tuple__420;
static PyObject *__pyx_tuple__423;
static PyObject *__pyx_tuple__425;
static PyObject *__pyx_tuple__428;
static PyObject *__pyx_tuple__430;
static PyObject *__pyx_tuple__433;
static PyObject *__pyx_tuple__435;
static PyObject *__pyx_tuple__438;
static PyObject *__pyx_tuple__440;
static PyObject *__pyx_tuple__443;
static PyObject *__pyx_tuple__445;
static PyObject *__pyx_tuple__448;
static PyObject *__pyx_tuple__450;
static PyObject *__pyx_tuple__453;
static PyObject *__pyx_tuple__455;
static PyObject *__pyx_tuple__458;
static PyObject *__pyx_tuple__460;
static PyObject *__pyx_tuple__463;
static PyObject *__pyx_tuple__465;
static PyObject *__pyx_tuple__468;
static PyObject *__pyx_tuple__470;
static PyObject *__pyx_tuple__473;
static PyObject *__pyx_tuple__475;
static PyObject *__pyx_tuple__478;
static PyObject *__pyx_tuple__480;
static PyObject *__pyx_tuple__483;
static PyObject *__pyx_tuple__485;
static PyObject *__pyx_tuple__488;
static PyObject *__pyx_tuple__490;
static PyObject *__pyx_tuple__493;
static PyObject *__pyx_tuple__495;
static PyObject *__pyx_tuple__498;
static PyObject *__pyx_tuple__500;
static PyObject *__pyx_tuple__503;
static PyObject *__pyx_tuple__505;
static PyObject *__pyx_tuple__508;
static PyObject *__pyx_tuple__510;
static PyObject *__pyx_tuple__513;
static PyObject *__pyx_tuple__515;
static PyObject *__pyx_tuple__518;
static PyObject *__pyx_tuple__520;
static PyObject *__pyx_tuple__523;
static PyObject *__pyx_tuple__525;
static PyObject *__pyx_tuple__528;
static PyObject *__pyx_tuple__530;
static PyObject *__pyx_tuple__533;
static PyObject *__pyx_tuple__535;
static PyObject *__pyx_tuple__538;
static PyObject *__pyx_tuple__540;
static PyObject *__pyx_tuple__543;
static PyObject *__pyx_tuple__545;
static PyObject *__pyx_tuple__548;
static PyObject *__pyx_tuple__550;
static PyObject *__pyx_tuple__553;
static PyObject *__pyx_tuple__555;
static PyObject *__pyx_tuple__558;
static PyObject *__pyx_tuple__560;
static PyObject *__pyx_tuple__563;
static PyObject *__pyx_tuple__565;
static PyObject *__pyx_tuple__568;
static PyObject *__pyx_tuple__570;
static PyObject *__pyx_tuple__573;
static PyObject *__pyx_tuple__575;
static PyObject *__pyx_tuple__578;
static PyObject *__pyx_tuple__580;
static PyObject *__pyx_tuple__583;
static PyObject *__pyx_tuple__585;
static PyObject *__pyx_tuple__588;
static PyObject *__pyx_tuple__590;
static PyObject *__pyx_tuple__593;
static PyObject *__pyx_tuple__595;
static PyObject *__pyx_tuple__598;
static PyObject *__pyx_tuple__600;
static PyObject *__pyx_tuple__603;
static PyObject *__pyx_tuple__605;
static PyObject *__pyx_tuple__635;
static PyObject *__pyx_tuple__659;
static PyObject *__pyx_tuple__749;
static PyObject *__pyx_tuple__752;
static PyObject *__pyx_tuple__765;
static PyObject *__pyx_tuple__779;
static PyObject *__pyx_tuple__780;
static PyObject *__pyx_tuple__783;
static PyObject *__pyx_tuple__798;
static PyObject *__pyx_tuple__819;
static PyObject *__pyx_tuple__820;
static PyObject *__pyx_tuple__822;
static PyObject *__pyx_tuple__829;
static PyObject *__pyx_tuple__844;
static PyObject *__pyx_tuple__904;
static PyObject *__pyx_tuple__905;
static PyObject *__pyx_codeobj__10;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__13;
static PyObject *__pyx_codeobj__15;
static PyObject *__pyx_codeobj__17;
static PyObject *__pyx_codeobj__18;
static PyObject *__pyx_codeobj__20;
static PyObject *__pyx_codeobj__22;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__27;
static PyObject *__pyx_codeobj__28;
static PyObject *__pyx_codeobj__30;
static PyObject *__pyx_codeobj__32;
static PyObject *__pyx_codeobj__33;
static PyObject *__pyx_codeobj__35;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__38;
static PyObject *__pyx_codeobj__40;
static PyObject *__pyx_codeobj__42;
static PyObject *__pyx_codeobj__43;
static PyObject *__pyx_codeobj__45;
static PyObject *__pyx_codeobj__47;
static PyObject *__pyx_codeobj__48;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__52;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__55;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__58;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__62;
static PyObject *__pyx_codeobj__63;
static PyObject *__pyx_codeobj__65;
static PyObject *__pyx_codeobj__67;
static PyObject *__pyx_codeobj__68;
static PyObject *__pyx_codeobj__70;
static PyObject *__pyx_codeobj__72;
static PyObject *__pyx_codeobj__73;
static PyObject *__pyx_codeobj__75;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__78;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__88;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__92;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__95;
static PyObject *__pyx_codeobj__97;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_tuple__1016;
static PyObject *__pyx_tuple__1017;
static PyObject *__pyx_tuple__1018;
static PyObject *__pyx_tuple__1019;
static PyObject *__pyx_tuple__1020;
static PyObject *__pyx_tuple__1021;
static PyObject *__pyx_tuple__1022;
static PyObject *__pyx_tuple__1023;
static PyObject *__pyx_tuple__1024;
static PyObject *__pyx_tuple__1025;
static PyObject *__pyx_tuple__1026;
static PyObject *__pyx_tuple__1027;
static PyObject *__pyx_tuple__1028;
static PyObject *__pyx_tuple__1029;
static PyObject *__pyx_tuple__1030;
static PyObject *__pyx_tuple__1031;
static PyObject *__pyx_tuple__1032;
static PyObject *__pyx_tuple__1033;
static PyObject *__pyx_tuple__1034;
static PyObject *__pyx_tuple__1035;
static PyObject *__pyx_tuple__1036;
static PyObject *__pyx_tuple__1037;
static PyObject *__pyx_tuple__1038;
static PyObject *__pyx_tuple__1039;
static PyObject *__pyx_tuple__1040;
static PyObject *__pyx_tuple__1041;
static PyObject *__pyx_tuple__1042;
static PyObject *__pyx_tuple__1043;
static PyObject *__pyx_tuple__1044;
static PyObject *__pyx_tuple__1045;
static PyObject *__pyx_tuple__1046;
static PyObject *__pyx_tuple__1047;
static PyObject *__pyx_tuple__1048;
static PyObject *__pyx_tuple__1049;
static PyObject *__pyx_tuple__1050;
static PyObject *__pyx_tuple__1051;
static PyObject *__pyx_tuple__1052;
static PyObject *__pyx_tuple__1053;
static PyObject *__pyx_tuple__1054;
static PyObject *__pyx_tuple__1055;
static PyObject *__pyx_tuple__1056;
static PyObject *__pyx_tuple__1057;
static PyObject *__pyx_tuple__1058;
static PyObject *__pyx_tuple__1059;
static PyObject *__pyx_tuple__1060;
static PyObject *__pyx_tuple__1061;
static PyObject *__pyx_tuple__1062;
static PyObject *__pyx_tuple__1063;
static PyObject *__pyx_tuple__1064;
static PyObject *__pyx_tuple__1065;
static PyObject *__pyx_tuple__1066;
static PyObject *__pyx_tuple__1067;
static PyObject *__pyx_tuple__1068;
static PyObject *__pyx_tuple__1069;
static PyObject *__pyx_tuple__1070;
static PyObject *__pyx_tuple__1071;
static PyObject *__pyx_tuple__1072;
static PyObject *__pyx_tuple__1073;
static PyObject *__pyx_tuple__1074;
static PyObject *__pyx_tuple__1075;
static PyObject *__pyx_tuple__1076;
static PyObject *__pyx_tuple__1077;
static PyObject *__pyx_tuple__1078;
static PyObject *__pyx_tuple__1079;
static PyObject *__pyx_tuple__1080;
static PyObject *__pyx_tuple__1081;
static PyObject *__pyx_tuple__1082;
static PyObject *__pyx_tuple__1083;
static PyObject *__pyx_tuple__1084;
static PyObject *__pyx_tuple__1085;
static PyObject *__pyx_tuple__1086;
static PyObject *__pyx_tuple__1087;
static PyObject *__pyx_tuple__1088;
static PyObject *__pyx_tuple__1089;
static PyObject *__pyx_tuple__1090;
static PyObject *__pyx_tuple__1091;
static PyObject *__pyx_tuple__1092;
static PyObject *__pyx_tuple__1093;
static PyObject *__pyx_tuple__1094;
static PyObject *__pyx_tuple__1095;
static PyObject *__pyx_tuple__1096;
static PyObject *__pyx_tuple__1097;
static PyObject *__pyx_tuple__1098;
static PyObject *__pyx_tuple__1099;
static PyObject *__pyx_tuple__1100;
static PyObject *__pyx_tuple__1101;
static PyObject *__pyx_tuple__1102;
static PyObject *__pyx_tuple__1103;
static PyObject *__pyx_tuple__1104;
static PyObject *__pyx_tuple__1105;
static PyObject *__pyx_tuple__1106;
static PyObject *__pyx_tuple__1107;
static PyObject *__pyx_tuple__1108;
static PyObject *__pyx_tuple__1109;
static PyObject *__pyx_tuple__1110;
static PyObject *__pyx_tuple__1111;
static PyObject *__pyx_tuple__1112;
static PyObject *__pyx_tuple__1113;
static PyObject *__pyx_tuple__1114;
static PyObject *__pyx_tuple__1115;
static PyObject *__pyx_tuple__1116;
static PyObject *__pyx_tuple__1117;
static PyObject *__pyx_tuple__1118;
static PyObject *__pyx_tuple__1119;
static PyObject *__pyx_tuple__1120;
static PyObject *__pyx_tuple__1121;
static PyObject *__pyx_tuple__1122;
static PyObject *__pyx_tuple__1123;
static PyObject *__pyx_tuple__1124;
static PyObject *__pyx_tuple__1125;
static PyObject *__pyx_tuple__1126;
static PyObject *__pyx_tuple__1127;
static PyObject *__pyx_tuple__1128;
static PyObject *__pyx_tuple__1129;
static PyObject *__pyx_tuple__1130;
static PyObject *__pyx_tuple__1131;
static PyObject *__pyx_tuple__1132;
static PyObject *__pyx_tuple__1133;
static PyObject *__pyx_tuple__1134;
static PyObject *__pyx_tuple__1135;
static PyObject *__pyx_tuple__1136;
static PyObject *__pyx_tuple__1137;
static PyObject *__pyx_tuple__1138;
static PyObject *__pyx_tuple__1139;
static PyObject *__pyx_tuple__1140;
static PyObject *__pyx_tuple__1141;
static PyObject *__pyx_tuple__1142;
static PyObject *__pyx_tuple__1143;
static PyObject *__pyx_tuple__1144;
static PyObject *__pyx_tuple__1145;
static PyObject *__pyx_tuple__1146;
static PyObject *__pyx_tuple__1147;
static PyObject *__pyx_tuple__1148;
static PyObject *__pyx_tuple__1149;
static PyObject *__pyx_tuple__1150;
static PyObject *__pyx_tuple__1151;
static PyObject *__pyx_tuple__1152;
static PyObject *__pyx_tuple__1153;
static PyObject *__pyx_tuple__1154;
static PyObject *__pyx_tuple__1155;
static PyObject *__pyx_tuple__1156;
static PyObject *__pyx_tuple__1157;
static PyObject *__pyx_tuple__1158;
static PyObject *__pyx_tuple__1159;
static PyObject *__pyx_tuple__1160;
static PyObject *__pyx_tuple__1161;
static PyObject *__pyx_tuple__1162;
static PyObject *__pyx_tuple__1163;
static PyObject *__pyx_tuple__1164;
static PyObject *__pyx_tuple__1165;
static PyObject *__pyx_tuple__1166;
static PyObject *__pyx_tuple__1167;
static PyObject *__pyx_tuple__1168;
static PyObject *__pyx_tuple__1169;
static PyObject *__pyx_tuple__1170;
static PyObject *__pyx_tuple__1171;
static PyObject *__pyx_tuple__1172;
static PyObject *__pyx_tuple__1173;
static PyObject *__pyx_tuple__1174;
static PyObject *__pyx_tuple__1175;
static PyObject *__pyx_tuple__1176;
static PyObject *__pyx_tuple__1177;
static PyObject *__pyx_tuple__1178;
static PyObject *__pyx_tuple__1179;
static PyObject *__pyx_tuple__1180;
static PyObject *__pyx_tuple__1181;
static PyObject *__pyx_tuple__1182;
static PyObject *__pyx_tuple__1183;
static PyObject *__pyx_tuple__1184;
static PyObject *__pyx_tuple__1185;
static PyObject *__pyx_tuple__1186;
static PyObject *__pyx_tuple__1187;
static PyObject *__pyx_tuple__1188;
static PyObject *__pyx_tuple__1189;
static PyObject *__pyx_tuple__1190;
static PyObject *__pyx_tuple__1191;
static PyObject *__pyx_tuple__1192;
static PyObject *__pyx_tuple__1193;
static PyObject *__pyx_tuple__1194;
static PyObject *__pyx_tuple__1195;
static PyObject *__pyx_tuple__1196;
static PyObject *__pyx_tuple__1197;
static PyObject *__pyx_tuple__1198;
static PyObject *__pyx_tuple__1199;
static PyObject *__pyx_tuple__1200;
static PyObject *__pyx_tuple__1201;
static PyObject *__pyx_tuple__1202;
static PyObject *__pyx_tuple__1203;
static PyObject *__pyx_tuple__1204;
static PyObject *__pyx_tuple__1205;
static PyObject *__pyx_tuple__1206;
static PyObject *__pyx_tuple__1207;
static PyObject *__pyx_tuple__1208;
static PyObject *__pyx_tuple__1209;
static PyObject *__pyx_tuple__1210;
static PyObject *__pyx_tuple__1211;
static PyObject *__pyx_tuple__1212;
static PyObject *__pyx_tuple__1213;
static PyObject *__pyx_tuple__1214;
static PyObject *__pyx_tuple__1215;
static PyObject *__pyx_tuple__1216;
static PyObject *__pyx_tuple__1217;
static PyObject *__pyx_tuple__1218;
static PyObject *__pyx_tuple__1219;
static PyObject *__pyx_tuple__1220;
static PyObject *__pyx_tuple__1221;
static PyObject *__pyx_tuple__1222;
static PyObject *__pyx_tuple__1223;
static PyObject *__pyx_tuple__1224;
static PyObject *__pyx_tuple__1225;
static PyObject *__pyx_tuple__1226;
static PyObject *__pyx_tuple__1227;
static PyObject *__pyx_tuple__1228;
static PyObject *__pyx_tuple__1229;
static PyObject *__pyx_tuple__1230;
static PyObject *__pyx_tuple__1231;
static PyObject *__pyx_tuple__1232;
static PyObject *__pyx_tuple__1233;
static PyObject *__pyx_tuple__1234;
static PyObject *__pyx_tuple__1235;
static PyObject *__pyx_tuple__1236;
static PyObject *__pyx_tuple__1237;
static PyObject *__pyx_tuple__1238;
static PyObject *__pyx_tuple__1239;
static PyObject *__pyx_tuple__1240;
static PyObject *__pyx_tuple__1241;
static PyObject *__pyx_tuple__1242;
static PyObject *__pyx_tuple__1243;
static PyObject *__pyx_tuple__1244;
static PyObject *__pyx_tuple__1245;
static PyObject *__pyx_tuple__1246;
static PyObject *__pyx_tuple__1247;
static PyObject *__pyx_tuple__1248;
static PyObject *__pyx_tuple__1249;
static PyObject *__pyx_tuple__1250;
static PyObject *__pyx_tuple__1251;
static PyObject *__pyx_tuple__1252;
static PyObject *__pyx_tuple__1253;
static PyObject *__pyx_tuple__1254;
static PyObject *__pyx_tuple__1255;
static PyObject *__pyx_tuple__1256;
static PyObject *__pyx_tuple__1257;
static PyObject *__pyx_tuple__1258;
static PyObject *__pyx_tuple__1259;
static PyObject *__pyx_tuple__1260;
static PyObject *__pyx_tuple__1261;
static PyObject *__pyx_tuple__1262;
static PyObject *__pyx_tuple__1263;
static PyObject *__pyx_tuple__1264;
static PyObject *__pyx_tuple__1265;
static PyObject *__pyx_tuple__1266;
static PyObject *__pyx_tuple__1267;
static PyObject *__pyx_tuple__1268;
static PyObject *__pyx_tuple__1269;
static PyObject *__pyx_tuple__1270;
static PyObject *__pyx_tuple__1271;
static PyObject *__pyx_tuple__1272;
static PyObject *__pyx_tuple__1273;
static PyObject *__pyx_tuple__1274;
static PyObject *__pyx_tuple__1275;
static PyObject *__pyx_tuple__1276;
static PyObject *__pyx_tuple__1277;
static PyObject *__pyx_tuple__1278;
static PyObject *__pyx_tuple__1279;
static PyObject *__pyx_tuple__1280;
static PyObject *__pyx_tuple__1281;
static PyObject *__pyx_tuple__1282;
static PyObject *__pyx_tuple__1283;
static PyObject *__pyx_tuple__1284;
static PyObject *__pyx_tuple__1285;
static PyObject *__pyx_tuple__1286;
static PyObject *__pyx_tuple__1287;
static PyObject *__pyx_tuple__1288;
static PyObject *__pyx_tuple__1289;
static PyObject *__pyx_tuple__1290;
static PyObject *__pyx_tuple__1291;
static PyObject *__pyx_tuple__1292;
static PyObject *__pyx_tuple__1293;
static PyObject *__pyx_tuple__1294;
static PyObject *__pyx_tuple__1295;
static PyObject *__pyx_tuple__1296;
static PyObject *__pyx_tuple__1297;
static PyObject *__pyx_tuple__1298;
static PyObject *__pyx_tuple__1299;
static PyObject *__pyx_tuple__1300;
static PyObject *__pyx_tuple__1301;
static PyObject *__pyx_tuple__1302;
static PyObject *__pyx_tuple__1303;
static PyObject *__pyx_tuple__1304;
static PyObject *__pyx_tuple__1305;
static PyObject *__pyx_tuple__1306;
static PyObject *__pyx_tuple__1307;
static PyObject *__pyx_tuple__1308;
static PyObject *__pyx_tuple__1309;
static PyObject *__pyx_tuple__1310;
static PyObject *__pyx_tuple__1311;
static PyObject *__pyx_tuple__1312;
static PyObject *__pyx_tuple__1313;
static PyObject *__pyx_tuple__1314;
static PyObject *__pyx_tuple__1315;
static PyObject *__pyx_tuple__1316;
static PyObject *__pyx_tuple__1317;
static PyObject *__pyx_tuple__1318;
static PyObject *__pyx_tuple__1319;
static PyObject *__pyx_tuple__1320;
static PyObject *__pyx_tuple__1321;
static PyObject *__pyx_tuple__1322;
static PyObject *__pyx_tuple__1323;
static PyObject *__pyx_tuple__1324;
static PyObject *__pyx_tuple__1325;
static PyObject *__pyx_tuple__1326;
static PyObject *__pyx_tuple__1327;
static PyObject *__pyx_tuple__1328;
static PyObject *__pyx_tuple__1329;
static PyObject *__pyx_tuple__1330;
static PyObject *__pyx_tuple__1331;
static PyObject *__pyx_tuple__1332;
static PyObject *__pyx_tuple__1333;
static PyObject *__pyx_tuple__1334;
static PyObject *__pyx_tuple__1335;
static PyObject *__pyx_tuple__1336;
static PyObject *__pyx_tuple__1337;
static PyObject *__pyx_tuple__1338;
static PyObject *__pyx_tuple__1339;
static PyObject *__pyx_tuple__1340;
static PyObject *__pyx_tuple__1341;
static PyObject *__pyx_tuple__1342;
static PyObject *__pyx_tuple__1343;
static PyObject *__pyx_tuple__1344;
static PyObject *__pyx_tuple__1345;
static PyObject *__pyx_tuple__1346;
static PyObject *__pyx_tuple__1347;
static PyObject *__pyx_tuple__1348;
static PyObject *__pyx_tuple__1349;
static PyObject *__pyx_tuple__1350;
static PyObject *__pyx_tuple__1351;
static PyObject *__pyx_tuple__1352;
static PyObject *__pyx_tuple__1353;
static PyObject *__pyx_tuple__1354;
static PyObject *__pyx_tuple__1355;
static PyObject *__pyx_tuple__1356;
static PyObject *__pyx_tuple__1357;
static PyObject *__pyx_tuple__1358;
static PyObject *__pyx_tuple__1359;
static PyObject *__pyx_tuple__1360;
static PyObject *__pyx_tuple__1361;
static PyObject *__pyx_tuple__1362;
static PyObject *__pyx_tuple__1363;
static PyObject *__pyx_tuple__1364;
static PyObject *__pyx_tuple__1365;
static PyObject *__pyx_tuple__1366;
static PyObject *__pyx_tuple__1367;
static PyObject *__pyx_tuple__1368;
static PyObject *__pyx_tuple__1369;
static PyObject *__pyx_tuple__1370;
static PyObject *__pyx_tuple__1371;
static PyObject *__pyx_tuple__1372;
static PyObject *__pyx_tuple__1373;
static PyObject *__pyx_tuple__1374;
static PyObject *__pyx_tuple__1375;
static PyObject *__pyx_tuple__1376;
static PyObject *__pyx_tuple__1377;
static PyObject *__pyx_tuple__1378;
static PyObject *__pyx_tuple__1379;
static PyObject *__pyx_tuple__1380;
static PyObject *__pyx_tuple__1381;
static PyObject *__pyx_tuple__1382;
static PyObject *__pyx_tuple__1383;
static PyObject *__pyx_tuple__1384;
static PyObject *__pyx_tuple__1385;
static PyObject *__pyx_tuple__1386;
static PyObject *__pyx_tuple__1387;
static PyObject *__pyx_tuple__1388;
static PyObject *__pyx_tuple__1389;
static PyObject *__pyx_tuple__1390;
static PyObject *__pyx_tuple__1391;
static PyObject *__pyx_tuple__1392;
static PyObject *__pyx_tuple__1393;
static PyObject *__pyx_tuple__1394;
static PyObject *__pyx_tuple__1395;
static PyObject *__pyx_tuple__1396;
static PyObject *__pyx_tuple__1397;
static PyObject *__pyx_tuple__1398;
static PyObject *__pyx_tuple__1399;
static PyObject *__pyx_tuple__1400;
static PyObject *__pyx_tuple__1401;
static PyObject *__pyx_tuple__1402;
static PyObject *__pyx_tuple__1403;
static PyObject *__pyx_tuple__1404;
static PyObject *__pyx_tuple__1405;
static PyObject *__pyx_tuple__1406;
static PyObject *__pyx_tuple__1407;
static PyObject *__pyx_tuple__1408;
static PyObject *__pyx_tuple__1409;
static PyObject *__pyx_tuple__1410;
static PyObject *__pyx_tuple__1411;
static PyObject *__pyx_tuple__1412;
static PyObject *__pyx_tuple__1413;
static PyObject *__pyx_tuple__1414;
static PyObject *__pyx_tuple__1415;
static PyObject *__pyx_tuple__1416;
static PyObject *__pyx_tuple__1417;
static PyObject *__pyx_tuple__1418;
static PyObject *__pyx_tuple__1419;
static PyObject *__pyx_tuple__1420;
static PyObject *__pyx_tuple__1421;
static PyObject *__pyx_tuple__1422;
static PyObject *__pyx_tuple__1423;
static PyObject *__pyx_tuple__1424;
static PyObject *__pyx_tuple__1425;
static PyObject *__pyx_tuple__1426;
static PyObject *__pyx_tuple__1427;
static PyObject *__pyx_tuple__1428;
static PyObject *__pyx_tuple__1429;
static PyObject *__pyx_tuple__1430;
static PyObject *__pyx_tuple__1431;
static PyObject *__pyx_tuple__1432;
static PyObject *__pyx_tuple__1433;
static PyObject *__pyx_tuple__1434;
static PyObject *__pyx_tuple__1435;
static PyObject *__pyx_tuple__1436;
static PyObject *__pyx_tuple__1437;
static PyObject *__pyx_tuple__1438;
static PyObject *__pyx_tuple__1439;
static PyObject *__pyx_tuple__1440;
static PyObject *__pyx_tuple__1441;
static PyObject *__pyx_tuple__1442;
static PyObject *__pyx_tuple__1443;
static PyObject *__pyx_tuple__1444;
static PyObject *__pyx_tuple__1445;
static PyObject *__pyx_tuple__1446;
static PyObject *__pyx_tuple__1447;
static PyObject *__pyx_tuple__1448;
static PyObject *__pyx_tuple__1449;
static PyObject *__pyx_tuple__1450;
static PyObject *__pyx_tuple__1451;
static PyObject *__pyx_tuple__1452;
static PyObject *__pyx_tuple__1453;
static PyObject *__pyx_tuple__1454;
static PyObject *__pyx_tuple__1455;
static PyObject *__pyx_tuple__1456;
static PyObject *__pyx_tuple__1457;
static PyObject *__pyx_tuple__1458;
static PyObject *__pyx_tuple__1459;
static PyObject *__pyx_tuple__1460;
static PyObject *__pyx_tuple__1461;
static PyObject *__pyx_tuple__1462;
static PyObject *__pyx_tuple__1463;
static PyObject *__pyx_tuple__1464;
static PyObject *__pyx_tuple__1465;
static PyObject *__pyx_tuple__1466;
static PyObject *__pyx_tuple__1467;
static PyObject *__pyx_tuple__1468;
static PyObject *__pyx_tuple__1469;
static PyObject *__pyx_tuple__1470;
static PyObject *__pyx_tuple__1471;
static PyObject *__pyx_tuple__1472;
static PyObject *__pyx_tuple__1473;
static PyObject *__pyx_tuple__1474;
static PyObject *__pyx_tuple__1475;
static PyObject *__pyx_tuple__1476;
static PyObject *__pyx_tuple__1477;
static PyObject *__pyx_tuple__1478;
static PyObject *__pyx_tuple__1479;
static PyObject *__pyx_tuple__1480;
static PyObject *__pyx_tuple__1481;
static PyObject *__pyx_tuple__1482;
static PyObject *__pyx_tuple__1483;
static PyObject *__pyx_tuple__1484;
static PyObject *__pyx_tuple__1485;
static PyObject *__pyx_tuple__1486;
static PyObject *__pyx_tuple__1487;
static PyObject *__pyx_tuple__1488;
static PyObject *__pyx_tuple__1489;
static PyObject *__pyx_tuple__1490;
static PyObject *__pyx_tuple__1491;
static PyObject *__pyx_tuple__1492;
static PyObject *__pyx_tuple__1493;
static PyObject *__pyx_tuple__1494;
static PyObject *__pyx_tuple__1495;
static PyObject *__pyx_tuple__1496;
static PyObject *__pyx_tuple__1497;
static PyObject *__pyx_tuple__1498;
static PyObject *__pyx_tuple__1499;
static PyObject *__pyx_tuple__1500;
static PyObject *__pyx_tuple__1501;
static PyObject *__pyx_tuple__1502;
static PyObject *__pyx_tuple__1503;
static PyObject *__pyx_tuple__1504;
static PyObject *__pyx_tuple__1505;
static PyObject *__pyx_tuple__1506;
static PyObject *__pyx_tuple__1507;
static PyObject *__pyx_tuple__1508;
static PyObject *__pyx_tuple__1509;
static PyObject *__pyx_tuple__1510;
static PyObject *__pyx_tuple__1511;
static PyObject *__pyx_tuple__1512;
static PyObject *__pyx_tuple__1513;
static PyObject *__pyx_tuple__1514;
static PyObject *__pyx_tuple__1515;
static PyObject *__pyx_tuple__1516;
static PyObject *__pyx_tuple__1517;
static PyObject *__pyx_tuple__1518;
static PyObject *__pyx_tuple__1519;
static PyObject *__pyx_tuple__1520;
static PyObject *__pyx_tuple__1521;
static PyObject *__pyx_tuple__1522;
static PyObject *__pyx_tuple__1523;
static PyObject *__pyx_tuple__1524;
static PyObject *__pyx_tuple__1525;
static PyObject *__pyx_tuple__1526;
static PyObject *__pyx_tuple__1527;
static PyObject *__pyx_tuple__1528;
static PyObject *__pyx_tuple__1529;
static PyObject *__pyx_tuple__1530;
static PyObject *__pyx_tuple__1531;
static PyObject *__pyx_tuple__1532;
static PyObject *__pyx_tuple__1533;
static PyObject *__pyx_tuple__1534;
static PyObject *__pyx_tuple__1535;
static PyObject *__pyx_tuple__1536;
static PyObject *__pyx_tuple__1537;
static PyObject *__pyx_tuple__1538;
static PyObject *__pyx_tuple__1539;
static PyObject *__pyx_tuple__1540;
static PyObject *__pyx_tuple__1541;
static PyObject *__pyx_tuple__1542;
static PyObject *__pyx_tuple__1543;
static PyObject *__pyx_tuple__1544;
static PyObject *__pyx_tuple__1545;
static PyObject *__pyx_tuple__1546;
static PyObject *__pyx_tuple__1547;
static PyObject *__pyx_tuple__1548;
static PyObject *__pyx_tuple__1549;
static PyObject *__pyx_tuple__1550;
static PyObject *__pyx_tuple__1551;
static PyObject *__pyx_tuple__1552;
static PyObject *__pyx_tuple__1553;
static PyObject *__pyx_tuple__1554;
static PyObject *__pyx_tuple__1555;
static PyObject *__pyx_tuple__1556;
static PyObject *__pyx_tuple__1557;
static PyObject *__pyx_tuple__1558;
static PyObject *__pyx_tuple__1559;
static PyObject *__pyx_tuple__1560;
static PyObject *__pyx_tuple__1561;
static PyObject *__pyx_tuple__1562;
static PyObject *__pyx_tuple__1563;
static PyObject *__pyx_tuple__1564;
static PyObject *__pyx_tuple__1565;
static PyObject *__pyx_tuple__1566;
static PyObject *__pyx_tuple__1567;
static PyObject *__pyx_tuple__1568;
static PyObject *__pyx_tuple__1569;
static PyObject *__pyx_tuple__1570;
static PyObject *__pyx_tuple__1571;
static PyObject *__pyx_tuple__1572;
static PyObject *__pyx_tuple__1573;
static PyObject *__pyx_tuple__1574;
static PyObject *__pyx_tuple__1575;
static PyObject *__pyx_tuple__1576;
static PyObject *__pyx_tuple__1577;
static PyObject *__pyx_tuple__1578;
static PyObject *__pyx_tuple__1579;
static PyObject *__pyx_tuple__1580;
static PyObject *__pyx_tuple__1581;
static PyObject *__pyx_tuple__1582;
static PyObject *__pyx_tuple__1583;
static PyObject *__pyx_tuple__1584;
static PyObject *__pyx_tuple__1585;
static PyObject *__pyx_tuple__1586;
static PyObject *__pyx_tuple__1587;
static PyObject *__pyx_tuple__1588;
static PyObject *__pyx_tuple__1589;
static PyObject *__pyx_tuple__1590;
static PyObject *__pyx_tuple__1591;
static PyObject *__pyx_tuple__1592;
static PyObject *__pyx_tuple__1593;
static PyObject *__pyx_tuple__1594;
static PyObject *__pyx_tuple__1595;
static PyObject *__pyx_tuple__1596;
static PyObject *__pyx_tuple__1597;
static PyObject *__pyx_tuple__1598;
static PyObject *__pyx_tuple__1599;
static PyObject *__pyx_tuple__1600;
static PyObject *__pyx_tuple__1601;
static PyObject *__pyx_tuple__1602;
static PyObject *__pyx_tuple__1603;
static PyObject *__pyx_tuple__1604;
static PyObject *__pyx_tuple__1605;
static PyObject *__pyx_tuple__1606;
static PyObject *__pyx_tuple__1607;
static PyObject *__pyx_tuple__1608;
static PyObject *__pyx_tuple__1609;
static PyObject *__pyx_tuple__1610;
static PyObject *__pyx_tuple__1611;
static PyObject *__pyx_tuple__1612;
static PyObject *__pyx_tuple__1613;
static PyObject *__pyx_tuple__1614;
static PyObject *__pyx_tuple__1615;
static PyObject *__pyx_tuple__1616;
static PyObject *__pyx_tuple__1617;
static PyObject *__pyx_tuple__1618;
static PyObject *__pyx_tuple__1619;
static PyObject *__pyx_tuple__1620;
static PyObject *__pyx_tuple__1621;
static PyObject *__pyx_tuple__1622;
static PyObject *__pyx_tuple__1623;
static PyObject *__pyx_tuple__1624;
static PyObject *__pyx_tuple__1625;
static PyObject *__pyx_tuple__1626;
static PyObject *__pyx_tuple__1627;
static PyObject *__pyx_tuple__1628;
static PyObject *__pyx_tuple__1629;
static PyObject *__pyx_tuple__1630;
static PyObject *__pyx_tuple__1631;
static PyObject *__pyx_tuple__1632;
static PyObject *__pyx_tuple__1633;
static PyObject *__pyx_tuple__1634;
static PyObject *__pyx_tuple__1635;
static PyObject *__pyx_tuple__1636;
static PyObject *__pyx_tuple__1637;
static PyObject *__pyx_tuple__1638;
static PyObject *__pyx_tuple__1639;
static PyObject *__pyx_tuple__1640;
static PyObject *__pyx_tuple__1641;
static PyObject *__pyx_tuple__1642;
static PyObject *__pyx_tuple__1643;
static PyObject *__pyx_tuple__1644;
static PyObject *__pyx_tuple__1645;
static PyObject *__pyx_tuple__1646;
static PyObject *__pyx_tuple__1647;
static PyObject *__pyx_tuple__1648;
static PyObject *__pyx_tuple__1649;
static PyObject *__pyx_tuple__1650;
static PyObject *__pyx_tuple__1651;
static PyObject *__pyx_tuple__1652;
static PyObject *__pyx_tuple__1653;
static PyObject *__pyx_tuple__1654;
static PyObject *__pyx_tuple__1655;
static PyObject *__pyx_tuple__1656;
static PyObject *__pyx_tuple__1657;
static PyObject *__pyx_tuple__1658;
static PyObject *__pyx_tuple__1659;
static PyObject *__pyx_tuple__1660;
static PyObject *__pyx_tuple__1661;
static PyObject *__pyx_tuple__1662;
static PyObject *__pyx_tuple__1663;
static PyObject *__pyx_tuple__1664;
static PyObject *__pyx_tuple__1665;
static PyObject *__pyx_tuple__1666;
static PyObject *__pyx_tuple__1667;
static PyObject *__pyx_tuple__1668;
static PyObject *__pyx_tuple__1669;
static PyObject *__pyx_tuple__1670;
static PyObject *__pyx_tuple__1671;
static PyObject *__pyx_tuple__1672;
static PyObject *__pyx_tuple__1673;
static PyObject *__pyx_tuple__1674;
static PyObject *__pyx_tuple__1675;
static PyObject *__pyx_tuple__1676;
static PyObject *__pyx_tuple__1677;
static PyObject *__pyx_tuple__1678;
static PyObject *__pyx_tuple__1679;
static PyObject *__pyx_tuple__1680;
static PyObject *__pyx_tuple__1681;
static PyObject *__pyx_tuple__1682;
static PyObject *__pyx_tuple__1683;
static PyObject *__pyx_tuple__1684;
static PyObject *__pyx_tuple__1685;
static PyObject *__pyx_tuple__1686;
static PyObject *__pyx_tuple__1687;
static PyObject *__pyx_tuple__1688;
static PyObject *__pyx_tuple__1689;
static PyObject *__pyx_tuple__1690;
static PyObject *__pyx_tuple__1691;
static PyObject *__pyx_tuple__1692;
static PyObject *__pyx_tuple__1693;
static PyObject *__pyx_tuple__1694;
static PyObject *__pyx_tuple__1695;
static PyObject *__pyx_tuple__1696;
static PyObject *__pyx_tuple__1697;
static PyObject *__pyx_tuple__1698;
static PyObject *__pyx_tuple__1699;
static PyObject *__pyx_tuple__1700;
static PyObject *__pyx_tuple__1701;
static PyObject *__pyx_tuple__1702;
static PyObject *__pyx_tuple__1703;
static PyObject *__pyx_tuple__1704;
static PyObject *__pyx_tuple__1705;
static PyObject *__pyx_tuple__1706;
static PyObject *__pyx_tuple__1707;
static PyObject *__pyx_tuple__1708;
static PyObject *__pyx_tuple__1709;
static PyObject *__pyx_tuple__1710;
static PyObject *__pyx_tuple__1711;
static PyObject *__pyx_tuple__1712;
static PyObject *__pyx_tuple__1713;
static PyObject *__pyx_tuple__1714;
static PyObject *__pyx_tuple__1715;
static PyObject *__pyx_tuple__1716;
static PyObject *__pyx_tuple__1717;
static PyObject *__pyx_tuple__1718;
static PyObject *__pyx_tuple__1719;
static PyObject *__pyx_tuple__1720;
static PyObject *__pyx_tuple__1721;
static PyObject *__pyx_tuple__1722;
static PyObject *__pyx_tuple__1723;
static PyObject *__pyx_tuple__1724;
static PyObject *__pyx_tuple__1725;
static PyObject *__pyx_tuple__1726;
static PyObject *__pyx_tuple__1727;
static PyObject *__pyx_tuple__1728;
static PyObject *__pyx_tuple__1729;
static PyObject *__pyx_tuple__1730;
static PyObject *__pyx_tuple__1731;
static PyObject *__pyx_tuple__1732;
static PyObject *__pyx_tuple__1733;
static PyObject *__pyx_tuple__1734;
static PyObject *__pyx_tuple__1735;
static PyObject *__pyx_tuple__1736;
static PyObject *__pyx_tuple__1737;
static PyObject *__pyx_tuple__1738;
static PyObject *__pyx_tuple__1739;
static PyObject *__pyx_tuple__1740;
static PyObject *__pyx_tuple__1741;
static PyObject *__pyx_tuple__1742;
static PyObject *__pyx_tuple__1743;
static PyObject *__pyx_tuple__1744;
static PyObject *__pyx_tuple__1745;
static PyObject *__pyx_tuple__1746;
static PyObject *__pyx_tuple__1747;
static PyObject *__pyx_tuple__1748;
static PyObject *__pyx_tuple__1749;
static PyObject *__pyx_tuple__1750;
static PyObject *__pyx_tuple__1751;
static PyObject *__pyx_tuple__1752;
static PyObject *__pyx_tuple__1753;
static PyObject *__pyx_tuple__1754;
static PyObject *__pyx_tuple__1755;
static PyObject *__pyx_tuple__1756;
static PyObject *__pyx_tuple__1757;
static PyObject *__pyx_tuple__1758;
static PyObject *__pyx_tuple__1759;
static PyObject *__pyx_tuple__1760;
static PyObject *__pyx_tuple__1761;
static PyObject *__pyx_tuple__1762;
static PyObject *__pyx_tuple__1763;
static PyObject *__pyx_tuple__1764;
static PyObject *__pyx_tuple__1765;
static PyObject *__pyx_tuple__1766;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__103;
static PyObject *__pyx_codeobj__105;
static PyObject *__pyx_codeobj__107;
static PyObject *__pyx_codeobj__108;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__122;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__135;
static PyObject *__pyx_codeobj__137;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__145;
static PyObject *__pyx_codeobj__147;
static PyObject *__pyx_codeobj__149;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__152;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__155;
static PyObject *__pyx_codeobj__157;
static PyObject *__pyx_codeobj__159;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__167;
static PyObject *__pyx_codeobj__169;
static PyObject *__pyx_codeobj__171;
static PyObject *__pyx_codeobj__172;
static PyObject *__pyx_codeobj__174;
static PyObject *__pyx_codeobj__176;
static PyObject *__pyx_codeobj__177;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__181;
static PyObject *__pyx_codeobj__182;
static PyObject *__pyx_codeobj__184;
static PyObject *__pyx_codeobj__186;
static PyObject *__pyx_codeobj__187;
static PyObject *__pyx_codeobj__189;
static PyObject *__pyx_codeobj__191;
static PyObject *__pyx_codeobj__192;
static PyObject *__pyx_codeobj__194;
static PyObject *__pyx_codeobj__196;
static PyObject *__pyx_codeobj__197;
static PyObject *__pyx_codeobj__199;
static PyObject *__pyx_codeobj__201;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__204;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__207;
static PyObject *__pyx_codeobj__209;
static PyObject *__pyx_codeobj__211;
static PyObject *__pyx_codeobj__212;
static PyObject *__pyx_codeobj__214;
static PyObject *__pyx_codeobj__216;
static PyObject *__pyx_codeobj__217;
static PyObject *__pyx_codeobj__219;
static PyObject *__pyx_codeobj__221;
static PyObject *__pyx_codeobj__222;
static PyObject *__pyx_codeobj__224;
static PyObject *__pyx_codeobj__226;
static PyObject *__pyx_codeobj__227;
static PyObject *__pyx_codeobj__229;
static PyObject *__pyx_codeobj__231;
static PyObject *__pyx_codeobj__232;
static PyObject *__pyx_codeobj__234;
static PyObject *__pyx_codeobj__236;
static PyObject *__pyx_codeobj__237;
static PyObject *__pyx_codeobj__239;
static PyObject *__pyx_codeobj__241;
static PyObject *__pyx_codeobj__242;
static PyObject *__pyx_codeobj__244;
static PyObject *__pyx_codeobj__246;
static PyObject *__pyx_codeobj__247;
static PyObject *__pyx_codeobj__249;
static PyObject *__pyx_codeobj__251;
static PyObject *__pyx_codeobj__252;
static PyObject *__pyx_codeobj__254;
static PyObject *__pyx_codeobj__256;
static PyObject *__pyx_codeobj__257;
static PyObject *__pyx_codeobj__259;
static PyObject *__pyx_codeobj__261;
static PyObject *__pyx_codeobj__262;
static PyObject *__pyx_codeobj__264;
static PyObject *__pyx_codeobj__266;
static PyObject *__pyx_codeobj__267;
static PyObject *__pyx_codeobj__269;
static PyObject *__pyx_codeobj__271;
static PyObject *__pyx_codeobj__272;
static PyObject *__pyx_codeobj__274;
static PyObject *__pyx_codeobj__276;
static PyObject *__pyx_codeobj__277;
static PyObject *__pyx_codeobj__279;
static PyObject *__pyx_codeobj__281;
static PyObject *__pyx_codeobj__282;
static PyObject *__pyx_codeobj__284;
static PyObject *__pyx_codeobj__286;
static PyObject *__pyx_codeobj__287;
static PyObject *__pyx_codeobj__289;
static PyObject *__pyx_codeobj__291;
static PyObject *__pyx_codeobj__292;
static PyObject *__pyx_codeobj__294;
static PyObject *__pyx_codeobj__296;
static PyObject *__pyx_codeobj__297;
static PyObject *__pyx_codeobj__299;
static PyObject *__pyx_codeobj__301;
static PyObject *__pyx_codeobj__302;
static PyObject *__pyx_codeobj__304;
static PyObject *__pyx_codeobj__306;
static PyObject *__pyx_codeobj__307;
static PyObject *__pyx_codeobj__309;
static PyObject *__pyx_codeobj__311;
static PyObject *__pyx_codeobj__312;
static PyObject *__pyx_codeobj__314;
static PyObject *__pyx_codeobj__316;
static PyObject *__pyx_codeobj__317;
static PyObject *__pyx_codeobj__319;
static PyObject *__pyx_codeobj__321;
static PyObject *__pyx_codeobj__322;
static PyObject *__pyx_codeobj__324;
static PyObject *__pyx_codeobj__326;
static PyObject *__pyx_codeobj__327;
static PyObject *__pyx_codeobj__329;
static PyObject *__pyx_codeobj__331;
static PyObject *__pyx_codeobj__332;
static PyObject *__pyx_codeobj__334;
static PyObject *__pyx_codeobj__336;
static PyObject *__pyx_codeobj__337;
static PyObject *__pyx_codeobj__339;
static PyObject *__pyx_codeobj__341;
static PyObject *__pyx_codeobj__342;
static PyObject *__pyx_codeobj__344;
static PyObject *__pyx_codeobj__346;
static PyObject *__pyx_codeobj__347;
static PyObject *__pyx_codeobj__349;
static PyObject *__pyx_codeobj__351;
static PyObject *__pyx_codeobj__352;
static PyObject *__pyx_codeobj__354;
static PyObject *__pyx_codeobj__356;
static PyObject *__pyx_codeobj__357;
static PyObject *__pyx_codeobj__359;
static PyObject *__pyx_codeobj__361;
static PyObject *__pyx_codeobj__362;
static PyObject *__pyx_codeobj__364;
static PyObject *__pyx_codeobj__366;
static PyObject *__pyx_codeobj__367;
static PyObject *__pyx_codeobj__369;
static PyObject *__pyx_codeobj__371;
static PyObject *__pyx_codeobj__372;
static PyObject *__pyx_codeobj__374;
static PyObject *__pyx_codeobj__376;
static PyObject *__pyx_codeobj__377;
static PyObject *__pyx_codeobj__379;
static PyObject *__pyx_codeobj__381;
static PyObject *__pyx_codeobj__382;
static PyObject *__pyx_codeobj__384;
static PyObject *__pyx_codeobj__386;
static PyObject *__pyx_codeobj__387;
static PyObject *__pyx_codeobj__389;
static PyObject *__pyx_codeobj__391;
static PyObject *__pyx_codeobj__392;
static PyObject *__pyx_codeobj__394;
static PyObject *__pyx_codeobj__396;
static PyObject *__pyx_codeobj__397;
static PyObject *__pyx_codeobj__399;
static PyObject *__pyx_codeobj__401;
static PyObject *__pyx_codeobj__402;
static PyObject *__pyx_codeobj__404;
static PyObject *__pyx_codeobj__406;
static PyObject *__pyx_codeobj__407;
static PyObject *__pyx_codeobj__409;
static PyObject *__pyx_codeobj__411;
static PyObject *__pyx_codeobj__412;
static PyObject *__pyx_codeobj__414;
static PyObject *__pyx_codeobj__416;
static PyObject *__pyx_codeobj__417;
static PyObject *__pyx_codeobj__419;
static PyObject *__pyx_codeobj__421;
static PyObject *__pyx_codeobj__422;
static PyObject *__pyx_codeobj__424;
static PyObject *__pyx_codeobj__426;
static PyObject *__pyx_codeobj__427;
static PyObject *__pyx_codeobj__429;
static PyObject *__pyx_codeobj__431;
static PyObject *__pyx_codeobj__432;
static PyObject *__pyx_codeobj__434;
static PyObject *__pyx_codeobj__436;
static PyObject *__pyx_codeobj__437;
static PyObject *__pyx_codeobj__439;
static PyObject *__pyx_codeobj__441;
static PyObject *__pyx_codeobj__442;
static PyObject *__pyx_codeobj__444;
static PyObject *__pyx_codeobj__446;
static PyObject *__pyx_codeobj__447;
static PyObject *__pyx_codeobj__449;
static PyObject *__pyx_codeobj__451;
static PyObject *__pyx_codeobj__452;
static PyObject *__pyx_codeobj__454;
static PyObject *__pyx_codeobj__456;
static PyObject *__pyx_codeobj__457;
static PyObject *__pyx_codeobj__459;
static PyObject *__pyx_codeobj__461;
static PyObject *__pyx_codeobj__462;
static PyObject *__pyx_codeobj__464;
static PyObject *__pyx_codeobj__466;
static PyObject *__pyx_codeobj__467;
static PyObject *__pyx_codeobj__469;
static PyObject *__pyx_codeobj__471;
static PyObject *__pyx_codeobj__472;
static PyObject *__pyx_codeobj__474;
static PyObject *__pyx_codeobj__476;
static PyObject *__pyx_codeobj__477;
static PyObject *__pyx_codeobj__479;
static PyObject *__pyx_codeobj__481;
static PyObject *__pyx_codeobj__482;
static PyObject *__pyx_codeobj__484;
static PyObject *__pyx_codeobj__486;
static PyObject *__pyx_codeobj__487;
static PyObject *__pyx_codeobj__489;
static PyObject *__pyx_codeobj__491;
static PyObject *__pyx_codeobj__492;
static PyObject *__pyx_codeobj__494;
static PyObject *__pyx_codeobj__496;
static PyObject *__pyx_codeobj__497;
static PyObject *__pyx_codeobj__499;
static PyObject *__pyx_codeobj__501;
static PyObject *__pyx_codeobj__502;
static PyObject *__pyx_codeobj__504;
static PyObject *__pyx_codeobj__506;
static PyObject *__pyx_codeobj__507;
static PyObject *__pyx_codeobj__509;
static PyObject *__pyx_codeobj__511;
static PyObject *__pyx_codeobj__512;
static PyObject *__pyx_codeobj__514;
static PyObject *__pyx_codeobj__516;
static PyObject *__pyx_codeobj__517;
static PyObject *__pyx_codeobj__519;
static PyObject *__pyx_codeobj__521;
static PyObject *__pyx_codeobj__522;
static PyObject *__pyx_codeobj__524;
static PyObject *__pyx_codeobj__526;
static PyObject *__pyx_codeobj__527;
static PyObject *__pyx_codeobj__529;
static PyObject *__pyx_codeobj__531;
static PyObject *__pyx_codeobj__532;
static PyObject *__pyx_codeobj__534;
static PyObject *__pyx_codeobj__536;
static PyObject *__pyx_codeobj__537;
static PyObject *__pyx_codeobj__539;
static PyObject *__pyx_codeobj__541;
static PyObject *__pyx_codeobj__542;
static PyObject *__pyx_codeobj__544;
static PyObject *__pyx_codeobj__546;
static PyObject *__pyx_codeobj__547;
static PyObject *__pyx_codeobj__549;
static PyObject *__pyx_codeobj__551;
static PyObject *__pyx_codeobj__552;
static PyObject *__pyx_codeobj__554;
static PyObject *__pyx_codeobj__556;
static PyObject *__pyx_codeobj__557;
static PyObject *__pyx_codeobj__559;
static PyObject *__pyx_codeobj__561;
static PyObject *__pyx_codeobj__562;
static PyObject *__pyx_codeobj__564;
static PyObject *__pyx_codeobj__566;
static PyObject *__pyx_codeobj__567;
static PyObject *__pyx_codeobj__569;
static PyObject *__pyx_codeobj__571;
static PyObject *__pyx_codeobj__572;
static PyObject *__pyx_codeobj__574;
static PyObject *__pyx_codeobj__576;
static PyObject *__pyx_codeobj__577;
static PyObject *__pyx_codeobj__579;
static PyObject *__pyx_codeobj__581;
static PyObject *__pyx_codeobj__582;
static PyObject *__pyx_codeobj__584;
static PyObject *__pyx_codeobj__586;
static PyObject *__pyx_codeobj__587;
static PyObject *__pyx_codeobj__589;
static PyObject *__pyx_codeobj__591;
static PyObject *__pyx_codeobj__592;
static PyObject *__pyx_codeobj__594;
static PyObject *__pyx_codeobj__596;
static PyObject *__pyx_codeobj__597;
static PyObject *__pyx_codeobj__599;
static PyObject *__pyx_codeobj__601;
static PyObject *__pyx_codeobj__602;
static PyObject *__pyx_codeobj__604;
static PyObject *__pyx_codeobj__606;
static PyObject *__pyx_codeobj__607;
static PyObject *__pyx_codeobj__608;
static PyObject *__pyx_codeobj__609;
static PyObject *__pyx_codeobj__610;
static PyObject *__pyx_codeobj__611;
static PyObject *__pyx_codeobj__612;
static PyObject *__pyx_codeobj__614;
static PyObject *__pyx_codeobj__615;
static PyObject *__pyx_codeobj__616;
static PyObject *__pyx_codeobj__617;
static PyObject *__pyx_codeobj__618;
static PyObject *__pyx_codeobj__619;
static PyObject *__pyx_codeobj__620;
static PyObject *__pyx_codeobj__621;
static PyObject *__pyx_codeobj__622;
static PyObject *__pyx_codeobj__623;
static PyObject *__pyx_codeobj__624;
static PyObject *__pyx_codeobj__625;
static PyObject *__pyx_codeobj__626;
static PyObject *__pyx_codeobj__627;
static PyObject *__pyx_codeobj__628;
static PyObject *__pyx_codeobj__629;
static PyObject *__pyx_codeobj__630;
static PyObject *__pyx_codeobj__631;
static PyObject *__pyx_codeobj__632;
static PyObject *__pyx_codeobj__633;
static PyObject *__pyx_codeobj__634;
static PyObject *__pyx_codeobj__636;
static PyObject *__pyx_codeobj__637;
static PyObject *__pyx_codeobj__638;
static PyObject *__pyx_codeobj__639;
static PyObject *__pyx_codeobj__640;
static PyObject *__pyx_codeobj__641;
static PyObject *__pyx_codeobj__642;
static PyObject *__pyx_codeobj__643;
static PyObject *__pyx_codeobj__644;
static PyObject *__pyx_codeobj__645;
static PyObject *__pyx_codeobj__646;
static PyObject *__pyx_codeobj__647;
static PyObject *__pyx_codeobj__648;
static PyObject *__pyx_codeobj__649;
static PyObject *__pyx_codeobj__650;
static PyObject *__pyx_codeobj__651;
static PyObject *__pyx_codeobj__652;
static PyObject *__pyx_codeobj__653;
static PyObject *__pyx_codeobj__654;
static PyObject *__pyx_codeobj__655;
static PyObject *__pyx_codeobj__656;
static PyObject *__pyx_codeobj__657;
static PyObject *__pyx_codeobj__658;
static PyObject *__pyx_codeobj__661;
static PyObject *__pyx_codeobj__662;
static PyObject *__pyx_codeobj__663;
static PyObject *__pyx_codeobj__664;
static PyObject *__pyx_codeobj__665;
static PyObject *__pyx_codeobj__666;
static PyObject *__pyx_codeobj__667;
static PyObject *__pyx_codeobj__668;
static PyObject *__pyx_codeobj__669;
static PyObject *__pyx_codeobj__670;
static PyObject *__pyx_codeobj__671;
static PyObject *__pyx_codeobj__672;
static PyObject *__pyx_codeobj__673;
static PyObject *__pyx_codeobj__674;
static PyObject *__pyx_codeobj__675;
static PyObject *__pyx_codeobj__676;
static PyObject *__pyx_codeobj__677;
static PyObject *__pyx_codeobj__678;
static PyObject *__pyx_codeobj__679;
static PyObject *__pyx_codeobj__680;
static PyObject *__pyx_codeobj__681;
static PyObject *__pyx_codeobj__682;
static PyObject *__pyx_codeobj__683;
static PyObject *__pyx_codeobj__684;
static PyObject *__pyx_codeobj__685;
static PyObject *__pyx_codeobj__686;
static PyObject *__pyx_codeobj__687;
static PyObject *__pyx_codeobj__688;
static PyObject *__pyx_codeobj__689;
static PyObject *__pyx_codeobj__690;
static PyObject *__pyx_codeobj__691;
static PyObject *__pyx_codeobj__692;
static PyObject *__pyx_codeobj__693;
static PyObject *__pyx_codeobj__694;
static PyObject *__pyx_codeobj__695;
static PyObject *__pyx_codeobj__696;
static PyObject *__pyx_codeobj__697;
static PyObject *__pyx_codeobj__698;
static PyObject *__pyx_codeobj__699;
static PyObject *__pyx_codeobj__700;
static PyObject *__pyx_codeobj__701;
static PyObject *__pyx_codeobj__702;
static PyObject *__pyx_codeobj__703;
static PyObject *__pyx_codeobj__704;
static PyObject *__pyx_codeobj__705;
static PyObject *__pyx_codeobj__706;
static PyObject *__pyx_codeobj__707;
static PyObject *__pyx_codeobj__708;
static PyObject *__pyx_codeobj__709;
static PyObject *__pyx_codeobj__710;
static PyObject *__pyx_codeobj__711;
static PyObject *__pyx_codeobj__712;
static PyObject *__pyx_codeobj__713;
static PyObject *__pyx_codeobj__714;
static PyObject *__pyx_codeobj__715;
static PyObject *__pyx_codeobj__716;
static PyObject *__pyx_codeobj__717;
static PyObject *__pyx_codeobj__718;
static PyObject *__pyx_codeobj__719;
static PyObject *__pyx_codeobj__720;
static PyObject *__pyx_codeobj__721;
static PyObject *__pyx_codeobj__722;
static PyObject *__pyx_codeobj__723;
static PyObject *__pyx_codeobj__724;
static PyObject *__pyx_codeobj__725;
static PyObject *__pyx_codeobj__726;
static PyObject *__pyx_codeobj__727;
static PyObject *__pyx_codeobj__728;
static PyObject *__pyx_codeobj__729;
static PyObject *__pyx_codeobj__730;
static PyObject *__pyx_codeobj__731;
static PyObject *__pyx_codeobj__732;
static PyObject *__pyx_codeobj__733;
static PyObject *__pyx_codeobj__734;
static PyObject *__pyx_codeobj__735;
static PyObject *__pyx_codeobj__736;
static PyObject *__pyx_codeobj__737;
static PyObject *__pyx_codeobj__738;
static PyObject *__pyx_codeobj__739;
static PyObject *__pyx_codeobj__740;
static PyObject *__pyx_codeobj__741;
static PyObject *__pyx_codeobj__742;
static PyObject *__pyx_codeobj__743;
static PyObject *__pyx_codeobj__744;
static PyObject *__pyx_codeobj__745;
static PyObject *__pyx_codeobj__746;
static PyObject *__pyx_codeobj__747;
static PyObject *__pyx_codeobj__748;
static PyObject *__pyx_codeobj__750;
static PyObject *__pyx_codeobj__751;
static PyObject *__pyx_codeobj__753;
static PyObject *__pyx_codeobj__754;
static PyObject *__pyx_codeobj__755;
static PyObject *__pyx_codeobj__756;
static PyObject *__pyx_codeobj__757;
static PyObject *__pyx_codeobj__758;
static PyObject *__pyx_codeobj__759;
static PyObject *__pyx_codeobj__760;
static PyObject *__pyx_codeobj__761;
static PyObject *__pyx_codeobj__762;
static PyObject *__pyx_codeobj__763;
static PyObject *__pyx_codeobj__764;
static PyObject *__pyx_codeobj__766;
static PyObject *__pyx_codeobj__767;
static PyObject *__pyx_codeobj__768;
static PyObject *__pyx_codeobj__769;
static PyObject *__pyx_codeobj__770;
static PyObject *__pyx_codeobj__771;
static PyObject *__pyx_codeobj__772;
static PyObject *__pyx_codeobj__773;
static PyObject *__pyx_codeobj__774;
static PyObject *__pyx_codeobj__775;
static PyObject *__pyx_codeobj__776;
static PyObject *__pyx_codeobj__777;
static PyObject *__pyx_codeobj__778;
static PyObject *__pyx_codeobj__781;
static PyObject *__pyx_codeobj__782;
static PyObject *__pyx_codeobj__784;
static PyObject *__pyx_codeobj__785;
static PyObject *__pyx_codeobj__786;
static PyObject *__pyx_codeobj__787;
static PyObject *__pyx_codeobj__788;
static PyObject *__pyx_codeobj__789;
static PyObject *__pyx_codeobj__790;
static PyObject *__pyx_codeobj__791;
static PyObject *__pyx_codeobj__792;
static PyObject *__pyx_codeobj__793;
static PyObject *__pyx_codeobj__794;
static PyObject *__pyx_codeobj__795;
static PyObject *__pyx_codeobj__796;
static PyObject *__pyx_codeobj__797;
static PyObject *__pyx_codeobj__799;
static PyObject *__pyx_codeobj__800;
static PyObject *__pyx_codeobj__801;
static PyObject *__pyx_codeobj__802;
static PyObject *__pyx_codeobj__803;
static PyObject *__pyx_codeobj__804;
static PyObject *__pyx_codeobj__805;
static PyObject *__pyx_codeobj__806;
static PyObject *__pyx_codeobj__807;
static PyObject *__pyx_codeobj__808;
static PyObject *__pyx_codeobj__809;
static PyObject *__pyx_codeobj__810;
static PyObject *__pyx_codeobj__811;
static PyObject *__pyx_codeobj__812;
static PyObject *__pyx_codeobj__813;
static PyObject *__pyx_codeobj__814;
static PyObject *__pyx_codeobj__815;
static PyObject *__pyx_codeobj__816;
static PyObject *__pyx_codeobj__817;
static PyObject *__pyx_codeobj__818;
static PyObject *__pyx_codeobj__821;
static PyObject *__pyx_codeobj__823;
static PyObject *__pyx_codeobj__824;
static PyObject *__pyx_codeobj__825;
static PyObject *__pyx_codeobj__826;
static PyObject *__pyx_codeobj__827;
static PyObject *__pyx_codeobj__828;
static PyObject *__pyx_codeobj__830;
static PyObject *__pyx_codeobj__831;
static PyObject *__pyx_codeobj__832;
static PyObject *__pyx_codeobj__833;
static PyObject *__pyx_codeobj__834;
static PyObject *__pyx_codeobj__835;
static PyObject *__pyx_codeobj__836;
static PyObject *__pyx_codeobj__837;
static PyObject *__pyx_codeobj__838;
static PyObject *__pyx_codeobj__839;
static PyObject *__pyx_codeobj__840;
static PyObject *__pyx_codeobj__841;
static PyObject *__pyx_codeobj__842;
static PyObject *__pyx_codeobj__843;
static PyObject *__pyx_codeobj__845;
static PyObject *__pyx_codeobj__846;
static PyObject *__pyx_codeobj__847;
static PyObject *__pyx_codeobj__848;
static PyObject *__pyx_codeobj__849;
static PyObject *__pyx_codeobj__850;
static PyObject *__pyx_codeobj__851;
static PyObject *__pyx_codeobj__852;
static PyObject *__pyx_codeobj__853;
static PyObject *__pyx_codeobj__854;
static PyObject *__pyx_codeobj__855;
static PyObject *__pyx_codeobj__856;
static PyObject *__pyx_codeobj__857;
static PyObject *__pyx_codeobj__858;
static PyObject *__pyx_codeobj__859;
static PyObject *__pyx_codeobj__860;
static PyObject *__pyx_codeobj__861;
static PyObject *__pyx_codeobj__862;
static PyObject *__pyx_codeobj__863;
static PyObject *__pyx_codeobj__864;
static PyObject *__pyx_codeobj__865;
static PyObject *__pyx_codeobj__866;
static PyObject *__pyx_codeobj__867;
static PyObject *__pyx_codeobj__868;
static PyObject *__pyx_codeobj__869;
static PyObject *__pyx_codeobj__870;
static PyObject *__pyx_codeobj__871;
static PyObject *__pyx_codeobj__872;
static PyObject *__pyx_codeobj__873;
static PyObject *__pyx_codeobj__874;
static PyObject *__pyx_codeobj__875;
static PyObject *__pyx_codeobj__876;
static PyObject *__pyx_codeobj__877;
static PyObject *__pyx_codeobj__878;
static PyObject *__pyx_codeobj__879;
static PyObject *__pyx_codeobj__880;
static PyObject *__pyx_codeobj__881;
static PyObject *__pyx_codeobj__882;
static PyObject *__pyx_codeobj__883;
static PyObject *__pyx_codeobj__884;
static PyObject *__pyx_codeobj__885;
static PyObject *__pyx_codeobj__886;
static PyObject *__pyx_codeobj__887;
static PyObject *__pyx_codeobj__888;
static PyObject *__pyx_codeobj__889;
static PyObject *__pyx_codeobj__890;
static PyObject *__pyx_codeobj__891;
static PyObject *__pyx_codeobj__892;
static PyObject *__pyx_codeobj__893;
static PyObject *__pyx_codeobj__894;
static PyObject *__pyx_codeobj__895;
static PyObject *__pyx_codeobj__896;
static PyObject *__pyx_codeobj__897;
static PyObject *__pyx_codeobj__898;
static PyObject *__pyx_codeobj__899;
static PyObject *__pyx_codeobj__900;
static PyObject *__pyx_codeobj__901;
static PyObject *__pyx_codeobj__902;
static PyObject *__pyx_codeobj__903;
static PyObject *__pyx_codeobj__906;
static PyObject *__pyx_codeobj__907;
static PyObject *__pyx_codeobj__908;
static PyObject *__pyx_codeobj__909;
static PyObject *__pyx_codeobj__910;
static PyObject *__pyx_codeobj__911;
static PyObject *__pyx_codeobj__912;
static PyObject *__pyx_codeobj__913;
static PyObject *__pyx_codeobj__914;
static PyObject *__pyx_codeobj__915;
static PyObject *__pyx_codeobj__916;
static PyObject *__pyx_codeobj__917;
static PyObject *__pyx_codeobj__918;
static PyObject *__pyx_codeobj__919;
static PyObject *__pyx_codeobj__920;
static PyObject *__pyx_codeobj__921;
static PyObject *__pyx_codeobj__922;
static PyObject *__pyx_codeobj__923;
static PyObject *__pyx_codeobj__924;
static PyObject *__pyx_codeobj__925;
static PyObject *__pyx_codeobj__926;
static PyObject *__pyx_codeobj__927;
static PyObject *__pyx_codeobj__928;
static PyObject *__pyx_codeobj__929;
static PyObject *__pyx_codeobj__930;
static PyObject *__pyx_codeobj__931;
static PyObject *__pyx_codeobj__932;
static PyObject *__pyx_codeobj__933;
static PyObject *__pyx_codeobj__934;
static PyObject *__pyx_codeobj__935;
static PyObject *__pyx_codeobj__936;
static PyObject *__pyx_codeobj__937;
static PyObject *__pyx_codeobj__938;
static PyObject *__pyx_codeobj__939;
static PyObject *__pyx_codeobj__940;
static PyObject *__pyx_codeobj__941;
static PyObject *__pyx_codeobj__942;
static PyObject *__pyx_codeobj__943;
static PyObject *__pyx_codeobj__944;
static PyObject *__pyx_codeobj__945;
static PyObject *__pyx_codeobj__946;
static PyObject *__pyx_codeobj__947;
static PyObject *__pyx_codeobj__948;
static PyObject *__pyx_codeobj__949;
static PyObject *__pyx_codeobj__950;
static PyObject *__pyx_codeobj__951;
static PyObject *__pyx_codeobj__952;
static PyObject *__pyx_codeobj__953;
static PyObject *__pyx_codeobj__954;
static PyObject *__pyx_codeobj__955;
static PyObject *__pyx_codeobj__956;
static PyObject *__pyx_codeobj__957;
static PyObject *__pyx_codeobj__958;
static PyObject *__pyx_codeobj__959;
static PyObject *__pyx_codeobj__960;
static PyObject *__pyx_codeobj__961;
static PyObject *__pyx_codeobj__962;
static PyObject *__pyx_codeobj__963;
static PyObject *__pyx_codeobj__964;
static PyObject *__pyx_codeobj__965;
static PyObject *__pyx_codeobj__966;
static PyObject *__pyx_codeobj__967;
static PyObject *__pyx_codeobj__968;
static PyObject *__pyx_codeobj__969;
static PyObject *__pyx_codeobj__970;
static PyObject *__pyx_codeobj__971;
static PyObject *__pyx_codeobj__972;
static PyObject *__pyx_codeobj__973;
static PyObject *__pyx_codeobj__974;
static PyObject *__pyx_codeobj__975;
static PyObject *__pyx_codeobj__976;
static PyObject *__pyx_codeobj__977;
static PyObject *__pyx_codeobj__978;
static PyObject *__pyx_codeobj__979;
static PyObject *__pyx_codeobj__980;
static PyObject *__pyx_codeobj__981;
static PyObject *__pyx_codeobj__982;
static PyObject *__pyx_codeobj__983;
static PyObject *__pyx_codeobj__984;
static PyObject *__pyx_codeobj__985;
static PyObject *__pyx_codeobj__986;
static PyObject *__pyx_codeobj__987;
static PyObject *__pyx_codeobj__988;
static PyObject *__pyx_codeobj__989;
static PyObject *__pyx_codeobj__990;
static PyObject *__pyx_codeobj__991;
static PyObject *__pyx_codeobj__992;
static PyObject *__pyx_codeobj__993;
static PyObject *__pyx_codeobj__994;
static PyObject *__pyx_codeobj__995;
static PyObject *__pyx_codeobj__996;
static PyObject *__pyx_codeobj__997;
static PyObject *__pyx_codeobj__998;
static PyObject *__pyx_codeobj__999;
static PyObject *__pyx_codeobj__1000;
static PyObject *__pyx_codeobj__1001;
static PyObject *__pyx_codeobj__1002;
static PyObject *__pyx_codeobj__1003;
static PyObject *__pyx_codeobj__1004;
static PyObject *__pyx_codeobj__1005;
static PyObject *__pyx_codeobj__1006;
static PyObject *__pyx_codeobj__1007;
static PyObject *__pyx_codeobj__1008;
static PyObject *__pyx_codeobj__1009;
static PyObject *__pyx_codeobj__1010;
static PyObject *__pyx_codeobj__1011;
static PyObject *__pyx_codeobj__1012;
static PyObject *__pyx_codeobj__1013;
static PyObject *__pyx_codeobj__1014;
/* Late includes */

/* "cuda/cuda.pyx":3692
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_9CUcontext_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_9CUcontext_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3692, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3692, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3692, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3692, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUcontext.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUcontext___cinit__(((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_9CUcontext___cinit__(struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3692, 0, __PYX_ERR(0, 3692, __pyx_L1_error));

  /* "cuda/cuda.pyx":3693
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUcontext>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":3694
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUcontext>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":3695
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUcontext>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUcontext *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUcontext)__pyx_v_init_value);

    /* "cuda/cuda.pyx":3693
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUcontext>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":3697
 *             self._ptr[0] = <ccuda.CUcontext>init_value
 *         else:
 *             self._ptr = <ccuda.CUcontext *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUcontext *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":3692
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUcontext.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3698
 *         else:
 *             self._ptr = <ccuda.CUcontext *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_9CUcontext_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_9CUcontext_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUcontext_2__init__(((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_9CUcontext_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 3698, 0, __PYX_ERR(0, 3698, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUcontext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3700
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUcontext ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUcontext_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_9CUcontext_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUcontext_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUcontext_4__repr__(struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 3700, 0, __PYX_ERR(0, 3700, __pyx_L1_error));

  /* "cuda/cuda.pyx":3701
 *         pass
 *     def __repr__(self):
 *         return '<CUcontext ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUcontext, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3700
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUcontext ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUcontext.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3702
 *     def __repr__(self):
 *         return '<CUcontext ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUcontext_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_9CUcontext_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUcontext_6__index__(((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUcontext_6__index__(struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 3702, 0, __PYX_ERR(0, 3702, __pyx_L1_error));

  /* "cuda/cuda.pyx":3703
 *         return '<CUcontext ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3702
 *     def __repr__(self):
 *         return '<CUcontext ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUcontext.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3704
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUcontext_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_9CUcontext_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUcontext_8__int__(((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUcontext_8__int__(struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 3704, 0, __PYX_ERR(0, 3704, __pyx_L1_error));

  /* "cuda/cuda.pyx":3705
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3704
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUcontext.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3706
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUcontext_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_9CUcontext_10getPtr[] = "CUcontext.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9CUcontext_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUcontext_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_9CUcontext_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_9CUcontext_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUcontext_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUcontext_10getPtr(struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__2)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 3706, 0, __PYX_ERR(0, 3706, __pyx_L1_error));

  /* "cuda/cuda.pyx":3707
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUmodule:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3706
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUcontext.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUcontext_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_9CUcontext_12__reduce_cython__[] = "CUcontext.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9CUcontext_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUcontext_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_9CUcontext_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_9CUcontext_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUcontext_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUcontext_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__3)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUcontext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUcontext_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_9CUcontext_14__setstate_cython__[] = "CUcontext.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9CUcontext_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUcontext_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_9CUcontext_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_9CUcontext_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUcontext_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUcontext_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__5)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUcontext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3720
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_8CUmodule_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_8CUmodule_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3720, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3720, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3720, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3720, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmodule.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUmodule___cinit__(((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_8CUmodule___cinit__(struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3720, 0, __PYX_ERR(0, 3720, __pyx_L1_error));

  /* "cuda/cuda.pyx":3721
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUmodule>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":3722
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUmodule>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":3723
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUmodule>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUmodule *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUmodule)__pyx_v_init_value);

    /* "cuda/cuda.pyx":3721
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUmodule>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":3725
 *             self._ptr[0] = <ccuda.CUmodule>init_value
 *         else:
 *             self._ptr = <ccuda.CUmodule *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUmodule *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":3720
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmodule.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3726
 *         else:
 *             self._ptr = <ccuda.CUmodule *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_8CUmodule_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_8CUmodule_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUmodule_2__init__(((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_8CUmodule_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 3726, 0, __PYX_ERR(0, 3726, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmodule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3728
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUmodule ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUmodule_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUmodule_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUmodule_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUmodule_4__repr__(struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 3728, 0, __PYX_ERR(0, 3728, __pyx_L1_error));

  /* "cuda/cuda.pyx":3729
 *         pass
 *     def __repr__(self):
 *         return '<CUmodule ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUmodule, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3728
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUmodule ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUmodule.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3730
 *     def __repr__(self):
 *         return '<CUmodule ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUmodule_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUmodule_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUmodule_6__index__(((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUmodule_6__index__(struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 3730, 0, __PYX_ERR(0, 3730, __pyx_L1_error));

  /* "cuda/cuda.pyx":3731
 *         return '<CUmodule ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3730
 *     def __repr__(self):
 *         return '<CUmodule ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUmodule.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3732
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUmodule_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUmodule_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUmodule_8__int__(((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUmodule_8__int__(struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 3732, 0, __PYX_ERR(0, 3732, __pyx_L1_error));

  /* "cuda/cuda.pyx":3733
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3732
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmodule.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3734
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUmodule_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUmodule_10getPtr[] = "CUmodule.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUmodule_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUmodule_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUmodule_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_8CUmodule_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUmodule_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUmodule_10getPtr(struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__7)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 3734, 0, __PYX_ERR(0, 3734, __pyx_L1_error));

  /* "cuda/cuda.pyx":3735
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUfunction:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3734
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmodule.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUmodule_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUmodule_12__reduce_cython__[] = "CUmodule.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUmodule_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUmodule_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUmodule_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_8CUmodule_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUmodule_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUmodule_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__8)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmodule.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUmodule_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUmodule_14__setstate_cython__[] = "CUmodule.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUmodule_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUmodule_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_8CUmodule_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_8CUmodule_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUmodule_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUmodule_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__10)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmodule.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3748
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_10CUfunction_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_10CUfunction_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3748, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3748, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3748, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3748, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUfunction.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_10CUfunction___cinit__(((struct __pyx_obj_4cuda_4cuda_CUfunction *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_10CUfunction___cinit__(struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3748, 0, __PYX_ERR(0, 3748, __pyx_L1_error));

  /* "cuda/cuda.pyx":3749
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUfunction>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":3750
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUfunction>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":3751
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUfunction>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUfunction *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUfunction)__pyx_v_init_value);

    /* "cuda/cuda.pyx":3749
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUfunction>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":3753
 *             self._ptr[0] = <ccuda.CUfunction>init_value
 *         else:
 *             self._ptr = <ccuda.CUfunction *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUfunction *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":3748
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUfunction.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3754
 *         else:
 *             self._ptr = <ccuda.CUfunction *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_10CUfunction_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_10CUfunction_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_10CUfunction_2__init__(((struct __pyx_obj_4cuda_4cuda_CUfunction *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_10CUfunction_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 3754, 0, __PYX_ERR(0, 3754, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUfunction.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3756
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUfunction ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10CUfunction_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_10CUfunction_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10CUfunction_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUfunction *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10CUfunction_4__repr__(struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 3756, 0, __PYX_ERR(0, 3756, __pyx_L1_error));

  /* "cuda/cuda.pyx":3757
 *         pass
 *     def __repr__(self):
 *         return '<CUfunction ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUfunction, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3756
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUfunction ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUfunction.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3758
 *     def __repr__(self):
 *         return '<CUfunction ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10CUfunction_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_10CUfunction_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10CUfunction_6__index__(((struct __pyx_obj_4cuda_4cuda_CUfunction *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10CUfunction_6__index__(struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 3758, 0, __PYX_ERR(0, 3758, __pyx_L1_error));

  /* "cuda/cuda.pyx":3759
 *         return '<CUfunction ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3758
 *     def __repr__(self):
 *         return '<CUfunction ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUfunction.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3760
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10CUfunction_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_10CUfunction_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10CUfunction_8__int__(((struct __pyx_obj_4cuda_4cuda_CUfunction *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10CUfunction_8__int__(struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 3760, 0, __PYX_ERR(0, 3760, __pyx_L1_error));

  /* "cuda/cuda.pyx":3761
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3760
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUfunction.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3762
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10CUfunction_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_10CUfunction_10getPtr[] = "CUfunction.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_10CUfunction_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_10CUfunction_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_10CUfunction_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_10CUfunction_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10CUfunction_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUfunction *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10CUfunction_10getPtr(struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__12)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 3762, 0, __PYX_ERR(0, 3762, __pyx_L1_error));

  /* "cuda/cuda.pyx":3763
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUarray:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3762
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUfunction.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10CUfunction_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_10CUfunction_12__reduce_cython__[] = "CUfunction.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_10CUfunction_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10CUfunction_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_10CUfunction_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_10CUfunction_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10CUfunction_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUfunction *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10CUfunction_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__13)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUfunction.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10CUfunction_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_10CUfunction_14__setstate_cython__[] = "CUfunction.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_10CUfunction_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10CUfunction_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_10CUfunction_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_10CUfunction_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10CUfunction_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUfunction *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10CUfunction_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__15)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUfunction.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3776
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_7CUarray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_7CUarray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3776, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3776, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3776, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3776, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUarray___cinit__(((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_7CUarray___cinit__(struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3776, 0, __PYX_ERR(0, 3776, __pyx_L1_error));

  /* "cuda/cuda.pyx":3777
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUarray>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":3778
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUarray>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":3779
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUarray>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUarray *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUarray)__pyx_v_init_value);

    /* "cuda/cuda.pyx":3777
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUarray>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":3781
 *             self._ptr[0] = <ccuda.CUarray>init_value
 *         else:
 *             self._ptr = <ccuda.CUarray *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUarray *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":3776
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3782
 *         else:
 *             self._ptr = <ccuda.CUarray *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_7CUarray_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_7CUarray_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUarray_2__init__(((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_7CUarray_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 3782, 0, __PYX_ERR(0, 3782, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarray.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3784
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUarray ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUarray_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_7CUarray_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUarray_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUarray_4__repr__(struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 3784, 0, __PYX_ERR(0, 3784, __pyx_L1_error));

  /* "cuda/cuda.pyx":3785
 *         pass
 *     def __repr__(self):
 *         return '<CUarray ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUarray, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3784
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUarray ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUarray.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3786
 *     def __repr__(self):
 *         return '<CUarray ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUarray_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_7CUarray_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUarray_6__index__(((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUarray_6__index__(struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 3786, 0, __PYX_ERR(0, 3786, __pyx_L1_error));

  /* "cuda/cuda.pyx":3787
 *         return '<CUarray ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3786
 *     def __repr__(self):
 *         return '<CUarray ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUarray.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3788
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUarray_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_7CUarray_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUarray_8__int__(((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUarray_8__int__(struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 3788, 0, __PYX_ERR(0, 3788, __pyx_L1_error));

  /* "cuda/cuda.pyx":3789
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3788
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarray.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3790
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUarray_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_7CUarray_10getPtr[] = "CUarray.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_7CUarray_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUarray_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_7CUarray_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_7CUarray_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUarray_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUarray_10getPtr(struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__17)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 3790, 0, __PYX_ERR(0, 3790, __pyx_L1_error));

  /* "cuda/cuda.pyx":3791
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUmipmappedArray:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3790
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarray.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUarray_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_7CUarray_12__reduce_cython__[] = "CUarray.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_7CUarray_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUarray_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_7CUarray_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_7CUarray_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUarray_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUarray_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__18)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarray.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUarray_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_7CUarray_14__setstate_cython__[] = "CUarray.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_7CUarray_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUarray_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_7CUarray_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_7CUarray_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUarray_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUarray_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__20)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarray.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3804
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUmipmappedArray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUmipmappedArray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3804, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3804, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3804, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3804, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmipmappedArray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmipmappedArray___cinit__(((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUmipmappedArray___cinit__(struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3804, 0, __PYX_ERR(0, 3804, __pyx_L1_error));

  /* "cuda/cuda.pyx":3805
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUmipmappedArray>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":3806
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUmipmappedArray>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":3807
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUmipmappedArray>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUmipmappedArray *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUmipmappedArray)__pyx_v_init_value);

    /* "cuda/cuda.pyx":3805
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUmipmappedArray>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":3809
 *             self._ptr[0] = <ccuda.CUmipmappedArray>init_value
 *         else:
 *             self._ptr = <ccuda.CUmipmappedArray *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUmipmappedArray *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":3804
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmipmappedArray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3810
 *         else:
 *             self._ptr = <ccuda.CUmipmappedArray *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUmipmappedArray_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUmipmappedArray_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmipmappedArray_2__init__(((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUmipmappedArray_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 3810, 0, __PYX_ERR(0, 3810, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmipmappedArray.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3812
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUmipmappedArray ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUmipmappedArray_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUmipmappedArray_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmipmappedArray_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUmipmappedArray_4__repr__(struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 3812, 0, __PYX_ERR(0, 3812, __pyx_L1_error));

  /* "cuda/cuda.pyx":3813
 *         pass
 *     def __repr__(self):
 *         return '<CUmipmappedArray ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUmipmappedArray, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3812
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUmipmappedArray ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUmipmappedArray.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3814
 *     def __repr__(self):
 *         return '<CUmipmappedArray ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUmipmappedArray_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUmipmappedArray_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmipmappedArray_6__index__(((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUmipmappedArray_6__index__(struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 3814, 0, __PYX_ERR(0, 3814, __pyx_L1_error));

  /* "cuda/cuda.pyx":3815
 *         return '<CUmipmappedArray ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3814
 *     def __repr__(self):
 *         return '<CUmipmappedArray ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUmipmappedArray.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3816
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUmipmappedArray_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUmipmappedArray_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmipmappedArray_8__int__(((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUmipmappedArray_8__int__(struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 3816, 0, __PYX_ERR(0, 3816, __pyx_L1_error));

  /* "cuda/cuda.pyx":3817
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3816
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmipmappedArray.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3818
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUmipmappedArray_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUmipmappedArray_10getPtr[] = "CUmipmappedArray.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUmipmappedArray_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUmipmappedArray_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUmipmappedArray_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_16CUmipmappedArray_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmipmappedArray_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUmipmappedArray_10getPtr(struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__22)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 3818, 0, __PYX_ERR(0, 3818, __pyx_L1_error));

  /* "cuda/cuda.pyx":3819
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUtexref:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3818
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmipmappedArray.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUmipmappedArray_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUmipmappedArray_12__reduce_cython__[] = "CUmipmappedArray.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUmipmappedArray_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUmipmappedArray_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUmipmappedArray_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16CUmipmappedArray_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmipmappedArray_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUmipmappedArray_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__23)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmipmappedArray.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUmipmappedArray_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUmipmappedArray_14__setstate_cython__[] = "CUmipmappedArray.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUmipmappedArray_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUmipmappedArray_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16CUmipmappedArray_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16CUmipmappedArray_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmipmappedArray_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUmipmappedArray_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__25)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmipmappedArray.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3832
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_8CUtexref_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_8CUtexref_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3832, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3832, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3832, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3832, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUtexref.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUtexref___cinit__(((struct __pyx_obj_4cuda_4cuda_CUtexref *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_8CUtexref___cinit__(struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3832, 0, __PYX_ERR(0, 3832, __pyx_L1_error));

  /* "cuda/cuda.pyx":3833
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUtexref>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":3834
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUtexref>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":3835
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUtexref>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUtexref *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUtexref)__pyx_v_init_value);

    /* "cuda/cuda.pyx":3833
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUtexref>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":3837
 *             self._ptr[0] = <ccuda.CUtexref>init_value
 *         else:
 *             self._ptr = <ccuda.CUtexref *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUtexref *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":3832
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUtexref.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3838
 *         else:
 *             self._ptr = <ccuda.CUtexref *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_8CUtexref_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_8CUtexref_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUtexref_2__init__(((struct __pyx_obj_4cuda_4cuda_CUtexref *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_8CUtexref_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 3838, 0, __PYX_ERR(0, 3838, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUtexref.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3840
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUtexref ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUtexref_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUtexref_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUtexref_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUtexref *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUtexref_4__repr__(struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 3840, 0, __PYX_ERR(0, 3840, __pyx_L1_error));

  /* "cuda/cuda.pyx":3841
 *         pass
 *     def __repr__(self):
 *         return '<CUtexref ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUtexref, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3840
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUtexref ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUtexref.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3842
 *     def __repr__(self):
 *         return '<CUtexref ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUtexref_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUtexref_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUtexref_6__index__(((struct __pyx_obj_4cuda_4cuda_CUtexref *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUtexref_6__index__(struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 3842, 0, __PYX_ERR(0, 3842, __pyx_L1_error));

  /* "cuda/cuda.pyx":3843
 *         return '<CUtexref ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3842
 *     def __repr__(self):
 *         return '<CUtexref ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUtexref.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3844
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUtexref_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUtexref_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUtexref_8__int__(((struct __pyx_obj_4cuda_4cuda_CUtexref *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUtexref_8__int__(struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 3844, 0, __PYX_ERR(0, 3844, __pyx_L1_error));

  /* "cuda/cuda.pyx":3845
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3844
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUtexref.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3846
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUtexref_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUtexref_10getPtr[] = "CUtexref.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUtexref_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUtexref_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUtexref_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_8CUtexref_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUtexref_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUtexref *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUtexref_10getPtr(struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__27)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 3846, 0, __PYX_ERR(0, 3846, __pyx_L1_error));

  /* "cuda/cuda.pyx":3847
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUsurfref:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3846
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUtexref.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUtexref_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUtexref_12__reduce_cython__[] = "CUtexref.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUtexref_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUtexref_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUtexref_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_8CUtexref_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUtexref_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUtexref *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUtexref_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__28)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUtexref.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUtexref_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUtexref_14__setstate_cython__[] = "CUtexref.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUtexref_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUtexref_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_8CUtexref_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_8CUtexref_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUtexref_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUtexref *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUtexref_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__30)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUtexref.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3860
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_9CUsurfref_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_9CUsurfref_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3860, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3860, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3860, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3860, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUsurfref.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUsurfref___cinit__(((struct __pyx_obj_4cuda_4cuda_CUsurfref *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_9CUsurfref___cinit__(struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3860, 0, __PYX_ERR(0, 3860, __pyx_L1_error));

  /* "cuda/cuda.pyx":3861
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUsurfref>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":3862
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUsurfref>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":3863
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUsurfref>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUsurfref *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUsurfref)__pyx_v_init_value);

    /* "cuda/cuda.pyx":3861
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUsurfref>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":3865
 *             self._ptr[0] = <ccuda.CUsurfref>init_value
 *         else:
 *             self._ptr = <ccuda.CUsurfref *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUsurfref *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":3860
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUsurfref.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3866
 *         else:
 *             self._ptr = <ccuda.CUsurfref *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_9CUsurfref_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_9CUsurfref_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUsurfref_2__init__(((struct __pyx_obj_4cuda_4cuda_CUsurfref *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_9CUsurfref_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 3866, 0, __PYX_ERR(0, 3866, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUsurfref.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3868
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUsurfref ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUsurfref_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_9CUsurfref_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUsurfref_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUsurfref *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUsurfref_4__repr__(struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 3868, 0, __PYX_ERR(0, 3868, __pyx_L1_error));

  /* "cuda/cuda.pyx":3869
 *         pass
 *     def __repr__(self):
 *         return '<CUsurfref ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUsurfref, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3868
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUsurfref ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUsurfref.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3870
 *     def __repr__(self):
 *         return '<CUsurfref ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUsurfref_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_9CUsurfref_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUsurfref_6__index__(((struct __pyx_obj_4cuda_4cuda_CUsurfref *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUsurfref_6__index__(struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 3870, 0, __PYX_ERR(0, 3870, __pyx_L1_error));

  /* "cuda/cuda.pyx":3871
 *         return '<CUsurfref ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3870
 *     def __repr__(self):
 *         return '<CUsurfref ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUsurfref.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3872
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUsurfref_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_9CUsurfref_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUsurfref_8__int__(((struct __pyx_obj_4cuda_4cuda_CUsurfref *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUsurfref_8__int__(struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 3872, 0, __PYX_ERR(0, 3872, __pyx_L1_error));

  /* "cuda/cuda.pyx":3873
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3872
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUsurfref.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3874
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUsurfref_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_9CUsurfref_10getPtr[] = "CUsurfref.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9CUsurfref_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUsurfref_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_9CUsurfref_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_9CUsurfref_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUsurfref_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUsurfref *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUsurfref_10getPtr(struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__32)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 3874, 0, __PYX_ERR(0, 3874, __pyx_L1_error));

  /* "cuda/cuda.pyx":3875
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUevent:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3874
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUsurfref.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUsurfref_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_9CUsurfref_12__reduce_cython__[] = "CUsurfref.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9CUsurfref_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUsurfref_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_9CUsurfref_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_9CUsurfref_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUsurfref_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUsurfref *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUsurfref_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__33)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUsurfref.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUsurfref_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_9CUsurfref_14__setstate_cython__[] = "CUsurfref.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9CUsurfref_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUsurfref_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_9CUsurfref_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_9CUsurfref_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUsurfref_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUsurfref *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUsurfref_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__35)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUsurfref.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3888
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_7CUevent_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_7CUevent_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3888, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3888, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3888, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3888, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUevent.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUevent___cinit__(((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_7CUevent___cinit__(struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3888, 0, __PYX_ERR(0, 3888, __pyx_L1_error));

  /* "cuda/cuda.pyx":3889
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUevent>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":3890
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUevent>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":3891
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUevent>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUevent *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUevent)__pyx_v_init_value);

    /* "cuda/cuda.pyx":3889
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUevent>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":3893
 *             self._ptr[0] = <ccuda.CUevent>init_value
 *         else:
 *             self._ptr = <ccuda.CUevent *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUevent *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":3888
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUevent.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3894
 *         else:
 *             self._ptr = <ccuda.CUevent *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_7CUevent_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_7CUevent_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUevent_2__init__(((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_7CUevent_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 3894, 0, __PYX_ERR(0, 3894, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUevent.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3896
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUevent ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUevent_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_7CUevent_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUevent_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUevent_4__repr__(struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 3896, 0, __PYX_ERR(0, 3896, __pyx_L1_error));

  /* "cuda/cuda.pyx":3897
 *         pass
 *     def __repr__(self):
 *         return '<CUevent ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUevent, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3896
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUevent ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUevent.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3898
 *     def __repr__(self):
 *         return '<CUevent ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUevent_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_7CUevent_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUevent_6__index__(((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUevent_6__index__(struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 3898, 0, __PYX_ERR(0, 3898, __pyx_L1_error));

  /* "cuda/cuda.pyx":3899
 *         return '<CUevent ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3898
 *     def __repr__(self):
 *         return '<CUevent ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUevent.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3900
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUevent_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_7CUevent_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUevent_8__int__(((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUevent_8__int__(struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 3900, 0, __PYX_ERR(0, 3900, __pyx_L1_error));

  /* "cuda/cuda.pyx":3901
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3900
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUevent.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3902
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUevent_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_7CUevent_10getPtr[] = "CUevent.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_7CUevent_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUevent_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_7CUevent_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_7CUevent_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUevent_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUevent_10getPtr(struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__37)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 3902, 0, __PYX_ERR(0, 3902, __pyx_L1_error));

  /* "cuda/cuda.pyx":3903
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUstream:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3902
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUevent.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUevent_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_7CUevent_12__reduce_cython__[] = "CUevent.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_7CUevent_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUevent_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_7CUevent_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_7CUevent_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUevent_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUevent_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__38)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUevent.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUevent_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_7CUevent_14__setstate_cython__[] = "CUevent.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_7CUevent_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUevent_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_7CUevent_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_7CUevent_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUevent_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUevent_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__40)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUevent.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3916
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_8CUstream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_8CUstream_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3916, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3916, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3916, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3916, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstream.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUstream___cinit__(((struct __pyx_obj_4cuda_4cuda_CUstream *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_8CUstream___cinit__(struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3916, 0, __PYX_ERR(0, 3916, __pyx_L1_error));

  /* "cuda/cuda.pyx":3917
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUstream>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":3918
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUstream>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":3919
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUstream>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUstream *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUstream)__pyx_v_init_value);

    /* "cuda/cuda.pyx":3917
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUstream>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":3921
 *             self._ptr[0] = <ccuda.CUstream>init_value
 *         else:
 *             self._ptr = <ccuda.CUstream *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUstream *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":3916
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstream.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3922
 *         else:
 *             self._ptr = <ccuda.CUstream *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_8CUstream_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_8CUstream_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUstream_2__init__(((struct __pyx_obj_4cuda_4cuda_CUstream *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_8CUstream_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 3922, 0, __PYX_ERR(0, 3922, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3924
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUstream ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUstream_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUstream_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUstream_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUstream *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUstream_4__repr__(struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 3924, 0, __PYX_ERR(0, 3924, __pyx_L1_error));

  /* "cuda/cuda.pyx":3925
 *         pass
 *     def __repr__(self):
 *         return '<CUstream ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUstream, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3924
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUstream ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUstream.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3926
 *     def __repr__(self):
 *         return '<CUstream ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUstream_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUstream_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUstream_6__index__(((struct __pyx_obj_4cuda_4cuda_CUstream *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUstream_6__index__(struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 3926, 0, __PYX_ERR(0, 3926, __pyx_L1_error));

  /* "cuda/cuda.pyx":3927
 *         return '<CUstream ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3926
 *     def __repr__(self):
 *         return '<CUstream ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUstream.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3928
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUstream_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUstream_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUstream_8__int__(((struct __pyx_obj_4cuda_4cuda_CUstream *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUstream_8__int__(struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 3928, 0, __PYX_ERR(0, 3928, __pyx_L1_error));

  /* "cuda/cuda.pyx":3929
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3928
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstream.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3930
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUstream_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUstream_10getPtr[] = "CUstream.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUstream_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUstream_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUstream_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_8CUstream_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUstream_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUstream *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUstream_10getPtr(struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__42)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 3930, 0, __PYX_ERR(0, 3930, __pyx_L1_error));

  /* "cuda/cuda.pyx":3931
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUgraphicsResource:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3930
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstream.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUstream_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUstream_12__reduce_cython__[] = "CUstream.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUstream_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUstream_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUstream_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_8CUstream_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUstream_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUstream *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUstream_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__43)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUstream_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUstream_14__setstate_cython__[] = "CUstream.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUstream_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUstream_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_8CUstream_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_8CUstream_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUstream_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUstream *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUstream_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__45)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3944
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_18CUgraphicsResource_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_18CUgraphicsResource_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3944, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3944, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3944, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3944, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUgraphicsResource.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUgraphicsResource___cinit__(((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_18CUgraphicsResource___cinit__(struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3944, 0, __PYX_ERR(0, 3944, __pyx_L1_error));

  /* "cuda/cuda.pyx":3945
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUgraphicsResource>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":3946
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUgraphicsResource>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":3947
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUgraphicsResource>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUgraphicsResource *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUgraphicsResource)__pyx_v_init_value);

    /* "cuda/cuda.pyx":3945
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUgraphicsResource>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":3949
 *             self._ptr[0] = <ccuda.CUgraphicsResource>init_value
 *         else:
 *             self._ptr = <ccuda.CUgraphicsResource *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUgraphicsResource *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":3944
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUgraphicsResource.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3950
 *         else:
 *             self._ptr = <ccuda.CUgraphicsResource *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_18CUgraphicsResource_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_18CUgraphicsResource_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUgraphicsResource_2__init__(((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_18CUgraphicsResource_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 3950, 0, __PYX_ERR(0, 3950, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUgraphicsResource.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3952
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUgraphicsResource ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUgraphicsResource_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_18CUgraphicsResource_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUgraphicsResource_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUgraphicsResource_4__repr__(struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 3952, 0, __PYX_ERR(0, 3952, __pyx_L1_error));

  /* "cuda/cuda.pyx":3953
 *         pass
 *     def __repr__(self):
 *         return '<CUgraphicsResource ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUgraphicsResource, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3952
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUgraphicsResource ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUgraphicsResource.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3954
 *     def __repr__(self):
 *         return '<CUgraphicsResource ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUgraphicsResource_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_18CUgraphicsResource_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUgraphicsResource_6__index__(((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUgraphicsResource_6__index__(struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 3954, 0, __PYX_ERR(0, 3954, __pyx_L1_error));

  /* "cuda/cuda.pyx":3955
 *         return '<CUgraphicsResource ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3954
 *     def __repr__(self):
 *         return '<CUgraphicsResource ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUgraphicsResource.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3956
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUgraphicsResource_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_18CUgraphicsResource_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUgraphicsResource_8__int__(((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUgraphicsResource_8__int__(struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 3956, 0, __PYX_ERR(0, 3956, __pyx_L1_error));

  /* "cuda/cuda.pyx":3957
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3956
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraphicsResource.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3958
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUgraphicsResource_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_18CUgraphicsResource_10getPtr[] = "CUgraphicsResource.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_18CUgraphicsResource_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUgraphicsResource_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_18CUgraphicsResource_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_18CUgraphicsResource_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUgraphicsResource_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUgraphicsResource_10getPtr(struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__47)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 3958, 0, __PYX_ERR(0, 3958, __pyx_L1_error));

  /* "cuda/cuda.pyx":3959
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUexternalMemory:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3958
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraphicsResource.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUgraphicsResource_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_18CUgraphicsResource_12__reduce_cython__[] = "CUgraphicsResource.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_18CUgraphicsResource_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUgraphicsResource_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_18CUgraphicsResource_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_18CUgraphicsResource_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUgraphicsResource_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUgraphicsResource_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__48)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraphicsResource.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUgraphicsResource_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_18CUgraphicsResource_14__setstate_cython__[] = "CUgraphicsResource.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_18CUgraphicsResource_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUgraphicsResource_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_18CUgraphicsResource_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_18CUgraphicsResource_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUgraphicsResource_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUgraphicsResource_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__50)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraphicsResource.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3972
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUexternalMemory_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUexternalMemory_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3972, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3972, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3972, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3972, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexternalMemory.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUexternalMemory___cinit__(((struct __pyx_obj_4cuda_4cuda_CUexternalMemory *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUexternalMemory___cinit__(struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3972, 0, __PYX_ERR(0, 3972, __pyx_L1_error));

  /* "cuda/cuda.pyx":3973
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUexternalMemory>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":3974
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUexternalMemory>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":3975
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUexternalMemory>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUexternalMemory *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUexternalMemory)__pyx_v_init_value);

    /* "cuda/cuda.pyx":3973
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUexternalMemory>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":3977
 *             self._ptr[0] = <ccuda.CUexternalMemory>init_value
 *         else:
 *             self._ptr = <ccuda.CUexternalMemory *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUexternalMemory *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":3972
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexternalMemory.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3978
 *         else:
 *             self._ptr = <ccuda.CUexternalMemory *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUexternalMemory_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUexternalMemory_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUexternalMemory_2__init__(((struct __pyx_obj_4cuda_4cuda_CUexternalMemory *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUexternalMemory_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 3978, 0, __PYX_ERR(0, 3978, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexternalMemory.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3980
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUexternalMemory ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUexternalMemory_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUexternalMemory_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUexternalMemory_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUexternalMemory *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUexternalMemory_4__repr__(struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 3980, 0, __PYX_ERR(0, 3980, __pyx_L1_error));

  /* "cuda/cuda.pyx":3981
 *         pass
 *     def __repr__(self):
 *         return '<CUexternalMemory ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUexternalMemory, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3980
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUexternalMemory ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUexternalMemory.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3982
 *     def __repr__(self):
 *         return '<CUexternalMemory ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUexternalMemory_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUexternalMemory_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUexternalMemory_6__index__(((struct __pyx_obj_4cuda_4cuda_CUexternalMemory *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUexternalMemory_6__index__(struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 3982, 0, __PYX_ERR(0, 3982, __pyx_L1_error));

  /* "cuda/cuda.pyx":3983
 *         return '<CUexternalMemory ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3982
 *     def __repr__(self):
 *         return '<CUexternalMemory ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUexternalMemory.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3984
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUexternalMemory_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUexternalMemory_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUexternalMemory_8__int__(((struct __pyx_obj_4cuda_4cuda_CUexternalMemory *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUexternalMemory_8__int__(struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 3984, 0, __PYX_ERR(0, 3984, __pyx_L1_error));

  /* "cuda/cuda.pyx":3985
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3984
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexternalMemory.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":3986
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUexternalMemory_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUexternalMemory_10getPtr[] = "CUexternalMemory.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUexternalMemory_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUexternalMemory_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUexternalMemory_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_16CUexternalMemory_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUexternalMemory_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUexternalMemory *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUexternalMemory_10getPtr(struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__52)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 3986, 0, __PYX_ERR(0, 3986, __pyx_L1_error));

  /* "cuda/cuda.pyx":3987
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUexternalSemaphore:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":3986
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexternalMemory.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUexternalMemory_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUexternalMemory_12__reduce_cython__[] = "CUexternalMemory.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUexternalMemory_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUexternalMemory_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUexternalMemory_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16CUexternalMemory_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUexternalMemory_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUexternalMemory *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUexternalMemory_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__53)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexternalMemory.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUexternalMemory_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUexternalMemory_14__setstate_cython__[] = "CUexternalMemory.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUexternalMemory_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUexternalMemory_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16CUexternalMemory_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16CUexternalMemory_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUexternalMemory_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUexternalMemory *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUexternalMemory_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__55)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexternalMemory.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4000
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_19CUexternalSemaphore_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_19CUexternalSemaphore_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4000, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4000, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4000, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4000, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexternalSemaphore.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUexternalSemaphore___cinit__(((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_19CUexternalSemaphore___cinit__(struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4000, 0, __PYX_ERR(0, 4000, __pyx_L1_error));

  /* "cuda/cuda.pyx":4001
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUexternalSemaphore>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4002
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUexternalSemaphore>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4003
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUexternalSemaphore>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUexternalSemaphore *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUexternalSemaphore)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4001
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUexternalSemaphore>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4005
 *             self._ptr[0] = <ccuda.CUexternalSemaphore>init_value
 *         else:
 *             self._ptr = <ccuda.CUexternalSemaphore *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUexternalSemaphore *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4000
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexternalSemaphore.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4006
 *         else:
 *             self._ptr = <ccuda.CUexternalSemaphore *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_19CUexternalSemaphore_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_19CUexternalSemaphore_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUexternalSemaphore_2__init__(((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_19CUexternalSemaphore_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4006, 0, __PYX_ERR(0, 4006, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexternalSemaphore.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4008
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUexternalSemaphore ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUexternalSemaphore_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_19CUexternalSemaphore_4__repr__(struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4008, 0, __PYX_ERR(0, 4008, __pyx_L1_error));

  /* "cuda/cuda.pyx":4009
 *         pass
 *     def __repr__(self):
 *         return '<CUexternalSemaphore ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUexternalSemaphore, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4008
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUexternalSemaphore ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUexternalSemaphore.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4010
 *     def __repr__(self):
 *         return '<CUexternalSemaphore ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUexternalSemaphore_6__index__(((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_19CUexternalSemaphore_6__index__(struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4010, 0, __PYX_ERR(0, 4010, __pyx_L1_error));

  /* "cuda/cuda.pyx":4011
 *         return '<CUexternalSemaphore ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4010
 *     def __repr__(self):
 *         return '<CUexternalSemaphore ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUexternalSemaphore.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4012
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUexternalSemaphore_8__int__(((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_19CUexternalSemaphore_8__int__(struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4012, 0, __PYX_ERR(0, 4012, __pyx_L1_error));

  /* "cuda/cuda.pyx":4013
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4012
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexternalSemaphore.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4014
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_19CUexternalSemaphore_10getPtr[] = "CUexternalSemaphore.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_19CUexternalSemaphore_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_19CUexternalSemaphore_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUexternalSemaphore_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_19CUexternalSemaphore_10getPtr(struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__57)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4014, 0, __PYX_ERR(0, 4014, __pyx_L1_error));

  /* "cuda/cuda.pyx":4015
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUgraph:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4014
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexternalSemaphore.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_19CUexternalSemaphore_12__reduce_cython__[] = "CUexternalSemaphore.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_19CUexternalSemaphore_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_19CUexternalSemaphore_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUexternalSemaphore_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_19CUexternalSemaphore_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__58)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexternalSemaphore.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_19CUexternalSemaphore_14__setstate_cython__[] = "CUexternalSemaphore.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_19CUexternalSemaphore_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_19CUexternalSemaphore_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUexternalSemaphore_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_19CUexternalSemaphore_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__60)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexternalSemaphore.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4028
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_7CUgraph_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_7CUgraph_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4028, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4028, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4028, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4028, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUgraph.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUgraph___cinit__(((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_7CUgraph___cinit__(struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4028, 0, __PYX_ERR(0, 4028, __pyx_L1_error));

  /* "cuda/cuda.pyx":4029
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUgraph>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4030
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUgraph>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4031
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUgraph>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUgraph *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUgraph)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4029
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUgraph>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4033
 *             self._ptr[0] = <ccuda.CUgraph>init_value
 *         else:
 *             self._ptr = <ccuda.CUgraph *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUgraph *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4028
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUgraph.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4034
 *         else:
 *             self._ptr = <ccuda.CUgraph *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_7CUgraph_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_7CUgraph_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUgraph_2__init__(((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_7CUgraph_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4034, 0, __PYX_ERR(0, 4034, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUgraph.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4036
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUgraph ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUgraph_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_7CUgraph_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUgraph_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUgraph_4__repr__(struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4036, 0, __PYX_ERR(0, 4036, __pyx_L1_error));

  /* "cuda/cuda.pyx":4037
 *         pass
 *     def __repr__(self):
 *         return '<CUgraph ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUgraph, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4036
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUgraph ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUgraph.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4038
 *     def __repr__(self):
 *         return '<CUgraph ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUgraph_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_7CUgraph_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUgraph_6__index__(((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUgraph_6__index__(struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4038, 0, __PYX_ERR(0, 4038, __pyx_L1_error));

  /* "cuda/cuda.pyx":4039
 *         return '<CUgraph ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4038
 *     def __repr__(self):
 *         return '<CUgraph ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUgraph.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4040
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUgraph_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_7CUgraph_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUgraph_8__int__(((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUgraph_8__int__(struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4040, 0, __PYX_ERR(0, 4040, __pyx_L1_error));

  /* "cuda/cuda.pyx":4041
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4040
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraph.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4042
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUgraph_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_7CUgraph_10getPtr[] = "CUgraph.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_7CUgraph_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUgraph_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_7CUgraph_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_7CUgraph_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUgraph_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUgraph_10getPtr(struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__62)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4042, 0, __PYX_ERR(0, 4042, __pyx_L1_error));

  /* "cuda/cuda.pyx":4043
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUgraphNode:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4042
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraph.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUgraph_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_7CUgraph_12__reduce_cython__[] = "CUgraph.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_7CUgraph_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUgraph_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_7CUgraph_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_7CUgraph_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUgraph_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUgraph_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__63)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraph.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7CUgraph_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_7CUgraph_14__setstate_cython__[] = "CUgraph.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_7CUgraph_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUgraph_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_7CUgraph_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_7CUgraph_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_7CUgraph_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_7CUgraph_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__65)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraph.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4056
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_11CUgraphNode_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_11CUgraphNode_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4056, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4056, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4056, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4056, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUgraphNode.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphNode___cinit__(((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_11CUgraphNode___cinit__(struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4056, 0, __PYX_ERR(0, 4056, __pyx_L1_error));

  /* "cuda/cuda.pyx":4057
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUgraphNode>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4058
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUgraphNode>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4059
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUgraphNode>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUgraphNode *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUgraphNode)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4057
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUgraphNode>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4061
 *             self._ptr[0] = <ccuda.CUgraphNode>init_value
 *         else:
 *             self._ptr = <ccuda.CUgraphNode *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUgraphNode *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4056
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUgraphNode.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4062
 *         else:
 *             self._ptr = <ccuda.CUgraphNode *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_11CUgraphNode_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_11CUgraphNode_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphNode_2__init__(((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_11CUgraphNode_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4062, 0, __PYX_ERR(0, 4062, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUgraphNode.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4064
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUgraphNode ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphNode_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphNode_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphNode_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphNode_4__repr__(struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4064, 0, __PYX_ERR(0, 4064, __pyx_L1_error));

  /* "cuda/cuda.pyx":4065
 *         pass
 *     def __repr__(self):
 *         return '<CUgraphNode ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUgraphNode, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4064
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUgraphNode ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUgraphNode.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4066
 *     def __repr__(self):
 *         return '<CUgraphNode ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphNode_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphNode_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphNode_6__index__(((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphNode_6__index__(struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4066, 0, __PYX_ERR(0, 4066, __pyx_L1_error));

  /* "cuda/cuda.pyx":4067
 *         return '<CUgraphNode ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4066
 *     def __repr__(self):
 *         return '<CUgraphNode ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUgraphNode.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4068
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphNode_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphNode_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphNode_8__int__(((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphNode_8__int__(struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4068, 0, __PYX_ERR(0, 4068, __pyx_L1_error));

  /* "cuda/cuda.pyx":4069
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4068
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraphNode.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4070
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphNode_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUgraphNode_10getPtr[] = "CUgraphNode.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUgraphNode_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUgraphNode_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUgraphNode_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphNode_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphNode_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphNode_10getPtr(struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__67)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4070, 0, __PYX_ERR(0, 4070, __pyx_L1_error));

  /* "cuda/cuda.pyx":4071
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUgraphExec:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4070
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraphNode.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphNode_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUgraphNode_12__reduce_cython__[] = "CUgraphNode.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUgraphNode_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUgraphNode_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUgraphNode_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphNode_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphNode_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphNode_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__68)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraphNode.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphNode_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUgraphNode_14__setstate_cython__[] = "CUgraphNode.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUgraphNode_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUgraphNode_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11CUgraphNode_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphNode_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphNode_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphNode_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__70)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraphNode.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4084
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_11CUgraphExec_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_11CUgraphExec_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4084, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4084, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4084, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4084, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUgraphExec.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphExec___cinit__(((struct __pyx_obj_4cuda_4cuda_CUgraphExec *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_11CUgraphExec___cinit__(struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4084, 0, __PYX_ERR(0, 4084, __pyx_L1_error));

  /* "cuda/cuda.pyx":4085
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUgraphExec>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4086
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUgraphExec>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4087
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUgraphExec>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUgraphExec *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUgraphExec)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4085
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUgraphExec>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4089
 *             self._ptr[0] = <ccuda.CUgraphExec>init_value
 *         else:
 *             self._ptr = <ccuda.CUgraphExec *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUgraphExec *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4084
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUgraphExec.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4090
 *         else:
 *             self._ptr = <ccuda.CUgraphExec *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_11CUgraphExec_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_11CUgraphExec_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphExec_2__init__(((struct __pyx_obj_4cuda_4cuda_CUgraphExec *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_11CUgraphExec_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4090, 0, __PYX_ERR(0, 4090, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUgraphExec.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4092
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUgraphExec ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphExec_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphExec_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphExec_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUgraphExec *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphExec_4__repr__(struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4092, 0, __PYX_ERR(0, 4092, __pyx_L1_error));

  /* "cuda/cuda.pyx":4093
 *         pass
 *     def __repr__(self):
 *         return '<CUgraphExec ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUgraphExec, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4092
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUgraphExec ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUgraphExec.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4094
 *     def __repr__(self):
 *         return '<CUgraphExec ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphExec_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphExec_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphExec_6__index__(((struct __pyx_obj_4cuda_4cuda_CUgraphExec *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphExec_6__index__(struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4094, 0, __PYX_ERR(0, 4094, __pyx_L1_error));

  /* "cuda/cuda.pyx":4095
 *         return '<CUgraphExec ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4094
 *     def __repr__(self):
 *         return '<CUgraphExec ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUgraphExec.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4096
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphExec_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphExec_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphExec_8__int__(((struct __pyx_obj_4cuda_4cuda_CUgraphExec *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphExec_8__int__(struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4096, 0, __PYX_ERR(0, 4096, __pyx_L1_error));

  /* "cuda/cuda.pyx":4097
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4096
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraphExec.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4098
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphExec_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUgraphExec_10getPtr[] = "CUgraphExec.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUgraphExec_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUgraphExec_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUgraphExec_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphExec_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphExec_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUgraphExec *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphExec_10getPtr(struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__72)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4098, 0, __PYX_ERR(0, 4098, __pyx_L1_error));

  /* "cuda/cuda.pyx":4099
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUmemoryPool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4098
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraphExec.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphExec_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUgraphExec_12__reduce_cython__[] = "CUgraphExec.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUgraphExec_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUgraphExec_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUgraphExec_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphExec_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphExec_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUgraphExec *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphExec_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__73)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraphExec.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphExec_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUgraphExec_14__setstate_cython__[] = "CUgraphExec.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUgraphExec_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUgraphExec_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11CUgraphExec_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11CUgraphExec_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUgraphExec_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUgraphExec *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUgraphExec_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__75)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUgraphExec.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4112
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUmemoryPool_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUmemoryPool_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4112, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4112, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4112, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4112, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemoryPool.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUmemoryPool___cinit__(((struct __pyx_obj_4cuda_4cuda_CUmemoryPool *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUmemoryPool___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4112, 0, __PYX_ERR(0, 4112, __pyx_L1_error));

  /* "cuda/cuda.pyx":4113
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUmemoryPool>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4114
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUmemoryPool>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4115
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUmemoryPool>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUmemoryPool *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUmemoryPool)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4113
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUmemoryPool>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4117
 *             self._ptr[0] = <ccuda.CUmemoryPool>init_value
 *         else:
 *             self._ptr = <ccuda.CUmemoryPool *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUmemoryPool *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4112
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemoryPool.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4118
 *         else:
 *             self._ptr = <ccuda.CUmemoryPool *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUmemoryPool_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUmemoryPool_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUmemoryPool_2__init__(((struct __pyx_obj_4cuda_4cuda_CUmemoryPool *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUmemoryPool_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4118, 0, __PYX_ERR(0, 4118, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemoryPool.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4120
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUmemoryPool ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUmemoryPool_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUmemoryPool_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUmemoryPool_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUmemoryPool *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUmemoryPool_4__repr__(struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4120, 0, __PYX_ERR(0, 4120, __pyx_L1_error));

  /* "cuda/cuda.pyx":4121
 *         pass
 *     def __repr__(self):
 *         return '<CUmemoryPool ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUmemoryPool, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4120
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUmemoryPool ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUmemoryPool.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4122
 *     def __repr__(self):
 *         return '<CUmemoryPool ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUmemoryPool_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUmemoryPool_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUmemoryPool_6__index__(((struct __pyx_obj_4cuda_4cuda_CUmemoryPool *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUmemoryPool_6__index__(struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4122, 0, __PYX_ERR(0, 4122, __pyx_L1_error));

  /* "cuda/cuda.pyx":4123
 *         return '<CUmemoryPool ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4122
 *     def __repr__(self):
 *         return '<CUmemoryPool ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUmemoryPool.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4124
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUmemoryPool_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUmemoryPool_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUmemoryPool_8__int__(((struct __pyx_obj_4cuda_4cuda_CUmemoryPool *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUmemoryPool_8__int__(struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4124, 0, __PYX_ERR(0, 4124, __pyx_L1_error));

  /* "cuda/cuda.pyx":4125
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4124
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemoryPool.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4126
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUmemoryPool_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_12CUmemoryPool_10getPtr[] = "CUmemoryPool.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12CUmemoryPool_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUmemoryPool_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUmemoryPool_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_12CUmemoryPool_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUmemoryPool_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUmemoryPool *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUmemoryPool_10getPtr(struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__77)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4126, 0, __PYX_ERR(0, 4126, __pyx_L1_error));

  /* "cuda/cuda.pyx":4127
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUuserObject:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4126
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemoryPool.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUmemoryPool_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_12CUmemoryPool_12__reduce_cython__[] = "CUmemoryPool.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12CUmemoryPool_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUmemoryPool_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUmemoryPool_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_12CUmemoryPool_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUmemoryPool_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemoryPool *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUmemoryPool_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__78)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemoryPool.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUmemoryPool_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_12CUmemoryPool_14__setstate_cython__[] = "CUmemoryPool.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12CUmemoryPool_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUmemoryPool_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_12CUmemoryPool_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_12CUmemoryPool_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUmemoryPool_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemoryPool *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUmemoryPool_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__80)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemoryPool.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4140
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUuserObject_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUuserObject_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4140, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4140, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4140, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4140, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUuserObject.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUuserObject___cinit__(((struct __pyx_obj_4cuda_4cuda_CUuserObject *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUuserObject___cinit__(struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4140, 0, __PYX_ERR(0, 4140, __pyx_L1_error));

  /* "cuda/cuda.pyx":4141
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUuserObject>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4142
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUuserObject>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4143
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUuserObject>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUuserObject *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUuserObject)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4141
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUuserObject>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4145
 *             self._ptr[0] = <ccuda.CUuserObject>init_value
 *         else:
 *             self._ptr = <ccuda.CUuserObject *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUuserObject *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4140
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUuserObject.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4146
 *         else:
 *             self._ptr = <ccuda.CUuserObject *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUuserObject_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUuserObject_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUuserObject_2__init__(((struct __pyx_obj_4cuda_4cuda_CUuserObject *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUuserObject_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4146, 0, __PYX_ERR(0, 4146, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUuserObject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4148
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUuserObject ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUuserObject_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUuserObject_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUuserObject_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUuserObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUuserObject_4__repr__(struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4148, 0, __PYX_ERR(0, 4148, __pyx_L1_error));

  /* "cuda/cuda.pyx":4149
 *         pass
 *     def __repr__(self):
 *         return '<CUuserObject ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUuserObject, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4148
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUuserObject ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUuserObject.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4150
 *     def __repr__(self):
 *         return '<CUuserObject ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUuserObject_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUuserObject_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUuserObject_6__index__(((struct __pyx_obj_4cuda_4cuda_CUuserObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUuserObject_6__index__(struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4150, 0, __PYX_ERR(0, 4150, __pyx_L1_error));

  /* "cuda/cuda.pyx":4151
 *         return '<CUuserObject ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4150
 *     def __repr__(self):
 *         return '<CUuserObject ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUuserObject.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4152
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUuserObject_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUuserObject_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUuserObject_8__int__(((struct __pyx_obj_4cuda_4cuda_CUuserObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUuserObject_8__int__(struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4152, 0, __PYX_ERR(0, 4152, __pyx_L1_error));

  /* "cuda/cuda.pyx":4153
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4152
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUuserObject.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4154
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUuserObject_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_12CUuserObject_10getPtr[] = "CUuserObject.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12CUuserObject_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUuserObject_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUuserObject_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_12CUuserObject_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUuserObject_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUuserObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUuserObject_10getPtr(struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__82)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4154, 0, __PYX_ERR(0, 4154, __pyx_L1_error));

  /* "cuda/cuda.pyx":4155
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUlinkState:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4154
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUuserObject.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUuserObject_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_12CUuserObject_12__reduce_cython__[] = "CUuserObject.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12CUuserObject_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUuserObject_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUuserObject_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_12CUuserObject_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUuserObject_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUuserObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUuserObject_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__83)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUuserObject.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUuserObject_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_12CUuserObject_14__setstate_cython__[] = "CUuserObject.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12CUuserObject_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUuserObject_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_12CUuserObject_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_12CUuserObject_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUuserObject_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUuserObject *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUuserObject_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__85)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUuserObject.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4166
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_11CUlinkState_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_11CUlinkState_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4166, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4166, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4166, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4166, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlinkState.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUlinkState___cinit__(((struct __pyx_obj_4cuda_4cuda_CUlinkState *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_11CUlinkState___cinit__(struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4166, 0, __PYX_ERR(0, 4166, __pyx_L1_error));

  /* "cuda/cuda.pyx":4167
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUlinkState>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4168
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUlinkState>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4169
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUlinkState>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUlinkState *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUlinkState)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4167
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUlinkState>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4171
 *             self._ptr[0] = <ccuda.CUlinkState>init_value
 *         else:
 *             self._ptr = <ccuda.CUlinkState *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         self._keepalive = []
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUlinkState *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4166
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlinkState.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4172
 *         else:
 *             self._ptr = <ccuda.CUlinkState *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self._keepalive = []
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_11CUlinkState_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_11CUlinkState_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUlinkState_2__init__(((struct __pyx_obj_4cuda_4cuda_CUlinkState *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_11CUlinkState_2__init__(struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4172, 0, __PYX_ERR(0, 4172, __pyx_L1_error));

  /* "cuda/cuda.pyx":4173
 *             self._ptr = <ccuda.CUlinkState *>_ptr
 *     def __init__(self, *args, **kwargs):
 *         self._keepalive = []             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return '<CUlinkState ' + str(hex(self.__int__())) + '>'
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_keepalive);
  __Pyx_DECREF(__pyx_v_self->_keepalive);
  __pyx_v_self->_keepalive = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4172
 *         else:
 *             self._ptr = <ccuda.CUlinkState *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self._keepalive = []
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlinkState.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4174
 *     def __init__(self, *args, **kwargs):
 *         self._keepalive = []
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUlinkState ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUlinkState_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUlinkState_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUlinkState_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUlinkState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUlinkState_4__repr__(struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4174, 0, __PYX_ERR(0, 4174, __pyx_L1_error));

  /* "cuda/cuda.pyx":4175
 *         self._keepalive = []
 *     def __repr__(self):
 *         return '<CUlinkState ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUlinkState, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4174
 *     def __init__(self, *args, **kwargs):
 *         self._keepalive = []
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUlinkState ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUlinkState.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4176
 *     def __repr__(self):
 *         return '<CUlinkState ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUlinkState_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUlinkState_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUlinkState_6__index__(((struct __pyx_obj_4cuda_4cuda_CUlinkState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUlinkState_6__index__(struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4176, 0, __PYX_ERR(0, 4176, __pyx_L1_error));

  /* "cuda/cuda.pyx":4177
 *         return '<CUlinkState ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4176
 *     def __repr__(self):
 *         return '<CUlinkState ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUlinkState.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4178
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUlinkState_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUlinkState_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUlinkState_8__int__(((struct __pyx_obj_4cuda_4cuda_CUlinkState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUlinkState_8__int__(struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4178, 0, __PYX_ERR(0, 4178, __pyx_L1_error));

  /* "cuda/cuda.pyx":4179
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4178
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlinkState.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4180
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUlinkState_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUlinkState_10getPtr[] = "CUlinkState.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUlinkState_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUlinkState_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUlinkState_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_11CUlinkState_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUlinkState_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUlinkState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUlinkState_10getPtr(struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__87)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4180, 0, __PYX_ERR(0, 4180, __pyx_L1_error));

  /* "cuda/cuda.pyx":4181
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class EGLImageKHR:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4180
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlinkState.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUlinkState_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUlinkState_12__reduce_cython__[] = "CUlinkState.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUlinkState_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUlinkState_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUlinkState_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11CUlinkState_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUlinkState_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUlinkState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUlinkState_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__88)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlinkState.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUlinkState_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUlinkState_14__setstate_cython__[] = "CUlinkState.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUlinkState_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUlinkState_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11CUlinkState_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11CUlinkState_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUlinkState_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUlinkState *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUlinkState_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__90)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlinkState.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4192
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_11EGLImageKHR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_11EGLImageKHR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4192, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4192, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4192, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4192, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.EGLImageKHR.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_11EGLImageKHR___cinit__(((struct __pyx_obj_4cuda_4cuda_EGLImageKHR *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_11EGLImageKHR___cinit__(struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4192, 0, __PYX_ERR(0, 4192, __pyx_L1_error));

  /* "cuda/cuda.pyx":4193
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.EGLImageKHR>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4194
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.EGLImageKHR>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4195
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.EGLImageKHR>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.EGLImageKHR *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((__pyx_t_4cuda_5ccuda_EGLImageKHR)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4193
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.EGLImageKHR>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4197
 *             self._ptr[0] = <ccuda.EGLImageKHR>init_value
 *         else:
 *             self._ptr = <ccuda.EGLImageKHR *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((__pyx_t_4cuda_5ccuda_EGLImageKHR *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4192
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.EGLImageKHR.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4198
 *         else:
 *             self._ptr = <ccuda.EGLImageKHR *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_11EGLImageKHR_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_11EGLImageKHR_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_11EGLImageKHR_2__init__(((struct __pyx_obj_4cuda_4cuda_EGLImageKHR *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_11EGLImageKHR_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4198, 0, __PYX_ERR(0, 4198, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.EGLImageKHR.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4200
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<EGLImageKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11EGLImageKHR_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11EGLImageKHR_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11EGLImageKHR_4__repr__(((struct __pyx_obj_4cuda_4cuda_EGLImageKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11EGLImageKHR_4__repr__(struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4200, 0, __PYX_ERR(0, 4200, __pyx_L1_error));

  /* "cuda/cuda.pyx":4201
 *         pass
 *     def __repr__(self):
 *         return '<EGLImageKHR ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_EGLImageKHR, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4200
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<EGLImageKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.EGLImageKHR.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4202
 *     def __repr__(self):
 *         return '<EGLImageKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11EGLImageKHR_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11EGLImageKHR_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11EGLImageKHR_6__index__(((struct __pyx_obj_4cuda_4cuda_EGLImageKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11EGLImageKHR_6__index__(struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4202, 0, __PYX_ERR(0, 4202, __pyx_L1_error));

  /* "cuda/cuda.pyx":4203
 *         return '<EGLImageKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4202
 *     def __repr__(self):
 *         return '<EGLImageKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.EGLImageKHR.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4204
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11EGLImageKHR_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11EGLImageKHR_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11EGLImageKHR_8__int__(((struct __pyx_obj_4cuda_4cuda_EGLImageKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11EGLImageKHR_8__int__(struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4204, 0, __PYX_ERR(0, 4204, __pyx_L1_error));

  /* "cuda/cuda.pyx":4205
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4204
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLImageKHR.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4206
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11EGLImageKHR_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11EGLImageKHR_10getPtr[] = "EGLImageKHR.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11EGLImageKHR_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11EGLImageKHR_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11EGLImageKHR_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_11EGLImageKHR_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11EGLImageKHR_10getPtr(((struct __pyx_obj_4cuda_4cuda_EGLImageKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11EGLImageKHR_10getPtr(struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__92)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4206, 0, __PYX_ERR(0, 4206, __pyx_L1_error));

  /* "cuda/cuda.pyx":4207
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class EGLStreamKHR:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4206
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLImageKHR.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11EGLImageKHR_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11EGLImageKHR_12__reduce_cython__[] = "EGLImageKHR.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11EGLImageKHR_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11EGLImageKHR_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11EGLImageKHR_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11EGLImageKHR_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11EGLImageKHR_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_EGLImageKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11EGLImageKHR_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__93)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLImageKHR.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11EGLImageKHR_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_11EGLImageKHR_14__setstate_cython__[] = "EGLImageKHR.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11EGLImageKHR_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11EGLImageKHR_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11EGLImageKHR_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11EGLImageKHR_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11EGLImageKHR_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_EGLImageKHR *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11EGLImageKHR_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLImageKHR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__95)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLImageKHR.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4218
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12EGLStreamKHR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_12EGLStreamKHR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4218, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4218, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4218, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4218, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.EGLStreamKHR.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12EGLStreamKHR___cinit__(((struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12EGLStreamKHR___cinit__(struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4218, 0, __PYX_ERR(0, 4218, __pyx_L1_error));

  /* "cuda/cuda.pyx":4219
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.EGLStreamKHR>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4220
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.EGLStreamKHR>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4221
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.EGLStreamKHR>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.EGLStreamKHR *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((__pyx_t_4cuda_5ccuda_EGLStreamKHR)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4219
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.EGLStreamKHR>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4223
 *             self._ptr[0] = <ccuda.EGLStreamKHR>init_value
 *         else:
 *             self._ptr = <ccuda.EGLStreamKHR *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((__pyx_t_4cuda_5ccuda_EGLStreamKHR *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4218
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.EGLStreamKHR.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4224
 *         else:
 *             self._ptr = <ccuda.EGLStreamKHR *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12EGLStreamKHR_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_12EGLStreamKHR_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_12EGLStreamKHR_2__init__(((struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12EGLStreamKHR_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4224, 0, __PYX_ERR(0, 4224, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.EGLStreamKHR.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4226
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<EGLStreamKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12EGLStreamKHR_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12EGLStreamKHR_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12EGLStreamKHR_4__repr__(((struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12EGLStreamKHR_4__repr__(struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4226, 0, __PYX_ERR(0, 4226, __pyx_L1_error));

  /* "cuda/cuda.pyx":4227
 *         pass
 *     def __repr__(self):
 *         return '<EGLStreamKHR ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_EGLStreamKHR, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4226
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<EGLStreamKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.EGLStreamKHR.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4228
 *     def __repr__(self):
 *         return '<EGLStreamKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12EGLStreamKHR_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12EGLStreamKHR_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12EGLStreamKHR_6__index__(((struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12EGLStreamKHR_6__index__(struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4228, 0, __PYX_ERR(0, 4228, __pyx_L1_error));

  /* "cuda/cuda.pyx":4229
 *         return '<EGLStreamKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4228
 *     def __repr__(self):
 *         return '<EGLStreamKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.EGLStreamKHR.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4230
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12EGLStreamKHR_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12EGLStreamKHR_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12EGLStreamKHR_8__int__(((struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12EGLStreamKHR_8__int__(struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4230, 0, __PYX_ERR(0, 4230, __pyx_L1_error));

  /* "cuda/cuda.pyx":4231
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4230
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLStreamKHR.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4232
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12EGLStreamKHR_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_12EGLStreamKHR_10getPtr[] = "EGLStreamKHR.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12EGLStreamKHR_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_12EGLStreamKHR_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_12EGLStreamKHR_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_12EGLStreamKHR_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12EGLStreamKHR_10getPtr(((struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12EGLStreamKHR_10getPtr(struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__97)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4232, 0, __PYX_ERR(0, 4232, __pyx_L1_error));

  /* "cuda/cuda.pyx":4233
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class EGLSyncKHR:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4232
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLStreamKHR.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12EGLStreamKHR_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_12EGLStreamKHR_12__reduce_cython__[] = "EGLStreamKHR.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12EGLStreamKHR_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12EGLStreamKHR_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_12EGLStreamKHR_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_12EGLStreamKHR_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12EGLStreamKHR_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12EGLStreamKHR_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__98)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLStreamKHR.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12EGLStreamKHR_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_12EGLStreamKHR_14__setstate_cython__[] = "EGLStreamKHR.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12EGLStreamKHR_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12EGLStreamKHR_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_12EGLStreamKHR_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_12EGLStreamKHR_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12EGLStreamKHR_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12EGLStreamKHR_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLStreamKHR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__100)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLStreamKHR.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4244
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_10EGLSyncKHR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_10EGLSyncKHR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4244, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4244, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4244, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4244, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.EGLSyncKHR.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_10EGLSyncKHR___cinit__(((struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_10EGLSyncKHR___cinit__(struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4244, 0, __PYX_ERR(0, 4244, __pyx_L1_error));

  /* "cuda/cuda.pyx":4245
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.EGLSyncKHR>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4246
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.EGLSyncKHR>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4247
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.EGLSyncKHR>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.EGLSyncKHR *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((__pyx_t_4cuda_5ccuda_EGLSyncKHR)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4245
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.EGLSyncKHR>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4249
 *             self._ptr[0] = <ccuda.EGLSyncKHR>init_value
 *         else:
 *             self._ptr = <ccuda.EGLSyncKHR *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((__pyx_t_4cuda_5ccuda_EGLSyncKHR *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4244
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.EGLSyncKHR.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4250
 *         else:
 *             self._ptr = <ccuda.EGLSyncKHR *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_10EGLSyncKHR_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_10EGLSyncKHR_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_10EGLSyncKHR_2__init__(((struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_10EGLSyncKHR_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4250, 0, __PYX_ERR(0, 4250, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.EGLSyncKHR.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4252
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<EGLSyncKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10EGLSyncKHR_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_10EGLSyncKHR_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10EGLSyncKHR_4__repr__(((struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10EGLSyncKHR_4__repr__(struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4252, 0, __PYX_ERR(0, 4252, __pyx_L1_error));

  /* "cuda/cuda.pyx":4253
 *         pass
 *     def __repr__(self):
 *         return '<EGLSyncKHR ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_EGLSyncKHR, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4252
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<EGLSyncKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.EGLSyncKHR.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4254
 *     def __repr__(self):
 *         return '<EGLSyncKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10EGLSyncKHR_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_10EGLSyncKHR_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10EGLSyncKHR_6__index__(((struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10EGLSyncKHR_6__index__(struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4254, 0, __PYX_ERR(0, 4254, __pyx_L1_error));

  /* "cuda/cuda.pyx":4255
 *         return '<EGLSyncKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4254
 *     def __repr__(self):
 *         return '<EGLSyncKHR ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.EGLSyncKHR.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4256
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10EGLSyncKHR_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_10EGLSyncKHR_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10EGLSyncKHR_8__int__(((struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10EGLSyncKHR_8__int__(struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4256, 0, __PYX_ERR(0, 4256, __pyx_L1_error));

  /* "cuda/cuda.pyx":4257
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4256
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLSyncKHR.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4258
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10EGLSyncKHR_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_10EGLSyncKHR_10getPtr[] = "EGLSyncKHR.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_10EGLSyncKHR_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_10EGLSyncKHR_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_10EGLSyncKHR_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_10EGLSyncKHR_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10EGLSyncKHR_10getPtr(((struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10EGLSyncKHR_10getPtr(struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__102)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4258, 0, __PYX_ERR(0, 4258, __pyx_L1_error));

  /* "cuda/cuda.pyx":4259
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUeglStreamConnection:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4258
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLSyncKHR.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10EGLSyncKHR_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_10EGLSyncKHR_12__reduce_cython__[] = "EGLSyncKHR.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_10EGLSyncKHR_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10EGLSyncKHR_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_10EGLSyncKHR_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_10EGLSyncKHR_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10EGLSyncKHR_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10EGLSyncKHR_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__103)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLSyncKHR.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10EGLSyncKHR_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_10EGLSyncKHR_14__setstate_cython__[] = "EGLSyncKHR.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_10EGLSyncKHR_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10EGLSyncKHR_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_10EGLSyncKHR_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_10EGLSyncKHR_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10EGLSyncKHR_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10EGLSyncKHR_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLSyncKHR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__105)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLSyncKHR.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4272
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUeglStreamConnection_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUeglStreamConnection_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4272, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4272, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4272, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4272, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglStreamConnection.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUeglStreamConnection___cinit__(((struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUeglStreamConnection___cinit__(struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4272, 0, __PYX_ERR(0, 4272, __pyx_L1_error));

  /* "cuda/cuda.pyx":4273
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUeglStreamConnection>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4274
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUeglStreamConnection>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4275
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUeglStreamConnection>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUeglStreamConnection *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4273
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUeglStreamConnection>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4277
 *             self._ptr[0] = <ccuda.CUeglStreamConnection>init_value
 *         else:
 *             self._ptr = <ccuda.CUeglStreamConnection *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4272
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglStreamConnection.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4278
 *         else:
 *             self._ptr = <ccuda.CUeglStreamConnection *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUeglStreamConnection_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUeglStreamConnection_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUeglStreamConnection_2__init__(((struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUeglStreamConnection_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4278, 0, __PYX_ERR(0, 4278, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglStreamConnection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4280
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUeglStreamConnection ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUeglStreamConnection_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUeglStreamConnection_4__repr__(struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4280, 0, __PYX_ERR(0, 4280, __pyx_L1_error));

  /* "cuda/cuda.pyx":4281
 *         pass
 *     def __repr__(self):
 *         return '<CUeglStreamConnection ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUeglStreamConnection, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4280
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUeglStreamConnection ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUeglStreamConnection.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4282
 *     def __repr__(self):
 *         return '<CUeglStreamConnection ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUeglStreamConnection_6__index__(((struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUeglStreamConnection_6__index__(struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4282, 0, __PYX_ERR(0, 4282, __pyx_L1_error));

  /* "cuda/cuda.pyx":4283
 *         return '<CUeglStreamConnection ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4282
 *     def __repr__(self):
 *         return '<CUeglStreamConnection ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUeglStreamConnection.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4284
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUeglStreamConnection_8__int__(((struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUeglStreamConnection_8__int__(struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4284, 0, __PYX_ERR(0, 4284, __pyx_L1_error));

  /* "cuda/cuda.pyx":4285
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4284
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglStreamConnection.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4286
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_21CUeglStreamConnection_10getPtr[] = "CUeglStreamConnection.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21CUeglStreamConnection_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUeglStreamConnection_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUeglStreamConnection_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUeglStreamConnection_10getPtr(struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__107)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4286, 0, __PYX_ERR(0, 4286, __pyx_L1_error));

  /* "cuda/cuda.pyx":4287
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUhostFn:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4286
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglStreamConnection.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_21CUeglStreamConnection_12__reduce_cython__[] = "CUeglStreamConnection.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21CUeglStreamConnection_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUeglStreamConnection_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUeglStreamConnection_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUeglStreamConnection_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__108)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglStreamConnection.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_21CUeglStreamConnection_14__setstate_cython__[] = "CUeglStreamConnection.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21CUeglStreamConnection_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_21CUeglStreamConnection_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUeglStreamConnection_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUeglStreamConnection_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__110)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglStreamConnection.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4298
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_8CUhostFn_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_8CUhostFn_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4298, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4298, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUhostFn.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUhostFn___cinit__(((struct __pyx_obj_4cuda_4cuda_CUhostFn *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_8CUhostFn___cinit__(struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4298, 0, __PYX_ERR(0, 4298, __pyx_L1_error));

  /* "cuda/cuda.pyx":4299
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUhostFn>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4300
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUhostFn>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4301
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUhostFn>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUhostFn *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUhostFn)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4299
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUhostFn>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4303
 *             self._ptr[0] = <ccuda.CUhostFn>init_value
 *         else:
 *             self._ptr = <ccuda.CUhostFn *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUhostFn *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4298
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUhostFn.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4304
 *         else:
 *             self._ptr = <ccuda.CUhostFn *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_8CUhostFn_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_8CUhostFn_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUhostFn_2__init__(((struct __pyx_obj_4cuda_4cuda_CUhostFn *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_8CUhostFn_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4304, 0, __PYX_ERR(0, 4304, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUhostFn.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4306
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUhostFn ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUhostFn_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUhostFn_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUhostFn_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUhostFn *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUhostFn_4__repr__(struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4306, 0, __PYX_ERR(0, 4306, __pyx_L1_error));

  /* "cuda/cuda.pyx":4307
 *         pass
 *     def __repr__(self):
 *         return '<CUhostFn ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUhostFn, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4306
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUhostFn ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUhostFn.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4308
 *     def __repr__(self):
 *         return '<CUhostFn ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUhostFn_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUhostFn_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUhostFn_6__index__(((struct __pyx_obj_4cuda_4cuda_CUhostFn *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUhostFn_6__index__(struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4308, 0, __PYX_ERR(0, 4308, __pyx_L1_error));

  /* "cuda/cuda.pyx":4309
 *         return '<CUhostFn ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4308
 *     def __repr__(self):
 *         return '<CUhostFn ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUhostFn.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4310
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUhostFn_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUhostFn_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUhostFn_8__int__(((struct __pyx_obj_4cuda_4cuda_CUhostFn *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUhostFn_8__int__(struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4310, 0, __PYX_ERR(0, 4310, __pyx_L1_error));

  /* "cuda/cuda.pyx":4311
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4310
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUhostFn.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4312
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUhostFn_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUhostFn_10getPtr[] = "CUhostFn.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUhostFn_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUhostFn_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUhostFn_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_8CUhostFn_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUhostFn_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUhostFn *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUhostFn_10getPtr(struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__112)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4312, 0, __PYX_ERR(0, 4312, __pyx_L1_error));

  /* "cuda/cuda.pyx":4313
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUstreamCallback:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4312
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUhostFn.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUhostFn_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUhostFn_12__reduce_cython__[] = "CUhostFn.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUhostFn_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUhostFn_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUhostFn_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_8CUhostFn_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUhostFn_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUhostFn *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUhostFn_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__113)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUhostFn.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUhostFn_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUhostFn_14__setstate_cython__[] = "CUhostFn.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUhostFn_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUhostFn_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_8CUhostFn_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_8CUhostFn_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUhostFn_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUhostFn *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUhostFn_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUhostFn *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__115)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__116, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUhostFn.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4324
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUstreamCallback_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUstreamCallback_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4324, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4324, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4324, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4324, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamCallback.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUstreamCallback___cinit__(((struct __pyx_obj_4cuda_4cuda_CUstreamCallback *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUstreamCallback___cinit__(struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4324, 0, __PYX_ERR(0, 4324, __pyx_L1_error));

  /* "cuda/cuda.pyx":4325
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUstreamCallback>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4326
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUstreamCallback>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4327
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUstreamCallback>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUstreamCallback *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUstreamCallback)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4325
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUstreamCallback>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4329
 *             self._ptr[0] = <ccuda.CUstreamCallback>init_value
 *         else:
 *             self._ptr = <ccuda.CUstreamCallback *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUstreamCallback *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4324
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamCallback.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4330
 *         else:
 *             self._ptr = <ccuda.CUstreamCallback *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUstreamCallback_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUstreamCallback_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUstreamCallback_2__init__(((struct __pyx_obj_4cuda_4cuda_CUstreamCallback *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUstreamCallback_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4330, 0, __PYX_ERR(0, 4330, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamCallback.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4332
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUstreamCallback ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUstreamCallback_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUstreamCallback_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUstreamCallback_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUstreamCallback *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUstreamCallback_4__repr__(struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4332, 0, __PYX_ERR(0, 4332, __pyx_L1_error));

  /* "cuda/cuda.pyx":4333
 *         pass
 *     def __repr__(self):
 *         return '<CUstreamCallback ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUstreamCallback, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4332
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUstreamCallback ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUstreamCallback.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4334
 *     def __repr__(self):
 *         return '<CUstreamCallback ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUstreamCallback_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUstreamCallback_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUstreamCallback_6__index__(((struct __pyx_obj_4cuda_4cuda_CUstreamCallback *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUstreamCallback_6__index__(struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4334, 0, __PYX_ERR(0, 4334, __pyx_L1_error));

  /* "cuda/cuda.pyx":4335
 *         return '<CUstreamCallback ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4334
 *     def __repr__(self):
 *         return '<CUstreamCallback ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUstreamCallback.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4336
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUstreamCallback_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUstreamCallback_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUstreamCallback_8__int__(((struct __pyx_obj_4cuda_4cuda_CUstreamCallback *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUstreamCallback_8__int__(struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4336, 0, __PYX_ERR(0, 4336, __pyx_L1_error));

  /* "cuda/cuda.pyx":4337
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4336
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamCallback.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4338
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUstreamCallback_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUstreamCallback_10getPtr[] = "CUstreamCallback.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUstreamCallback_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUstreamCallback_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUstreamCallback_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_16CUstreamCallback_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUstreamCallback_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUstreamCallback *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUstreamCallback_10getPtr(struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__117)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4338, 0, __PYX_ERR(0, 4338, __pyx_L1_error));

  /* "cuda/cuda.pyx":4339
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUoccupancyB2DSize:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4338
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamCallback.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUstreamCallback_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUstreamCallback_12__reduce_cython__[] = "CUstreamCallback.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUstreamCallback_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUstreamCallback_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUstreamCallback_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16CUstreamCallback_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUstreamCallback_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUstreamCallback *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUstreamCallback_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__118)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamCallback.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUstreamCallback_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUstreamCallback_14__setstate_cython__[] = "CUstreamCallback.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUstreamCallback_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUstreamCallback_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16CUstreamCallback_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16CUstreamCallback_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUstreamCallback_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUstreamCallback *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUstreamCallback_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamCallback *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__120)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamCallback.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4350
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4350, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4350, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4350, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4350, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUoccupancyB2DSize.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize___cinit__(((struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize___cinit__(struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4350, 0, __PYX_ERR(0, 4350, __pyx_L1_error));

  /* "cuda/cuda.pyx":4351
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUoccupancyB2DSize>init_value
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4352
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *             self._ptr[0] = <ccuda.CUoccupancyB2DSize>init_value
 *         else:
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4353
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUoccupancyB2DSize>init_value             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUoccupancyB2DSize *>_ptr
 */
    (__pyx_v_self->_ptr[0]) = ((CUoccupancyB2DSize)__pyx_v_init_value);

    /* "cuda/cuda.pyx":4351
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *             self._ptr[0] = <ccuda.CUoccupancyB2DSize>init_value
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4355
 *             self._ptr[0] = <ccuda.CUoccupancyB2DSize>init_value
 *         else:
 *             self._ptr = <ccuda.CUoccupancyB2DSize *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, *args, **kwargs):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUoccupancyB2DSize *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4350
 * 
 *     """
 *     def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUoccupancyB2DSize.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4356
 *         else:
 *             self._ptr = <ccuda.CUoccupancyB2DSize *>_ptr
 *     def __init__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_2__init__(((struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4356, 0, __PYX_ERR(0, 4356, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUoccupancyB2DSize.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4358
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUoccupancyB2DSize ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_4__repr__(struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4358, 0, __PYX_ERR(0, 4358, __pyx_L1_error));

  /* "cuda/cuda.pyx":4359
 *         pass
 *     def __repr__(self):
 *         return '<CUoccupancyB2DSize ' + str(hex(self.__int__())) + '>'             # <<<<<<<<<<<<<<
 *     def __index__(self):
 *         return self.__int__()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUoccupancyB2DSize, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4358
 *     def __init__(self, *args, **kwargs):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUoccupancyB2DSize ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUoccupancyB2DSize.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4360
 *     def __repr__(self):
 *         return '<CUoccupancyB2DSize ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_7__index__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_7__index__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_6__index__(((struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_6__index__(struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__index__", 0);
  __Pyx_TraceCall("__index__", __pyx_f[0], 4360, 0, __PYX_ERR(0, 4360, __pyx_L1_error));

  /* "cuda/cuda.pyx":4361
 *         return '<CUoccupancyB2DSize ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):
 *         return self.__int__()             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4360
 *     def __repr__(self):
 *         return '<CUoccupancyB2DSize ' + str(hex(self.__int__())) + '>'
 *     def __index__(self):             # <<<<<<<<<<<<<<
 *         return self.__int__()
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUoccupancyB2DSize.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4362
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_9__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_9__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_8__int__(((struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_8__int__(struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 4362, 0, __PYX_ERR(0, 4362, __pyx_L1_error));

  /* "cuda/cuda.pyx":4363
 *         return self.__int__()
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4362
 *     def __index__(self):
 *         return self.__int__()
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUoccupancyB2DSize.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4364
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_18CUoccupancyB2DSize_10getPtr[] = "CUoccupancyB2DSize.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_18CUoccupancyB2DSize_11getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_18CUoccupancyB2DSize_10getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_11getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_10getPtr(((struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_10getPtr(struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__122)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4364, 0, __PYX_ERR(0, 4364, __pyx_L1_error));

  /* "cuda/cuda.pyx":4365
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUuuid_st:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4364
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUoccupancyB2DSize.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_18CUoccupancyB2DSize_12__reduce_cython__[] = "CUoccupancyB2DSize.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_18CUoccupancyB2DSize_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_18CUoccupancyB2DSize_12__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_12__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__123)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUoccupancyB2DSize.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_18CUoccupancyB2DSize_14__setstate_cython__[] = "CUoccupancyB2DSize.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_18CUoccupancyB2DSize_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_18CUoccupancyB2DSize_14__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_14__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUoccupancyB2DSize_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__125)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUoccupancyB2DSize.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4381
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_9CUuuid_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_9CUuuid_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4381, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4381, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4381, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUuuid_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUuuid_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUuuid_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_9CUuuid_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4381, 0, __PYX_ERR(0, 4381, __pyx_L1_error));

  /* "cuda/cuda.pyx":4382
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4383
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUuuid_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4382
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4385
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUuuid_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUuuid_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4381
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUuuid_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4386
 *         else:
 *             self._ptr = <ccuda.CUuuid_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_9CUuuid_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_9CUuuid_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4386, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4386, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4386, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUuuid_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUuuid_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUuuid_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_9CUuuid_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4386, 0, __PYX_ERR(0, 4386, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUuuid_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4388
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_9CUuuid_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_9CUuuid_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_9CUuuid_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUuuid_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_9CUuuid_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 4388, 0, __PYX_ERR(0, 4388, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUuuid_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":4390
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUuuid_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_9CUuuid_st_6getPtr[] = "CUuuid_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9CUuuid_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUuuid_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_9CUuuid_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_9CUuuid_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUuuid_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUuuid_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUuuid_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__127)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4390, 0, __PYX_ERR(0, 4390, __pyx_L1_error));

  /* "cuda/cuda.pyx":4391
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4390
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUuuid_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4392
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUuuid_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_9CUuuid_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUuuid_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUuuid_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUuuid_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4392, 0, __PYX_ERR(0, 4392, __pyx_L1_error));

  /* "cuda/cuda.pyx":4393
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['bytes : ' + str(self.bytes.hex())]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4394
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['bytes : ' + str(self.bytes.hex())]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4395
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['bytes : ' + str(self.bytes.hex())]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bytes_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_hex); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_bytes, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4396
 *             str_list = []
 *             str_list += ['bytes : ' + str(self.bytes.hex())]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":4393
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['bytes : ' + str(self.bytes.hex())]
 */
  }

  /* "cuda/cuda.pyx":4398
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":4392
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUuuid_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4401
 * 
 *     @property
 *     def bytes(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(self._ptr[0].bytes, 16)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUuuid_st_5bytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_9CUuuid_st_5bytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUuuid_st_5bytes___get__(((struct __pyx_obj_4cuda_4cuda_CUuuid_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUuuid_st_5bytes___get__(struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4401, 0, __PYX_ERR(0, 4401, __pyx_L1_error));

  /* "cuda/cuda.pyx":4402
 *     @property
 *     def bytes(self):
 *         return PyBytes_FromStringAndSize(self._ptr[0].bytes, 16)             # <<<<<<<<<<<<<<
 * 
 * cdef class CUipcEventHandle_st:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyBytes_FromStringAndSize((__pyx_v_self->_ptr[0]).bytes, 16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4401
 * 
 *     @property
 *     def bytes(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(self._ptr[0].bytes, 16)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUuuid_st.bytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUuuid_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_9CUuuid_st_10__reduce_cython__[] = "CUuuid_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9CUuuid_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUuuid_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_9CUuuid_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_9CUuuid_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUuuid_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUuuid_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUuuid_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__130)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__131, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUuuid_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9CUuuid_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_9CUuuid_st_12__setstate_cython__[] = "CUuuid_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9CUuuid_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUuuid_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_9CUuuid_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_9CUuuid_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9CUuuid_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUuuid_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9CUuuid_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUuuid_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__132)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__133, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUuuid_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4419
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4419, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4419, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4419, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUipcEventHandle_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4419, 0, __PYX_ERR(0, 4419, __pyx_L1_error));

  /* "cuda/cuda.pyx":4420
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4421
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUipcEventHandle_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4420
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4423
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUipcEventHandle_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUipcEventHandle_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4419
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUipcEventHandle_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4424
 *         else:
 *             self._ptr = <ccuda.CUipcEventHandle_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4424, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4424, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4424, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUipcEventHandle_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4424, 0, __PYX_ERR(0, 4424, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUipcEventHandle_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4426
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 4426, 0, __PYX_ERR(0, 4426, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUipcEventHandle_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":4428
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_19CUipcEventHandle_st_6getPtr[] = "CUipcEventHandle_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_19CUipcEventHandle_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_19CUipcEventHandle_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__134)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4428, 0, __PYX_ERR(0, 4428, __pyx_L1_error));

  /* "cuda/cuda.pyx":4429
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4428
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUipcEventHandle_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4430
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4430, 0, __PYX_ERR(0, 4430, __pyx_L1_error));

  /* "cuda/cuda.pyx":4431
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4432
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4433
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4434
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":4431
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
  }

  /* "cuda/cuda.pyx":4436
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":4430
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUipcEventHandle_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4439
 * 
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64)
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4439, 0, __PYX_ERR(0, 4439, __pyx_L1_error));

  /* "cuda/cuda.pyx":4440
 *     @property
 *     def reserved(self):
 *         return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64)             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyBytes_FromStringAndSize((__pyx_v_self->_ptr[0]).reserved, 64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4439
 * 
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64)
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUipcEventHandle_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4442
 *         return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64)
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_b = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  char __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4442, 0, __PYX_ERR(0, 4442, __pyx_L1_error));

  /* "cuda/cuda.pyx":4443
 *     @reserved.setter
 *     def reserved(self, reserved):
 *         if len(reserved) != 64:             # <<<<<<<<<<<<<<
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         if CHAR_MIN == 0:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_reserved); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4443, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != 64) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":4444
 *     def reserved(self, reserved):
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))             # <<<<<<<<<<<<<<
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(reserved):
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_reserved); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4444, __pyx_L1_error)
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved_length_must_be_64_is, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 4444, __pyx_L1_error)

    /* "cuda/cuda.pyx":4443
 *     @reserved.setter
 *     def reserved(self, reserved):
 *         if len(reserved) != 64:             # <<<<<<<<<<<<<<
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         if CHAR_MIN == 0:
 */
  }

  /* "cuda/cuda.pyx":4445
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         if CHAR_MIN == 0:             # <<<<<<<<<<<<<<
 *             for i, b in enumerate(reserved):
 *                 if b < 0 and b > -129:
 */
  __pyx_t_2 = ((CHAR_MIN == 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":4446
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *                 if b < 0 and b > -129:
 *                     b = b + 256
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_4 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_reserved)) || PyTuple_CheckExact(__pyx_v_reserved)) {
      __pyx_t_3 = __pyx_v_reserved; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_reserved); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4446, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4446, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 4446, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4446, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 4446, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4446, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 4446, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4446, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4);
      __pyx_t_4 = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":4447
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(reserved):
 *                 if b < 0 and b > -129:             # <<<<<<<<<<<<<<
 *                     b = b + 256
 *                 self._ptr[0].reserved[i] = b
 */
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_b, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4447, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 4447, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_7) {
      } else {
        __pyx_t_2 = __pyx_t_7;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_b, __pyx_int_neg_129, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4447, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 4447, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __pyx_t_7;
      __pyx_L8_bool_binop_done:;
      if (__pyx_t_2) {

        /* "cuda/cuda.pyx":4448
 *             for i, b in enumerate(reserved):
 *                 if b < 0 and b > -129:
 *                     b = b + 256             # <<<<<<<<<<<<<<
 *                 self._ptr[0].reserved[i] = b
 *         else:
 */
        __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_b, __pyx_int_256, 0x100, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cuda/cuda.pyx":4447
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(reserved):
 *                 if b < 0 and b > -129:             # <<<<<<<<<<<<<<
 *                     b = b + 256
 *                 self._ptr[0].reserved[i] = b
 */
      }

      /* "cuda/cuda.pyx":4449
 *                 if b < 0 and b > -129:
 *                     b = b + 256
 *                 self._ptr[0].reserved[i] = b             # <<<<<<<<<<<<<<
 *         else:
 *             for i, b in enumerate(reserved):
 */
      __pyx_t_8 = __Pyx_PyInt_As_char(__pyx_v_b); if (unlikely((__pyx_t_8 == (char)-1) && PyErr_Occurred())) __PYX_ERR(0, 4449, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4449, __pyx_L1_error)
      ((__pyx_v_self->_ptr[0]).reserved[__pyx_t_9]) = __pyx_t_8;

      /* "cuda/cuda.pyx":4446
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *                 if b < 0 and b > -129:
 *                     b = b + 256
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cuda/cuda.pyx":4445
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         if CHAR_MIN == 0:             # <<<<<<<<<<<<<<
 *             for i, b in enumerate(reserved):
 *                 if b < 0 and b > -129:
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":4451
 *                 self._ptr[0].reserved[i] = b
 *         else:
 *             for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *                 if b > 127 and b < 256:
 *                     b = b - 256
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_4 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_reserved)) || PyTuple_CheckExact(__pyx_v_reserved)) {
      __pyx_t_3 = __pyx_v_reserved; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_reserved); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4451, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 4451, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4451, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 4451, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4451, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 4451, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4);
      __pyx_t_4 = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":4452
 *         else:
 *             for i, b in enumerate(reserved):
 *                 if b > 127 and b < 256:             # <<<<<<<<<<<<<<
 *                     b = b - 256
 *                 self._ptr[0].reserved[i] = b
 */
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_b, __pyx_int_127, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4452, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 4452, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_7) {
      } else {
        __pyx_t_2 = __pyx_t_7;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_b, __pyx_int_256, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4452, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 4452, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __pyx_t_7;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_2) {

        /* "cuda/cuda.pyx":4453
 *             for i, b in enumerate(reserved):
 *                 if b > 127 and b < 256:
 *                     b = b - 256             # <<<<<<<<<<<<<<
 *                 self._ptr[0].reserved[i] = b
 * 
 */
        __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_v_b, __pyx_int_256, 0x100, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4453, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cuda/cuda.pyx":4452
 *         else:
 *             for i, b in enumerate(reserved):
 *                 if b > 127 and b < 256:             # <<<<<<<<<<<<<<
 *                     b = b - 256
 *                 self._ptr[0].reserved[i] = b
 */
      }

      /* "cuda/cuda.pyx":4454
 *                 if b > 127 and b < 256:
 *                     b = b - 256
 *                 self._ptr[0].reserved[i] = b             # <<<<<<<<<<<<<<
 * 
 * cdef class CUipcMemHandle_st:
 */
      __pyx_t_8 = __Pyx_PyInt_As_char(__pyx_v_b); if (unlikely((__pyx_t_8 == (char)-1) && PyErr_Occurred())) __PYX_ERR(0, 4454, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4454, __pyx_L1_error)
      ((__pyx_v_self->_ptr[0]).reserved[__pyx_t_9]) = __pyx_t_8;

      /* "cuda/cuda.pyx":4451
 *                 self._ptr[0].reserved[i] = b
 *         else:
 *             for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *                 if b > 127 and b < 256:
 *                     b = b - 256
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":4442
 *         return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64)
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.CUipcEventHandle_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_19CUipcEventHandle_st_10__reduce_cython__[] = "CUipcEventHandle_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_19CUipcEventHandle_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_19CUipcEventHandle_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__135)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUipcEventHandle_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_19CUipcEventHandle_st_12__setstate_cython__[] = "CUipcEventHandle_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_19CUipcEventHandle_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_19CUipcEventHandle_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_19CUipcEventHandle_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__137)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__138, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUipcEventHandle_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4471
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4471, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4471, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4471, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUipcMemHandle_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4471, 0, __PYX_ERR(0, 4471, __pyx_L1_error));

  /* "cuda/cuda.pyx":4472
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4473
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUipcMemHandle_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4472
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4475
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUipcMemHandle_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUipcMemHandle_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4471
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUipcMemHandle_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4476
 *         else:
 *             self._ptr = <ccuda.CUipcMemHandle_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4476, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4476, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4476, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUipcMemHandle_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4476, 0, __PYX_ERR(0, 4476, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUipcMemHandle_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4478
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 4478, 0, __PYX_ERR(0, 4478, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUipcMemHandle_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":4480
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_17CUipcMemHandle_st_6getPtr[] = "CUipcMemHandle_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17CUipcMemHandle_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUipcMemHandle_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__139)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4480, 0, __PYX_ERR(0, 4480, __pyx_L1_error));

  /* "cuda/cuda.pyx":4481
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4480
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUipcMemHandle_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4482
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4482, 0, __PYX_ERR(0, 4482, __pyx_L1_error));

  /* "cuda/cuda.pyx":4483
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4484
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4485
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4486
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":4483
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
  }

  /* "cuda/cuda.pyx":4488
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":4482
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUipcMemHandle_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4491
 * 
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64)
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4491, 0, __PYX_ERR(0, 4491, __pyx_L1_error));

  /* "cuda/cuda.pyx":4492
 *     @property
 *     def reserved(self):
 *         return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64)             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyBytes_FromStringAndSize((__pyx_v_self->_ptr[0]).reserved, 64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4491
 * 
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64)
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUipcMemHandle_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4494
 *         return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64)
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_b = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  char __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4494, 0, __PYX_ERR(0, 4494, __pyx_L1_error));

  /* "cuda/cuda.pyx":4495
 *     @reserved.setter
 *     def reserved(self, reserved):
 *         if len(reserved) != 64:             # <<<<<<<<<<<<<<
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         if CHAR_MIN == 0:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_reserved); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4495, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != 64) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":4496
 *     def reserved(self, reserved):
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))             # <<<<<<<<<<<<<<
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(reserved):
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_reserved); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4496, __pyx_L1_error)
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved_length_must_be_64_is, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 4496, __pyx_L1_error)

    /* "cuda/cuda.pyx":4495
 *     @reserved.setter
 *     def reserved(self, reserved):
 *         if len(reserved) != 64:             # <<<<<<<<<<<<<<
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         if CHAR_MIN == 0:
 */
  }

  /* "cuda/cuda.pyx":4497
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         if CHAR_MIN == 0:             # <<<<<<<<<<<<<<
 *             for i, b in enumerate(reserved):
 *                 if b < 0 and b > -129:
 */
  __pyx_t_2 = ((CHAR_MIN == 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":4498
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *                 if b < 0 and b > -129:
 *                     b = b + 256
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_4 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_reserved)) || PyTuple_CheckExact(__pyx_v_reserved)) {
      __pyx_t_3 = __pyx_v_reserved; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_reserved); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4498, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4498, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 4498, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4498, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 4498, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4498, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 4498, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4498, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4);
      __pyx_t_4 = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":4499
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(reserved):
 *                 if b < 0 and b > -129:             # <<<<<<<<<<<<<<
 *                     b = b + 256
 *                 self._ptr[0].reserved[i] = b
 */
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_b, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4499, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 4499, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_7) {
      } else {
        __pyx_t_2 = __pyx_t_7;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_b, __pyx_int_neg_129, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4499, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 4499, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __pyx_t_7;
      __pyx_L8_bool_binop_done:;
      if (__pyx_t_2) {

        /* "cuda/cuda.pyx":4500
 *             for i, b in enumerate(reserved):
 *                 if b < 0 and b > -129:
 *                     b = b + 256             # <<<<<<<<<<<<<<
 *                 self._ptr[0].reserved[i] = b
 *         else:
 */
        __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_b, __pyx_int_256, 0x100, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4500, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cuda/cuda.pyx":4499
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(reserved):
 *                 if b < 0 and b > -129:             # <<<<<<<<<<<<<<
 *                     b = b + 256
 *                 self._ptr[0].reserved[i] = b
 */
      }

      /* "cuda/cuda.pyx":4501
 *                 if b < 0 and b > -129:
 *                     b = b + 256
 *                 self._ptr[0].reserved[i] = b             # <<<<<<<<<<<<<<
 *         else:
 *             for i, b in enumerate(reserved):
 */
      __pyx_t_8 = __Pyx_PyInt_As_char(__pyx_v_b); if (unlikely((__pyx_t_8 == (char)-1) && PyErr_Occurred())) __PYX_ERR(0, 4501, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4501, __pyx_L1_error)
      ((__pyx_v_self->_ptr[0]).reserved[__pyx_t_9]) = __pyx_t_8;

      /* "cuda/cuda.pyx":4498
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *                 if b < 0 and b > -129:
 *                     b = b + 256
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cuda/cuda.pyx":4497
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         if CHAR_MIN == 0:             # <<<<<<<<<<<<<<
 *             for i, b in enumerate(reserved):
 *                 if b < 0 and b > -129:
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":4503
 *                 self._ptr[0].reserved[i] = b
 *         else:
 *             for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *                 if b > 127 and b < 256:
 *                     b = b - 256
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_4 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_reserved)) || PyTuple_CheckExact(__pyx_v_reserved)) {
      __pyx_t_3 = __pyx_v_reserved; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_reserved); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4503, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 4503, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4503, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 4503, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4503, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 4503, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4);
      __pyx_t_4 = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":4504
 *         else:
 *             for i, b in enumerate(reserved):
 *                 if b > 127 and b < 256:             # <<<<<<<<<<<<<<
 *                     b = b - 256
 *                 self._ptr[0].reserved[i] = b
 */
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_b, __pyx_int_127, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4504, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 4504, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_7) {
      } else {
        __pyx_t_2 = __pyx_t_7;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_b, __pyx_int_256, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4504, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 4504, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __pyx_t_7;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_2) {

        /* "cuda/cuda.pyx":4505
 *             for i, b in enumerate(reserved):
 *                 if b > 127 and b < 256:
 *                     b = b - 256             # <<<<<<<<<<<<<<
 *                 self._ptr[0].reserved[i] = b
 * 
 */
        __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_v_b, __pyx_int_256, 0x100, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4505, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cuda/cuda.pyx":4504
 *         else:
 *             for i, b in enumerate(reserved):
 *                 if b > 127 and b < 256:             # <<<<<<<<<<<<<<
 *                     b = b - 256
 *                 self._ptr[0].reserved[i] = b
 */
      }

      /* "cuda/cuda.pyx":4506
 *                 if b > 127 and b < 256:
 *                     b = b - 256
 *                 self._ptr[0].reserved[i] = b             # <<<<<<<<<<<<<<
 * 
 * cdef class CUstreamMemOpWaitValueParams_st:
 */
      __pyx_t_8 = __Pyx_PyInt_As_char(__pyx_v_b); if (unlikely((__pyx_t_8 == (char)-1) && PyErr_Occurred())) __PYX_ERR(0, 4506, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4506, __pyx_L1_error)
      ((__pyx_v_self->_ptr[0]).reserved[__pyx_t_9]) = __pyx_t_8;

      /* "cuda/cuda.pyx":4503
 *                 self._ptr[0].reserved[i] = b
 *         else:
 *             for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *                 if b > 127 and b < 256:
 *                     b = b - 256
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":4494
 *         return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64)
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.CUipcMemHandle_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_17CUipcMemHandle_st_10__reduce_cython__[] = "CUipcMemHandle_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17CUipcMemHandle_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUipcMemHandle_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__140)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__141, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUipcMemHandle_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_17CUipcMemHandle_st_12__setstate_cython__[] = "CUipcMemHandle_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17CUipcMemHandle_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_17CUipcMemHandle_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUipcMemHandle_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__142)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__143, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUipcMemHandle_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4530
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4530, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4530, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4530, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4530, 0, __PYX_ERR(0, 4530, __pyx_L1_error));

  /* "cuda/cuda.pyx":4531
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._address = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.address)
 */
  __pyx_v_self->_ptr = ((union CUstreamBatchMemOpParams_union *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":4530
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4532
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._address = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.address)
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].waitValue.value64)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4532, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4532, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4532, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4532, 0, __PYX_ERR(0, 4532, __pyx_L1_error));

  /* "cuda/cuda.pyx":4533
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._address = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.address)             # <<<<<<<<<<<<<<
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].waitValue.value64)
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.alias)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).waitValue.address))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 4533, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_address);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_address));
  __pyx_v_self->_address = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":4534
 *     def __init__(self, void_ptr _ptr):
 *         self._address = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.address)
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].waitValue.value64)             # <<<<<<<<<<<<<<
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.alias)
 *     def getPtr(self):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).waitValue.value64))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 4534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_value64);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_value64));
  __pyx_v_self->_value64 = ((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4535
 *         self._address = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.address)
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].waitValue.value64)
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.alias)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).waitValue.alias))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 4535, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_alias);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_alias));
  __pyx_v_self->_alias = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":4532
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._address = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.address)
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].waitValue.value64)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4536
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].waitValue.value64)
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.alias)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_4getPtr[] = "CUstreamMemOpWaitValueParams_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_4getPtr(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_4getPtr(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__144)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4536, 0, __PYX_ERR(0, 4536, __pyx_L1_error));

  /* "cuda/cuda.pyx":4537
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.alias)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4536
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].waitValue.value64)
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.alias)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4538
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_6__repr__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_6__repr__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4538, 0, __PYX_ERR(0, 4538, __pyx_L1_error));

  /* "cuda/cuda.pyx":4539
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4540
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['address : ' + str(self.address)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4541
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]             # <<<<<<<<<<<<<<
 *             str_list += ['address : ' + str(self.address)]
 *             str_list += ['value64 : ' + str(self.value64)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_operation_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_operation, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4542
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['address : ' + str(self.address)]             # <<<<<<<<<<<<<<
 *             str_list += ['value64 : ' + str(self.value64)]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_address_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_address, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4543
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['address : ' + str(self.address)]
 *             str_list += ['value64 : ' + str(self.value64)]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['alias : ' + str(self.alias)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value64_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_value64, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4544
 *             str_list += ['address : ' + str(self.address)]
 *             str_list += ['value64 : ' + str(self.value64)]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             str_list += ['alias : ' + str(self.alias)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4545
 *             str_list += ['value64 : ' + str(self.value64)]
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['alias : ' + str(self.alias)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alias_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_alias, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4546
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['alias : ' + str(self.alias)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":4539
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 */
  }

  /* "cuda/cuda.pyx":4548
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":4538
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4551
 * 
 *     @property
 *     def operation(self):             # <<<<<<<<<<<<<<
 *         return CUstreamBatchMemOpType(self._ptr[0].waitValue.operation)
 *     @operation.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9operation_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9operation_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9operation___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9operation___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4551, 0, __PYX_ERR(0, 4551, __pyx_L1_error));

  /* "cuda/cuda.pyx":4552
 *     @property
 *     def operation(self):
 *         return CUstreamBatchMemOpType(self._ptr[0].waitValue.operation)             # <<<<<<<<<<<<<<
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUstreamBatchMemOpType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum((__pyx_v_self->_ptr[0]).waitValue.operation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4551
 * 
 *     @property
 *     def operation(self):             # <<<<<<<<<<<<<<
 *         return CUstreamBatchMemOpType(self._ptr[0].waitValue.operation)
 *     @operation.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.operation.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4554
 *         return CUstreamBatchMemOpType(self._ptr[0].waitValue.operation)
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].waitValue.operation = operation.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9operation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_operation); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9operation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_operation) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_operation) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "operation"); __PYX_ERR(0, 4554, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9operation_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self), ((PyObject *)__pyx_v_operation));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9operation_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, PyObject *__pyx_v_operation) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUstreamBatchMemOpType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4554, 0, __PYX_ERR(0, 4554, __pyx_L1_error));

  /* "cuda/cuda.pyx":4556
 *     def operation(self, operation not None : CUstreamBatchMemOpType):
 *         pass
 *         self._ptr[0].waitValue.operation = operation.value             # <<<<<<<<<<<<<<
 *     @property
 *     def address(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operation, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUstreamBatchMemOpType_enum)__Pyx_PyInt_As_enum__CUstreamBatchMemOpType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4556, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).waitValue.operation = __pyx_t_2;

  /* "cuda/cuda.pyx":4554
 *         return CUstreamBatchMemOpType(self._ptr[0].waitValue.operation)
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].waitValue.operation = operation.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.operation.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4558
 *         self._ptr[0].waitValue.operation = operation.value
 *     @property
 *     def address(self):             # <<<<<<<<<<<<<<
 *         return self._address
 *     @address.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7address_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7address_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7address___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7address___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4558, 0, __PYX_ERR(0, 4558, __pyx_L1_error));

  /* "cuda/cuda.pyx":4559
 *     @property
 *     def address(self):
 *         return self._address             # <<<<<<<<<<<<<<
 *     @address.setter
 *     def address(self, address):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_address));
  __pyx_r = ((PyObject *)__pyx_v_self->_address);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4558
 *         self._ptr[0].waitValue.operation = operation.value
 *     @property
 *     def address(self):             # <<<<<<<<<<<<<<
 *         return self._address
 *     @address.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.address.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4561
 *         return self._address
 *     @address.setter
 *     def address(self, address):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr caddress
 *         if address is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7address_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_address); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7address_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_address) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7address_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self), ((PyObject *)__pyx_v_address));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7address_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, PyObject *__pyx_v_address) {
  CUdeviceptr __pyx_v_caddress;
  PyObject *__pyx_v_paddress = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4561, 0, __PYX_ERR(0, 4561, __pyx_L1_error));

  /* "cuda/cuda.pyx":4563
 *     def address(self, address):
 *         cdef ccuda.CUdeviceptr caddress
 *         if address is None:             # <<<<<<<<<<<<<<
 *             caddress = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(address, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_address == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":4564
 *         cdef ccuda.CUdeviceptr caddress
 *         if address is None:
 *             caddress = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(address, (CUdeviceptr)):
 *             paddress = int(address)
 */
    __pyx_v_caddress = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":4563
 *     def address(self, address):
 *         cdef ccuda.CUdeviceptr caddress
 *         if address is None:             # <<<<<<<<<<<<<<
 *             caddress = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(address, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4565
 *         if address is None:
 *             caddress = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(address, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             paddress = int(address)
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_address, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4566
 *             caddress = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(address, (CUdeviceptr)):
 *             paddress = int(address)             # <<<<<<<<<<<<<<
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_paddress = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":4567
 *         elif isinstance(address, (CUdeviceptr)):
 *             paddress = int(address)
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress             # <<<<<<<<<<<<<<
 *         else:
 *             paddress = int(CUdeviceptr(address))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddress); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4567, __pyx_L1_error)
    __pyx_v_caddress = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":4565
 *         if address is None:
 *             caddress = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(address, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             paddress = int(address)
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4569
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress
 *         else:
 *             paddress = int(CUdeviceptr(address))             # <<<<<<<<<<<<<<
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress
 *         self._address._ptr[0] = caddress
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_paddress = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":4570
 *         else:
 *             paddress = int(CUdeviceptr(address))
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress             # <<<<<<<<<<<<<<
 *         self._address._ptr[0] = caddress
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddress); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4570, __pyx_L1_error)
    __pyx_v_caddress = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4571
 *             paddress = int(CUdeviceptr(address))
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress
 *         self._address._ptr[0] = caddress             # <<<<<<<<<<<<<<
 *     @property
 *     def value64(self):
 */
  (__pyx_v_self->_address->_ptr[0]) = __pyx_v_caddress;

  /* "cuda/cuda.pyx":4561
 *         return self._address
 *     @address.setter
 *     def address(self, address):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr caddress
 *         if address is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.address.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_paddress);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4573
 *         self._address._ptr[0] = caddress
 *     @property
 *     def value64(self):             # <<<<<<<<<<<<<<
 *         return self._value64
 *     @value64.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7value64_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7value64_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7value64___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7value64___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4573, 0, __PYX_ERR(0, 4573, __pyx_L1_error));

  /* "cuda/cuda.pyx":4574
 *     @property
 *     def value64(self):
 *         return self._value64             # <<<<<<<<<<<<<<
 *     @value64.setter
 *     def value64(self, value64):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_value64));
  __pyx_r = ((PyObject *)__pyx_v_self->_value64);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4573
 *         self._address._ptr[0] = caddress
 *     @property
 *     def value64(self):             # <<<<<<<<<<<<<<
 *         return self._value64
 *     @value64.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.value64.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4576
 *         return self._value64
 *     @value64.setter
 *     def value64(self, value64):             # <<<<<<<<<<<<<<
 *         cdef ccuda.cuuint64_t cvalue64
 *         if value64 is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7value64_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value64); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7value64_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value64) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7value64_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self), ((PyObject *)__pyx_v_value64));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7value64_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, PyObject *__pyx_v_value64) {
  cuuint64_t __pyx_v_cvalue64;
  PyObject *__pyx_v_pvalue64 = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4576, 0, __PYX_ERR(0, 4576, __pyx_L1_error));

  /* "cuda/cuda.pyx":4578
 *     def value64(self, value64):
 *         cdef ccuda.cuuint64_t cvalue64
 *         if value64 is None:             # <<<<<<<<<<<<<<
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>0
 *         elif isinstance(value64, (cuuint64_t)):
 */
  __pyx_t_1 = (__pyx_v_value64 == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":4579
 *         cdef ccuda.cuuint64_t cvalue64
 *         if value64 is None:
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(value64, (cuuint64_t)):
 *             pvalue64 = int(value64)
 */
    __pyx_v_cvalue64 = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":4578
 *     def value64(self, value64):
 *         cdef ccuda.cuuint64_t cvalue64
 *         if value64 is None:             # <<<<<<<<<<<<<<
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>0
 *         elif isinstance(value64, (cuuint64_t)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4580
 *         if value64 is None:
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>0
 *         elif isinstance(value64, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *             pvalue64 = int(value64)
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value64, __pyx_ptype_4cuda_4cuda_cuuint64_t); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4581
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>0
 *         elif isinstance(value64, (cuuint64_t)):
 *             pvalue64 = int(value64)             # <<<<<<<<<<<<<<
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvalue64 = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":4582
 *         elif isinstance(value64, (cuuint64_t)):
 *             pvalue64 = int(value64)
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64             # <<<<<<<<<<<<<<
 *         else:
 *             pvalue64 = int(cuuint64_t(value64))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue64); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4582, __pyx_L1_error)
    __pyx_v_cvalue64 = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":4580
 *         if value64 is None:
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>0
 *         elif isinstance(value64, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *             pvalue64 = int(value64)
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4584
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64
 *         else:
 *             pvalue64 = int(cuuint64_t(value64))             # <<<<<<<<<<<<<<
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64
 *         self._value64._ptr[0] = cvalue64
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t), __pyx_v_value64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvalue64 = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":4585
 *         else:
 *             pvalue64 = int(cuuint64_t(value64))
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64             # <<<<<<<<<<<<<<
 *         self._value64._ptr[0] = cvalue64
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue64); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4585, __pyx_L1_error)
    __pyx_v_cvalue64 = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4586
 *             pvalue64 = int(cuuint64_t(value64))
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64
 *         self._value64._ptr[0] = cvalue64             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
  (__pyx_v_self->_value64->_ptr[0]) = __pyx_v_cvalue64;

  /* "cuda/cuda.pyx":4576
 *         return self._value64
 *     @value64.setter
 *     def value64(self, value64):             # <<<<<<<<<<<<<<
 *         cdef ccuda.cuuint64_t cvalue64
 *         if value64 is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.value64.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvalue64);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4588
 *         self._value64._ptr[0] = cvalue64
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].waitValue.flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4588, 0, __PYX_ERR(0, 4588, __pyx_L1_error));

  /* "cuda/cuda.pyx":4589
 *     @property
 *     def flags(self):
 *         return self._ptr[0].waitValue.flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).waitValue.flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4588
 *         self._value64._ptr[0] = cvalue64
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].waitValue.flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4591
 *         return self._ptr[0].waitValue.flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].waitValue.flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4591, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4591, 0, __PYX_ERR(0, 4591, __pyx_L1_error));

  /* "cuda/cuda.pyx":4593
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].waitValue.flags = flags             # <<<<<<<<<<<<<<
 *     @property
 *     def alias(self):
 */
  (__pyx_v_self->_ptr[0]).waitValue.flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":4591
 *         return self._ptr[0].waitValue.flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].waitValue.flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4595
 *         self._ptr[0].waitValue.flags = flags
 *     @property
 *     def alias(self):             # <<<<<<<<<<<<<<
 *         return self._alias
 *     @alias.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5alias_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5alias_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5alias___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5alias___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4595, 0, __PYX_ERR(0, 4595, __pyx_L1_error));

  /* "cuda/cuda.pyx":4596
 *     @property
 *     def alias(self):
 *         return self._alias             # <<<<<<<<<<<<<<
 *     @alias.setter
 *     def alias(self, alias):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_alias));
  __pyx_r = ((PyObject *)__pyx_v_self->_alias);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4595
 *         self._ptr[0].waitValue.flags = flags
 *     @property
 *     def alias(self):             # <<<<<<<<<<<<<<
 *         return self._alias
 *     @alias.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.alias.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4598
 *         return self._alias
 *     @alias.setter
 *     def alias(self, alias):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr calias
 *         if alias is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5alias_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_alias); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5alias_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_alias) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5alias_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self), ((PyObject *)__pyx_v_alias));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5alias_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, PyObject *__pyx_v_alias) {
  CUdeviceptr __pyx_v_calias;
  PyObject *__pyx_v_palias = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4598, 0, __PYX_ERR(0, 4598, __pyx_L1_error));

  /* "cuda/cuda.pyx":4600
 *     def alias(self, alias):
 *         cdef ccuda.CUdeviceptr calias
 *         if alias is None:             # <<<<<<<<<<<<<<
 *             calias = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(alias, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_alias == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":4601
 *         cdef ccuda.CUdeviceptr calias
 *         if alias is None:
 *             calias = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(alias, (CUdeviceptr)):
 *             palias = int(alias)
 */
    __pyx_v_calias = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":4600
 *     def alias(self, alias):
 *         cdef ccuda.CUdeviceptr calias
 *         if alias is None:             # <<<<<<<<<<<<<<
 *             calias = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(alias, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4602
 *         if alias is None:
 *             calias = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(alias, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             palias = int(alias)
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_alias, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4603
 *             calias = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(alias, (CUdeviceptr)):
 *             palias = int(alias)             # <<<<<<<<<<<<<<
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_alias); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_palias = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":4604
 *         elif isinstance(alias, (CUdeviceptr)):
 *             palias = int(alias)
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias             # <<<<<<<<<<<<<<
 *         else:
 *             palias = int(CUdeviceptr(alias))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_palias); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4604, __pyx_L1_error)
    __pyx_v_calias = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":4602
 *         if alias is None:
 *             calias = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(alias, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             palias = int(alias)
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4606
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias
 *         else:
 *             palias = int(CUdeviceptr(alias))             # <<<<<<<<<<<<<<
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias
 *         self._alias._ptr[0] = calias
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_alias); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_palias = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":4607
 *         else:
 *             palias = int(CUdeviceptr(alias))
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias             # <<<<<<<<<<<<<<
 *         self._alias._ptr[0] = calias
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_palias); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4607, __pyx_L1_error)
    __pyx_v_calias = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4608
 *             palias = int(CUdeviceptr(alias))
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias
 *         self._alias._ptr[0] = calias             # <<<<<<<<<<<<<<
 * 
 * cdef class CUstreamMemOpWriteValueParams_st:
 */
  (__pyx_v_self->_alias->_ptr[0]) = __pyx_v_calias;

  /* "cuda/cuda.pyx":4598
 *         return self._alias
 *     @alias.setter
 *     def alias(self, alias):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr calias
 *         if alias is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.alias.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_palias);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_8__reduce_cython__[] = "CUstreamMemOpWaitValueParams_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__145)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__146, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_10__setstate_cython__[] = "CUstreamMemOpWaitValueParams_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__147)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__148, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWaitValueParams_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4632
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4632, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4632, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4632, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4632, 0, __PYX_ERR(0, 4632, __pyx_L1_error));

  /* "cuda/cuda.pyx":4633
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._address = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.address)
 */
  __pyx_v_self->_ptr = ((union CUstreamBatchMemOpParams_union *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":4632
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4634
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._address = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.address)
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].writeValue.value64)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4634, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4634, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4634, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4634, 0, __PYX_ERR(0, 4634, __pyx_L1_error));

  /* "cuda/cuda.pyx":4635
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._address = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.address)             # <<<<<<<<<<<<<<
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].writeValue.value64)
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.alias)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).writeValue.address))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 4635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_address);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_address));
  __pyx_v_self->_address = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":4636
 *     def __init__(self, void_ptr _ptr):
 *         self._address = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.address)
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].writeValue.value64)             # <<<<<<<<<<<<<<
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.alias)
 *     def getPtr(self):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).writeValue.value64))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 4636, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_value64);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_value64));
  __pyx_v_self->_value64 = ((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4637
 *         self._address = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.address)
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].writeValue.value64)
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.alias)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).writeValue.alias))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 4637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_alias);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_alias));
  __pyx_v_self->_alias = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":4634
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._address = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.address)
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].writeValue.value64)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4638
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].writeValue.value64)
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.alias)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_4getPtr[] = "CUstreamMemOpWriteValueParams_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_4getPtr(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_4getPtr(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__149)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4638, 0, __PYX_ERR(0, 4638, __pyx_L1_error));

  /* "cuda/cuda.pyx":4639
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.alias)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4638
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].writeValue.value64)
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.alias)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4640
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_6__repr__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_6__repr__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4640, 0, __PYX_ERR(0, 4640, __pyx_L1_error));

  /* "cuda/cuda.pyx":4641
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4642
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['address : ' + str(self.address)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4643
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]             # <<<<<<<<<<<<<<
 *             str_list += ['address : ' + str(self.address)]
 *             str_list += ['value64 : ' + str(self.value64)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_operation_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_operation, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4644
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['address : ' + str(self.address)]             # <<<<<<<<<<<<<<
 *             str_list += ['value64 : ' + str(self.value64)]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_address_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_address, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4645
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['address : ' + str(self.address)]
 *             str_list += ['value64 : ' + str(self.value64)]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['alias : ' + str(self.alias)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value64_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_value64, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4646
 *             str_list += ['address : ' + str(self.address)]
 *             str_list += ['value64 : ' + str(self.value64)]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             str_list += ['alias : ' + str(self.alias)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4647
 *             str_list += ['value64 : ' + str(self.value64)]
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['alias : ' + str(self.alias)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alias_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_alias, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4648
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['alias : ' + str(self.alias)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":4641
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 */
  }

  /* "cuda/cuda.pyx":4650
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":4640
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4653
 * 
 *     @property
 *     def operation(self):             # <<<<<<<<<<<<<<
 *         return CUstreamBatchMemOpType(self._ptr[0].writeValue.operation)
 *     @operation.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9operation_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9operation_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9operation___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9operation___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4653, 0, __PYX_ERR(0, 4653, __pyx_L1_error));

  /* "cuda/cuda.pyx":4654
 *     @property
 *     def operation(self):
 *         return CUstreamBatchMemOpType(self._ptr[0].writeValue.operation)             # <<<<<<<<<<<<<<
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUstreamBatchMemOpType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum((__pyx_v_self->_ptr[0]).writeValue.operation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4653
 * 
 *     @property
 *     def operation(self):             # <<<<<<<<<<<<<<
 *         return CUstreamBatchMemOpType(self._ptr[0].writeValue.operation)
 *     @operation.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.operation.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4656
 *         return CUstreamBatchMemOpType(self._ptr[0].writeValue.operation)
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].writeValue.operation = operation.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9operation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_operation); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9operation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_operation) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_operation) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "operation"); __PYX_ERR(0, 4656, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9operation_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self), ((PyObject *)__pyx_v_operation));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9operation_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, PyObject *__pyx_v_operation) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUstreamBatchMemOpType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4656, 0, __PYX_ERR(0, 4656, __pyx_L1_error));

  /* "cuda/cuda.pyx":4658
 *     def operation(self, operation not None : CUstreamBatchMemOpType):
 *         pass
 *         self._ptr[0].writeValue.operation = operation.value             # <<<<<<<<<<<<<<
 *     @property
 *     def address(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operation, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUstreamBatchMemOpType_enum)__Pyx_PyInt_As_enum__CUstreamBatchMemOpType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).writeValue.operation = __pyx_t_2;

  /* "cuda/cuda.pyx":4656
 *         return CUstreamBatchMemOpType(self._ptr[0].writeValue.operation)
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].writeValue.operation = operation.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.operation.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4660
 *         self._ptr[0].writeValue.operation = operation.value
 *     @property
 *     def address(self):             # <<<<<<<<<<<<<<
 *         return self._address
 *     @address.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7address_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7address_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7address___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7address___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4660, 0, __PYX_ERR(0, 4660, __pyx_L1_error));

  /* "cuda/cuda.pyx":4661
 *     @property
 *     def address(self):
 *         return self._address             # <<<<<<<<<<<<<<
 *     @address.setter
 *     def address(self, address):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_address));
  __pyx_r = ((PyObject *)__pyx_v_self->_address);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4660
 *         self._ptr[0].writeValue.operation = operation.value
 *     @property
 *     def address(self):             # <<<<<<<<<<<<<<
 *         return self._address
 *     @address.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.address.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4663
 *         return self._address
 *     @address.setter
 *     def address(self, address):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr caddress
 *         if address is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7address_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_address); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7address_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_address) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7address_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self), ((PyObject *)__pyx_v_address));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7address_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, PyObject *__pyx_v_address) {
  CUdeviceptr __pyx_v_caddress;
  PyObject *__pyx_v_paddress = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4663, 0, __PYX_ERR(0, 4663, __pyx_L1_error));

  /* "cuda/cuda.pyx":4665
 *     def address(self, address):
 *         cdef ccuda.CUdeviceptr caddress
 *         if address is None:             # <<<<<<<<<<<<<<
 *             caddress = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(address, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_address == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":4666
 *         cdef ccuda.CUdeviceptr caddress
 *         if address is None:
 *             caddress = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(address, (CUdeviceptr)):
 *             paddress = int(address)
 */
    __pyx_v_caddress = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":4665
 *     def address(self, address):
 *         cdef ccuda.CUdeviceptr caddress
 *         if address is None:             # <<<<<<<<<<<<<<
 *             caddress = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(address, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4667
 *         if address is None:
 *             caddress = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(address, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             paddress = int(address)
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_address, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4668
 *             caddress = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(address, (CUdeviceptr)):
 *             paddress = int(address)             # <<<<<<<<<<<<<<
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_paddress = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":4669
 *         elif isinstance(address, (CUdeviceptr)):
 *             paddress = int(address)
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress             # <<<<<<<<<<<<<<
 *         else:
 *             paddress = int(CUdeviceptr(address))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddress); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4669, __pyx_L1_error)
    __pyx_v_caddress = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":4667
 *         if address is None:
 *             caddress = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(address, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             paddress = int(address)
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4671
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress
 *         else:
 *             paddress = int(CUdeviceptr(address))             # <<<<<<<<<<<<<<
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress
 *         self._address._ptr[0] = caddress
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_paddress = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":4672
 *         else:
 *             paddress = int(CUdeviceptr(address))
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress             # <<<<<<<<<<<<<<
 *         self._address._ptr[0] = caddress
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddress); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4672, __pyx_L1_error)
    __pyx_v_caddress = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4673
 *             paddress = int(CUdeviceptr(address))
 *             caddress = <ccuda.CUdeviceptr><void_ptr>paddress
 *         self._address._ptr[0] = caddress             # <<<<<<<<<<<<<<
 *     @property
 *     def value64(self):
 */
  (__pyx_v_self->_address->_ptr[0]) = __pyx_v_caddress;

  /* "cuda/cuda.pyx":4663
 *         return self._address
 *     @address.setter
 *     def address(self, address):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr caddress
 *         if address is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.address.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_paddress);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4675
 *         self._address._ptr[0] = caddress
 *     @property
 *     def value64(self):             # <<<<<<<<<<<<<<
 *         return self._value64
 *     @value64.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7value64_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7value64_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7value64___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7value64___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4675, 0, __PYX_ERR(0, 4675, __pyx_L1_error));

  /* "cuda/cuda.pyx":4676
 *     @property
 *     def value64(self):
 *         return self._value64             # <<<<<<<<<<<<<<
 *     @value64.setter
 *     def value64(self, value64):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_value64));
  __pyx_r = ((PyObject *)__pyx_v_self->_value64);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4675
 *         self._address._ptr[0] = caddress
 *     @property
 *     def value64(self):             # <<<<<<<<<<<<<<
 *         return self._value64
 *     @value64.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.value64.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4678
 *         return self._value64
 *     @value64.setter
 *     def value64(self, value64):             # <<<<<<<<<<<<<<
 *         cdef ccuda.cuuint64_t cvalue64
 *         if value64 is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7value64_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value64); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7value64_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value64) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7value64_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self), ((PyObject *)__pyx_v_value64));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7value64_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, PyObject *__pyx_v_value64) {
  cuuint64_t __pyx_v_cvalue64;
  PyObject *__pyx_v_pvalue64 = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4678, 0, __PYX_ERR(0, 4678, __pyx_L1_error));

  /* "cuda/cuda.pyx":4680
 *     def value64(self, value64):
 *         cdef ccuda.cuuint64_t cvalue64
 *         if value64 is None:             # <<<<<<<<<<<<<<
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>0
 *         elif isinstance(value64, (cuuint64_t)):
 */
  __pyx_t_1 = (__pyx_v_value64 == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":4681
 *         cdef ccuda.cuuint64_t cvalue64
 *         if value64 is None:
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(value64, (cuuint64_t)):
 *             pvalue64 = int(value64)
 */
    __pyx_v_cvalue64 = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":4680
 *     def value64(self, value64):
 *         cdef ccuda.cuuint64_t cvalue64
 *         if value64 is None:             # <<<<<<<<<<<<<<
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>0
 *         elif isinstance(value64, (cuuint64_t)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4682
 *         if value64 is None:
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>0
 *         elif isinstance(value64, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *             pvalue64 = int(value64)
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value64, __pyx_ptype_4cuda_4cuda_cuuint64_t); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4683
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>0
 *         elif isinstance(value64, (cuuint64_t)):
 *             pvalue64 = int(value64)             # <<<<<<<<<<<<<<
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvalue64 = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":4684
 *         elif isinstance(value64, (cuuint64_t)):
 *             pvalue64 = int(value64)
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64             # <<<<<<<<<<<<<<
 *         else:
 *             pvalue64 = int(cuuint64_t(value64))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue64); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4684, __pyx_L1_error)
    __pyx_v_cvalue64 = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":4682
 *         if value64 is None:
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>0
 *         elif isinstance(value64, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *             pvalue64 = int(value64)
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4686
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64
 *         else:
 *             pvalue64 = int(cuuint64_t(value64))             # <<<<<<<<<<<<<<
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64
 *         self._value64._ptr[0] = cvalue64
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t), __pyx_v_value64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvalue64 = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":4687
 *         else:
 *             pvalue64 = int(cuuint64_t(value64))
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64             # <<<<<<<<<<<<<<
 *         self._value64._ptr[0] = cvalue64
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue64); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4687, __pyx_L1_error)
    __pyx_v_cvalue64 = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4688
 *             pvalue64 = int(cuuint64_t(value64))
 *             cvalue64 = <ccuda.cuuint64_t><void_ptr>pvalue64
 *         self._value64._ptr[0] = cvalue64             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
  (__pyx_v_self->_value64->_ptr[0]) = __pyx_v_cvalue64;

  /* "cuda/cuda.pyx":4678
 *         return self._value64
 *     @value64.setter
 *     def value64(self, value64):             # <<<<<<<<<<<<<<
 *         cdef ccuda.cuuint64_t cvalue64
 *         if value64 is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.value64.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvalue64);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4690
 *         self._value64._ptr[0] = cvalue64
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].writeValue.flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4690, 0, __PYX_ERR(0, 4690, __pyx_L1_error));

  /* "cuda/cuda.pyx":4691
 *     @property
 *     def flags(self):
 *         return self._ptr[0].writeValue.flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).writeValue.flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4690
 *         self._value64._ptr[0] = cvalue64
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].writeValue.flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4693
 *         return self._ptr[0].writeValue.flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].writeValue.flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4693, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4693, 0, __PYX_ERR(0, 4693, __pyx_L1_error));

  /* "cuda/cuda.pyx":4695
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].writeValue.flags = flags             # <<<<<<<<<<<<<<
 *     @property
 *     def alias(self):
 */
  (__pyx_v_self->_ptr[0]).writeValue.flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":4693
 *         return self._ptr[0].writeValue.flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].writeValue.flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4697
 *         self._ptr[0].writeValue.flags = flags
 *     @property
 *     def alias(self):             # <<<<<<<<<<<<<<
 *         return self._alias
 *     @alias.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5alias_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5alias_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5alias___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5alias___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4697, 0, __PYX_ERR(0, 4697, __pyx_L1_error));

  /* "cuda/cuda.pyx":4698
 *     @property
 *     def alias(self):
 *         return self._alias             # <<<<<<<<<<<<<<
 *     @alias.setter
 *     def alias(self, alias):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_alias));
  __pyx_r = ((PyObject *)__pyx_v_self->_alias);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4697
 *         self._ptr[0].writeValue.flags = flags
 *     @property
 *     def alias(self):             # <<<<<<<<<<<<<<
 *         return self._alias
 *     @alias.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.alias.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4700
 *         return self._alias
 *     @alias.setter
 *     def alias(self, alias):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr calias
 *         if alias is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5alias_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_alias); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5alias_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_alias) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5alias_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self), ((PyObject *)__pyx_v_alias));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5alias_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, PyObject *__pyx_v_alias) {
  CUdeviceptr __pyx_v_calias;
  PyObject *__pyx_v_palias = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4700, 0, __PYX_ERR(0, 4700, __pyx_L1_error));

  /* "cuda/cuda.pyx":4702
 *     def alias(self, alias):
 *         cdef ccuda.CUdeviceptr calias
 *         if alias is None:             # <<<<<<<<<<<<<<
 *             calias = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(alias, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_alias == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":4703
 *         cdef ccuda.CUdeviceptr calias
 *         if alias is None:
 *             calias = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(alias, (CUdeviceptr)):
 *             palias = int(alias)
 */
    __pyx_v_calias = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":4702
 *     def alias(self, alias):
 *         cdef ccuda.CUdeviceptr calias
 *         if alias is None:             # <<<<<<<<<<<<<<
 *             calias = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(alias, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4704
 *         if alias is None:
 *             calias = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(alias, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             palias = int(alias)
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_alias, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4705
 *             calias = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(alias, (CUdeviceptr)):
 *             palias = int(alias)             # <<<<<<<<<<<<<<
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_alias); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_palias = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":4706
 *         elif isinstance(alias, (CUdeviceptr)):
 *             palias = int(alias)
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias             # <<<<<<<<<<<<<<
 *         else:
 *             palias = int(CUdeviceptr(alias))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_palias); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4706, __pyx_L1_error)
    __pyx_v_calias = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":4704
 *         if alias is None:
 *             calias = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(alias, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             palias = int(alias)
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4708
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias
 *         else:
 *             palias = int(CUdeviceptr(alias))             # <<<<<<<<<<<<<<
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias
 *         self._alias._ptr[0] = calias
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_alias); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_palias = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":4709
 *         else:
 *             palias = int(CUdeviceptr(alias))
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias             # <<<<<<<<<<<<<<
 *         self._alias._ptr[0] = calias
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_palias); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4709, __pyx_L1_error)
    __pyx_v_calias = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4710
 *             palias = int(CUdeviceptr(alias))
 *             calias = <ccuda.CUdeviceptr><void_ptr>palias
 *         self._alias._ptr[0] = calias             # <<<<<<<<<<<<<<
 * 
 * cdef class CUstreamMemOpFlushRemoteWritesParams_st:
 */
  (__pyx_v_self->_alias->_ptr[0]) = __pyx_v_calias;

  /* "cuda/cuda.pyx":4700
 *         return self._alias
 *     @alias.setter
 *     def alias(self, alias):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr calias
 *         if alias is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.alias.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_palias);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_8__reduce_cython__[] = "CUstreamMemOpWriteValueParams_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__150)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__151, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_10__setstate_cython__[] = "CUstreamMemOpWriteValueParams_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__152)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__153, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpWriteValueParams_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4728
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4728, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4728, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4728, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4728, 0, __PYX_ERR(0, 4728, __pyx_L1_error));

  /* "cuda/cuda.pyx":4729
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((union CUstreamBatchMemOpParams_union *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":4728
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4730
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4730, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4730, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4730, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4730, 0, __PYX_ERR(0, 4730, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4732
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_4getPtr[] = "CUstreamMemOpFlushRemoteWritesParams_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_4getPtr(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_4getPtr(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__154)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4732, 0, __PYX_ERR(0, 4732, __pyx_L1_error));

  /* "cuda/cuda.pyx":4733
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4732
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4734
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_6__repr__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_6__repr__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4734, 0, __PYX_ERR(0, 4734, __pyx_L1_error));

  /* "cuda/cuda.pyx":4735
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4736
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4737
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_operation_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_operation, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4738
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4739
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['flags : ' + str(self.flags)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":4735
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 */
  }

  /* "cuda/cuda.pyx":4741
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":4734
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4744
 * 
 *     @property
 *     def operation(self):             # <<<<<<<<<<<<<<
 *         return CUstreamBatchMemOpType(self._ptr[0].flushRemoteWrites.operation)
 *     @operation.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9operation_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9operation_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9operation___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9operation___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4744, 0, __PYX_ERR(0, 4744, __pyx_L1_error));

  /* "cuda/cuda.pyx":4745
 *     @property
 *     def operation(self):
 *         return CUstreamBatchMemOpType(self._ptr[0].flushRemoteWrites.operation)             # <<<<<<<<<<<<<<
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUstreamBatchMemOpType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum((__pyx_v_self->_ptr[0]).flushRemoteWrites.operation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4744
 * 
 *     @property
 *     def operation(self):             # <<<<<<<<<<<<<<
 *         return CUstreamBatchMemOpType(self._ptr[0].flushRemoteWrites.operation)
 *     @operation.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.operation.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4747
 *         return CUstreamBatchMemOpType(self._ptr[0].flushRemoteWrites.operation)
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flushRemoteWrites.operation = operation.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9operation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_operation); /*proto*/
static int __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9operation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_operation) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_operation) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "operation"); __PYX_ERR(0, 4747, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9operation_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)__pyx_v_self), ((PyObject *)__pyx_v_operation));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9operation_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self, PyObject *__pyx_v_operation) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUstreamBatchMemOpType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4747, 0, __PYX_ERR(0, 4747, __pyx_L1_error));

  /* "cuda/cuda.pyx":4749
 *     def operation(self, operation not None : CUstreamBatchMemOpType):
 *         pass
 *         self._ptr[0].flushRemoteWrites.operation = operation.value             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operation, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUstreamBatchMemOpType_enum)__Pyx_PyInt_As_enum__CUstreamBatchMemOpType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).flushRemoteWrites.operation = __pyx_t_2;

  /* "cuda/cuda.pyx":4747
 *         return CUstreamBatchMemOpType(self._ptr[0].flushRemoteWrites.operation)
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flushRemoteWrites.operation = operation.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.operation.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4751
 *         self._ptr[0].flushRemoteWrites.operation = operation.value
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flushRemoteWrites.flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4751, 0, __PYX_ERR(0, 4751, __pyx_L1_error));

  /* "cuda/cuda.pyx":4752
 *     @property
 *     def flags(self):
 *         return self._ptr[0].flushRemoteWrites.flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).flushRemoteWrites.flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4751
 *         self._ptr[0].flushRemoteWrites.operation = operation.value
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flushRemoteWrites.flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4754
 *         return self._ptr[0].flushRemoteWrites.flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flushRemoteWrites.flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4754, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4754, 0, __PYX_ERR(0, 4754, __pyx_L1_error));

  /* "cuda/cuda.pyx":4756
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].flushRemoteWrites.flags = flags             # <<<<<<<<<<<<<<
 * 
 * cdef class CUstreamMemOpMemoryBarrierParams_st:
 */
  (__pyx_v_self->_ptr[0]).flushRemoteWrites.flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":4754
 *         return self._ptr[0].flushRemoteWrites.flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flushRemoteWrites.flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_8__reduce_cython__[] = "CUstreamMemOpFlushRemoteWritesParams_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__155)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__156, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_10__setstate_cython__[] = "CUstreamMemOpFlushRemoteWritesParams_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__157)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__158, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4774
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4774, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4774, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4774, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4774, 0, __PYX_ERR(0, 4774, __pyx_L1_error));

  /* "cuda/cuda.pyx":4775
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((union CUstreamBatchMemOpParams_union *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":4774
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4776
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4776, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4776, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4776, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4776, 0, __PYX_ERR(0, 4776, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4778
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_4getPtr[] = "CUstreamMemOpMemoryBarrierParams_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_4getPtr(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_4getPtr(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__159)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4778, 0, __PYX_ERR(0, 4778, __pyx_L1_error));

  /* "cuda/cuda.pyx":4779
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4778
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4780
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_6__repr__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_6__repr__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4780, 0, __PYX_ERR(0, 4780, __pyx_L1_error));

  /* "cuda/cuda.pyx":4781
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4782
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4783
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_operation_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_operation, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4784
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4785
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['flags : ' + str(self.flags)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":4781
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 */
  }

  /* "cuda/cuda.pyx":4787
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":4780
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4790
 * 
 *     @property
 *     def operation(self):             # <<<<<<<<<<<<<<
 *         return CUstreamBatchMemOpType(self._ptr[0].memoryBarrier.operation)
 *     @operation.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9operation_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9operation_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9operation___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9operation___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4790, 0, __PYX_ERR(0, 4790, __pyx_L1_error));

  /* "cuda/cuda.pyx":4791
 *     @property
 *     def operation(self):
 *         return CUstreamBatchMemOpType(self._ptr[0].memoryBarrier.operation)             # <<<<<<<<<<<<<<
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUstreamBatchMemOpType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum((__pyx_v_self->_ptr[0]).memoryBarrier.operation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4790
 * 
 *     @property
 *     def operation(self):             # <<<<<<<<<<<<<<
 *         return CUstreamBatchMemOpType(self._ptr[0].memoryBarrier.operation)
 *     @operation.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.operation.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4793
 *         return CUstreamBatchMemOpType(self._ptr[0].memoryBarrier.operation)
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].memoryBarrier.operation = operation.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9operation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_operation); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9operation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_operation) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_operation) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "operation"); __PYX_ERR(0, 4793, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9operation_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)__pyx_v_self), ((PyObject *)__pyx_v_operation));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9operation_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self, PyObject *__pyx_v_operation) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUstreamBatchMemOpType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4793, 0, __PYX_ERR(0, 4793, __pyx_L1_error));

  /* "cuda/cuda.pyx":4795
 *     def operation(self, operation not None : CUstreamBatchMemOpType):
 *         pass
 *         self._ptr[0].memoryBarrier.operation = operation.value             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operation, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUstreamBatchMemOpType_enum)__Pyx_PyInt_As_enum__CUstreamBatchMemOpType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).memoryBarrier.operation = __pyx_t_2;

  /* "cuda/cuda.pyx":4793
 *         return CUstreamBatchMemOpType(self._ptr[0].memoryBarrier.operation)
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].memoryBarrier.operation = operation.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.operation.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4797
 *         self._ptr[0].memoryBarrier.operation = operation.value
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].memoryBarrier.flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4797, 0, __PYX_ERR(0, 4797, __pyx_L1_error));

  /* "cuda/cuda.pyx":4798
 *     @property
 *     def flags(self):
 *         return self._ptr[0].memoryBarrier.flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).memoryBarrier.flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4797
 *         self._ptr[0].memoryBarrier.operation = operation.value
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].memoryBarrier.flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4800
 *         return self._ptr[0].memoryBarrier.flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].memoryBarrier.flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4800, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4800, 0, __PYX_ERR(0, 4800, __pyx_L1_error));

  /* "cuda/cuda.pyx":4802
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].memoryBarrier.flags = flags             # <<<<<<<<<<<<<<
 * 
 * cdef class CUstreamBatchMemOpParams_union:
 */
  (__pyx_v_self->_ptr[0]).memoryBarrier.flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":4800
 *         return self._ptr[0].memoryBarrier.flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].memoryBarrier.flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_8__reduce_cython__[] = "CUstreamMemOpMemoryBarrierParams_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__160)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__161, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_10__setstate_cython__[] = "CUstreamMemOpMemoryBarrierParams_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__162)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__163, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamMemOpMemoryBarrierParams_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4829
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4829, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4829, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4829, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union___cinit__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union___cinit__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4829, 0, __PYX_ERR(0, 4829, __pyx_L1_error));

  /* "cuda/cuda.pyx":4830
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4831
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4830
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4833
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._waitValue = CUstreamMemOpWaitValueParams_st(_ptr=<void_ptr>&self._ptr[0].waitValue)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((union CUstreamBatchMemOpParams_union *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4829
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4834
 *         else:
 *             self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._waitValue = CUstreamMemOpWaitValueParams_st(_ptr=<void_ptr>&self._ptr[0].waitValue)
 *         self._writeValue = CUstreamMemOpWriteValueParams_st(_ptr=<void_ptr>&self._ptr[0].writeValue)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4834, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4834, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4834, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_2__init__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_2__init__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4834, 0, __PYX_ERR(0, 4834, __pyx_L1_error));

  /* "cuda/cuda.pyx":4835
 *             self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._waitValue = CUstreamMemOpWaitValueParams_st(_ptr=<void_ptr>&self._ptr[0].waitValue)             # <<<<<<<<<<<<<<
 *         self._writeValue = CUstreamMemOpWriteValueParams_st(_ptr=<void_ptr>&self._ptr[0].writeValue)
 *         self._flushRemoteWrites = CUstreamMemOpFlushRemoteWritesParams_st(_ptr=<void_ptr>&self._ptr[0].flushRemoteWrites)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).waitValue))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 4835, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamMemOpWaitValueParams_st), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_waitValue);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_waitValue));
  __pyx_v_self->_waitValue = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":4836
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._waitValue = CUstreamMemOpWaitValueParams_st(_ptr=<void_ptr>&self._ptr[0].waitValue)
 *         self._writeValue = CUstreamMemOpWriteValueParams_st(_ptr=<void_ptr>&self._ptr[0].writeValue)             # <<<<<<<<<<<<<<
 *         self._flushRemoteWrites = CUstreamMemOpFlushRemoteWritesParams_st(_ptr=<void_ptr>&self._ptr[0].flushRemoteWrites)
 *         self._memoryBarrier = CUstreamMemOpMemoryBarrierParams_st(_ptr=<void_ptr>&self._ptr[0].memoryBarrier)
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).writeValue))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 4836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamMemOpWriteValueParams_st), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_writeValue);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_writeValue));
  __pyx_v_self->_writeValue = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4837
 *         self._waitValue = CUstreamMemOpWaitValueParams_st(_ptr=<void_ptr>&self._ptr[0].waitValue)
 *         self._writeValue = CUstreamMemOpWriteValueParams_st(_ptr=<void_ptr>&self._ptr[0].writeValue)
 *         self._flushRemoteWrites = CUstreamMemOpFlushRemoteWritesParams_st(_ptr=<void_ptr>&self._ptr[0].flushRemoteWrites)             # <<<<<<<<<<<<<<
 *         self._memoryBarrier = CUstreamMemOpMemoryBarrierParams_st(_ptr=<void_ptr>&self._ptr[0].memoryBarrier)
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).flushRemoteWrites))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 4837, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_flushRemoteWrites);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_flushRemoteWrites));
  __pyx_v_self->_flushRemoteWrites = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":4838
 *         self._writeValue = CUstreamMemOpWriteValueParams_st(_ptr=<void_ptr>&self._ptr[0].writeValue)
 *         self._flushRemoteWrites = CUstreamMemOpFlushRemoteWritesParams_st(_ptr=<void_ptr>&self._ptr[0].flushRemoteWrites)
 *         self._memoryBarrier = CUstreamMemOpMemoryBarrierParams_st(_ptr=<void_ptr>&self._ptr[0].memoryBarrier)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).memoryBarrier))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 4838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_memoryBarrier);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_memoryBarrier));
  __pyx_v_self->_memoryBarrier = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4834
 *         else:
 *             self._ptr = <ccuda.CUstreamBatchMemOpParams_union *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._waitValue = CUstreamMemOpWaitValueParams_st(_ptr=<void_ptr>&self._ptr[0].waitValue)
 *         self._writeValue = CUstreamMemOpWriteValueParams_st(_ptr=<void_ptr>&self._ptr[0].writeValue)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4839
 *         self._flushRemoteWrites = CUstreamMemOpFlushRemoteWritesParams_st(_ptr=<void_ptr>&self._ptr[0].flushRemoteWrites)
 *         self._memoryBarrier = CUstreamMemOpMemoryBarrierParams_st(_ptr=<void_ptr>&self._ptr[0].memoryBarrier)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 4839, 0, __PYX_ERR(0, 4839, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUstreamBatchMemOpParams_union.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":4841
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_30CUstreamBatchMemOpParams_union_6getPtr[] = "CUstreamBatchMemOpParams_union.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_30CUstreamBatchMemOpParams_union_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_30CUstreamBatchMemOpParams_union_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_6getPtr(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__164)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4841, 0, __PYX_ERR(0, 4841, __pyx_L1_error));

  /* "cuda/cuda.pyx":4842
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4841
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4843
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_8__repr__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_7genexpr__pyx_v_line = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_line = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_line = NULL;
  PyObject *__pyx_8genexpr3__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4843, 0, __PYX_ERR(0, 4843, __pyx_L1_error));

  /* "cuda/cuda.pyx":4844
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4845
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['waitValue :\n' + '\n'.join(['    ' + line for line in str(self.waitValue).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4846
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]             # <<<<<<<<<<<<<<
 *             str_list += ['waitValue :\n' + '\n'.join(['    ' + line for line in str(self.waitValue).splitlines()])]
 *             str_list += ['writeValue :\n' + '\n'.join(['    ' + line for line in str(self.writeValue).splitlines()])]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_operation_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_operation, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4847
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['waitValue :\n' + '\n'.join(['    ' + line for line in str(self.waitValue).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['writeValue :\n' + '\n'.join(['    ' + line for line in str(self.writeValue).splitlines()])]
 *             str_list += ['flushRemoteWrites :\n' + '\n'.join(['    ' + line for line in str(self.flushRemoteWrites).splitlines()])]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4847, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_waitValue_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4847, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4847, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4847, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 4847, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4847, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_7genexpr__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4847, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 4847, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_line); __pyx_7genexpr__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_line); __pyx_7genexpr__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_waitValue, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4848
 *             str_list += ['operation : ' + str(self.operation)]
 *             str_list += ['waitValue :\n' + '\n'.join(['    ' + line for line in str(self.waitValue).splitlines()])]
 *             str_list += ['writeValue :\n' + '\n'.join(['    ' + line for line in str(self.writeValue).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['flushRemoteWrites :\n' + '\n'.join(['    ' + line for line in str(self.flushRemoteWrites).splitlines()])]
 *             str_list += ['memoryBarrier :\n' + '\n'.join(['    ' + line for line in str(self.memoryBarrier).splitlines()])]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4848, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_writeValue_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4848, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4848, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyUnicode_Splitlines(((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4848, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 4848, __pyx_L12_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4848, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_line, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Add(__pyx_kp_u__165, __pyx_8genexpr1__pyx_v_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4848, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 4848, __pyx_L12_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_line); __pyx_8genexpr1__pyx_v_line = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_line); __pyx_8genexpr1__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_writeValue, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4849
 *             str_list += ['waitValue :\n' + '\n'.join(['    ' + line for line in str(self.waitValue).splitlines()])]
 *             str_list += ['writeValue :\n' + '\n'.join(['    ' + line for line in str(self.writeValue).splitlines()])]
 *             str_list += ['flushRemoteWrites :\n' + '\n'.join(['    ' + line for line in str(self.flushRemoteWrites).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['memoryBarrier :\n' + '\n'.join(['    ' + line for line in str(self.memoryBarrier).splitlines()])]
 *             str_list += ['pad : ' + str(self.pad)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4849, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flushRemoteWrites_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4849, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4849, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4849, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 4849, __pyx_L18_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4849, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_8genexpr2__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4849, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 4849, __pyx_L18_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_line); __pyx_8genexpr2__pyx_v_line = 0;
      goto __pyx_L21_exit_scope;
      __pyx_L18_error:;
      __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_line); __pyx_8genexpr2__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L21_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flushRemoteWrites, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4850
 *             str_list += ['writeValue :\n' + '\n'.join(['    ' + line for line in str(self.writeValue).splitlines()])]
 *             str_list += ['flushRemoteWrites :\n' + '\n'.join(['    ' + line for line in str(self.flushRemoteWrites).splitlines()])]
 *             str_list += ['memoryBarrier :\n' + '\n'.join(['    ' + line for line in str(self.memoryBarrier).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['pad : ' + str(self.pad)]
 *             return '\n'.join(str_list)
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4850, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memoryBarrier_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4850, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4850, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyUnicode_Splitlines(((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4850, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 4850, __pyx_L24_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4850, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_line, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Add(__pyx_kp_u__165, __pyx_8genexpr3__pyx_v_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4850, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 4850, __pyx_L24_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_line); __pyx_8genexpr3__pyx_v_line = 0;
      goto __pyx_L27_exit_scope;
      __pyx_L24_error:;
      __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_line); __pyx_8genexpr3__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L27_exit_scope:;
    } /* exit inner scope */
    __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_memoryBarrier, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4851
 *             str_list += ['flushRemoteWrites :\n' + '\n'.join(['    ' + line for line in str(self.flushRemoteWrites).splitlines()])]
 *             str_list += ['memoryBarrier :\n' + '\n'.join(['    ' + line for line in str(self.memoryBarrier).splitlines()])]
 *             str_list += ['pad : ' + str(self.pad)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pad_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_pad, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4852
 *             str_list += ['memoryBarrier :\n' + '\n'.join(['    ' + line for line in str(self.memoryBarrier).splitlines()])]
 *             str_list += ['pad : ' + str(self.pad)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":4844
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['operation : ' + str(self.operation)]
 */
  }

  /* "cuda/cuda.pyx":4854
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":4843
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_line);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_line);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_line);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4857
 * 
 *     @property
 *     def operation(self):             # <<<<<<<<<<<<<<
 *         return CUstreamBatchMemOpType(self._ptr[0].operation)
 *     @operation.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9operation_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9operation_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9operation___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9operation___get__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4857, 0, __PYX_ERR(0, 4857, __pyx_L1_error));

  /* "cuda/cuda.pyx":4858
 *     @property
 *     def operation(self):
 *         return CUstreamBatchMemOpType(self._ptr[0].operation)             # <<<<<<<<<<<<<<
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUstreamBatchMemOpType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum((__pyx_v_self->_ptr[0]).operation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4857
 * 
 *     @property
 *     def operation(self):             # <<<<<<<<<<<<<<
 *         return CUstreamBatchMemOpType(self._ptr[0].operation)
 *     @operation.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.operation.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4860
 *         return CUstreamBatchMemOpType(self._ptr[0].operation)
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].operation = operation.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9operation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_operation); /*proto*/
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9operation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_operation) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_operation) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "operation"); __PYX_ERR(0, 4860, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9operation_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self), ((PyObject *)__pyx_v_operation));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9operation_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, PyObject *__pyx_v_operation) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUstreamBatchMemOpType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4860, 0, __PYX_ERR(0, 4860, __pyx_L1_error));

  /* "cuda/cuda.pyx":4862
 *     def operation(self, operation not None : CUstreamBatchMemOpType):
 *         pass
 *         self._ptr[0].operation = operation.value             # <<<<<<<<<<<<<<
 *     @property
 *     def waitValue(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_operation, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUstreamBatchMemOpType_enum)__Pyx_PyInt_As_enum__CUstreamBatchMemOpType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).operation = __pyx_t_2;

  /* "cuda/cuda.pyx":4860
 *         return CUstreamBatchMemOpType(self._ptr[0].operation)
 *     @operation.setter
 *     def operation(self, operation not None : CUstreamBatchMemOpType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].operation = operation.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.operation.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4864
 *         self._ptr[0].operation = operation.value
 *     @property
 *     def waitValue(self):             # <<<<<<<<<<<<<<
 *         return self._waitValue
 *     @waitValue.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9waitValue_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9waitValue_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9waitValue___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9waitValue___get__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4864, 0, __PYX_ERR(0, 4864, __pyx_L1_error));

  /* "cuda/cuda.pyx":4865
 *     @property
 *     def waitValue(self):
 *         return self._waitValue             # <<<<<<<<<<<<<<
 *     @waitValue.setter
 *     def waitValue(self, waitValue not None : CUstreamMemOpWaitValueParams_st):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_waitValue));
  __pyx_r = ((PyObject *)__pyx_v_self->_waitValue);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4864
 *         self._ptr[0].operation = operation.value
 *     @property
 *     def waitValue(self):             # <<<<<<<<<<<<<<
 *         return self._waitValue
 *     @waitValue.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.waitValue.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4867
 *         return self._waitValue
 *     @waitValue.setter
 *     def waitValue(self, waitValue not None : CUstreamMemOpWaitValueParams_st):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(waitValue):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9waitValue_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_waitValue); /*proto*/
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9waitValue_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_waitValue) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_waitValue), __pyx_ptype_4cuda_4cuda_CUstreamMemOpWaitValueParams_st, 0, "waitValue", 0))) __PYX_ERR(0, 4867, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9waitValue_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)__pyx_v_waitValue));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9waitValue_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *__pyx_v_waitValue) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4867, 0, __PYX_ERR(0, 4867, __pyx_L1_error));

  /* "cuda/cuda.pyx":4869
 *     def waitValue(self, waitValue not None : CUstreamMemOpWaitValueParams_st):
 *         pass
 *         for _attr in dir(waitValue):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_waitValue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4869, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4869, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4869, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4869, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4869, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 4869, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":4870
 *         pass
 *         for _attr in dir(waitValue):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4870, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":4871
 *         for _attr in dir(waitValue):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._waitValue, _attr, getattr(waitValue, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":4870
 *         pass
 *         for _attr in dir(waitValue):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":4872
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._waitValue, _attr, getattr(waitValue, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4872, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":4873
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._waitValue, _attr, getattr(waitValue, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def writeValue(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_waitValue);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_waitValue), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 4873, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":4872
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._waitValue, _attr, getattr(waitValue, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":4869
 *     def waitValue(self, waitValue not None : CUstreamMemOpWaitValueParams_st):
 *         pass
 *         for _attr in dir(waitValue):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":4867
 *         return self._waitValue
 *     @waitValue.setter
 *     def waitValue(self, waitValue not None : CUstreamMemOpWaitValueParams_st):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(waitValue):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.waitValue.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4875
 *                 setattr(self._waitValue, _attr, getattr(waitValue, _attr))
 *     @property
 *     def writeValue(self):             # <<<<<<<<<<<<<<
 *         return self._writeValue
 *     @writeValue.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10writeValue_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10writeValue_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10writeValue___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10writeValue___get__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4875, 0, __PYX_ERR(0, 4875, __pyx_L1_error));

  /* "cuda/cuda.pyx":4876
 *     @property
 *     def writeValue(self):
 *         return self._writeValue             # <<<<<<<<<<<<<<
 *     @writeValue.setter
 *     def writeValue(self, writeValue not None : CUstreamMemOpWriteValueParams_st):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_writeValue));
  __pyx_r = ((PyObject *)__pyx_v_self->_writeValue);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4875
 *                 setattr(self._waitValue, _attr, getattr(waitValue, _attr))
 *     @property
 *     def writeValue(self):             # <<<<<<<<<<<<<<
 *         return self._writeValue
 *     @writeValue.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.writeValue.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4878
 *         return self._writeValue
 *     @writeValue.setter
 *     def writeValue(self, writeValue not None : CUstreamMemOpWriteValueParams_st):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(writeValue):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10writeValue_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_writeValue); /*proto*/
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10writeValue_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_writeValue) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_writeValue), __pyx_ptype_4cuda_4cuda_CUstreamMemOpWriteValueParams_st, 0, "writeValue", 0))) __PYX_ERR(0, 4878, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10writeValue_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)__pyx_v_writeValue));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10writeValue_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *__pyx_v_writeValue) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4878, 0, __PYX_ERR(0, 4878, __pyx_L1_error));

  /* "cuda/cuda.pyx":4880
 *     def writeValue(self, writeValue not None : CUstreamMemOpWriteValueParams_st):
 *         pass
 *         for _attr in dir(writeValue):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_writeValue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4880, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4880, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4880, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4880, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4880, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 4880, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":4881
 *         pass
 *         for _attr in dir(writeValue):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4881, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":4882
 *         for _attr in dir(writeValue):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._writeValue, _attr, getattr(writeValue, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":4881
 *         pass
 *         for _attr in dir(writeValue):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":4883
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._writeValue, _attr, getattr(writeValue, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4883, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":4884
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._writeValue, _attr, getattr(writeValue, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def flushRemoteWrites(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_writeValue);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_writeValue), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 4884, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":4883
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._writeValue, _attr, getattr(writeValue, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":4880
 *     def writeValue(self, writeValue not None : CUstreamMemOpWriteValueParams_st):
 *         pass
 *         for _attr in dir(writeValue):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":4878
 *         return self._writeValue
 *     @writeValue.setter
 *     def writeValue(self, writeValue not None : CUstreamMemOpWriteValueParams_st):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(writeValue):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.writeValue.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4886
 *                 setattr(self._writeValue, _attr, getattr(writeValue, _attr))
 *     @property
 *     def flushRemoteWrites(self):             # <<<<<<<<<<<<<<
 *         return self._flushRemoteWrites
 *     @flushRemoteWrites.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_17flushRemoteWrites_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_17flushRemoteWrites_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_17flushRemoteWrites___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_17flushRemoteWrites___get__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4886, 0, __PYX_ERR(0, 4886, __pyx_L1_error));

  /* "cuda/cuda.pyx":4887
 *     @property
 *     def flushRemoteWrites(self):
 *         return self._flushRemoteWrites             # <<<<<<<<<<<<<<
 *     @flushRemoteWrites.setter
 *     def flushRemoteWrites(self, flushRemoteWrites not None : CUstreamMemOpFlushRemoteWritesParams_st):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_flushRemoteWrites));
  __pyx_r = ((PyObject *)__pyx_v_self->_flushRemoteWrites);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4886
 *                 setattr(self._writeValue, _attr, getattr(writeValue, _attr))
 *     @property
 *     def flushRemoteWrites(self):             # <<<<<<<<<<<<<<
 *         return self._flushRemoteWrites
 *     @flushRemoteWrites.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.flushRemoteWrites.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4889
 *         return self._flushRemoteWrites
 *     @flushRemoteWrites.setter
 *     def flushRemoteWrites(self, flushRemoteWrites not None : CUstreamMemOpFlushRemoteWritesParams_st):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(flushRemoteWrites):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_17flushRemoteWrites_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_flushRemoteWrites); /*proto*/
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_17flushRemoteWrites_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_flushRemoteWrites) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_flushRemoteWrites), __pyx_ptype_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st, 0, "flushRemoteWrites", 0))) __PYX_ERR(0, 4889, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_17flushRemoteWrites_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)__pyx_v_flushRemoteWrites));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_17flushRemoteWrites_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *__pyx_v_flushRemoteWrites) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4889, 0, __PYX_ERR(0, 4889, __pyx_L1_error));

  /* "cuda/cuda.pyx":4891
 *     def flushRemoteWrites(self, flushRemoteWrites not None : CUstreamMemOpFlushRemoteWritesParams_st):
 *         pass
 *         for _attr in dir(flushRemoteWrites):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_flushRemoteWrites)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4891, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4891, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4891, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4891, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4891, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 4891, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":4892
 *         pass
 *         for _attr in dir(flushRemoteWrites):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4892, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":4893
 *         for _attr in dir(flushRemoteWrites):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._flushRemoteWrites, _attr, getattr(flushRemoteWrites, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":4892
 *         pass
 *         for _attr in dir(flushRemoteWrites):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":4894
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._flushRemoteWrites, _attr, getattr(flushRemoteWrites, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4894, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":4895
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._flushRemoteWrites, _attr, getattr(flushRemoteWrites, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def memoryBarrier(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_flushRemoteWrites);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_flushRemoteWrites), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4895, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 4895, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":4894
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._flushRemoteWrites, _attr, getattr(flushRemoteWrites, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":4891
 *     def flushRemoteWrites(self, flushRemoteWrites not None : CUstreamMemOpFlushRemoteWritesParams_st):
 *         pass
 *         for _attr in dir(flushRemoteWrites):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":4889
 *         return self._flushRemoteWrites
 *     @flushRemoteWrites.setter
 *     def flushRemoteWrites(self, flushRemoteWrites not None : CUstreamMemOpFlushRemoteWritesParams_st):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(flushRemoteWrites):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.flushRemoteWrites.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4897
 *                 setattr(self._flushRemoteWrites, _attr, getattr(flushRemoteWrites, _attr))
 *     @property
 *     def memoryBarrier(self):             # <<<<<<<<<<<<<<
 *         return self._memoryBarrier
 *     @memoryBarrier.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13memoryBarrier_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13memoryBarrier_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13memoryBarrier___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13memoryBarrier___get__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4897, 0, __PYX_ERR(0, 4897, __pyx_L1_error));

  /* "cuda/cuda.pyx":4898
 *     @property
 *     def memoryBarrier(self):
 *         return self._memoryBarrier             # <<<<<<<<<<<<<<
 *     @memoryBarrier.setter
 *     def memoryBarrier(self, memoryBarrier not None : CUstreamMemOpMemoryBarrierParams_st):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_memoryBarrier));
  __pyx_r = ((PyObject *)__pyx_v_self->_memoryBarrier);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4897
 *                 setattr(self._flushRemoteWrites, _attr, getattr(flushRemoteWrites, _attr))
 *     @property
 *     def memoryBarrier(self):             # <<<<<<<<<<<<<<
 *         return self._memoryBarrier
 *     @memoryBarrier.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.memoryBarrier.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4900
 *         return self._memoryBarrier
 *     @memoryBarrier.setter
 *     def memoryBarrier(self, memoryBarrier not None : CUstreamMemOpMemoryBarrierParams_st):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(memoryBarrier):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13memoryBarrier_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_memoryBarrier); /*proto*/
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13memoryBarrier_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_memoryBarrier) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memoryBarrier), __pyx_ptype_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st, 0, "memoryBarrier", 0))) __PYX_ERR(0, 4900, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13memoryBarrier_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)__pyx_v_memoryBarrier));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13memoryBarrier_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *__pyx_v_memoryBarrier) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4900, 0, __PYX_ERR(0, 4900, __pyx_L1_error));

  /* "cuda/cuda.pyx":4902
 *     def memoryBarrier(self, memoryBarrier not None : CUstreamMemOpMemoryBarrierParams_st):
 *         pass
 *         for _attr in dir(memoryBarrier):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_memoryBarrier)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4902, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4902, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4902, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4902, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4902, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 4902, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":4903
 *         pass
 *         for _attr in dir(memoryBarrier):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4903, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":4904
 *         for _attr in dir(memoryBarrier):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._memoryBarrier, _attr, getattr(memoryBarrier, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":4903
 *         pass
 *         for _attr in dir(memoryBarrier):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":4905
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._memoryBarrier, _attr, getattr(memoryBarrier, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4905, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":4906
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._memoryBarrier, _attr, getattr(memoryBarrier, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def pad(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_memoryBarrier);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_memoryBarrier), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4906, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 4906, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":4905
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._memoryBarrier, _attr, getattr(memoryBarrier, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":4902
 *     def memoryBarrier(self, memoryBarrier not None : CUstreamMemOpMemoryBarrierParams_st):
 *         pass
 *         for _attr in dir(memoryBarrier):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":4900
 *         return self._memoryBarrier
 *     @memoryBarrier.setter
 *     def memoryBarrier(self, memoryBarrier not None : CUstreamMemOpMemoryBarrierParams_st):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(memoryBarrier):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.memoryBarrier.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4908
 *                 setattr(self._memoryBarrier, _attr, getattr(memoryBarrier, _attr))
 *     @property
 *     def pad(self):             # <<<<<<<<<<<<<<
 *         return [cuuint64_t(init_value=_pad) for _pad in self._ptr[0].pad]
 *     @pad.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3pad_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3pad_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3pad___get__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3pad___get__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self) {
  cuuint64_t __pyx_8genexpr4__pyx_v__pad;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  cuuint64_t *__pyx_t_2;
  cuuint64_t *__pyx_t_3;
  cuuint64_t *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4908, 0, __PYX_ERR(0, 4908, __pyx_L1_error));

  /* "cuda/cuda.pyx":4909
 *     @property
 *     def pad(self):
 *         return [cuuint64_t(init_value=_pad) for _pad in self._ptr[0].pad]             # <<<<<<<<<<<<<<
 *     @pad.setter
 *     def pad(self, pad):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = ((__pyx_v_self->_ptr[0]).pad + 6);
    for (__pyx_t_4 = (__pyx_v_self->_ptr[0]).pad; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
      __pyx_t_2 = __pyx_t_4;
      __pyx_8genexpr4__pyx_v__pad = (__pyx_t_2[0]);
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyInt_From_uint64_t(__pyx_8genexpr4__pyx_v__pad); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_init_value, __pyx_t_6) < 0) __PYX_ERR(0, 4909, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 4909, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4908
 *                 setattr(self._memoryBarrier, _attr, getattr(memoryBarrier, _attr))
 *     @property
 *     def pad(self):             # <<<<<<<<<<<<<<
 *         return [cuuint64_t(init_value=_pad) for _pad in self._ptr[0].pad]
 *     @pad.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.pad.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4911
 *         return [cuuint64_t(init_value=_pad) for _pad in self._ptr[0].pad]
 *     @pad.setter
 *     def pad(self, pad):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].pad = pad
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3pad_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pad); /*proto*/
static int __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3pad_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pad) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3pad_2__set__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self), ((PyObject *)__pyx_v_pad));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3pad_2__set__(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, PyObject *__pyx_v_pad) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  cuuint64_t __pyx_t_1[6];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4911, 0, __PYX_ERR(0, 4911, __pyx_L1_error));

  /* "cuda/cuda.pyx":4913
 *     def pad(self, pad):
 *         pass
 *         self._ptr[0].pad = pad             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_st:
 */
  if (unlikely(__Pyx_carray_from_py_cuuint64_t(__pyx_v_pad, __pyx_t_1, 6) < 0)) __PYX_ERR(0, 4913, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).pad[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).pad[0]) * (6));

  /* "cuda/cuda.pyx":4911
 *         return [cuuint64_t(init_value=_pad) for _pad in self._ptr[0].pad]
 *     @pad.setter
 *     def pad(self, pad):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].pad = pad
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.pad.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10__reduce_cython__[] = "CUstreamBatchMemOpParams_union.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_30CUstreamBatchMemOpParams_union_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__167)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__168, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_30CUstreamBatchMemOpParams_union_12__setstate_cython__[] = "CUstreamBatchMemOpParams_union.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_30CUstreamBatchMemOpParams_union_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_30CUstreamBatchMemOpParams_union_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__169)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__170, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUstreamBatchMemOpParams_union.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4935
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4935, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4935, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4935, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 4935, 0, __PYX_ERR(0, 4935, __pyx_L1_error));

  /* "cuda/cuda.pyx":4936
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4937
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":4936
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4939
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._ctx = CUcontext(_ptr=<void_ptr>&self._ptr[0].ctx)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4935
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4940
 *         else:
 *             self._ptr = <ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._ctx = CUcontext(_ptr=<void_ptr>&self._ptr[0].ctx)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4940, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4940, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4940, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 4940, 0, __PYX_ERR(0, 4940, __pyx_L1_error));

  /* "cuda/cuda.pyx":4941
 *             self._ptr = <ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._ctx = CUcontext(_ptr=<void_ptr>&self._ptr[0].ctx)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         if self._paramArray is not NULL:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).ctx))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 4941, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_ctx);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_ctx));
  __pyx_v_self->_ctx = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":4940
 *         else:
 *             self._ptr = <ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._ctx = CUcontext(_ptr=<void_ptr>&self._ptr[0].ctx)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4942
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._ctx = CUcontext(_ptr=<void_ptr>&self._ptr[0].ctx)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._paramArray is not NULL:
 *             free(self._paramArray)
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_4__dealloc__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 4942, 0, __PYX_ERR(0, 4942, __pyx_L1_error));

  /* "cuda/cuda.pyx":4943
 *         self._ctx = CUcontext(_ptr=<void_ptr>&self._ptr[0].ctx)
 *     def __dealloc__(self):
 *         if self._paramArray is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._paramArray)
 *     def getPtr(self):
 */
  __pyx_t_1 = ((__pyx_v_self->_paramArray != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4944
 *     def __dealloc__(self):
 *         if self._paramArray is not NULL:
 *             free(self._paramArray)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
    free(__pyx_v_self->_paramArray);

    /* "cuda/cuda.pyx":4943
 *         self._ctx = CUcontext(_ptr=<void_ptr>&self._ptr[0].ctx)
 *     def __dealloc__(self):
 *         if self._paramArray is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._paramArray)
 *     def getPtr(self):
 */
  }

  /* "cuda/cuda.pyx":4942
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._ctx = CUcontext(_ptr=<void_ptr>&self._ptr[0].ctx)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._paramArray is not NULL:
 *             free(self._paramArray)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":4945
 *         if self._paramArray is not NULL:
 *             free(self._paramArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_6getPtr[] = "CUDA_BATCH_MEM_OP_NODE_PARAMS_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__171)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 4945, 0, __PYX_ERR(0, 4945, __pyx_L1_error));

  /* "cuda/cuda.pyx":4946
 *             free(self._paramArray)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4945
 *         if self._paramArray is not NULL:
 *             free(self._paramArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4947
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 4947, 0, __PYX_ERR(0, 4947, __pyx_L1_error));

  /* "cuda/cuda.pyx":4948
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['ctx : ' + str(self.ctx)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4949
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['ctx : ' + str(self.ctx)]
 *             str_list += ['count : ' + str(self.count)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4950
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['ctx : ' + str(self.ctx)]             # <<<<<<<<<<<<<<
 *             str_list += ['count : ' + str(self.count)]
 *             str_list += ['paramArray : ' + str(self.paramArray)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ctx_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_ctx, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4951
 *             str_list = []
 *             str_list += ['ctx : ' + str(self.ctx)]
 *             str_list += ['count : ' + str(self.count)]             # <<<<<<<<<<<<<<
 *             str_list += ['paramArray : ' + str(self.paramArray)]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_count_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_count, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4952
 *             str_list += ['ctx : ' + str(self.ctx)]
 *             str_list += ['count : ' + str(self.count)]
 *             str_list += ['paramArray : ' + str(self.paramArray)]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_paramArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_paramArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4953
 *             str_list += ['count : ' + str(self.count)]
 *             str_list += ['paramArray : ' + str(self.paramArray)]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":4954
 *             str_list += ['paramArray : ' + str(self.paramArray)]
 *             str_list += ['flags : ' + str(self.flags)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":4948
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['ctx : ' + str(self.ctx)]
 */
  }

  /* "cuda/cuda.pyx":4956
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":4947
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4959
 * 
 *     @property
 *     def ctx(self):             # <<<<<<<<<<<<<<
 *         return self._ctx
 *     @ctx.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3ctx_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3ctx_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3ctx___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3ctx___get__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4959, 0, __PYX_ERR(0, 4959, __pyx_L1_error));

  /* "cuda/cuda.pyx":4960
 *     @property
 *     def ctx(self):
 *         return self._ctx             # <<<<<<<<<<<<<<
 *     @ctx.setter
 *     def ctx(self, ctx):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_ctx));
  __pyx_r = ((PyObject *)__pyx_v_self->_ctx);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4959
 * 
 *     @property
 *     def ctx(self):             # <<<<<<<<<<<<<<
 *         return self._ctx
 *     @ctx.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.ctx.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4962
 *         return self._ctx
 *     @ctx.setter
 *     def ctx(self, ctx):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUcontext cctx
 *         if ctx is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3ctx_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_ctx); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3ctx_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_ctx) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3ctx_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_ctx));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3ctx_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_ctx) {
  CUcontext __pyx_v_cctx;
  PyObject *__pyx_v_pctx = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4962, 0, __PYX_ERR(0, 4962, __pyx_L1_error));

  /* "cuda/cuda.pyx":4964
 *     def ctx(self, ctx):
 *         cdef ccuda.CUcontext cctx
 *         if ctx is None:             # <<<<<<<<<<<<<<
 *             cctx = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(ctx, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_ctx == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":4965
 *         cdef ccuda.CUcontext cctx
 *         if ctx is None:
 *             cctx = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(ctx, (CUcontext)):
 *             pctx = int(ctx)
 */
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":4964
 *     def ctx(self, ctx):
 *         cdef ccuda.CUcontext cctx
 *         if ctx is None:             # <<<<<<<<<<<<<<
 *             cctx = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(ctx, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4966
 *         if ctx is None:
 *             cctx = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *             pctx = int(ctx)
 *             cctx = <ccuda.CUcontext><void_ptr>pctx
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ctx, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":4967
 *             cctx = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(ctx, (CUcontext)):
 *             pctx = int(ctx)             # <<<<<<<<<<<<<<
 *             cctx = <ccuda.CUcontext><void_ptr>pctx
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pctx = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":4968
 *         elif isinstance(ctx, (CUcontext)):
 *             pctx = int(ctx)
 *             cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 *         else:
 *             pctx = int(CUcontext(ctx))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4968, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":4966
 *         if ctx is None:
 *             cctx = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *             pctx = int(ctx)
 *             cctx = <ccuda.CUcontext><void_ptr>pctx
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4970
 *             cctx = <ccuda.CUcontext><void_ptr>pctx
 *         else:
 *             pctx = int(CUcontext(ctx))             # <<<<<<<<<<<<<<
 *             cctx = <ccuda.CUcontext><void_ptr>pctx
 *         self._ctx._ptr[0] = cctx
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pctx = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":4971
 *         else:
 *             pctx = int(CUcontext(ctx))
 *             cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 *         self._ctx._ptr[0] = cctx
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 4971, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4972
 *             pctx = int(CUcontext(ctx))
 *             cctx = <ccuda.CUcontext><void_ptr>pctx
 *         self._ctx._ptr[0] = cctx             # <<<<<<<<<<<<<<
 *     @property
 *     def count(self):
 */
  (__pyx_v_self->_ctx->_ptr[0]) = __pyx_v_cctx;

  /* "cuda/cuda.pyx":4962
 *         return self._ctx
 *     @ctx.setter
 *     def ctx(self, ctx):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUcontext cctx
 *         if ctx is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.ctx.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pctx);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4974
 *         self._ctx._ptr[0] = cctx
 *     @property
 *     def count(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].count
 *     @count.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5count_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5count___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5count___get__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4974, 0, __PYX_ERR(0, 4974, __pyx_L1_error));

  /* "cuda/cuda.pyx":4975
 *     @property
 *     def count(self):
 *         return self._ptr[0].count             # <<<<<<<<<<<<<<
 *     @count.setter
 *     def count(self, unsigned int count):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4974
 *         self._ctx._ptr[0] = cctx
 *     @property
 *     def count(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].count
 *     @count.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4977
 *         return self._ptr[0].count
 *     @count.setter
 *     def count(self, unsigned int count):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].count = count
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_count); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_count) {
  unsigned int __pyx_v_count;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_count); {
    __pyx_v_count = __Pyx_PyInt_As_unsigned_int(__pyx_arg_count); if (unlikely((__pyx_v_count == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4977, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5count_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_count));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5count_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_count) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4977, 0, __PYX_ERR(0, 4977, __pyx_L1_error));

  /* "cuda/cuda.pyx":4979
 *     def count(self, unsigned int count):
 *         pass
 *         self._ptr[0].count = count             # <<<<<<<<<<<<<<
 *     @property
 *     def paramArray(self):
 */
  (__pyx_v_self->_ptr[0]).count = __pyx_v_count;

  /* "cuda/cuda.pyx":4977
 *         return self._ptr[0].count
 *     @count.setter
 *     def count(self, unsigned int count):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].count = count
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4981
 *         self._ptr[0].count = count
 *     @property
 *     def paramArray(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].paramArray + x*sizeof(ccuda.CUstreamBatchMemOpParams) for x in range(self._paramArray_length)]
 *         return [CUstreamBatchMemOpParams(_ptr=arr) for arr in arrs]
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10paramArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10paramArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10paramArray___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10paramArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_arrs = NULL;
  size_t __pyx_8genexpr5__pyx_v_x;
  PyObject *__pyx_8genexpr6__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 4981, 0, __PYX_ERR(0, 4981, __pyx_L1_error));

  /* "cuda/cuda.pyx":4982
 *     @property
 *     def paramArray(self):
 *         arrs = [<void_ptr>self._ptr[0].paramArray + x*sizeof(ccuda.CUstreamBatchMemOpParams) for x in range(self._paramArray_length)]             # <<<<<<<<<<<<<<
 *         return [CUstreamBatchMemOpParams(_ptr=arr) for arr in arrs]
 *     @paramArray.setter
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_v_self->_paramArray_length;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_8genexpr5__pyx_v_x = __pyx_t_4;
      __pyx_t_5 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).paramArray) + (__pyx_8genexpr5__pyx_v_x * (sizeof(CUstreamBatchMemOpParams))))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 4982, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_v_arrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4983
 *     def paramArray(self):
 *         arrs = [<void_ptr>self._ptr[0].paramArray + x*sizeof(ccuda.CUstreamBatchMemOpParams) for x in range(self._paramArray_length)]
 *         return [CUstreamBatchMemOpParams(_ptr=arr) for arr in arrs]             # <<<<<<<<<<<<<<
 *     @paramArray.setter
 *     def paramArray(self, val):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4983, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_v_arrs; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 4983, __pyx_L7_error)
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4983, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_arr, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4983, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ptr, __pyx_8genexpr6__pyx_v_arr) < 0) __PYX_ERR(0, 4983, __pyx_L7_error)
      __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4983, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 4983, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_arr); __pyx_8genexpr6__pyx_v_arr = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_arr); __pyx_8genexpr6__pyx_v_arr = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":4981
 *         self._ptr[0].count = count
 *     @property
 *     def paramArray(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].paramArray + x*sizeof(ccuda.CUstreamBatchMemOpParams) for x in range(self._paramArray_length)]
 *         return [CUstreamBatchMemOpParams(_ptr=arr) for arr in arrs]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.paramArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arrs);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":4985
 *         return [CUstreamBatchMemOpParams(_ptr=arr) for arr in arrs]
 *     @paramArray.setter
 *     def paramArray(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._paramArray)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10paramArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10paramArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10paramArray_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10paramArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_val) {
  Py_ssize_t __pyx_v_idx;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  CUstreamBatchMemOpParams *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 4985, 0, __PYX_ERR(0, 4985, __pyx_L1_error));

  /* "cuda/cuda.pyx":4986
 *     @paramArray.setter
 *     def paramArray(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._paramArray)
 *             self._paramArray_length = 0
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4986, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":4987
 *     def paramArray(self, val):
 *         if len(val) == 0:
 *             free(self._paramArray)             # <<<<<<<<<<<<<<
 *             self._paramArray_length = 0
 *             self._ptr[0].paramArray = NULL
 */
    free(__pyx_v_self->_paramArray);

    /* "cuda/cuda.pyx":4988
 *         if len(val) == 0:
 *             free(self._paramArray)
 *             self._paramArray_length = 0             # <<<<<<<<<<<<<<
 *             self._ptr[0].paramArray = NULL
 *         else:
 */
    __pyx_v_self->_paramArray_length = 0;

    /* "cuda/cuda.pyx":4989
 *             free(self._paramArray)
 *             self._paramArray_length = 0
 *             self._ptr[0].paramArray = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             if self._paramArray_length != <size_t>len(val):
 */
    (__pyx_v_self->_ptr[0]).paramArray = NULL;

    /* "cuda/cuda.pyx":4986
 *     @paramArray.setter
 *     def paramArray(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._paramArray)
 *             self._paramArray_length = 0
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":4991
 *             self._ptr[0].paramArray = NULL
 *         else:
 *             if self._paramArray_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._paramArray)
 *                 self._paramArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(val), sizeof(ccuda.CUstreamBatchMemOpParams))
 */
  /*else*/ {
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4991, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_v_self->_paramArray_length != ((size_t)__pyx_t_1)) != 0);
    if (__pyx_t_2) {

      /* "cuda/cuda.pyx":4992
 *         else:
 *             if self._paramArray_length != <size_t>len(val):
 *                 free(self._paramArray)             # <<<<<<<<<<<<<<
 *                 self._paramArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(val), sizeof(ccuda.CUstreamBatchMemOpParams))
 *                 if self._paramArray is NULL:
 */
      free(__pyx_v_self->_paramArray);

      /* "cuda/cuda.pyx":4993
 *             if self._paramArray_length != <size_t>len(val):
 *                 free(self._paramArray)
 *                 self._paramArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(val), sizeof(ccuda.CUstreamBatchMemOpParams))             # <<<<<<<<<<<<<<
 *                 if self._paramArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4993, __pyx_L1_error)
      __pyx_v_self->_paramArray = ((CUstreamBatchMemOpParams *)calloc(__pyx_t_1, (sizeof(CUstreamBatchMemOpParams))));

      /* "cuda/cuda.pyx":4994
 *                 free(self._paramArray)
 *                 self._paramArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(val), sizeof(ccuda.CUstreamBatchMemOpParams))
 *                 if self._paramArray is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 *                 self._paramArray_length = <size_t>len(val)
 */
      __pyx_t_2 = ((__pyx_v_self->_paramArray == NULL) != 0);
      if (unlikely(__pyx_t_2)) {

        /* "cuda/cuda.pyx":4995
 *                 self._paramArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(val), sizeof(ccuda.CUstreamBatchMemOpParams))
 *                 if self._paramArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))             # <<<<<<<<<<<<<<
 *                 self._paramArray_length = <size_t>len(val)
 *                 self._ptr[0].paramArray = self._paramArray
 */
        __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4995, __pyx_L1_error)
        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_n_u_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(CUstreamBatchMemOpParams))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 4995, __pyx_L1_error)

        /* "cuda/cuda.pyx":4994
 *                 free(self._paramArray)
 *                 self._paramArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(val), sizeof(ccuda.CUstreamBatchMemOpParams))
 *                 if self._paramArray is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 *                 self._paramArray_length = <size_t>len(val)
 */
      }

      /* "cuda/cuda.pyx":4996
 *                 if self._paramArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 *                 self._paramArray_length = <size_t>len(val)             # <<<<<<<<<<<<<<
 *                 self._ptr[0].paramArray = self._paramArray
 *             for idx in range(len(val)):
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4996, __pyx_L1_error)
      __pyx_v_self->_paramArray_length = ((size_t)__pyx_t_1);

      /* "cuda/cuda.pyx":4997
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 *                 self._paramArray_length = <size_t>len(val)
 *                 self._ptr[0].paramArray = self._paramArray             # <<<<<<<<<<<<<<
 *             for idx in range(len(val)):
 *                 memcpy(&self._paramArray[idx], (<CUstreamBatchMemOpParams>val[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))
 */
      __pyx_t_6 = __pyx_v_self->_paramArray;
      (__pyx_v_self->_ptr[0]).paramArray = __pyx_t_6;

      /* "cuda/cuda.pyx":4991
 *             self._ptr[0].paramArray = NULL
 *         else:
 *             if self._paramArray_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._paramArray)
 *                 self._paramArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(val), sizeof(ccuda.CUstreamBatchMemOpParams))
 */
    }

    /* "cuda/cuda.pyx":4998
 *                 self._paramArray_length = <size_t>len(val)
 *                 self._ptr[0].paramArray = self._paramArray
 *             for idx in range(len(val)):             # <<<<<<<<<<<<<<
 *                 memcpy(&self._paramArray[idx], (<CUstreamBatchMemOpParams>val[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))
 *     @property
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4998, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_1;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_idx = __pyx_t_8;

      /* "cuda/cuda.pyx":4999
 *                 self._ptr[0].paramArray = self._paramArray
 *             for idx in range(len(val)):
 *                 memcpy(&self._paramArray[idx], (<CUstreamBatchMemOpParams>val[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_val, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4999, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      (void)(memcpy((&(__pyx_v_self->_paramArray[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams *)__pyx_t_5)->__pyx_base._ptr, (sizeof(CUstreamBatchMemOpParams))));
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":4985
 *         return [CUstreamBatchMemOpParams(_ptr=arr) for arr in arrs]
 *     @paramArray.setter
 *     def paramArray(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._paramArray)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.paramArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5001
 *                 memcpy(&self._paramArray[idx], (<CUstreamBatchMemOpParams>val[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5001, 0, __PYX_ERR(0, 5001, __pyx_L1_error));

  /* "cuda/cuda.pyx":5002
 *     @property
 *     def flags(self):
 *         return self._ptr[0].flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5001
 *                 memcpy(&self._paramArray[idx], (<CUstreamBatchMemOpParams>val[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5004
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5004, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5004, 0, __PYX_ERR(0, 5004, __pyx_L1_error));

  /* "cuda/cuda.pyx":5006
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].flags = flags             # <<<<<<<<<<<<<<
 * 
 * cdef class CUdevprop_st:
 */
  (__pyx_v_self->_ptr[0]).flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":5004
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10__reduce_cython__[] = "CUDA_BATCH_MEM_OP_NODE_PARAMS_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__172)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__173, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_12__setstate_cython__[] = "CUDA_BATCH_MEM_OP_NODE_PARAMS_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__174)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__175, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5041
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 5041, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5041, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5041, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUdevprop_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 5041, 0, __PYX_ERR(0, 5041, __pyx_L1_error));

  /* "cuda/cuda.pyx":5042
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5043
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUdevprop_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":5042
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5045
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUdevprop_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUdevprop_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5041
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5046
 *         else:
 *             self._ptr = <ccuda.CUdevprop_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5046, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5046, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5046, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 5046, 0, __PYX_ERR(0, 5046, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5048
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_12CUdevprop_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_12CUdevprop_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_12CUdevprop_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_12CUdevprop_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 5048, 0, __PYX_ERR(0, 5048, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUdevprop_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":5050
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_12CUdevprop_st_6getPtr[] = "CUdevprop_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12CUdevprop_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUdevprop_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUdevprop_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__176)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 5050, 0, __PYX_ERR(0, 5050, __pyx_L1_error));

  /* "cuda/cuda.pyx":5051
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5050
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5052
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 5052, 0, __PYX_ERR(0, 5052, __pyx_L1_error));

  /* "cuda/cuda.pyx":5053
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['maxThreadsPerBlock : ' + str(self.maxThreadsPerBlock)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5054
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['maxThreadsPerBlock : ' + str(self.maxThreadsPerBlock)]
 *             str_list += ['maxThreadsDim : ' + str(self.maxThreadsDim)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5055
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['maxThreadsPerBlock : ' + str(self.maxThreadsPerBlock)]             # <<<<<<<<<<<<<<
 *             str_list += ['maxThreadsDim : ' + str(self.maxThreadsDim)]
 *             str_list += ['maxGridSize : ' + str(self.maxGridSize)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_maxThreadsPerBlock_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_maxThreadsPerBlock, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5056
 *             str_list = []
 *             str_list += ['maxThreadsPerBlock : ' + str(self.maxThreadsPerBlock)]
 *             str_list += ['maxThreadsDim : ' + str(self.maxThreadsDim)]             # <<<<<<<<<<<<<<
 *             str_list += ['maxGridSize : ' + str(self.maxGridSize)]
 *             str_list += ['sharedMemPerBlock : ' + str(self.sharedMemPerBlock)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_maxThreadsDim_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_maxThreadsDim, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5057
 *             str_list += ['maxThreadsPerBlock : ' + str(self.maxThreadsPerBlock)]
 *             str_list += ['maxThreadsDim : ' + str(self.maxThreadsDim)]
 *             str_list += ['maxGridSize : ' + str(self.maxGridSize)]             # <<<<<<<<<<<<<<
 *             str_list += ['sharedMemPerBlock : ' + str(self.sharedMemPerBlock)]
 *             str_list += ['totalConstantMemory : ' + str(self.totalConstantMemory)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_maxGridSize_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_maxGridSize, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5058
 *             str_list += ['maxThreadsDim : ' + str(self.maxThreadsDim)]
 *             str_list += ['maxGridSize : ' + str(self.maxGridSize)]
 *             str_list += ['sharedMemPerBlock : ' + str(self.sharedMemPerBlock)]             # <<<<<<<<<<<<<<
 *             str_list += ['totalConstantMemory : ' + str(self.totalConstantMemory)]
 *             str_list += ['SIMDWidth : ' + str(self.SIMDWidth)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sharedMemPerBlock_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_sharedMemPerBlock, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5059
 *             str_list += ['maxGridSize : ' + str(self.maxGridSize)]
 *             str_list += ['sharedMemPerBlock : ' + str(self.sharedMemPerBlock)]
 *             str_list += ['totalConstantMemory : ' + str(self.totalConstantMemory)]             # <<<<<<<<<<<<<<
 *             str_list += ['SIMDWidth : ' + str(self.SIMDWidth)]
 *             str_list += ['memPitch : ' + str(self.memPitch)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_totalConstantMemory_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_totalConstantMemory, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5060
 *             str_list += ['sharedMemPerBlock : ' + str(self.sharedMemPerBlock)]
 *             str_list += ['totalConstantMemory : ' + str(self.totalConstantMemory)]
 *             str_list += ['SIMDWidth : ' + str(self.SIMDWidth)]             # <<<<<<<<<<<<<<
 *             str_list += ['memPitch : ' + str(self.memPitch)]
 *             str_list += ['regsPerBlock : ' + str(self.regsPerBlock)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_SIMDWidth_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_SIMDWidth, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5061
 *             str_list += ['totalConstantMemory : ' + str(self.totalConstantMemory)]
 *             str_list += ['SIMDWidth : ' + str(self.SIMDWidth)]
 *             str_list += ['memPitch : ' + str(self.memPitch)]             # <<<<<<<<<<<<<<
 *             str_list += ['regsPerBlock : ' + str(self.regsPerBlock)]
 *             str_list += ['clockRate : ' + str(self.clockRate)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memPitch_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_memPitch, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5062
 *             str_list += ['SIMDWidth : ' + str(self.SIMDWidth)]
 *             str_list += ['memPitch : ' + str(self.memPitch)]
 *             str_list += ['regsPerBlock : ' + str(self.regsPerBlock)]             # <<<<<<<<<<<<<<
 *             str_list += ['clockRate : ' + str(self.clockRate)]
 *             str_list += ['textureAlign : ' + str(self.textureAlign)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_regsPerBlock_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_regsPerBlock, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5063
 *             str_list += ['memPitch : ' + str(self.memPitch)]
 *             str_list += ['regsPerBlock : ' + str(self.regsPerBlock)]
 *             str_list += ['clockRate : ' + str(self.clockRate)]             # <<<<<<<<<<<<<<
 *             str_list += ['textureAlign : ' + str(self.textureAlign)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clockRate_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_clockRate, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5064
 *             str_list += ['regsPerBlock : ' + str(self.regsPerBlock)]
 *             str_list += ['clockRate : ' + str(self.clockRate)]
 *             str_list += ['textureAlign : ' + str(self.textureAlign)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_textureAlign_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_textureAlign, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5065
 *             str_list += ['clockRate : ' + str(self.clockRate)]
 *             str_list += ['textureAlign : ' + str(self.textureAlign)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":5053
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['maxThreadsPerBlock : ' + str(self.maxThreadsPerBlock)]
 */
  }

  /* "cuda/cuda.pyx":5067
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":5052
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5070
 * 
 *     @property
 *     def maxThreadsPerBlock(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].maxThreadsPerBlock
 *     @maxThreadsPerBlock.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_18maxThreadsPerBlock_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_18maxThreadsPerBlock_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_18maxThreadsPerBlock___get__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_18maxThreadsPerBlock___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5070, 0, __PYX_ERR(0, 5070, __pyx_L1_error));

  /* "cuda/cuda.pyx":5071
 *     @property
 *     def maxThreadsPerBlock(self):
 *         return self._ptr[0].maxThreadsPerBlock             # <<<<<<<<<<<<<<
 *     @maxThreadsPerBlock.setter
 *     def maxThreadsPerBlock(self, int maxThreadsPerBlock):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).maxThreadsPerBlock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5070
 * 
 *     @property
 *     def maxThreadsPerBlock(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].maxThreadsPerBlock
 *     @maxThreadsPerBlock.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.maxThreadsPerBlock.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5073
 *         return self._ptr[0].maxThreadsPerBlock
 *     @maxThreadsPerBlock.setter
 *     def maxThreadsPerBlock(self, int maxThreadsPerBlock):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].maxThreadsPerBlock = maxThreadsPerBlock
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_18maxThreadsPerBlock_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_maxThreadsPerBlock); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_18maxThreadsPerBlock_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_maxThreadsPerBlock) {
  int __pyx_v_maxThreadsPerBlock;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_maxThreadsPerBlock); {
    __pyx_v_maxThreadsPerBlock = __Pyx_PyInt_As_int(__pyx_arg_maxThreadsPerBlock); if (unlikely((__pyx_v_maxThreadsPerBlock == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5073, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.maxThreadsPerBlock.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_18maxThreadsPerBlock_2__set__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), ((int)__pyx_v_maxThreadsPerBlock));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_18maxThreadsPerBlock_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_maxThreadsPerBlock) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5073, 0, __PYX_ERR(0, 5073, __pyx_L1_error));

  /* "cuda/cuda.pyx":5075
 *     def maxThreadsPerBlock(self, int maxThreadsPerBlock):
 *         pass
 *         self._ptr[0].maxThreadsPerBlock = maxThreadsPerBlock             # <<<<<<<<<<<<<<
 *     @property
 *     def maxThreadsDim(self):
 */
  (__pyx_v_self->_ptr[0]).maxThreadsPerBlock = __pyx_v_maxThreadsPerBlock;

  /* "cuda/cuda.pyx":5073
 *         return self._ptr[0].maxThreadsPerBlock
 *     @maxThreadsPerBlock.setter
 *     def maxThreadsPerBlock(self, int maxThreadsPerBlock):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].maxThreadsPerBlock = maxThreadsPerBlock
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.maxThreadsPerBlock.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5077
 *         self._ptr[0].maxThreadsPerBlock = maxThreadsPerBlock
 *     @property
 *     def maxThreadsDim(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].maxThreadsDim
 *     @maxThreadsDim.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_13maxThreadsDim_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_13maxThreadsDim_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_13maxThreadsDim___get__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_13maxThreadsDim___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5077, 0, __PYX_ERR(0, 5077, __pyx_L1_error));

  /* "cuda/cuda.pyx":5078
 *     @property
 *     def maxThreadsDim(self):
 *         return self._ptr[0].maxThreadsDim             # <<<<<<<<<<<<<<
 *     @maxThreadsDim.setter
 *     def maxThreadsDim(self, maxThreadsDim):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_int((__pyx_v_self->_ptr[0]).maxThreadsDim, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5077
 *         self._ptr[0].maxThreadsPerBlock = maxThreadsPerBlock
 *     @property
 *     def maxThreadsDim(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].maxThreadsDim
 *     @maxThreadsDim.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.maxThreadsDim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5080
 *         return self._ptr[0].maxThreadsDim
 *     @maxThreadsDim.setter
 *     def maxThreadsDim(self, maxThreadsDim):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].maxThreadsDim = maxThreadsDim
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_13maxThreadsDim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_maxThreadsDim); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_13maxThreadsDim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_maxThreadsDim) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_13maxThreadsDim_2__set__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), ((PyObject *)__pyx_v_maxThreadsDim));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_13maxThreadsDim_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, PyObject *__pyx_v_maxThreadsDim) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1[3];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5080, 0, __PYX_ERR(0, 5080, __pyx_L1_error));

  /* "cuda/cuda.pyx":5082
 *     def maxThreadsDim(self, maxThreadsDim):
 *         pass
 *         self._ptr[0].maxThreadsDim = maxThreadsDim             # <<<<<<<<<<<<<<
 *     @property
 *     def maxGridSize(self):
 */
  if (unlikely(__Pyx_carray_from_py_int(__pyx_v_maxThreadsDim, __pyx_t_1, 3) < 0)) __PYX_ERR(0, 5082, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).maxThreadsDim[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).maxThreadsDim[0]) * (3));

  /* "cuda/cuda.pyx":5080
 *         return self._ptr[0].maxThreadsDim
 *     @maxThreadsDim.setter
 *     def maxThreadsDim(self, maxThreadsDim):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].maxThreadsDim = maxThreadsDim
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.maxThreadsDim.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5084
 *         self._ptr[0].maxThreadsDim = maxThreadsDim
 *     @property
 *     def maxGridSize(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].maxGridSize
 *     @maxGridSize.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_11maxGridSize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_11maxGridSize_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_11maxGridSize___get__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_11maxGridSize___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5084, 0, __PYX_ERR(0, 5084, __pyx_L1_error));

  /* "cuda/cuda.pyx":5085
 *     @property
 *     def maxGridSize(self):
 *         return self._ptr[0].maxGridSize             # <<<<<<<<<<<<<<
 *     @maxGridSize.setter
 *     def maxGridSize(self, maxGridSize):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_int((__pyx_v_self->_ptr[0]).maxGridSize, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5084
 *         self._ptr[0].maxThreadsDim = maxThreadsDim
 *     @property
 *     def maxGridSize(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].maxGridSize
 *     @maxGridSize.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.maxGridSize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5087
 *         return self._ptr[0].maxGridSize
 *     @maxGridSize.setter
 *     def maxGridSize(self, maxGridSize):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].maxGridSize = maxGridSize
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_11maxGridSize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_maxGridSize); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_11maxGridSize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_maxGridSize) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_11maxGridSize_2__set__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), ((PyObject *)__pyx_v_maxGridSize));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_11maxGridSize_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, PyObject *__pyx_v_maxGridSize) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1[3];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5087, 0, __PYX_ERR(0, 5087, __pyx_L1_error));

  /* "cuda/cuda.pyx":5089
 *     def maxGridSize(self, maxGridSize):
 *         pass
 *         self._ptr[0].maxGridSize = maxGridSize             # <<<<<<<<<<<<<<
 *     @property
 *     def sharedMemPerBlock(self):
 */
  if (unlikely(__Pyx_carray_from_py_int(__pyx_v_maxGridSize, __pyx_t_1, 3) < 0)) __PYX_ERR(0, 5089, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).maxGridSize[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).maxGridSize[0]) * (3));

  /* "cuda/cuda.pyx":5087
 *         return self._ptr[0].maxGridSize
 *     @maxGridSize.setter
 *     def maxGridSize(self, maxGridSize):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].maxGridSize = maxGridSize
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.maxGridSize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5091
 *         self._ptr[0].maxGridSize = maxGridSize
 *     @property
 *     def sharedMemPerBlock(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].sharedMemPerBlock
 *     @sharedMemPerBlock.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_17sharedMemPerBlock_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_17sharedMemPerBlock_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_17sharedMemPerBlock___get__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_17sharedMemPerBlock___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5091, 0, __PYX_ERR(0, 5091, __pyx_L1_error));

  /* "cuda/cuda.pyx":5092
 *     @property
 *     def sharedMemPerBlock(self):
 *         return self._ptr[0].sharedMemPerBlock             # <<<<<<<<<<<<<<
 *     @sharedMemPerBlock.setter
 *     def sharedMemPerBlock(self, int sharedMemPerBlock):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).sharedMemPerBlock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5091
 *         self._ptr[0].maxGridSize = maxGridSize
 *     @property
 *     def sharedMemPerBlock(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].sharedMemPerBlock
 *     @sharedMemPerBlock.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.sharedMemPerBlock.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5094
 *         return self._ptr[0].sharedMemPerBlock
 *     @sharedMemPerBlock.setter
 *     def sharedMemPerBlock(self, int sharedMemPerBlock):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].sharedMemPerBlock = sharedMemPerBlock
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_17sharedMemPerBlock_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_sharedMemPerBlock); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_17sharedMemPerBlock_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_sharedMemPerBlock) {
  int __pyx_v_sharedMemPerBlock;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_sharedMemPerBlock); {
    __pyx_v_sharedMemPerBlock = __Pyx_PyInt_As_int(__pyx_arg_sharedMemPerBlock); if (unlikely((__pyx_v_sharedMemPerBlock == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5094, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.sharedMemPerBlock.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_17sharedMemPerBlock_2__set__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), ((int)__pyx_v_sharedMemPerBlock));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_17sharedMemPerBlock_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_sharedMemPerBlock) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5094, 0, __PYX_ERR(0, 5094, __pyx_L1_error));

  /* "cuda/cuda.pyx":5096
 *     def sharedMemPerBlock(self, int sharedMemPerBlock):
 *         pass
 *         self._ptr[0].sharedMemPerBlock = sharedMemPerBlock             # <<<<<<<<<<<<<<
 *     @property
 *     def totalConstantMemory(self):
 */
  (__pyx_v_self->_ptr[0]).sharedMemPerBlock = __pyx_v_sharedMemPerBlock;

  /* "cuda/cuda.pyx":5094
 *         return self._ptr[0].sharedMemPerBlock
 *     @sharedMemPerBlock.setter
 *     def sharedMemPerBlock(self, int sharedMemPerBlock):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].sharedMemPerBlock = sharedMemPerBlock
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.sharedMemPerBlock.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5098
 *         self._ptr[0].sharedMemPerBlock = sharedMemPerBlock
 *     @property
 *     def totalConstantMemory(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].totalConstantMemory
 *     @totalConstantMemory.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_19totalConstantMemory_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_19totalConstantMemory_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_19totalConstantMemory___get__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_19totalConstantMemory___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5098, 0, __PYX_ERR(0, 5098, __pyx_L1_error));

  /* "cuda/cuda.pyx":5099
 *     @property
 *     def totalConstantMemory(self):
 *         return self._ptr[0].totalConstantMemory             # <<<<<<<<<<<<<<
 *     @totalConstantMemory.setter
 *     def totalConstantMemory(self, int totalConstantMemory):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).totalConstantMemory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5098
 *         self._ptr[0].sharedMemPerBlock = sharedMemPerBlock
 *     @property
 *     def totalConstantMemory(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].totalConstantMemory
 *     @totalConstantMemory.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.totalConstantMemory.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5101
 *         return self._ptr[0].totalConstantMemory
 *     @totalConstantMemory.setter
 *     def totalConstantMemory(self, int totalConstantMemory):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].totalConstantMemory = totalConstantMemory
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_19totalConstantMemory_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_totalConstantMemory); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_19totalConstantMemory_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_totalConstantMemory) {
  int __pyx_v_totalConstantMemory;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_totalConstantMemory); {
    __pyx_v_totalConstantMemory = __Pyx_PyInt_As_int(__pyx_arg_totalConstantMemory); if (unlikely((__pyx_v_totalConstantMemory == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5101, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.totalConstantMemory.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_19totalConstantMemory_2__set__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), ((int)__pyx_v_totalConstantMemory));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_19totalConstantMemory_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_totalConstantMemory) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5101, 0, __PYX_ERR(0, 5101, __pyx_L1_error));

  /* "cuda/cuda.pyx":5103
 *     def totalConstantMemory(self, int totalConstantMemory):
 *         pass
 *         self._ptr[0].totalConstantMemory = totalConstantMemory             # <<<<<<<<<<<<<<
 *     @property
 *     def SIMDWidth(self):
 */
  (__pyx_v_self->_ptr[0]).totalConstantMemory = __pyx_v_totalConstantMemory;

  /* "cuda/cuda.pyx":5101
 *         return self._ptr[0].totalConstantMemory
 *     @totalConstantMemory.setter
 *     def totalConstantMemory(self, int totalConstantMemory):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].totalConstantMemory = totalConstantMemory
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.totalConstantMemory.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5105
 *         self._ptr[0].totalConstantMemory = totalConstantMemory
 *     @property
 *     def SIMDWidth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].SIMDWidth
 *     @SIMDWidth.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_9SIMDWidth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_9SIMDWidth_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_9SIMDWidth___get__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_9SIMDWidth___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5105, 0, __PYX_ERR(0, 5105, __pyx_L1_error));

  /* "cuda/cuda.pyx":5106
 *     @property
 *     def SIMDWidth(self):
 *         return self._ptr[0].SIMDWidth             # <<<<<<<<<<<<<<
 *     @SIMDWidth.setter
 *     def SIMDWidth(self, int SIMDWidth):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).SIMDWidth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5105
 *         self._ptr[0].totalConstantMemory = totalConstantMemory
 *     @property
 *     def SIMDWidth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].SIMDWidth
 *     @SIMDWidth.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.SIMDWidth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5108
 *         return self._ptr[0].SIMDWidth
 *     @SIMDWidth.setter
 *     def SIMDWidth(self, int SIMDWidth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].SIMDWidth = SIMDWidth
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_9SIMDWidth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_SIMDWidth); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_9SIMDWidth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_SIMDWidth) {
  int __pyx_v_SIMDWidth;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_SIMDWidth); {
    __pyx_v_SIMDWidth = __Pyx_PyInt_As_int(__pyx_arg_SIMDWidth); if (unlikely((__pyx_v_SIMDWidth == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5108, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.SIMDWidth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_9SIMDWidth_2__set__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), ((int)__pyx_v_SIMDWidth));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_9SIMDWidth_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_SIMDWidth) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5108, 0, __PYX_ERR(0, 5108, __pyx_L1_error));

  /* "cuda/cuda.pyx":5110
 *     def SIMDWidth(self, int SIMDWidth):
 *         pass
 *         self._ptr[0].SIMDWidth = SIMDWidth             # <<<<<<<<<<<<<<
 *     @property
 *     def memPitch(self):
 */
  (__pyx_v_self->_ptr[0]).SIMDWidth = __pyx_v_SIMDWidth;

  /* "cuda/cuda.pyx":5108
 *         return self._ptr[0].SIMDWidth
 *     @SIMDWidth.setter
 *     def SIMDWidth(self, int SIMDWidth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].SIMDWidth = SIMDWidth
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.SIMDWidth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5112
 *         self._ptr[0].SIMDWidth = SIMDWidth
 *     @property
 *     def memPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].memPitch
 *     @memPitch.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_8memPitch_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_8memPitch_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_8memPitch___get__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_8memPitch___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5112, 0, __PYX_ERR(0, 5112, __pyx_L1_error));

  /* "cuda/cuda.pyx":5113
 *     @property
 *     def memPitch(self):
 *         return self._ptr[0].memPitch             # <<<<<<<<<<<<<<
 *     @memPitch.setter
 *     def memPitch(self, int memPitch):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).memPitch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5112
 *         self._ptr[0].SIMDWidth = SIMDWidth
 *     @property
 *     def memPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].memPitch
 *     @memPitch.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.memPitch.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5115
 *         return self._ptr[0].memPitch
 *     @memPitch.setter
 *     def memPitch(self, int memPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].memPitch = memPitch
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_8memPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_memPitch); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_8memPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_memPitch) {
  int __pyx_v_memPitch;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_memPitch); {
    __pyx_v_memPitch = __Pyx_PyInt_As_int(__pyx_arg_memPitch); if (unlikely((__pyx_v_memPitch == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5115, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.memPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_8memPitch_2__set__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), ((int)__pyx_v_memPitch));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_8memPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_memPitch) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5115, 0, __PYX_ERR(0, 5115, __pyx_L1_error));

  /* "cuda/cuda.pyx":5117
 *     def memPitch(self, int memPitch):
 *         pass
 *         self._ptr[0].memPitch = memPitch             # <<<<<<<<<<<<<<
 *     @property
 *     def regsPerBlock(self):
 */
  (__pyx_v_self->_ptr[0]).memPitch = __pyx_v_memPitch;

  /* "cuda/cuda.pyx":5115
 *         return self._ptr[0].memPitch
 *     @memPitch.setter
 *     def memPitch(self, int memPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].memPitch = memPitch
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.memPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5119
 *         self._ptr[0].memPitch = memPitch
 *     @property
 *     def regsPerBlock(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].regsPerBlock
 *     @regsPerBlock.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_12regsPerBlock_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_12regsPerBlock_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_12regsPerBlock___get__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_12regsPerBlock___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5119, 0, __PYX_ERR(0, 5119, __pyx_L1_error));

  /* "cuda/cuda.pyx":5120
 *     @property
 *     def regsPerBlock(self):
 *         return self._ptr[0].regsPerBlock             # <<<<<<<<<<<<<<
 *     @regsPerBlock.setter
 *     def regsPerBlock(self, int regsPerBlock):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).regsPerBlock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5119
 *         self._ptr[0].memPitch = memPitch
 *     @property
 *     def regsPerBlock(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].regsPerBlock
 *     @regsPerBlock.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.regsPerBlock.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5122
 *         return self._ptr[0].regsPerBlock
 *     @regsPerBlock.setter
 *     def regsPerBlock(self, int regsPerBlock):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].regsPerBlock = regsPerBlock
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_12regsPerBlock_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_regsPerBlock); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_12regsPerBlock_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_regsPerBlock) {
  int __pyx_v_regsPerBlock;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_regsPerBlock); {
    __pyx_v_regsPerBlock = __Pyx_PyInt_As_int(__pyx_arg_regsPerBlock); if (unlikely((__pyx_v_regsPerBlock == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5122, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.regsPerBlock.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_12regsPerBlock_2__set__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), ((int)__pyx_v_regsPerBlock));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_12regsPerBlock_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_regsPerBlock) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5122, 0, __PYX_ERR(0, 5122, __pyx_L1_error));

  /* "cuda/cuda.pyx":5124
 *     def regsPerBlock(self, int regsPerBlock):
 *         pass
 *         self._ptr[0].regsPerBlock = regsPerBlock             # <<<<<<<<<<<<<<
 *     @property
 *     def clockRate(self):
 */
  (__pyx_v_self->_ptr[0]).regsPerBlock = __pyx_v_regsPerBlock;

  /* "cuda/cuda.pyx":5122
 *         return self._ptr[0].regsPerBlock
 *     @regsPerBlock.setter
 *     def regsPerBlock(self, int regsPerBlock):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].regsPerBlock = regsPerBlock
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.regsPerBlock.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5126
 *         self._ptr[0].regsPerBlock = regsPerBlock
 *     @property
 *     def clockRate(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].clockRate
 *     @clockRate.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_9clockRate_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_9clockRate_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_9clockRate___get__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_9clockRate___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5126, 0, __PYX_ERR(0, 5126, __pyx_L1_error));

  /* "cuda/cuda.pyx":5127
 *     @property
 *     def clockRate(self):
 *         return self._ptr[0].clockRate             # <<<<<<<<<<<<<<
 *     @clockRate.setter
 *     def clockRate(self, int clockRate):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).clockRate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5126
 *         self._ptr[0].regsPerBlock = regsPerBlock
 *     @property
 *     def clockRate(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].clockRate
 *     @clockRate.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.clockRate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5129
 *         return self._ptr[0].clockRate
 *     @clockRate.setter
 *     def clockRate(self, int clockRate):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].clockRate = clockRate
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_9clockRate_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_clockRate); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_9clockRate_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_clockRate) {
  int __pyx_v_clockRate;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_clockRate); {
    __pyx_v_clockRate = __Pyx_PyInt_As_int(__pyx_arg_clockRate); if (unlikely((__pyx_v_clockRate == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5129, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.clockRate.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_9clockRate_2__set__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), ((int)__pyx_v_clockRate));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_9clockRate_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_clockRate) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5129, 0, __PYX_ERR(0, 5129, __pyx_L1_error));

  /* "cuda/cuda.pyx":5131
 *     def clockRate(self, int clockRate):
 *         pass
 *         self._ptr[0].clockRate = clockRate             # <<<<<<<<<<<<<<
 *     @property
 *     def textureAlign(self):
 */
  (__pyx_v_self->_ptr[0]).clockRate = __pyx_v_clockRate;

  /* "cuda/cuda.pyx":5129
 *         return self._ptr[0].clockRate
 *     @clockRate.setter
 *     def clockRate(self, int clockRate):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].clockRate = clockRate
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.clockRate.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5133
 *         self._ptr[0].clockRate = clockRate
 *     @property
 *     def textureAlign(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].textureAlign
 *     @textureAlign.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_12textureAlign_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_12textureAlign_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_12textureAlign___get__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_12textureAlign___get__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5133, 0, __PYX_ERR(0, 5133, __pyx_L1_error));

  /* "cuda/cuda.pyx":5134
 *     @property
 *     def textureAlign(self):
 *         return self._ptr[0].textureAlign             # <<<<<<<<<<<<<<
 *     @textureAlign.setter
 *     def textureAlign(self, int textureAlign):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).textureAlign); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5133
 *         self._ptr[0].clockRate = clockRate
 *     @property
 *     def textureAlign(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].textureAlign
 *     @textureAlign.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.textureAlign.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5136
 *         return self._ptr[0].textureAlign
 *     @textureAlign.setter
 *     def textureAlign(self, int textureAlign):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].textureAlign = textureAlign
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_12textureAlign_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_textureAlign); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUdevprop_st_12textureAlign_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_textureAlign) {
  int __pyx_v_textureAlign;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_textureAlign); {
    __pyx_v_textureAlign = __Pyx_PyInt_As_int(__pyx_arg_textureAlign); if (unlikely((__pyx_v_textureAlign == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5136, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.textureAlign.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_12textureAlign_2__set__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), ((int)__pyx_v_textureAlign));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUdevprop_st_12textureAlign_2__set__(struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, int __pyx_v_textureAlign) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5136, 0, __PYX_ERR(0, 5136, __pyx_L1_error));

  /* "cuda/cuda.pyx":5138
 *     def textureAlign(self, int textureAlign):
 *         pass
 *         self._ptr[0].textureAlign = textureAlign             # <<<<<<<<<<<<<<
 * 
 * cdef class CUaccessPolicyWindow_st:
 */
  (__pyx_v_self->_ptr[0]).textureAlign = __pyx_v_textureAlign;

  /* "cuda/cuda.pyx":5136
 *         return self._ptr[0].textureAlign
 *     @textureAlign.setter
 *     def textureAlign(self, int textureAlign):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].textureAlign = textureAlign
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.textureAlign.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_12CUdevprop_st_10__reduce_cython__[] = "CUdevprop_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12CUdevprop_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUdevprop_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUdevprop_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__177)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__178, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_12CUdevprop_st_12__setstate_cython__[] = "CUdevprop_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12CUdevprop_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUdevprop_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_12CUdevprop_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_12CUdevprop_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUdevprop_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUdevprop_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUdevprop_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevprop_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__179)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__180, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevprop_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5175
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 5175, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5175, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5175, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 5175, 0, __PYX_ERR(0, 5175, __pyx_L1_error));

  /* "cuda/cuda.pyx":5176
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5177
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUaccessPolicyWindow_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":5176
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5179
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUaccessPolicyWindow_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUaccessPolicyWindow_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5175
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5180
 *         else:
 *             self._ptr = <ccuda.CUaccessPolicyWindow_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5180, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5180, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5180, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 5180, 0, __PYX_ERR(0, 5180, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5182
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 5182, 0, __PYX_ERR(0, 5182, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUaccessPolicyWindow_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":5184
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_23CUaccessPolicyWindow_st_6getPtr[] = "CUaccessPolicyWindow_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_23CUaccessPolicyWindow_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_23CUaccessPolicyWindow_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__181)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 5184, 0, __PYX_ERR(0, 5184, __pyx_L1_error));

  /* "cuda/cuda.pyx":5185
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5184
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5186
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 5186, 0, __PYX_ERR(0, 5186, __pyx_L1_error));

  /* "cuda/cuda.pyx":5187
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['base_ptr : ' + hex(self.base_ptr)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5188
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['base_ptr : ' + hex(self.base_ptr)]
 *             str_list += ['num_bytes : ' + str(self.num_bytes)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5189
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['base_ptr : ' + hex(self.base_ptr)]             # <<<<<<<<<<<<<<
 *             str_list += ['num_bytes : ' + str(self.num_bytes)]
 *             str_list += ['hitRatio : ' + str(self.hitRatio)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base_ptr_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_base_ptr, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5190
 *             str_list = []
 *             str_list += ['base_ptr : ' + hex(self.base_ptr)]
 *             str_list += ['num_bytes : ' + str(self.num_bytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['hitRatio : ' + str(self.hitRatio)]
 *             str_list += ['hitProp : ' + str(self.hitProp)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_bytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_num_bytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5191
 *             str_list += ['base_ptr : ' + hex(self.base_ptr)]
 *             str_list += ['num_bytes : ' + str(self.num_bytes)]
 *             str_list += ['hitRatio : ' + str(self.hitRatio)]             # <<<<<<<<<<<<<<
 *             str_list += ['hitProp : ' + str(self.hitProp)]
 *             str_list += ['missProp : ' + str(self.missProp)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hitRatio_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_hitRatio, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5192
 *             str_list += ['num_bytes : ' + str(self.num_bytes)]
 *             str_list += ['hitRatio : ' + str(self.hitRatio)]
 *             str_list += ['hitProp : ' + str(self.hitProp)]             # <<<<<<<<<<<<<<
 *             str_list += ['missProp : ' + str(self.missProp)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hitProp_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_hitProp, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5193
 *             str_list += ['hitRatio : ' + str(self.hitRatio)]
 *             str_list += ['hitProp : ' + str(self.hitProp)]
 *             str_list += ['missProp : ' + str(self.missProp)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missProp_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_missProp, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5194
 *             str_list += ['hitProp : ' + str(self.hitProp)]
 *             str_list += ['missProp : ' + str(self.missProp)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":5187
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['base_ptr : ' + hex(self.base_ptr)]
 */
  }

  /* "cuda/cuda.pyx":5196
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":5186
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5199
 * 
 *     @property
 *     def base_ptr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].base_ptr
 *     @base_ptr.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8base_ptr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8base_ptr_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8base_ptr___get__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8base_ptr___get__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5199, 0, __PYX_ERR(0, 5199, __pyx_L1_error));

  /* "cuda/cuda.pyx":5200
 *     @property
 *     def base_ptr(self):
 *         return <void_ptr>self._ptr[0].base_ptr             # <<<<<<<<<<<<<<
 *     @base_ptr.setter
 *     def base_ptr(self, base_ptr):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).base_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5199
 * 
 *     @property
 *     def base_ptr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].base_ptr
 *     @base_ptr.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.base_ptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5202
 *         return <void_ptr>self._ptr[0].base_ptr
 *     @base_ptr.setter
 *     def base_ptr(self, base_ptr):             # <<<<<<<<<<<<<<
 *         _cbase_ptr = utils.HelperInputVoidPtr(base_ptr)
 *         self._ptr[0].base_ptr = <void*><void_ptr>_cbase_ptr.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8base_ptr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_base_ptr); /*proto*/
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8base_ptr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_base_ptr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8base_ptr_2__set__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self), ((PyObject *)__pyx_v_base_ptr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8base_ptr_2__set__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, PyObject *__pyx_v_base_ptr) {
  PyObject *__pyx_v__cbase_ptr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5202, 0, __PYX_ERR(0, 5202, __pyx_L1_error));

  /* "cuda/cuda.pyx":5203
 *     @base_ptr.setter
 *     def base_ptr(self, base_ptr):
 *         _cbase_ptr = utils.HelperInputVoidPtr(base_ptr)             # <<<<<<<<<<<<<<
 *         self._ptr[0].base_ptr = <void*><void_ptr>_cbase_ptr.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_base_ptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cbase_ptr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5204
 *     def base_ptr(self, base_ptr):
 *         _cbase_ptr = utils.HelperInputVoidPtr(base_ptr)
 *         self._ptr[0].base_ptr = <void*><void_ptr>_cbase_ptr.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def num_bytes(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cbase_ptr, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).base_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":5202
 *         return <void_ptr>self._ptr[0].base_ptr
 *     @base_ptr.setter
 *     def base_ptr(self, base_ptr):             # <<<<<<<<<<<<<<
 *         _cbase_ptr = utils.HelperInputVoidPtr(base_ptr)
 *         self._ptr[0].base_ptr = <void*><void_ptr>_cbase_ptr.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.base_ptr.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cbase_ptr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5206
 *         self._ptr[0].base_ptr = <void*><void_ptr>_cbase_ptr.cptr
 *     @property
 *     def num_bytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].num_bytes
 *     @num_bytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_9num_bytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_9num_bytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_9num_bytes___get__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_9num_bytes___get__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5206, 0, __PYX_ERR(0, 5206, __pyx_L1_error));

  /* "cuda/cuda.pyx":5207
 *     @property
 *     def num_bytes(self):
 *         return self._ptr[0].num_bytes             # <<<<<<<<<<<<<<
 *     @num_bytes.setter
 *     def num_bytes(self, size_t num_bytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).num_bytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5206
 *         self._ptr[0].base_ptr = <void*><void_ptr>_cbase_ptr.cptr
 *     @property
 *     def num_bytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].num_bytes
 *     @num_bytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.num_bytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5209
 *         return self._ptr[0].num_bytes
 *     @num_bytes.setter
 *     def num_bytes(self, size_t num_bytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].num_bytes = num_bytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_9num_bytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_num_bytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_9num_bytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_num_bytes) {
  size_t __pyx_v_num_bytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_num_bytes); {
    __pyx_v_num_bytes = __Pyx_PyInt_As_size_t(__pyx_arg_num_bytes); if (unlikely((__pyx_v_num_bytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 5209, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.num_bytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_9num_bytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self), ((size_t)__pyx_v_num_bytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_9num_bytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, size_t __pyx_v_num_bytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5209, 0, __PYX_ERR(0, 5209, __pyx_L1_error));

  /* "cuda/cuda.pyx":5211
 *     def num_bytes(self, size_t num_bytes):
 *         pass
 *         self._ptr[0].num_bytes = num_bytes             # <<<<<<<<<<<<<<
 *     @property
 *     def hitRatio(self):
 */
  (__pyx_v_self->_ptr[0]).num_bytes = __pyx_v_num_bytes;

  /* "cuda/cuda.pyx":5209
 *         return self._ptr[0].num_bytes
 *     @num_bytes.setter
 *     def num_bytes(self, size_t num_bytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].num_bytes = num_bytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.num_bytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5213
 *         self._ptr[0].num_bytes = num_bytes
 *     @property
 *     def hitRatio(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].hitRatio
 *     @hitRatio.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8hitRatio_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8hitRatio_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8hitRatio___get__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8hitRatio___get__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5213, 0, __PYX_ERR(0, 5213, __pyx_L1_error));

  /* "cuda/cuda.pyx":5214
 *     @property
 *     def hitRatio(self):
 *         return self._ptr[0].hitRatio             # <<<<<<<<<<<<<<
 *     @hitRatio.setter
 *     def hitRatio(self, float hitRatio):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr[0]).hitRatio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5213
 *         self._ptr[0].num_bytes = num_bytes
 *     @property
 *     def hitRatio(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].hitRatio
 *     @hitRatio.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.hitRatio.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5216
 *         return self._ptr[0].hitRatio
 *     @hitRatio.setter
 *     def hitRatio(self, float hitRatio):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].hitRatio = hitRatio
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8hitRatio_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_hitRatio); /*proto*/
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8hitRatio_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_hitRatio) {
  float __pyx_v_hitRatio;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_hitRatio); {
    __pyx_v_hitRatio = __pyx_PyFloat_AsFloat(__pyx_arg_hitRatio); if (unlikely((__pyx_v_hitRatio == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 5216, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.hitRatio.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8hitRatio_2__set__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self), ((float)__pyx_v_hitRatio));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8hitRatio_2__set__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, float __pyx_v_hitRatio) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5216, 0, __PYX_ERR(0, 5216, __pyx_L1_error));

  /* "cuda/cuda.pyx":5218
 *     def hitRatio(self, float hitRatio):
 *         pass
 *         self._ptr[0].hitRatio = hitRatio             # <<<<<<<<<<<<<<
 *     @property
 *     def hitProp(self):
 */
  (__pyx_v_self->_ptr[0]).hitRatio = __pyx_v_hitRatio;

  /* "cuda/cuda.pyx":5216
 *         return self._ptr[0].hitRatio
 *     @hitRatio.setter
 *     def hitRatio(self, float hitRatio):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].hitRatio = hitRatio
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.hitRatio.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5220
 *         self._ptr[0].hitRatio = hitRatio
 *     @property
 *     def hitProp(self):             # <<<<<<<<<<<<<<
 *         return CUaccessProperty(self._ptr[0].hitProp)
 *     @hitProp.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_7hitProp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_7hitProp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_7hitProp___get__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_7hitProp___get__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5220, 0, __PYX_ERR(0, 5220, __pyx_L1_error));

  /* "cuda/cuda.pyx":5221
 *     @property
 *     def hitProp(self):
 *         return CUaccessProperty(self._ptr[0].hitProp)             # <<<<<<<<<<<<<<
 *     @hitProp.setter
 *     def hitProp(self, hitProp not None : CUaccessProperty):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUaccessProperty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUaccessProperty_enum((__pyx_v_self->_ptr[0]).hitProp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5220
 *         self._ptr[0].hitRatio = hitRatio
 *     @property
 *     def hitProp(self):             # <<<<<<<<<<<<<<
 *         return CUaccessProperty(self._ptr[0].hitProp)
 *     @hitProp.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.hitProp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5223
 *         return CUaccessProperty(self._ptr[0].hitProp)
 *     @hitProp.setter
 *     def hitProp(self, hitProp not None : CUaccessProperty):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].hitProp = hitProp.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_7hitProp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_hitProp); /*proto*/
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_7hitProp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_hitProp) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_hitProp) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "hitProp"); __PYX_ERR(0, 5223, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_7hitProp_2__set__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self), ((PyObject *)__pyx_v_hitProp));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_7hitProp_2__set__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, PyObject *__pyx_v_hitProp) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUaccessProperty __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5223, 0, __PYX_ERR(0, 5223, __pyx_L1_error));

  /* "cuda/cuda.pyx":5225
 *     def hitProp(self, hitProp not None : CUaccessProperty):
 *         pass
 *         self._ptr[0].hitProp = hitProp.value             # <<<<<<<<<<<<<<
 *     @property
 *     def missProp(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_hitProp, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUaccessProperty_enum)__Pyx_PyInt_As_enum__CUaccessProperty_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).hitProp = __pyx_t_2;

  /* "cuda/cuda.pyx":5223
 *         return CUaccessProperty(self._ptr[0].hitProp)
 *     @hitProp.setter
 *     def hitProp(self, hitProp not None : CUaccessProperty):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].hitProp = hitProp.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.hitProp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5227
 *         self._ptr[0].hitProp = hitProp.value
 *     @property
 *     def missProp(self):             # <<<<<<<<<<<<<<
 *         return CUaccessProperty(self._ptr[0].missProp)
 *     @missProp.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8missProp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8missProp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8missProp___get__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8missProp___get__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5227, 0, __PYX_ERR(0, 5227, __pyx_L1_error));

  /* "cuda/cuda.pyx":5228
 *     @property
 *     def missProp(self):
 *         return CUaccessProperty(self._ptr[0].missProp)             # <<<<<<<<<<<<<<
 *     @missProp.setter
 *     def missProp(self, missProp not None : CUaccessProperty):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUaccessProperty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUaccessProperty_enum((__pyx_v_self->_ptr[0]).missProp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5227
 *         self._ptr[0].hitProp = hitProp.value
 *     @property
 *     def missProp(self):             # <<<<<<<<<<<<<<
 *         return CUaccessProperty(self._ptr[0].missProp)
 *     @missProp.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.missProp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5230
 *         return CUaccessProperty(self._ptr[0].missProp)
 *     @missProp.setter
 *     def missProp(self, missProp not None : CUaccessProperty):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].missProp = missProp.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8missProp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_missProp); /*proto*/
static int __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8missProp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_missProp) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_missProp) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "missProp"); __PYX_ERR(0, 5230, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8missProp_2__set__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self), ((PyObject *)__pyx_v_missProp));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_8missProp_2__set__(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, PyObject *__pyx_v_missProp) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUaccessProperty __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5230, 0, __PYX_ERR(0, 5230, __pyx_L1_error));

  /* "cuda/cuda.pyx":5232
 *     def missProp(self, missProp not None : CUaccessProperty):
 *         pass
 *         self._ptr[0].missProp = missProp.value             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_KERNEL_NODE_PARAMS_st:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_missProp, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUaccessProperty_enum)__Pyx_PyInt_As_enum__CUaccessProperty_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).missProp = __pyx_t_2;

  /* "cuda/cuda.pyx":5230
 *         return CUaccessProperty(self._ptr[0].missProp)
 *     @missProp.setter
 *     def missProp(self, missProp not None : CUaccessProperty):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].missProp = missProp.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.missProp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_23CUaccessPolicyWindow_st_10__reduce_cython__[] = "CUaccessPolicyWindow_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_23CUaccessPolicyWindow_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_23CUaccessPolicyWindow_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__182)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__183, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_23CUaccessPolicyWindow_st_12__setstate_cython__[] = "CUaccessPolicyWindow_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_23CUaccessPolicyWindow_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_23CUaccessPolicyWindow_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_23CUaccessPolicyWindow_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__184)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__185, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUaccessPolicyWindow_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5267
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 5267, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5267, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5267, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 5267, 0, __PYX_ERR(0, 5267, __pyx_L1_error));

  /* "cuda/cuda.pyx":5268
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5269
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_KERNEL_NODE_PARAMS_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":5268
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5271
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_KERNEL_NODE_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._func = CUfunction(_ptr=<void_ptr>&self._ptr[0].func)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5267
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5272
 *         else:
 *             self._ptr = <ccuda.CUDA_KERNEL_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._func = CUfunction(_ptr=<void_ptr>&self._ptr[0].func)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5272, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5272, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5272, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 5272, 0, __PYX_ERR(0, 5272, __pyx_L1_error));

  /* "cuda/cuda.pyx":5273
 *             self._ptr = <ccuda.CUDA_KERNEL_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._func = CUfunction(_ptr=<void_ptr>&self._ptr[0].func)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).func))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 5273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_func);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_func));
  __pyx_v_self->_func = ((struct __pyx_obj_4cuda_4cuda_CUfunction *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":5272
 *         else:
 *             self._ptr = <ccuda.CUDA_KERNEL_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._func = CUfunction(_ptr=<void_ptr>&self._ptr[0].func)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5274
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._func = CUfunction(_ptr=<void_ptr>&self._ptr[0].func)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 5274, 0, __PYX_ERR(0, 5274, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":5276
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_6getPtr[] = "CUDA_KERNEL_NODE_PARAMS_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__186)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 5276, 0, __PYX_ERR(0, 5276, __pyx_L1_error));

  /* "cuda/cuda.pyx":5277
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5276
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5278
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 5278, 0, __PYX_ERR(0, 5278, __pyx_L1_error));

  /* "cuda/cuda.pyx":5279
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['func : ' + str(self.func)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5280
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['func : ' + str(self.func)]
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5281
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['func : ' + str(self.func)]             # <<<<<<<<<<<<<<
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_func_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_func, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5282
 *             str_list = []
 *             str_list += ['func : ' + str(self.func)]
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]             # <<<<<<<<<<<<<<
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gridDimX_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_gridDimX, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5283
 *             str_list += ['func : ' + str(self.func)]
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]             # <<<<<<<<<<<<<<
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gridDimY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_gridDimY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5284
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]             # <<<<<<<<<<<<<<
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gridDimZ_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_gridDimZ, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5285
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]             # <<<<<<<<<<<<<<
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_blockDimX_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_blockDimX, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5286
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]             # <<<<<<<<<<<<<<
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_blockDimY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_blockDimY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5287
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]             # <<<<<<<<<<<<<<
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]
 *             str_list += ['kernelParams : ' + str(self.kernelParams)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_blockDimZ_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_blockDimZ, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5288
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['kernelParams : ' + str(self.kernelParams)]
 *             str_list += ['extra : ' + str(self.extra)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sharedMemBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_sharedMemBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5289
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]
 *             str_list += ['kernelParams : ' + str(self.kernelParams)]             # <<<<<<<<<<<<<<
 *             str_list += ['extra : ' + str(self.extra)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kernelParams_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_kernelParams, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5290
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]
 *             str_list += ['kernelParams : ' + str(self.kernelParams)]
 *             str_list += ['extra : ' + str(self.extra)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extra_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_extra, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5291
 *             str_list += ['kernelParams : ' + str(self.kernelParams)]
 *             str_list += ['extra : ' + str(self.extra)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":5279
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['func : ' + str(self.func)]
 */
  }

  /* "cuda/cuda.pyx":5293
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":5278
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5296
 * 
 *     @property
 *     def func(self):             # <<<<<<<<<<<<<<
 *         return self._func
 *     @func.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4func_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4func_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4func___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4func___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5296, 0, __PYX_ERR(0, 5296, __pyx_L1_error));

  /* "cuda/cuda.pyx":5297
 *     @property
 *     def func(self):
 *         return self._func             # <<<<<<<<<<<<<<
 *     @func.setter
 *     def func(self, func):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_func));
  __pyx_r = ((PyObject *)__pyx_v_self->_func);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5296
 * 
 *     @property
 *     def func(self):             # <<<<<<<<<<<<<<
 *         return self._func
 *     @func.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.func.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5299
 *         return self._func
 *     @func.setter
 *     def func(self, func):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUfunction cfunc
 *         if func is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4func_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_func); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4func_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_func) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4func_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_func));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4func_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_func) {
  CUfunction __pyx_v_cfunc;
  PyObject *__pyx_v_pfunc = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5299, 0, __PYX_ERR(0, 5299, __pyx_L1_error));

  /* "cuda/cuda.pyx":5301
 *     def func(self, func):
 *         cdef ccuda.CUfunction cfunc
 *         if func is None:             # <<<<<<<<<<<<<<
 *             cfunc = <ccuda.CUfunction><void_ptr>0
 *         elif isinstance(func, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_func == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":5302
 *         cdef ccuda.CUfunction cfunc
 *         if func is None:
 *             cfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(func, (CUfunction)):
 *             pfunc = int(func)
 */
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":5301
 *     def func(self, func):
 *         cdef ccuda.CUfunction cfunc
 *         if func is None:             # <<<<<<<<<<<<<<
 *             cfunc = <ccuda.CUfunction><void_ptr>0
 *         elif isinstance(func, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5303
 *         if func is None:
 *             cfunc = <ccuda.CUfunction><void_ptr>0
 *         elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *             pfunc = int(func)
 *             cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_func, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5304
 *             cfunc = <ccuda.CUfunction><void_ptr>0
 *         elif isinstance(func, (CUfunction)):
 *             pfunc = int(func)             # <<<<<<<<<<<<<<
 *             cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":5305
 *         elif isinstance(func, (CUfunction)):
 *             pfunc = int(func)
 *             cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 *         else:
 *             pfunc = int(CUfunction(func))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5305, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":5303
 *         if func is None:
 *             cfunc = <ccuda.CUfunction><void_ptr>0
 *         elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *             pfunc = int(func)
 *             cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5307
 *             cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *         else:
 *             pfunc = int(CUfunction(func))             # <<<<<<<<<<<<<<
 *             cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *         self._func._ptr[0] = cfunc
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":5308
 *         else:
 *             pfunc = int(CUfunction(func))
 *             cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 *         self._func._ptr[0] = cfunc
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5308, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5309
 *             pfunc = int(CUfunction(func))
 *             cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *         self._func._ptr[0] = cfunc             # <<<<<<<<<<<<<<
 *     @property
 *     def gridDimX(self):
 */
  (__pyx_v_self->_func->_ptr[0]) = __pyx_v_cfunc;

  /* "cuda/cuda.pyx":5299
 *         return self._func
 *     @func.setter
 *     def func(self, func):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUfunction cfunc
 *         if func is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.func.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pfunc);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5311
 *         self._func._ptr[0] = cfunc
 *     @property
 *     def gridDimX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimX
 *     @gridDimX.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimX_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimX_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimX___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimX___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5311, 0, __PYX_ERR(0, 5311, __pyx_L1_error));

  /* "cuda/cuda.pyx":5312
 *     @property
 *     def gridDimX(self):
 *         return self._ptr[0].gridDimX             # <<<<<<<<<<<<<<
 *     @gridDimX.setter
 *     def gridDimX(self, unsigned int gridDimX):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).gridDimX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5311
 *         self._func._ptr[0] = cfunc
 *     @property
 *     def gridDimX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimX
 *     @gridDimX.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.gridDimX.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5314
 *         return self._ptr[0].gridDimX
 *     @gridDimX.setter
 *     def gridDimX(self, unsigned int gridDimX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimX = gridDimX
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimX); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimX) {
  unsigned int __pyx_v_gridDimX;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_gridDimX); {
    __pyx_v_gridDimX = __Pyx_PyInt_As_unsigned_int(__pyx_arg_gridDimX); if (unlikely((__pyx_v_gridDimX == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5314, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.gridDimX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimX_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_gridDimX));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimX_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_gridDimX) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5314, 0, __PYX_ERR(0, 5314, __pyx_L1_error));

  /* "cuda/cuda.pyx":5316
 *     def gridDimX(self, unsigned int gridDimX):
 *         pass
 *         self._ptr[0].gridDimX = gridDimX             # <<<<<<<<<<<<<<
 *     @property
 *     def gridDimY(self):
 */
  (__pyx_v_self->_ptr[0]).gridDimX = __pyx_v_gridDimX;

  /* "cuda/cuda.pyx":5314
 *         return self._ptr[0].gridDimX
 *     @gridDimX.setter
 *     def gridDimX(self, unsigned int gridDimX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimX = gridDimX
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.gridDimX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5318
 *         self._ptr[0].gridDimX = gridDimX
 *     @property
 *     def gridDimY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimY
 *     @gridDimY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimY___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5318, 0, __PYX_ERR(0, 5318, __pyx_L1_error));

  /* "cuda/cuda.pyx":5319
 *     @property
 *     def gridDimY(self):
 *         return self._ptr[0].gridDimY             # <<<<<<<<<<<<<<
 *     @gridDimY.setter
 *     def gridDimY(self, unsigned int gridDimY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).gridDimY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5318
 *         self._ptr[0].gridDimX = gridDimX
 *     @property
 *     def gridDimY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimY
 *     @gridDimY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.gridDimY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5321
 *         return self._ptr[0].gridDimY
 *     @gridDimY.setter
 *     def gridDimY(self, unsigned int gridDimY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimY = gridDimY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimY); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimY) {
  unsigned int __pyx_v_gridDimY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_gridDimY); {
    __pyx_v_gridDimY = __Pyx_PyInt_As_unsigned_int(__pyx_arg_gridDimY); if (unlikely((__pyx_v_gridDimY == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5321, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.gridDimY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimY_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_gridDimY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_gridDimY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5321, 0, __PYX_ERR(0, 5321, __pyx_L1_error));

  /* "cuda/cuda.pyx":5323
 *     def gridDimY(self, unsigned int gridDimY):
 *         pass
 *         self._ptr[0].gridDimY = gridDimY             # <<<<<<<<<<<<<<
 *     @property
 *     def gridDimZ(self):
 */
  (__pyx_v_self->_ptr[0]).gridDimY = __pyx_v_gridDimY;

  /* "cuda/cuda.pyx":5321
 *         return self._ptr[0].gridDimY
 *     @gridDimY.setter
 *     def gridDimY(self, unsigned int gridDimY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimY = gridDimY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.gridDimY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5325
 *         self._ptr[0].gridDimY = gridDimY
 *     @property
 *     def gridDimZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimZ
 *     @gridDimZ.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimZ___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5325, 0, __PYX_ERR(0, 5325, __pyx_L1_error));

  /* "cuda/cuda.pyx":5326
 *     @property
 *     def gridDimZ(self):
 *         return self._ptr[0].gridDimZ             # <<<<<<<<<<<<<<
 *     @gridDimZ.setter
 *     def gridDimZ(self, unsigned int gridDimZ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).gridDimZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5325
 *         self._ptr[0].gridDimY = gridDimY
 *     @property
 *     def gridDimZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimZ
 *     @gridDimZ.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.gridDimZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5328
 *         return self._ptr[0].gridDimZ
 *     @gridDimZ.setter
 *     def gridDimZ(self, unsigned int gridDimZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimZ = gridDimZ
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimZ); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimZ) {
  unsigned int __pyx_v_gridDimZ;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_gridDimZ); {
    __pyx_v_gridDimZ = __Pyx_PyInt_As_unsigned_int(__pyx_arg_gridDimZ); if (unlikely((__pyx_v_gridDimZ == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5328, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.gridDimZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimZ_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_gridDimZ));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_gridDimZ) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5328, 0, __PYX_ERR(0, 5328, __pyx_L1_error));

  /* "cuda/cuda.pyx":5330
 *     def gridDimZ(self, unsigned int gridDimZ):
 *         pass
 *         self._ptr[0].gridDimZ = gridDimZ             # <<<<<<<<<<<<<<
 *     @property
 *     def blockDimX(self):
 */
  (__pyx_v_self->_ptr[0]).gridDimZ = __pyx_v_gridDimZ;

  /* "cuda/cuda.pyx":5328
 *         return self._ptr[0].gridDimZ
 *     @gridDimZ.setter
 *     def gridDimZ(self, unsigned int gridDimZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimZ = gridDimZ
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.gridDimZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5332
 *         self._ptr[0].gridDimZ = gridDimZ
 *     @property
 *     def blockDimX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimX
 *     @blockDimX.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimX_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimX_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimX___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimX___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5332, 0, __PYX_ERR(0, 5332, __pyx_L1_error));

  /* "cuda/cuda.pyx":5333
 *     @property
 *     def blockDimX(self):
 *         return self._ptr[0].blockDimX             # <<<<<<<<<<<<<<
 *     @blockDimX.setter
 *     def blockDimX(self, unsigned int blockDimX):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).blockDimX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5332
 *         self._ptr[0].gridDimZ = gridDimZ
 *     @property
 *     def blockDimX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimX
 *     @blockDimX.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.blockDimX.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5335
 *         return self._ptr[0].blockDimX
 *     @blockDimX.setter
 *     def blockDimX(self, unsigned int blockDimX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimX = blockDimX
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimX); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimX) {
  unsigned int __pyx_v_blockDimX;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_blockDimX); {
    __pyx_v_blockDimX = __Pyx_PyInt_As_unsigned_int(__pyx_arg_blockDimX); if (unlikely((__pyx_v_blockDimX == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5335, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.blockDimX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimX_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_blockDimX));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimX_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_blockDimX) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5335, 0, __PYX_ERR(0, 5335, __pyx_L1_error));

  /* "cuda/cuda.pyx":5337
 *     def blockDimX(self, unsigned int blockDimX):
 *         pass
 *         self._ptr[0].blockDimX = blockDimX             # <<<<<<<<<<<<<<
 *     @property
 *     def blockDimY(self):
 */
  (__pyx_v_self->_ptr[0]).blockDimX = __pyx_v_blockDimX;

  /* "cuda/cuda.pyx":5335
 *         return self._ptr[0].blockDimX
 *     @blockDimX.setter
 *     def blockDimX(self, unsigned int blockDimX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimX = blockDimX
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.blockDimX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5339
 *         self._ptr[0].blockDimX = blockDimX
 *     @property
 *     def blockDimY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimY
 *     @blockDimY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimY___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5339, 0, __PYX_ERR(0, 5339, __pyx_L1_error));

  /* "cuda/cuda.pyx":5340
 *     @property
 *     def blockDimY(self):
 *         return self._ptr[0].blockDimY             # <<<<<<<<<<<<<<
 *     @blockDimY.setter
 *     def blockDimY(self, unsigned int blockDimY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).blockDimY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5339
 *         self._ptr[0].blockDimX = blockDimX
 *     @property
 *     def blockDimY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimY
 *     @blockDimY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.blockDimY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5342
 *         return self._ptr[0].blockDimY
 *     @blockDimY.setter
 *     def blockDimY(self, unsigned int blockDimY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimY = blockDimY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimY); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimY) {
  unsigned int __pyx_v_blockDimY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_blockDimY); {
    __pyx_v_blockDimY = __Pyx_PyInt_As_unsigned_int(__pyx_arg_blockDimY); if (unlikely((__pyx_v_blockDimY == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5342, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.blockDimY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimY_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_blockDimY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_blockDimY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5342, 0, __PYX_ERR(0, 5342, __pyx_L1_error));

  /* "cuda/cuda.pyx":5344
 *     def blockDimY(self, unsigned int blockDimY):
 *         pass
 *         self._ptr[0].blockDimY = blockDimY             # <<<<<<<<<<<<<<
 *     @property
 *     def blockDimZ(self):
 */
  (__pyx_v_self->_ptr[0]).blockDimY = __pyx_v_blockDimY;

  /* "cuda/cuda.pyx":5342
 *         return self._ptr[0].blockDimY
 *     @blockDimY.setter
 *     def blockDimY(self, unsigned int blockDimY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimY = blockDimY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.blockDimY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5346
 *         self._ptr[0].blockDimY = blockDimY
 *     @property
 *     def blockDimZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimZ
 *     @blockDimZ.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimZ___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5346, 0, __PYX_ERR(0, 5346, __pyx_L1_error));

  /* "cuda/cuda.pyx":5347
 *     @property
 *     def blockDimZ(self):
 *         return self._ptr[0].blockDimZ             # <<<<<<<<<<<<<<
 *     @blockDimZ.setter
 *     def blockDimZ(self, unsigned int blockDimZ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).blockDimZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5346
 *         self._ptr[0].blockDimY = blockDimY
 *     @property
 *     def blockDimZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimZ
 *     @blockDimZ.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.blockDimZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5349
 *         return self._ptr[0].blockDimZ
 *     @blockDimZ.setter
 *     def blockDimZ(self, unsigned int blockDimZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimZ = blockDimZ
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimZ); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimZ) {
  unsigned int __pyx_v_blockDimZ;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_blockDimZ); {
    __pyx_v_blockDimZ = __Pyx_PyInt_As_unsigned_int(__pyx_arg_blockDimZ); if (unlikely((__pyx_v_blockDimZ == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5349, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.blockDimZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimZ_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_blockDimZ));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_blockDimZ) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5349, 0, __PYX_ERR(0, 5349, __pyx_L1_error));

  /* "cuda/cuda.pyx":5351
 *     def blockDimZ(self, unsigned int blockDimZ):
 *         pass
 *         self._ptr[0].blockDimZ = blockDimZ             # <<<<<<<<<<<<<<
 *     @property
 *     def sharedMemBytes(self):
 */
  (__pyx_v_self->_ptr[0]).blockDimZ = __pyx_v_blockDimZ;

  /* "cuda/cuda.pyx":5349
 *         return self._ptr[0].blockDimZ
 *     @blockDimZ.setter
 *     def blockDimZ(self, unsigned int blockDimZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimZ = blockDimZ
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.blockDimZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5353
 *         self._ptr[0].blockDimZ = blockDimZ
 *     @property
 *     def sharedMemBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].sharedMemBytes
 *     @sharedMemBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_14sharedMemBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_14sharedMemBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_14sharedMemBytes___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_14sharedMemBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5353, 0, __PYX_ERR(0, 5353, __pyx_L1_error));

  /* "cuda/cuda.pyx":5354
 *     @property
 *     def sharedMemBytes(self):
 *         return self._ptr[0].sharedMemBytes             # <<<<<<<<<<<<<<
 *     @sharedMemBytes.setter
 *     def sharedMemBytes(self, unsigned int sharedMemBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).sharedMemBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5353
 *         self._ptr[0].blockDimZ = blockDimZ
 *     @property
 *     def sharedMemBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].sharedMemBytes
 *     @sharedMemBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.sharedMemBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5356
 *         return self._ptr[0].sharedMemBytes
 *     @sharedMemBytes.setter
 *     def sharedMemBytes(self, unsigned int sharedMemBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].sharedMemBytes = sharedMemBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_14sharedMemBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_sharedMemBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_14sharedMemBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_sharedMemBytes) {
  unsigned int __pyx_v_sharedMemBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_sharedMemBytes); {
    __pyx_v_sharedMemBytes = __Pyx_PyInt_As_unsigned_int(__pyx_arg_sharedMemBytes); if (unlikely((__pyx_v_sharedMemBytes == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5356, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.sharedMemBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_14sharedMemBytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_sharedMemBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_14sharedMemBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_sharedMemBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5356, 0, __PYX_ERR(0, 5356, __pyx_L1_error));

  /* "cuda/cuda.pyx":5358
 *     def sharedMemBytes(self, unsigned int sharedMemBytes):
 *         pass
 *         self._ptr[0].sharedMemBytes = sharedMemBytes             # <<<<<<<<<<<<<<
 *     @property
 *     def kernelParams(self):
 */
  (__pyx_v_self->_ptr[0]).sharedMemBytes = __pyx_v_sharedMemBytes;

  /* "cuda/cuda.pyx":5356
 *         return self._ptr[0].sharedMemBytes
 *     @sharedMemBytes.setter
 *     def sharedMemBytes(self, unsigned int sharedMemBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].sharedMemBytes = sharedMemBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.sharedMemBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5360
 *         self._ptr[0].sharedMemBytes = sharedMemBytes
 *     @property
 *     def kernelParams(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].kernelParams
 *     @kernelParams.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12kernelParams_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12kernelParams_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12kernelParams___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12kernelParams___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5360, 0, __PYX_ERR(0, 5360, __pyx_L1_error));

  /* "cuda/cuda.pyx":5361
 *     @property
 *     def kernelParams(self):
 *         return <void_ptr>self._ptr[0].kernelParams             # <<<<<<<<<<<<<<
 *     @kernelParams.setter
 *     def kernelParams(self, kernelParams):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).kernelParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5360
 *         self._ptr[0].sharedMemBytes = sharedMemBytes
 *     @property
 *     def kernelParams(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].kernelParams
 *     @kernelParams.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.kernelParams.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5363
 *         return <void_ptr>self._ptr[0].kernelParams
 *     @kernelParams.setter
 *     def kernelParams(self, kernelParams):             # <<<<<<<<<<<<<<
 *         self._ckernelParams = utils.HelperKernelParams(kernelParams)
 *         self._ptr[0].kernelParams = <void**><void_ptr>self._ckernelParams.ckernelParams
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12kernelParams_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_kernelParams); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12kernelParams_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_kernelParams) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12kernelParams_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_kernelParams));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12kernelParams_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_kernelParams) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5363, 0, __PYX_ERR(0, 5363, __pyx_L1_error));

  /* "cuda/cuda.pyx":5364
 *     @kernelParams.setter
 *     def kernelParams(self, kernelParams):
 *         self._ckernelParams = utils.HelperKernelParams(kernelParams)             # <<<<<<<<<<<<<<
 *         self._ptr[0].kernelParams = <void**><void_ptr>self._ckernelParams.ckernelParams
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperKernelParams), __pyx_v_kernelParams); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_ckernelParams);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_ckernelParams));
  __pyx_v_self->_ckernelParams = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperKernelParams *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5365
 *     def kernelParams(self, kernelParams):
 *         self._ckernelParams = utils.HelperKernelParams(kernelParams)
 *         self._ptr[0].kernelParams = <void**><void_ptr>self._ckernelParams.ckernelParams             # <<<<<<<<<<<<<<
 *     @property
 *     def extra(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_ckernelParams), __pyx_n_s_ckernelParams); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).kernelParams = ((void **)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":5363
 *         return <void_ptr>self._ptr[0].kernelParams
 *     @kernelParams.setter
 *     def kernelParams(self, kernelParams):             # <<<<<<<<<<<<<<
 *         self._ckernelParams = utils.HelperKernelParams(kernelParams)
 *         self._ptr[0].kernelParams = <void**><void_ptr>self._ckernelParams.ckernelParams
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.kernelParams.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5367
 *         self._ptr[0].kernelParams = <void**><void_ptr>self._ckernelParams.ckernelParams
 *     @property
 *     def extra(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].extra
 *     @extra.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5extra_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5extra_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5extra___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5extra___get__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5367, 0, __PYX_ERR(0, 5367, __pyx_L1_error));

  /* "cuda/cuda.pyx":5368
 *     @property
 *     def extra(self):
 *         return <void_ptr>self._ptr[0].extra             # <<<<<<<<<<<<<<
 *     @extra.setter
 *     def extra(self, void_ptr extra):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).extra)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5367
 *         self._ptr[0].kernelParams = <void**><void_ptr>self._ckernelParams.ckernelParams
 *     @property
 *     def extra(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].extra
 *     @extra.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.extra.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5370
 *         return <void_ptr>self._ptr[0].extra
 *     @extra.setter
 *     def extra(self, void_ptr extra):             # <<<<<<<<<<<<<<
 *         self._ptr[0].extra = <void**>extra
 * 
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5extra_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_extra); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5extra_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_extra) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_extra;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_extra); {
    __pyx_v_extra = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_extra); if (unlikely((__pyx_v_extra == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5370, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.extra.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5extra_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), ((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_extra));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5extra_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_extra) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5370, 0, __PYX_ERR(0, 5370, __pyx_L1_error));

  /* "cuda/cuda.pyx":5371
 *     @extra.setter
 *     def extra(self, void_ptr extra):
 *         self._ptr[0].extra = <void**>extra             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_MEMSET_NODE_PARAMS_st:
 */
  (__pyx_v_self->_ptr[0]).extra = ((void **)__pyx_v_extra);

  /* "cuda/cuda.pyx":5370
 *         return <void_ptr>self._ptr[0].extra
 *     @extra.setter
 *     def extra(self, void_ptr extra):             # <<<<<<<<<<<<<<
 *         self._ptr[0].extra = <void**>extra
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.extra.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_10__reduce_cython__[] = "CUDA_KERNEL_NODE_PARAMS_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__187)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__188, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12__setstate_cython__[] = "CUDA_KERNEL_NODE_PARAMS_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__189)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__190, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5398
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 5398, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5398, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5398, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 5398, 0, __PYX_ERR(0, 5398, __pyx_L1_error));

  /* "cuda/cuda.pyx":5399
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5400
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMSET_NODE_PARAMS_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":5399
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5402
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMSET_NODE_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._dst = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dst)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5398
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5403
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMSET_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._dst = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dst)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5403, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5403, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5403, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 5403, 0, __PYX_ERR(0, 5403, __pyx_L1_error));

  /* "cuda/cuda.pyx":5404
 *             self._ptr = <ccuda.CUDA_MEMSET_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._dst = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dst)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).dst))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 5404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_dst);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_dst));
  __pyx_v_self->_dst = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":5403
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMSET_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._dst = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dst)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5405
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._dst = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dst)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 5405, 0, __PYX_ERR(0, 5405, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":5407
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6getPtr[] = "CUDA_MEMSET_NODE_PARAMS_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__191)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 5407, 0, __PYX_ERR(0, 5407, __pyx_L1_error));

  /* "cuda/cuda.pyx":5408
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5407
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5409
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 5409, 0, __PYX_ERR(0, 5409, __pyx_L1_error));

  /* "cuda/cuda.pyx":5410
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['dst : ' + str(self.dst)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5411
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['dst : ' + str(self.dst)]
 *             str_list += ['pitch : ' + str(self.pitch)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5412
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['dst : ' + str(self.dst)]             # <<<<<<<<<<<<<<
 *             str_list += ['pitch : ' + str(self.pitch)]
 *             str_list += ['value : ' + str(self.value)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dst, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5413
 *             str_list = []
 *             str_list += ['dst : ' + str(self.dst)]
 *             str_list += ['pitch : ' + str(self.pitch)]             # <<<<<<<<<<<<<<
 *             str_list += ['value : ' + str(self.value)]
 *             str_list += ['elementSize : ' + str(self.elementSize)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pitch_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_pitch, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5414
 *             str_list += ['dst : ' + str(self.dst)]
 *             str_list += ['pitch : ' + str(self.pitch)]
 *             str_list += ['value : ' + str(self.value)]             # <<<<<<<<<<<<<<
 *             str_list += ['elementSize : ' + str(self.elementSize)]
 *             str_list += ['width : ' + str(self.width)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_value_2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5415
 *             str_list += ['pitch : ' + str(self.pitch)]
 *             str_list += ['value : ' + str(self.value)]
 *             str_list += ['elementSize : ' + str(self.elementSize)]             # <<<<<<<<<<<<<<
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_elementSize_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_elementSize, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5416
 *             str_list += ['value : ' + str(self.value)]
 *             str_list += ['elementSize : ' + str(self.elementSize)]
 *             str_list += ['width : ' + str(self.width)]             # <<<<<<<<<<<<<<
 *             str_list += ['height : ' + str(self.height)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_width, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5417
 *             str_list += ['elementSize : ' + str(self.elementSize)]
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_height, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5418
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":5410
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['dst : ' + str(self.dst)]
 */
  }

  /* "cuda/cuda.pyx":5420
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":5409
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5423
 * 
 *     @property
 *     def dst(self):             # <<<<<<<<<<<<<<
 *         return self._dst
 *     @dst.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3dst_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3dst_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3dst___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3dst___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5423, 0, __PYX_ERR(0, 5423, __pyx_L1_error));

  /* "cuda/cuda.pyx":5424
 *     @property
 *     def dst(self):
 *         return self._dst             # <<<<<<<<<<<<<<
 *     @dst.setter
 *     def dst(self, dst):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_dst));
  __pyx_r = ((PyObject *)__pyx_v_self->_dst);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5423
 * 
 *     @property
 *     def dst(self):             # <<<<<<<<<<<<<<
 *         return self._dst
 *     @dst.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.dst.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5426
 *         return self._dst
 *     @dst.setter
 *     def dst(self, dst):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdst
 *         if dst is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3dst_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dst); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3dst_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dst) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3dst_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_dst));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3dst_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_dst) {
  CUdeviceptr __pyx_v_cdst;
  PyObject *__pyx_v_pdst = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5426, 0, __PYX_ERR(0, 5426, __pyx_L1_error));

  /* "cuda/cuda.pyx":5428
 *     def dst(self, dst):
 *         cdef ccuda.CUdeviceptr cdst
 *         if dst is None:             # <<<<<<<<<<<<<<
 *             cdst = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dst, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dst == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":5429
 *         cdef ccuda.CUdeviceptr cdst
 *         if dst is None:
 *             cdst = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(dst, (CUdeviceptr)):
 *             pdst = int(dst)
 */
    __pyx_v_cdst = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":5428
 *     def dst(self, dst):
 *         cdef ccuda.CUdeviceptr cdst
 *         if dst is None:             # <<<<<<<<<<<<<<
 *             cdst = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dst, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5430
 *         if dst is None:
 *             cdst = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dst, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdst = int(dst)
 *             cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dst, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5431
 *             cdst = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dst, (CUdeviceptr)):
 *             pdst = int(dst)             # <<<<<<<<<<<<<<
 *             cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdst = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":5432
 *         elif isinstance(dst, (CUdeviceptr)):
 *             pdst = int(dst)
 *             cdst = <ccuda.CUdeviceptr><void_ptr>pdst             # <<<<<<<<<<<<<<
 *         else:
 *             pdst = int(CUdeviceptr(dst))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdst); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5432, __pyx_L1_error)
    __pyx_v_cdst = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":5430
 *         if dst is None:
 *             cdst = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dst, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdst = int(dst)
 *             cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5434
 *             cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 *         else:
 *             pdst = int(CUdeviceptr(dst))             # <<<<<<<<<<<<<<
 *             cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 *         self._dst._ptr[0] = cdst
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdst = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":5435
 *         else:
 *             pdst = int(CUdeviceptr(dst))
 *             cdst = <ccuda.CUdeviceptr><void_ptr>pdst             # <<<<<<<<<<<<<<
 *         self._dst._ptr[0] = cdst
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdst); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5435, __pyx_L1_error)
    __pyx_v_cdst = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5436
 *             pdst = int(CUdeviceptr(dst))
 *             cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 *         self._dst._ptr[0] = cdst             # <<<<<<<<<<<<<<
 *     @property
 *     def pitch(self):
 */
  (__pyx_v_self->_dst->_ptr[0]) = __pyx_v_cdst;

  /* "cuda/cuda.pyx":5426
 *         return self._dst
 *     @dst.setter
 *     def dst(self, dst):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdst
 *         if dst is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.dst.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdst);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5438
 *         self._dst._ptr[0] = cdst
 *     @property
 *     def pitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].pitch
 *     @pitch.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5pitch_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5pitch_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5pitch___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5pitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5438, 0, __PYX_ERR(0, 5438, __pyx_L1_error));

  /* "cuda/cuda.pyx":5439
 *     @property
 *     def pitch(self):
 *         return self._ptr[0].pitch             # <<<<<<<<<<<<<<
 *     @pitch.setter
 *     def pitch(self, size_t pitch):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).pitch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5438
 *         self._dst._ptr[0] = cdst
 *     @property
 *     def pitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].pitch
 *     @pitch.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.pitch.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5441
 *         return self._ptr[0].pitch
 *     @pitch.setter
 *     def pitch(self, size_t pitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].pitch = pitch
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5pitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_pitch); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5pitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_pitch) {
  size_t __pyx_v_pitch;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_pitch); {
    __pyx_v_pitch = __Pyx_PyInt_As_size_t(__pyx_arg_pitch); if (unlikely((__pyx_v_pitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 5441, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.pitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5pitch_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self), ((size_t)__pyx_v_pitch));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5pitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, size_t __pyx_v_pitch) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5441, 0, __PYX_ERR(0, 5441, __pyx_L1_error));

  /* "cuda/cuda.pyx":5443
 *     def pitch(self, size_t pitch):
 *         pass
 *         self._ptr[0].pitch = pitch             # <<<<<<<<<<<<<<
 *     @property
 *     def value(self):
 */
  (__pyx_v_self->_ptr[0]).pitch = __pyx_v_pitch;

  /* "cuda/cuda.pyx":5441
 *         return self._ptr[0].pitch
 *     @pitch.setter
 *     def pitch(self, size_t pitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].pitch = pitch
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.pitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5445
 *         self._ptr[0].pitch = pitch
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].value
 *     @value.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5value_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5value___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5value___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5445, 0, __PYX_ERR(0, 5445, __pyx_L1_error));

  /* "cuda/cuda.pyx":5446
 *     @property
 *     def value(self):
 *         return self._ptr[0].value             # <<<<<<<<<<<<<<
 *     @value.setter
 *     def value(self, unsigned int value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5445
 *         self._ptr[0].pitch = pitch
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].value
 *     @value.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5448
 *         return self._ptr[0].value
 *     @value.setter
 *     def value(self, unsigned int value):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].value = value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  unsigned int __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_unsigned_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5448, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5value_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5value_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5448, 0, __PYX_ERR(0, 5448, __pyx_L1_error));

  /* "cuda/cuda.pyx":5450
 *     def value(self, unsigned int value):
 *         pass
 *         self._ptr[0].value = value             # <<<<<<<<<<<<<<
 *     @property
 *     def elementSize(self):
 */
  (__pyx_v_self->_ptr[0]).value = __pyx_v_value;

  /* "cuda/cuda.pyx":5448
 *         return self._ptr[0].value
 *     @value.setter
 *     def value(self, unsigned int value):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].value = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5452
 *         self._ptr[0].value = value
 *     @property
 *     def elementSize(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].elementSize
 *     @elementSize.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11elementSize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11elementSize_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11elementSize___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11elementSize___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5452, 0, __PYX_ERR(0, 5452, __pyx_L1_error));

  /* "cuda/cuda.pyx":5453
 *     @property
 *     def elementSize(self):
 *         return self._ptr[0].elementSize             # <<<<<<<<<<<<<<
 *     @elementSize.setter
 *     def elementSize(self, unsigned int elementSize):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).elementSize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5452
 *         self._ptr[0].value = value
 *     @property
 *     def elementSize(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].elementSize
 *     @elementSize.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.elementSize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5455
 *         return self._ptr[0].elementSize
 *     @elementSize.setter
 *     def elementSize(self, unsigned int elementSize):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].elementSize = elementSize
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11elementSize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_elementSize); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11elementSize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_elementSize) {
  unsigned int __pyx_v_elementSize;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_elementSize); {
    __pyx_v_elementSize = __Pyx_PyInt_As_unsigned_int(__pyx_arg_elementSize); if (unlikely((__pyx_v_elementSize == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5455, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.elementSize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11elementSize_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_elementSize));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11elementSize_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_elementSize) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5455, 0, __PYX_ERR(0, 5455, __pyx_L1_error));

  /* "cuda/cuda.pyx":5457
 *     def elementSize(self, unsigned int elementSize):
 *         pass
 *         self._ptr[0].elementSize = elementSize             # <<<<<<<<<<<<<<
 *     @property
 *     def width(self):
 */
  (__pyx_v_self->_ptr[0]).elementSize = __pyx_v_elementSize;

  /* "cuda/cuda.pyx":5455
 *         return self._ptr[0].elementSize
 *     @elementSize.setter
 *     def elementSize(self, unsigned int elementSize):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].elementSize = elementSize
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.elementSize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5459
 *         self._ptr[0].elementSize = elementSize
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].width
 *     @width.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5width___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5width___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5459, 0, __PYX_ERR(0, 5459, __pyx_L1_error));

  /* "cuda/cuda.pyx":5460
 *     @property
 *     def width(self):
 *         return self._ptr[0].width             # <<<<<<<<<<<<<<
 *     @width.setter
 *     def width(self, size_t width):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5459
 *         self._ptr[0].elementSize = elementSize
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].width
 *     @width.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5462
 *         return self._ptr[0].width
 *     @width.setter
 *     def width(self, size_t width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].width = width
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_width); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_width) {
  size_t __pyx_v_width;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_width); {
    __pyx_v_width = __Pyx_PyInt_As_size_t(__pyx_arg_width); if (unlikely((__pyx_v_width == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 5462, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5width_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self), ((size_t)__pyx_v_width));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5width_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, size_t __pyx_v_width) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5462, 0, __PYX_ERR(0, 5462, __pyx_L1_error));

  /* "cuda/cuda.pyx":5464
 *     def width(self, size_t width):
 *         pass
 *         self._ptr[0].width = width             # <<<<<<<<<<<<<<
 *     @property
 *     def height(self):
 */
  (__pyx_v_self->_ptr[0]).width = __pyx_v_width;

  /* "cuda/cuda.pyx":5462
 *         return self._ptr[0].width
 *     @width.setter
 *     def width(self, size_t width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].width = width
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5466
 *         self._ptr[0].width = width
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].height
 *     @height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6height___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5466, 0, __PYX_ERR(0, 5466, __pyx_L1_error));

  /* "cuda/cuda.pyx":5467
 *     @property
 *     def height(self):
 *         return self._ptr[0].height             # <<<<<<<<<<<<<<
 *     @height.setter
 *     def height(self, size_t height):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5466
 *         self._ptr[0].width = width
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].height
 *     @height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5469
 *         return self._ptr[0].height
 *     @height.setter
 *     def height(self, size_t height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].height = height
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_height); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_height) {
  size_t __pyx_v_height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_height); {
    __pyx_v_height = __Pyx_PyInt_As_size_t(__pyx_arg_height); if (unlikely((__pyx_v_height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 5469, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6height_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self), ((size_t)__pyx_v_height));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, size_t __pyx_v_height) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5469, 0, __PYX_ERR(0, 5469, __pyx_L1_error));

  /* "cuda/cuda.pyx":5471
 *     def height(self, size_t height):
 *         pass
 *         self._ptr[0].height = height             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_HOST_NODE_PARAMS_st:
 */
  (__pyx_v_self->_ptr[0]).height = __pyx_v_height;

  /* "cuda/cuda.pyx":5469
 *         return self._ptr[0].height
 *     @height.setter
 *     def height(self, size_t height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].height = height
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_10__reduce_cython__[] = "CUDA_MEMSET_NODE_PARAMS_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__192)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__193, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_12__setstate_cython__[] = "CUDA_MEMSET_NODE_PARAMS_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__194)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__195, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5490
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 5490, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5490, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5490, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 5490, 0, __PYX_ERR(0, 5490, __pyx_L1_error));

  /* "cuda/cuda.pyx":5491
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5492
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_HOST_NODE_PARAMS_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":5491
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5494
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_HOST_NODE_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._fn = CUhostFn(_ptr=<void_ptr>&self._ptr[0].fn)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_HOST_NODE_PARAMS_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5490
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5495
 *         else:
 *             self._ptr = <ccuda.CUDA_HOST_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._fn = CUhostFn(_ptr=<void_ptr>&self._ptr[0].fn)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5495, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5495, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5495, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 5495, 0, __PYX_ERR(0, 5495, __pyx_L1_error));

  /* "cuda/cuda.pyx":5496
 *             self._ptr = <ccuda.CUDA_HOST_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._fn = CUhostFn(_ptr=<void_ptr>&self._ptr[0].fn)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).fn))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 5496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUhostFn), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_fn);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_fn));
  __pyx_v_self->_fn = ((struct __pyx_obj_4cuda_4cuda_CUhostFn *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":5495
 *         else:
 *             self._ptr = <ccuda.CUDA_HOST_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._fn = CUhostFn(_ptr=<void_ptr>&self._ptr[0].fn)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5497
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._fn = CUhostFn(_ptr=<void_ptr>&self._ptr[0].fn)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 5497, 0, __PYX_ERR(0, 5497, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":5499
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_6getPtr[] = "CUDA_HOST_NODE_PARAMS_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__196)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 5499, 0, __PYX_ERR(0, 5499, __pyx_L1_error));

  /* "cuda/cuda.pyx":5500
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5499
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5501
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 5501, 0, __PYX_ERR(0, 5501, __pyx_L1_error));

  /* "cuda/cuda.pyx":5502
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fn : ' + str(self.fn)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5503
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['fn : ' + str(self.fn)]
 *             str_list += ['userData : ' + hex(self.userData)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5504
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['fn : ' + str(self.fn)]             # <<<<<<<<<<<<<<
 *             str_list += ['userData : ' + hex(self.userData)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fn_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_fn, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5505
 *             str_list = []
 *             str_list += ['fn : ' + str(self.fn)]
 *             str_list += ['userData : ' + hex(self.userData)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_userData_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_userData, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5506
 *             str_list += ['fn : ' + str(self.fn)]
 *             str_list += ['userData : ' + hex(self.userData)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":5502
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fn : ' + str(self.fn)]
 */
  }

  /* "cuda/cuda.pyx":5508
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":5501
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5511
 * 
 *     @property
 *     def fn(self):             # <<<<<<<<<<<<<<
 *         return self._fn
 *     @fn.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2fn_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2fn_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2fn___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2fn___get__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5511, 0, __PYX_ERR(0, 5511, __pyx_L1_error));

  /* "cuda/cuda.pyx":5512
 *     @property
 *     def fn(self):
 *         return self._fn             # <<<<<<<<<<<<<<
 *     @fn.setter
 *     def fn(self, fn):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_fn));
  __pyx_r = ((PyObject *)__pyx_v_self->_fn);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5511
 * 
 *     @property
 *     def fn(self):             # <<<<<<<<<<<<<<
 *         return self._fn
 *     @fn.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.fn.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5514
 *         return self._fn
 *     @fn.setter
 *     def fn(self, fn):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUhostFn cfn
 *         if fn is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2fn_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_fn); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2fn_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_fn) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2fn_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_fn));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2fn_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_fn) {
  CUhostFn __pyx_v_cfn;
  PyObject *__pyx_v_pfn = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5514, 0, __PYX_ERR(0, 5514, __pyx_L1_error));

  /* "cuda/cuda.pyx":5516
 *     def fn(self, fn):
 *         cdef ccuda.CUhostFn cfn
 *         if fn is None:             # <<<<<<<<<<<<<<
 *             cfn = <ccuda.CUhostFn><void_ptr>0
 *         elif isinstance(fn, (CUhostFn)):
 */
  __pyx_t_1 = (__pyx_v_fn == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":5517
 *         cdef ccuda.CUhostFn cfn
 *         if fn is None:
 *             cfn = <ccuda.CUhostFn><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(fn, (CUhostFn)):
 *             pfn = int(fn)
 */
    __pyx_v_cfn = ((CUhostFn)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":5516
 *     def fn(self, fn):
 *         cdef ccuda.CUhostFn cfn
 *         if fn is None:             # <<<<<<<<<<<<<<
 *             cfn = <ccuda.CUhostFn><void_ptr>0
 *         elif isinstance(fn, (CUhostFn)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5518
 *         if fn is None:
 *             cfn = <ccuda.CUhostFn><void_ptr>0
 *         elif isinstance(fn, (CUhostFn)):             # <<<<<<<<<<<<<<
 *             pfn = int(fn)
 *             cfn = <ccuda.CUhostFn><void_ptr>pfn
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_fn, __pyx_ptype_4cuda_4cuda_CUhostFn); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5519
 *             cfn = <ccuda.CUhostFn><void_ptr>0
 *         elif isinstance(fn, (CUhostFn)):
 *             pfn = int(fn)             # <<<<<<<<<<<<<<
 *             cfn = <ccuda.CUhostFn><void_ptr>pfn
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pfn = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":5520
 *         elif isinstance(fn, (CUhostFn)):
 *             pfn = int(fn)
 *             cfn = <ccuda.CUhostFn><void_ptr>pfn             # <<<<<<<<<<<<<<
 *         else:
 *             pfn = int(CUhostFn(fn))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfn); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5520, __pyx_L1_error)
    __pyx_v_cfn = ((CUhostFn)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":5518
 *         if fn is None:
 *             cfn = <ccuda.CUhostFn><void_ptr>0
 *         elif isinstance(fn, (CUhostFn)):             # <<<<<<<<<<<<<<
 *             pfn = int(fn)
 *             cfn = <ccuda.CUhostFn><void_ptr>pfn
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5522
 *             cfn = <ccuda.CUhostFn><void_ptr>pfn
 *         else:
 *             pfn = int(CUhostFn(fn))             # <<<<<<<<<<<<<<
 *             cfn = <ccuda.CUhostFn><void_ptr>pfn
 *         self._fn._ptr[0] = cfn
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUhostFn), __pyx_v_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pfn = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":5523
 *         else:
 *             pfn = int(CUhostFn(fn))
 *             cfn = <ccuda.CUhostFn><void_ptr>pfn             # <<<<<<<<<<<<<<
 *         self._fn._ptr[0] = cfn
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfn); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5523, __pyx_L1_error)
    __pyx_v_cfn = ((CUhostFn)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5524
 *             pfn = int(CUhostFn(fn))
 *             cfn = <ccuda.CUhostFn><void_ptr>pfn
 *         self._fn._ptr[0] = cfn             # <<<<<<<<<<<<<<
 *     @property
 *     def userData(self):
 */
  (__pyx_v_self->_fn->_ptr[0]) = __pyx_v_cfn;

  /* "cuda/cuda.pyx":5514
 *         return self._fn
 *     @fn.setter
 *     def fn(self, fn):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUhostFn cfn
 *         if fn is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.fn.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pfn);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5526
 *         self._fn._ptr[0] = cfn
 *     @property
 *     def userData(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].userData
 *     @userData.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8userData_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8userData_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8userData___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8userData___get__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5526, 0, __PYX_ERR(0, 5526, __pyx_L1_error));

  /* "cuda/cuda.pyx":5527
 *     @property
 *     def userData(self):
 *         return <void_ptr>self._ptr[0].userData             # <<<<<<<<<<<<<<
 *     @userData.setter
 *     def userData(self, userData):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).userData)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5526
 *         self._fn._ptr[0] = cfn
 *     @property
 *     def userData(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].userData
 *     @userData.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.userData.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5529
 *         return <void_ptr>self._ptr[0].userData
 *     @userData.setter
 *     def userData(self, userData):             # <<<<<<<<<<<<<<
 *         _cuserData = utils.HelperInputVoidPtr(userData)
 *         self._ptr[0].userData = <void*><void_ptr>_cuserData.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8userData_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_userData); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8userData_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_userData) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8userData_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_userData));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8userData_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_userData) {
  PyObject *__pyx_v__cuserData = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5529, 0, __PYX_ERR(0, 5529, __pyx_L1_error));

  /* "cuda/cuda.pyx":5530
 *     @userData.setter
 *     def userData(self, userData):
 *         _cuserData = utils.HelperInputVoidPtr(userData)             # <<<<<<<<<<<<<<
 *         self._ptr[0].userData = <void*><void_ptr>_cuserData.cptr
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_userData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cuserData = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5531
 *     def userData(self, userData):
 *         _cuserData = utils.HelperInputVoidPtr(userData)
 *         self._ptr[0].userData = <void*><void_ptr>_cuserData.cptr             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cuserData, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).userData = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":5529
 *         return <void_ptr>self._ptr[0].userData
 *     @userData.setter
 *     def userData(self, userData):             # <<<<<<<<<<<<<<
 *         _cuserData = utils.HelperInputVoidPtr(userData)
 *         self._ptr[0].userData = <void*><void_ptr>_cuserData.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.userData.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cuserData);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_10__reduce_cython__[] = "CUDA_HOST_NODE_PARAMS_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__197)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__198, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_12__setstate_cython__[] = "CUDA_HOST_NODE_PARAMS_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__199)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__200, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_HOST_NODE_PARAMS_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5551
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 5551, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5551, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5551, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 5551, 0, __PYX_ERR(0, 5551, __pyx_L1_error));

  /* "cuda/cuda.pyx":5552
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((union CUlaunchAttributeValue_union *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":5551
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5553
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5553, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5553, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5553, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 5553, 0, __PYX_ERR(0, 5553, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5555
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_4getPtr[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__201)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 5555, 0, __PYX_ERR(0, 5555, __pyx_L1_error));

  /* "cuda/cuda.pyx":5556
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5555
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5557
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 5557, 0, __PYX_ERR(0, 5557, __pyx_L1_error));

  /* "cuda/cuda.pyx":5558
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['x : ' + str(self.x)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5559
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['x : ' + str(self.x)]
 *             str_list += ['y : ' + str(self.y)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5560
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['x : ' + str(self.x)]             # <<<<<<<<<<<<<<
 *             str_list += ['y : ' + str(self.y)]
 *             str_list += ['z : ' + str(self.z)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_x_2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5561
 *             str_list = []
 *             str_list += ['x : ' + str(self.x)]
 *             str_list += ['y : ' + str(self.y)]             # <<<<<<<<<<<<<<
 *             str_list += ['z : ' + str(self.z)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_y, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5562
 *             str_list += ['x : ' + str(self.x)]
 *             str_list += ['y : ' + str(self.y)]
 *             str_list += ['z : ' + str(self.z)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_z, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5563
 *             str_list += ['y : ' + str(self.y)]
 *             str_list += ['z : ' + str(self.z)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":5558
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['x : ' + str(self.x)]
 */
  }

  /* "cuda/cuda.pyx":5565
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":5557
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5568
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].clusterDim.x
 *     @x.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1x_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1x_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1x___get__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1x___get__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5568, 0, __PYX_ERR(0, 5568, __pyx_L1_error));

  /* "cuda/cuda.pyx":5569
 *     @property
 *     def x(self):
 *         return self._ptr[0].clusterDim.x             # <<<<<<<<<<<<<<
 *     @x.setter
 *     def x(self, unsigned int x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).clusterDim.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5568
 * 
 *     @property
 *     def x(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].clusterDim.x
 *     @x.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5571
 *         return self._ptr[0].clusterDim.x
 *     @x.setter
 *     def x(self, unsigned int x):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].clusterDim.x = x
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  unsigned int __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_unsigned_int(__pyx_arg_x); if (unlikely((__pyx_v_x == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5571, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.x.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1x_2__set__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_self), ((unsigned int)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1x_2__set__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self, unsigned int __pyx_v_x) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5571, 0, __PYX_ERR(0, 5571, __pyx_L1_error));

  /* "cuda/cuda.pyx":5573
 *     def x(self, unsigned int x):
 *         pass
 *         self._ptr[0].clusterDim.x = x             # <<<<<<<<<<<<<<
 *     @property
 *     def y(self):
 */
  (__pyx_v_self->_ptr[0]).clusterDim.x = __pyx_v_x;

  /* "cuda/cuda.pyx":5571
 *         return self._ptr[0].clusterDim.x
 *     @x.setter
 *     def x(self, unsigned int x):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].clusterDim.x = x
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.x.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5575
 *         self._ptr[0].clusterDim.x = x
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].clusterDim.y
 *     @y.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1y_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1y_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1y___get__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1y___get__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5575, 0, __PYX_ERR(0, 5575, __pyx_L1_error));

  /* "cuda/cuda.pyx":5576
 *     @property
 *     def y(self):
 *         return self._ptr[0].clusterDim.y             # <<<<<<<<<<<<<<
 *     @y.setter
 *     def y(self, unsigned int y):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).clusterDim.y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5575
 *         self._ptr[0].clusterDim.x = x
 *     @property
 *     def y(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].clusterDim.y
 *     @y.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5578
 *         return self._ptr[0].clusterDim.y
 *     @y.setter
 *     def y(self, unsigned int y):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].clusterDim.y = y
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_y); /*proto*/
static int __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_y) {
  unsigned int __pyx_v_y;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_y); {
    __pyx_v_y = __Pyx_PyInt_As_unsigned_int(__pyx_arg_y); if (unlikely((__pyx_v_y == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5578, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.y.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1y_2__set__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_self), ((unsigned int)__pyx_v_y));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1y_2__set__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self, unsigned int __pyx_v_y) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5578, 0, __PYX_ERR(0, 5578, __pyx_L1_error));

  /* "cuda/cuda.pyx":5580
 *     def y(self, unsigned int y):
 *         pass
 *         self._ptr[0].clusterDim.y = y             # <<<<<<<<<<<<<<
 *     @property
 *     def z(self):
 */
  (__pyx_v_self->_ptr[0]).clusterDim.y = __pyx_v_y;

  /* "cuda/cuda.pyx":5578
 *         return self._ptr[0].clusterDim.y
 *     @y.setter
 *     def y(self, unsigned int y):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].clusterDim.y = y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.y.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5582
 *         self._ptr[0].clusterDim.y = y
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].clusterDim.z
 *     @z.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1z_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1z_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1z___get__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1z___get__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5582, 0, __PYX_ERR(0, 5582, __pyx_L1_error));

  /* "cuda/cuda.pyx":5583
 *     @property
 *     def z(self):
 *         return self._ptr[0].clusterDim.z             # <<<<<<<<<<<<<<
 *     @z.setter
 *     def z(self, unsigned int z):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).clusterDim.z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5582
 *         self._ptr[0].clusterDim.y = y
 *     @property
 *     def z(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].clusterDim.z
 *     @z.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.z.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5585
 *         return self._ptr[0].clusterDim.z
 *     @z.setter
 *     def z(self, unsigned int z):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].clusterDim.z = z
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_z); /*proto*/
static int __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1z_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_z) {
  unsigned int __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_z); {
    __pyx_v_z = __Pyx_PyInt_As_unsigned_int(__pyx_arg_z); if (unlikely((__pyx_v_z == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5585, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.z.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1z_2__set__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_self), ((unsigned int)__pyx_v_z));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1z_2__set__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self, unsigned int __pyx_v_z) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5585, 0, __PYX_ERR(0, 5585, __pyx_L1_error));

  /* "cuda/cuda.pyx":5587
 *     def z(self, unsigned int z):
 *         pass
 *         self._ptr[0].clusterDim.z = z             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s:
 */
  (__pyx_v_self->_ptr[0]).clusterDim.z = __pyx_v_z;

  /* "cuda/cuda.pyx":5585
 *         return self._ptr[0].clusterDim.z
 *     @z.setter
 *     def z(self, unsigned int z):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].clusterDim.z = z
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.z.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_8__reduce_cython__[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__202)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__203, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_10__setstate_cython__[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__204)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__205, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5607
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 5607, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5607, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5607, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 5607, 0, __PYX_ERR(0, 5607, __pyx_L1_error));

  /* "cuda/cuda.pyx":5608
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._event = CUevent(_ptr=<void_ptr>&self._ptr[0].programmaticEvent.event)
 */
  __pyx_v_self->_ptr = ((union CUlaunchAttributeValue_union *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":5607
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5609
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._event = CUevent(_ptr=<void_ptr>&self._ptr[0].programmaticEvent.event)
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5609, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5609, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5609, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 5609, 0, __PYX_ERR(0, 5609, __pyx_L1_error));

  /* "cuda/cuda.pyx":5610
 *         self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._event = CUevent(_ptr=<void_ptr>&self._ptr[0].programmaticEvent.event)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).programmaticEvent.event))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 5610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_event);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_event));
  __pyx_v_self->_event = ((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":5609
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._event = CUevent(_ptr=<void_ptr>&self._ptr[0].programmaticEvent.event)
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5611
 *     def __init__(self, void_ptr _ptr):
 *         self._event = CUevent(_ptr=<void_ptr>&self._ptr[0].programmaticEvent.event)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_4getPtr[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__206)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 5611, 0, __PYX_ERR(0, 5611, __pyx_L1_error));

  /* "cuda/cuda.pyx":5612
 *         self._event = CUevent(_ptr=<void_ptr>&self._ptr[0].programmaticEvent.event)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5611
 *     def __init__(self, void_ptr _ptr):
 *         self._event = CUevent(_ptr=<void_ptr>&self._ptr[0].programmaticEvent.event)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5613
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 5613, 0, __PYX_ERR(0, 5613, __pyx_L1_error));

  /* "cuda/cuda.pyx":5614
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['event : ' + str(self.event)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5615
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['event : ' + str(self.event)]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5616
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['event : ' + str(self.event)]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['triggerAtBlockStart : ' + str(self.triggerAtBlockStart)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_event_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_event, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5617
 *             str_list = []
 *             str_list += ['event : ' + str(self.event)]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             str_list += ['triggerAtBlockStart : ' + str(self.triggerAtBlockStart)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5618
 *             str_list += ['event : ' + str(self.event)]
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['triggerAtBlockStart : ' + str(self.triggerAtBlockStart)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_triggerAtBlockStart_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_triggerAtBlockStart, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5619
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['triggerAtBlockStart : ' + str(self.triggerAtBlockStart)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":5614
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['event : ' + str(self.event)]
 */
  }

  /* "cuda/cuda.pyx":5621
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":5613
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5624
 * 
 *     @property
 *     def event(self):             # <<<<<<<<<<<<<<
 *         return self._event
 *     @event.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5event_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5event_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5event___get__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5event___get__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5624, 0, __PYX_ERR(0, 5624, __pyx_L1_error));

  /* "cuda/cuda.pyx":5625
 *     @property
 *     def event(self):
 *         return self._event             # <<<<<<<<<<<<<<
 *     @event.setter
 *     def event(self, event):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_event));
  __pyx_r = ((PyObject *)__pyx_v_self->_event);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5624
 * 
 *     @property
 *     def event(self):             # <<<<<<<<<<<<<<
 *         return self._event
 *     @event.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.event.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5627
 *         return self._event
 *     @event.setter
 *     def event(self, event):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUevent cevent
 *         if event is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5event_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_event); /*proto*/
static int __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5event_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_event) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5event_2__set__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_self), ((PyObject *)__pyx_v_event));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5event_2__set__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self, PyObject *__pyx_v_event) {
  CUevent __pyx_v_cevent;
  PyObject *__pyx_v_pevent = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5627, 0, __PYX_ERR(0, 5627, __pyx_L1_error));

  /* "cuda/cuda.pyx":5629
 *     def event(self, event):
 *         cdef ccuda.CUevent cevent
 *         if event is None:             # <<<<<<<<<<<<<<
 *             cevent = <ccuda.CUevent><void_ptr>0
 *         elif isinstance(event, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_event == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":5630
 *         cdef ccuda.CUevent cevent
 *         if event is None:
 *             cevent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(event, (CUevent)):
 *             pevent = int(event)
 */
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":5629
 *     def event(self, event):
 *         cdef ccuda.CUevent cevent
 *         if event is None:             # <<<<<<<<<<<<<<
 *             cevent = <ccuda.CUevent><void_ptr>0
 *         elif isinstance(event, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5631
 *         if event is None:
 *             cevent = <ccuda.CUevent><void_ptr>0
 *         elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *             pevent = int(event)
 *             cevent = <ccuda.CUevent><void_ptr>pevent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_event, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5632
 *             cevent = <ccuda.CUevent><void_ptr>0
 *         elif isinstance(event, (CUevent)):
 *             pevent = int(event)             # <<<<<<<<<<<<<<
 *             cevent = <ccuda.CUevent><void_ptr>pevent
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pevent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":5633
 *         elif isinstance(event, (CUevent)):
 *             pevent = int(event)
 *             cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 *         else:
 *             pevent = int(CUevent(event))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5633, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":5631
 *         if event is None:
 *             cevent = <ccuda.CUevent><void_ptr>0
 *         elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *             pevent = int(event)
 *             cevent = <ccuda.CUevent><void_ptr>pevent
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5635
 *             cevent = <ccuda.CUevent><void_ptr>pevent
 *         else:
 *             pevent = int(CUevent(event))             # <<<<<<<<<<<<<<
 *             cevent = <ccuda.CUevent><void_ptr>pevent
 *         self._event._ptr[0] = cevent
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pevent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":5636
 *         else:
 *             pevent = int(CUevent(event))
 *             cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 *         self._event._ptr[0] = cevent
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5636, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5637
 *             pevent = int(CUevent(event))
 *             cevent = <ccuda.CUevent><void_ptr>pevent
 *         self._event._ptr[0] = cevent             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
  (__pyx_v_self->_event->_ptr[0]) = __pyx_v_cevent;

  /* "cuda/cuda.pyx":5627
 *         return self._event
 *     @event.setter
 *     def event(self, event):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUevent cevent
 *         if event is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.event.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pevent);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5639
 *         self._event._ptr[0] = cevent
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].programmaticEvent.flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5flags___get__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5flags___get__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5639, 0, __PYX_ERR(0, 5639, __pyx_L1_error));

  /* "cuda/cuda.pyx":5640
 *     @property
 *     def flags(self):
 *         return self._ptr[0].programmaticEvent.flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).programmaticEvent.flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5639
 *         self._event._ptr[0] = cevent
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].programmaticEvent.flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5642
 *         return self._ptr[0].programmaticEvent.flags
 *     @flags.setter
 *     def flags(self, int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].programmaticEvent.flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5642, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_self), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5flags_2__set__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5642, 0, __PYX_ERR(0, 5642, __pyx_L1_error));

  /* "cuda/cuda.pyx":5644
 *     def flags(self, int flags):
 *         pass
 *         self._ptr[0].programmaticEvent.flags = flags             # <<<<<<<<<<<<<<
 *     @property
 *     def triggerAtBlockStart(self):
 */
  (__pyx_v_self->_ptr[0]).programmaticEvent.flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":5642
 *         return self._ptr[0].programmaticEvent.flags
 *     @flags.setter
 *     def flags(self, int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].programmaticEvent.flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5646
 *         self._ptr[0].programmaticEvent.flags = flags
 *     @property
 *     def triggerAtBlockStart(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].programmaticEvent.triggerAtBlockStart
 *     @triggerAtBlockStart.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_19triggerAtBlockStart_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_19triggerAtBlockStart_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_19triggerAtBlockStart___get__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_19triggerAtBlockStart___get__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5646, 0, __PYX_ERR(0, 5646, __pyx_L1_error));

  /* "cuda/cuda.pyx":5647
 *     @property
 *     def triggerAtBlockStart(self):
 *         return self._ptr[0].programmaticEvent.triggerAtBlockStart             # <<<<<<<<<<<<<<
 *     @triggerAtBlockStart.setter
 *     def triggerAtBlockStart(self, int triggerAtBlockStart):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).programmaticEvent.triggerAtBlockStart); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5646
 *         self._ptr[0].programmaticEvent.flags = flags
 *     @property
 *     def triggerAtBlockStart(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].programmaticEvent.triggerAtBlockStart
 *     @triggerAtBlockStart.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.triggerAtBlockStart.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5649
 *         return self._ptr[0].programmaticEvent.triggerAtBlockStart
 *     @triggerAtBlockStart.setter
 *     def triggerAtBlockStart(self, int triggerAtBlockStart):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].programmaticEvent.triggerAtBlockStart = triggerAtBlockStart
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_19triggerAtBlockStart_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_triggerAtBlockStart); /*proto*/
static int __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_19triggerAtBlockStart_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_triggerAtBlockStart) {
  int __pyx_v_triggerAtBlockStart;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_triggerAtBlockStart); {
    __pyx_v_triggerAtBlockStart = __Pyx_PyInt_As_int(__pyx_arg_triggerAtBlockStart); if (unlikely((__pyx_v_triggerAtBlockStart == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5649, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.triggerAtBlockStart.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_19triggerAtBlockStart_2__set__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_self), ((int)__pyx_v_triggerAtBlockStart));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_19triggerAtBlockStart_2__set__(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self, int __pyx_v_triggerAtBlockStart) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5649, 0, __PYX_ERR(0, 5649, __pyx_L1_error));

  /* "cuda/cuda.pyx":5651
 *     def triggerAtBlockStart(self, int triggerAtBlockStart):
 *         pass
 *         self._ptr[0].programmaticEvent.triggerAtBlockStart = triggerAtBlockStart             # <<<<<<<<<<<<<<
 * 
 * cdef class CUlaunchAttributeValue_union:
 */
  (__pyx_v_self->_ptr[0]).programmaticEvent.triggerAtBlockStart = __pyx_v_triggerAtBlockStart;

  /* "cuda/cuda.pyx":5649
 *         return self._ptr[0].programmaticEvent.triggerAtBlockStart
 *     @triggerAtBlockStart.setter
 *     def triggerAtBlockStart(self, int triggerAtBlockStart):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].programmaticEvent.triggerAtBlockStart = triggerAtBlockStart
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.triggerAtBlockStart.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_8__reduce_cython__[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__207)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__208, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_10__setstate_cython__[] = "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__209)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__210, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5683
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 5683, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5683, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5683, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union___cinit__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union___cinit__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 5683, 0, __PYX_ERR(0, 5683, __pyx_L1_error));

  /* "cuda/cuda.pyx":5684
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5685
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":5684
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5687
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._accessPolicyWindow = CUaccessPolicyWindow(_ptr=<void_ptr>&self._ptr[0].accessPolicyWindow)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((union CUlaunchAttributeValue_union *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5683
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5688
 *         else:
 *             self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._accessPolicyWindow = CUaccessPolicyWindow(_ptr=<void_ptr>&self._ptr[0].accessPolicyWindow)
 *         self._clusterDim = _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s(_ptr=<void_ptr>self._ptr)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5688, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5688, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5688, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_2__init__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_2__init__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 5688, 0, __PYX_ERR(0, 5688, __pyx_L1_error));

  /* "cuda/cuda.pyx":5689
 *             self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._accessPolicyWindow = CUaccessPolicyWindow(_ptr=<void_ptr>&self._ptr[0].accessPolicyWindow)             # <<<<<<<<<<<<<<
 *         self._clusterDim = _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s(_ptr=<void_ptr>self._ptr)
 *         self._programmaticEvent = _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s(_ptr=<void_ptr>self._ptr)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).accessPolicyWindow))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 5689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_accessPolicyWindow);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_accessPolicyWindow));
  __pyx_v_self->_accessPolicyWindow = ((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":5690
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._accessPolicyWindow = CUaccessPolicyWindow(_ptr=<void_ptr>&self._ptr[0].accessPolicyWindow)
 *         self._clusterDim = _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *         self._programmaticEvent = _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 5690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_clusterDim);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_clusterDim));
  __pyx_v_self->_clusterDim = ((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5691
 *         self._accessPolicyWindow = CUaccessPolicyWindow(_ptr=<void_ptr>&self._ptr[0].accessPolicyWindow)
 *         self._clusterDim = _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s(_ptr=<void_ptr>self._ptr)
 *         self._programmaticEvent = _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 5691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_programmaticEvent);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_programmaticEvent));
  __pyx_v_self->_programmaticEvent = ((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":5688
 *         else:
 *             self._ptr = <ccuda.CUlaunchAttributeValue_union *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._accessPolicyWindow = CUaccessPolicyWindow(_ptr=<void_ptr>&self._ptr[0].accessPolicyWindow)
 *         self._clusterDim = _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s(_ptr=<void_ptr>self._ptr)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5692
 *         self._clusterDim = _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s(_ptr=<void_ptr>self._ptr)
 *         self._programmaticEvent = _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 5692, 0, __PYX_ERR(0, 5692, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUlaunchAttributeValue_union.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":5694
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_28CUlaunchAttributeValue_union_6getPtr[] = "CUlaunchAttributeValue_union.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_28CUlaunchAttributeValue_union_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_28CUlaunchAttributeValue_union_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_6getPtr(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__211)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 5694, 0, __PYX_ERR(0, 5694, __pyx_L1_error));

  /* "cuda/cuda.pyx":5695
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5694
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5696
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_8__repr__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_8genexpr7__pyx_v_line = NULL;
  PyObject *__pyx_8genexpr8__pyx_v_line = NULL;
  PyObject *__pyx_8genexpr9__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 5696, 0, __PYX_ERR(0, 5696, __pyx_L1_error));

  /* "cuda/cuda.pyx":5697
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['pad : ' + str(self.pad)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5698
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['pad : ' + str(self.pad)]
 *             str_list += ['accessPolicyWindow :\n' + '\n'.join(['    ' + line for line in str(self.accessPolicyWindow).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5699
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['pad : ' + str(self.pad)]             # <<<<<<<<<<<<<<
 *             str_list += ['accessPolicyWindow :\n' + '\n'.join(['    ' + line for line in str(self.accessPolicyWindow).splitlines()])]
 *             str_list += ['cooperative : ' + str(self.cooperative)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pad_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_pad, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5700
 *             str_list = []
 *             str_list += ['pad : ' + str(self.pad)]
 *             str_list += ['accessPolicyWindow :\n' + '\n'.join(['    ' + line for line in str(self.accessPolicyWindow).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['cooperative : ' + str(self.cooperative)]
 *             str_list += ['syncPolicy : ' + str(self.syncPolicy)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5700, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_accessPolicyWindow_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5700, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5700, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5700, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5700, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5700, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_8genexpr7__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5700, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5700, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_line); __pyx_8genexpr7__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_line); __pyx_8genexpr7__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_accessPolicyWindow, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5701
 *             str_list += ['pad : ' + str(self.pad)]
 *             str_list += ['accessPolicyWindow :\n' + '\n'.join(['    ' + line for line in str(self.accessPolicyWindow).splitlines()])]
 *             str_list += ['cooperative : ' + str(self.cooperative)]             # <<<<<<<<<<<<<<
 *             str_list += ['syncPolicy : ' + str(self.syncPolicy)]
 *             str_list += ['clusterDim :\n' + '\n'.join(['    ' + line for line in str(self.clusterDim).splitlines()])]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cooperative_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_cooperative, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5702
 *             str_list += ['accessPolicyWindow :\n' + '\n'.join(['    ' + line for line in str(self.accessPolicyWindow).splitlines()])]
 *             str_list += ['cooperative : ' + str(self.cooperative)]
 *             str_list += ['syncPolicy : ' + str(self.syncPolicy)]             # <<<<<<<<<<<<<<
 *             str_list += ['clusterDim :\n' + '\n'.join(['    ' + line for line in str(self.clusterDim).splitlines()])]
 *             str_list += ['clusterSchedulingPolicyPreference : ' + str(self.clusterSchedulingPolicyPreference)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_syncPolicy_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_syncPolicy, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5703
 *             str_list += ['cooperative : ' + str(self.cooperative)]
 *             str_list += ['syncPolicy : ' + str(self.syncPolicy)]
 *             str_list += ['clusterDim :\n' + '\n'.join(['    ' + line for line in str(self.clusterDim).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['clusterSchedulingPolicyPreference : ' + str(self.clusterSchedulingPolicyPreference)]
 *             str_list += ['programmaticStreamSerializationAllowed : ' + str(self.programmaticStreamSerializationAllowed)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5703, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clusterDim_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5703, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5703, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyUnicode_Splitlines(((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5703, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5703, __pyx_L12_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5703, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_line, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Add(__pyx_kp_u__165, __pyx_8genexpr8__pyx_v_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5703, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 5703, __pyx_L12_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_line); __pyx_8genexpr8__pyx_v_line = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_line); __pyx_8genexpr8__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_clusterDim, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5704
 *             str_list += ['syncPolicy : ' + str(self.syncPolicy)]
 *             str_list += ['clusterDim :\n' + '\n'.join(['    ' + line for line in str(self.clusterDim).splitlines()])]
 *             str_list += ['clusterSchedulingPolicyPreference : ' + str(self.clusterSchedulingPolicyPreference)]             # <<<<<<<<<<<<<<
 *             str_list += ['programmaticStreamSerializationAllowed : ' + str(self.programmaticStreamSerializationAllowed)]
 *             str_list += ['programmaticEvent :\n' + '\n'.join(['    ' + line for line in str(self.programmaticEvent).splitlines()])]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clusterSchedulingPolicyPreferenc_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_clusterSchedulingPolicyPreferenc, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5705
 *             str_list += ['clusterDim :\n' + '\n'.join(['    ' + line for line in str(self.clusterDim).splitlines()])]
 *             str_list += ['clusterSchedulingPolicyPreference : ' + str(self.clusterSchedulingPolicyPreference)]
 *             str_list += ['programmaticStreamSerializationAllowed : ' + str(self.programmaticStreamSerializationAllowed)]             # <<<<<<<<<<<<<<
 *             str_list += ['programmaticEvent :\n' + '\n'.join(['    ' + line for line in str(self.programmaticEvent).splitlines()])]
 *             str_list += ['priority : ' + str(self.priority)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_programmaticStreamSerializationA_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_programmaticStreamSerializationA, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5706
 *             str_list += ['clusterSchedulingPolicyPreference : ' + str(self.clusterSchedulingPolicyPreference)]
 *             str_list += ['programmaticStreamSerializationAllowed : ' + str(self.programmaticStreamSerializationAllowed)]
 *             str_list += ['programmaticEvent :\n' + '\n'.join(['    ' + line for line in str(self.programmaticEvent).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['priority : ' + str(self.priority)]
 *             return '\n'.join(str_list)
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5706, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_programmaticEvent_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5706, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5706, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5706, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5706, __pyx_L18_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5706, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_8genexpr9__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5706, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5706, __pyx_L18_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_line); __pyx_8genexpr9__pyx_v_line = 0;
      goto __pyx_L21_exit_scope;
      __pyx_L18_error:;
      __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_line); __pyx_8genexpr9__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L21_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_programmaticEvent, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5707
 *             str_list += ['programmaticStreamSerializationAllowed : ' + str(self.programmaticStreamSerializationAllowed)]
 *             str_list += ['programmaticEvent :\n' + '\n'.join(['    ' + line for line in str(self.programmaticEvent).splitlines()])]
 *             str_list += ['priority : ' + str(self.priority)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_priority_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_priority, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5708
 *             str_list += ['programmaticEvent :\n' + '\n'.join(['    ' + line for line in str(self.programmaticEvent).splitlines()])]
 *             str_list += ['priority : ' + str(self.priority)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":5697
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['pad : ' + str(self.pad)]
 */
  }

  /* "cuda/cuda.pyx":5710
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 *     @property
 *     def pad(self):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":5696
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_line);
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_line);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5712
 *             return ''
 *     @property
 *     def pad(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(self._ptr[0].pad, 64)
 *     @pad.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3pad_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3pad_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_3pad___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_3pad___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5712, 0, __PYX_ERR(0, 5712, __pyx_L1_error));

  /* "cuda/cuda.pyx":5713
 *     @property
 *     def pad(self):
 *         return PyBytes_FromStringAndSize(self._ptr[0].pad, 64)             # <<<<<<<<<<<<<<
 *     @pad.setter
 *     def pad(self, pad):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyBytes_FromStringAndSize((__pyx_v_self->_ptr[0]).pad, 64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5712
 *             return ''
 *     @property
 *     def pad(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(self._ptr[0].pad, 64)
 *     @pad.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.pad.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5715
 *         return PyBytes_FromStringAndSize(self._ptr[0].pad, 64)
 *     @pad.setter
 *     def pad(self, pad):             # <<<<<<<<<<<<<<
 *         if len(pad) != 64:
 *             raise ValueError("pad length must be 64, is " + str(len(pad)))
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3pad_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pad); /*proto*/
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3pad_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pad) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_3pad_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self), ((PyObject *)__pyx_v_pad));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_3pad_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, PyObject *__pyx_v_pad) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_b = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  char __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5715, 0, __PYX_ERR(0, 5715, __pyx_L1_error));

  /* "cuda/cuda.pyx":5716
 *     @pad.setter
 *     def pad(self, pad):
 *         if len(pad) != 64:             # <<<<<<<<<<<<<<
 *             raise ValueError("pad length must be 64, is " + str(len(pad)))
 *         if CHAR_MIN == 0:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_pad); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5716, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != 64) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":5717
 *     def pad(self, pad):
 *         if len(pad) != 64:
 *             raise ValueError("pad length must be 64, is " + str(len(pad)))             # <<<<<<<<<<<<<<
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(pad):
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_pad); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5717, __pyx_L1_error)
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_pad_length_must_be_64_is, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 5717, __pyx_L1_error)

    /* "cuda/cuda.pyx":5716
 *     @pad.setter
 *     def pad(self, pad):
 *         if len(pad) != 64:             # <<<<<<<<<<<<<<
 *             raise ValueError("pad length must be 64, is " + str(len(pad)))
 *         if CHAR_MIN == 0:
 */
  }

  /* "cuda/cuda.pyx":5718
 *         if len(pad) != 64:
 *             raise ValueError("pad length must be 64, is " + str(len(pad)))
 *         if CHAR_MIN == 0:             # <<<<<<<<<<<<<<
 *             for i, b in enumerate(pad):
 *                 if b < 0 and b > -129:
 */
  __pyx_t_2 = ((CHAR_MIN == 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":5719
 *             raise ValueError("pad length must be 64, is " + str(len(pad)))
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(pad):             # <<<<<<<<<<<<<<
 *                 if b < 0 and b > -129:
 *                     b = b + 256
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_4 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_pad)) || PyTuple_CheckExact(__pyx_v_pad)) {
      __pyx_t_3 = __pyx_v_pad; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_pad); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5719, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5719, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 5719, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5719, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 5719, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5719, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 5719, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5719, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4);
      __pyx_t_4 = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":5720
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(pad):
 *                 if b < 0 and b > -129:             # <<<<<<<<<<<<<<
 *                     b = b + 256
 *                 self._ptr[0].pad[i] = b
 */
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_b, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5720, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5720, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_7) {
      } else {
        __pyx_t_2 = __pyx_t_7;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_b, __pyx_int_neg_129, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5720, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5720, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __pyx_t_7;
      __pyx_L8_bool_binop_done:;
      if (__pyx_t_2) {

        /* "cuda/cuda.pyx":5721
 *             for i, b in enumerate(pad):
 *                 if b < 0 and b > -129:
 *                     b = b + 256             # <<<<<<<<<<<<<<
 *                 self._ptr[0].pad[i] = b
 *         else:
 */
        __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_b, __pyx_int_256, 0x100, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5721, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cuda/cuda.pyx":5720
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(pad):
 *                 if b < 0 and b > -129:             # <<<<<<<<<<<<<<
 *                     b = b + 256
 *                 self._ptr[0].pad[i] = b
 */
      }

      /* "cuda/cuda.pyx":5722
 *                 if b < 0 and b > -129:
 *                     b = b + 256
 *                 self._ptr[0].pad[i] = b             # <<<<<<<<<<<<<<
 *         else:
 *             for i, b in enumerate(pad):
 */
      __pyx_t_8 = __Pyx_PyInt_As_char(__pyx_v_b); if (unlikely((__pyx_t_8 == (char)-1) && PyErr_Occurred())) __PYX_ERR(0, 5722, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 5722, __pyx_L1_error)
      ((__pyx_v_self->_ptr[0]).pad[__pyx_t_9]) = __pyx_t_8;

      /* "cuda/cuda.pyx":5719
 *             raise ValueError("pad length must be 64, is " + str(len(pad)))
 *         if CHAR_MIN == 0:
 *             for i, b in enumerate(pad):             # <<<<<<<<<<<<<<
 *                 if b < 0 and b > -129:
 *                     b = b + 256
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cuda/cuda.pyx":5718
 *         if len(pad) != 64:
 *             raise ValueError("pad length must be 64, is " + str(len(pad)))
 *         if CHAR_MIN == 0:             # <<<<<<<<<<<<<<
 *             for i, b in enumerate(pad):
 *                 if b < 0 and b > -129:
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":5724
 *                 self._ptr[0].pad[i] = b
 *         else:
 *             for i, b in enumerate(pad):             # <<<<<<<<<<<<<<
 *                 if b > 127 and b < 256:
 *                     b = b - 256
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_4 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_pad)) || PyTuple_CheckExact(__pyx_v_pad)) {
      __pyx_t_3 = __pyx_v_pad; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_pad); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5724, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5724, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 5724, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5724, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 5724, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5724, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 5724, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5724, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4);
      __pyx_t_4 = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":5725
 *         else:
 *             for i, b in enumerate(pad):
 *                 if b > 127 and b < 256:             # <<<<<<<<<<<<<<
 *                     b = b - 256
 *                 self._ptr[0].pad[i] = b
 */
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_b, __pyx_int_127, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5725, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5725, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_7) {
      } else {
        __pyx_t_2 = __pyx_t_7;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_b, __pyx_int_256, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5725, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5725, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __pyx_t_7;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_2) {

        /* "cuda/cuda.pyx":5726
 *             for i, b in enumerate(pad):
 *                 if b > 127 and b < 256:
 *                     b = b - 256             # <<<<<<<<<<<<<<
 *                 self._ptr[0].pad[i] = b
 *     @property
 */
        __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_v_b, __pyx_int_256, 0x100, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cuda/cuda.pyx":5725
 *         else:
 *             for i, b in enumerate(pad):
 *                 if b > 127 and b < 256:             # <<<<<<<<<<<<<<
 *                     b = b - 256
 *                 self._ptr[0].pad[i] = b
 */
      }

      /* "cuda/cuda.pyx":5727
 *                 if b > 127 and b < 256:
 *                     b = b - 256
 *                 self._ptr[0].pad[i] = b             # <<<<<<<<<<<<<<
 *     @property
 *     def accessPolicyWindow(self):
 */
      __pyx_t_8 = __Pyx_PyInt_As_char(__pyx_v_b); if (unlikely((__pyx_t_8 == (char)-1) && PyErr_Occurred())) __PYX_ERR(0, 5727, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 5727, __pyx_L1_error)
      ((__pyx_v_self->_ptr[0]).pad[__pyx_t_9]) = __pyx_t_8;

      /* "cuda/cuda.pyx":5724
 *                 self._ptr[0].pad[i] = b
 *         else:
 *             for i, b in enumerate(pad):             # <<<<<<<<<<<<<<
 *                 if b > 127 and b < 256:
 *                     b = b - 256
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":5715
 *         return PyBytes_FromStringAndSize(self._ptr[0].pad, 64)
 *     @pad.setter
 *     def pad(self, pad):             # <<<<<<<<<<<<<<
 *         if len(pad) != 64:
 *             raise ValueError("pad length must be 64, is " + str(len(pad)))
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.pad.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5729
 *                 self._ptr[0].pad[i] = b
 *     @property
 *     def accessPolicyWindow(self):             # <<<<<<<<<<<<<<
 *         return self._accessPolicyWindow
 *     @accessPolicyWindow.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_18accessPolicyWindow_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_18accessPolicyWindow_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_18accessPolicyWindow___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_18accessPolicyWindow___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5729, 0, __PYX_ERR(0, 5729, __pyx_L1_error));

  /* "cuda/cuda.pyx":5730
 *     @property
 *     def accessPolicyWindow(self):
 *         return self._accessPolicyWindow             # <<<<<<<<<<<<<<
 *     @accessPolicyWindow.setter
 *     def accessPolicyWindow(self, accessPolicyWindow not None : CUaccessPolicyWindow):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_accessPolicyWindow));
  __pyx_r = ((PyObject *)__pyx_v_self->_accessPolicyWindow);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5729
 *                 self._ptr[0].pad[i] = b
 *     @property
 *     def accessPolicyWindow(self):             # <<<<<<<<<<<<<<
 *         return self._accessPolicyWindow
 *     @accessPolicyWindow.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.accessPolicyWindow.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5732
 *         return self._accessPolicyWindow
 *     @accessPolicyWindow.setter
 *     def accessPolicyWindow(self, accessPolicyWindow not None : CUaccessPolicyWindow):             # <<<<<<<<<<<<<<
 *         for _attr in dir(accessPolicyWindow):
 *             if _attr == 'getPtr':
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_18accessPolicyWindow_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_accessPolicyWindow); /*proto*/
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_18accessPolicyWindow_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_accessPolicyWindow) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_accessPolicyWindow), __pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow, 0, "accessPolicyWindow", 0))) __PYX_ERR(0, 5732, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_18accessPolicyWindow_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow *)__pyx_v_accessPolicyWindow));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_18accessPolicyWindow_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow *__pyx_v_accessPolicyWindow) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5732, 0, __PYX_ERR(0, 5732, __pyx_L1_error));

  /* "cuda/cuda.pyx":5733
 *     @accessPolicyWindow.setter
 *     def accessPolicyWindow(self, accessPolicyWindow not None : CUaccessPolicyWindow):
 *         for _attr in dir(accessPolicyWindow):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_accessPolicyWindow)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5733, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5733, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5733, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5733, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5733, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 5733, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":5734
 *     def accessPolicyWindow(self, accessPolicyWindow not None : CUaccessPolicyWindow):
 *         for _attr in dir(accessPolicyWindow):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5734, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":5735
 *         for _attr in dir(accessPolicyWindow):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._accessPolicyWindow, _attr, getattr(accessPolicyWindow, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":5734
 *     def accessPolicyWindow(self, accessPolicyWindow not None : CUaccessPolicyWindow):
 *         for _attr in dir(accessPolicyWindow):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":5736
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._accessPolicyWindow, _attr, getattr(accessPolicyWindow, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5736, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":5737
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._accessPolicyWindow, _attr, getattr(accessPolicyWindow, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def cooperative(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_accessPolicyWindow);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_accessPolicyWindow), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 5737, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":5736
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._accessPolicyWindow, _attr, getattr(accessPolicyWindow, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":5733
 *     @accessPolicyWindow.setter
 *     def accessPolicyWindow(self, accessPolicyWindow not None : CUaccessPolicyWindow):
 *         for _attr in dir(accessPolicyWindow):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":5732
 *         return self._accessPolicyWindow
 *     @accessPolicyWindow.setter
 *     def accessPolicyWindow(self, accessPolicyWindow not None : CUaccessPolicyWindow):             # <<<<<<<<<<<<<<
 *         for _attr in dir(accessPolicyWindow):
 *             if _attr == 'getPtr':
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.accessPolicyWindow.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5739
 *                 setattr(self._accessPolicyWindow, _attr, getattr(accessPolicyWindow, _attr))
 *     @property
 *     def cooperative(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].cooperative
 *     @cooperative.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_11cooperative_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_11cooperative_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_11cooperative___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_11cooperative___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5739, 0, __PYX_ERR(0, 5739, __pyx_L1_error));

  /* "cuda/cuda.pyx":5740
 *     @property
 *     def cooperative(self):
 *         return self._ptr[0].cooperative             # <<<<<<<<<<<<<<
 *     @cooperative.setter
 *     def cooperative(self, int cooperative):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).cooperative); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5739
 *                 setattr(self._accessPolicyWindow, _attr, getattr(accessPolicyWindow, _attr))
 *     @property
 *     def cooperative(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].cooperative
 *     @cooperative.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.cooperative.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5742
 *         return self._ptr[0].cooperative
 *     @cooperative.setter
 *     def cooperative(self, int cooperative):             # <<<<<<<<<<<<<<
 *         self._ptr[0].cooperative = cooperative
 *     @property
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_11cooperative_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_cooperative); /*proto*/
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_11cooperative_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_cooperative) {
  int __pyx_v_cooperative;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_cooperative); {
    __pyx_v_cooperative = __Pyx_PyInt_As_int(__pyx_arg_cooperative); if (unlikely((__pyx_v_cooperative == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5742, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.cooperative.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_11cooperative_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self), ((int)__pyx_v_cooperative));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_11cooperative_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, int __pyx_v_cooperative) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5742, 0, __PYX_ERR(0, 5742, __pyx_L1_error));

  /* "cuda/cuda.pyx":5743
 *     @cooperative.setter
 *     def cooperative(self, int cooperative):
 *         self._ptr[0].cooperative = cooperative             # <<<<<<<<<<<<<<
 *     @property
 *     def syncPolicy(self):
 */
  (__pyx_v_self->_ptr[0]).cooperative = __pyx_v_cooperative;

  /* "cuda/cuda.pyx":5742
 *         return self._ptr[0].cooperative
 *     @cooperative.setter
 *     def cooperative(self, int cooperative):             # <<<<<<<<<<<<<<
 *         self._ptr[0].cooperative = cooperative
 *     @property
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.cooperative.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5745
 *         self._ptr[0].cooperative = cooperative
 *     @property
 *     def syncPolicy(self):             # <<<<<<<<<<<<<<
 *         return CUsynchronizationPolicy(self._ptr[0].syncPolicy)
 *     @syncPolicy.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_10syncPolicy_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_10syncPolicy_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10syncPolicy___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10syncPolicy___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5745, 0, __PYX_ERR(0, 5745, __pyx_L1_error));

  /* "cuda/cuda.pyx":5746
 *     @property
 *     def syncPolicy(self):
 *         return CUsynchronizationPolicy(self._ptr[0].syncPolicy)             # <<<<<<<<<<<<<<
 *     @syncPolicy.setter
 *     def syncPolicy(self, syncPolicy not None : CUsynchronizationPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUsynchronizationPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUsynchronizationPolicy_enum((__pyx_v_self->_ptr[0]).syncPolicy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5745
 *         self._ptr[0].cooperative = cooperative
 *     @property
 *     def syncPolicy(self):             # <<<<<<<<<<<<<<
 *         return CUsynchronizationPolicy(self._ptr[0].syncPolicy)
 *     @syncPolicy.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.syncPolicy.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5748
 *         return CUsynchronizationPolicy(self._ptr[0].syncPolicy)
 *     @syncPolicy.setter
 *     def syncPolicy(self, syncPolicy not None : CUsynchronizationPolicy):             # <<<<<<<<<<<<<<
 *         self._ptr[0].syncPolicy = syncPolicy.value
 *     @property
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_10syncPolicy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_syncPolicy); /*proto*/
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_10syncPolicy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_syncPolicy) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_syncPolicy) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "syncPolicy"); __PYX_ERR(0, 5748, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10syncPolicy_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self), ((PyObject *)__pyx_v_syncPolicy));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10syncPolicy_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, PyObject *__pyx_v_syncPolicy) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUsynchronizationPolicy __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5748, 0, __PYX_ERR(0, 5748, __pyx_L1_error));

  /* "cuda/cuda.pyx":5749
 *     @syncPolicy.setter
 *     def syncPolicy(self, syncPolicy not None : CUsynchronizationPolicy):
 *         self._ptr[0].syncPolicy = syncPolicy.value             # <<<<<<<<<<<<<<
 *     @property
 *     def clusterDim(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_syncPolicy, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUsynchronizationPolicy_enum)__Pyx_PyInt_As_enum__CUsynchronizationPolicy_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).syncPolicy = __pyx_t_2;

  /* "cuda/cuda.pyx":5748
 *         return CUsynchronizationPolicy(self._ptr[0].syncPolicy)
 *     @syncPolicy.setter
 *     def syncPolicy(self, syncPolicy not None : CUsynchronizationPolicy):             # <<<<<<<<<<<<<<
 *         self._ptr[0].syncPolicy = syncPolicy.value
 *     @property
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.syncPolicy.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5751
 *         self._ptr[0].syncPolicy = syncPolicy.value
 *     @property
 *     def clusterDim(self):             # <<<<<<<<<<<<<<
 *         return self._clusterDim
 *     @clusterDim.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_10clusterDim_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_10clusterDim_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10clusterDim___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10clusterDim___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5751, 0, __PYX_ERR(0, 5751, __pyx_L1_error));

  /* "cuda/cuda.pyx":5752
 *     @property
 *     def clusterDim(self):
 *         return self._clusterDim             # <<<<<<<<<<<<<<
 *     @clusterDim.setter
 *     def clusterDim(self, clusterDim not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_clusterDim));
  __pyx_r = ((PyObject *)__pyx_v_self->_clusterDim);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5751
 *         self._ptr[0].syncPolicy = syncPolicy.value
 *     @property
 *     def clusterDim(self):             # <<<<<<<<<<<<<<
 *         return self._clusterDim
 *     @clusterDim.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.clusterDim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5754
 *         return self._clusterDim
 *     @clusterDim.setter
 *     def clusterDim(self, clusterDim not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s):             # <<<<<<<<<<<<<<
 *         for _attr in dir(clusterDim):
 *             if _attr == 'getPtr':
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_10clusterDim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_clusterDim); /*proto*/
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_10clusterDim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_clusterDim) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_clusterDim), __pyx_ptype_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s, 0, "clusterDim", 0))) __PYX_ERR(0, 5754, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10clusterDim_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)__pyx_v_clusterDim));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10clusterDim_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *__pyx_v_clusterDim) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5754, 0, __PYX_ERR(0, 5754, __pyx_L1_error));

  /* "cuda/cuda.pyx":5755
 *     @clusterDim.setter
 *     def clusterDim(self, clusterDim not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s):
 *         for _attr in dir(clusterDim):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_clusterDim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5755, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5755, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5755, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5755, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5755, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 5755, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":5756
 *     def clusterDim(self, clusterDim not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s):
 *         for _attr in dir(clusterDim):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5756, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":5757
 *         for _attr in dir(clusterDim):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._clusterDim, _attr, getattr(clusterDim, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":5756
 *     def clusterDim(self, clusterDim not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s):
 *         for _attr in dir(clusterDim):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":5758
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._clusterDim, _attr, getattr(clusterDim, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5758, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":5759
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._clusterDim, _attr, getattr(clusterDim, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def clusterSchedulingPolicyPreference(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_clusterDim);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_clusterDim), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5759, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 5759, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":5758
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._clusterDim, _attr, getattr(clusterDim, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":5755
 *     @clusterDim.setter
 *     def clusterDim(self, clusterDim not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s):
 *         for _attr in dir(clusterDim):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":5754
 *         return self._clusterDim
 *     @clusterDim.setter
 *     def clusterDim(self, clusterDim not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s):             # <<<<<<<<<<<<<<
 *         for _attr in dir(clusterDim):
 *             if _attr == 'getPtr':
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.clusterDim.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5761
 *                 setattr(self._clusterDim, _attr, getattr(clusterDim, _attr))
 *     @property
 *     def clusterSchedulingPolicyPreference(self):             # <<<<<<<<<<<<<<
 *         return CUclusterSchedulingPolicy(self._ptr[0].clusterSchedulingPolicyPreference)
 *     @clusterSchedulingPolicyPreference.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_33clusterSchedulingPolicyPreference_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_33clusterSchedulingPolicyPreference_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_33clusterSchedulingPolicyPreference___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_33clusterSchedulingPolicyPreference___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5761, 0, __PYX_ERR(0, 5761, __pyx_L1_error));

  /* "cuda/cuda.pyx":5762
 *     @property
 *     def clusterSchedulingPolicyPreference(self):
 *         return CUclusterSchedulingPolicy(self._ptr[0].clusterSchedulingPolicyPreference)             # <<<<<<<<<<<<<<
 *     @clusterSchedulingPolicyPreference.setter
 *     def clusterSchedulingPolicyPreference(self, clusterSchedulingPolicyPreference not None : CUclusterSchedulingPolicy):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUclusterSchedulingPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUclusterSchedulingPolicy_enum((__pyx_v_self->_ptr[0]).clusterSchedulingPolicyPreference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5761
 *                 setattr(self._clusterDim, _attr, getattr(clusterDim, _attr))
 *     @property
 *     def clusterSchedulingPolicyPreference(self):             # <<<<<<<<<<<<<<
 *         return CUclusterSchedulingPolicy(self._ptr[0].clusterSchedulingPolicyPreference)
 *     @clusterSchedulingPolicyPreference.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.clusterSchedulingPolicyPreference.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5764
 *         return CUclusterSchedulingPolicy(self._ptr[0].clusterSchedulingPolicyPreference)
 *     @clusterSchedulingPolicyPreference.setter
 *     def clusterSchedulingPolicyPreference(self, clusterSchedulingPolicyPreference not None : CUclusterSchedulingPolicy):             # <<<<<<<<<<<<<<
 *         self._ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value
 *     @property
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_33clusterSchedulingPolicyPreference_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_clusterSchedulingPolicyPreference); /*proto*/
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_33clusterSchedulingPolicyPreference_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_clusterSchedulingPolicyPreference) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_clusterSchedulingPolicyPreference) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "clusterSchedulingPolicyPreference"); __PYX_ERR(0, 5764, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_33clusterSchedulingPolicyPreference_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self), ((PyObject *)__pyx_v_clusterSchedulingPolicyPreference));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_33clusterSchedulingPolicyPreference_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, PyObject *__pyx_v_clusterSchedulingPolicyPreference) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUclusterSchedulingPolicy __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5764, 0, __PYX_ERR(0, 5764, __pyx_L1_error));

  /* "cuda/cuda.pyx":5765
 *     @clusterSchedulingPolicyPreference.setter
 *     def clusterSchedulingPolicyPreference(self, clusterSchedulingPolicyPreference not None : CUclusterSchedulingPolicy):
 *         self._ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value             # <<<<<<<<<<<<<<
 *     @property
 *     def programmaticStreamSerializationAllowed(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_clusterSchedulingPolicyPreference, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUclusterSchedulingPolicy_enum)__Pyx_PyInt_As_enum__CUclusterSchedulingPolicy_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5765, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).clusterSchedulingPolicyPreference = __pyx_t_2;

  /* "cuda/cuda.pyx":5764
 *         return CUclusterSchedulingPolicy(self._ptr[0].clusterSchedulingPolicyPreference)
 *     @clusterSchedulingPolicyPreference.setter
 *     def clusterSchedulingPolicyPreference(self, clusterSchedulingPolicyPreference not None : CUclusterSchedulingPolicy):             # <<<<<<<<<<<<<<
 *         self._ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value
 *     @property
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.clusterSchedulingPolicyPreference.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5767
 *         self._ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value
 *     @property
 *     def programmaticStreamSerializationAllowed(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].programmaticStreamSerializationAllowed
 *     @programmaticStreamSerializationAllowed.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_38programmaticStreamSerializationAllowed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_38programmaticStreamSerializationAllowed_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_38programmaticStreamSerializationAllowed___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_38programmaticStreamSerializationAllowed___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5767, 0, __PYX_ERR(0, 5767, __pyx_L1_error));

  /* "cuda/cuda.pyx":5768
 *     @property
 *     def programmaticStreamSerializationAllowed(self):
 *         return self._ptr[0].programmaticStreamSerializationAllowed             # <<<<<<<<<<<<<<
 *     @programmaticStreamSerializationAllowed.setter
 *     def programmaticStreamSerializationAllowed(self, int programmaticStreamSerializationAllowed):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).programmaticStreamSerializationAllowed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5767
 *         self._ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value
 *     @property
 *     def programmaticStreamSerializationAllowed(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].programmaticStreamSerializationAllowed
 *     @programmaticStreamSerializationAllowed.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5770
 *         return self._ptr[0].programmaticStreamSerializationAllowed
 *     @programmaticStreamSerializationAllowed.setter
 *     def programmaticStreamSerializationAllowed(self, int programmaticStreamSerializationAllowed):             # <<<<<<<<<<<<<<
 *         self._ptr[0].programmaticStreamSerializationAllowed = programmaticStreamSerializationAllowed
 *     @property
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_38programmaticStreamSerializationAllowed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_programmaticStreamSerializationAllowed); /*proto*/
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_38programmaticStreamSerializationAllowed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_programmaticStreamSerializationAllowed) {
  int __pyx_v_programmaticStreamSerializationAllowed;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_programmaticStreamSerializationAllowed); {
    __pyx_v_programmaticStreamSerializationAllowed = __Pyx_PyInt_As_int(__pyx_arg_programmaticStreamSerializationAllowed); if (unlikely((__pyx_v_programmaticStreamSerializationAllowed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5770, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_38programmaticStreamSerializationAllowed_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self), ((int)__pyx_v_programmaticStreamSerializationAllowed));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_38programmaticStreamSerializationAllowed_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, int __pyx_v_programmaticStreamSerializationAllowed) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5770, 0, __PYX_ERR(0, 5770, __pyx_L1_error));

  /* "cuda/cuda.pyx":5771
 *     @programmaticStreamSerializationAllowed.setter
 *     def programmaticStreamSerializationAllowed(self, int programmaticStreamSerializationAllowed):
 *         self._ptr[0].programmaticStreamSerializationAllowed = programmaticStreamSerializationAllowed             # <<<<<<<<<<<<<<
 *     @property
 *     def programmaticEvent(self):
 */
  (__pyx_v_self->_ptr[0]).programmaticStreamSerializationAllowed = __pyx_v_programmaticStreamSerializationAllowed;

  /* "cuda/cuda.pyx":5770
 *         return self._ptr[0].programmaticStreamSerializationAllowed
 *     @programmaticStreamSerializationAllowed.setter
 *     def programmaticStreamSerializationAllowed(self, int programmaticStreamSerializationAllowed):             # <<<<<<<<<<<<<<
 *         self._ptr[0].programmaticStreamSerializationAllowed = programmaticStreamSerializationAllowed
 *     @property
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5773
 *         self._ptr[0].programmaticStreamSerializationAllowed = programmaticStreamSerializationAllowed
 *     @property
 *     def programmaticEvent(self):             # <<<<<<<<<<<<<<
 *         return self._programmaticEvent
 *     @programmaticEvent.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_17programmaticEvent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_17programmaticEvent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_17programmaticEvent___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_17programmaticEvent___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5773, 0, __PYX_ERR(0, 5773, __pyx_L1_error));

  /* "cuda/cuda.pyx":5774
 *     @property
 *     def programmaticEvent(self):
 *         return self._programmaticEvent             # <<<<<<<<<<<<<<
 *     @programmaticEvent.setter
 *     def programmaticEvent(self, programmaticEvent not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_programmaticEvent));
  __pyx_r = ((PyObject *)__pyx_v_self->_programmaticEvent);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5773
 *         self._ptr[0].programmaticStreamSerializationAllowed = programmaticStreamSerializationAllowed
 *     @property
 *     def programmaticEvent(self):             # <<<<<<<<<<<<<<
 *         return self._programmaticEvent
 *     @programmaticEvent.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.programmaticEvent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5776
 *         return self._programmaticEvent
 *     @programmaticEvent.setter
 *     def programmaticEvent(self, programmaticEvent not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s):             # <<<<<<<<<<<<<<
 *         for _attr in dir(programmaticEvent):
 *             if _attr == 'getPtr':
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_17programmaticEvent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_programmaticEvent); /*proto*/
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_17programmaticEvent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_programmaticEvent) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_programmaticEvent), __pyx_ptype_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s, 0, "programmaticEvent", 0))) __PYX_ERR(0, 5776, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_17programmaticEvent_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)__pyx_v_programmaticEvent));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_17programmaticEvent_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *__pyx_v_programmaticEvent) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5776, 0, __PYX_ERR(0, 5776, __pyx_L1_error));

  /* "cuda/cuda.pyx":5777
 *     @programmaticEvent.setter
 *     def programmaticEvent(self, programmaticEvent not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s):
 *         for _attr in dir(programmaticEvent):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_programmaticEvent)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5777, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5777, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5777, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5777, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5777, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 5777, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":5778
 *     def programmaticEvent(self, programmaticEvent not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s):
 *         for _attr in dir(programmaticEvent):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5778, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":5779
 *         for _attr in dir(programmaticEvent):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._programmaticEvent, _attr, getattr(programmaticEvent, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":5778
 *     def programmaticEvent(self, programmaticEvent not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s):
 *         for _attr in dir(programmaticEvent):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":5780
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._programmaticEvent, _attr, getattr(programmaticEvent, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5780, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":5781
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._programmaticEvent, _attr, getattr(programmaticEvent, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def priority(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_programmaticEvent);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_programmaticEvent), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 5781, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":5780
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._programmaticEvent, _attr, getattr(programmaticEvent, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":5777
 *     @programmaticEvent.setter
 *     def programmaticEvent(self, programmaticEvent not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s):
 *         for _attr in dir(programmaticEvent):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":5776
 *         return self._programmaticEvent
 *     @programmaticEvent.setter
 *     def programmaticEvent(self, programmaticEvent not None : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s):             # <<<<<<<<<<<<<<
 *         for _attr in dir(programmaticEvent):
 *             if _attr == 'getPtr':
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.programmaticEvent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5783
 *                 setattr(self._programmaticEvent, _attr, getattr(programmaticEvent, _attr))
 *     @property
 *     def priority(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].priority
 *     @priority.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_8priority_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_8priority___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_8priority___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5783, 0, __PYX_ERR(0, 5783, __pyx_L1_error));

  /* "cuda/cuda.pyx":5784
 *     @property
 *     def priority(self):
 *         return self._ptr[0].priority             # <<<<<<<<<<<<<<
 *     @priority.setter
 *     def priority(self, int priority):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).priority); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5783
 *                 setattr(self._programmaticEvent, _attr, getattr(programmaticEvent, _attr))
 *     @property
 *     def priority(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].priority
 *     @priority.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5786
 *         return self._ptr[0].priority
 *     @priority.setter
 *     def priority(self, int priority):             # <<<<<<<<<<<<<<
 *         self._ptr[0].priority = priority
 * 
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
static int __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
  int __pyx_v_priority;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_priority); {
    __pyx_v_priority = __Pyx_PyInt_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5786, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_8priority_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self), ((int)__pyx_v_priority));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_8priority_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, int __pyx_v_priority) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5786, 0, __PYX_ERR(0, 5786, __pyx_L1_error));

  /* "cuda/cuda.pyx":5787
 *     @priority.setter
 *     def priority(self, int priority):
 *         self._ptr[0].priority = priority             # <<<<<<<<<<<<<<
 * 
 * cdef class CUlaunchAttribute_st:
 */
  (__pyx_v_self->_ptr[0]).priority = __pyx_v_priority;

  /* "cuda/cuda.pyx":5786
 *         return self._ptr[0].priority
 *     @priority.setter
 *     def priority(self, int priority):             # <<<<<<<<<<<<<<
 *         self._ptr[0].priority = priority
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_28CUlaunchAttributeValue_union_10__reduce_cython__[] = "CUlaunchAttributeValue_union.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_28CUlaunchAttributeValue_union_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_28CUlaunchAttributeValue_union_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__212)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__213, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_28CUlaunchAttributeValue_union_12__setstate_cython__[] = "CUlaunchAttributeValue_union.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_28CUlaunchAttributeValue_union_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_28CUlaunchAttributeValue_union_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUlaunchAttributeValue_union_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__214)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__215, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttributeValue_union.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5805
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 5805, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5805, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5805, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttribute_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 5805, 0, __PYX_ERR(0, 5805, __pyx_L1_error));

  /* "cuda/cuda.pyx":5806
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5807
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUlaunchAttribute_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":5806
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5809
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUlaunchAttribute_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._value = CUlaunchAttributeValue(_ptr=<void_ptr>&self._ptr[0].value)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUlaunchAttribute_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5805
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttribute_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5810
 *         else:
 *             self._ptr = <ccuda.CUlaunchAttribute_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._value = CUlaunchAttributeValue(_ptr=<void_ptr>&self._ptr[0].value)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5810, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5810, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5810, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttribute_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 5810, 0, __PYX_ERR(0, 5810, __pyx_L1_error));

  /* "cuda/cuda.pyx":5811
 *             self._ptr = <ccuda.CUlaunchAttribute_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._value = CUlaunchAttributeValue(_ptr=<void_ptr>&self._ptr[0].value)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).value))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 5811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_value);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_value));
  __pyx_v_self->_value = ((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":5810
 *         else:
 *             self._ptr = <ccuda.CUlaunchAttribute_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._value = CUlaunchAttributeValue(_ptr=<void_ptr>&self._ptr[0].value)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttribute_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5812
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._value = CUlaunchAttributeValue(_ptr=<void_ptr>&self._ptr[0].value)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 5812, 0, __PYX_ERR(0, 5812, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUlaunchAttribute_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":5814
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_20CUlaunchAttribute_st_6getPtr[] = "CUlaunchAttribute_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_20CUlaunchAttribute_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_20CUlaunchAttribute_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__216)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 5814, 0, __PYX_ERR(0, 5814, __pyx_L1_error));

  /* "cuda/cuda.pyx":5815
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5814
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttribute_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5816
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr10__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 5816, 0, __PYX_ERR(0, 5816, __pyx_L1_error));

  /* "cuda/cuda.pyx":5817
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['id : ' + str(self.id)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5818
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['id : ' + str(self.id)]
 *             str_list += ['value :\n' + '\n'.join(['    ' + line for line in str(self.value).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5819
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['id : ' + str(self.id)]             # <<<<<<<<<<<<<<
 *             str_list += ['value :\n' + '\n'.join(['    ' + line for line in str(self.value).splitlines()])]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_id, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5820
 *             str_list = []
 *             str_list += ['id : ' + str(self.id)]
 *             str_list += ['value :\n' + '\n'.join(['    ' + line for line in str(self.value).splitlines()])]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5820, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5820, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5820, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5820, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5820, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5820, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr10__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5820, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5820, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_line); __pyx_9genexpr10__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_line); __pyx_9genexpr10__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_value_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5821
 *             str_list += ['id : ' + str(self.id)]
 *             str_list += ['value :\n' + '\n'.join(['    ' + line for line in str(self.value).splitlines()])]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":5817
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['id : ' + str(self.id)]
 */
  }

  /* "cuda/cuda.pyx":5823
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":5816
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttribute_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5826
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return CUlaunchAttributeID(self._ptr[0].id)
 *     @id.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_2id___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_2id___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5826, 0, __PYX_ERR(0, 5826, __pyx_L1_error));

  /* "cuda/cuda.pyx":5827
 *     @property
 *     def id(self):
 *         return CUlaunchAttributeID(self._ptr[0].id)             # <<<<<<<<<<<<<<
 *     @id.setter
 *     def id(self, id not None : CUlaunchAttributeID):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUlaunchAttributeID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum((__pyx_v_self->_ptr[0]).id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5826
 * 
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return CUlaunchAttributeID(self._ptr[0].id)
 *     @id.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttribute_st.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5829
 *         return CUlaunchAttributeID(self._ptr[0].id)
 *     @id.setter
 *     def id(self, id not None : CUlaunchAttributeID):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].id = id.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_id); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_id) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_id) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "id"); __PYX_ERR(0, 5829, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_2id_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)__pyx_v_self), ((PyObject *)__pyx_v_id));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_2id_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self, PyObject *__pyx_v_id) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUlaunchAttributeID __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5829, 0, __PYX_ERR(0, 5829, __pyx_L1_error));

  /* "cuda/cuda.pyx":5831
 *     def id(self, id not None : CUlaunchAttributeID):
 *         pass
 *         self._ptr[0].id = id.value             # <<<<<<<<<<<<<<
 *     @property
 *     def value(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_id, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUlaunchAttributeID_enum)__Pyx_PyInt_As_enum__CUlaunchAttributeID_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5831, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).id = __pyx_t_2;

  /* "cuda/cuda.pyx":5829
 *         return CUlaunchAttributeID(self._ptr[0].id)
 *     @id.setter
 *     def id(self, id not None : CUlaunchAttributeID):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].id = id.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttribute_st.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5833
 *         self._ptr[0].id = id.value
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 *     @value.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_5value_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_5value___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_5value___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5833, 0, __PYX_ERR(0, 5833, __pyx_L1_error));

  /* "cuda/cuda.pyx":5834
 *     @property
 *     def value(self):
 *         return self._value             # <<<<<<<<<<<<<<
 *     @value.setter
 *     def value(self, value not None : CUlaunchAttributeValue):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_value));
  __pyx_r = ((PyObject *)__pyx_v_self->_value);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5833
 *         self._ptr[0].id = id.value
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._value
 *     @value.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttribute_st.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5836
 *         return self._value
 *     @value.setter
 *     def value(self, value not None : CUlaunchAttributeValue):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(value):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue, 0, "value", 0))) __PYX_ERR(0, 5836, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_5value_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_5value_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue *__pyx_v_value) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5836, 0, __PYX_ERR(0, 5836, __pyx_L1_error));

  /* "cuda/cuda.pyx":5838
 *     def value(self, value not None : CUlaunchAttributeValue):
 *         pass
 *         for _attr in dir(value):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_value)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5838, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5838, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5838, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 5838, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5838, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 5838, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":5839
 *         pass
 *         for _attr in dir(value):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5839, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":5840
 *         for _attr in dir(value):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._value, _attr, getattr(value, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":5839
 *         pass
 *         for _attr in dir(value):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":5841
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._value, _attr, getattr(value, _attr))
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5841, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":5842
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._value, _attr, getattr(value, _attr))             # <<<<<<<<<<<<<<
 * 
 * cdef class CUlaunchConfig_st:
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_value);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_value), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 5842, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":5841
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._value, _attr, getattr(value, _attr))
 * 
 */
    }

    /* "cuda/cuda.pyx":5838
 *     def value(self, value not None : CUlaunchAttributeValue):
 *         pass
 *         for _attr in dir(value):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":5836
 *         return self._value
 *     @value.setter
 *     def value(self, value not None : CUlaunchAttributeValue):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(value):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttribute_st.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_20CUlaunchAttribute_st_10__reduce_cython__[] = "CUlaunchAttribute_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_20CUlaunchAttribute_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_20CUlaunchAttribute_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__217)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__218, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttribute_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_20CUlaunchAttribute_st_12__setstate_cython__[] = "CUlaunchAttribute_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_20CUlaunchAttribute_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_20CUlaunchAttribute_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUlaunchAttribute_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__219)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__220, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchAttribute_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5876
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 5876, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5876, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5876, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 5876, 0, __PYX_ERR(0, 5876, __pyx_L1_error));

  /* "cuda/cuda.pyx":5877
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5878
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUlaunchConfig_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":5877
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5880
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUlaunchConfig_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUlaunchConfig_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5876
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5881
 *         else:
 *             self._ptr = <ccuda.CUlaunchConfig_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5881, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5881, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5881, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 5881, 0, __PYX_ERR(0, 5881, __pyx_L1_error));

  /* "cuda/cuda.pyx":5882
 *             self._ptr = <ccuda.CUlaunchConfig_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         if self._attrs is not NULL:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).hStream))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 5882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_hStream);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_hStream));
  __pyx_v_self->_hStream = ((struct __pyx_obj_4cuda_4cuda_CUstream *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":5881
 *         else:
 *             self._ptr = <ccuda.CUlaunchConfig_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5883
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._attrs is not NULL:
 *             free(self._attrs)
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_4__dealloc__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 5883, 0, __PYX_ERR(0, 5883, __pyx_L1_error));

  /* "cuda/cuda.pyx":5884
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)
 *     def __dealloc__(self):
 *         if self._attrs is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._attrs)
 *     def getPtr(self):
 */
  __pyx_t_1 = ((__pyx_v_self->_attrs != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5885
 *     def __dealloc__(self):
 *         if self._attrs is not NULL:
 *             free(self._attrs)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
    free(__pyx_v_self->_attrs);

    /* "cuda/cuda.pyx":5884
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)
 *     def __dealloc__(self):
 *         if self._attrs is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._attrs)
 *     def getPtr(self):
 */
  }

  /* "cuda/cuda.pyx":5883
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._attrs is not NULL:
 *             free(self._attrs)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUlaunchConfig_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":5886
 *         if self._attrs is not NULL:
 *             free(self._attrs)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_17CUlaunchConfig_st_6getPtr[] = "CUlaunchConfig_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17CUlaunchConfig_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUlaunchConfig_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__221)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 5886, 0, __PYX_ERR(0, 5886, __pyx_L1_error));

  /* "cuda/cuda.pyx":5887
 *             free(self._attrs)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5886
 *         if self._attrs is not NULL:
 *             free(self._attrs)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5888
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 5888, 0, __PYX_ERR(0, 5888, __pyx_L1_error));

  /* "cuda/cuda.pyx":5889
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5890
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5891
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]             # <<<<<<<<<<<<<<
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gridDimX_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_gridDimX, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5892
 *             str_list = []
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]             # <<<<<<<<<<<<<<
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gridDimY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_gridDimY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5893
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]             # <<<<<<<<<<<<<<
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gridDimZ_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_gridDimZ, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5894
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]             # <<<<<<<<<<<<<<
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_blockDimX_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_blockDimX, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5895
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]             # <<<<<<<<<<<<<<
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_blockDimY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_blockDimY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5896
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]             # <<<<<<<<<<<<<<
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]
 *             str_list += ['hStream : ' + str(self.hStream)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_blockDimZ_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_blockDimZ, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5897
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['hStream : ' + str(self.hStream)]
 *             str_list += ['attrs : ' + str(self.attrs)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sharedMemBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_sharedMemBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5898
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]
 *             str_list += ['hStream : ' + str(self.hStream)]             # <<<<<<<<<<<<<<
 *             str_list += ['attrs : ' + str(self.attrs)]
 *             str_list += ['numAttrs : ' + str(self.numAttrs)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hStream_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_hStream, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5899
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]
 *             str_list += ['hStream : ' + str(self.hStream)]
 *             str_list += ['attrs : ' + str(self.attrs)]             # <<<<<<<<<<<<<<
 *             str_list += ['numAttrs : ' + str(self.numAttrs)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attrs_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_attrs, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5900
 *             str_list += ['hStream : ' + str(self.hStream)]
 *             str_list += ['attrs : ' + str(self.attrs)]
 *             str_list += ['numAttrs : ' + str(self.numAttrs)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_numAttrs_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_numAttrs, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":5901
 *             str_list += ['attrs : ' + str(self.attrs)]
 *             str_list += ['numAttrs : ' + str(self.numAttrs)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":5889
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 */
  }

  /* "cuda/cuda.pyx":5903
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":5888
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5906
 * 
 *     @property
 *     def gridDimX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimX
 *     @gridDimX.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimX_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimX_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimX___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimX___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5906, 0, __PYX_ERR(0, 5906, __pyx_L1_error));

  /* "cuda/cuda.pyx":5907
 *     @property
 *     def gridDimX(self):
 *         return self._ptr[0].gridDimX             # <<<<<<<<<<<<<<
 *     @gridDimX.setter
 *     def gridDimX(self, unsigned int gridDimX):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).gridDimX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5906
 * 
 *     @property
 *     def gridDimX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimX
 *     @gridDimX.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.gridDimX.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5909
 *         return self._ptr[0].gridDimX
 *     @gridDimX.setter
 *     def gridDimX(self, unsigned int gridDimX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimX = gridDimX
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimX); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimX) {
  unsigned int __pyx_v_gridDimX;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_gridDimX); {
    __pyx_v_gridDimX = __Pyx_PyInt_As_unsigned_int(__pyx_arg_gridDimX); if (unlikely((__pyx_v_gridDimX == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5909, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.gridDimX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimX_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), ((unsigned int)__pyx_v_gridDimX));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimX_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_gridDimX) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5909, 0, __PYX_ERR(0, 5909, __pyx_L1_error));

  /* "cuda/cuda.pyx":5911
 *     def gridDimX(self, unsigned int gridDimX):
 *         pass
 *         self._ptr[0].gridDimX = gridDimX             # <<<<<<<<<<<<<<
 *     @property
 *     def gridDimY(self):
 */
  (__pyx_v_self->_ptr[0]).gridDimX = __pyx_v_gridDimX;

  /* "cuda/cuda.pyx":5909
 *         return self._ptr[0].gridDimX
 *     @gridDimX.setter
 *     def gridDimX(self, unsigned int gridDimX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimX = gridDimX
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.gridDimX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5913
 *         self._ptr[0].gridDimX = gridDimX
 *     @property
 *     def gridDimY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimY
 *     @gridDimY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimY___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimY___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5913, 0, __PYX_ERR(0, 5913, __pyx_L1_error));

  /* "cuda/cuda.pyx":5914
 *     @property
 *     def gridDimY(self):
 *         return self._ptr[0].gridDimY             # <<<<<<<<<<<<<<
 *     @gridDimY.setter
 *     def gridDimY(self, unsigned int gridDimY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).gridDimY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5913
 *         self._ptr[0].gridDimX = gridDimX
 *     @property
 *     def gridDimY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimY
 *     @gridDimY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.gridDimY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5916
 *         return self._ptr[0].gridDimY
 *     @gridDimY.setter
 *     def gridDimY(self, unsigned int gridDimY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimY = gridDimY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimY); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimY) {
  unsigned int __pyx_v_gridDimY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_gridDimY); {
    __pyx_v_gridDimY = __Pyx_PyInt_As_unsigned_int(__pyx_arg_gridDimY); if (unlikely((__pyx_v_gridDimY == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5916, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.gridDimY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimY_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), ((unsigned int)__pyx_v_gridDimY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimY_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_gridDimY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5916, 0, __PYX_ERR(0, 5916, __pyx_L1_error));

  /* "cuda/cuda.pyx":5918
 *     def gridDimY(self, unsigned int gridDimY):
 *         pass
 *         self._ptr[0].gridDimY = gridDimY             # <<<<<<<<<<<<<<
 *     @property
 *     def gridDimZ(self):
 */
  (__pyx_v_self->_ptr[0]).gridDimY = __pyx_v_gridDimY;

  /* "cuda/cuda.pyx":5916
 *         return self._ptr[0].gridDimY
 *     @gridDimY.setter
 *     def gridDimY(self, unsigned int gridDimY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimY = gridDimY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.gridDimY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5920
 *         self._ptr[0].gridDimY = gridDimY
 *     @property
 *     def gridDimZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimZ
 *     @gridDimZ.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimZ___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimZ___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5920, 0, __PYX_ERR(0, 5920, __pyx_L1_error));

  /* "cuda/cuda.pyx":5921
 *     @property
 *     def gridDimZ(self):
 *         return self._ptr[0].gridDimZ             # <<<<<<<<<<<<<<
 *     @gridDimZ.setter
 *     def gridDimZ(self, unsigned int gridDimZ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).gridDimZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5920
 *         self._ptr[0].gridDimY = gridDimY
 *     @property
 *     def gridDimZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimZ
 *     @gridDimZ.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.gridDimZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5923
 *         return self._ptr[0].gridDimZ
 *     @gridDimZ.setter
 *     def gridDimZ(self, unsigned int gridDimZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimZ = gridDimZ
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimZ); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimZ) {
  unsigned int __pyx_v_gridDimZ;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_gridDimZ); {
    __pyx_v_gridDimZ = __Pyx_PyInt_As_unsigned_int(__pyx_arg_gridDimZ); if (unlikely((__pyx_v_gridDimZ == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5923, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.gridDimZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimZ_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), ((unsigned int)__pyx_v_gridDimZ));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8gridDimZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_gridDimZ) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5923, 0, __PYX_ERR(0, 5923, __pyx_L1_error));

  /* "cuda/cuda.pyx":5925
 *     def gridDimZ(self, unsigned int gridDimZ):
 *         pass
 *         self._ptr[0].gridDimZ = gridDimZ             # <<<<<<<<<<<<<<
 *     @property
 *     def blockDimX(self):
 */
  (__pyx_v_self->_ptr[0]).gridDimZ = __pyx_v_gridDimZ;

  /* "cuda/cuda.pyx":5923
 *         return self._ptr[0].gridDimZ
 *     @gridDimZ.setter
 *     def gridDimZ(self, unsigned int gridDimZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimZ = gridDimZ
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.gridDimZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5927
 *         self._ptr[0].gridDimZ = gridDimZ
 *     @property
 *     def blockDimX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimX
 *     @blockDimX.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimX_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimX_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimX___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimX___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5927, 0, __PYX_ERR(0, 5927, __pyx_L1_error));

  /* "cuda/cuda.pyx":5928
 *     @property
 *     def blockDimX(self):
 *         return self._ptr[0].blockDimX             # <<<<<<<<<<<<<<
 *     @blockDimX.setter
 *     def blockDimX(self, unsigned int blockDimX):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).blockDimX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5927
 *         self._ptr[0].gridDimZ = gridDimZ
 *     @property
 *     def blockDimX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimX
 *     @blockDimX.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.blockDimX.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5930
 *         return self._ptr[0].blockDimX
 *     @blockDimX.setter
 *     def blockDimX(self, unsigned int blockDimX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimX = blockDimX
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimX); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimX) {
  unsigned int __pyx_v_blockDimX;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_blockDimX); {
    __pyx_v_blockDimX = __Pyx_PyInt_As_unsigned_int(__pyx_arg_blockDimX); if (unlikely((__pyx_v_blockDimX == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5930, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.blockDimX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimX_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), ((unsigned int)__pyx_v_blockDimX));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimX_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_blockDimX) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5930, 0, __PYX_ERR(0, 5930, __pyx_L1_error));

  /* "cuda/cuda.pyx":5932
 *     def blockDimX(self, unsigned int blockDimX):
 *         pass
 *         self._ptr[0].blockDimX = blockDimX             # <<<<<<<<<<<<<<
 *     @property
 *     def blockDimY(self):
 */
  (__pyx_v_self->_ptr[0]).blockDimX = __pyx_v_blockDimX;

  /* "cuda/cuda.pyx":5930
 *         return self._ptr[0].blockDimX
 *     @blockDimX.setter
 *     def blockDimX(self, unsigned int blockDimX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimX = blockDimX
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.blockDimX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5934
 *         self._ptr[0].blockDimX = blockDimX
 *     @property
 *     def blockDimY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimY
 *     @blockDimY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimY___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimY___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5934, 0, __PYX_ERR(0, 5934, __pyx_L1_error));

  /* "cuda/cuda.pyx":5935
 *     @property
 *     def blockDimY(self):
 *         return self._ptr[0].blockDimY             # <<<<<<<<<<<<<<
 *     @blockDimY.setter
 *     def blockDimY(self, unsigned int blockDimY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).blockDimY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5934
 *         self._ptr[0].blockDimX = blockDimX
 *     @property
 *     def blockDimY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimY
 *     @blockDimY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.blockDimY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5937
 *         return self._ptr[0].blockDimY
 *     @blockDimY.setter
 *     def blockDimY(self, unsigned int blockDimY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimY = blockDimY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimY); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimY) {
  unsigned int __pyx_v_blockDimY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_blockDimY); {
    __pyx_v_blockDimY = __Pyx_PyInt_As_unsigned_int(__pyx_arg_blockDimY); if (unlikely((__pyx_v_blockDimY == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5937, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.blockDimY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimY_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), ((unsigned int)__pyx_v_blockDimY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimY_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_blockDimY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5937, 0, __PYX_ERR(0, 5937, __pyx_L1_error));

  /* "cuda/cuda.pyx":5939
 *     def blockDimY(self, unsigned int blockDimY):
 *         pass
 *         self._ptr[0].blockDimY = blockDimY             # <<<<<<<<<<<<<<
 *     @property
 *     def blockDimZ(self):
 */
  (__pyx_v_self->_ptr[0]).blockDimY = __pyx_v_blockDimY;

  /* "cuda/cuda.pyx":5937
 *         return self._ptr[0].blockDimY
 *     @blockDimY.setter
 *     def blockDimY(self, unsigned int blockDimY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimY = blockDimY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.blockDimY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5941
 *         self._ptr[0].blockDimY = blockDimY
 *     @property
 *     def blockDimZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimZ
 *     @blockDimZ.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimZ___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimZ___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5941, 0, __PYX_ERR(0, 5941, __pyx_L1_error));

  /* "cuda/cuda.pyx":5942
 *     @property
 *     def blockDimZ(self):
 *         return self._ptr[0].blockDimZ             # <<<<<<<<<<<<<<
 *     @blockDimZ.setter
 *     def blockDimZ(self, unsigned int blockDimZ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).blockDimZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5941
 *         self._ptr[0].blockDimY = blockDimY
 *     @property
 *     def blockDimZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimZ
 *     @blockDimZ.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.blockDimZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5944
 *         return self._ptr[0].blockDimZ
 *     @blockDimZ.setter
 *     def blockDimZ(self, unsigned int blockDimZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimZ = blockDimZ
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimZ); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimZ) {
  unsigned int __pyx_v_blockDimZ;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_blockDimZ); {
    __pyx_v_blockDimZ = __Pyx_PyInt_As_unsigned_int(__pyx_arg_blockDimZ); if (unlikely((__pyx_v_blockDimZ == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5944, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.blockDimZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimZ_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), ((unsigned int)__pyx_v_blockDimZ));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_9blockDimZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_blockDimZ) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5944, 0, __PYX_ERR(0, 5944, __pyx_L1_error));

  /* "cuda/cuda.pyx":5946
 *     def blockDimZ(self, unsigned int blockDimZ):
 *         pass
 *         self._ptr[0].blockDimZ = blockDimZ             # <<<<<<<<<<<<<<
 *     @property
 *     def sharedMemBytes(self):
 */
  (__pyx_v_self->_ptr[0]).blockDimZ = __pyx_v_blockDimZ;

  /* "cuda/cuda.pyx":5944
 *         return self._ptr[0].blockDimZ
 *     @blockDimZ.setter
 *     def blockDimZ(self, unsigned int blockDimZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimZ = blockDimZ
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.blockDimZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5948
 *         self._ptr[0].blockDimZ = blockDimZ
 *     @property
 *     def sharedMemBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].sharedMemBytes
 *     @sharedMemBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_14sharedMemBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_14sharedMemBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_14sharedMemBytes___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_14sharedMemBytes___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5948, 0, __PYX_ERR(0, 5948, __pyx_L1_error));

  /* "cuda/cuda.pyx":5949
 *     @property
 *     def sharedMemBytes(self):
 *         return self._ptr[0].sharedMemBytes             # <<<<<<<<<<<<<<
 *     @sharedMemBytes.setter
 *     def sharedMemBytes(self, unsigned int sharedMemBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).sharedMemBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5948
 *         self._ptr[0].blockDimZ = blockDimZ
 *     @property
 *     def sharedMemBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].sharedMemBytes
 *     @sharedMemBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.sharedMemBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5951
 *         return self._ptr[0].sharedMemBytes
 *     @sharedMemBytes.setter
 *     def sharedMemBytes(self, unsigned int sharedMemBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].sharedMemBytes = sharedMemBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_14sharedMemBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_sharedMemBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_14sharedMemBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_sharedMemBytes) {
  unsigned int __pyx_v_sharedMemBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_sharedMemBytes); {
    __pyx_v_sharedMemBytes = __Pyx_PyInt_As_unsigned_int(__pyx_arg_sharedMemBytes); if (unlikely((__pyx_v_sharedMemBytes == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5951, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.sharedMemBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_14sharedMemBytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), ((unsigned int)__pyx_v_sharedMemBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_14sharedMemBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_sharedMemBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5951, 0, __PYX_ERR(0, 5951, __pyx_L1_error));

  /* "cuda/cuda.pyx":5953
 *     def sharedMemBytes(self, unsigned int sharedMemBytes):
 *         pass
 *         self._ptr[0].sharedMemBytes = sharedMemBytes             # <<<<<<<<<<<<<<
 *     @property
 *     def hStream(self):
 */
  (__pyx_v_self->_ptr[0]).sharedMemBytes = __pyx_v_sharedMemBytes;

  /* "cuda/cuda.pyx":5951
 *         return self._ptr[0].sharedMemBytes
 *     @sharedMemBytes.setter
 *     def sharedMemBytes(self, unsigned int sharedMemBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].sharedMemBytes = sharedMemBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.sharedMemBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5955
 *         self._ptr[0].sharedMemBytes = sharedMemBytes
 *     @property
 *     def hStream(self):             # <<<<<<<<<<<<<<
 *         return self._hStream
 *     @hStream.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_7hStream_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_7hStream_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_7hStream___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_7hStream___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5955, 0, __PYX_ERR(0, 5955, __pyx_L1_error));

  /* "cuda/cuda.pyx":5956
 *     @property
 *     def hStream(self):
 *         return self._hStream             # <<<<<<<<<<<<<<
 *     @hStream.setter
 *     def hStream(self, hStream):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_hStream));
  __pyx_r = ((PyObject *)__pyx_v_self->_hStream);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5955
 *         self._ptr[0].sharedMemBytes = sharedMemBytes
 *     @property
 *     def hStream(self):             # <<<<<<<<<<<<<<
 *         return self._hStream
 *     @hStream.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.hStream.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5958
 *         return self._hStream
 *     @hStream.setter
 *     def hStream(self, hStream):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUstream chStream
 *         if hStream is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_7hStream_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_hStream); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_7hStream_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_hStream) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_7hStream_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), ((PyObject *)__pyx_v_hStream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_7hStream_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5958, 0, __PYX_ERR(0, 5958, __pyx_L1_error));

  /* "cuda/cuda.pyx":5960
 *     def hStream(self, hStream):
 *         cdef ccuda.CUstream chStream
 *         if hStream is None:             # <<<<<<<<<<<<<<
 *             chStream = <ccuda.CUstream><void_ptr>0
 *         elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":5961
 *         cdef ccuda.CUstream chStream
 *         if hStream is None:
 *             chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(hStream, (CUstream)):
 *             phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":5960
 *     def hStream(self, hStream):
 *         cdef ccuda.CUstream chStream
 *         if hStream is None:             # <<<<<<<<<<<<<<
 *             chStream = <ccuda.CUstream><void_ptr>0
 *         elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5962
 *         if hStream is None:
 *             chStream = <ccuda.CUstream><void_ptr>0
 *         elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *             phStream = int(hStream)
 *             chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":5963
 *             chStream = <ccuda.CUstream><void_ptr>0
 *         elif isinstance(hStream, (CUstream)):
 *             phStream = int(hStream)             # <<<<<<<<<<<<<<
 *             chStream = <ccuda.CUstream><void_ptr>phStream
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":5964
 *         elif isinstance(hStream, (CUstream)):
 *             phStream = int(hStream)
 *             chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *         else:
 *             phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5964, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":5962
 *         if hStream is None:
 *             chStream = <ccuda.CUstream><void_ptr>0
 *         elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *             phStream = int(hStream)
 *             chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5966
 *             chStream = <ccuda.CUstream><void_ptr>phStream
 *         else:
 *             phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *             chStream = <ccuda.CUstream><void_ptr>phStream
 *         self._hStream._ptr[0] = chStream
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":5967
 *         else:
 *             phStream = int(CUstream(hStream))
 *             chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *         self._hStream._ptr[0] = chStream
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 5967, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5968
 *             phStream = int(CUstream(hStream))
 *             chStream = <ccuda.CUstream><void_ptr>phStream
 *         self._hStream._ptr[0] = chStream             # <<<<<<<<<<<<<<
 *     @property
 *     def attrs(self):
 */
  (__pyx_v_self->_hStream->_ptr[0]) = __pyx_v_chStream;

  /* "cuda/cuda.pyx":5958
 *         return self._hStream
 *     @hStream.setter
 *     def hStream(self, hStream):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUstream chStream
 *         if hStream is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.hStream.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5970
 *         self._hStream._ptr[0] = chStream
 *     @property
 *     def attrs(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].attrs + x*sizeof(ccuda.CUlaunchAttribute) for x in range(self._attrs_length)]
 *         return [CUlaunchAttribute(_ptr=arr) for arr in arrs]
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_5attrs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_5attrs_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_5attrs___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_5attrs___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_v_arrs = NULL;
  size_t __pyx_9genexpr11__pyx_v_x;
  PyObject *__pyx_9genexpr12__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5970, 0, __PYX_ERR(0, 5970, __pyx_L1_error));

  /* "cuda/cuda.pyx":5971
 *     @property
 *     def attrs(self):
 *         arrs = [<void_ptr>self._ptr[0].attrs + x*sizeof(ccuda.CUlaunchAttribute) for x in range(self._attrs_length)]             # <<<<<<<<<<<<<<
 *         return [CUlaunchAttribute(_ptr=arr) for arr in arrs]
 *     @attrs.setter
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_v_self->_attrs_length;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_9genexpr11__pyx_v_x = __pyx_t_4;
      __pyx_t_5 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).attrs) + (__pyx_9genexpr11__pyx_v_x * (sizeof(CUlaunchAttribute))))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 5971, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_v_arrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5972
 *     def attrs(self):
 *         arrs = [<void_ptr>self._ptr[0].attrs + x*sizeof(ccuda.CUlaunchAttribute) for x in range(self._attrs_length)]
 *         return [CUlaunchAttribute(_ptr=arr) for arr in arrs]             # <<<<<<<<<<<<<<
 *     @attrs.setter
 *     def attrs(self, val):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5972, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_v_arrs; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 5972, __pyx_L7_error)
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5972, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_arr, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5972, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ptr, __pyx_9genexpr12__pyx_v_arr) < 0) __PYX_ERR(0, 5972, __pyx_L7_error)
      __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUlaunchAttribute), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5972, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 5972, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_arr); __pyx_9genexpr12__pyx_v_arr = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_arr); __pyx_9genexpr12__pyx_v_arr = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5970
 *         self._hStream._ptr[0] = chStream
 *     @property
 *     def attrs(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].attrs + x*sizeof(ccuda.CUlaunchAttribute) for x in range(self._attrs_length)]
 *         return [CUlaunchAttribute(_ptr=arr) for arr in arrs]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.attrs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arrs);
  __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5974
 *         return [CUlaunchAttribute(_ptr=arr) for arr in arrs]
 *     @attrs.setter
 *     def attrs(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._attrs)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_5attrs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_5attrs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_5attrs_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_5attrs_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, PyObject *__pyx_v_val) {
  Py_ssize_t __pyx_v_idx;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  CUlaunchAttribute *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5974, 0, __PYX_ERR(0, 5974, __pyx_L1_error));

  /* "cuda/cuda.pyx":5975
 *     @attrs.setter
 *     def attrs(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._attrs)
 *             self._attrs_length = 0
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5975, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":5976
 *     def attrs(self, val):
 *         if len(val) == 0:
 *             free(self._attrs)             # <<<<<<<<<<<<<<
 *             self._attrs_length = 0
 *             self._ptr[0].attrs = NULL
 */
    free(__pyx_v_self->_attrs);

    /* "cuda/cuda.pyx":5977
 *         if len(val) == 0:
 *             free(self._attrs)
 *             self._attrs_length = 0             # <<<<<<<<<<<<<<
 *             self._ptr[0].attrs = NULL
 *         else:
 */
    __pyx_v_self->_attrs_length = 0;

    /* "cuda/cuda.pyx":5978
 *             free(self._attrs)
 *             self._attrs_length = 0
 *             self._ptr[0].attrs = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             if self._attrs_length != <size_t>len(val):
 */
    (__pyx_v_self->_ptr[0]).attrs = NULL;

    /* "cuda/cuda.pyx":5975
 *     @attrs.setter
 *     def attrs(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._attrs)
 *             self._attrs_length = 0
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":5980
 *             self._ptr[0].attrs = NULL
 *         else:
 *             if self._attrs_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._attrs)
 *                 self._attrs = <ccuda.CUlaunchAttribute*> calloc(len(val), sizeof(ccuda.CUlaunchAttribute))
 */
  /*else*/ {
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5980, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_v_self->_attrs_length != ((size_t)__pyx_t_1)) != 0);
    if (__pyx_t_2) {

      /* "cuda/cuda.pyx":5981
 *         else:
 *             if self._attrs_length != <size_t>len(val):
 *                 free(self._attrs)             # <<<<<<<<<<<<<<
 *                 self._attrs = <ccuda.CUlaunchAttribute*> calloc(len(val), sizeof(ccuda.CUlaunchAttribute))
 *                 if self._attrs is NULL:
 */
      free(__pyx_v_self->_attrs);

      /* "cuda/cuda.pyx":5982
 *             if self._attrs_length != <size_t>len(val):
 *                 free(self._attrs)
 *                 self._attrs = <ccuda.CUlaunchAttribute*> calloc(len(val), sizeof(ccuda.CUlaunchAttribute))             # <<<<<<<<<<<<<<
 *                 if self._attrs is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUlaunchAttribute)))
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5982, __pyx_L1_error)
      __pyx_v_self->_attrs = ((CUlaunchAttribute *)calloc(__pyx_t_1, (sizeof(CUlaunchAttribute))));

      /* "cuda/cuda.pyx":5983
 *                 free(self._attrs)
 *                 self._attrs = <ccuda.CUlaunchAttribute*> calloc(len(val), sizeof(ccuda.CUlaunchAttribute))
 *                 if self._attrs is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUlaunchAttribute)))
 *                 self._attrs_length = <size_t>len(val)
 */
      __pyx_t_2 = ((__pyx_v_self->_attrs == NULL) != 0);
      if (unlikely(__pyx_t_2)) {

        /* "cuda/cuda.pyx":5984
 *                 self._attrs = <ccuda.CUlaunchAttribute*> calloc(len(val), sizeof(ccuda.CUlaunchAttribute))
 *                 if self._attrs is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUlaunchAttribute)))             # <<<<<<<<<<<<<<
 *                 self._attrs_length = <size_t>len(val)
 *                 self._ptr[0].attrs = self._attrs
 */
        __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5984, __pyx_L1_error)
        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_n_u_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(CUlaunchAttribute))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 5984, __pyx_L1_error)

        /* "cuda/cuda.pyx":5983
 *                 free(self._attrs)
 *                 self._attrs = <ccuda.CUlaunchAttribute*> calloc(len(val), sizeof(ccuda.CUlaunchAttribute))
 *                 if self._attrs is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUlaunchAttribute)))
 *                 self._attrs_length = <size_t>len(val)
 */
      }

      /* "cuda/cuda.pyx":5985
 *                 if self._attrs is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUlaunchAttribute)))
 *                 self._attrs_length = <size_t>len(val)             # <<<<<<<<<<<<<<
 *                 self._ptr[0].attrs = self._attrs
 *             for idx in range(len(val)):
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5985, __pyx_L1_error)
      __pyx_v_self->_attrs_length = ((size_t)__pyx_t_1);

      /* "cuda/cuda.pyx":5986
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUlaunchAttribute)))
 *                 self._attrs_length = <size_t>len(val)
 *                 self._ptr[0].attrs = self._attrs             # <<<<<<<<<<<<<<
 *             for idx in range(len(val)):
 *                 memcpy(&self._attrs[idx], (<CUlaunchAttribute>val[idx])._ptr, sizeof(ccuda.CUlaunchAttribute))
 */
      __pyx_t_6 = __pyx_v_self->_attrs;
      (__pyx_v_self->_ptr[0]).attrs = __pyx_t_6;

      /* "cuda/cuda.pyx":5980
 *             self._ptr[0].attrs = NULL
 *         else:
 *             if self._attrs_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._attrs)
 *                 self._attrs = <ccuda.CUlaunchAttribute*> calloc(len(val), sizeof(ccuda.CUlaunchAttribute))
 */
    }

    /* "cuda/cuda.pyx":5987
 *                 self._attrs_length = <size_t>len(val)
 *                 self._ptr[0].attrs = self._attrs
 *             for idx in range(len(val)):             # <<<<<<<<<<<<<<
 *                 memcpy(&self._attrs[idx], (<CUlaunchAttribute>val[idx])._ptr, sizeof(ccuda.CUlaunchAttribute))
 *     @property
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5987, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_1;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_idx = __pyx_t_8;

      /* "cuda/cuda.pyx":5988
 *                 self._ptr[0].attrs = self._attrs
 *             for idx in range(len(val)):
 *                 memcpy(&self._attrs[idx], (<CUlaunchAttribute>val[idx])._ptr, sizeof(ccuda.CUlaunchAttribute))             # <<<<<<<<<<<<<<
 *     @property
 *     def numAttrs(self):
 */
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_val, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5988, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      (void)(memcpy((&(__pyx_v_self->_attrs[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute *)__pyx_t_5)->__pyx_base._ptr, (sizeof(CUlaunchAttribute))));
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":5974
 *         return [CUlaunchAttribute(_ptr=arr) for arr in arrs]
 *     @attrs.setter
 *     def attrs(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._attrs)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.attrs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5990
 *                 memcpy(&self._attrs[idx], (<CUlaunchAttribute>val[idx])._ptr, sizeof(ccuda.CUlaunchAttribute))
 *     @property
 *     def numAttrs(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].numAttrs
 *     @numAttrs.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8numAttrs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8numAttrs_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8numAttrs___get__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8numAttrs___get__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 5990, 0, __PYX_ERR(0, 5990, __pyx_L1_error));

  /* "cuda/cuda.pyx":5991
 *     @property
 *     def numAttrs(self):
 *         return self._ptr[0].numAttrs             # <<<<<<<<<<<<<<
 *     @numAttrs.setter
 *     def numAttrs(self, unsigned int numAttrs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).numAttrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":5990
 *                 memcpy(&self._attrs[idx], (<CUlaunchAttribute>val[idx])._ptr, sizeof(ccuda.CUlaunchAttribute))
 *     @property
 *     def numAttrs(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].numAttrs
 *     @numAttrs.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.numAttrs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":5993
 *         return self._ptr[0].numAttrs
 *     @numAttrs.setter
 *     def numAttrs(self, unsigned int numAttrs):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].numAttrs = numAttrs
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8numAttrs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numAttrs); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8numAttrs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numAttrs) {
  unsigned int __pyx_v_numAttrs;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_numAttrs); {
    __pyx_v_numAttrs = __Pyx_PyInt_As_unsigned_int(__pyx_arg_numAttrs); if (unlikely((__pyx_v_numAttrs == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5993, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.numAttrs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8numAttrs_2__set__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), ((unsigned int)__pyx_v_numAttrs));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_8numAttrs_2__set__(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, unsigned int __pyx_v_numAttrs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 5993, 0, __PYX_ERR(0, 5993, __pyx_L1_error));

  /* "cuda/cuda.pyx":5995
 *     def numAttrs(self, unsigned int numAttrs):
 *         pass
 *         self._ptr[0].numAttrs = numAttrs             # <<<<<<<<<<<<<<
 * 
 * cdef class CUexecAffinitySmCount_st:
 */
  (__pyx_v_self->_ptr[0]).numAttrs = __pyx_v_numAttrs;

  /* "cuda/cuda.pyx":5993
 *         return self._ptr[0].numAttrs
 *     @numAttrs.setter
 *     def numAttrs(self, unsigned int numAttrs):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].numAttrs = numAttrs
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.numAttrs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_17CUlaunchConfig_st_10__reduce_cython__[] = "CUlaunchConfig_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17CUlaunchConfig_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUlaunchConfig_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__222)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__223, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_17CUlaunchConfig_st_12__setstate_cython__[] = "CUlaunchConfig_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17CUlaunchConfig_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_17CUlaunchConfig_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUlaunchConfig_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__224)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__225, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUlaunchConfig_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6012
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 6012, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6012, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6012, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinitySmCount_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 6012, 0, __PYX_ERR(0, 6012, __pyx_L1_error));

  /* "cuda/cuda.pyx":6013
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6014
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUexecAffinitySmCount_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":6013
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6016
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUexecAffinitySmCount_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUexecAffinitySmCount_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6012
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinitySmCount_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6017
 *         else:
 *             self._ptr = <ccuda.CUexecAffinitySmCount_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 6017, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6017, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6017, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinitySmCount_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 6017, 0, __PYX_ERR(0, 6017, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinitySmCount_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6019
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 6019, 0, __PYX_ERR(0, 6019, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUexecAffinitySmCount_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":6021
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_24CUexecAffinitySmCount_st_6getPtr[] = "CUexecAffinitySmCount_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_24CUexecAffinitySmCount_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_24CUexecAffinitySmCount_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__226)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 6021, 0, __PYX_ERR(0, 6021, __pyx_L1_error));

  /* "cuda/cuda.pyx":6022
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6021
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinitySmCount_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6023
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 6023, 0, __PYX_ERR(0, 6023, __pyx_L1_error));

  /* "cuda/cuda.pyx":6024
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['val : ' + str(self.val)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6025
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['val : ' + str(self.val)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6026
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['val : ' + str(self.val)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_val_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_val, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6027
 *             str_list = []
 *             str_list += ['val : ' + str(self.val)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":6024
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['val : ' + str(self.val)]
 */
  }

  /* "cuda/cuda.pyx":6029
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":6023
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinitySmCount_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6032
 * 
 *     @property
 *     def val(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].val
 *     @val.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_3val_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_3val_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_3val___get__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_3val___get__(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6032, 0, __PYX_ERR(0, 6032, __pyx_L1_error));

  /* "cuda/cuda.pyx":6033
 *     @property
 *     def val(self):
 *         return self._ptr[0].val             # <<<<<<<<<<<<<<
 *     @val.setter
 *     def val(self, unsigned int val):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6032
 * 
 *     @property
 *     def val(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].val
 *     @val.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinitySmCount_st.val.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6035
 *         return self._ptr[0].val
 *     @val.setter
 *     def val(self, unsigned int val):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].val = val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_3val_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_3val_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
  unsigned int __pyx_v_val;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_val); {
    __pyx_v_val = __Pyx_PyInt_As_unsigned_int(__pyx_arg_val); if (unlikely((__pyx_v_val == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 6035, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinitySmCount_st.val.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_3val_2__set__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *)__pyx_v_self), ((unsigned int)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_3val_2__set__(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self, unsigned int __pyx_v_val) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6035, 0, __PYX_ERR(0, 6035, __pyx_L1_error));

  /* "cuda/cuda.pyx":6037
 *     def val(self, unsigned int val):
 *         pass
 *         self._ptr[0].val = val             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u:
 */
  (__pyx_v_self->_ptr[0]).val = __pyx_v_val;

  /* "cuda/cuda.pyx":6035
 *         return self._ptr[0].val
 *     @val.setter
 *     def val(self, unsigned int val):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].val = val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinitySmCount_st.val.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_24CUexecAffinitySmCount_st_10__reduce_cython__[] = "CUexecAffinitySmCount_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_24CUexecAffinitySmCount_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_24CUexecAffinitySmCount_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__227)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__228, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinitySmCount_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_24CUexecAffinitySmCount_st_12__setstate_cython__[] = "CUexecAffinitySmCount_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_24CUexecAffinitySmCount_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_24CUexecAffinitySmCount_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUexecAffinitySmCount_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__229)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__230, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinitySmCount_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6053
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUexecAffinityParam_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 6053, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6053, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6053, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u___cinit__(((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 6053, 0, __PYX_ERR(0, 6053, __pyx_L1_error));

  /* "cuda/cuda.pyx":6054
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUexecAffinityParam_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._smCount = CUexecAffinitySmCount(_ptr=<void_ptr>&self._ptr[0].param.smCount)
 */
  __pyx_v_self->_ptr = ((struct CUexecAffinityParam_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":6053
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUexecAffinityParam_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6055
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUexecAffinityParam_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._smCount = CUexecAffinitySmCount(_ptr=<void_ptr>&self._ptr[0].param.smCount)
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 6055, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6055, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6055, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_2__init__(((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 6055, 0, __PYX_ERR(0, 6055, __pyx_L1_error));

  /* "cuda/cuda.pyx":6056
 *         self._ptr = <ccuda.CUexecAffinityParam_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._smCount = CUexecAffinitySmCount(_ptr=<void_ptr>&self._ptr[0].param.smCount)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).param.smCount))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 6056, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_smCount);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_smCount));
  __pyx_v_self->_smCount = ((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":6055
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUexecAffinityParam_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._smCount = CUexecAffinitySmCount(_ptr=<void_ptr>&self._ptr[0].param.smCount)
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6057
 *     def __init__(self, void_ptr _ptr):
 *         self._smCount = CUexecAffinitySmCount(_ptr=<void_ptr>&self._ptr[0].param.smCount)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_4getPtr[] = "_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__231)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 6057, 0, __PYX_ERR(0, 6057, __pyx_L1_error));

  /* "cuda/cuda.pyx":6058
 *         self._smCount = CUexecAffinitySmCount(_ptr=<void_ptr>&self._ptr[0].param.smCount)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6057
 *     def __init__(self, void_ptr _ptr):
 *         self._smCount = CUexecAffinitySmCount(_ptr=<void_ptr>&self._ptr[0].param.smCount)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6059
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr13__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 6059, 0, __PYX_ERR(0, 6059, __pyx_L1_error));

  /* "cuda/cuda.pyx":6060
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['smCount :\n' + '\n'.join(['    ' + line for line in str(self.smCount).splitlines()])]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6061
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['smCount :\n' + '\n'.join(['    ' + line for line in str(self.smCount).splitlines()])]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6062
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['smCount :\n' + '\n'.join(['    ' + line for line in str(self.smCount).splitlines()])]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6062, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_smCount_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6062, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6062, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6062, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 6062, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6062, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr13__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6062, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 6062, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_line); __pyx_9genexpr13__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_line); __pyx_9genexpr13__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_smCount, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6063
 *             str_list = []
 *             str_list += ['smCount :\n' + '\n'.join(['    ' + line for line in str(self.smCount).splitlines()])]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":6060
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['smCount :\n' + '\n'.join(['    ' + line for line in str(self.smCount).splitlines()])]
 */
  }

  /* "cuda/cuda.pyx":6065
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":6059
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda._CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6068
 * 
 *     @property
 *     def smCount(self):             # <<<<<<<<<<<<<<
 *         return self._smCount
 *     @smCount.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7smCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7smCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7smCount___get__(((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7smCount___get__(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6068, 0, __PYX_ERR(0, 6068, __pyx_L1_error));

  /* "cuda/cuda.pyx":6069
 *     @property
 *     def smCount(self):
 *         return self._smCount             # <<<<<<<<<<<<<<
 *     @smCount.setter
 *     def smCount(self, smCount not None : CUexecAffinitySmCount):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_smCount));
  __pyx_r = ((PyObject *)__pyx_v_self->_smCount);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6068
 * 
 *     @property
 *     def smCount(self):             # <<<<<<<<<<<<<<
 *         return self._smCount
 *     @smCount.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.smCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6071
 *         return self._smCount
 *     @smCount.setter
 *     def smCount(self, smCount not None : CUexecAffinitySmCount):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(smCount):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7smCount_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_smCount); /*proto*/
static int __pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7smCount_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_smCount) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_smCount), __pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount, 0, "smCount", 0))) __PYX_ERR(0, 6071, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7smCount_2__set__(((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount *)__pyx_v_smCount));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7smCount_2__set__(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount *__pyx_v_smCount) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6071, 0, __PYX_ERR(0, 6071, __pyx_L1_error));

  /* "cuda/cuda.pyx":6073
 *     def smCount(self, smCount not None : CUexecAffinitySmCount):
 *         pass
 *         for _attr in dir(smCount):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_smCount)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6073, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 6073, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6073, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 6073, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6073, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 6073, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":6074
 *         pass
 *         for _attr in dir(smCount):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6074, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":6075
 *         for _attr in dir(smCount):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._smCount, _attr, getattr(smCount, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":6074
 *         pass
 *         for _attr in dir(smCount):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":6076
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._smCount, _attr, getattr(smCount, _attr))
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6076, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":6077
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._smCount, _attr, getattr(smCount, _attr))             # <<<<<<<<<<<<<<
 * 
 * cdef class CUexecAffinityParam_st:
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_smCount);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_smCount), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6077, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 6077, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":6076
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._smCount, _attr, getattr(smCount, _attr))
 * 
 */
    }

    /* "cuda/cuda.pyx":6073
 *     def smCount(self, smCount not None : CUexecAffinitySmCount):
 *         pass
 *         for _attr in dir(smCount):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":6071
 *         return self._smCount
 *     @smCount.setter
 *     def smCount(self, smCount not None : CUexecAffinitySmCount):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(smCount):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.smCount.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_8__reduce_cython__[] = "_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__232)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__233, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_10__setstate_cython__[] = "_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__234)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__235, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6096
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 6096, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6096, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6096, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinityParam_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 6096, 0, __PYX_ERR(0, 6096, __pyx_L1_error));

  /* "cuda/cuda.pyx":6097
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6098
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUexecAffinityParam_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":6097
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6100
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUexecAffinityParam_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._param = _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u(_ptr=<void_ptr>self._ptr)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUexecAffinityParam_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6096
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinityParam_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6101
 *         else:
 *             self._ptr = <ccuda.CUexecAffinityParam_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._param = _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 6101, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6101, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6101, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinityParam_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 6101, 0, __PYX_ERR(0, 6101, __pyx_L1_error));

  /* "cuda/cuda.pyx":6102
 *             self._ptr = <ccuda.CUexecAffinityParam_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._param = _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 6102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_param);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_param));
  __pyx_v_self->_param = ((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":6101
 *         else:
 *             self._ptr = <ccuda.CUexecAffinityParam_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._param = _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinityParam_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6103
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._param = _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 6103, 0, __PYX_ERR(0, 6103, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUexecAffinityParam_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":6105
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_22CUexecAffinityParam_st_6getPtr[] = "CUexecAffinityParam_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_22CUexecAffinityParam_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_22CUexecAffinityParam_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__236)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 6105, 0, __PYX_ERR(0, 6105, __pyx_L1_error));

  /* "cuda/cuda.pyx":6106
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6105
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinityParam_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6107
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr14__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 6107, 0, __PYX_ERR(0, 6107, __pyx_L1_error));

  /* "cuda/cuda.pyx":6108
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6109
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['param :\n' + '\n'.join(['    ' + line for line in str(self.param).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6110
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]             # <<<<<<<<<<<<<<
 *             str_list += ['param :\n' + '\n'.join(['    ' + line for line in str(self.param).splitlines()])]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_type, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6111
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['param :\n' + '\n'.join(['    ' + line for line in str(self.param).splitlines()])]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6111, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_param_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6111, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6111, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6111, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 6111, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6111, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr14__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6111, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 6111, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_line); __pyx_9genexpr14__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_line); __pyx_9genexpr14__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_param, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6112
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['param :\n' + '\n'.join(['    ' + line for line in str(self.param).splitlines()])]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":6108
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 */
  }

  /* "cuda/cuda.pyx":6114
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":6107
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinityParam_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6117
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return CUexecAffinityType(self._ptr[0].type)
 *     @type.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_4type___get__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_4type___get__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6117, 0, __PYX_ERR(0, 6117, __pyx_L1_error));

  /* "cuda/cuda.pyx":6118
 *     @property
 *     def type(self):
 *         return CUexecAffinityType(self._ptr[0].type)             # <<<<<<<<<<<<<<
 *     @type.setter
 *     def type(self, type not None : CUexecAffinityType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUexecAffinityType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUexecAffinityType_enum((__pyx_v_self->_ptr[0]).type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6117
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return CUexecAffinityType(self._ptr[0].type)
 *     @type.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinityParam_st.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6120
 *         return CUexecAffinityType(self._ptr[0].type)
 *     @type.setter
 *     def type(self, type not None : CUexecAffinityType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].type = type.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_type); /*proto*/
static int __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "type"); __PYX_ERR(0, 6120, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_4type_2__set__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)__pyx_v_self), ((PyObject *)__pyx_v_type));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_4type_2__set__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self, PyObject *__pyx_v_type) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUexecAffinityType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6120, 0, __PYX_ERR(0, 6120, __pyx_L1_error));

  /* "cuda/cuda.pyx":6122
 *     def type(self, type not None : CUexecAffinityType):
 *         pass
 *         self._ptr[0].type = type.value             # <<<<<<<<<<<<<<
 *     @property
 *     def param(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUexecAffinityType_enum)__Pyx_PyInt_As_enum__CUexecAffinityType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).type = __pyx_t_2;

  /* "cuda/cuda.pyx":6120
 *         return CUexecAffinityType(self._ptr[0].type)
 *     @type.setter
 *     def type(self, type not None : CUexecAffinityType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].type = type.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinityParam_st.type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6124
 *         self._ptr[0].type = type.value
 *     @property
 *     def param(self):             # <<<<<<<<<<<<<<
 *         return self._param
 *     @param.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_5param_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_5param_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_5param___get__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_5param___get__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6124, 0, __PYX_ERR(0, 6124, __pyx_L1_error));

  /* "cuda/cuda.pyx":6125
 *     @property
 *     def param(self):
 *         return self._param             # <<<<<<<<<<<<<<
 *     @param.setter
 *     def param(self, param not None : _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_param));
  __pyx_r = ((PyObject *)__pyx_v_self->_param);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6124
 *         self._ptr[0].type = type.value
 *     @property
 *     def param(self):             # <<<<<<<<<<<<<<
 *         return self._param
 *     @param.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinityParam_st.param.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6127
 *         return self._param
 *     @param.setter
 *     def param(self, param not None : _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(param):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_5param_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_param); /*proto*/
static int __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_5param_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_param) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_param), __pyx_ptype_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u, 0, "param", 0))) __PYX_ERR(0, 6127, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_5param_2__set__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)__pyx_v_param));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_5param_2__set__(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *__pyx_v_param) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6127, 0, __PYX_ERR(0, 6127, __pyx_L1_error));

  /* "cuda/cuda.pyx":6129
 *     def param(self, param not None : _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u):
 *         pass
 *         for _attr in dir(param):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_param)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6129, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 6129, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6129, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 6129, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6129, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 6129, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":6130
 *         pass
 *         for _attr in dir(param):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6130, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":6131
 *         for _attr in dir(param):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._param, _attr, getattr(param, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":6130
 *         pass
 *         for _attr in dir(param):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":6132
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._param, _attr, getattr(param, _attr))
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 6132, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":6133
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._param, _attr, getattr(param, _attr))             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_MEMCPY2D_st:
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_param);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_param), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 6133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 6133, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":6132
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._param, _attr, getattr(param, _attr))
 * 
 */
    }

    /* "cuda/cuda.pyx":6129
 *     def param(self, param not None : _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u):
 *         pass
 *         for _attr in dir(param):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":6127
 *         return self._param
 *     @param.setter
 *     def param(self, param not None : _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(param):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinityParam_st.param.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_22CUexecAffinityParam_st_10__reduce_cython__[] = "CUexecAffinityParam_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_22CUexecAffinityParam_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_22CUexecAffinityParam_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__237)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__238, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinityParam_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_22CUexecAffinityParam_st_12__setstate_cython__[] = "CUexecAffinityParam_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_22CUexecAffinityParam_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_22CUexecAffinityParam_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUexecAffinityParam_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__239)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__240, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUexecAffinityParam_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6180
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 6180, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6180, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6180, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 6180, 0, __PYX_ERR(0, 6180, __pyx_L1_error));

  /* "cuda/cuda.pyx":6181
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6182
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMCPY2D_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":6181
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6184
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMCPY2D_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_MEMCPY2D_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6180
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6185
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMCPY2D_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 6185, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6185, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6185, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 6185, 0, __PYX_ERR(0, 6185, __pyx_L1_error));

  /* "cuda/cuda.pyx":6186
 *             self._ptr = <ccuda.CUDA_MEMCPY2D_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)             # <<<<<<<<<<<<<<
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).srcDevice))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 6186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_srcDevice);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_srcDevice));
  __pyx_v_self->_srcDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":6187
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)             # <<<<<<<<<<<<<<
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).srcArray))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 6187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_srcArray);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_srcArray));
  __pyx_v_self->_srcArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6188
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)             # <<<<<<<<<<<<<<
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).dstDevice))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 6188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_dstDevice);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_dstDevice));
  __pyx_v_self->_dstDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":6189
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).dstArray))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 6189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_dstArray);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_dstArray));
  __pyx_v_self->_dstArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6185
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMCPY2D_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6190
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 6190, 0, __PYX_ERR(0, 6190, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_MEMCPY2D_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":6192
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY2D_st_6getPtr[] = "CUDA_MEMCPY2D_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUDA_MEMCPY2D_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY2D_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__241)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 6192, 0, __PYX_ERR(0, 6192, __pyx_L1_error));

  /* "cuda/cuda.pyx":6193
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6192
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6194
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 6194, 0, __PYX_ERR(0, 6194, __pyx_L1_error));

  /* "cuda/cuda.pyx":6195
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6196
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 *             str_list += ['srcY : ' + str(self.srcY)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6197
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcY : ' + str(self.srcY)]
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcXInBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcXInBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6198
 *             str_list = []
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 *             str_list += ['srcY : ' + str(self.srcY)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]
 *             str_list += ['srcHost : ' + hex(self.srcHost)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6199
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 *             str_list += ['srcY : ' + str(self.srcY)]
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcHost : ' + hex(self.srcHost)]
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcMemoryType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcMemoryType, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6200
 *             str_list += ['srcY : ' + str(self.srcY)]
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]
 *             str_list += ['srcHost : ' + hex(self.srcHost)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]
 *             str_list += ['srcArray : ' + str(self.srcArray)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcHost_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_srcHost, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6201
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]
 *             str_list += ['srcHost : ' + hex(self.srcHost)]
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcArray : ' + str(self.srcArray)]
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcDevice_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcDevice, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6202
 *             str_list += ['srcHost : ' + hex(self.srcHost)]
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]
 *             str_list += ['srcArray : ' + str(self.srcArray)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6203
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]
 *             str_list += ['srcArray : ' + str(self.srcArray)]
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]
 *             str_list += ['dstY : ' + str(self.dstY)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcPitch_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcPitch, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6204
 *             str_list += ['srcArray : ' + str(self.srcArray)]
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstY : ' + str(self.dstY)]
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstXInBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstXInBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6205
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]
 *             str_list += ['dstY : ' + str(self.dstY)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]
 *             str_list += ['dstHost : ' + hex(self.dstHost)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6206
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]
 *             str_list += ['dstY : ' + str(self.dstY)]
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstHost : ' + hex(self.dstHost)]
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstMemoryType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstMemoryType, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6207
 *             str_list += ['dstY : ' + str(self.dstY)]
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]
 *             str_list += ['dstHost : ' + hex(self.dstHost)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]
 *             str_list += ['dstArray : ' + str(self.dstArray)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstHost_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_dstHost, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6208
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]
 *             str_list += ['dstHost : ' + hex(self.dstHost)]
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstArray : ' + str(self.dstArray)]
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstDevice_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstDevice, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6209
 *             str_list += ['dstHost : ' + hex(self.dstHost)]
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]
 *             str_list += ['dstArray : ' + str(self.dstArray)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6210
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]
 *             str_list += ['dstArray : ' + str(self.dstArray)]
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]             # <<<<<<<<<<<<<<
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]
 *             str_list += ['Height : ' + str(self.Height)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstPitch_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstPitch, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6211
 *             str_list += ['dstArray : ' + str(self.dstArray)]
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['Height : ' + str(self.Height)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_WidthInBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_WidthInBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6212
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]
 *             str_list += ['Height : ' + str(self.Height)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Height_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Height, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6213
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]
 *             str_list += ['Height : ' + str(self.Height)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":6195
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 */
  }

  /* "cuda/cuda.pyx":6215
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":6194
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6218
 * 
 *     @property
 *     def srcXInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcXInBytes
 *     @srcXInBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11srcXInBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11srcXInBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_11srcXInBytes___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_11srcXInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6218, 0, __PYX_ERR(0, 6218, __pyx_L1_error));

  /* "cuda/cuda.pyx":6219
 *     @property
 *     def srcXInBytes(self):
 *         return self._ptr[0].srcXInBytes             # <<<<<<<<<<<<<<
 *     @srcXInBytes.setter
 *     def srcXInBytes(self, size_t srcXInBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcXInBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6218
 * 
 *     @property
 *     def srcXInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcXInBytes
 *     @srcXInBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcXInBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6221
 *         return self._ptr[0].srcXInBytes
 *     @srcXInBytes.setter
 *     def srcXInBytes(self, size_t srcXInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcXInBytes = srcXInBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11srcXInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcXInBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11srcXInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcXInBytes) {
  size_t __pyx_v_srcXInBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcXInBytes); {
    __pyx_v_srcXInBytes = __Pyx_PyInt_As_size_t(__pyx_arg_srcXInBytes); if (unlikely((__pyx_v_srcXInBytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6221, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcXInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_11srcXInBytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((size_t)__pyx_v_srcXInBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_11srcXInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_srcXInBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6221, 0, __PYX_ERR(0, 6221, __pyx_L1_error));

  /* "cuda/cuda.pyx":6223
 *     def srcXInBytes(self, size_t srcXInBytes):
 *         pass
 *         self._ptr[0].srcXInBytes = srcXInBytes             # <<<<<<<<<<<<<<
 *     @property
 *     def srcY(self):
 */
  (__pyx_v_self->_ptr[0]).srcXInBytes = __pyx_v_srcXInBytes;

  /* "cuda/cuda.pyx":6221
 *         return self._ptr[0].srcXInBytes
 *     @srcXInBytes.setter
 *     def srcXInBytes(self, size_t srcXInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcXInBytes = srcXInBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcXInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6225
 *         self._ptr[0].srcXInBytes = srcXInBytes
 *     @property
 *     def srcY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcY
 *     @srcY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_4srcY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_4srcY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4srcY___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4srcY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6225, 0, __PYX_ERR(0, 6225, __pyx_L1_error));

  /* "cuda/cuda.pyx":6226
 *     @property
 *     def srcY(self):
 *         return self._ptr[0].srcY             # <<<<<<<<<<<<<<
 *     @srcY.setter
 *     def srcY(self, size_t srcY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6225
 *         self._ptr[0].srcXInBytes = srcXInBytes
 *     @property
 *     def srcY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcY
 *     @srcY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6228
 *         return self._ptr[0].srcY
 *     @srcY.setter
 *     def srcY(self, size_t srcY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcY = srcY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_4srcY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcY); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_4srcY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcY) {
  size_t __pyx_v_srcY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcY); {
    __pyx_v_srcY = __Pyx_PyInt_As_size_t(__pyx_arg_srcY); if (unlikely((__pyx_v_srcY == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6228, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4srcY_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((size_t)__pyx_v_srcY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4srcY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_srcY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6228, 0, __PYX_ERR(0, 6228, __pyx_L1_error));

  /* "cuda/cuda.pyx":6230
 *     def srcY(self, size_t srcY):
 *         pass
 *         self._ptr[0].srcY = srcY             # <<<<<<<<<<<<<<
 *     @property
 *     def srcMemoryType(self):
 */
  (__pyx_v_self->_ptr[0]).srcY = __pyx_v_srcY;

  /* "cuda/cuda.pyx":6228
 *         return self._ptr[0].srcY
 *     @srcY.setter
 *     def srcY(self, size_t srcY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcY = srcY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6232
 *         self._ptr[0].srcY = srcY
 *     @property
 *     def srcMemoryType(self):             # <<<<<<<<<<<<<<
 *         return CUmemorytype(self._ptr[0].srcMemoryType)
 *     @srcMemoryType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13srcMemoryType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13srcMemoryType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_13srcMemoryType___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_13srcMemoryType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6232, 0, __PYX_ERR(0, 6232, __pyx_L1_error));

  /* "cuda/cuda.pyx":6233
 *     @property
 *     def srcMemoryType(self):
 *         return CUmemorytype(self._ptr[0].srcMemoryType)             # <<<<<<<<<<<<<<
 *     @srcMemoryType.setter
 *     def srcMemoryType(self, srcMemoryType not None : CUmemorytype):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemorytype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemorytype_enum((__pyx_v_self->_ptr[0]).srcMemoryType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6232
 *         self._ptr[0].srcY = srcY
 *     @property
 *     def srcMemoryType(self):             # <<<<<<<<<<<<<<
 *         return CUmemorytype(self._ptr[0].srcMemoryType)
 *     @srcMemoryType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcMemoryType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6235
 *         return CUmemorytype(self._ptr[0].srcMemoryType)
 *     @srcMemoryType.setter
 *     def srcMemoryType(self, srcMemoryType not None : CUmemorytype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcMemoryType = srcMemoryType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13srcMemoryType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcMemoryType); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13srcMemoryType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcMemoryType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_srcMemoryType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "srcMemoryType"); __PYX_ERR(0, 6235, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_13srcMemoryType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcMemoryType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_13srcMemoryType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_srcMemoryType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemorytype __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6235, 0, __PYX_ERR(0, 6235, __pyx_L1_error));

  /* "cuda/cuda.pyx":6237
 *     def srcMemoryType(self, srcMemoryType not None : CUmemorytype):
 *         pass
 *         self._ptr[0].srcMemoryType = srcMemoryType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def srcHost(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_srcMemoryType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemorytype_enum)__Pyx_PyInt_As_enum__CUmemorytype_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).srcMemoryType = __pyx_t_2;

  /* "cuda/cuda.pyx":6235
 *         return CUmemorytype(self._ptr[0].srcMemoryType)
 *     @srcMemoryType.setter
 *     def srcMemoryType(self, srcMemoryType not None : CUmemorytype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcMemoryType = srcMemoryType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcMemoryType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6239
 *         self._ptr[0].srcMemoryType = srcMemoryType.value
 *     @property
 *     def srcHost(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].srcHost
 *     @srcHost.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7srcHost_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7srcHost_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_7srcHost___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_7srcHost___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6239, 0, __PYX_ERR(0, 6239, __pyx_L1_error));

  /* "cuda/cuda.pyx":6240
 *     @property
 *     def srcHost(self):
 *         return <void_ptr>self._ptr[0].srcHost             # <<<<<<<<<<<<<<
 *     @srcHost.setter
 *     def srcHost(self, srcHost):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).srcHost)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6239
 *         self._ptr[0].srcMemoryType = srcMemoryType.value
 *     @property
 *     def srcHost(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].srcHost
 *     @srcHost.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcHost.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6242
 *         return <void_ptr>self._ptr[0].srcHost
 *     @srcHost.setter
 *     def srcHost(self, srcHost):             # <<<<<<<<<<<<<<
 *         _csrcHost = utils.HelperInputVoidPtr(srcHost)
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7srcHost_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcHost); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7srcHost_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcHost) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_7srcHost_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcHost));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_7srcHost_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_srcHost) {
  PyObject *__pyx_v__csrcHost = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6242, 0, __PYX_ERR(0, 6242, __pyx_L1_error));

  /* "cuda/cuda.pyx":6243
 *     @srcHost.setter
 *     def srcHost(self, srcHost):
 *         _csrcHost = utils.HelperInputVoidPtr(srcHost)             # <<<<<<<<<<<<<<
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_srcHost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__csrcHost = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6244
 *     def srcHost(self, srcHost):
 *         _csrcHost = utils.HelperInputVoidPtr(srcHost)
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def srcDevice(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__csrcHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).srcHost = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":6242
 *         return <void_ptr>self._ptr[0].srcHost
 *     @srcHost.setter
 *     def srcHost(self, srcHost):             # <<<<<<<<<<<<<<
 *         _csrcHost = utils.HelperInputVoidPtr(srcHost)
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcHost.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__csrcHost);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6246
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 *     @property
 *     def srcDevice(self):             # <<<<<<<<<<<<<<
 *         return self._srcDevice
 *     @srcDevice.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9srcDevice_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9srcDevice_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_9srcDevice___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_9srcDevice___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6246, 0, __PYX_ERR(0, 6246, __pyx_L1_error));

  /* "cuda/cuda.pyx":6247
 *     @property
 *     def srcDevice(self):
 *         return self._srcDevice             # <<<<<<<<<<<<<<
 *     @srcDevice.setter
 *     def srcDevice(self, srcDevice):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_srcDevice));
  __pyx_r = ((PyObject *)__pyx_v_self->_srcDevice);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6246
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 *     @property
 *     def srcDevice(self):             # <<<<<<<<<<<<<<
 *         return self._srcDevice
 *     @srcDevice.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcDevice.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6249
 *         return self._srcDevice
 *     @srcDevice.setter
 *     def srcDevice(self, srcDevice):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9srcDevice_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcDevice); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9srcDevice_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcDevice) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_9srcDevice_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcDevice));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_9srcDevice_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_srcDevice) {
  CUdeviceptr __pyx_v_csrcDevice;
  PyObject *__pyx_v_psrcDevice = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6249, 0, __PYX_ERR(0, 6249, __pyx_L1_error));

  /* "cuda/cuda.pyx":6251
 *     def srcDevice(self, srcDevice):
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:             # <<<<<<<<<<<<<<
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_srcDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6252
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 *             psrcDevice = int(srcDevice)
 */
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6251
 *     def srcDevice(self, srcDevice):
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:             # <<<<<<<<<<<<<<
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6253
 *         if srcDevice is None:
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             psrcDevice = int(srcDevice)
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6254
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 *             psrcDevice = int(srcDevice)             # <<<<<<<<<<<<<<
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6255
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 *             psrcDevice = int(srcDevice)
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *         else:
 *             psrcDevice = int(CUdeviceptr(srcDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6255, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6253
 *         if srcDevice is None:
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             psrcDevice = int(srcDevice)
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6257
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *         else:
 *             psrcDevice = int(CUdeviceptr(srcDevice))             # <<<<<<<<<<<<<<
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *         self._srcDevice._ptr[0] = csrcDevice
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6258
 *         else:
 *             psrcDevice = int(CUdeviceptr(srcDevice))
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *         self._srcDevice._ptr[0] = csrcDevice
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6258, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6259
 *             psrcDevice = int(CUdeviceptr(srcDevice))
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *         self._srcDevice._ptr[0] = csrcDevice             # <<<<<<<<<<<<<<
 *     @property
 *     def srcArray(self):
 */
  (__pyx_v_self->_srcDevice->_ptr[0]) = __pyx_v_csrcDevice;

  /* "cuda/cuda.pyx":6249
 *         return self._srcDevice
 *     @srcDevice.setter
 *     def srcDevice(self, srcDevice):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcDevice.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcDevice);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6261
 *         self._srcDevice._ptr[0] = csrcDevice
 *     @property
 *     def srcArray(self):             # <<<<<<<<<<<<<<
 *         return self._srcArray
 *     @srcArray.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcArray___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6261, 0, __PYX_ERR(0, 6261, __pyx_L1_error));

  /* "cuda/cuda.pyx":6262
 *     @property
 *     def srcArray(self):
 *         return self._srcArray             # <<<<<<<<<<<<<<
 *     @srcArray.setter
 *     def srcArray(self, srcArray):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_srcArray));
  __pyx_r = ((PyObject *)__pyx_v_self->_srcArray);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6261
 *         self._srcDevice._ptr[0] = csrcDevice
 *     @property
 *     def srcArray(self):             # <<<<<<<<<<<<<<
 *         return self._srcArray
 *     @srcArray.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6264
 *         return self._srcArray
 *     @srcArray.setter
 *     def srcArray(self, srcArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcArray); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcArray) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcArray_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_srcArray) {
  CUarray __pyx_v_csrcArray;
  PyObject *__pyx_v_psrcArray = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6264, 0, __PYX_ERR(0, 6264, __pyx_L1_error));

  /* "cuda/cuda.pyx":6266
 *     def srcArray(self, srcArray):
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:             # <<<<<<<<<<<<<<
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_srcArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6267
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:
 *             csrcArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(srcArray, (CUarray)):
 *             psrcArray = int(srcArray)
 */
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6266
 *     def srcArray(self, srcArray):
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:             # <<<<<<<<<<<<<<
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6268
 *         if srcArray is None:
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             psrcArray = int(srcArray)
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6269
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):
 *             psrcArray = int(srcArray)             # <<<<<<<<<<<<<<
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6270
 *         elif isinstance(srcArray, (CUarray)):
 *             psrcArray = int(srcArray)
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 *         else:
 *             psrcArray = int(CUarray(srcArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6270, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6268
 *         if srcArray is None:
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             psrcArray = int(srcArray)
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6272
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *         else:
 *             psrcArray = int(CUarray(srcArray))             # <<<<<<<<<<<<<<
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *         self._srcArray._ptr[0] = csrcArray
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_srcArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6273
 *         else:
 *             psrcArray = int(CUarray(srcArray))
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 *         self._srcArray._ptr[0] = csrcArray
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6273, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6274
 *             psrcArray = int(CUarray(srcArray))
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *         self._srcArray._ptr[0] = csrcArray             # <<<<<<<<<<<<<<
 *     @property
 *     def srcPitch(self):
 */
  (__pyx_v_self->_srcArray->_ptr[0]) = __pyx_v_csrcArray;

  /* "cuda/cuda.pyx":6264
 *         return self._srcArray
 *     @srcArray.setter
 *     def srcArray(self, srcArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcArray);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6276
 *         self._srcArray._ptr[0] = csrcArray
 *     @property
 *     def srcPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcPitch
 *     @srcPitch.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcPitch_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcPitch_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcPitch___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcPitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6276, 0, __PYX_ERR(0, 6276, __pyx_L1_error));

  /* "cuda/cuda.pyx":6277
 *     @property
 *     def srcPitch(self):
 *         return self._ptr[0].srcPitch             # <<<<<<<<<<<<<<
 *     @srcPitch.setter
 *     def srcPitch(self, size_t srcPitch):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcPitch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6276
 *         self._srcArray._ptr[0] = csrcArray
 *     @property
 *     def srcPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcPitch
 *     @srcPitch.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcPitch.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6279
 *         return self._ptr[0].srcPitch
 *     @srcPitch.setter
 *     def srcPitch(self, size_t srcPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcPitch = srcPitch
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcPitch); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcPitch) {
  size_t __pyx_v_srcPitch;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcPitch); {
    __pyx_v_srcPitch = __Pyx_PyInt_As_size_t(__pyx_arg_srcPitch); if (unlikely((__pyx_v_srcPitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6279, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcPitch_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((size_t)__pyx_v_srcPitch));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_srcPitch) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6279, 0, __PYX_ERR(0, 6279, __pyx_L1_error));

  /* "cuda/cuda.pyx":6281
 *     def srcPitch(self, size_t srcPitch):
 *         pass
 *         self._ptr[0].srcPitch = srcPitch             # <<<<<<<<<<<<<<
 *     @property
 *     def dstXInBytes(self):
 */
  (__pyx_v_self->_ptr[0]).srcPitch = __pyx_v_srcPitch;

  /* "cuda/cuda.pyx":6279
 *         return self._ptr[0].srcPitch
 *     @srcPitch.setter
 *     def srcPitch(self, size_t srcPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcPitch = srcPitch
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.srcPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6283
 *         self._ptr[0].srcPitch = srcPitch
 *     @property
 *     def dstXInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstXInBytes
 *     @dstXInBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11dstXInBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11dstXInBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_11dstXInBytes___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_11dstXInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6283, 0, __PYX_ERR(0, 6283, __pyx_L1_error));

  /* "cuda/cuda.pyx":6284
 *     @property
 *     def dstXInBytes(self):
 *         return self._ptr[0].dstXInBytes             # <<<<<<<<<<<<<<
 *     @dstXInBytes.setter
 *     def dstXInBytes(self, size_t dstXInBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstXInBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6283
 *         self._ptr[0].srcPitch = srcPitch
 *     @property
 *     def dstXInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstXInBytes
 *     @dstXInBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstXInBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6286
 *         return self._ptr[0].dstXInBytes
 *     @dstXInBytes.setter
 *     def dstXInBytes(self, size_t dstXInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstXInBytes = dstXInBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11dstXInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstXInBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11dstXInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstXInBytes) {
  size_t __pyx_v_dstXInBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstXInBytes); {
    __pyx_v_dstXInBytes = __Pyx_PyInt_As_size_t(__pyx_arg_dstXInBytes); if (unlikely((__pyx_v_dstXInBytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6286, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstXInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_11dstXInBytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((size_t)__pyx_v_dstXInBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_11dstXInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_dstXInBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6286, 0, __PYX_ERR(0, 6286, __pyx_L1_error));

  /* "cuda/cuda.pyx":6288
 *     def dstXInBytes(self, size_t dstXInBytes):
 *         pass
 *         self._ptr[0].dstXInBytes = dstXInBytes             # <<<<<<<<<<<<<<
 *     @property
 *     def dstY(self):
 */
  (__pyx_v_self->_ptr[0]).dstXInBytes = __pyx_v_dstXInBytes;

  /* "cuda/cuda.pyx":6286
 *         return self._ptr[0].dstXInBytes
 *     @dstXInBytes.setter
 *     def dstXInBytes(self, size_t dstXInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstXInBytes = dstXInBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstXInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6290
 *         self._ptr[0].dstXInBytes = dstXInBytes
 *     @property
 *     def dstY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstY
 *     @dstY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_4dstY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_4dstY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4dstY___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4dstY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6290, 0, __PYX_ERR(0, 6290, __pyx_L1_error));

  /* "cuda/cuda.pyx":6291
 *     @property
 *     def dstY(self):
 *         return self._ptr[0].dstY             # <<<<<<<<<<<<<<
 *     @dstY.setter
 *     def dstY(self, size_t dstY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6290
 *         self._ptr[0].dstXInBytes = dstXInBytes
 *     @property
 *     def dstY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstY
 *     @dstY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6293
 *         return self._ptr[0].dstY
 *     @dstY.setter
 *     def dstY(self, size_t dstY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstY = dstY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_4dstY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstY); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_4dstY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstY) {
  size_t __pyx_v_dstY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstY); {
    __pyx_v_dstY = __Pyx_PyInt_As_size_t(__pyx_arg_dstY); if (unlikely((__pyx_v_dstY == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6293, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4dstY_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((size_t)__pyx_v_dstY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_4dstY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_dstY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6293, 0, __PYX_ERR(0, 6293, __pyx_L1_error));

  /* "cuda/cuda.pyx":6295
 *     def dstY(self, size_t dstY):
 *         pass
 *         self._ptr[0].dstY = dstY             # <<<<<<<<<<<<<<
 *     @property
 *     def dstMemoryType(self):
 */
  (__pyx_v_self->_ptr[0]).dstY = __pyx_v_dstY;

  /* "cuda/cuda.pyx":6293
 *         return self._ptr[0].dstY
 *     @dstY.setter
 *     def dstY(self, size_t dstY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstY = dstY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6297
 *         self._ptr[0].dstY = dstY
 *     @property
 *     def dstMemoryType(self):             # <<<<<<<<<<<<<<
 *         return CUmemorytype(self._ptr[0].dstMemoryType)
 *     @dstMemoryType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13dstMemoryType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13dstMemoryType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_13dstMemoryType___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_13dstMemoryType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6297, 0, __PYX_ERR(0, 6297, __pyx_L1_error));

  /* "cuda/cuda.pyx":6298
 *     @property
 *     def dstMemoryType(self):
 *         return CUmemorytype(self._ptr[0].dstMemoryType)             # <<<<<<<<<<<<<<
 *     @dstMemoryType.setter
 *     def dstMemoryType(self, dstMemoryType not None : CUmemorytype):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemorytype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemorytype_enum((__pyx_v_self->_ptr[0]).dstMemoryType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6297
 *         self._ptr[0].dstY = dstY
 *     @property
 *     def dstMemoryType(self):             # <<<<<<<<<<<<<<
 *         return CUmemorytype(self._ptr[0].dstMemoryType)
 *     @dstMemoryType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstMemoryType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6300
 *         return CUmemorytype(self._ptr[0].dstMemoryType)
 *     @dstMemoryType.setter
 *     def dstMemoryType(self, dstMemoryType not None : CUmemorytype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstMemoryType = dstMemoryType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13dstMemoryType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstMemoryType); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13dstMemoryType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstMemoryType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_dstMemoryType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "dstMemoryType"); __PYX_ERR(0, 6300, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_13dstMemoryType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstMemoryType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_13dstMemoryType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_dstMemoryType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemorytype __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6300, 0, __PYX_ERR(0, 6300, __pyx_L1_error));

  /* "cuda/cuda.pyx":6302
 *     def dstMemoryType(self, dstMemoryType not None : CUmemorytype):
 *         pass
 *         self._ptr[0].dstMemoryType = dstMemoryType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def dstHost(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dstMemoryType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemorytype_enum)__Pyx_PyInt_As_enum__CUmemorytype_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6302, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).dstMemoryType = __pyx_t_2;

  /* "cuda/cuda.pyx":6300
 *         return CUmemorytype(self._ptr[0].dstMemoryType)
 *     @dstMemoryType.setter
 *     def dstMemoryType(self, dstMemoryType not None : CUmemorytype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstMemoryType = dstMemoryType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstMemoryType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6304
 *         self._ptr[0].dstMemoryType = dstMemoryType.value
 *     @property
 *     def dstHost(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].dstHost
 *     @dstHost.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7dstHost_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7dstHost_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_7dstHost___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_7dstHost___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6304, 0, __PYX_ERR(0, 6304, __pyx_L1_error));

  /* "cuda/cuda.pyx":6305
 *     @property
 *     def dstHost(self):
 *         return <void_ptr>self._ptr[0].dstHost             # <<<<<<<<<<<<<<
 *     @dstHost.setter
 *     def dstHost(self, dstHost):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).dstHost)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6304
 *         self._ptr[0].dstMemoryType = dstMemoryType.value
 *     @property
 *     def dstHost(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].dstHost
 *     @dstHost.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstHost.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6307
 *         return <void_ptr>self._ptr[0].dstHost
 *     @dstHost.setter
 *     def dstHost(self, dstHost):             # <<<<<<<<<<<<<<
 *         _cdstHost = utils.HelperInputVoidPtr(dstHost)
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7dstHost_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstHost); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7dstHost_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstHost) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_7dstHost_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstHost));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_7dstHost_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_dstHost) {
  PyObject *__pyx_v__cdstHost = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6307, 0, __PYX_ERR(0, 6307, __pyx_L1_error));

  /* "cuda/cuda.pyx":6308
 *     @dstHost.setter
 *     def dstHost(self, dstHost):
 *         _cdstHost = utils.HelperInputVoidPtr(dstHost)             # <<<<<<<<<<<<<<
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_dstHost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cdstHost = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6309
 *     def dstHost(self, dstHost):
 *         _cdstHost = utils.HelperInputVoidPtr(dstHost)
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def dstDevice(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cdstHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6309, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).dstHost = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":6307
 *         return <void_ptr>self._ptr[0].dstHost
 *     @dstHost.setter
 *     def dstHost(self, dstHost):             # <<<<<<<<<<<<<<
 *         _cdstHost = utils.HelperInputVoidPtr(dstHost)
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstHost.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cdstHost);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6311
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 *     @property
 *     def dstDevice(self):             # <<<<<<<<<<<<<<
 *         return self._dstDevice
 *     @dstDevice.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9dstDevice_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9dstDevice_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_9dstDevice___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_9dstDevice___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6311, 0, __PYX_ERR(0, 6311, __pyx_L1_error));

  /* "cuda/cuda.pyx":6312
 *     @property
 *     def dstDevice(self):
 *         return self._dstDevice             # <<<<<<<<<<<<<<
 *     @dstDevice.setter
 *     def dstDevice(self, dstDevice):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_dstDevice));
  __pyx_r = ((PyObject *)__pyx_v_self->_dstDevice);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6311
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 *     @property
 *     def dstDevice(self):             # <<<<<<<<<<<<<<
 *         return self._dstDevice
 *     @dstDevice.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstDevice.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6314
 *         return self._dstDevice
 *     @dstDevice.setter
 *     def dstDevice(self, dstDevice):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9dstDevice_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstDevice); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9dstDevice_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstDevice) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_9dstDevice_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstDevice));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_9dstDevice_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_dstDevice) {
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6314, 0, __PYX_ERR(0, 6314, __pyx_L1_error));

  /* "cuda/cuda.pyx":6316
 *     def dstDevice(self, dstDevice):
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:             # <<<<<<<<<<<<<<
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6317
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 *             pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6316
 *     def dstDevice(self, dstDevice):
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:             # <<<<<<<<<<<<<<
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6318
 *         if dstDevice is None:
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdstDevice = int(dstDevice)
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6319
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 *             pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6320
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 *             pdstDevice = int(dstDevice)
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *         else:
 *             pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6320, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6318
 *         if dstDevice is None:
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdstDevice = int(dstDevice)
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6322
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *         else:
 *             pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *         self._dstDevice._ptr[0] = cdstDevice
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6323
 *         else:
 *             pdstDevice = int(CUdeviceptr(dstDevice))
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *         self._dstDevice._ptr[0] = cdstDevice
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6323, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6324
 *             pdstDevice = int(CUdeviceptr(dstDevice))
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *         self._dstDevice._ptr[0] = cdstDevice             # <<<<<<<<<<<<<<
 *     @property
 *     def dstArray(self):
 */
  (__pyx_v_self->_dstDevice->_ptr[0]) = __pyx_v_cdstDevice;

  /* "cuda/cuda.pyx":6314
 *         return self._dstDevice
 *     @dstDevice.setter
 *     def dstDevice(self, dstDevice):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstDevice.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6326
 *         self._dstDevice._ptr[0] = cdstDevice
 *     @property
 *     def dstArray(self):             # <<<<<<<<<<<<<<
 *         return self._dstArray
 *     @dstArray.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstArray___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6326, 0, __PYX_ERR(0, 6326, __pyx_L1_error));

  /* "cuda/cuda.pyx":6327
 *     @property
 *     def dstArray(self):
 *         return self._dstArray             # <<<<<<<<<<<<<<
 *     @dstArray.setter
 *     def dstArray(self, dstArray):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_dstArray));
  __pyx_r = ((PyObject *)__pyx_v_self->_dstArray);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6326
 *         self._dstDevice._ptr[0] = cdstDevice
 *     @property
 *     def dstArray(self):             # <<<<<<<<<<<<<<
 *         return self._dstArray
 *     @dstArray.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6329
 *         return self._dstArray
 *     @dstArray.setter
 *     def dstArray(self, dstArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstArray); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstArray) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstArray_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, PyObject *__pyx_v_dstArray) {
  CUarray __pyx_v_cdstArray;
  PyObject *__pyx_v_pdstArray = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6329, 0, __PYX_ERR(0, 6329, __pyx_L1_error));

  /* "cuda/cuda.pyx":6331
 *     def dstArray(self, dstArray):
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:             # <<<<<<<<<<<<<<
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_dstArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6332
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:
 *             cdstArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(dstArray, (CUarray)):
 *             pdstArray = int(dstArray)
 */
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6331
 *     def dstArray(self, dstArray):
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:             # <<<<<<<<<<<<<<
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6333
 *         if dstArray is None:
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             pdstArray = int(dstArray)
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6334
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):
 *             pdstArray = int(dstArray)             # <<<<<<<<<<<<<<
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6335
 *         elif isinstance(dstArray, (CUarray)):
 *             pdstArray = int(dstArray)
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 *         else:
 *             pdstArray = int(CUarray(dstArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6335, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6333
 *         if dstArray is None:
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             pdstArray = int(dstArray)
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6337
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *         else:
 *             pdstArray = int(CUarray(dstArray))             # <<<<<<<<<<<<<<
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *         self._dstArray._ptr[0] = cdstArray
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_dstArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6338
 *         else:
 *             pdstArray = int(CUarray(dstArray))
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 *         self._dstArray._ptr[0] = cdstArray
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6338, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6339
 *             pdstArray = int(CUarray(dstArray))
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *         self._dstArray._ptr[0] = cdstArray             # <<<<<<<<<<<<<<
 *     @property
 *     def dstPitch(self):
 */
  (__pyx_v_self->_dstArray->_ptr[0]) = __pyx_v_cdstArray;

  /* "cuda/cuda.pyx":6329
 *         return self._dstArray
 *     @dstArray.setter
 *     def dstArray(self, dstArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstArray);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6341
 *         self._dstArray._ptr[0] = cdstArray
 *     @property
 *     def dstPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstPitch
 *     @dstPitch.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstPitch_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstPitch_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstPitch___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstPitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6341, 0, __PYX_ERR(0, 6341, __pyx_L1_error));

  /* "cuda/cuda.pyx":6342
 *     @property
 *     def dstPitch(self):
 *         return self._ptr[0].dstPitch             # <<<<<<<<<<<<<<
 *     @dstPitch.setter
 *     def dstPitch(self, size_t dstPitch):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstPitch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6341
 *         self._dstArray._ptr[0] = cdstArray
 *     @property
 *     def dstPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstPitch
 *     @dstPitch.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstPitch.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6344
 *         return self._ptr[0].dstPitch
 *     @dstPitch.setter
 *     def dstPitch(self, size_t dstPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstPitch = dstPitch
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstPitch); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstPitch) {
  size_t __pyx_v_dstPitch;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstPitch); {
    __pyx_v_dstPitch = __Pyx_PyInt_As_size_t(__pyx_arg_dstPitch); if (unlikely((__pyx_v_dstPitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6344, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstPitch_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((size_t)__pyx_v_dstPitch));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_dstPitch) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6344, 0, __PYX_ERR(0, 6344, __pyx_L1_error));

  /* "cuda/cuda.pyx":6346
 *     def dstPitch(self, size_t dstPitch):
 *         pass
 *         self._ptr[0].dstPitch = dstPitch             # <<<<<<<<<<<<<<
 *     @property
 *     def WidthInBytes(self):
 */
  (__pyx_v_self->_ptr[0]).dstPitch = __pyx_v_dstPitch;

  /* "cuda/cuda.pyx":6344
 *         return self._ptr[0].dstPitch
 *     @dstPitch.setter
 *     def dstPitch(self, size_t dstPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstPitch = dstPitch
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.dstPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6348
 *         self._ptr[0].dstPitch = dstPitch
 *     @property
 *     def WidthInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].WidthInBytes
 *     @WidthInBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_12WidthInBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_12WidthInBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_12WidthInBytes___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_12WidthInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6348, 0, __PYX_ERR(0, 6348, __pyx_L1_error));

  /* "cuda/cuda.pyx":6349
 *     @property
 *     def WidthInBytes(self):
 *         return self._ptr[0].WidthInBytes             # <<<<<<<<<<<<<<
 *     @WidthInBytes.setter
 *     def WidthInBytes(self, size_t WidthInBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).WidthInBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6348
 *         self._ptr[0].dstPitch = dstPitch
 *     @property
 *     def WidthInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].WidthInBytes
 *     @WidthInBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.WidthInBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6351
 *         return self._ptr[0].WidthInBytes
 *     @WidthInBytes.setter
 *     def WidthInBytes(self, size_t WidthInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].WidthInBytes = WidthInBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_12WidthInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_WidthInBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_12WidthInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_WidthInBytes) {
  size_t __pyx_v_WidthInBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_WidthInBytes); {
    __pyx_v_WidthInBytes = __Pyx_PyInt_As_size_t(__pyx_arg_WidthInBytes); if (unlikely((__pyx_v_WidthInBytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6351, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.WidthInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_12WidthInBytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((size_t)__pyx_v_WidthInBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_12WidthInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_WidthInBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6351, 0, __PYX_ERR(0, 6351, __pyx_L1_error));

  /* "cuda/cuda.pyx":6353
 *     def WidthInBytes(self, size_t WidthInBytes):
 *         pass
 *         self._ptr[0].WidthInBytes = WidthInBytes             # <<<<<<<<<<<<<<
 *     @property
 *     def Height(self):
 */
  (__pyx_v_self->_ptr[0]).WidthInBytes = __pyx_v_WidthInBytes;

  /* "cuda/cuda.pyx":6351
 *         return self._ptr[0].WidthInBytes
 *     @WidthInBytes.setter
 *     def WidthInBytes(self, size_t WidthInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].WidthInBytes = WidthInBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.WidthInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6355
 *         self._ptr[0].WidthInBytes = WidthInBytes
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Height
 *     @Height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_6Height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_6Height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_6Height___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_6Height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6355, 0, __PYX_ERR(0, 6355, __pyx_L1_error));

  /* "cuda/cuda.pyx":6356
 *     @property
 *     def Height(self):
 *         return self._ptr[0].Height             # <<<<<<<<<<<<<<
 *     @Height.setter
 *     def Height(self, size_t Height):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).Height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6355
 *         self._ptr[0].WidthInBytes = WidthInBytes
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Height
 *     @Height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.Height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6358
 *         return self._ptr[0].Height
 *     @Height.setter
 *     def Height(self, size_t Height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Height = Height
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Height); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Height) {
  size_t __pyx_v_Height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_Height); {
    __pyx_v_Height = __Pyx_PyInt_As_size_t(__pyx_arg_Height); if (unlikely((__pyx_v_Height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6358, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.Height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_6Height_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((size_t)__pyx_v_Height));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_6Height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, size_t __pyx_v_Height) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6358, 0, __PYX_ERR(0, 6358, __pyx_L1_error));

  /* "cuda/cuda.pyx":6360
 *     def Height(self, size_t Height):
 *         pass
 *         self._ptr[0].Height = Height             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_MEMCPY3D_st:
 */
  (__pyx_v_self->_ptr[0]).Height = __pyx_v_Height;

  /* "cuda/cuda.pyx":6358
 *         return self._ptr[0].Height
 *     @Height.setter
 *     def Height(self, size_t Height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Height = Height
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.Height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY2D_st_10__reduce_cython__[] = "CUDA_MEMCPY2D_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUDA_MEMCPY2D_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY2D_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__242)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__243, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY2D_st_12__setstate_cython__[] = "CUDA_MEMCPY2D_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUDA_MEMCPY2D_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY2D_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY2D_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__244)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__245, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY2D_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6426
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 6426, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6426, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6426, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 6426, 0, __PYX_ERR(0, 6426, __pyx_L1_error));

  /* "cuda/cuda.pyx":6427
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6428
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMCPY3D_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":6427
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6430
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMCPY3D_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_MEMCPY3D_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6426
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6431
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMCPY3D_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 6431, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6431, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6431, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 6431, 0, __PYX_ERR(0, 6431, __pyx_L1_error));

  /* "cuda/cuda.pyx":6432
 *             self._ptr = <ccuda.CUDA_MEMCPY3D_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)             # <<<<<<<<<<<<<<
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).srcDevice))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 6432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_srcDevice);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_srcDevice));
  __pyx_v_self->_srcDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":6433
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)             # <<<<<<<<<<<<<<
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).srcArray))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 6433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_srcArray);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_srcArray));
  __pyx_v_self->_srcArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6434
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)             # <<<<<<<<<<<<<<
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).dstDevice))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 6434, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_dstDevice);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_dstDevice));
  __pyx_v_self->_dstDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":6435
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).dstArray))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 6435, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_dstArray);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_dstArray));
  __pyx_v_self->_dstArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6431
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMCPY3D_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6436
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 6436, 0, __PYX_ERR(0, 6436, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_MEMCPY3D_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":6438
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY3D_st_6getPtr[] = "CUDA_MEMCPY3D_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUDA_MEMCPY3D_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY3D_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__246)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 6438, 0, __PYX_ERR(0, 6438, __pyx_L1_error));

  /* "cuda/cuda.pyx":6439
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6438
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6440
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 6440, 0, __PYX_ERR(0, 6440, __pyx_L1_error));

  /* "cuda/cuda.pyx":6441
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6442
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 *             str_list += ['srcY : ' + str(self.srcY)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6443
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcY : ' + str(self.srcY)]
 *             str_list += ['srcZ : ' + str(self.srcZ)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcXInBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcXInBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6444
 *             str_list = []
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 *             str_list += ['srcY : ' + str(self.srcY)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcZ : ' + str(self.srcZ)]
 *             str_list += ['srcLOD : ' + str(self.srcLOD)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6445
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 *             str_list += ['srcY : ' + str(self.srcY)]
 *             str_list += ['srcZ : ' + str(self.srcZ)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcLOD : ' + str(self.srcLOD)]
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcZ_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcZ, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6446
 *             str_list += ['srcY : ' + str(self.srcY)]
 *             str_list += ['srcZ : ' + str(self.srcZ)]
 *             str_list += ['srcLOD : ' + str(self.srcLOD)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]
 *             str_list += ['srcHost : ' + hex(self.srcHost)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcLOD_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcLOD, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6447
 *             str_list += ['srcZ : ' + str(self.srcZ)]
 *             str_list += ['srcLOD : ' + str(self.srcLOD)]
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcHost : ' + hex(self.srcHost)]
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcMemoryType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcMemoryType, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6448
 *             str_list += ['srcLOD : ' + str(self.srcLOD)]
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]
 *             str_list += ['srcHost : ' + hex(self.srcHost)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]
 *             str_list += ['srcArray : ' + str(self.srcArray)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcHost_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_srcHost, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6449
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]
 *             str_list += ['srcHost : ' + hex(self.srcHost)]
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcArray : ' + str(self.srcArray)]
 *             str_list += ['reserved0 : ' + hex(self.reserved0)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcDevice_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcDevice, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6450
 *             str_list += ['srcHost : ' + hex(self.srcHost)]
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]
 *             str_list += ['srcArray : ' + str(self.srcArray)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved0 : ' + hex(self.reserved0)]
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6451
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]
 *             str_list += ['srcArray : ' + str(self.srcArray)]
 *             str_list += ['reserved0 : ' + hex(self.reserved0)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]
 *             str_list += ['srcHeight : ' + str(self.srcHeight)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved0_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_reserved0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6452
 *             str_list += ['srcArray : ' + str(self.srcArray)]
 *             str_list += ['reserved0 : ' + hex(self.reserved0)]
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcHeight : ' + str(self.srcHeight)]
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcPitch_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcPitch, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6453
 *             str_list += ['reserved0 : ' + hex(self.reserved0)]
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]
 *             str_list += ['srcHeight : ' + str(self.srcHeight)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]
 *             str_list += ['dstY : ' + str(self.dstY)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcHeight_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcHeight, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6454
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]
 *             str_list += ['srcHeight : ' + str(self.srcHeight)]
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstY : ' + str(self.dstY)]
 *             str_list += ['dstZ : ' + str(self.dstZ)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstXInBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstXInBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6455
 *             str_list += ['srcHeight : ' + str(self.srcHeight)]
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]
 *             str_list += ['dstY : ' + str(self.dstY)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstZ : ' + str(self.dstZ)]
 *             str_list += ['dstLOD : ' + str(self.dstLOD)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6456
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]
 *             str_list += ['dstY : ' + str(self.dstY)]
 *             str_list += ['dstZ : ' + str(self.dstZ)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstLOD : ' + str(self.dstLOD)]
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstZ_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstZ, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6457
 *             str_list += ['dstY : ' + str(self.dstY)]
 *             str_list += ['dstZ : ' + str(self.dstZ)]
 *             str_list += ['dstLOD : ' + str(self.dstLOD)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]
 *             str_list += ['dstHost : ' + hex(self.dstHost)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstLOD_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstLOD, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6458
 *             str_list += ['dstZ : ' + str(self.dstZ)]
 *             str_list += ['dstLOD : ' + str(self.dstLOD)]
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstHost : ' + hex(self.dstHost)]
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstMemoryType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstMemoryType, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6459
 *             str_list += ['dstLOD : ' + str(self.dstLOD)]
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]
 *             str_list += ['dstHost : ' + hex(self.dstHost)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]
 *             str_list += ['dstArray : ' + str(self.dstArray)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstHost_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_dstHost, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6460
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]
 *             str_list += ['dstHost : ' + hex(self.dstHost)]
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstArray : ' + str(self.dstArray)]
 *             str_list += ['reserved1 : ' + hex(self.reserved1)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstDevice_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstDevice, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6461
 *             str_list += ['dstHost : ' + hex(self.dstHost)]
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]
 *             str_list += ['dstArray : ' + str(self.dstArray)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved1 : ' + hex(self.reserved1)]
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6462
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]
 *             str_list += ['dstArray : ' + str(self.dstArray)]
 *             str_list += ['reserved1 : ' + hex(self.reserved1)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]
 *             str_list += ['dstHeight : ' + str(self.dstHeight)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved1_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_reserved1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6463
 *             str_list += ['dstArray : ' + str(self.dstArray)]
 *             str_list += ['reserved1 : ' + hex(self.reserved1)]
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstHeight : ' + str(self.dstHeight)]
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstPitch_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstPitch, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6464
 *             str_list += ['reserved1 : ' + hex(self.reserved1)]
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]
 *             str_list += ['dstHeight : ' + str(self.dstHeight)]             # <<<<<<<<<<<<<<
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]
 *             str_list += ['Height : ' + str(self.Height)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstHeight_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstHeight, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6465
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]
 *             str_list += ['dstHeight : ' + str(self.dstHeight)]
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['Height : ' + str(self.Height)]
 *             str_list += ['Depth : ' + str(self.Depth)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_WidthInBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_WidthInBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6466
 *             str_list += ['dstHeight : ' + str(self.dstHeight)]
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]
 *             str_list += ['Height : ' + str(self.Height)]             # <<<<<<<<<<<<<<
 *             str_list += ['Depth : ' + str(self.Depth)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Height_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Height, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6467
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]
 *             str_list += ['Height : ' + str(self.Height)]
 *             str_list += ['Depth : ' + str(self.Depth)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Depth_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Depth, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6468
 *             str_list += ['Height : ' + str(self.Height)]
 *             str_list += ['Depth : ' + str(self.Depth)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":6441
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 */
  }

  /* "cuda/cuda.pyx":6470
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":6440
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6473
 * 
 *     @property
 *     def srcXInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcXInBytes
 *     @srcXInBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11srcXInBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11srcXInBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_11srcXInBytes___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_11srcXInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6473, 0, __PYX_ERR(0, 6473, __pyx_L1_error));

  /* "cuda/cuda.pyx":6474
 *     @property
 *     def srcXInBytes(self):
 *         return self._ptr[0].srcXInBytes             # <<<<<<<<<<<<<<
 *     @srcXInBytes.setter
 *     def srcXInBytes(self, size_t srcXInBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcXInBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6473
 * 
 *     @property
 *     def srcXInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcXInBytes
 *     @srcXInBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcXInBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6476
 *         return self._ptr[0].srcXInBytes
 *     @srcXInBytes.setter
 *     def srcXInBytes(self, size_t srcXInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcXInBytes = srcXInBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11srcXInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcXInBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11srcXInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcXInBytes) {
  size_t __pyx_v_srcXInBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcXInBytes); {
    __pyx_v_srcXInBytes = __Pyx_PyInt_As_size_t(__pyx_arg_srcXInBytes); if (unlikely((__pyx_v_srcXInBytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6476, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcXInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_11srcXInBytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_srcXInBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_11srcXInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_srcXInBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6476, 0, __PYX_ERR(0, 6476, __pyx_L1_error));

  /* "cuda/cuda.pyx":6478
 *     def srcXInBytes(self, size_t srcXInBytes):
 *         pass
 *         self._ptr[0].srcXInBytes = srcXInBytes             # <<<<<<<<<<<<<<
 *     @property
 *     def srcY(self):
 */
  (__pyx_v_self->_ptr[0]).srcXInBytes = __pyx_v_srcXInBytes;

  /* "cuda/cuda.pyx":6476
 *         return self._ptr[0].srcXInBytes
 *     @srcXInBytes.setter
 *     def srcXInBytes(self, size_t srcXInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcXInBytes = srcXInBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcXInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6480
 *         self._ptr[0].srcXInBytes = srcXInBytes
 *     @property
 *     def srcY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcY
 *     @srcY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcY___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6480, 0, __PYX_ERR(0, 6480, __pyx_L1_error));

  /* "cuda/cuda.pyx":6481
 *     @property
 *     def srcY(self):
 *         return self._ptr[0].srcY             # <<<<<<<<<<<<<<
 *     @srcY.setter
 *     def srcY(self, size_t srcY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6480
 *         self._ptr[0].srcXInBytes = srcXInBytes
 *     @property
 *     def srcY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcY
 *     @srcY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6483
 *         return self._ptr[0].srcY
 *     @srcY.setter
 *     def srcY(self, size_t srcY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcY = srcY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcY); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcY) {
  size_t __pyx_v_srcY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcY); {
    __pyx_v_srcY = __Pyx_PyInt_As_size_t(__pyx_arg_srcY); if (unlikely((__pyx_v_srcY == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6483, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcY_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_srcY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_srcY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6483, 0, __PYX_ERR(0, 6483, __pyx_L1_error));

  /* "cuda/cuda.pyx":6485
 *     def srcY(self, size_t srcY):
 *         pass
 *         self._ptr[0].srcY = srcY             # <<<<<<<<<<<<<<
 *     @property
 *     def srcZ(self):
 */
  (__pyx_v_self->_ptr[0]).srcY = __pyx_v_srcY;

  /* "cuda/cuda.pyx":6483
 *         return self._ptr[0].srcY
 *     @srcY.setter
 *     def srcY(self, size_t srcY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcY = srcY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6487
 *         self._ptr[0].srcY = srcY
 *     @property
 *     def srcZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcZ
 *     @srcZ.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcZ___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6487, 0, __PYX_ERR(0, 6487, __pyx_L1_error));

  /* "cuda/cuda.pyx":6488
 *     @property
 *     def srcZ(self):
 *         return self._ptr[0].srcZ             # <<<<<<<<<<<<<<
 *     @srcZ.setter
 *     def srcZ(self, size_t srcZ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6487
 *         self._ptr[0].srcY = srcY
 *     @property
 *     def srcZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcZ
 *     @srcZ.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6490
 *         return self._ptr[0].srcZ
 *     @srcZ.setter
 *     def srcZ(self, size_t srcZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcZ = srcZ
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcZ); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcZ) {
  size_t __pyx_v_srcZ;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcZ); {
    __pyx_v_srcZ = __Pyx_PyInt_As_size_t(__pyx_arg_srcZ); if (unlikely((__pyx_v_srcZ == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6490, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcZ_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_srcZ));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_srcZ) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6490, 0, __PYX_ERR(0, 6490, __pyx_L1_error));

  /* "cuda/cuda.pyx":6492
 *     def srcZ(self, size_t srcZ):
 *         pass
 *         self._ptr[0].srcZ = srcZ             # <<<<<<<<<<<<<<
 *     @property
 *     def srcLOD(self):
 */
  (__pyx_v_self->_ptr[0]).srcZ = __pyx_v_srcZ;

  /* "cuda/cuda.pyx":6490
 *         return self._ptr[0].srcZ
 *     @srcZ.setter
 *     def srcZ(self, size_t srcZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcZ = srcZ
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6494
 *         self._ptr[0].srcZ = srcZ
 *     @property
 *     def srcLOD(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcLOD
 *     @srcLOD.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6srcLOD_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6srcLOD_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6srcLOD___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6srcLOD___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6494, 0, __PYX_ERR(0, 6494, __pyx_L1_error));

  /* "cuda/cuda.pyx":6495
 *     @property
 *     def srcLOD(self):
 *         return self._ptr[0].srcLOD             # <<<<<<<<<<<<<<
 *     @srcLOD.setter
 *     def srcLOD(self, size_t srcLOD):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcLOD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6494
 *         self._ptr[0].srcZ = srcZ
 *     @property
 *     def srcLOD(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcLOD
 *     @srcLOD.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcLOD.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6497
 *         return self._ptr[0].srcLOD
 *     @srcLOD.setter
 *     def srcLOD(self, size_t srcLOD):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcLOD = srcLOD
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6srcLOD_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcLOD); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6srcLOD_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcLOD) {
  size_t __pyx_v_srcLOD;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcLOD); {
    __pyx_v_srcLOD = __Pyx_PyInt_As_size_t(__pyx_arg_srcLOD); if (unlikely((__pyx_v_srcLOD == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6497, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcLOD.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6srcLOD_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_srcLOD));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6srcLOD_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_srcLOD) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6497, 0, __PYX_ERR(0, 6497, __pyx_L1_error));

  /* "cuda/cuda.pyx":6499
 *     def srcLOD(self, size_t srcLOD):
 *         pass
 *         self._ptr[0].srcLOD = srcLOD             # <<<<<<<<<<<<<<
 *     @property
 *     def srcMemoryType(self):
 */
  (__pyx_v_self->_ptr[0]).srcLOD = __pyx_v_srcLOD;

  /* "cuda/cuda.pyx":6497
 *         return self._ptr[0].srcLOD
 *     @srcLOD.setter
 *     def srcLOD(self, size_t srcLOD):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcLOD = srcLOD
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcLOD.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6501
 *         self._ptr[0].srcLOD = srcLOD
 *     @property
 *     def srcMemoryType(self):             # <<<<<<<<<<<<<<
 *         return CUmemorytype(self._ptr[0].srcMemoryType)
 *     @srcMemoryType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13srcMemoryType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13srcMemoryType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_13srcMemoryType___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_13srcMemoryType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6501, 0, __PYX_ERR(0, 6501, __pyx_L1_error));

  /* "cuda/cuda.pyx":6502
 *     @property
 *     def srcMemoryType(self):
 *         return CUmemorytype(self._ptr[0].srcMemoryType)             # <<<<<<<<<<<<<<
 *     @srcMemoryType.setter
 *     def srcMemoryType(self, srcMemoryType not None : CUmemorytype):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemorytype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemorytype_enum((__pyx_v_self->_ptr[0]).srcMemoryType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6501
 *         self._ptr[0].srcLOD = srcLOD
 *     @property
 *     def srcMemoryType(self):             # <<<<<<<<<<<<<<
 *         return CUmemorytype(self._ptr[0].srcMemoryType)
 *     @srcMemoryType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcMemoryType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6504
 *         return CUmemorytype(self._ptr[0].srcMemoryType)
 *     @srcMemoryType.setter
 *     def srcMemoryType(self, srcMemoryType not None : CUmemorytype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcMemoryType = srcMemoryType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13srcMemoryType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcMemoryType); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13srcMemoryType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcMemoryType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_srcMemoryType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "srcMemoryType"); __PYX_ERR(0, 6504, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_13srcMemoryType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcMemoryType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_13srcMemoryType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_srcMemoryType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemorytype __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6504, 0, __PYX_ERR(0, 6504, __pyx_L1_error));

  /* "cuda/cuda.pyx":6506
 *     def srcMemoryType(self, srcMemoryType not None : CUmemorytype):
 *         pass
 *         self._ptr[0].srcMemoryType = srcMemoryType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def srcHost(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_srcMemoryType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemorytype_enum)__Pyx_PyInt_As_enum__CUmemorytype_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).srcMemoryType = __pyx_t_2;

  /* "cuda/cuda.pyx":6504
 *         return CUmemorytype(self._ptr[0].srcMemoryType)
 *     @srcMemoryType.setter
 *     def srcMemoryType(self, srcMemoryType not None : CUmemorytype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcMemoryType = srcMemoryType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcMemoryType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6508
 *         self._ptr[0].srcMemoryType = srcMemoryType.value
 *     @property
 *     def srcHost(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].srcHost
 *     @srcHost.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7srcHost_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7srcHost_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_7srcHost___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_7srcHost___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6508, 0, __PYX_ERR(0, 6508, __pyx_L1_error));

  /* "cuda/cuda.pyx":6509
 *     @property
 *     def srcHost(self):
 *         return <void_ptr>self._ptr[0].srcHost             # <<<<<<<<<<<<<<
 *     @srcHost.setter
 *     def srcHost(self, srcHost):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).srcHost)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6508
 *         self._ptr[0].srcMemoryType = srcMemoryType.value
 *     @property
 *     def srcHost(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].srcHost
 *     @srcHost.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcHost.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6511
 *         return <void_ptr>self._ptr[0].srcHost
 *     @srcHost.setter
 *     def srcHost(self, srcHost):             # <<<<<<<<<<<<<<
 *         _csrcHost = utils.HelperInputVoidPtr(srcHost)
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7srcHost_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcHost); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7srcHost_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcHost) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_7srcHost_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcHost));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_7srcHost_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_srcHost) {
  PyObject *__pyx_v__csrcHost = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6511, 0, __PYX_ERR(0, 6511, __pyx_L1_error));

  /* "cuda/cuda.pyx":6512
 *     @srcHost.setter
 *     def srcHost(self, srcHost):
 *         _csrcHost = utils.HelperInputVoidPtr(srcHost)             # <<<<<<<<<<<<<<
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_srcHost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__csrcHost = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6513
 *     def srcHost(self, srcHost):
 *         _csrcHost = utils.HelperInputVoidPtr(srcHost)
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def srcDevice(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__csrcHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).srcHost = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":6511
 *         return <void_ptr>self._ptr[0].srcHost
 *     @srcHost.setter
 *     def srcHost(self, srcHost):             # <<<<<<<<<<<<<<
 *         _csrcHost = utils.HelperInputVoidPtr(srcHost)
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcHost.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__csrcHost);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6515
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 *     @property
 *     def srcDevice(self):             # <<<<<<<<<<<<<<
 *         return self._srcDevice
 *     @srcDevice.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcDevice_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcDevice_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcDevice___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcDevice___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6515, 0, __PYX_ERR(0, 6515, __pyx_L1_error));

  /* "cuda/cuda.pyx":6516
 *     @property
 *     def srcDevice(self):
 *         return self._srcDevice             # <<<<<<<<<<<<<<
 *     @srcDevice.setter
 *     def srcDevice(self, srcDevice):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_srcDevice));
  __pyx_r = ((PyObject *)__pyx_v_self->_srcDevice);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6515
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 *     @property
 *     def srcDevice(self):             # <<<<<<<<<<<<<<
 *         return self._srcDevice
 *     @srcDevice.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcDevice.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6518
 *         return self._srcDevice
 *     @srcDevice.setter
 *     def srcDevice(self, srcDevice):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcDevice_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcDevice); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcDevice_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcDevice) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcDevice_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcDevice));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcDevice_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_srcDevice) {
  CUdeviceptr __pyx_v_csrcDevice;
  PyObject *__pyx_v_psrcDevice = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6518, 0, __PYX_ERR(0, 6518, __pyx_L1_error));

  /* "cuda/cuda.pyx":6520
 *     def srcDevice(self, srcDevice):
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:             # <<<<<<<<<<<<<<
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_srcDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6521
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 *             psrcDevice = int(srcDevice)
 */
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6520
 *     def srcDevice(self, srcDevice):
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:             # <<<<<<<<<<<<<<
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6522
 *         if srcDevice is None:
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             psrcDevice = int(srcDevice)
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6523
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 *             psrcDevice = int(srcDevice)             # <<<<<<<<<<<<<<
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6524
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 *             psrcDevice = int(srcDevice)
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *         else:
 *             psrcDevice = int(CUdeviceptr(srcDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6524, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6522
 *         if srcDevice is None:
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             psrcDevice = int(srcDevice)
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6526
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *         else:
 *             psrcDevice = int(CUdeviceptr(srcDevice))             # <<<<<<<<<<<<<<
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *         self._srcDevice._ptr[0] = csrcDevice
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6527
 *         else:
 *             psrcDevice = int(CUdeviceptr(srcDevice))
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *         self._srcDevice._ptr[0] = csrcDevice
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6527, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6528
 *             psrcDevice = int(CUdeviceptr(srcDevice))
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *         self._srcDevice._ptr[0] = csrcDevice             # <<<<<<<<<<<<<<
 *     @property
 *     def srcArray(self):
 */
  (__pyx_v_self->_srcDevice->_ptr[0]) = __pyx_v_csrcDevice;

  /* "cuda/cuda.pyx":6518
 *         return self._srcDevice
 *     @srcDevice.setter
 *     def srcDevice(self, srcDevice):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcDevice.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcDevice);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6530
 *         self._srcDevice._ptr[0] = csrcDevice
 *     @property
 *     def srcArray(self):             # <<<<<<<<<<<<<<
 *         return self._srcArray
 *     @srcArray.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcArray___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6530, 0, __PYX_ERR(0, 6530, __pyx_L1_error));

  /* "cuda/cuda.pyx":6531
 *     @property
 *     def srcArray(self):
 *         return self._srcArray             # <<<<<<<<<<<<<<
 *     @srcArray.setter
 *     def srcArray(self, srcArray):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_srcArray));
  __pyx_r = ((PyObject *)__pyx_v_self->_srcArray);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6530
 *         self._srcDevice._ptr[0] = csrcDevice
 *     @property
 *     def srcArray(self):             # <<<<<<<<<<<<<<
 *         return self._srcArray
 *     @srcArray.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6533
 *         return self._srcArray
 *     @srcArray.setter
 *     def srcArray(self, srcArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcArray); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcArray) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcArray_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_srcArray) {
  CUarray __pyx_v_csrcArray;
  PyObject *__pyx_v_psrcArray = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6533, 0, __PYX_ERR(0, 6533, __pyx_L1_error));

  /* "cuda/cuda.pyx":6535
 *     def srcArray(self, srcArray):
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:             # <<<<<<<<<<<<<<
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_srcArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6536
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:
 *             csrcArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(srcArray, (CUarray)):
 *             psrcArray = int(srcArray)
 */
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6535
 *     def srcArray(self, srcArray):
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:             # <<<<<<<<<<<<<<
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6537
 *         if srcArray is None:
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             psrcArray = int(srcArray)
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6538
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):
 *             psrcArray = int(srcArray)             # <<<<<<<<<<<<<<
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6539
 *         elif isinstance(srcArray, (CUarray)):
 *             psrcArray = int(srcArray)
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 *         else:
 *             psrcArray = int(CUarray(srcArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6539, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6537
 *         if srcArray is None:
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             psrcArray = int(srcArray)
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6541
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *         else:
 *             psrcArray = int(CUarray(srcArray))             # <<<<<<<<<<<<<<
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *         self._srcArray._ptr[0] = csrcArray
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_srcArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6542
 *         else:
 *             psrcArray = int(CUarray(srcArray))
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 *         self._srcArray._ptr[0] = csrcArray
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6542, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6543
 *             psrcArray = int(CUarray(srcArray))
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *         self._srcArray._ptr[0] = csrcArray             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved0(self):
 */
  (__pyx_v_self->_srcArray->_ptr[0]) = __pyx_v_csrcArray;

  /* "cuda/cuda.pyx":6533
 *         return self._srcArray
 *     @srcArray.setter
 *     def srcArray(self, srcArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcArray);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6545
 *         self._srcArray._ptr[0] = csrcArray
 *     @property
 *     def reserved0(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].reserved0
 *     @reserved0.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved0_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved0_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved0___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved0___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6545, 0, __PYX_ERR(0, 6545, __pyx_L1_error));

  /* "cuda/cuda.pyx":6546
 *     @property
 *     def reserved0(self):
 *         return <void_ptr>self._ptr[0].reserved0             # <<<<<<<<<<<<<<
 *     @reserved0.setter
 *     def reserved0(self, reserved0):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).reserved0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6545
 *         self._srcArray._ptr[0] = csrcArray
 *     @property
 *     def reserved0(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].reserved0
 *     @reserved0.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.reserved0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6548
 *         return <void_ptr>self._ptr[0].reserved0
 *     @reserved0.setter
 *     def reserved0(self, reserved0):             # <<<<<<<<<<<<<<
 *         _creserved0 = utils.HelperInputVoidPtr(reserved0)
 *         self._ptr[0].reserved0 = <void*><void_ptr>_creserved0.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved0); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved0) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved0_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved0));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved0_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_reserved0) {
  PyObject *__pyx_v__creserved0 = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6548, 0, __PYX_ERR(0, 6548, __pyx_L1_error));

  /* "cuda/cuda.pyx":6549
 *     @reserved0.setter
 *     def reserved0(self, reserved0):
 *         _creserved0 = utils.HelperInputVoidPtr(reserved0)             # <<<<<<<<<<<<<<
 *         self._ptr[0].reserved0 = <void*><void_ptr>_creserved0.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_reserved0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__creserved0 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6550
 *     def reserved0(self, reserved0):
 *         _creserved0 = utils.HelperInputVoidPtr(reserved0)
 *         self._ptr[0].reserved0 = <void*><void_ptr>_creserved0.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def srcPitch(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__creserved0, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).reserved0 = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":6548
 *         return <void_ptr>self._ptr[0].reserved0
 *     @reserved0.setter
 *     def reserved0(self, reserved0):             # <<<<<<<<<<<<<<
 *         _creserved0 = utils.HelperInputVoidPtr(reserved0)
 *         self._ptr[0].reserved0 = <void*><void_ptr>_creserved0.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.reserved0.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__creserved0);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6552
 *         self._ptr[0].reserved0 = <void*><void_ptr>_creserved0.cptr
 *     @property
 *     def srcPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcPitch
 *     @srcPitch.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcPitch_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcPitch_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcPitch___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcPitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6552, 0, __PYX_ERR(0, 6552, __pyx_L1_error));

  /* "cuda/cuda.pyx":6553
 *     @property
 *     def srcPitch(self):
 *         return self._ptr[0].srcPitch             # <<<<<<<<<<<<<<
 *     @srcPitch.setter
 *     def srcPitch(self, size_t srcPitch):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcPitch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6552
 *         self._ptr[0].reserved0 = <void*><void_ptr>_creserved0.cptr
 *     @property
 *     def srcPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcPitch
 *     @srcPitch.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcPitch.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6555
 *         return self._ptr[0].srcPitch
 *     @srcPitch.setter
 *     def srcPitch(self, size_t srcPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcPitch = srcPitch
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcPitch); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcPitch) {
  size_t __pyx_v_srcPitch;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcPitch); {
    __pyx_v_srcPitch = __Pyx_PyInt_As_size_t(__pyx_arg_srcPitch); if (unlikely((__pyx_v_srcPitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6555, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcPitch_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_srcPitch));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_srcPitch) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6555, 0, __PYX_ERR(0, 6555, __pyx_L1_error));

  /* "cuda/cuda.pyx":6557
 *     def srcPitch(self, size_t srcPitch):
 *         pass
 *         self._ptr[0].srcPitch = srcPitch             # <<<<<<<<<<<<<<
 *     @property
 *     def srcHeight(self):
 */
  (__pyx_v_self->_ptr[0]).srcPitch = __pyx_v_srcPitch;

  /* "cuda/cuda.pyx":6555
 *         return self._ptr[0].srcPitch
 *     @srcPitch.setter
 *     def srcPitch(self, size_t srcPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcPitch = srcPitch
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6559
 *         self._ptr[0].srcPitch = srcPitch
 *     @property
 *     def srcHeight(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcHeight
 *     @srcHeight.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcHeight_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcHeight_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcHeight___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcHeight___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6559, 0, __PYX_ERR(0, 6559, __pyx_L1_error));

  /* "cuda/cuda.pyx":6560
 *     @property
 *     def srcHeight(self):
 *         return self._ptr[0].srcHeight             # <<<<<<<<<<<<<<
 *     @srcHeight.setter
 *     def srcHeight(self, size_t srcHeight):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcHeight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6559
 *         self._ptr[0].srcPitch = srcPitch
 *     @property
 *     def srcHeight(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcHeight
 *     @srcHeight.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcHeight.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6562
 *         return self._ptr[0].srcHeight
 *     @srcHeight.setter
 *     def srcHeight(self, size_t srcHeight):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcHeight = srcHeight
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcHeight_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcHeight); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcHeight_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcHeight) {
  size_t __pyx_v_srcHeight;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcHeight); {
    __pyx_v_srcHeight = __Pyx_PyInt_As_size_t(__pyx_arg_srcHeight); if (unlikely((__pyx_v_srcHeight == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6562, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcHeight.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcHeight_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_srcHeight));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcHeight_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_srcHeight) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6562, 0, __PYX_ERR(0, 6562, __pyx_L1_error));

  /* "cuda/cuda.pyx":6564
 *     def srcHeight(self, size_t srcHeight):
 *         pass
 *         self._ptr[0].srcHeight = srcHeight             # <<<<<<<<<<<<<<
 *     @property
 *     def dstXInBytes(self):
 */
  (__pyx_v_self->_ptr[0]).srcHeight = __pyx_v_srcHeight;

  /* "cuda/cuda.pyx":6562
 *         return self._ptr[0].srcHeight
 *     @srcHeight.setter
 *     def srcHeight(self, size_t srcHeight):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcHeight = srcHeight
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.srcHeight.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6566
 *         self._ptr[0].srcHeight = srcHeight
 *     @property
 *     def dstXInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstXInBytes
 *     @dstXInBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11dstXInBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11dstXInBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_11dstXInBytes___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_11dstXInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6566, 0, __PYX_ERR(0, 6566, __pyx_L1_error));

  /* "cuda/cuda.pyx":6567
 *     @property
 *     def dstXInBytes(self):
 *         return self._ptr[0].dstXInBytes             # <<<<<<<<<<<<<<
 *     @dstXInBytes.setter
 *     def dstXInBytes(self, size_t dstXInBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstXInBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6566
 *         self._ptr[0].srcHeight = srcHeight
 *     @property
 *     def dstXInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstXInBytes
 *     @dstXInBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstXInBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6569
 *         return self._ptr[0].dstXInBytes
 *     @dstXInBytes.setter
 *     def dstXInBytes(self, size_t dstXInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstXInBytes = dstXInBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11dstXInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstXInBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11dstXInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstXInBytes) {
  size_t __pyx_v_dstXInBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstXInBytes); {
    __pyx_v_dstXInBytes = __Pyx_PyInt_As_size_t(__pyx_arg_dstXInBytes); if (unlikely((__pyx_v_dstXInBytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6569, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstXInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_11dstXInBytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_dstXInBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_11dstXInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_dstXInBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6569, 0, __PYX_ERR(0, 6569, __pyx_L1_error));

  /* "cuda/cuda.pyx":6571
 *     def dstXInBytes(self, size_t dstXInBytes):
 *         pass
 *         self._ptr[0].dstXInBytes = dstXInBytes             # <<<<<<<<<<<<<<
 *     @property
 *     def dstY(self):
 */
  (__pyx_v_self->_ptr[0]).dstXInBytes = __pyx_v_dstXInBytes;

  /* "cuda/cuda.pyx":6569
 *         return self._ptr[0].dstXInBytes
 *     @dstXInBytes.setter
 *     def dstXInBytes(self, size_t dstXInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstXInBytes = dstXInBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstXInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6573
 *         self._ptr[0].dstXInBytes = dstXInBytes
 *     @property
 *     def dstY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstY
 *     @dstY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstY___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6573, 0, __PYX_ERR(0, 6573, __pyx_L1_error));

  /* "cuda/cuda.pyx":6574
 *     @property
 *     def dstY(self):
 *         return self._ptr[0].dstY             # <<<<<<<<<<<<<<
 *     @dstY.setter
 *     def dstY(self, size_t dstY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6573
 *         self._ptr[0].dstXInBytes = dstXInBytes
 *     @property
 *     def dstY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstY
 *     @dstY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6576
 *         return self._ptr[0].dstY
 *     @dstY.setter
 *     def dstY(self, size_t dstY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstY = dstY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstY); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstY) {
  size_t __pyx_v_dstY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstY); {
    __pyx_v_dstY = __Pyx_PyInt_As_size_t(__pyx_arg_dstY); if (unlikely((__pyx_v_dstY == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6576, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstY_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_dstY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_dstY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6576, 0, __PYX_ERR(0, 6576, __pyx_L1_error));

  /* "cuda/cuda.pyx":6578
 *     def dstY(self, size_t dstY):
 *         pass
 *         self._ptr[0].dstY = dstY             # <<<<<<<<<<<<<<
 *     @property
 *     def dstZ(self):
 */
  (__pyx_v_self->_ptr[0]).dstY = __pyx_v_dstY;

  /* "cuda/cuda.pyx":6576
 *         return self._ptr[0].dstY
 *     @dstY.setter
 *     def dstY(self, size_t dstY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstY = dstY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6580
 *         self._ptr[0].dstY = dstY
 *     @property
 *     def dstZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstZ
 *     @dstZ.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstZ___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6580, 0, __PYX_ERR(0, 6580, __pyx_L1_error));

  /* "cuda/cuda.pyx":6581
 *     @property
 *     def dstZ(self):
 *         return self._ptr[0].dstZ             # <<<<<<<<<<<<<<
 *     @dstZ.setter
 *     def dstZ(self, size_t dstZ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6580
 *         self._ptr[0].dstY = dstY
 *     @property
 *     def dstZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstZ
 *     @dstZ.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6583
 *         return self._ptr[0].dstZ
 *     @dstZ.setter
 *     def dstZ(self, size_t dstZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstZ = dstZ
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstZ); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstZ) {
  size_t __pyx_v_dstZ;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstZ); {
    __pyx_v_dstZ = __Pyx_PyInt_As_size_t(__pyx_arg_dstZ); if (unlikely((__pyx_v_dstZ == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6583, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstZ_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_dstZ));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_dstZ) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6583, 0, __PYX_ERR(0, 6583, __pyx_L1_error));

  /* "cuda/cuda.pyx":6585
 *     def dstZ(self, size_t dstZ):
 *         pass
 *         self._ptr[0].dstZ = dstZ             # <<<<<<<<<<<<<<
 *     @property
 *     def dstLOD(self):
 */
  (__pyx_v_self->_ptr[0]).dstZ = __pyx_v_dstZ;

  /* "cuda/cuda.pyx":6583
 *         return self._ptr[0].dstZ
 *     @dstZ.setter
 *     def dstZ(self, size_t dstZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstZ = dstZ
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6587
 *         self._ptr[0].dstZ = dstZ
 *     @property
 *     def dstLOD(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstLOD
 *     @dstLOD.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6dstLOD_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6dstLOD_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6dstLOD___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6dstLOD___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6587, 0, __PYX_ERR(0, 6587, __pyx_L1_error));

  /* "cuda/cuda.pyx":6588
 *     @property
 *     def dstLOD(self):
 *         return self._ptr[0].dstLOD             # <<<<<<<<<<<<<<
 *     @dstLOD.setter
 *     def dstLOD(self, size_t dstLOD):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstLOD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6587
 *         self._ptr[0].dstZ = dstZ
 *     @property
 *     def dstLOD(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstLOD
 *     @dstLOD.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstLOD.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6590
 *         return self._ptr[0].dstLOD
 *     @dstLOD.setter
 *     def dstLOD(self, size_t dstLOD):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstLOD = dstLOD
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6dstLOD_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstLOD); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6dstLOD_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstLOD) {
  size_t __pyx_v_dstLOD;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstLOD); {
    __pyx_v_dstLOD = __Pyx_PyInt_As_size_t(__pyx_arg_dstLOD); if (unlikely((__pyx_v_dstLOD == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6590, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstLOD.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6dstLOD_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_dstLOD));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6dstLOD_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_dstLOD) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6590, 0, __PYX_ERR(0, 6590, __pyx_L1_error));

  /* "cuda/cuda.pyx":6592
 *     def dstLOD(self, size_t dstLOD):
 *         pass
 *         self._ptr[0].dstLOD = dstLOD             # <<<<<<<<<<<<<<
 *     @property
 *     def dstMemoryType(self):
 */
  (__pyx_v_self->_ptr[0]).dstLOD = __pyx_v_dstLOD;

  /* "cuda/cuda.pyx":6590
 *         return self._ptr[0].dstLOD
 *     @dstLOD.setter
 *     def dstLOD(self, size_t dstLOD):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstLOD = dstLOD
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstLOD.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6594
 *         self._ptr[0].dstLOD = dstLOD
 *     @property
 *     def dstMemoryType(self):             # <<<<<<<<<<<<<<
 *         return CUmemorytype(self._ptr[0].dstMemoryType)
 *     @dstMemoryType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13dstMemoryType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13dstMemoryType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_13dstMemoryType___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_13dstMemoryType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6594, 0, __PYX_ERR(0, 6594, __pyx_L1_error));

  /* "cuda/cuda.pyx":6595
 *     @property
 *     def dstMemoryType(self):
 *         return CUmemorytype(self._ptr[0].dstMemoryType)             # <<<<<<<<<<<<<<
 *     @dstMemoryType.setter
 *     def dstMemoryType(self, dstMemoryType not None : CUmemorytype):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemorytype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemorytype_enum((__pyx_v_self->_ptr[0]).dstMemoryType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6594
 *         self._ptr[0].dstLOD = dstLOD
 *     @property
 *     def dstMemoryType(self):             # <<<<<<<<<<<<<<
 *         return CUmemorytype(self._ptr[0].dstMemoryType)
 *     @dstMemoryType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstMemoryType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6597
 *         return CUmemorytype(self._ptr[0].dstMemoryType)
 *     @dstMemoryType.setter
 *     def dstMemoryType(self, dstMemoryType not None : CUmemorytype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstMemoryType = dstMemoryType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13dstMemoryType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstMemoryType); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13dstMemoryType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstMemoryType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_dstMemoryType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "dstMemoryType"); __PYX_ERR(0, 6597, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_13dstMemoryType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstMemoryType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_13dstMemoryType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_dstMemoryType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemorytype __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6597, 0, __PYX_ERR(0, 6597, __pyx_L1_error));

  /* "cuda/cuda.pyx":6599
 *     def dstMemoryType(self, dstMemoryType not None : CUmemorytype):
 *         pass
 *         self._ptr[0].dstMemoryType = dstMemoryType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def dstHost(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dstMemoryType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemorytype_enum)__Pyx_PyInt_As_enum__CUmemorytype_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).dstMemoryType = __pyx_t_2;

  /* "cuda/cuda.pyx":6597
 *         return CUmemorytype(self._ptr[0].dstMemoryType)
 *     @dstMemoryType.setter
 *     def dstMemoryType(self, dstMemoryType not None : CUmemorytype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstMemoryType = dstMemoryType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstMemoryType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6601
 *         self._ptr[0].dstMemoryType = dstMemoryType.value
 *     @property
 *     def dstHost(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].dstHost
 *     @dstHost.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7dstHost_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7dstHost_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_7dstHost___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_7dstHost___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6601, 0, __PYX_ERR(0, 6601, __pyx_L1_error));

  /* "cuda/cuda.pyx":6602
 *     @property
 *     def dstHost(self):
 *         return <void_ptr>self._ptr[0].dstHost             # <<<<<<<<<<<<<<
 *     @dstHost.setter
 *     def dstHost(self, dstHost):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).dstHost)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6601
 *         self._ptr[0].dstMemoryType = dstMemoryType.value
 *     @property
 *     def dstHost(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].dstHost
 *     @dstHost.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstHost.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6604
 *         return <void_ptr>self._ptr[0].dstHost
 *     @dstHost.setter
 *     def dstHost(self, dstHost):             # <<<<<<<<<<<<<<
 *         _cdstHost = utils.HelperInputVoidPtr(dstHost)
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7dstHost_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstHost); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7dstHost_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstHost) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_7dstHost_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstHost));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_7dstHost_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_dstHost) {
  PyObject *__pyx_v__cdstHost = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6604, 0, __PYX_ERR(0, 6604, __pyx_L1_error));

  /* "cuda/cuda.pyx":6605
 *     @dstHost.setter
 *     def dstHost(self, dstHost):
 *         _cdstHost = utils.HelperInputVoidPtr(dstHost)             # <<<<<<<<<<<<<<
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_dstHost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cdstHost = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6606
 *     def dstHost(self, dstHost):
 *         _cdstHost = utils.HelperInputVoidPtr(dstHost)
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def dstDevice(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cdstHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).dstHost = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":6604
 *         return <void_ptr>self._ptr[0].dstHost
 *     @dstHost.setter
 *     def dstHost(self, dstHost):             # <<<<<<<<<<<<<<
 *         _cdstHost = utils.HelperInputVoidPtr(dstHost)
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstHost.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cdstHost);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6608
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 *     @property
 *     def dstDevice(self):             # <<<<<<<<<<<<<<
 *         return self._dstDevice
 *     @dstDevice.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstDevice_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstDevice_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstDevice___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstDevice___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6608, 0, __PYX_ERR(0, 6608, __pyx_L1_error));

  /* "cuda/cuda.pyx":6609
 *     @property
 *     def dstDevice(self):
 *         return self._dstDevice             # <<<<<<<<<<<<<<
 *     @dstDevice.setter
 *     def dstDevice(self, dstDevice):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_dstDevice));
  __pyx_r = ((PyObject *)__pyx_v_self->_dstDevice);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6608
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 *     @property
 *     def dstDevice(self):             # <<<<<<<<<<<<<<
 *         return self._dstDevice
 *     @dstDevice.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstDevice.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6611
 *         return self._dstDevice
 *     @dstDevice.setter
 *     def dstDevice(self, dstDevice):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstDevice_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstDevice); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstDevice_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstDevice) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstDevice_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstDevice));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstDevice_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_dstDevice) {
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6611, 0, __PYX_ERR(0, 6611, __pyx_L1_error));

  /* "cuda/cuda.pyx":6613
 *     def dstDevice(self, dstDevice):
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:             # <<<<<<<<<<<<<<
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6614
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 *             pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6613
 *     def dstDevice(self, dstDevice):
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:             # <<<<<<<<<<<<<<
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6615
 *         if dstDevice is None:
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdstDevice = int(dstDevice)
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6616
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 *             pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6617
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 *             pdstDevice = int(dstDevice)
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *         else:
 *             pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6617, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6615
 *         if dstDevice is None:
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdstDevice = int(dstDevice)
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6619
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *         else:
 *             pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *         self._dstDevice._ptr[0] = cdstDevice
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6620
 *         else:
 *             pdstDevice = int(CUdeviceptr(dstDevice))
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *         self._dstDevice._ptr[0] = cdstDevice
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6620, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6621
 *             pdstDevice = int(CUdeviceptr(dstDevice))
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *         self._dstDevice._ptr[0] = cdstDevice             # <<<<<<<<<<<<<<
 *     @property
 *     def dstArray(self):
 */
  (__pyx_v_self->_dstDevice->_ptr[0]) = __pyx_v_cdstDevice;

  /* "cuda/cuda.pyx":6611
 *         return self._dstDevice
 *     @dstDevice.setter
 *     def dstDevice(self, dstDevice):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstDevice.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6623
 *         self._dstDevice._ptr[0] = cdstDevice
 *     @property
 *     def dstArray(self):             # <<<<<<<<<<<<<<
 *         return self._dstArray
 *     @dstArray.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstArray___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6623, 0, __PYX_ERR(0, 6623, __pyx_L1_error));

  /* "cuda/cuda.pyx":6624
 *     @property
 *     def dstArray(self):
 *         return self._dstArray             # <<<<<<<<<<<<<<
 *     @dstArray.setter
 *     def dstArray(self, dstArray):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_dstArray));
  __pyx_r = ((PyObject *)__pyx_v_self->_dstArray);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6623
 *         self._dstDevice._ptr[0] = cdstDevice
 *     @property
 *     def dstArray(self):             # <<<<<<<<<<<<<<
 *         return self._dstArray
 *     @dstArray.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6626
 *         return self._dstArray
 *     @dstArray.setter
 *     def dstArray(self, dstArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstArray); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstArray) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstArray_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_dstArray) {
  CUarray __pyx_v_cdstArray;
  PyObject *__pyx_v_pdstArray = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6626, 0, __PYX_ERR(0, 6626, __pyx_L1_error));

  /* "cuda/cuda.pyx":6628
 *     def dstArray(self, dstArray):
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:             # <<<<<<<<<<<<<<
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_dstArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6629
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:
 *             cdstArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(dstArray, (CUarray)):
 *             pdstArray = int(dstArray)
 */
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6628
 *     def dstArray(self, dstArray):
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:             # <<<<<<<<<<<<<<
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6630
 *         if dstArray is None:
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             pdstArray = int(dstArray)
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6631
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):
 *             pdstArray = int(dstArray)             # <<<<<<<<<<<<<<
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6632
 *         elif isinstance(dstArray, (CUarray)):
 *             pdstArray = int(dstArray)
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 *         else:
 *             pdstArray = int(CUarray(dstArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6632, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6630
 *         if dstArray is None:
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             pdstArray = int(dstArray)
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6634
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *         else:
 *             pdstArray = int(CUarray(dstArray))             # <<<<<<<<<<<<<<
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *         self._dstArray._ptr[0] = cdstArray
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_dstArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6635
 *         else:
 *             pdstArray = int(CUarray(dstArray))
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 *         self._dstArray._ptr[0] = cdstArray
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6635, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6636
 *             pdstArray = int(CUarray(dstArray))
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *         self._dstArray._ptr[0] = cdstArray             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved1(self):
 */
  (__pyx_v_self->_dstArray->_ptr[0]) = __pyx_v_cdstArray;

  /* "cuda/cuda.pyx":6626
 *         return self._dstArray
 *     @dstArray.setter
 *     def dstArray(self, dstArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstArray);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6638
 *         self._dstArray._ptr[0] = cdstArray
 *     @property
 *     def reserved1(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].reserved1
 *     @reserved1.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved1_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved1_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved1___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved1___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6638, 0, __PYX_ERR(0, 6638, __pyx_L1_error));

  /* "cuda/cuda.pyx":6639
 *     @property
 *     def reserved1(self):
 *         return <void_ptr>self._ptr[0].reserved1             # <<<<<<<<<<<<<<
 *     @reserved1.setter
 *     def reserved1(self, reserved1):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).reserved1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6638
 *         self._dstArray._ptr[0] = cdstArray
 *     @property
 *     def reserved1(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].reserved1
 *     @reserved1.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.reserved1.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6641
 *         return <void_ptr>self._ptr[0].reserved1
 *     @reserved1.setter
 *     def reserved1(self, reserved1):             # <<<<<<<<<<<<<<
 *         _creserved1 = utils.HelperInputVoidPtr(reserved1)
 *         self._ptr[0].reserved1 = <void*><void_ptr>_creserved1.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved1); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved1_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved1) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved1_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved1));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved1_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, PyObject *__pyx_v_reserved1) {
  PyObject *__pyx_v__creserved1 = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6641, 0, __PYX_ERR(0, 6641, __pyx_L1_error));

  /* "cuda/cuda.pyx":6642
 *     @reserved1.setter
 *     def reserved1(self, reserved1):
 *         _creserved1 = utils.HelperInputVoidPtr(reserved1)             # <<<<<<<<<<<<<<
 *         self._ptr[0].reserved1 = <void*><void_ptr>_creserved1.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_reserved1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__creserved1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6643
 *     def reserved1(self, reserved1):
 *         _creserved1 = utils.HelperInputVoidPtr(reserved1)
 *         self._ptr[0].reserved1 = <void*><void_ptr>_creserved1.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def dstPitch(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__creserved1, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).reserved1 = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":6641
 *         return <void_ptr>self._ptr[0].reserved1
 *     @reserved1.setter
 *     def reserved1(self, reserved1):             # <<<<<<<<<<<<<<
 *         _creserved1 = utils.HelperInputVoidPtr(reserved1)
 *         self._ptr[0].reserved1 = <void*><void_ptr>_creserved1.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.reserved1.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__creserved1);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6645
 *         self._ptr[0].reserved1 = <void*><void_ptr>_creserved1.cptr
 *     @property
 *     def dstPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstPitch
 *     @dstPitch.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstPitch_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstPitch_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstPitch___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstPitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6645, 0, __PYX_ERR(0, 6645, __pyx_L1_error));

  /* "cuda/cuda.pyx":6646
 *     @property
 *     def dstPitch(self):
 *         return self._ptr[0].dstPitch             # <<<<<<<<<<<<<<
 *     @dstPitch.setter
 *     def dstPitch(self, size_t dstPitch):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstPitch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6645
 *         self._ptr[0].reserved1 = <void*><void_ptr>_creserved1.cptr
 *     @property
 *     def dstPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstPitch
 *     @dstPitch.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstPitch.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6648
 *         return self._ptr[0].dstPitch
 *     @dstPitch.setter
 *     def dstPitch(self, size_t dstPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstPitch = dstPitch
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstPitch); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstPitch) {
  size_t __pyx_v_dstPitch;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstPitch); {
    __pyx_v_dstPitch = __Pyx_PyInt_As_size_t(__pyx_arg_dstPitch); if (unlikely((__pyx_v_dstPitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6648, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstPitch_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_dstPitch));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_dstPitch) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6648, 0, __PYX_ERR(0, 6648, __pyx_L1_error));

  /* "cuda/cuda.pyx":6650
 *     def dstPitch(self, size_t dstPitch):
 *         pass
 *         self._ptr[0].dstPitch = dstPitch             # <<<<<<<<<<<<<<
 *     @property
 *     def dstHeight(self):
 */
  (__pyx_v_self->_ptr[0]).dstPitch = __pyx_v_dstPitch;

  /* "cuda/cuda.pyx":6648
 *         return self._ptr[0].dstPitch
 *     @dstPitch.setter
 *     def dstPitch(self, size_t dstPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstPitch = dstPitch
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6652
 *         self._ptr[0].dstPitch = dstPitch
 *     @property
 *     def dstHeight(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstHeight
 *     @dstHeight.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstHeight_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstHeight_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstHeight___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstHeight___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6652, 0, __PYX_ERR(0, 6652, __pyx_L1_error));

  /* "cuda/cuda.pyx":6653
 *     @property
 *     def dstHeight(self):
 *         return self._ptr[0].dstHeight             # <<<<<<<<<<<<<<
 *     @dstHeight.setter
 *     def dstHeight(self, size_t dstHeight):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstHeight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6652
 *         self._ptr[0].dstPitch = dstPitch
 *     @property
 *     def dstHeight(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstHeight
 *     @dstHeight.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstHeight.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6655
 *         return self._ptr[0].dstHeight
 *     @dstHeight.setter
 *     def dstHeight(self, size_t dstHeight):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstHeight = dstHeight
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstHeight_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstHeight); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstHeight_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstHeight) {
  size_t __pyx_v_dstHeight;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstHeight); {
    __pyx_v_dstHeight = __Pyx_PyInt_As_size_t(__pyx_arg_dstHeight); if (unlikely((__pyx_v_dstHeight == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6655, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstHeight.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstHeight_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_dstHeight));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstHeight_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_dstHeight) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6655, 0, __PYX_ERR(0, 6655, __pyx_L1_error));

  /* "cuda/cuda.pyx":6657
 *     def dstHeight(self, size_t dstHeight):
 *         pass
 *         self._ptr[0].dstHeight = dstHeight             # <<<<<<<<<<<<<<
 *     @property
 *     def WidthInBytes(self):
 */
  (__pyx_v_self->_ptr[0]).dstHeight = __pyx_v_dstHeight;

  /* "cuda/cuda.pyx":6655
 *         return self._ptr[0].dstHeight
 *     @dstHeight.setter
 *     def dstHeight(self, size_t dstHeight):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstHeight = dstHeight
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.dstHeight.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6659
 *         self._ptr[0].dstHeight = dstHeight
 *     @property
 *     def WidthInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].WidthInBytes
 *     @WidthInBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_12WidthInBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_12WidthInBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_12WidthInBytes___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_12WidthInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6659, 0, __PYX_ERR(0, 6659, __pyx_L1_error));

  /* "cuda/cuda.pyx":6660
 *     @property
 *     def WidthInBytes(self):
 *         return self._ptr[0].WidthInBytes             # <<<<<<<<<<<<<<
 *     @WidthInBytes.setter
 *     def WidthInBytes(self, size_t WidthInBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).WidthInBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6659
 *         self._ptr[0].dstHeight = dstHeight
 *     @property
 *     def WidthInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].WidthInBytes
 *     @WidthInBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.WidthInBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6662
 *         return self._ptr[0].WidthInBytes
 *     @WidthInBytes.setter
 *     def WidthInBytes(self, size_t WidthInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].WidthInBytes = WidthInBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_12WidthInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_WidthInBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_12WidthInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_WidthInBytes) {
  size_t __pyx_v_WidthInBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_WidthInBytes); {
    __pyx_v_WidthInBytes = __Pyx_PyInt_As_size_t(__pyx_arg_WidthInBytes); if (unlikely((__pyx_v_WidthInBytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6662, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.WidthInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_12WidthInBytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_WidthInBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_12WidthInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_WidthInBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6662, 0, __PYX_ERR(0, 6662, __pyx_L1_error));

  /* "cuda/cuda.pyx":6664
 *     def WidthInBytes(self, size_t WidthInBytes):
 *         pass
 *         self._ptr[0].WidthInBytes = WidthInBytes             # <<<<<<<<<<<<<<
 *     @property
 *     def Height(self):
 */
  (__pyx_v_self->_ptr[0]).WidthInBytes = __pyx_v_WidthInBytes;

  /* "cuda/cuda.pyx":6662
 *         return self._ptr[0].WidthInBytes
 *     @WidthInBytes.setter
 *     def WidthInBytes(self, size_t WidthInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].WidthInBytes = WidthInBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.WidthInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6666
 *         self._ptr[0].WidthInBytes = WidthInBytes
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Height
 *     @Height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6Height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6Height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6Height___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6Height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6666, 0, __PYX_ERR(0, 6666, __pyx_L1_error));

  /* "cuda/cuda.pyx":6667
 *     @property
 *     def Height(self):
 *         return self._ptr[0].Height             # <<<<<<<<<<<<<<
 *     @Height.setter
 *     def Height(self, size_t Height):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).Height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6666
 *         self._ptr[0].WidthInBytes = WidthInBytes
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Height
 *     @Height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.Height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6669
 *         return self._ptr[0].Height
 *     @Height.setter
 *     def Height(self, size_t Height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Height = Height
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Height); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Height) {
  size_t __pyx_v_Height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_Height); {
    __pyx_v_Height = __Pyx_PyInt_As_size_t(__pyx_arg_Height); if (unlikely((__pyx_v_Height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6669, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.Height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6Height_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_Height));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_6Height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_Height) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6669, 0, __PYX_ERR(0, 6669, __pyx_L1_error));

  /* "cuda/cuda.pyx":6671
 *     def Height(self, size_t Height):
 *         pass
 *         self._ptr[0].Height = Height             # <<<<<<<<<<<<<<
 *     @property
 *     def Depth(self):
 */
  (__pyx_v_self->_ptr[0]).Height = __pyx_v_Height;

  /* "cuda/cuda.pyx":6669
 *         return self._ptr[0].Height
 *     @Height.setter
 *     def Height(self, size_t Height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Height = Height
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.Height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6673
 *         self._ptr[0].Height = Height
 *     @property
 *     def Depth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Depth
 *     @Depth.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_5Depth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_5Depth_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_5Depth___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_5Depth___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6673, 0, __PYX_ERR(0, 6673, __pyx_L1_error));

  /* "cuda/cuda.pyx":6674
 *     @property
 *     def Depth(self):
 *         return self._ptr[0].Depth             # <<<<<<<<<<<<<<
 *     @Depth.setter
 *     def Depth(self, size_t Depth):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).Depth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6673
 *         self._ptr[0].Height = Height
 *     @property
 *     def Depth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Depth
 *     @Depth.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.Depth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6676
 *         return self._ptr[0].Depth
 *     @Depth.setter
 *     def Depth(self, size_t Depth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Depth = Depth
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_5Depth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Depth); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_5Depth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Depth) {
  size_t __pyx_v_Depth;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_Depth); {
    __pyx_v_Depth = __Pyx_PyInt_As_size_t(__pyx_arg_Depth); if (unlikely((__pyx_v_Depth == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6676, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.Depth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_5Depth_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((size_t)__pyx_v_Depth));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_5Depth_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, size_t __pyx_v_Depth) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6676, 0, __PYX_ERR(0, 6676, __pyx_L1_error));

  /* "cuda/cuda.pyx":6678
 *     def Depth(self, size_t Depth):
 *         pass
 *         self._ptr[0].Depth = Depth             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_MEMCPY3D_PEER_st:
 */
  (__pyx_v_self->_ptr[0]).Depth = __pyx_v_Depth;

  /* "cuda/cuda.pyx":6676
 *         return self._ptr[0].Depth
 *     @Depth.setter
 *     def Depth(self, size_t Depth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Depth = Depth
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.Depth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY3D_st_10__reduce_cython__[] = "CUDA_MEMCPY3D_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUDA_MEMCPY3D_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY3D_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__247)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__248, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY3D_st_12__setstate_cython__[] = "CUDA_MEMCPY3D_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUDA_MEMCPY3D_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY3D_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUDA_MEMCPY3D_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__249)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__250, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6745
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 6745, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6745, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6745, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 6745, 0, __PYX_ERR(0, 6745, __pyx_L1_error));

  /* "cuda/cuda.pyx":6746
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6747
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMCPY3D_PEER_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":6746
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6749
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMCPY3D_PEER_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_MEMCPY3D_PEER_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6745
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6750
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMCPY3D_PEER_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 6750, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6750, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 6750, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 6750, 0, __PYX_ERR(0, 6750, __pyx_L1_error));

  /* "cuda/cuda.pyx":6751
 *             self._ptr = <ccuda.CUDA_MEMCPY3D_PEER_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)             # <<<<<<<<<<<<<<
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 *         self._srcContext = CUcontext(_ptr=<void_ptr>&self._ptr[0].srcContext)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).srcDevice))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 6751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_srcDevice);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_srcDevice));
  __pyx_v_self->_srcDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":6752
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)             # <<<<<<<<<<<<<<
 *         self._srcContext = CUcontext(_ptr=<void_ptr>&self._ptr[0].srcContext)
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).srcArray))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 6752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_srcArray);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_srcArray));
  __pyx_v_self->_srcArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6753
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 *         self._srcContext = CUcontext(_ptr=<void_ptr>&self._ptr[0].srcContext)             # <<<<<<<<<<<<<<
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).srcContext))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 6753, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_srcContext);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_srcContext));
  __pyx_v_self->_srcContext = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":6754
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 *         self._srcContext = CUcontext(_ptr=<void_ptr>&self._ptr[0].srcContext)
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)             # <<<<<<<<<<<<<<
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)
 *         self._dstContext = CUcontext(_ptr=<void_ptr>&self._ptr[0].dstContext)
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).dstDevice))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 6754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_dstDevice);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_dstDevice));
  __pyx_v_self->_dstDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6755
 *         self._srcContext = CUcontext(_ptr=<void_ptr>&self._ptr[0].srcContext)
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)             # <<<<<<<<<<<<<<
 *         self._dstContext = CUcontext(_ptr=<void_ptr>&self._ptr[0].dstContext)
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).dstArray))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 6755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_dstArray);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_dstArray));
  __pyx_v_self->_dstArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":6756
 *         self._dstDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dstDevice)
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)
 *         self._dstContext = CUcontext(_ptr=<void_ptr>&self._ptr[0].dstContext)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).dstContext))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 6756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_dstContext);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_dstContext));
  __pyx_v_self->_dstContext = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6750
 *         else:
 *             self._ptr = <ccuda.CUDA_MEMCPY3D_PEER_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._srcDevice = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].srcDevice)
 *         self._srcArray = CUarray(_ptr=<void_ptr>&self._ptr[0].srcArray)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6757
 *         self._dstArray = CUarray(_ptr=<void_ptr>&self._ptr[0].dstArray)
 *         self._dstContext = CUcontext(_ptr=<void_ptr>&self._ptr[0].dstContext)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 6757, 0, __PYX_ERR(0, 6757, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_MEMCPY3D_PEER_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":6759
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6getPtr[] = "CUDA_MEMCPY3D_PEER_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__251)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 6759, 0, __PYX_ERR(0, 6759, __pyx_L1_error));

  /* "cuda/cuda.pyx":6760
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6759
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6761
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 6761, 0, __PYX_ERR(0, 6761, __pyx_L1_error));

  /* "cuda/cuda.pyx":6762
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6763
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 *             str_list += ['srcY : ' + str(self.srcY)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6764
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcY : ' + str(self.srcY)]
 *             str_list += ['srcZ : ' + str(self.srcZ)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcXInBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcXInBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6765
 *             str_list = []
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 *             str_list += ['srcY : ' + str(self.srcY)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcZ : ' + str(self.srcZ)]
 *             str_list += ['srcLOD : ' + str(self.srcLOD)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6766
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 *             str_list += ['srcY : ' + str(self.srcY)]
 *             str_list += ['srcZ : ' + str(self.srcZ)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcLOD : ' + str(self.srcLOD)]
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcZ_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcZ, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6767
 *             str_list += ['srcY : ' + str(self.srcY)]
 *             str_list += ['srcZ : ' + str(self.srcZ)]
 *             str_list += ['srcLOD : ' + str(self.srcLOD)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]
 *             str_list += ['srcHost : ' + hex(self.srcHost)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcLOD_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcLOD, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6768
 *             str_list += ['srcZ : ' + str(self.srcZ)]
 *             str_list += ['srcLOD : ' + str(self.srcLOD)]
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcHost : ' + hex(self.srcHost)]
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcMemoryType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcMemoryType, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6769
 *             str_list += ['srcLOD : ' + str(self.srcLOD)]
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]
 *             str_list += ['srcHost : ' + hex(self.srcHost)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]
 *             str_list += ['srcArray : ' + str(self.srcArray)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcHost_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_srcHost, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6770
 *             str_list += ['srcMemoryType : ' + str(self.srcMemoryType)]
 *             str_list += ['srcHost : ' + hex(self.srcHost)]
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcArray : ' + str(self.srcArray)]
 *             str_list += ['srcContext : ' + str(self.srcContext)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcDevice_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcDevice, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6771
 *             str_list += ['srcHost : ' + hex(self.srcHost)]
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]
 *             str_list += ['srcArray : ' + str(self.srcArray)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcContext : ' + str(self.srcContext)]
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6772
 *             str_list += ['srcDevice : ' + str(self.srcDevice)]
 *             str_list += ['srcArray : ' + str(self.srcArray)]
 *             str_list += ['srcContext : ' + str(self.srcContext)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]
 *             str_list += ['srcHeight : ' + str(self.srcHeight)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcContext_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcContext, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6773
 *             str_list += ['srcArray : ' + str(self.srcArray)]
 *             str_list += ['srcContext : ' + str(self.srcContext)]
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]             # <<<<<<<<<<<<<<
 *             str_list += ['srcHeight : ' + str(self.srcHeight)]
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcPitch_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcPitch, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6774
 *             str_list += ['srcContext : ' + str(self.srcContext)]
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]
 *             str_list += ['srcHeight : ' + str(self.srcHeight)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]
 *             str_list += ['dstY : ' + str(self.dstY)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srcHeight_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_srcHeight, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6775
 *             str_list += ['srcPitch : ' + str(self.srcPitch)]
 *             str_list += ['srcHeight : ' + str(self.srcHeight)]
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstY : ' + str(self.dstY)]
 *             str_list += ['dstZ : ' + str(self.dstZ)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstXInBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstXInBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6776
 *             str_list += ['srcHeight : ' + str(self.srcHeight)]
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]
 *             str_list += ['dstY : ' + str(self.dstY)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstZ : ' + str(self.dstZ)]
 *             str_list += ['dstLOD : ' + str(self.dstLOD)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6777
 *             str_list += ['dstXInBytes : ' + str(self.dstXInBytes)]
 *             str_list += ['dstY : ' + str(self.dstY)]
 *             str_list += ['dstZ : ' + str(self.dstZ)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstLOD : ' + str(self.dstLOD)]
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstZ_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstZ, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6778
 *             str_list += ['dstY : ' + str(self.dstY)]
 *             str_list += ['dstZ : ' + str(self.dstZ)]
 *             str_list += ['dstLOD : ' + str(self.dstLOD)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]
 *             str_list += ['dstHost : ' + hex(self.dstHost)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstLOD_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstLOD, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6779
 *             str_list += ['dstZ : ' + str(self.dstZ)]
 *             str_list += ['dstLOD : ' + str(self.dstLOD)]
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstHost : ' + hex(self.dstHost)]
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstMemoryType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstMemoryType, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6780
 *             str_list += ['dstLOD : ' + str(self.dstLOD)]
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]
 *             str_list += ['dstHost : ' + hex(self.dstHost)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]
 *             str_list += ['dstArray : ' + str(self.dstArray)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstHost_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_dstHost, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6781
 *             str_list += ['dstMemoryType : ' + str(self.dstMemoryType)]
 *             str_list += ['dstHost : ' + hex(self.dstHost)]
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstArray : ' + str(self.dstArray)]
 *             str_list += ['dstContext : ' + str(self.dstContext)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstDevice_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstDevice, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6782
 *             str_list += ['dstHost : ' + hex(self.dstHost)]
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]
 *             str_list += ['dstArray : ' + str(self.dstArray)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstContext : ' + str(self.dstContext)]
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6783
 *             str_list += ['dstDevice : ' + str(self.dstDevice)]
 *             str_list += ['dstArray : ' + str(self.dstArray)]
 *             str_list += ['dstContext : ' + str(self.dstContext)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]
 *             str_list += ['dstHeight : ' + str(self.dstHeight)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstContext_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstContext, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6784
 *             str_list += ['dstArray : ' + str(self.dstArray)]
 *             str_list += ['dstContext : ' + str(self.dstContext)]
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]             # <<<<<<<<<<<<<<
 *             str_list += ['dstHeight : ' + str(self.dstHeight)]
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstPitch_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstPitch, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6785
 *             str_list += ['dstContext : ' + str(self.dstContext)]
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]
 *             str_list += ['dstHeight : ' + str(self.dstHeight)]             # <<<<<<<<<<<<<<
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]
 *             str_list += ['Height : ' + str(self.Height)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dstHeight_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dstHeight, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6786
 *             str_list += ['dstPitch : ' + str(self.dstPitch)]
 *             str_list += ['dstHeight : ' + str(self.dstHeight)]
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['Height : ' + str(self.Height)]
 *             str_list += ['Depth : ' + str(self.Depth)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_WidthInBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_WidthInBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6787
 *             str_list += ['dstHeight : ' + str(self.dstHeight)]
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]
 *             str_list += ['Height : ' + str(self.Height)]             # <<<<<<<<<<<<<<
 *             str_list += ['Depth : ' + str(self.Depth)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Height_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Height, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6788
 *             str_list += ['WidthInBytes : ' + str(self.WidthInBytes)]
 *             str_list += ['Height : ' + str(self.Height)]
 *             str_list += ['Depth : ' + str(self.Depth)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Depth_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Depth, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":6789
 *             str_list += ['Height : ' + str(self.Height)]
 *             str_list += ['Depth : ' + str(self.Depth)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":6762
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['srcXInBytes : ' + str(self.srcXInBytes)]
 */
  }

  /* "cuda/cuda.pyx":6791
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":6761
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6794
 * 
 *     @property
 *     def srcXInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcXInBytes
 *     @srcXInBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11srcXInBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11srcXInBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11srcXInBytes___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11srcXInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6794, 0, __PYX_ERR(0, 6794, __pyx_L1_error));

  /* "cuda/cuda.pyx":6795
 *     @property
 *     def srcXInBytes(self):
 *         return self._ptr[0].srcXInBytes             # <<<<<<<<<<<<<<
 *     @srcXInBytes.setter
 *     def srcXInBytes(self, size_t srcXInBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcXInBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6794
 * 
 *     @property
 *     def srcXInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcXInBytes
 *     @srcXInBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcXInBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6797
 *         return self._ptr[0].srcXInBytes
 *     @srcXInBytes.setter
 *     def srcXInBytes(self, size_t srcXInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcXInBytes = srcXInBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11srcXInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcXInBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11srcXInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcXInBytes) {
  size_t __pyx_v_srcXInBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcXInBytes); {
    __pyx_v_srcXInBytes = __Pyx_PyInt_As_size_t(__pyx_arg_srcXInBytes); if (unlikely((__pyx_v_srcXInBytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6797, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcXInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11srcXInBytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_srcXInBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11srcXInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_srcXInBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6797, 0, __PYX_ERR(0, 6797, __pyx_L1_error));

  /* "cuda/cuda.pyx":6799
 *     def srcXInBytes(self, size_t srcXInBytes):
 *         pass
 *         self._ptr[0].srcXInBytes = srcXInBytes             # <<<<<<<<<<<<<<
 *     @property
 *     def srcY(self):
 */
  (__pyx_v_self->_ptr[0]).srcXInBytes = __pyx_v_srcXInBytes;

  /* "cuda/cuda.pyx":6797
 *         return self._ptr[0].srcXInBytes
 *     @srcXInBytes.setter
 *     def srcXInBytes(self, size_t srcXInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcXInBytes = srcXInBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcXInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6801
 *         self._ptr[0].srcXInBytes = srcXInBytes
 *     @property
 *     def srcY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcY
 *     @srcY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcY___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6801, 0, __PYX_ERR(0, 6801, __pyx_L1_error));

  /* "cuda/cuda.pyx":6802
 *     @property
 *     def srcY(self):
 *         return self._ptr[0].srcY             # <<<<<<<<<<<<<<
 *     @srcY.setter
 *     def srcY(self, size_t srcY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6801
 *         self._ptr[0].srcXInBytes = srcXInBytes
 *     @property
 *     def srcY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcY
 *     @srcY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6804
 *         return self._ptr[0].srcY
 *     @srcY.setter
 *     def srcY(self, size_t srcY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcY = srcY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcY); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcY) {
  size_t __pyx_v_srcY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcY); {
    __pyx_v_srcY = __Pyx_PyInt_As_size_t(__pyx_arg_srcY); if (unlikely((__pyx_v_srcY == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6804, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcY_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_srcY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_srcY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6804, 0, __PYX_ERR(0, 6804, __pyx_L1_error));

  /* "cuda/cuda.pyx":6806
 *     def srcY(self, size_t srcY):
 *         pass
 *         self._ptr[0].srcY = srcY             # <<<<<<<<<<<<<<
 *     @property
 *     def srcZ(self):
 */
  (__pyx_v_self->_ptr[0]).srcY = __pyx_v_srcY;

  /* "cuda/cuda.pyx":6804
 *         return self._ptr[0].srcY
 *     @srcY.setter
 *     def srcY(self, size_t srcY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcY = srcY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6808
 *         self._ptr[0].srcY = srcY
 *     @property
 *     def srcZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcZ
 *     @srcZ.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcZ___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6808, 0, __PYX_ERR(0, 6808, __pyx_L1_error));

  /* "cuda/cuda.pyx":6809
 *     @property
 *     def srcZ(self):
 *         return self._ptr[0].srcZ             # <<<<<<<<<<<<<<
 *     @srcZ.setter
 *     def srcZ(self, size_t srcZ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6808
 *         self._ptr[0].srcY = srcY
 *     @property
 *     def srcZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcZ
 *     @srcZ.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6811
 *         return self._ptr[0].srcZ
 *     @srcZ.setter
 *     def srcZ(self, size_t srcZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcZ = srcZ
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcZ); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcZ) {
  size_t __pyx_v_srcZ;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcZ); {
    __pyx_v_srcZ = __Pyx_PyInt_As_size_t(__pyx_arg_srcZ); if (unlikely((__pyx_v_srcZ == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6811, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcZ_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_srcZ));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_srcZ) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6811, 0, __PYX_ERR(0, 6811, __pyx_L1_error));

  /* "cuda/cuda.pyx":6813
 *     def srcZ(self, size_t srcZ):
 *         pass
 *         self._ptr[0].srcZ = srcZ             # <<<<<<<<<<<<<<
 *     @property
 *     def srcLOD(self):
 */
  (__pyx_v_self->_ptr[0]).srcZ = __pyx_v_srcZ;

  /* "cuda/cuda.pyx":6811
 *         return self._ptr[0].srcZ
 *     @srcZ.setter
 *     def srcZ(self, size_t srcZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcZ = srcZ
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6815
 *         self._ptr[0].srcZ = srcZ
 *     @property
 *     def srcLOD(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcLOD
 *     @srcLOD.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6srcLOD_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6srcLOD_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6srcLOD___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6srcLOD___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6815, 0, __PYX_ERR(0, 6815, __pyx_L1_error));

  /* "cuda/cuda.pyx":6816
 *     @property
 *     def srcLOD(self):
 *         return self._ptr[0].srcLOD             # <<<<<<<<<<<<<<
 *     @srcLOD.setter
 *     def srcLOD(self, size_t srcLOD):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcLOD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6815
 *         self._ptr[0].srcZ = srcZ
 *     @property
 *     def srcLOD(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcLOD
 *     @srcLOD.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcLOD.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6818
 *         return self._ptr[0].srcLOD
 *     @srcLOD.setter
 *     def srcLOD(self, size_t srcLOD):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcLOD = srcLOD
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6srcLOD_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcLOD); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6srcLOD_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcLOD) {
  size_t __pyx_v_srcLOD;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcLOD); {
    __pyx_v_srcLOD = __Pyx_PyInt_As_size_t(__pyx_arg_srcLOD); if (unlikely((__pyx_v_srcLOD == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6818, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcLOD.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6srcLOD_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_srcLOD));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6srcLOD_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_srcLOD) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6818, 0, __PYX_ERR(0, 6818, __pyx_L1_error));

  /* "cuda/cuda.pyx":6820
 *     def srcLOD(self, size_t srcLOD):
 *         pass
 *         self._ptr[0].srcLOD = srcLOD             # <<<<<<<<<<<<<<
 *     @property
 *     def srcMemoryType(self):
 */
  (__pyx_v_self->_ptr[0]).srcLOD = __pyx_v_srcLOD;

  /* "cuda/cuda.pyx":6818
 *         return self._ptr[0].srcLOD
 *     @srcLOD.setter
 *     def srcLOD(self, size_t srcLOD):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcLOD = srcLOD
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcLOD.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6822
 *         self._ptr[0].srcLOD = srcLOD
 *     @property
 *     def srcMemoryType(self):             # <<<<<<<<<<<<<<
 *         return CUmemorytype(self._ptr[0].srcMemoryType)
 *     @srcMemoryType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13srcMemoryType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13srcMemoryType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13srcMemoryType___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13srcMemoryType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6822, 0, __PYX_ERR(0, 6822, __pyx_L1_error));

  /* "cuda/cuda.pyx":6823
 *     @property
 *     def srcMemoryType(self):
 *         return CUmemorytype(self._ptr[0].srcMemoryType)             # <<<<<<<<<<<<<<
 *     @srcMemoryType.setter
 *     def srcMemoryType(self, srcMemoryType not None : CUmemorytype):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemorytype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemorytype_enum((__pyx_v_self->_ptr[0]).srcMemoryType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6822
 *         self._ptr[0].srcLOD = srcLOD
 *     @property
 *     def srcMemoryType(self):             # <<<<<<<<<<<<<<
 *         return CUmemorytype(self._ptr[0].srcMemoryType)
 *     @srcMemoryType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcMemoryType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6825
 *         return CUmemorytype(self._ptr[0].srcMemoryType)
 *     @srcMemoryType.setter
 *     def srcMemoryType(self, srcMemoryType not None : CUmemorytype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcMemoryType = srcMemoryType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13srcMemoryType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcMemoryType); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13srcMemoryType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcMemoryType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_srcMemoryType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "srcMemoryType"); __PYX_ERR(0, 6825, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13srcMemoryType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcMemoryType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13srcMemoryType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_srcMemoryType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemorytype __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6825, 0, __PYX_ERR(0, 6825, __pyx_L1_error));

  /* "cuda/cuda.pyx":6827
 *     def srcMemoryType(self, srcMemoryType not None : CUmemorytype):
 *         pass
 *         self._ptr[0].srcMemoryType = srcMemoryType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def srcHost(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_srcMemoryType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemorytype_enum)__Pyx_PyInt_As_enum__CUmemorytype_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).srcMemoryType = __pyx_t_2;

  /* "cuda/cuda.pyx":6825
 *         return CUmemorytype(self._ptr[0].srcMemoryType)
 *     @srcMemoryType.setter
 *     def srcMemoryType(self, srcMemoryType not None : CUmemorytype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcMemoryType = srcMemoryType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcMemoryType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6829
 *         self._ptr[0].srcMemoryType = srcMemoryType.value
 *     @property
 *     def srcHost(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].srcHost
 *     @srcHost.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7srcHost_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7srcHost_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7srcHost___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7srcHost___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6829, 0, __PYX_ERR(0, 6829, __pyx_L1_error));

  /* "cuda/cuda.pyx":6830
 *     @property
 *     def srcHost(self):
 *         return <void_ptr>self._ptr[0].srcHost             # <<<<<<<<<<<<<<
 *     @srcHost.setter
 *     def srcHost(self, srcHost):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).srcHost)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6829
 *         self._ptr[0].srcMemoryType = srcMemoryType.value
 *     @property
 *     def srcHost(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].srcHost
 *     @srcHost.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcHost.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6832
 *         return <void_ptr>self._ptr[0].srcHost
 *     @srcHost.setter
 *     def srcHost(self, srcHost):             # <<<<<<<<<<<<<<
 *         _csrcHost = utils.HelperInputVoidPtr(srcHost)
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7srcHost_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcHost); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7srcHost_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcHost) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7srcHost_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcHost));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7srcHost_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_srcHost) {
  PyObject *__pyx_v__csrcHost = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6832, 0, __PYX_ERR(0, 6832, __pyx_L1_error));

  /* "cuda/cuda.pyx":6833
 *     @srcHost.setter
 *     def srcHost(self, srcHost):
 *         _csrcHost = utils.HelperInputVoidPtr(srcHost)             # <<<<<<<<<<<<<<
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_srcHost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__csrcHost = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6834
 *     def srcHost(self, srcHost):
 *         _csrcHost = utils.HelperInputVoidPtr(srcHost)
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def srcDevice(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__csrcHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).srcHost = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":6832
 *         return <void_ptr>self._ptr[0].srcHost
 *     @srcHost.setter
 *     def srcHost(self, srcHost):             # <<<<<<<<<<<<<<
 *         _csrcHost = utils.HelperInputVoidPtr(srcHost)
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcHost.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__csrcHost);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6836
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 *     @property
 *     def srcDevice(self):             # <<<<<<<<<<<<<<
 *         return self._srcDevice
 *     @srcDevice.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcDevice_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcDevice_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcDevice___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcDevice___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6836, 0, __PYX_ERR(0, 6836, __pyx_L1_error));

  /* "cuda/cuda.pyx":6837
 *     @property
 *     def srcDevice(self):
 *         return self._srcDevice             # <<<<<<<<<<<<<<
 *     @srcDevice.setter
 *     def srcDevice(self, srcDevice):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_srcDevice));
  __pyx_r = ((PyObject *)__pyx_v_self->_srcDevice);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6836
 *         self._ptr[0].srcHost = <void*><void_ptr>_csrcHost.cptr
 *     @property
 *     def srcDevice(self):             # <<<<<<<<<<<<<<
 *         return self._srcDevice
 *     @srcDevice.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcDevice.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6839
 *         return self._srcDevice
 *     @srcDevice.setter
 *     def srcDevice(self, srcDevice):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcDevice_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcDevice); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcDevice_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcDevice) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcDevice_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcDevice));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcDevice_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_srcDevice) {
  CUdeviceptr __pyx_v_csrcDevice;
  PyObject *__pyx_v_psrcDevice = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6839, 0, __PYX_ERR(0, 6839, __pyx_L1_error));

  /* "cuda/cuda.pyx":6841
 *     def srcDevice(self, srcDevice):
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:             # <<<<<<<<<<<<<<
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_srcDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6842
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 *             psrcDevice = int(srcDevice)
 */
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6841
 *     def srcDevice(self, srcDevice):
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:             # <<<<<<<<<<<<<<
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6843
 *         if srcDevice is None:
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             psrcDevice = int(srcDevice)
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6844
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 *             psrcDevice = int(srcDevice)             # <<<<<<<<<<<<<<
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6845
 *         elif isinstance(srcDevice, (CUdeviceptr)):
 *             psrcDevice = int(srcDevice)
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *         else:
 *             psrcDevice = int(CUdeviceptr(srcDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6845, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6843
 *         if srcDevice is None:
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             psrcDevice = int(srcDevice)
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6847
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *         else:
 *             psrcDevice = int(CUdeviceptr(srcDevice))             # <<<<<<<<<<<<<<
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *         self._srcDevice._ptr[0] = csrcDevice
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6848
 *         else:
 *             psrcDevice = int(CUdeviceptr(srcDevice))
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *         self._srcDevice._ptr[0] = csrcDevice
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6848, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6849
 *             psrcDevice = int(CUdeviceptr(srcDevice))
 *             csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *         self._srcDevice._ptr[0] = csrcDevice             # <<<<<<<<<<<<<<
 *     @property
 *     def srcArray(self):
 */
  (__pyx_v_self->_srcDevice->_ptr[0]) = __pyx_v_csrcDevice;

  /* "cuda/cuda.pyx":6839
 *         return self._srcDevice
 *     @srcDevice.setter
 *     def srcDevice(self, srcDevice):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr csrcDevice
 *         if srcDevice is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcDevice.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcDevice);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6851
 *         self._srcDevice._ptr[0] = csrcDevice
 *     @property
 *     def srcArray(self):             # <<<<<<<<<<<<<<
 *         return self._srcArray
 *     @srcArray.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcArray___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6851, 0, __PYX_ERR(0, 6851, __pyx_L1_error));

  /* "cuda/cuda.pyx":6852
 *     @property
 *     def srcArray(self):
 *         return self._srcArray             # <<<<<<<<<<<<<<
 *     @srcArray.setter
 *     def srcArray(self, srcArray):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_srcArray));
  __pyx_r = ((PyObject *)__pyx_v_self->_srcArray);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6851
 *         self._srcDevice._ptr[0] = csrcDevice
 *     @property
 *     def srcArray(self):             # <<<<<<<<<<<<<<
 *         return self._srcArray
 *     @srcArray.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6854
 *         return self._srcArray
 *     @srcArray.setter
 *     def srcArray(self, srcArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcArray); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcArray) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcArray_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_srcArray) {
  CUarray __pyx_v_csrcArray;
  PyObject *__pyx_v_psrcArray = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6854, 0, __PYX_ERR(0, 6854, __pyx_L1_error));

  /* "cuda/cuda.pyx":6856
 *     def srcArray(self, srcArray):
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:             # <<<<<<<<<<<<<<
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_srcArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6857
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:
 *             csrcArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(srcArray, (CUarray)):
 *             psrcArray = int(srcArray)
 */
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6856
 *     def srcArray(self, srcArray):
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:             # <<<<<<<<<<<<<<
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6858
 *         if srcArray is None:
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             psrcArray = int(srcArray)
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6859
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):
 *             psrcArray = int(srcArray)             # <<<<<<<<<<<<<<
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6860
 *         elif isinstance(srcArray, (CUarray)):
 *             psrcArray = int(srcArray)
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 *         else:
 *             psrcArray = int(CUarray(srcArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6860, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6858
 *         if srcArray is None:
 *             csrcArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             psrcArray = int(srcArray)
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6862
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *         else:
 *             psrcArray = int(CUarray(srcArray))             # <<<<<<<<<<<<<<
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *         self._srcArray._ptr[0] = csrcArray
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_srcArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6863
 *         else:
 *             psrcArray = int(CUarray(srcArray))
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 *         self._srcArray._ptr[0] = csrcArray
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6863, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6864
 *             psrcArray = int(CUarray(srcArray))
 *             csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *         self._srcArray._ptr[0] = csrcArray             # <<<<<<<<<<<<<<
 *     @property
 *     def srcContext(self):
 */
  (__pyx_v_self->_srcArray->_ptr[0]) = __pyx_v_csrcArray;

  /* "cuda/cuda.pyx":6854
 *         return self._srcArray
 *     @srcArray.setter
 *     def srcArray(self, srcArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray csrcArray
 *         if srcArray is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcArray);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6866
 *         self._srcArray._ptr[0] = csrcArray
 *     @property
 *     def srcContext(self):             # <<<<<<<<<<<<<<
 *         return self._srcContext
 *     @srcContext.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10srcContext_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10srcContext_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10srcContext___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10srcContext___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6866, 0, __PYX_ERR(0, 6866, __pyx_L1_error));

  /* "cuda/cuda.pyx":6867
 *     @property
 *     def srcContext(self):
 *         return self._srcContext             # <<<<<<<<<<<<<<
 *     @srcContext.setter
 *     def srcContext(self, srcContext):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_srcContext));
  __pyx_r = ((PyObject *)__pyx_v_self->_srcContext);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6866
 *         self._srcArray._ptr[0] = csrcArray
 *     @property
 *     def srcContext(self):             # <<<<<<<<<<<<<<
 *         return self._srcContext
 *     @srcContext.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcContext.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6869
 *         return self._srcContext
 *     @srcContext.setter
 *     def srcContext(self, srcContext):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUcontext csrcContext
 *         if srcContext is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10srcContext_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcContext); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10srcContext_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_srcContext) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10srcContext_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((PyObject *)__pyx_v_srcContext));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10srcContext_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_srcContext) {
  CUcontext __pyx_v_csrcContext;
  PyObject *__pyx_v_psrcContext = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6869, 0, __PYX_ERR(0, 6869, __pyx_L1_error));

  /* "cuda/cuda.pyx":6871
 *     def srcContext(self, srcContext):
 *         cdef ccuda.CUcontext csrcContext
 *         if srcContext is None:             # <<<<<<<<<<<<<<
 *             csrcContext = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(srcContext, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_srcContext == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6872
 *         cdef ccuda.CUcontext csrcContext
 *         if srcContext is None:
 *             csrcContext = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(srcContext, (CUcontext)):
 *             psrcContext = int(srcContext)
 */
    __pyx_v_csrcContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6871
 *     def srcContext(self, srcContext):
 *         cdef ccuda.CUcontext csrcContext
 *         if srcContext is None:             # <<<<<<<<<<<<<<
 *             csrcContext = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(srcContext, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6873
 *         if srcContext is None:
 *             csrcContext = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(srcContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *             psrcContext = int(srcContext)
 *             csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcContext, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6874
 *             csrcContext = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(srcContext, (CUcontext)):
 *             psrcContext = int(srcContext)             # <<<<<<<<<<<<<<
 *             csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcContext = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6875
 *         elif isinstance(srcContext, (CUcontext)):
 *             psrcContext = int(srcContext)
 *             csrcContext = <ccuda.CUcontext><void_ptr>psrcContext             # <<<<<<<<<<<<<<
 *         else:
 *             psrcContext = int(CUcontext(srcContext))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6875, __pyx_L1_error)
    __pyx_v_csrcContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6873
 *         if srcContext is None:
 *             csrcContext = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(srcContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *             psrcContext = int(srcContext)
 *             csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6877
 *             csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 *         else:
 *             psrcContext = int(CUcontext(srcContext))             # <<<<<<<<<<<<<<
 *             csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 *         self._srcContext._ptr[0] = csrcContext
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_srcContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcContext = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6878
 *         else:
 *             psrcContext = int(CUcontext(srcContext))
 *             csrcContext = <ccuda.CUcontext><void_ptr>psrcContext             # <<<<<<<<<<<<<<
 *         self._srcContext._ptr[0] = csrcContext
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6878, __pyx_L1_error)
    __pyx_v_csrcContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6879
 *             psrcContext = int(CUcontext(srcContext))
 *             csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 *         self._srcContext._ptr[0] = csrcContext             # <<<<<<<<<<<<<<
 *     @property
 *     def srcPitch(self):
 */
  (__pyx_v_self->_srcContext->_ptr[0]) = __pyx_v_csrcContext;

  /* "cuda/cuda.pyx":6869
 *         return self._srcContext
 *     @srcContext.setter
 *     def srcContext(self, srcContext):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUcontext csrcContext
 *         if srcContext is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcContext.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcContext);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6881
 *         self._srcContext._ptr[0] = csrcContext
 *     @property
 *     def srcPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcPitch
 *     @srcPitch.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcPitch_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcPitch_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcPitch___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcPitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6881, 0, __PYX_ERR(0, 6881, __pyx_L1_error));

  /* "cuda/cuda.pyx":6882
 *     @property
 *     def srcPitch(self):
 *         return self._ptr[0].srcPitch             # <<<<<<<<<<<<<<
 *     @srcPitch.setter
 *     def srcPitch(self, size_t srcPitch):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcPitch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6881
 *         self._srcContext._ptr[0] = csrcContext
 *     @property
 *     def srcPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcPitch
 *     @srcPitch.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcPitch.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6884
 *         return self._ptr[0].srcPitch
 *     @srcPitch.setter
 *     def srcPitch(self, size_t srcPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcPitch = srcPitch
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcPitch); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcPitch) {
  size_t __pyx_v_srcPitch;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcPitch); {
    __pyx_v_srcPitch = __Pyx_PyInt_As_size_t(__pyx_arg_srcPitch); if (unlikely((__pyx_v_srcPitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6884, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcPitch_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_srcPitch));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_srcPitch) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6884, 0, __PYX_ERR(0, 6884, __pyx_L1_error));

  /* "cuda/cuda.pyx":6886
 *     def srcPitch(self, size_t srcPitch):
 *         pass
 *         self._ptr[0].srcPitch = srcPitch             # <<<<<<<<<<<<<<
 *     @property
 *     def srcHeight(self):
 */
  (__pyx_v_self->_ptr[0]).srcPitch = __pyx_v_srcPitch;

  /* "cuda/cuda.pyx":6884
 *         return self._ptr[0].srcPitch
 *     @srcPitch.setter
 *     def srcPitch(self, size_t srcPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcPitch = srcPitch
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6888
 *         self._ptr[0].srcPitch = srcPitch
 *     @property
 *     def srcHeight(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcHeight
 *     @srcHeight.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcHeight_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcHeight_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcHeight___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcHeight___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6888, 0, __PYX_ERR(0, 6888, __pyx_L1_error));

  /* "cuda/cuda.pyx":6889
 *     @property
 *     def srcHeight(self):
 *         return self._ptr[0].srcHeight             # <<<<<<<<<<<<<<
 *     @srcHeight.setter
 *     def srcHeight(self, size_t srcHeight):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).srcHeight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6888
 *         self._ptr[0].srcPitch = srcPitch
 *     @property
 *     def srcHeight(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].srcHeight
 *     @srcHeight.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcHeight.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6891
 *         return self._ptr[0].srcHeight
 *     @srcHeight.setter
 *     def srcHeight(self, size_t srcHeight):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcHeight = srcHeight
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcHeight_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcHeight); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcHeight_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_srcHeight) {
  size_t __pyx_v_srcHeight;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_srcHeight); {
    __pyx_v_srcHeight = __Pyx_PyInt_As_size_t(__pyx_arg_srcHeight); if (unlikely((__pyx_v_srcHeight == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6891, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcHeight.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcHeight_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_srcHeight));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcHeight_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_srcHeight) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6891, 0, __PYX_ERR(0, 6891, __pyx_L1_error));

  /* "cuda/cuda.pyx":6893
 *     def srcHeight(self, size_t srcHeight):
 *         pass
 *         self._ptr[0].srcHeight = srcHeight             # <<<<<<<<<<<<<<
 *     @property
 *     def dstXInBytes(self):
 */
  (__pyx_v_self->_ptr[0]).srcHeight = __pyx_v_srcHeight;

  /* "cuda/cuda.pyx":6891
 *         return self._ptr[0].srcHeight
 *     @srcHeight.setter
 *     def srcHeight(self, size_t srcHeight):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].srcHeight = srcHeight
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.srcHeight.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6895
 *         self._ptr[0].srcHeight = srcHeight
 *     @property
 *     def dstXInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstXInBytes
 *     @dstXInBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11dstXInBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11dstXInBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11dstXInBytes___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11dstXInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6895, 0, __PYX_ERR(0, 6895, __pyx_L1_error));

  /* "cuda/cuda.pyx":6896
 *     @property
 *     def dstXInBytes(self):
 *         return self._ptr[0].dstXInBytes             # <<<<<<<<<<<<<<
 *     @dstXInBytes.setter
 *     def dstXInBytes(self, size_t dstXInBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstXInBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6895
 *         self._ptr[0].srcHeight = srcHeight
 *     @property
 *     def dstXInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstXInBytes
 *     @dstXInBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstXInBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6898
 *         return self._ptr[0].dstXInBytes
 *     @dstXInBytes.setter
 *     def dstXInBytes(self, size_t dstXInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstXInBytes = dstXInBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11dstXInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstXInBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11dstXInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstXInBytes) {
  size_t __pyx_v_dstXInBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstXInBytes); {
    __pyx_v_dstXInBytes = __Pyx_PyInt_As_size_t(__pyx_arg_dstXInBytes); if (unlikely((__pyx_v_dstXInBytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6898, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstXInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11dstXInBytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_dstXInBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11dstXInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_dstXInBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6898, 0, __PYX_ERR(0, 6898, __pyx_L1_error));

  /* "cuda/cuda.pyx":6900
 *     def dstXInBytes(self, size_t dstXInBytes):
 *         pass
 *         self._ptr[0].dstXInBytes = dstXInBytes             # <<<<<<<<<<<<<<
 *     @property
 *     def dstY(self):
 */
  (__pyx_v_self->_ptr[0]).dstXInBytes = __pyx_v_dstXInBytes;

  /* "cuda/cuda.pyx":6898
 *         return self._ptr[0].dstXInBytes
 *     @dstXInBytes.setter
 *     def dstXInBytes(self, size_t dstXInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstXInBytes = dstXInBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstXInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6902
 *         self._ptr[0].dstXInBytes = dstXInBytes
 *     @property
 *     def dstY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstY
 *     @dstY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstY___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6902, 0, __PYX_ERR(0, 6902, __pyx_L1_error));

  /* "cuda/cuda.pyx":6903
 *     @property
 *     def dstY(self):
 *         return self._ptr[0].dstY             # <<<<<<<<<<<<<<
 *     @dstY.setter
 *     def dstY(self, size_t dstY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6902
 *         self._ptr[0].dstXInBytes = dstXInBytes
 *     @property
 *     def dstY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstY
 *     @dstY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6905
 *         return self._ptr[0].dstY
 *     @dstY.setter
 *     def dstY(self, size_t dstY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstY = dstY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstY); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstY) {
  size_t __pyx_v_dstY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstY); {
    __pyx_v_dstY = __Pyx_PyInt_As_size_t(__pyx_arg_dstY); if (unlikely((__pyx_v_dstY == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6905, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstY_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_dstY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_dstY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6905, 0, __PYX_ERR(0, 6905, __pyx_L1_error));

  /* "cuda/cuda.pyx":6907
 *     def dstY(self, size_t dstY):
 *         pass
 *         self._ptr[0].dstY = dstY             # <<<<<<<<<<<<<<
 *     @property
 *     def dstZ(self):
 */
  (__pyx_v_self->_ptr[0]).dstY = __pyx_v_dstY;

  /* "cuda/cuda.pyx":6905
 *         return self._ptr[0].dstY
 *     @dstY.setter
 *     def dstY(self, size_t dstY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstY = dstY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6909
 *         self._ptr[0].dstY = dstY
 *     @property
 *     def dstZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstZ
 *     @dstZ.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstZ___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6909, 0, __PYX_ERR(0, 6909, __pyx_L1_error));

  /* "cuda/cuda.pyx":6910
 *     @property
 *     def dstZ(self):
 *         return self._ptr[0].dstZ             # <<<<<<<<<<<<<<
 *     @dstZ.setter
 *     def dstZ(self, size_t dstZ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6909
 *         self._ptr[0].dstY = dstY
 *     @property
 *     def dstZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstZ
 *     @dstZ.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6912
 *         return self._ptr[0].dstZ
 *     @dstZ.setter
 *     def dstZ(self, size_t dstZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstZ = dstZ
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstZ); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstZ) {
  size_t __pyx_v_dstZ;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstZ); {
    __pyx_v_dstZ = __Pyx_PyInt_As_size_t(__pyx_arg_dstZ); if (unlikely((__pyx_v_dstZ == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6912, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstZ_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_dstZ));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_dstZ) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6912, 0, __PYX_ERR(0, 6912, __pyx_L1_error));

  /* "cuda/cuda.pyx":6914
 *     def dstZ(self, size_t dstZ):
 *         pass
 *         self._ptr[0].dstZ = dstZ             # <<<<<<<<<<<<<<
 *     @property
 *     def dstLOD(self):
 */
  (__pyx_v_self->_ptr[0]).dstZ = __pyx_v_dstZ;

  /* "cuda/cuda.pyx":6912
 *         return self._ptr[0].dstZ
 *     @dstZ.setter
 *     def dstZ(self, size_t dstZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstZ = dstZ
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6916
 *         self._ptr[0].dstZ = dstZ
 *     @property
 *     def dstLOD(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstLOD
 *     @dstLOD.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6dstLOD_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6dstLOD_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6dstLOD___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6dstLOD___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6916, 0, __PYX_ERR(0, 6916, __pyx_L1_error));

  /* "cuda/cuda.pyx":6917
 *     @property
 *     def dstLOD(self):
 *         return self._ptr[0].dstLOD             # <<<<<<<<<<<<<<
 *     @dstLOD.setter
 *     def dstLOD(self, size_t dstLOD):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstLOD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6916
 *         self._ptr[0].dstZ = dstZ
 *     @property
 *     def dstLOD(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstLOD
 *     @dstLOD.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstLOD.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6919
 *         return self._ptr[0].dstLOD
 *     @dstLOD.setter
 *     def dstLOD(self, size_t dstLOD):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstLOD = dstLOD
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6dstLOD_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstLOD); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6dstLOD_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstLOD) {
  size_t __pyx_v_dstLOD;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstLOD); {
    __pyx_v_dstLOD = __Pyx_PyInt_As_size_t(__pyx_arg_dstLOD); if (unlikely((__pyx_v_dstLOD == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6919, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstLOD.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6dstLOD_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_dstLOD));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6dstLOD_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_dstLOD) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6919, 0, __PYX_ERR(0, 6919, __pyx_L1_error));

  /* "cuda/cuda.pyx":6921
 *     def dstLOD(self, size_t dstLOD):
 *         pass
 *         self._ptr[0].dstLOD = dstLOD             # <<<<<<<<<<<<<<
 *     @property
 *     def dstMemoryType(self):
 */
  (__pyx_v_self->_ptr[0]).dstLOD = __pyx_v_dstLOD;

  /* "cuda/cuda.pyx":6919
 *         return self._ptr[0].dstLOD
 *     @dstLOD.setter
 *     def dstLOD(self, size_t dstLOD):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstLOD = dstLOD
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstLOD.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6923
 *         self._ptr[0].dstLOD = dstLOD
 *     @property
 *     def dstMemoryType(self):             # <<<<<<<<<<<<<<
 *         return CUmemorytype(self._ptr[0].dstMemoryType)
 *     @dstMemoryType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13dstMemoryType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13dstMemoryType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13dstMemoryType___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13dstMemoryType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6923, 0, __PYX_ERR(0, 6923, __pyx_L1_error));

  /* "cuda/cuda.pyx":6924
 *     @property
 *     def dstMemoryType(self):
 *         return CUmemorytype(self._ptr[0].dstMemoryType)             # <<<<<<<<<<<<<<
 *     @dstMemoryType.setter
 *     def dstMemoryType(self, dstMemoryType not None : CUmemorytype):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemorytype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemorytype_enum((__pyx_v_self->_ptr[0]).dstMemoryType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6923
 *         self._ptr[0].dstLOD = dstLOD
 *     @property
 *     def dstMemoryType(self):             # <<<<<<<<<<<<<<
 *         return CUmemorytype(self._ptr[0].dstMemoryType)
 *     @dstMemoryType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstMemoryType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6926
 *         return CUmemorytype(self._ptr[0].dstMemoryType)
 *     @dstMemoryType.setter
 *     def dstMemoryType(self, dstMemoryType not None : CUmemorytype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstMemoryType = dstMemoryType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13dstMemoryType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstMemoryType); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13dstMemoryType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstMemoryType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_dstMemoryType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "dstMemoryType"); __PYX_ERR(0, 6926, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13dstMemoryType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstMemoryType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13dstMemoryType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_dstMemoryType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemorytype __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6926, 0, __PYX_ERR(0, 6926, __pyx_L1_error));

  /* "cuda/cuda.pyx":6928
 *     def dstMemoryType(self, dstMemoryType not None : CUmemorytype):
 *         pass
 *         self._ptr[0].dstMemoryType = dstMemoryType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def dstHost(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dstMemoryType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemorytype_enum)__Pyx_PyInt_As_enum__CUmemorytype_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 6928, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).dstMemoryType = __pyx_t_2;

  /* "cuda/cuda.pyx":6926
 *         return CUmemorytype(self._ptr[0].dstMemoryType)
 *     @dstMemoryType.setter
 *     def dstMemoryType(self, dstMemoryType not None : CUmemorytype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstMemoryType = dstMemoryType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstMemoryType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6930
 *         self._ptr[0].dstMemoryType = dstMemoryType.value
 *     @property
 *     def dstHost(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].dstHost
 *     @dstHost.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7dstHost_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7dstHost_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7dstHost___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7dstHost___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6930, 0, __PYX_ERR(0, 6930, __pyx_L1_error));

  /* "cuda/cuda.pyx":6931
 *     @property
 *     def dstHost(self):
 *         return <void_ptr>self._ptr[0].dstHost             # <<<<<<<<<<<<<<
 *     @dstHost.setter
 *     def dstHost(self, dstHost):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).dstHost)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6930
 *         self._ptr[0].dstMemoryType = dstMemoryType.value
 *     @property
 *     def dstHost(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].dstHost
 *     @dstHost.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstHost.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6933
 *         return <void_ptr>self._ptr[0].dstHost
 *     @dstHost.setter
 *     def dstHost(self, dstHost):             # <<<<<<<<<<<<<<
 *         _cdstHost = utils.HelperInputVoidPtr(dstHost)
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7dstHost_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstHost); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7dstHost_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstHost) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7dstHost_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstHost));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7dstHost_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_dstHost) {
  PyObject *__pyx_v__cdstHost = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6933, 0, __PYX_ERR(0, 6933, __pyx_L1_error));

  /* "cuda/cuda.pyx":6934
 *     @dstHost.setter
 *     def dstHost(self, dstHost):
 *         _cdstHost = utils.HelperInputVoidPtr(dstHost)             # <<<<<<<<<<<<<<
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_dstHost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cdstHost = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6935
 *     def dstHost(self, dstHost):
 *         _cdstHost = utils.HelperInputVoidPtr(dstHost)
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def dstDevice(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cdstHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).dstHost = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":6933
 *         return <void_ptr>self._ptr[0].dstHost
 *     @dstHost.setter
 *     def dstHost(self, dstHost):             # <<<<<<<<<<<<<<
 *         _cdstHost = utils.HelperInputVoidPtr(dstHost)
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstHost.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cdstHost);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6937
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 *     @property
 *     def dstDevice(self):             # <<<<<<<<<<<<<<
 *         return self._dstDevice
 *     @dstDevice.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstDevice_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstDevice_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstDevice___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstDevice___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6937, 0, __PYX_ERR(0, 6937, __pyx_L1_error));

  /* "cuda/cuda.pyx":6938
 *     @property
 *     def dstDevice(self):
 *         return self._dstDevice             # <<<<<<<<<<<<<<
 *     @dstDevice.setter
 *     def dstDevice(self, dstDevice):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_dstDevice));
  __pyx_r = ((PyObject *)__pyx_v_self->_dstDevice);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6937
 *         self._ptr[0].dstHost = <void*><void_ptr>_cdstHost.cptr
 *     @property
 *     def dstDevice(self):             # <<<<<<<<<<<<<<
 *         return self._dstDevice
 *     @dstDevice.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstDevice.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6940
 *         return self._dstDevice
 *     @dstDevice.setter
 *     def dstDevice(self, dstDevice):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstDevice_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstDevice); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstDevice_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstDevice) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstDevice_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstDevice));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstDevice_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_dstDevice) {
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6940, 0, __PYX_ERR(0, 6940, __pyx_L1_error));

  /* "cuda/cuda.pyx":6942
 *     def dstDevice(self, dstDevice):
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:             # <<<<<<<<<<<<<<
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6943
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 *             pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6942
 *     def dstDevice(self, dstDevice):
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:             # <<<<<<<<<<<<<<
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6944
 *         if dstDevice is None:
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdstDevice = int(dstDevice)
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6945
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 *             pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6946
 *         elif isinstance(dstDevice, (CUdeviceptr)):
 *             pdstDevice = int(dstDevice)
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *         else:
 *             pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6946, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6944
 *         if dstDevice is None:
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdstDevice = int(dstDevice)
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6948
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *         else:
 *             pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *         self._dstDevice._ptr[0] = cdstDevice
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6949
 *         else:
 *             pdstDevice = int(CUdeviceptr(dstDevice))
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *         self._dstDevice._ptr[0] = cdstDevice
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6949, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6950
 *             pdstDevice = int(CUdeviceptr(dstDevice))
 *             cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *         self._dstDevice._ptr[0] = cdstDevice             # <<<<<<<<<<<<<<
 *     @property
 *     def dstArray(self):
 */
  (__pyx_v_self->_dstDevice->_ptr[0]) = __pyx_v_cdstDevice;

  /* "cuda/cuda.pyx":6940
 *         return self._dstDevice
 *     @dstDevice.setter
 *     def dstDevice(self, dstDevice):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdstDevice
 *         if dstDevice is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstDevice.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6952
 *         self._dstDevice._ptr[0] = cdstDevice
 *     @property
 *     def dstArray(self):             # <<<<<<<<<<<<<<
 *         return self._dstArray
 *     @dstArray.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstArray___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6952, 0, __PYX_ERR(0, 6952, __pyx_L1_error));

  /* "cuda/cuda.pyx":6953
 *     @property
 *     def dstArray(self):
 *         return self._dstArray             # <<<<<<<<<<<<<<
 *     @dstArray.setter
 *     def dstArray(self, dstArray):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_dstArray));
  __pyx_r = ((PyObject *)__pyx_v_self->_dstArray);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6952
 *         self._dstDevice._ptr[0] = cdstDevice
 *     @property
 *     def dstArray(self):             # <<<<<<<<<<<<<<
 *         return self._dstArray
 *     @dstArray.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6955
 *         return self._dstArray
 *     @dstArray.setter
 *     def dstArray(self, dstArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstArray); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstArray) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstArray_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_dstArray) {
  CUarray __pyx_v_cdstArray;
  PyObject *__pyx_v_pdstArray = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6955, 0, __PYX_ERR(0, 6955, __pyx_L1_error));

  /* "cuda/cuda.pyx":6957
 *     def dstArray(self, dstArray):
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:             # <<<<<<<<<<<<<<
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_dstArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6958
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:
 *             cdstArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(dstArray, (CUarray)):
 *             pdstArray = int(dstArray)
 */
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6957
 *     def dstArray(self, dstArray):
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:             # <<<<<<<<<<<<<<
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6959
 *         if dstArray is None:
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             pdstArray = int(dstArray)
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6960
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):
 *             pdstArray = int(dstArray)             # <<<<<<<<<<<<<<
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6960, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6961
 *         elif isinstance(dstArray, (CUarray)):
 *             pdstArray = int(dstArray)
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 *         else:
 *             pdstArray = int(CUarray(dstArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6961, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6959
 *         if dstArray is None:
 *             cdstArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             pdstArray = int(dstArray)
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6963
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *         else:
 *             pdstArray = int(CUarray(dstArray))             # <<<<<<<<<<<<<<
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *         self._dstArray._ptr[0] = cdstArray
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_dstArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6964
 *         else:
 *             pdstArray = int(CUarray(dstArray))
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 *         self._dstArray._ptr[0] = cdstArray
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6964, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6965
 *             pdstArray = int(CUarray(dstArray))
 *             cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *         self._dstArray._ptr[0] = cdstArray             # <<<<<<<<<<<<<<
 *     @property
 *     def dstContext(self):
 */
  (__pyx_v_self->_dstArray->_ptr[0]) = __pyx_v_cdstArray;

  /* "cuda/cuda.pyx":6955
 *         return self._dstArray
 *     @dstArray.setter
 *     def dstArray(self, dstArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray cdstArray
 *         if dstArray is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstArray);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6967
 *         self._dstArray._ptr[0] = cdstArray
 *     @property
 *     def dstContext(self):             # <<<<<<<<<<<<<<
 *         return self._dstContext
 *     @dstContext.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10dstContext_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10dstContext_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10dstContext___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10dstContext___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6967, 0, __PYX_ERR(0, 6967, __pyx_L1_error));

  /* "cuda/cuda.pyx":6968
 *     @property
 *     def dstContext(self):
 *         return self._dstContext             # <<<<<<<<<<<<<<
 *     @dstContext.setter
 *     def dstContext(self, dstContext):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_dstContext));
  __pyx_r = ((PyObject *)__pyx_v_self->_dstContext);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6967
 *         self._dstArray._ptr[0] = cdstArray
 *     @property
 *     def dstContext(self):             # <<<<<<<<<<<<<<
 *         return self._dstContext
 *     @dstContext.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstContext.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6970
 *         return self._dstContext
 *     @dstContext.setter
 *     def dstContext(self, dstContext):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUcontext cdstContext
 *         if dstContext is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10dstContext_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstContext); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10dstContext_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dstContext) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10dstContext_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((PyObject *)__pyx_v_dstContext));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10dstContext_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, PyObject *__pyx_v_dstContext) {
  CUcontext __pyx_v_cdstContext;
  PyObject *__pyx_v_pdstContext = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6970, 0, __PYX_ERR(0, 6970, __pyx_L1_error));

  /* "cuda/cuda.pyx":6972
 *     def dstContext(self, dstContext):
 *         cdef ccuda.CUcontext cdstContext
 *         if dstContext is None:             # <<<<<<<<<<<<<<
 *             cdstContext = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(dstContext, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_dstContext == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":6973
 *         cdef ccuda.CUcontext cdstContext
 *         if dstContext is None:
 *             cdstContext = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(dstContext, (CUcontext)):
 *             pdstContext = int(dstContext)
 */
    __pyx_v_cdstContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":6972
 *     def dstContext(self, dstContext):
 *         cdef ccuda.CUcontext cdstContext
 *         if dstContext is None:             # <<<<<<<<<<<<<<
 *             cdstContext = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(dstContext, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6974
 *         if dstContext is None:
 *             cdstContext = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(dstContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *             pdstContext = int(dstContext)
 *             cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstContext, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":6975
 *             cdstContext = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(dstContext, (CUcontext)):
 *             pdstContext = int(dstContext)             # <<<<<<<<<<<<<<
 *             cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstContext = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":6976
 *         elif isinstance(dstContext, (CUcontext)):
 *             pdstContext = int(dstContext)
 *             cdstContext = <ccuda.CUcontext><void_ptr>pdstContext             # <<<<<<<<<<<<<<
 *         else:
 *             pdstContext = int(CUcontext(dstContext))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6976, __pyx_L1_error)
    __pyx_v_cdstContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":6974
 *         if dstContext is None:
 *             cdstContext = <ccuda.CUcontext><void_ptr>0
 *         elif isinstance(dstContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *             pdstContext = int(dstContext)
 *             cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":6978
 *             cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 *         else:
 *             pdstContext = int(CUcontext(dstContext))             # <<<<<<<<<<<<<<
 *             cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 *         self._dstContext._ptr[0] = cdstContext
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_dstContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 6978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstContext = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":6979
 *         else:
 *             pdstContext = int(CUcontext(dstContext))
 *             cdstContext = <ccuda.CUcontext><void_ptr>pdstContext             # <<<<<<<<<<<<<<
 *         self._dstContext._ptr[0] = cdstContext
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 6979, __pyx_L1_error)
    __pyx_v_cdstContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":6980
 *             pdstContext = int(CUcontext(dstContext))
 *             cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 *         self._dstContext._ptr[0] = cdstContext             # <<<<<<<<<<<<<<
 *     @property
 *     def dstPitch(self):
 */
  (__pyx_v_self->_dstContext->_ptr[0]) = __pyx_v_cdstContext;

  /* "cuda/cuda.pyx":6970
 *         return self._dstContext
 *     @dstContext.setter
 *     def dstContext(self, dstContext):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUcontext cdstContext
 *         if dstContext is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstContext.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstContext);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6982
 *         self._dstContext._ptr[0] = cdstContext
 *     @property
 *     def dstPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstPitch
 *     @dstPitch.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstPitch_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstPitch_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstPitch___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstPitch___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6982, 0, __PYX_ERR(0, 6982, __pyx_L1_error));

  /* "cuda/cuda.pyx":6983
 *     @property
 *     def dstPitch(self):
 *         return self._ptr[0].dstPitch             # <<<<<<<<<<<<<<
 *     @dstPitch.setter
 *     def dstPitch(self, size_t dstPitch):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstPitch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6982
 *         self._dstContext._ptr[0] = cdstContext
 *     @property
 *     def dstPitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstPitch
 *     @dstPitch.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstPitch.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6985
 *         return self._ptr[0].dstPitch
 *     @dstPitch.setter
 *     def dstPitch(self, size_t dstPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstPitch = dstPitch
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstPitch); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstPitch) {
  size_t __pyx_v_dstPitch;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstPitch); {
    __pyx_v_dstPitch = __Pyx_PyInt_As_size_t(__pyx_arg_dstPitch); if (unlikely((__pyx_v_dstPitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6985, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstPitch_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_dstPitch));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstPitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_dstPitch) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6985, 0, __PYX_ERR(0, 6985, __pyx_L1_error));

  /* "cuda/cuda.pyx":6987
 *     def dstPitch(self, size_t dstPitch):
 *         pass
 *         self._ptr[0].dstPitch = dstPitch             # <<<<<<<<<<<<<<
 *     @property
 *     def dstHeight(self):
 */
  (__pyx_v_self->_ptr[0]).dstPitch = __pyx_v_dstPitch;

  /* "cuda/cuda.pyx":6985
 *         return self._ptr[0].dstPitch
 *     @dstPitch.setter
 *     def dstPitch(self, size_t dstPitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstPitch = dstPitch
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6989
 *         self._ptr[0].dstPitch = dstPitch
 *     @property
 *     def dstHeight(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstHeight
 *     @dstHeight.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstHeight_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstHeight_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstHeight___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstHeight___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6989, 0, __PYX_ERR(0, 6989, __pyx_L1_error));

  /* "cuda/cuda.pyx":6990
 *     @property
 *     def dstHeight(self):
 *         return self._ptr[0].dstHeight             # <<<<<<<<<<<<<<
 *     @dstHeight.setter
 *     def dstHeight(self, size_t dstHeight):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).dstHeight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6989
 *         self._ptr[0].dstPitch = dstPitch
 *     @property
 *     def dstHeight(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].dstHeight
 *     @dstHeight.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstHeight.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6992
 *         return self._ptr[0].dstHeight
 *     @dstHeight.setter
 *     def dstHeight(self, size_t dstHeight):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstHeight = dstHeight
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstHeight_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstHeight); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstHeight_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_dstHeight) {
  size_t __pyx_v_dstHeight;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_dstHeight); {
    __pyx_v_dstHeight = __Pyx_PyInt_As_size_t(__pyx_arg_dstHeight); if (unlikely((__pyx_v_dstHeight == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6992, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstHeight.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstHeight_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_dstHeight));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstHeight_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_dstHeight) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6992, 0, __PYX_ERR(0, 6992, __pyx_L1_error));

  /* "cuda/cuda.pyx":6994
 *     def dstHeight(self, size_t dstHeight):
 *         pass
 *         self._ptr[0].dstHeight = dstHeight             # <<<<<<<<<<<<<<
 *     @property
 *     def WidthInBytes(self):
 */
  (__pyx_v_self->_ptr[0]).dstHeight = __pyx_v_dstHeight;

  /* "cuda/cuda.pyx":6992
 *         return self._ptr[0].dstHeight
 *     @dstHeight.setter
 *     def dstHeight(self, size_t dstHeight):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].dstHeight = dstHeight
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.dstHeight.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6996
 *         self._ptr[0].dstHeight = dstHeight
 *     @property
 *     def WidthInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].WidthInBytes
 *     @WidthInBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12WidthInBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12WidthInBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12WidthInBytes___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12WidthInBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 6996, 0, __PYX_ERR(0, 6996, __pyx_L1_error));

  /* "cuda/cuda.pyx":6997
 *     @property
 *     def WidthInBytes(self):
 *         return self._ptr[0].WidthInBytes             # <<<<<<<<<<<<<<
 *     @WidthInBytes.setter
 *     def WidthInBytes(self, size_t WidthInBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).WidthInBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":6996
 *         self._ptr[0].dstHeight = dstHeight
 *     @property
 *     def WidthInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].WidthInBytes
 *     @WidthInBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.WidthInBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":6999
 *         return self._ptr[0].WidthInBytes
 *     @WidthInBytes.setter
 *     def WidthInBytes(self, size_t WidthInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].WidthInBytes = WidthInBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12WidthInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_WidthInBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12WidthInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_WidthInBytes) {
  size_t __pyx_v_WidthInBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_WidthInBytes); {
    __pyx_v_WidthInBytes = __Pyx_PyInt_As_size_t(__pyx_arg_WidthInBytes); if (unlikely((__pyx_v_WidthInBytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 6999, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.WidthInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12WidthInBytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_WidthInBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12WidthInBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_WidthInBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 6999, 0, __PYX_ERR(0, 6999, __pyx_L1_error));

  /* "cuda/cuda.pyx":7001
 *     def WidthInBytes(self, size_t WidthInBytes):
 *         pass
 *         self._ptr[0].WidthInBytes = WidthInBytes             # <<<<<<<<<<<<<<
 *     @property
 *     def Height(self):
 */
  (__pyx_v_self->_ptr[0]).WidthInBytes = __pyx_v_WidthInBytes;

  /* "cuda/cuda.pyx":6999
 *         return self._ptr[0].WidthInBytes
 *     @WidthInBytes.setter
 *     def WidthInBytes(self, size_t WidthInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].WidthInBytes = WidthInBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.WidthInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7003
 *         self._ptr[0].WidthInBytes = WidthInBytes
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Height
 *     @Height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6Height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6Height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6Height___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6Height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7003, 0, __PYX_ERR(0, 7003, __pyx_L1_error));

  /* "cuda/cuda.pyx":7004
 *     @property
 *     def Height(self):
 *         return self._ptr[0].Height             # <<<<<<<<<<<<<<
 *     @Height.setter
 *     def Height(self, size_t Height):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).Height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7003
 *         self._ptr[0].WidthInBytes = WidthInBytes
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Height
 *     @Height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.Height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7006
 *         return self._ptr[0].Height
 *     @Height.setter
 *     def Height(self, size_t Height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Height = Height
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Height); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Height) {
  size_t __pyx_v_Height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_Height); {
    __pyx_v_Height = __Pyx_PyInt_As_size_t(__pyx_arg_Height); if (unlikely((__pyx_v_Height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7006, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.Height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6Height_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_Height));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6Height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_Height) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7006, 0, __PYX_ERR(0, 7006, __pyx_L1_error));

  /* "cuda/cuda.pyx":7008
 *     def Height(self, size_t Height):
 *         pass
 *         self._ptr[0].Height = Height             # <<<<<<<<<<<<<<
 *     @property
 *     def Depth(self):
 */
  (__pyx_v_self->_ptr[0]).Height = __pyx_v_Height;

  /* "cuda/cuda.pyx":7006
 *         return self._ptr[0].Height
 *     @Height.setter
 *     def Height(self, size_t Height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Height = Height
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.Height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7010
 *         self._ptr[0].Height = Height
 *     @property
 *     def Depth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Depth
 *     @Depth.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5Depth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5Depth_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5Depth___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5Depth___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7010, 0, __PYX_ERR(0, 7010, __pyx_L1_error));

  /* "cuda/cuda.pyx":7011
 *     @property
 *     def Depth(self):
 *         return self._ptr[0].Depth             # <<<<<<<<<<<<<<
 *     @Depth.setter
 *     def Depth(self, size_t Depth):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).Depth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7010
 *         self._ptr[0].Height = Height
 *     @property
 *     def Depth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Depth
 *     @Depth.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.Depth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7013
 *         return self._ptr[0].Depth
 *     @Depth.setter
 *     def Depth(self, size_t Depth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Depth = Depth
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5Depth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Depth); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5Depth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Depth) {
  size_t __pyx_v_Depth;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_Depth); {
    __pyx_v_Depth = __Pyx_PyInt_As_size_t(__pyx_arg_Depth); if (unlikely((__pyx_v_Depth == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7013, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.Depth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5Depth_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((size_t)__pyx_v_Depth));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5Depth_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, size_t __pyx_v_Depth) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7013, 0, __PYX_ERR(0, 7013, __pyx_L1_error));

  /* "cuda/cuda.pyx":7015
 *     def Depth(self, size_t Depth):
 *         pass
 *         self._ptr[0].Depth = Depth             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_ARRAY_DESCRIPTOR_st:
 */
  (__pyx_v_self->_ptr[0]).Depth = __pyx_v_Depth;

  /* "cuda/cuda.pyx":7013
 *         return self._ptr[0].Depth
 *     @Depth.setter
 *     def Depth(self, size_t Depth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Depth = Depth
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.Depth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10__reduce_cython__[] = "CUDA_MEMCPY3D_PEER_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__252)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__253, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12__setstate_cython__[] = "CUDA_MEMCPY3D_PEER_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__254)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__255, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEMCPY3D_PEER_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7038
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7038, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7038, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7038, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7038, 0, __PYX_ERR(0, 7038, __pyx_L1_error));

  /* "cuda/cuda.pyx":7039
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7040
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY_DESCRIPTOR_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":7039
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7042
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY_DESCRIPTOR_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":7038
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7043
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY_DESCRIPTOR_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7043, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7043, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7043, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7043, 0, __PYX_ERR(0, 7043, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7045
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 7045, 0, __PYX_ERR(0, 7045, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":7047
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6getPtr[] = "CUDA_ARRAY_DESCRIPTOR_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__256)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7047, 0, __PYX_ERR(0, 7047, __pyx_L1_error));

  /* "cuda/cuda.pyx":7048
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7047
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7049
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7049, 0, __PYX_ERR(0, 7049, __pyx_L1_error));

  /* "cuda/cuda.pyx":7050
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['Width : ' + str(self.Width)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7051
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['Width : ' + str(self.Width)]
 *             str_list += ['Height : ' + str(self.Height)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7052
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['Width : ' + str(self.Width)]             # <<<<<<<<<<<<<<
 *             str_list += ['Height : ' + str(self.Height)]
 *             str_list += ['Format : ' + str(self.Format)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Width_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Width, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7053
 *             str_list = []
 *             str_list += ['Width : ' + str(self.Width)]
 *             str_list += ['Height : ' + str(self.Height)]             # <<<<<<<<<<<<<<
 *             str_list += ['Format : ' + str(self.Format)]
 *             str_list += ['NumChannels : ' + str(self.NumChannels)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Height_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Height, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7054
 *             str_list += ['Width : ' + str(self.Width)]
 *             str_list += ['Height : ' + str(self.Height)]
 *             str_list += ['Format : ' + str(self.Format)]             # <<<<<<<<<<<<<<
 *             str_list += ['NumChannels : ' + str(self.NumChannels)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Format_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Format, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7055
 *             str_list += ['Height : ' + str(self.Height)]
 *             str_list += ['Format : ' + str(self.Format)]
 *             str_list += ['NumChannels : ' + str(self.NumChannels)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_NumChannels_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_NumChannels, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7056
 *             str_list += ['Format : ' + str(self.Format)]
 *             str_list += ['NumChannels : ' + str(self.NumChannels)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7050
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['Width : ' + str(self.Width)]
 */
  }

  /* "cuda/cuda.pyx":7058
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7049
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7061
 * 
 *     @property
 *     def Width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Width
 *     @Width.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5Width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5Width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5Width___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5Width___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7061, 0, __PYX_ERR(0, 7061, __pyx_L1_error));

  /* "cuda/cuda.pyx":7062
 *     @property
 *     def Width(self):
 *         return self._ptr[0].Width             # <<<<<<<<<<<<<<
 *     @Width.setter
 *     def Width(self, size_t Width):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).Width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7061
 * 
 *     @property
 *     def Width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Width
 *     @Width.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.Width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7064
 *         return self._ptr[0].Width
 *     @Width.setter
 *     def Width(self, size_t Width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Width = Width
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5Width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Width); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5Width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Width) {
  size_t __pyx_v_Width;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_Width); {
    __pyx_v_Width = __Pyx_PyInt_As_size_t(__pyx_arg_Width); if (unlikely((__pyx_v_Width == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7064, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.Width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5Width_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self), ((size_t)__pyx_v_Width));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5Width_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, size_t __pyx_v_Width) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7064, 0, __PYX_ERR(0, 7064, __pyx_L1_error));

  /* "cuda/cuda.pyx":7066
 *     def Width(self, size_t Width):
 *         pass
 *         self._ptr[0].Width = Width             # <<<<<<<<<<<<<<
 *     @property
 *     def Height(self):
 */
  (__pyx_v_self->_ptr[0]).Width = __pyx_v_Width;

  /* "cuda/cuda.pyx":7064
 *         return self._ptr[0].Width
 *     @Width.setter
 *     def Width(self, size_t Width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Width = Width
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.Width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7068
 *         self._ptr[0].Width = Width
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Height
 *     @Height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Height___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7068, 0, __PYX_ERR(0, 7068, __pyx_L1_error));

  /* "cuda/cuda.pyx":7069
 *     @property
 *     def Height(self):
 *         return self._ptr[0].Height             # <<<<<<<<<<<<<<
 *     @Height.setter
 *     def Height(self, size_t Height):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).Height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7068
 *         self._ptr[0].Width = Width
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Height
 *     @Height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.Height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7071
 *         return self._ptr[0].Height
 *     @Height.setter
 *     def Height(self, size_t Height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Height = Height
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Height); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Height) {
  size_t __pyx_v_Height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_Height); {
    __pyx_v_Height = __Pyx_PyInt_As_size_t(__pyx_arg_Height); if (unlikely((__pyx_v_Height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7071, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.Height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Height_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self), ((size_t)__pyx_v_Height));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, size_t __pyx_v_Height) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7071, 0, __PYX_ERR(0, 7071, __pyx_L1_error));

  /* "cuda/cuda.pyx":7073
 *     def Height(self, size_t Height):
 *         pass
 *         self._ptr[0].Height = Height             # <<<<<<<<<<<<<<
 *     @property
 *     def Format(self):
 */
  (__pyx_v_self->_ptr[0]).Height = __pyx_v_Height;

  /* "cuda/cuda.pyx":7071
 *         return self._ptr[0].Height
 *     @Height.setter
 *     def Height(self, size_t Height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Height = Height
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.Height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7075
 *         self._ptr[0].Height = Height
 *     @property
 *     def Format(self):             # <<<<<<<<<<<<<<
 *         return CUarray_format(self._ptr[0].Format)
 *     @Format.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Format_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Format_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Format___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Format___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7075, 0, __PYX_ERR(0, 7075, __pyx_L1_error));

  /* "cuda/cuda.pyx":7076
 *     @property
 *     def Format(self):
 *         return CUarray_format(self._ptr[0].Format)             # <<<<<<<<<<<<<<
 *     @Format.setter
 *     def Format(self, Format not None : CUarray_format):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUarray_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUarray_format_enum((__pyx_v_self->_ptr[0]).Format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7075
 *         self._ptr[0].Height = Height
 *     @property
 *     def Format(self):             # <<<<<<<<<<<<<<
 *         return CUarray_format(self._ptr[0].Format)
 *     @Format.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.Format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7078
 *         return CUarray_format(self._ptr[0].Format)
 *     @Format.setter
 *     def Format(self, Format not None : CUarray_format):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Format = Format.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_Format); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_Format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_Format) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "Format"); __PYX_ERR(0, 7078, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Format_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self), ((PyObject *)__pyx_v_Format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Format_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, PyObject *__pyx_v_Format) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUarray_format __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7078, 0, __PYX_ERR(0, 7078, __pyx_L1_error));

  /* "cuda/cuda.pyx":7080
 *     def Format(self, Format not None : CUarray_format):
 *         pass
 *         self._ptr[0].Format = Format.value             # <<<<<<<<<<<<<<
 *     @property
 *     def NumChannels(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_Format, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUarray_format_enum)__Pyx_PyInt_As_enum__CUarray_format_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7080, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).Format = __pyx_t_2;

  /* "cuda/cuda.pyx":7078
 *         return CUarray_format(self._ptr[0].Format)
 *     @Format.setter
 *     def Format(self, Format not None : CUarray_format):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Format = Format.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.Format.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7082
 *         self._ptr[0].Format = Format.value
 *     @property
 *     def NumChannels(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].NumChannels
 *     @NumChannels.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11NumChannels_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11NumChannels_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11NumChannels___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11NumChannels___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7082, 0, __PYX_ERR(0, 7082, __pyx_L1_error));

  /* "cuda/cuda.pyx":7083
 *     @property
 *     def NumChannels(self):
 *         return self._ptr[0].NumChannels             # <<<<<<<<<<<<<<
 *     @NumChannels.setter
 *     def NumChannels(self, unsigned int NumChannels):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).NumChannels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7082
 *         self._ptr[0].Format = Format.value
 *     @property
 *     def NumChannels(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].NumChannels
 *     @NumChannels.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.NumChannels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7085
 *         return self._ptr[0].NumChannels
 *     @NumChannels.setter
 *     def NumChannels(self, unsigned int NumChannels):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].NumChannels = NumChannels
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11NumChannels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_NumChannels); /*proto*/
static int __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11NumChannels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_NumChannels) {
  unsigned int __pyx_v_NumChannels;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_NumChannels); {
    __pyx_v_NumChannels = __Pyx_PyInt_As_unsigned_int(__pyx_arg_NumChannels); if (unlikely((__pyx_v_NumChannels == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7085, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.NumChannels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11NumChannels_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self), ((unsigned int)__pyx_v_NumChannels));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11NumChannels_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, unsigned int __pyx_v_NumChannels) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7085, 0, __PYX_ERR(0, 7085, __pyx_L1_error));

  /* "cuda/cuda.pyx":7087
 *     def NumChannels(self, unsigned int NumChannels):
 *         pass
 *         self._ptr[0].NumChannels = NumChannels             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_ARRAY3D_DESCRIPTOR_st:
 */
  (__pyx_v_self->_ptr[0]).NumChannels = __pyx_v_NumChannels;

  /* "cuda/cuda.pyx":7085
 *         return self._ptr[0].NumChannels
 *     @NumChannels.setter
 *     def NumChannels(self, unsigned int NumChannels):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].NumChannels = NumChannels
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.NumChannels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_10__reduce_cython__[] = "CUDA_ARRAY_DESCRIPTOR_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__257)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__258, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_12__setstate_cython__[] = "CUDA_ARRAY_DESCRIPTOR_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__259)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__260, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7114
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7114, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7114, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7114, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7114, 0, __PYX_ERR(0, 7114, __pyx_L1_error));

  /* "cuda/cuda.pyx":7115
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7116
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY3D_DESCRIPTOR_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":7115
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7118
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY3D_DESCRIPTOR_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":7114
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7119
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY3D_DESCRIPTOR_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7119, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7119, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7119, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7119, 0, __PYX_ERR(0, 7119, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7121
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 7121, 0, __PYX_ERR(0, 7121, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":7123
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6getPtr[] = "CUDA_ARRAY3D_DESCRIPTOR_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__261)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7123, 0, __PYX_ERR(0, 7123, __pyx_L1_error));

  /* "cuda/cuda.pyx":7124
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7123
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7125
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7125, 0, __PYX_ERR(0, 7125, __pyx_L1_error));

  /* "cuda/cuda.pyx":7126
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['Width : ' + str(self.Width)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7127
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['Width : ' + str(self.Width)]
 *             str_list += ['Height : ' + str(self.Height)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7128
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['Width : ' + str(self.Width)]             # <<<<<<<<<<<<<<
 *             str_list += ['Height : ' + str(self.Height)]
 *             str_list += ['Depth : ' + str(self.Depth)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Width_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Width, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7129
 *             str_list = []
 *             str_list += ['Width : ' + str(self.Width)]
 *             str_list += ['Height : ' + str(self.Height)]             # <<<<<<<<<<<<<<
 *             str_list += ['Depth : ' + str(self.Depth)]
 *             str_list += ['Format : ' + str(self.Format)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Height_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Height, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7130
 *             str_list += ['Width : ' + str(self.Width)]
 *             str_list += ['Height : ' + str(self.Height)]
 *             str_list += ['Depth : ' + str(self.Depth)]             # <<<<<<<<<<<<<<
 *             str_list += ['Format : ' + str(self.Format)]
 *             str_list += ['NumChannels : ' + str(self.NumChannels)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Depth_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Depth, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7131
 *             str_list += ['Height : ' + str(self.Height)]
 *             str_list += ['Depth : ' + str(self.Depth)]
 *             str_list += ['Format : ' + str(self.Format)]             # <<<<<<<<<<<<<<
 *             str_list += ['NumChannels : ' + str(self.NumChannels)]
 *             str_list += ['Flags : ' + str(self.Flags)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Format_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Format, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7132
 *             str_list += ['Depth : ' + str(self.Depth)]
 *             str_list += ['Format : ' + str(self.Format)]
 *             str_list += ['NumChannels : ' + str(self.NumChannels)]             # <<<<<<<<<<<<<<
 *             str_list += ['Flags : ' + str(self.Flags)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_NumChannels_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_NumChannels, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7133
 *             str_list += ['Format : ' + str(self.Format)]
 *             str_list += ['NumChannels : ' + str(self.NumChannels)]
 *             str_list += ['Flags : ' + str(self.Flags)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Flags, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7134
 *             str_list += ['NumChannels : ' + str(self.NumChannels)]
 *             str_list += ['Flags : ' + str(self.Flags)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7126
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['Width : ' + str(self.Width)]
 */
  }

  /* "cuda/cuda.pyx":7136
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7125
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7139
 * 
 *     @property
 *     def Width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Width
 *     @Width.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Width___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Width___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7139, 0, __PYX_ERR(0, 7139, __pyx_L1_error));

  /* "cuda/cuda.pyx":7140
 *     @property
 *     def Width(self):
 *         return self._ptr[0].Width             # <<<<<<<<<<<<<<
 *     @Width.setter
 *     def Width(self, size_t Width):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).Width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7139
 * 
 *     @property
 *     def Width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Width
 *     @Width.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7142
 *         return self._ptr[0].Width
 *     @Width.setter
 *     def Width(self, size_t Width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Width = Width
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Width); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Width) {
  size_t __pyx_v_Width;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_Width); {
    __pyx_v_Width = __Pyx_PyInt_As_size_t(__pyx_arg_Width); if (unlikely((__pyx_v_Width == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7142, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Width_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self), ((size_t)__pyx_v_Width));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Width_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, size_t __pyx_v_Width) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7142, 0, __PYX_ERR(0, 7142, __pyx_L1_error));

  /* "cuda/cuda.pyx":7144
 *     def Width(self, size_t Width):
 *         pass
 *         self._ptr[0].Width = Width             # <<<<<<<<<<<<<<
 *     @property
 *     def Height(self):
 */
  (__pyx_v_self->_ptr[0]).Width = __pyx_v_Width;

  /* "cuda/cuda.pyx":7142
 *         return self._ptr[0].Width
 *     @Width.setter
 *     def Width(self, size_t Width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Width = Width
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7146
 *         self._ptr[0].Width = Width
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Height
 *     @Height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Height___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7146, 0, __PYX_ERR(0, 7146, __pyx_L1_error));

  /* "cuda/cuda.pyx":7147
 *     @property
 *     def Height(self):
 *         return self._ptr[0].Height             # <<<<<<<<<<<<<<
 *     @Height.setter
 *     def Height(self, size_t Height):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).Height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7146
 *         self._ptr[0].Width = Width
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Height
 *     @Height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7149
 *         return self._ptr[0].Height
 *     @Height.setter
 *     def Height(self, size_t Height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Height = Height
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Height); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Height) {
  size_t __pyx_v_Height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_Height); {
    __pyx_v_Height = __Pyx_PyInt_As_size_t(__pyx_arg_Height); if (unlikely((__pyx_v_Height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7149, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Height_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self), ((size_t)__pyx_v_Height));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, size_t __pyx_v_Height) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7149, 0, __PYX_ERR(0, 7149, __pyx_L1_error));

  /* "cuda/cuda.pyx":7151
 *     def Height(self, size_t Height):
 *         pass
 *         self._ptr[0].Height = Height             # <<<<<<<<<<<<<<
 *     @property
 *     def Depth(self):
 */
  (__pyx_v_self->_ptr[0]).Height = __pyx_v_Height;

  /* "cuda/cuda.pyx":7149
 *         return self._ptr[0].Height
 *     @Height.setter
 *     def Height(self, size_t Height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Height = Height
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7153
 *         self._ptr[0].Height = Height
 *     @property
 *     def Depth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Depth
 *     @Depth.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Depth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Depth_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Depth___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Depth___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7153, 0, __PYX_ERR(0, 7153, __pyx_L1_error));

  /* "cuda/cuda.pyx":7154
 *     @property
 *     def Depth(self):
 *         return self._ptr[0].Depth             # <<<<<<<<<<<<<<
 *     @Depth.setter
 *     def Depth(self, size_t Depth):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).Depth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7153
 *         self._ptr[0].Height = Height
 *     @property
 *     def Depth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Depth
 *     @Depth.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Depth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7156
 *         return self._ptr[0].Depth
 *     @Depth.setter
 *     def Depth(self, size_t Depth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Depth = Depth
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Depth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Depth); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Depth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Depth) {
  size_t __pyx_v_Depth;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_Depth); {
    __pyx_v_Depth = __Pyx_PyInt_As_size_t(__pyx_arg_Depth); if (unlikely((__pyx_v_Depth == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7156, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Depth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Depth_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self), ((size_t)__pyx_v_Depth));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Depth_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, size_t __pyx_v_Depth) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7156, 0, __PYX_ERR(0, 7156, __pyx_L1_error));

  /* "cuda/cuda.pyx":7158
 *     def Depth(self, size_t Depth):
 *         pass
 *         self._ptr[0].Depth = Depth             # <<<<<<<<<<<<<<
 *     @property
 *     def Format(self):
 */
  (__pyx_v_self->_ptr[0]).Depth = __pyx_v_Depth;

  /* "cuda/cuda.pyx":7156
 *         return self._ptr[0].Depth
 *     @Depth.setter
 *     def Depth(self, size_t Depth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Depth = Depth
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Depth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7160
 *         self._ptr[0].Depth = Depth
 *     @property
 *     def Format(self):             # <<<<<<<<<<<<<<
 *         return CUarray_format(self._ptr[0].Format)
 *     @Format.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Format_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Format_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Format___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Format___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7160, 0, __PYX_ERR(0, 7160, __pyx_L1_error));

  /* "cuda/cuda.pyx":7161
 *     @property
 *     def Format(self):
 *         return CUarray_format(self._ptr[0].Format)             # <<<<<<<<<<<<<<
 *     @Format.setter
 *     def Format(self, Format not None : CUarray_format):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUarray_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUarray_format_enum((__pyx_v_self->_ptr[0]).Format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7160
 *         self._ptr[0].Depth = Depth
 *     @property
 *     def Format(self):             # <<<<<<<<<<<<<<
 *         return CUarray_format(self._ptr[0].Format)
 *     @Format.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7163
 *         return CUarray_format(self._ptr[0].Format)
 *     @Format.setter
 *     def Format(self, Format not None : CUarray_format):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Format = Format.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_Format); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_Format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_Format) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "Format"); __PYX_ERR(0, 7163, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Format_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self), ((PyObject *)__pyx_v_Format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Format_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, PyObject *__pyx_v_Format) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUarray_format __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7163, 0, __PYX_ERR(0, 7163, __pyx_L1_error));

  /* "cuda/cuda.pyx":7165
 *     def Format(self, Format not None : CUarray_format):
 *         pass
 *         self._ptr[0].Format = Format.value             # <<<<<<<<<<<<<<
 *     @property
 *     def NumChannels(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_Format, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUarray_format_enum)__Pyx_PyInt_As_enum__CUarray_format_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).Format = __pyx_t_2;

  /* "cuda/cuda.pyx":7163
 *         return CUarray_format(self._ptr[0].Format)
 *     @Format.setter
 *     def Format(self, Format not None : CUarray_format):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Format = Format.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Format.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7167
 *         self._ptr[0].Format = Format.value
 *     @property
 *     def NumChannels(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].NumChannels
 *     @NumChannels.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11NumChannels_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11NumChannels_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11NumChannels___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11NumChannels___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7167, 0, __PYX_ERR(0, 7167, __pyx_L1_error));

  /* "cuda/cuda.pyx":7168
 *     @property
 *     def NumChannels(self):
 *         return self._ptr[0].NumChannels             # <<<<<<<<<<<<<<
 *     @NumChannels.setter
 *     def NumChannels(self, unsigned int NumChannels):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).NumChannels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7167
 *         self._ptr[0].Format = Format.value
 *     @property
 *     def NumChannels(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].NumChannels
 *     @NumChannels.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.NumChannels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7170
 *         return self._ptr[0].NumChannels
 *     @NumChannels.setter
 *     def NumChannels(self, unsigned int NumChannels):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].NumChannels = NumChannels
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11NumChannels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_NumChannels); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11NumChannels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_NumChannels) {
  unsigned int __pyx_v_NumChannels;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_NumChannels); {
    __pyx_v_NumChannels = __Pyx_PyInt_As_unsigned_int(__pyx_arg_NumChannels); if (unlikely((__pyx_v_NumChannels == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7170, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.NumChannels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11NumChannels_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self), ((unsigned int)__pyx_v_NumChannels));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11NumChannels_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, unsigned int __pyx_v_NumChannels) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7170, 0, __PYX_ERR(0, 7170, __pyx_L1_error));

  /* "cuda/cuda.pyx":7172
 *     def NumChannels(self, unsigned int NumChannels):
 *         pass
 *         self._ptr[0].NumChannels = NumChannels             # <<<<<<<<<<<<<<
 *     @property
 *     def Flags(self):
 */
  (__pyx_v_self->_ptr[0]).NumChannels = __pyx_v_NumChannels;

  /* "cuda/cuda.pyx":7170
 *         return self._ptr[0].NumChannels
 *     @NumChannels.setter
 *     def NumChannels(self, unsigned int NumChannels):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].NumChannels = NumChannels
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.NumChannels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7174
 *         self._ptr[0].NumChannels = NumChannels
 *     @property
 *     def Flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Flags
 *     @Flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Flags___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7174, 0, __PYX_ERR(0, 7174, __pyx_L1_error));

  /* "cuda/cuda.pyx":7175
 *     @property
 *     def Flags(self):
 *         return self._ptr[0].Flags             # <<<<<<<<<<<<<<
 *     @Flags.setter
 *     def Flags(self, unsigned int Flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).Flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7174
 *         self._ptr[0].NumChannels = NumChannels
 *     @property
 *     def Flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].Flags
 *     @Flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7177
 *         return self._ptr[0].Flags
 *     @Flags.setter
 *     def Flags(self, unsigned int Flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Flags = Flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_Flags) {
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_Flags); {
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_Flags); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7177, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self), ((unsigned int)__pyx_v_Flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, unsigned int __pyx_v_Flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7177, 0, __PYX_ERR(0, 7177, __pyx_L1_error));

  /* "cuda/cuda.pyx":7179
 *     def Flags(self, unsigned int Flags):
 *         pass
 *         self._ptr[0].Flags = Flags             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s:
 */
  (__pyx_v_self->_ptr[0]).Flags = __pyx_v_Flags;

  /* "cuda/cuda.pyx":7177
 *         return self._ptr[0].Flags
 *     @Flags.setter
 *     def Flags(self, unsigned int Flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].Flags = Flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.Flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_10__reduce_cython__[] = "CUDA_ARRAY3D_DESCRIPTOR_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__262)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__263, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_12__setstate_cython__[] = "CUDA_ARRAY3D_DESCRIPTOR_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__264)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__265, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7199
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7199, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7199, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7199, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7199, 0, __PYX_ERR(0, 7199, __pyx_L1_error));

  /* "cuda/cuda.pyx":7200
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":7199
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7201
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7201, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7201, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7201, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7201, 0, __PYX_ERR(0, 7201, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7203
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_4getPtr[] = "_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__266)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7203, 0, __PYX_ERR(0, 7203, __pyx_L1_error));

  /* "cuda/cuda.pyx":7204
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7203
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7205
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7205, 0, __PYX_ERR(0, 7205, __pyx_L1_error));

  /* "cuda/cuda.pyx":7206
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['width : ' + str(self.width)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7207
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7208
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['width : ' + str(self.width)]             # <<<<<<<<<<<<<<
 *             str_list += ['height : ' + str(self.height)]
 *             str_list += ['depth : ' + str(self.depth)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_width, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7209
 *             str_list = []
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]             # <<<<<<<<<<<<<<
 *             str_list += ['depth : ' + str(self.depth)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_height, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7210
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]
 *             str_list += ['depth : ' + str(self.depth)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_depth_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_depth, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7211
 *             str_list += ['height : ' + str(self.height)]
 *             str_list += ['depth : ' + str(self.depth)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7206
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['width : ' + str(self.width)]
 */
  }

  /* "cuda/cuda.pyx":7213
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7205
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7216
 * 
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].tileExtent.width
 *     @width.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5width___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5width___get__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7216, 0, __PYX_ERR(0, 7216, __pyx_L1_error));

  /* "cuda/cuda.pyx":7217
 *     @property
 *     def width(self):
 *         return self._ptr[0].tileExtent.width             # <<<<<<<<<<<<<<
 *     @width.setter
 *     def width(self, unsigned int width):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).tileExtent.width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7216
 * 
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].tileExtent.width
 *     @width.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7219
 *         return self._ptr[0].tileExtent.width
 *     @width.setter
 *     def width(self, unsigned int width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].tileExtent.width = width
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_width); /*proto*/
static int __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_width) {
  unsigned int __pyx_v_width;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_width); {
    __pyx_v_width = __Pyx_PyInt_As_unsigned_int(__pyx_arg_width); if (unlikely((__pyx_v_width == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7219, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5width_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_self), ((unsigned int)__pyx_v_width));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5width_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self, unsigned int __pyx_v_width) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7219, 0, __PYX_ERR(0, 7219, __pyx_L1_error));

  /* "cuda/cuda.pyx":7221
 *     def width(self, unsigned int width):
 *         pass
 *         self._ptr[0].tileExtent.width = width             # <<<<<<<<<<<<<<
 *     @property
 *     def height(self):
 */
  (__pyx_v_self->_ptr[0]).tileExtent.width = __pyx_v_width;

  /* "cuda/cuda.pyx":7219
 *         return self._ptr[0].tileExtent.width
 *     @width.setter
 *     def width(self, unsigned int width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].tileExtent.width = width
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7223
 *         self._ptr[0].tileExtent.width = width
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].tileExtent.height
 *     @height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6height___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6height___get__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7223, 0, __PYX_ERR(0, 7223, __pyx_L1_error));

  /* "cuda/cuda.pyx":7224
 *     @property
 *     def height(self):
 *         return self._ptr[0].tileExtent.height             # <<<<<<<<<<<<<<
 *     @height.setter
 *     def height(self, unsigned int height):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).tileExtent.height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7223
 *         self._ptr[0].tileExtent.width = width
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].tileExtent.height
 *     @height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7226
 *         return self._ptr[0].tileExtent.height
 *     @height.setter
 *     def height(self, unsigned int height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].tileExtent.height = height
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_height); /*proto*/
static int __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_height) {
  unsigned int __pyx_v_height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_height); {
    __pyx_v_height = __Pyx_PyInt_As_unsigned_int(__pyx_arg_height); if (unlikely((__pyx_v_height == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7226, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6height_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_self), ((unsigned int)__pyx_v_height));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6height_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self, unsigned int __pyx_v_height) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7226, 0, __PYX_ERR(0, 7226, __pyx_L1_error));

  /* "cuda/cuda.pyx":7228
 *     def height(self, unsigned int height):
 *         pass
 *         self._ptr[0].tileExtent.height = height             # <<<<<<<<<<<<<<
 *     @property
 *     def depth(self):
 */
  (__pyx_v_self->_ptr[0]).tileExtent.height = __pyx_v_height;

  /* "cuda/cuda.pyx":7226
 *         return self._ptr[0].tileExtent.height
 *     @height.setter
 *     def height(self, unsigned int height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].tileExtent.height = height
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7230
 *         self._ptr[0].tileExtent.height = height
 *     @property
 *     def depth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].tileExtent.depth
 *     @depth.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5depth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5depth_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5depth___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5depth___get__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7230, 0, __PYX_ERR(0, 7230, __pyx_L1_error));

  /* "cuda/cuda.pyx":7231
 *     @property
 *     def depth(self):
 *         return self._ptr[0].tileExtent.depth             # <<<<<<<<<<<<<<
 *     @depth.setter
 *     def depth(self, unsigned int depth):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).tileExtent.depth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7230
 *         self._ptr[0].tileExtent.height = height
 *     @property
 *     def depth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].tileExtent.depth
 *     @depth.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.depth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7233
 *         return self._ptr[0].tileExtent.depth
 *     @depth.setter
 *     def depth(self, unsigned int depth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].tileExtent.depth = depth
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5depth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_depth); /*proto*/
static int __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5depth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_depth) {
  unsigned int __pyx_v_depth;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_depth); {
    __pyx_v_depth = __Pyx_PyInt_As_unsigned_int(__pyx_arg_depth); if (unlikely((__pyx_v_depth == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7233, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.depth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5depth_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_self), ((unsigned int)__pyx_v_depth));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5depth_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self, unsigned int __pyx_v_depth) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7233, 0, __PYX_ERR(0, 7233, __pyx_L1_error));

  /* "cuda/cuda.pyx":7235
 *     def depth(self, unsigned int depth):
 *         pass
 *         self._ptr[0].tileExtent.depth = depth             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_ARRAY_SPARSE_PROPERTIES_st:
 */
  (__pyx_v_self->_ptr[0]).tileExtent.depth = __pyx_v_depth;

  /* "cuda/cuda.pyx":7233
 *         return self._ptr[0].tileExtent.depth
 *     @depth.setter
 *     def depth(self, unsigned int depth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].tileExtent.depth = depth
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.depth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_8__reduce_cython__[] = "_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__267)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__268, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_10__setstate_cython__[] = "_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__269)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__270, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7261
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7261, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7261, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7261, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7261, 0, __PYX_ERR(0, 7261, __pyx_L1_error));

  /* "cuda/cuda.pyx":7262
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7263
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":7262
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7265
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._tileExtent = _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s(_ptr=<void_ptr>self._ptr)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":7261
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7266
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._tileExtent = _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7266, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7266, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7266, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7266, 0, __PYX_ERR(0, 7266, __pyx_L1_error));

  /* "cuda/cuda.pyx":7267
 *             self._ptr = <ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._tileExtent = _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 7267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_tileExtent);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_tileExtent));
  __pyx_v_self->_tileExtent = ((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7266
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._tileExtent = _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7268
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._tileExtent = _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 7268, 0, __PYX_ERR(0, 7268, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":7270
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_6getPtr[] = "CUDA_ARRAY_SPARSE_PROPERTIES_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__271)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7270, 0, __PYX_ERR(0, 7270, __pyx_L1_error));

  /* "cuda/cuda.pyx":7271
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7270
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7272
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr15__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7272, 0, __PYX_ERR(0, 7272, __pyx_L1_error));

  /* "cuda/cuda.pyx":7273
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['tileExtent :\n' + '\n'.join(['    ' + line for line in str(self.tileExtent).splitlines()])]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7274
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['tileExtent :\n' + '\n'.join(['    ' + line for line in str(self.tileExtent).splitlines()])]
 *             str_list += ['miptailFirstLevel : ' + str(self.miptailFirstLevel)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7275
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['tileExtent :\n' + '\n'.join(['    ' + line for line in str(self.tileExtent).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['miptailFirstLevel : ' + str(self.miptailFirstLevel)]
 *             str_list += ['miptailSize : ' + str(self.miptailSize)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7275, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tileExtent_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7275, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7275, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7275, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 7275, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7275, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr15__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7275, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 7275, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_line); __pyx_9genexpr15__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_line); __pyx_9genexpr15__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_tileExtent, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7276
 *             str_list = []
 *             str_list += ['tileExtent :\n' + '\n'.join(['    ' + line for line in str(self.tileExtent).splitlines()])]
 *             str_list += ['miptailFirstLevel : ' + str(self.miptailFirstLevel)]             # <<<<<<<<<<<<<<
 *             str_list += ['miptailSize : ' + str(self.miptailSize)]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_miptailFirstLevel_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_miptailFirstLevel, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7277
 *             str_list += ['tileExtent :\n' + '\n'.join(['    ' + line for line in str(self.tileExtent).splitlines()])]
 *             str_list += ['miptailFirstLevel : ' + str(self.miptailFirstLevel)]
 *             str_list += ['miptailSize : ' + str(self.miptailSize)]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_miptailSize_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_miptailSize, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7278
 *             str_list += ['miptailFirstLevel : ' + str(self.miptailFirstLevel)]
 *             str_list += ['miptailSize : ' + str(self.miptailSize)]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7279
 *             str_list += ['miptailSize : ' + str(self.miptailSize)]
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7280
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7273
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['tileExtent :\n' + '\n'.join(['    ' + line for line in str(self.tileExtent).splitlines()])]
 */
  }

  /* "cuda/cuda.pyx":7282
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7272
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7285
 * 
 *     @property
 *     def tileExtent(self):             # <<<<<<<<<<<<<<
 *         return self._tileExtent
 *     @tileExtent.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10tileExtent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10tileExtent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10tileExtent___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10tileExtent___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7285, 0, __PYX_ERR(0, 7285, __pyx_L1_error));

  /* "cuda/cuda.pyx":7286
 *     @property
 *     def tileExtent(self):
 *         return self._tileExtent             # <<<<<<<<<<<<<<
 *     @tileExtent.setter
 *     def tileExtent(self, tileExtent not None : _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_tileExtent));
  __pyx_r = ((PyObject *)__pyx_v_self->_tileExtent);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7285
 * 
 *     @property
 *     def tileExtent(self):             # <<<<<<<<<<<<<<
 *         return self._tileExtent
 *     @tileExtent.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7288
 *         return self._tileExtent
 *     @tileExtent.setter
 *     def tileExtent(self, tileExtent not None : _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(tileExtent):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10tileExtent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tileExtent); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10tileExtent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_tileExtent) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tileExtent), __pyx_ptype_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s, 0, "tileExtent", 0))) __PYX_ERR(0, 7288, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10tileExtent_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)__pyx_v_tileExtent));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10tileExtent_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *__pyx_v_tileExtent) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7288, 0, __PYX_ERR(0, 7288, __pyx_L1_error));

  /* "cuda/cuda.pyx":7290
 *     def tileExtent(self, tileExtent not None : _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s):
 *         pass
 *         for _attr in dir(tileExtent):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_tileExtent)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7290, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7290, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7290, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7290, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7290, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 7290, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":7291
 *         pass
 *         for _attr in dir(tileExtent):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7291, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":7292
 *         for _attr in dir(tileExtent):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._tileExtent, _attr, getattr(tileExtent, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":7291
 *         pass
 *         for _attr in dir(tileExtent):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":7293
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._tileExtent, _attr, getattr(tileExtent, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7293, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":7294
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._tileExtent, _attr, getattr(tileExtent, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def miptailFirstLevel(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_tileExtent);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_tileExtent), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 7294, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":7293
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._tileExtent, _attr, getattr(tileExtent, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":7290
 *     def tileExtent(self, tileExtent not None : _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s):
 *         pass
 *         for _attr in dir(tileExtent):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7288
 *         return self._tileExtent
 *     @tileExtent.setter
 *     def tileExtent(self, tileExtent not None : _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(tileExtent):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7296
 *                 setattr(self._tileExtent, _attr, getattr(tileExtent, _attr))
 *     @property
 *     def miptailFirstLevel(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].miptailFirstLevel
 *     @miptailFirstLevel.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_17miptailFirstLevel_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_17miptailFirstLevel_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_17miptailFirstLevel___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_17miptailFirstLevel___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7296, 0, __PYX_ERR(0, 7296, __pyx_L1_error));

  /* "cuda/cuda.pyx":7297
 *     @property
 *     def miptailFirstLevel(self):
 *         return self._ptr[0].miptailFirstLevel             # <<<<<<<<<<<<<<
 *     @miptailFirstLevel.setter
 *     def miptailFirstLevel(self, unsigned int miptailFirstLevel):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).miptailFirstLevel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7296
 *                 setattr(self._tileExtent, _attr, getattr(tileExtent, _attr))
 *     @property
 *     def miptailFirstLevel(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].miptailFirstLevel
 *     @miptailFirstLevel.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailFirstLevel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7299
 *         return self._ptr[0].miptailFirstLevel
 *     @miptailFirstLevel.setter
 *     def miptailFirstLevel(self, unsigned int miptailFirstLevel):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].miptailFirstLevel = miptailFirstLevel
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_17miptailFirstLevel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_miptailFirstLevel); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_17miptailFirstLevel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_miptailFirstLevel) {
  unsigned int __pyx_v_miptailFirstLevel;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_miptailFirstLevel); {
    __pyx_v_miptailFirstLevel = __Pyx_PyInt_As_unsigned_int(__pyx_arg_miptailFirstLevel); if (unlikely((__pyx_v_miptailFirstLevel == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7299, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailFirstLevel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_17miptailFirstLevel_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self), ((unsigned int)__pyx_v_miptailFirstLevel));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_17miptailFirstLevel_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, unsigned int __pyx_v_miptailFirstLevel) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7299, 0, __PYX_ERR(0, 7299, __pyx_L1_error));

  /* "cuda/cuda.pyx":7301
 *     def miptailFirstLevel(self, unsigned int miptailFirstLevel):
 *         pass
 *         self._ptr[0].miptailFirstLevel = miptailFirstLevel             # <<<<<<<<<<<<<<
 *     @property
 *     def miptailSize(self):
 */
  (__pyx_v_self->_ptr[0]).miptailFirstLevel = __pyx_v_miptailFirstLevel;

  /* "cuda/cuda.pyx":7299
 *         return self._ptr[0].miptailFirstLevel
 *     @miptailFirstLevel.setter
 *     def miptailFirstLevel(self, unsigned int miptailFirstLevel):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].miptailFirstLevel = miptailFirstLevel
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailFirstLevel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7303
 *         self._ptr[0].miptailFirstLevel = miptailFirstLevel
 *     @property
 *     def miptailSize(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].miptailSize
 *     @miptailSize.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11miptailSize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11miptailSize_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11miptailSize___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11miptailSize___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7303, 0, __PYX_ERR(0, 7303, __pyx_L1_error));

  /* "cuda/cuda.pyx":7304
 *     @property
 *     def miptailSize(self):
 *         return self._ptr[0].miptailSize             # <<<<<<<<<<<<<<
 *     @miptailSize.setter
 *     def miptailSize(self, unsigned long long miptailSize):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).miptailSize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7303
 *         self._ptr[0].miptailFirstLevel = miptailFirstLevel
 *     @property
 *     def miptailSize(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].miptailSize
 *     @miptailSize.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailSize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7306
 *         return self._ptr[0].miptailSize
 *     @miptailSize.setter
 *     def miptailSize(self, unsigned long long miptailSize):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].miptailSize = miptailSize
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11miptailSize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_miptailSize); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11miptailSize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_miptailSize) {
  unsigned PY_LONG_LONG __pyx_v_miptailSize;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_miptailSize); {
    __pyx_v_miptailSize = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_miptailSize); if (unlikely((__pyx_v_miptailSize == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7306, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailSize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11miptailSize_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_miptailSize));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11miptailSize_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_miptailSize) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7306, 0, __PYX_ERR(0, 7306, __pyx_L1_error));

  /* "cuda/cuda.pyx":7308
 *     def miptailSize(self, unsigned long long miptailSize):
 *         pass
 *         self._ptr[0].miptailSize = miptailSize             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
  (__pyx_v_self->_ptr[0]).miptailSize = __pyx_v_miptailSize;

  /* "cuda/cuda.pyx":7306
 *         return self._ptr[0].miptailSize
 *     @miptailSize.setter
 *     def miptailSize(self, unsigned long long miptailSize):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].miptailSize = miptailSize
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailSize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7310
 *         self._ptr[0].miptailSize = miptailSize
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7310, 0, __PYX_ERR(0, 7310, __pyx_L1_error));

  /* "cuda/cuda.pyx":7311
 *     @property
 *     def flags(self):
 *         return self._ptr[0].flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7310
 *         self._ptr[0].miptailSize = miptailSize
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7313
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7313, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7313, 0, __PYX_ERR(0, 7313, __pyx_L1_error));

  /* "cuda/cuda.pyx":7315
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].flags = flags             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  (__pyx_v_self->_ptr[0]).flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":7313
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7317
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7317, 0, __PYX_ERR(0, 7317, __pyx_L1_error));

  /* "cuda/cuda.pyx":7318
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_unsigned_int((__pyx_v_self->_ptr[0]).reserved, 4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7317
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7320
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7320, 0, __PYX_ERR(0, 7320, __pyx_L1_error));

  /* "cuda/cuda.pyx":7322
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_st:
 */
  if (unlikely(__Pyx_carray_from_py_unsigned_int(__pyx_v_reserved, __pyx_t_1, 4) < 0)) __PYX_ERR(0, 7322, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).reserved[0]) * (4));

  /* "cuda/cuda.pyx":7320
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10__reduce_cython__[] = "CUDA_ARRAY_SPARSE_PROPERTIES_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__272)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__273, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_12__setstate_cython__[] = "CUDA_ARRAY_SPARSE_PROPERTIES_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__274)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__275, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7343
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7343, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7343, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7343, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7343, 0, __PYX_ERR(0, 7343, __pyx_L1_error));

  /* "cuda/cuda.pyx":7344
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7345
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":7344
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7347
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":7343
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7348
 *         else:
 *             self._ptr = <ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7348, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7348, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7348, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7348, 0, __PYX_ERR(0, 7348, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7350
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 7350, 0, __PYX_ERR(0, 7350, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":7352
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_6getPtr[] = "CUDA_ARRAY_MEMORY_REQUIREMENTS_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__276)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7352, 0, __PYX_ERR(0, 7352, __pyx_L1_error));

  /* "cuda/cuda.pyx":7353
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7352
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7354
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7354, 0, __PYX_ERR(0, 7354, __pyx_L1_error));

  /* "cuda/cuda.pyx":7355
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['size : ' + str(self.size)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7356
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['size : ' + str(self.size)]
 *             str_list += ['alignment : ' + str(self.alignment)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7357
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['size : ' + str(self.size)]             # <<<<<<<<<<<<<<
 *             str_list += ['alignment : ' + str(self.alignment)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_size, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7358
 *             str_list = []
 *             str_list += ['size : ' + str(self.size)]
 *             str_list += ['alignment : ' + str(self.alignment)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alignment_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_alignment, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7359
 *             str_list += ['size : ' + str(self.size)]
 *             str_list += ['alignment : ' + str(self.alignment)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7360
 *             str_list += ['alignment : ' + str(self.alignment)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7355
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['size : ' + str(self.size)]
 */
  }

  /* "cuda/cuda.pyx":7362
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7354
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7365
 * 
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].size
 *     @size.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4size___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4size___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7365, 0, __PYX_ERR(0, 7365, __pyx_L1_error));

  /* "cuda/cuda.pyx":7366
 *     @property
 *     def size(self):
 *         return self._ptr[0].size             # <<<<<<<<<<<<<<
 *     @size.setter
 *     def size(self, size_t size):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7365
 * 
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].size
 *     @size.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7368
 *         return self._ptr[0].size
 *     @size.setter
 *     def size(self, size_t size):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].size = size
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_size); /*proto*/
static int __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_size) {
  size_t __pyx_v_size;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_size); {
    __pyx_v_size = __Pyx_PyInt_As_size_t(__pyx_arg_size); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7368, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4size_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self), ((size_t)__pyx_v_size));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4size_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self, size_t __pyx_v_size) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7368, 0, __PYX_ERR(0, 7368, __pyx_L1_error));

  /* "cuda/cuda.pyx":7370
 *     def size(self, size_t size):
 *         pass
 *         self._ptr[0].size = size             # <<<<<<<<<<<<<<
 *     @property
 *     def alignment(self):
 */
  (__pyx_v_self->_ptr[0]).size = __pyx_v_size;

  /* "cuda/cuda.pyx":7368
 *         return self._ptr[0].size
 *     @size.setter
 *     def size(self, size_t size):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].size = size
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7372
 *         self._ptr[0].size = size
 *     @property
 *     def alignment(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].alignment
 *     @alignment.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9alignment_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9alignment_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9alignment___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9alignment___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7372, 0, __PYX_ERR(0, 7372, __pyx_L1_error));

  /* "cuda/cuda.pyx":7373
 *     @property
 *     def alignment(self):
 *         return self._ptr[0].alignment             # <<<<<<<<<<<<<<
 *     @alignment.setter
 *     def alignment(self, size_t alignment):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).alignment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7372
 *         self._ptr[0].size = size
 *     @property
 *     def alignment(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].alignment
 *     @alignment.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.alignment.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7375
 *         return self._ptr[0].alignment
 *     @alignment.setter
 *     def alignment(self, size_t alignment):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].alignment = alignment
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9alignment_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_alignment); /*proto*/
static int __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9alignment_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_alignment) {
  size_t __pyx_v_alignment;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_alignment); {
    __pyx_v_alignment = __Pyx_PyInt_As_size_t(__pyx_arg_alignment); if (unlikely((__pyx_v_alignment == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7375, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.alignment.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9alignment_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self), ((size_t)__pyx_v_alignment));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9alignment_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self, size_t __pyx_v_alignment) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7375, 0, __PYX_ERR(0, 7375, __pyx_L1_error));

  /* "cuda/cuda.pyx":7377
 *     def alignment(self, size_t alignment):
 *         pass
 *         self._ptr[0].alignment = alignment             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  (__pyx_v_self->_ptr[0]).alignment = __pyx_v_alignment;

  /* "cuda/cuda.pyx":7375
 *         return self._ptr[0].alignment
 *     @alignment.setter
 *     def alignment(self, size_t alignment):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].alignment = alignment
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.alignment.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7379
 *         self._ptr[0].alignment = alignment
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7379, 0, __PYX_ERR(0, 7379, __pyx_L1_error));

  /* "cuda/cuda.pyx":7380
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_unsigned_int((__pyx_v_self->_ptr[0]).reserved, 4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7379
 *         self._ptr[0].alignment = alignment
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7382
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7382, 0, __PYX_ERR(0, 7382, __pyx_L1_error));

  /* "cuda/cuda.pyx":7384
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s:
 */
  if (unlikely(__Pyx_carray_from_py_unsigned_int(__pyx_v_reserved, __pyx_t_1, 4) < 0)) __PYX_ERR(0, 7384, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).reserved[0]) * (4));

  /* "cuda/cuda.pyx":7382
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_10__reduce_cython__[] = "CUDA_ARRAY_MEMORY_REQUIREMENTS_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__277)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__278, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_12__setstate_cython__[] = "CUDA_ARRAY_MEMORY_REQUIREMENTS_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__279)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__280, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7400
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7400, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7400, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7400, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7400, 0, __PYX_ERR(0, 7400, __pyx_L1_error));

  /* "cuda/cuda.pyx":7401
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._hArray = CUarray(_ptr=<void_ptr>&self._ptr[0].res.array.hArray)
 */
  __pyx_v_self->_ptr = ((struct CUDA_RESOURCE_DESC_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":7400
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7402
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._hArray = CUarray(_ptr=<void_ptr>&self._ptr[0].res.array.hArray)
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7402, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7402, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7402, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7402, 0, __PYX_ERR(0, 7402, __pyx_L1_error));

  /* "cuda/cuda.pyx":7403
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._hArray = CUarray(_ptr=<void_ptr>&self._ptr[0].res.array.hArray)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).res.array.hArray))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 7403, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_hArray);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_hArray));
  __pyx_v_self->_hArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7402
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._hArray = CUarray(_ptr=<void_ptr>&self._ptr[0].res.array.hArray)
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7404
 *     def __init__(self, void_ptr _ptr):
 *         self._hArray = CUarray(_ptr=<void_ptr>&self._ptr[0].res.array.hArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_4getPtr[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__281)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7404, 0, __PYX_ERR(0, 7404, __pyx_L1_error));

  /* "cuda/cuda.pyx":7405
 *         self._hArray = CUarray(_ptr=<void_ptr>&self._ptr[0].res.array.hArray)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7404
 *     def __init__(self, void_ptr _ptr):
 *         self._hArray = CUarray(_ptr=<void_ptr>&self._ptr[0].res.array.hArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7406
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7406, 0, __PYX_ERR(0, 7406, __pyx_L1_error));

  /* "cuda/cuda.pyx":7407
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['hArray : ' + str(self.hArray)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7408
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['hArray : ' + str(self.hArray)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7409
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['hArray : ' + str(self.hArray)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_hArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7410
 *             str_list = []
 *             str_list += ['hArray : ' + str(self.hArray)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7407
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['hArray : ' + str(self.hArray)]
 */
  }

  /* "cuda/cuda.pyx":7412
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7406
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7415
 * 
 *     @property
 *     def hArray(self):             # <<<<<<<<<<<<<<
 *         return self._hArray
 *     @hArray.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6hArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6hArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6hArray___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6hArray___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7415, 0, __PYX_ERR(0, 7415, __pyx_L1_error));

  /* "cuda/cuda.pyx":7416
 *     @property
 *     def hArray(self):
 *         return self._hArray             # <<<<<<<<<<<<<<
 *     @hArray.setter
 *     def hArray(self, hArray):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_hArray));
  __pyx_r = ((PyObject *)__pyx_v_self->_hArray);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7415
 * 
 *     @property
 *     def hArray(self):             # <<<<<<<<<<<<<<
 *         return self._hArray
 *     @hArray.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.hArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7418
 *         return self._hArray
 *     @hArray.setter
 *     def hArray(self, hArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray chArray
 *         if hArray is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6hArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_hArray); /*proto*/
static int __pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6hArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_hArray) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6hArray_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)__pyx_v_self), ((PyObject *)__pyx_v_hArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6hArray_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self, PyObject *__pyx_v_hArray) {
  CUarray __pyx_v_chArray;
  PyObject *__pyx_v_phArray = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7418, 0, __PYX_ERR(0, 7418, __pyx_L1_error));

  /* "cuda/cuda.pyx":7420
 *     def hArray(self, hArray):
 *         cdef ccuda.CUarray chArray
 *         if hArray is None:             # <<<<<<<<<<<<<<
 *             chArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(hArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_hArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":7421
 *         cdef ccuda.CUarray chArray
 *         if hArray is None:
 *             chArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(hArray, (CUarray)):
 *             phArray = int(hArray)
 */
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":7420
 *     def hArray(self, hArray):
 *         cdef ccuda.CUarray chArray
 *         if hArray is None:             # <<<<<<<<<<<<<<
 *             chArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(hArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7422
 *         if hArray is None:
 *             chArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             phArray = int(hArray)
 *             chArray = <ccuda.CUarray><void_ptr>phArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7423
 *             chArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(hArray, (CUarray)):
 *             phArray = int(hArray)             # <<<<<<<<<<<<<<
 *             chArray = <ccuda.CUarray><void_ptr>phArray
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":7424
 *         elif isinstance(hArray, (CUarray)):
 *             phArray = int(hArray)
 *             chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 *         else:
 *             phArray = int(CUarray(hArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7424, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":7422
 *         if hArray is None:
 *             chArray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *             phArray = int(hArray)
 *             chArray = <ccuda.CUarray><void_ptr>phArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7426
 *             chArray = <ccuda.CUarray><void_ptr>phArray
 *         else:
 *             phArray = int(CUarray(hArray))             # <<<<<<<<<<<<<<
 *             chArray = <ccuda.CUarray><void_ptr>phArray
 *         self._hArray._ptr[0] = chArray
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":7427
 *         else:
 *             phArray = int(CUarray(hArray))
 *             chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 *         self._hArray._ptr[0] = chArray
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7427, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":7428
 *             phArray = int(CUarray(hArray))
 *             chArray = <ccuda.CUarray><void_ptr>phArray
 *         self._hArray._ptr[0] = chArray             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s:
 */
  (__pyx_v_self->_hArray->_ptr[0]) = __pyx_v_chArray;

  /* "cuda/cuda.pyx":7418
 *         return self._hArray
 *     @hArray.setter
 *     def hArray(self, hArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray chArray
 *         if hArray is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.hArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phArray);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_8__reduce_cython__[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__282)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__283, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_10__setstate_cython__[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__284)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__285, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7444
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7444, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7444, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7444, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7444, 0, __PYX_ERR(0, 7444, __pyx_L1_error));

  /* "cuda/cuda.pyx":7445
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._hMipmappedArray = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].res.mipmap.hMipmappedArray)
 */
  __pyx_v_self->_ptr = ((struct CUDA_RESOURCE_DESC_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":7444
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7446
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._hMipmappedArray = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].res.mipmap.hMipmappedArray)
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7446, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7446, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7446, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7446, 0, __PYX_ERR(0, 7446, __pyx_L1_error));

  /* "cuda/cuda.pyx":7447
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._hMipmappedArray = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].res.mipmap.hMipmappedArray)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).res.mipmap.hMipmappedArray))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 7447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_hMipmappedArray);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_hMipmappedArray));
  __pyx_v_self->_hMipmappedArray = ((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7446
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._hMipmappedArray = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].res.mipmap.hMipmappedArray)
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7448
 *     def __init__(self, void_ptr _ptr):
 *         self._hMipmappedArray = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].res.mipmap.hMipmappedArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_4getPtr[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__286)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7448, 0, __PYX_ERR(0, 7448, __pyx_L1_error));

  /* "cuda/cuda.pyx":7449
 *         self._hMipmappedArray = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].res.mipmap.hMipmappedArray)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7448
 *     def __init__(self, void_ptr _ptr):
 *         self._hMipmappedArray = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].res.mipmap.hMipmappedArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7450
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7450, 0, __PYX_ERR(0, 7450, __pyx_L1_error));

  /* "cuda/cuda.pyx":7451
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['hMipmappedArray : ' + str(self.hMipmappedArray)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7452
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['hMipmappedArray : ' + str(self.hMipmappedArray)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7453
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['hMipmappedArray : ' + str(self.hMipmappedArray)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hMipmappedArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_hMipmappedArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7454
 *             str_list = []
 *             str_list += ['hMipmappedArray : ' + str(self.hMipmappedArray)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7451
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['hMipmappedArray : ' + str(self.hMipmappedArray)]
 */
  }

  /* "cuda/cuda.pyx":7456
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7450
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7459
 * 
 *     @property
 *     def hMipmappedArray(self):             # <<<<<<<<<<<<<<
 *         return self._hMipmappedArray
 *     @hMipmappedArray.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_15hMipmappedArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_15hMipmappedArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_15hMipmappedArray___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_15hMipmappedArray___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7459, 0, __PYX_ERR(0, 7459, __pyx_L1_error));

  /* "cuda/cuda.pyx":7460
 *     @property
 *     def hMipmappedArray(self):
 *         return self._hMipmappedArray             # <<<<<<<<<<<<<<
 *     @hMipmappedArray.setter
 *     def hMipmappedArray(self, hMipmappedArray):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_hMipmappedArray));
  __pyx_r = ((PyObject *)__pyx_v_self->_hMipmappedArray);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7459
 * 
 *     @property
 *     def hMipmappedArray(self):             # <<<<<<<<<<<<<<
 *         return self._hMipmappedArray
 *     @hMipmappedArray.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.hMipmappedArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7462
 *         return self._hMipmappedArray
 *     @hMipmappedArray.setter
 *     def hMipmappedArray(self, hMipmappedArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUmipmappedArray chMipmappedArray
 *         if hMipmappedArray is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_15hMipmappedArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_hMipmappedArray); /*proto*/
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_15hMipmappedArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_hMipmappedArray) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_15hMipmappedArray_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)__pyx_v_self), ((PyObject *)__pyx_v_hMipmappedArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_15hMipmappedArray_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self, PyObject *__pyx_v_hMipmappedArray) {
  CUmipmappedArray __pyx_v_chMipmappedArray;
  PyObject *__pyx_v_phMipmappedArray = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7462, 0, __PYX_ERR(0, 7462, __pyx_L1_error));

  /* "cuda/cuda.pyx":7464
 *     def hMipmappedArray(self, hMipmappedArray):
 *         cdef ccuda.CUmipmappedArray chMipmappedArray
 *         if hMipmappedArray is None:             # <<<<<<<<<<<<<<
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *         elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 */
  __pyx_t_1 = (__pyx_v_hMipmappedArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":7465
 *         cdef ccuda.CUmipmappedArray chMipmappedArray
 *         if hMipmappedArray is None:
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 *             phMipmappedArray = int(hMipmappedArray)
 */
    __pyx_v_chMipmappedArray = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":7464
 *     def hMipmappedArray(self, hMipmappedArray):
 *         cdef ccuda.CUmipmappedArray chMipmappedArray
 *         if hMipmappedArray is None:             # <<<<<<<<<<<<<<
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *         elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7466
 *         if hMipmappedArray is None:
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *         elif isinstance(hMipmappedArray, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *             phMipmappedArray = int(hMipmappedArray)
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hMipmappedArray, __pyx_ptype_4cuda_4cuda_CUmipmappedArray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7467
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *         elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 *             phMipmappedArray = int(hMipmappedArray)             # <<<<<<<<<<<<<<
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hMipmappedArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phMipmappedArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":7468
 *         elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 *             phMipmappedArray = int(hMipmappedArray)
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray             # <<<<<<<<<<<<<<
 *         else:
 *             phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phMipmappedArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7468, __pyx_L1_error)
    __pyx_v_chMipmappedArray = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":7466
 *         if hMipmappedArray is None:
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *         elif isinstance(hMipmappedArray, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *             phMipmappedArray = int(hMipmappedArray)
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7470
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 *         else:
 *             phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))             # <<<<<<<<<<<<<<
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 *         self._hMipmappedArray._ptr[0] = chMipmappedArray
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray), __pyx_v_hMipmappedArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phMipmappedArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":7471
 *         else:
 *             phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray             # <<<<<<<<<<<<<<
 *         self._hMipmappedArray._ptr[0] = chMipmappedArray
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phMipmappedArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7471, __pyx_L1_error)
    __pyx_v_chMipmappedArray = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":7472
 *             phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))
 *             chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 *         self._hMipmappedArray._ptr[0] = chMipmappedArray             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s:
 */
  (__pyx_v_self->_hMipmappedArray->_ptr[0]) = __pyx_v_chMipmappedArray;

  /* "cuda/cuda.pyx":7462
 *         return self._hMipmappedArray
 *     @hMipmappedArray.setter
 *     def hMipmappedArray(self, hMipmappedArray):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUmipmappedArray chMipmappedArray
 *         if hMipmappedArray is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.hMipmappedArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phMipmappedArray);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_8__reduce_cython__[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__287)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__288, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_10__setstate_cython__[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__289)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__290, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7494
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7494, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7494, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7494, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7494, 0, __PYX_ERR(0, 7494, __pyx_L1_error));

  /* "cuda/cuda.pyx":7495
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.linear.devPtr)
 */
  __pyx_v_self->_ptr = ((struct CUDA_RESOURCE_DESC_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":7494
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7496
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.linear.devPtr)
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7496, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7496, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7496, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7496, 0, __PYX_ERR(0, 7496, __pyx_L1_error));

  /* "cuda/cuda.pyx":7497
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.linear.devPtr)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).res.linear.devPtr))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 7497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_devPtr);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_devPtr));
  __pyx_v_self->_devPtr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7496
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.linear.devPtr)
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7498
 *     def __init__(self, void_ptr _ptr):
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.linear.devPtr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_4getPtr[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__291)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7498, 0, __PYX_ERR(0, 7498, __pyx_L1_error));

  /* "cuda/cuda.pyx":7499
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.linear.devPtr)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7498
 *     def __init__(self, void_ptr _ptr):
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.linear.devPtr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7500
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7500, 0, __PYX_ERR(0, 7500, __pyx_L1_error));

  /* "cuda/cuda.pyx":7501
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['devPtr : ' + str(self.devPtr)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7502
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['devPtr : ' + str(self.devPtr)]
 *             str_list += ['format : ' + str(self.format)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7503
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['devPtr : ' + str(self.devPtr)]             # <<<<<<<<<<<<<<
 *             str_list += ['format : ' + str(self.format)]
 *             str_list += ['numChannels : ' + str(self.numChannels)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_devPtr_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_devPtr, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7504
 *             str_list = []
 *             str_list += ['devPtr : ' + str(self.devPtr)]
 *             str_list += ['format : ' + str(self.format)]             # <<<<<<<<<<<<<<
 *             str_list += ['numChannels : ' + str(self.numChannels)]
 *             str_list += ['sizeInBytes : ' + str(self.sizeInBytes)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_format, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7505
 *             str_list += ['devPtr : ' + str(self.devPtr)]
 *             str_list += ['format : ' + str(self.format)]
 *             str_list += ['numChannels : ' + str(self.numChannels)]             # <<<<<<<<<<<<<<
 *             str_list += ['sizeInBytes : ' + str(self.sizeInBytes)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_numChannels_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_numChannels, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7506
 *             str_list += ['format : ' + str(self.format)]
 *             str_list += ['numChannels : ' + str(self.numChannels)]
 *             str_list += ['sizeInBytes : ' + str(self.sizeInBytes)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sizeInBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_sizeInBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7507
 *             str_list += ['numChannels : ' + str(self.numChannels)]
 *             str_list += ['sizeInBytes : ' + str(self.sizeInBytes)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7501
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['devPtr : ' + str(self.devPtr)]
 */
  }

  /* "cuda/cuda.pyx":7509
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7500
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7512
 * 
 *     @property
 *     def devPtr(self):             # <<<<<<<<<<<<<<
 *         return self._devPtr
 *     @devPtr.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6devPtr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6devPtr_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6devPtr___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6devPtr___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7512, 0, __PYX_ERR(0, 7512, __pyx_L1_error));

  /* "cuda/cuda.pyx":7513
 *     @property
 *     def devPtr(self):
 *         return self._devPtr             # <<<<<<<<<<<<<<
 *     @devPtr.setter
 *     def devPtr(self, devPtr):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_devPtr));
  __pyx_r = ((PyObject *)__pyx_v_self->_devPtr);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7512
 * 
 *     @property
 *     def devPtr(self):             # <<<<<<<<<<<<<<
 *         return self._devPtr
 *     @devPtr.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.devPtr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7515
 *         return self._devPtr
 *     @devPtr.setter
 *     def devPtr(self, devPtr):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdevPtr
 *         if devPtr is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6devPtr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_devPtr); /*proto*/
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6devPtr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_devPtr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6devPtr_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self), ((PyObject *)__pyx_v_devPtr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6devPtr_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, PyObject *__pyx_v_devPtr) {
  CUdeviceptr __pyx_v_cdevPtr;
  PyObject *__pyx_v_pdevPtr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7515, 0, __PYX_ERR(0, 7515, __pyx_L1_error));

  /* "cuda/cuda.pyx":7517
 *     def devPtr(self, devPtr):
 *         cdef ccuda.CUdeviceptr cdevPtr
 *         if devPtr is None:             # <<<<<<<<<<<<<<
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(devPtr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_devPtr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":7518
 *         cdef ccuda.CUdeviceptr cdevPtr
 *         if devPtr is None:
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(devPtr, (CUdeviceptr)):
 *             pdevPtr = int(devPtr)
 */
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":7517
 *     def devPtr(self, devPtr):
 *         cdef ccuda.CUdeviceptr cdevPtr
 *         if devPtr is None:             # <<<<<<<<<<<<<<
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(devPtr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7519
 *         if devPtr is None:
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(devPtr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdevPtr = int(devPtr)
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_devPtr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7520
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(devPtr, (CUdeviceptr)):
 *             pdevPtr = int(devPtr)             # <<<<<<<<<<<<<<
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_devPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdevPtr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":7521
 *         elif isinstance(devPtr, (CUdeviceptr)):
 *             pdevPtr = int(devPtr)
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr             # <<<<<<<<<<<<<<
 *         else:
 *             pdevPtr = int(CUdeviceptr(devPtr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdevPtr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7521, __pyx_L1_error)
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":7519
 *         if devPtr is None:
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(devPtr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdevPtr = int(devPtr)
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7523
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *         else:
 *             pdevPtr = int(CUdeviceptr(devPtr))             # <<<<<<<<<<<<<<
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *         self._devPtr._ptr[0] = cdevPtr
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_devPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdevPtr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":7524
 *         else:
 *             pdevPtr = int(CUdeviceptr(devPtr))
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr             # <<<<<<<<<<<<<<
 *         self._devPtr._ptr[0] = cdevPtr
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdevPtr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7524, __pyx_L1_error)
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":7525
 *             pdevPtr = int(CUdeviceptr(devPtr))
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *         self._devPtr._ptr[0] = cdevPtr             # <<<<<<<<<<<<<<
 *     @property
 *     def format(self):
 */
  (__pyx_v_self->_devPtr->_ptr[0]) = __pyx_v_cdevPtr;

  /* "cuda/cuda.pyx":7515
 *         return self._devPtr
 *     @devPtr.setter
 *     def devPtr(self, devPtr):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdevPtr
 *         if devPtr is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.devPtr.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdevPtr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7527
 *         self._devPtr._ptr[0] = cdevPtr
 *     @property
 *     def format(self):             # <<<<<<<<<<<<<<
 *         return CUarray_format(self._ptr[0].res.linear.format)
 *     @format.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6format_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6format_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6format___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6format___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7527, 0, __PYX_ERR(0, 7527, __pyx_L1_error));

  /* "cuda/cuda.pyx":7528
 *     @property
 *     def format(self):
 *         return CUarray_format(self._ptr[0].res.linear.format)             # <<<<<<<<<<<<<<
 *     @format.setter
 *     def format(self, format not None : CUarray_format):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUarray_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUarray_format_enum((__pyx_v_self->_ptr[0]).res.linear.format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7527
 *         self._devPtr._ptr[0] = cdevPtr
 *     @property
 *     def format(self):             # <<<<<<<<<<<<<<
 *         return CUarray_format(self._ptr[0].res.linear.format)
 *     @format.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7530
 *         return CUarray_format(self._ptr[0].res.linear.format)
 *     @format.setter
 *     def format(self, format not None : CUarray_format):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.linear.format = format.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_format); /*proto*/
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(0, 7530, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6format_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self), ((PyObject *)__pyx_v_format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6format_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, PyObject *__pyx_v_format) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUarray_format __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7530, 0, __PYX_ERR(0, 7530, __pyx_L1_error));

  /* "cuda/cuda.pyx":7532
 *     def format(self, format not None : CUarray_format):
 *         pass
 *         self._ptr[0].res.linear.format = format.value             # <<<<<<<<<<<<<<
 *     @property
 *     def numChannels(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUarray_format_enum)__Pyx_PyInt_As_enum__CUarray_format_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).res.linear.format = __pyx_t_2;

  /* "cuda/cuda.pyx":7530
 *         return CUarray_format(self._ptr[0].res.linear.format)
 *     @format.setter
 *     def format(self, format not None : CUarray_format):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.linear.format = format.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.format.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7534
 *         self._ptr[0].res.linear.format = format.value
 *     @property
 *     def numChannels(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.linear.numChannels
 *     @numChannels.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11numChannels_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11numChannels_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11numChannels___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11numChannels___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7534, 0, __PYX_ERR(0, 7534, __pyx_L1_error));

  /* "cuda/cuda.pyx":7535
 *     @property
 *     def numChannels(self):
 *         return self._ptr[0].res.linear.numChannels             # <<<<<<<<<<<<<<
 *     @numChannels.setter
 *     def numChannels(self, unsigned int numChannels):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).res.linear.numChannels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7534
 *         self._ptr[0].res.linear.format = format.value
 *     @property
 *     def numChannels(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.linear.numChannels
 *     @numChannels.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.numChannels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7537
 *         return self._ptr[0].res.linear.numChannels
 *     @numChannels.setter
 *     def numChannels(self, unsigned int numChannels):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.linear.numChannels = numChannels
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11numChannels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numChannels); /*proto*/
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11numChannels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numChannels) {
  unsigned int __pyx_v_numChannels;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_numChannels); {
    __pyx_v_numChannels = __Pyx_PyInt_As_unsigned_int(__pyx_arg_numChannels); if (unlikely((__pyx_v_numChannels == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7537, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.numChannels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11numChannels_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self), ((unsigned int)__pyx_v_numChannels));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11numChannels_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, unsigned int __pyx_v_numChannels) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7537, 0, __PYX_ERR(0, 7537, __pyx_L1_error));

  /* "cuda/cuda.pyx":7539
 *     def numChannels(self, unsigned int numChannels):
 *         pass
 *         self._ptr[0].res.linear.numChannels = numChannels             # <<<<<<<<<<<<<<
 *     @property
 *     def sizeInBytes(self):
 */
  (__pyx_v_self->_ptr[0]).res.linear.numChannels = __pyx_v_numChannels;

  /* "cuda/cuda.pyx":7537
 *         return self._ptr[0].res.linear.numChannels
 *     @numChannels.setter
 *     def numChannels(self, unsigned int numChannels):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.linear.numChannels = numChannels
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.numChannels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7541
 *         self._ptr[0].res.linear.numChannels = numChannels
 *     @property
 *     def sizeInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.linear.sizeInBytes
 *     @sizeInBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11sizeInBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11sizeInBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11sizeInBytes___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11sizeInBytes___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7541, 0, __PYX_ERR(0, 7541, __pyx_L1_error));

  /* "cuda/cuda.pyx":7542
 *     @property
 *     def sizeInBytes(self):
 *         return self._ptr[0].res.linear.sizeInBytes             # <<<<<<<<<<<<<<
 *     @sizeInBytes.setter
 *     def sizeInBytes(self, size_t sizeInBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).res.linear.sizeInBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7541
 *         self._ptr[0].res.linear.numChannels = numChannels
 *     @property
 *     def sizeInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.linear.sizeInBytes
 *     @sizeInBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.sizeInBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7544
 *         return self._ptr[0].res.linear.sizeInBytes
 *     @sizeInBytes.setter
 *     def sizeInBytes(self, size_t sizeInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.linear.sizeInBytes = sizeInBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11sizeInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_sizeInBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11sizeInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_sizeInBytes) {
  size_t __pyx_v_sizeInBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_sizeInBytes); {
    __pyx_v_sizeInBytes = __Pyx_PyInt_As_size_t(__pyx_arg_sizeInBytes); if (unlikely((__pyx_v_sizeInBytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7544, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.sizeInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11sizeInBytes_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self), ((size_t)__pyx_v_sizeInBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11sizeInBytes_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, size_t __pyx_v_sizeInBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7544, 0, __PYX_ERR(0, 7544, __pyx_L1_error));

  /* "cuda/cuda.pyx":7546
 *     def sizeInBytes(self, size_t sizeInBytes):
 *         pass
 *         self._ptr[0].res.linear.sizeInBytes = sizeInBytes             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s:
 */
  (__pyx_v_self->_ptr[0]).res.linear.sizeInBytes = __pyx_v_sizeInBytes;

  /* "cuda/cuda.pyx":7544
 *         return self._ptr[0].res.linear.sizeInBytes
 *     @sizeInBytes.setter
 *     def sizeInBytes(self, size_t sizeInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.linear.sizeInBytes = sizeInBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.sizeInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_8__reduce_cython__[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__292)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__293, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_10__setstate_cython__[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__294)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__295, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7572
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7572, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7572, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7572, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7572, 0, __PYX_ERR(0, 7572, __pyx_L1_error));

  /* "cuda/cuda.pyx":7573
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.pitch2D.devPtr)
 */
  __pyx_v_self->_ptr = ((struct CUDA_RESOURCE_DESC_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":7572
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7574
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.pitch2D.devPtr)
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7574, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7574, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7574, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7574, 0, __PYX_ERR(0, 7574, __pyx_L1_error));

  /* "cuda/cuda.pyx":7575
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.pitch2D.devPtr)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).res.pitch2D.devPtr))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 7575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_devPtr);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_devPtr));
  __pyx_v_self->_devPtr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7574
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.pitch2D.devPtr)
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7576
 *     def __init__(self, void_ptr _ptr):
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.pitch2D.devPtr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_4getPtr[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__296)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7576, 0, __PYX_ERR(0, 7576, __pyx_L1_error));

  /* "cuda/cuda.pyx":7577
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.pitch2D.devPtr)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7576
 *     def __init__(self, void_ptr _ptr):
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.pitch2D.devPtr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7578
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7578, 0, __PYX_ERR(0, 7578, __pyx_L1_error));

  /* "cuda/cuda.pyx":7579
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['devPtr : ' + str(self.devPtr)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7580
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['devPtr : ' + str(self.devPtr)]
 *             str_list += ['format : ' + str(self.format)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7581
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['devPtr : ' + str(self.devPtr)]             # <<<<<<<<<<<<<<
 *             str_list += ['format : ' + str(self.format)]
 *             str_list += ['numChannels : ' + str(self.numChannels)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_devPtr_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_devPtr, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7582
 *             str_list = []
 *             str_list += ['devPtr : ' + str(self.devPtr)]
 *             str_list += ['format : ' + str(self.format)]             # <<<<<<<<<<<<<<
 *             str_list += ['numChannels : ' + str(self.numChannels)]
 *             str_list += ['width : ' + str(self.width)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_format, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7583
 *             str_list += ['devPtr : ' + str(self.devPtr)]
 *             str_list += ['format : ' + str(self.format)]
 *             str_list += ['numChannels : ' + str(self.numChannels)]             # <<<<<<<<<<<<<<
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_numChannels_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_numChannels, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7584
 *             str_list += ['format : ' + str(self.format)]
 *             str_list += ['numChannels : ' + str(self.numChannels)]
 *             str_list += ['width : ' + str(self.width)]             # <<<<<<<<<<<<<<
 *             str_list += ['height : ' + str(self.height)]
 *             str_list += ['pitchInBytes : ' + str(self.pitchInBytes)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_width, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7585
 *             str_list += ['numChannels : ' + str(self.numChannels)]
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]             # <<<<<<<<<<<<<<
 *             str_list += ['pitchInBytes : ' + str(self.pitchInBytes)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_height, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7586
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]
 *             str_list += ['pitchInBytes : ' + str(self.pitchInBytes)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pitchInBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_pitchInBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7587
 *             str_list += ['height : ' + str(self.height)]
 *             str_list += ['pitchInBytes : ' + str(self.pitchInBytes)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7579
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['devPtr : ' + str(self.devPtr)]
 */
  }

  /* "cuda/cuda.pyx":7589
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7578
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7592
 * 
 *     @property
 *     def devPtr(self):             # <<<<<<<<<<<<<<
 *         return self._devPtr
 *     @devPtr.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6devPtr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6devPtr_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6devPtr___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6devPtr___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7592, 0, __PYX_ERR(0, 7592, __pyx_L1_error));

  /* "cuda/cuda.pyx":7593
 *     @property
 *     def devPtr(self):
 *         return self._devPtr             # <<<<<<<<<<<<<<
 *     @devPtr.setter
 *     def devPtr(self, devPtr):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_devPtr));
  __pyx_r = ((PyObject *)__pyx_v_self->_devPtr);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7592
 * 
 *     @property
 *     def devPtr(self):             # <<<<<<<<<<<<<<
 *         return self._devPtr
 *     @devPtr.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.devPtr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7595
 *         return self._devPtr
 *     @devPtr.setter
 *     def devPtr(self, devPtr):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdevPtr
 *         if devPtr is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6devPtr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_devPtr); /*proto*/
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6devPtr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_devPtr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6devPtr_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self), ((PyObject *)__pyx_v_devPtr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6devPtr_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, PyObject *__pyx_v_devPtr) {
  CUdeviceptr __pyx_v_cdevPtr;
  PyObject *__pyx_v_pdevPtr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7595, 0, __PYX_ERR(0, 7595, __pyx_L1_error));

  /* "cuda/cuda.pyx":7597
 *     def devPtr(self, devPtr):
 *         cdef ccuda.CUdeviceptr cdevPtr
 *         if devPtr is None:             # <<<<<<<<<<<<<<
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(devPtr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_devPtr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":7598
 *         cdef ccuda.CUdeviceptr cdevPtr
 *         if devPtr is None:
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(devPtr, (CUdeviceptr)):
 *             pdevPtr = int(devPtr)
 */
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":7597
 *     def devPtr(self, devPtr):
 *         cdef ccuda.CUdeviceptr cdevPtr
 *         if devPtr is None:             # <<<<<<<<<<<<<<
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(devPtr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7599
 *         if devPtr is None:
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(devPtr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdevPtr = int(devPtr)
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_devPtr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7600
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(devPtr, (CUdeviceptr)):
 *             pdevPtr = int(devPtr)             # <<<<<<<<<<<<<<
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_devPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdevPtr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":7601
 *         elif isinstance(devPtr, (CUdeviceptr)):
 *             pdevPtr = int(devPtr)
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr             # <<<<<<<<<<<<<<
 *         else:
 *             pdevPtr = int(CUdeviceptr(devPtr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdevPtr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7601, __pyx_L1_error)
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":7599
 *         if devPtr is None:
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(devPtr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdevPtr = int(devPtr)
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7603
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *         else:
 *             pdevPtr = int(CUdeviceptr(devPtr))             # <<<<<<<<<<<<<<
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *         self._devPtr._ptr[0] = cdevPtr
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_devPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdevPtr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":7604
 *         else:
 *             pdevPtr = int(CUdeviceptr(devPtr))
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr             # <<<<<<<<<<<<<<
 *         self._devPtr._ptr[0] = cdevPtr
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdevPtr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7604, __pyx_L1_error)
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":7605
 *             pdevPtr = int(CUdeviceptr(devPtr))
 *             cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *         self._devPtr._ptr[0] = cdevPtr             # <<<<<<<<<<<<<<
 *     @property
 *     def format(self):
 */
  (__pyx_v_self->_devPtr->_ptr[0]) = __pyx_v_cdevPtr;

  /* "cuda/cuda.pyx":7595
 *         return self._devPtr
 *     @devPtr.setter
 *     def devPtr(self, devPtr):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdevPtr
 *         if devPtr is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.devPtr.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdevPtr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7607
 *         self._devPtr._ptr[0] = cdevPtr
 *     @property
 *     def format(self):             # <<<<<<<<<<<<<<
 *         return CUarray_format(self._ptr[0].res.pitch2D.format)
 *     @format.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6format_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6format_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6format___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6format___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7607, 0, __PYX_ERR(0, 7607, __pyx_L1_error));

  /* "cuda/cuda.pyx":7608
 *     @property
 *     def format(self):
 *         return CUarray_format(self._ptr[0].res.pitch2D.format)             # <<<<<<<<<<<<<<
 *     @format.setter
 *     def format(self, format not None : CUarray_format):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUarray_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUarray_format_enum((__pyx_v_self->_ptr[0]).res.pitch2D.format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7607
 *         self._devPtr._ptr[0] = cdevPtr
 *     @property
 *     def format(self):             # <<<<<<<<<<<<<<
 *         return CUarray_format(self._ptr[0].res.pitch2D.format)
 *     @format.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7610
 *         return CUarray_format(self._ptr[0].res.pitch2D.format)
 *     @format.setter
 *     def format(self, format not None : CUarray_format):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.pitch2D.format = format.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_format); /*proto*/
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(0, 7610, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6format_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self), ((PyObject *)__pyx_v_format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6format_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, PyObject *__pyx_v_format) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUarray_format __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7610, 0, __PYX_ERR(0, 7610, __pyx_L1_error));

  /* "cuda/cuda.pyx":7612
 *     def format(self, format not None : CUarray_format):
 *         pass
 *         self._ptr[0].res.pitch2D.format = format.value             # <<<<<<<<<<<<<<
 *     @property
 *     def numChannels(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUarray_format_enum)__Pyx_PyInt_As_enum__CUarray_format_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).res.pitch2D.format = __pyx_t_2;

  /* "cuda/cuda.pyx":7610
 *         return CUarray_format(self._ptr[0].res.pitch2D.format)
 *     @format.setter
 *     def format(self, format not None : CUarray_format):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.pitch2D.format = format.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.format.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7614
 *         self._ptr[0].res.pitch2D.format = format.value
 *     @property
 *     def numChannels(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.pitch2D.numChannels
 *     @numChannels.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11numChannels_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11numChannels_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11numChannels___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11numChannels___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7614, 0, __PYX_ERR(0, 7614, __pyx_L1_error));

  /* "cuda/cuda.pyx":7615
 *     @property
 *     def numChannels(self):
 *         return self._ptr[0].res.pitch2D.numChannels             # <<<<<<<<<<<<<<
 *     @numChannels.setter
 *     def numChannels(self, unsigned int numChannels):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).res.pitch2D.numChannels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7614
 *         self._ptr[0].res.pitch2D.format = format.value
 *     @property
 *     def numChannels(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.pitch2D.numChannels
 *     @numChannels.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.numChannels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7617
 *         return self._ptr[0].res.pitch2D.numChannels
 *     @numChannels.setter
 *     def numChannels(self, unsigned int numChannels):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.pitch2D.numChannels = numChannels
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11numChannels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numChannels); /*proto*/
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11numChannels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numChannels) {
  unsigned int __pyx_v_numChannels;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_numChannels); {
    __pyx_v_numChannels = __Pyx_PyInt_As_unsigned_int(__pyx_arg_numChannels); if (unlikely((__pyx_v_numChannels == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7617, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.numChannels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11numChannels_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self), ((unsigned int)__pyx_v_numChannels));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11numChannels_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, unsigned int __pyx_v_numChannels) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7617, 0, __PYX_ERR(0, 7617, __pyx_L1_error));

  /* "cuda/cuda.pyx":7619
 *     def numChannels(self, unsigned int numChannels):
 *         pass
 *         self._ptr[0].res.pitch2D.numChannels = numChannels             # <<<<<<<<<<<<<<
 *     @property
 *     def width(self):
 */
  (__pyx_v_self->_ptr[0]).res.pitch2D.numChannels = __pyx_v_numChannels;

  /* "cuda/cuda.pyx":7617
 *         return self._ptr[0].res.pitch2D.numChannels
 *     @numChannels.setter
 *     def numChannels(self, unsigned int numChannels):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.pitch2D.numChannels = numChannels
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.numChannels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7621
 *         self._ptr[0].res.pitch2D.numChannels = numChannels
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.pitch2D.width
 *     @width.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5width___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5width___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7621, 0, __PYX_ERR(0, 7621, __pyx_L1_error));

  /* "cuda/cuda.pyx":7622
 *     @property
 *     def width(self):
 *         return self._ptr[0].res.pitch2D.width             # <<<<<<<<<<<<<<
 *     @width.setter
 *     def width(self, size_t width):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).res.pitch2D.width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7621
 *         self._ptr[0].res.pitch2D.numChannels = numChannels
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.pitch2D.width
 *     @width.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7624
 *         return self._ptr[0].res.pitch2D.width
 *     @width.setter
 *     def width(self, size_t width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.pitch2D.width = width
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_width); /*proto*/
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_width) {
  size_t __pyx_v_width;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_width); {
    __pyx_v_width = __Pyx_PyInt_As_size_t(__pyx_arg_width); if (unlikely((__pyx_v_width == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7624, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5width_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self), ((size_t)__pyx_v_width));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5width_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, size_t __pyx_v_width) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7624, 0, __PYX_ERR(0, 7624, __pyx_L1_error));

  /* "cuda/cuda.pyx":7626
 *     def width(self, size_t width):
 *         pass
 *         self._ptr[0].res.pitch2D.width = width             # <<<<<<<<<<<<<<
 *     @property
 *     def height(self):
 */
  (__pyx_v_self->_ptr[0]).res.pitch2D.width = __pyx_v_width;

  /* "cuda/cuda.pyx":7624
 *         return self._ptr[0].res.pitch2D.width
 *     @width.setter
 *     def width(self, size_t width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.pitch2D.width = width
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7628
 *         self._ptr[0].res.pitch2D.width = width
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.pitch2D.height
 *     @height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6height___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6height___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7628, 0, __PYX_ERR(0, 7628, __pyx_L1_error));

  /* "cuda/cuda.pyx":7629
 *     @property
 *     def height(self):
 *         return self._ptr[0].res.pitch2D.height             # <<<<<<<<<<<<<<
 *     @height.setter
 *     def height(self, size_t height):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).res.pitch2D.height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7628
 *         self._ptr[0].res.pitch2D.width = width
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.pitch2D.height
 *     @height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7631
 *         return self._ptr[0].res.pitch2D.height
 *     @height.setter
 *     def height(self, size_t height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.pitch2D.height = height
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_height); /*proto*/
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_height) {
  size_t __pyx_v_height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_height); {
    __pyx_v_height = __Pyx_PyInt_As_size_t(__pyx_arg_height); if (unlikely((__pyx_v_height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7631, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6height_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self), ((size_t)__pyx_v_height));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6height_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, size_t __pyx_v_height) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7631, 0, __PYX_ERR(0, 7631, __pyx_L1_error));

  /* "cuda/cuda.pyx":7633
 *     def height(self, size_t height):
 *         pass
 *         self._ptr[0].res.pitch2D.height = height             # <<<<<<<<<<<<<<
 *     @property
 *     def pitchInBytes(self):
 */
  (__pyx_v_self->_ptr[0]).res.pitch2D.height = __pyx_v_height;

  /* "cuda/cuda.pyx":7631
 *         return self._ptr[0].res.pitch2D.height
 *     @height.setter
 *     def height(self, size_t height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.pitch2D.height = height
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7635
 *         self._ptr[0].res.pitch2D.height = height
 *     @property
 *     def pitchInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.pitch2D.pitchInBytes
 *     @pitchInBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_12pitchInBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_12pitchInBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_12pitchInBytes___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_12pitchInBytes___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7635, 0, __PYX_ERR(0, 7635, __pyx_L1_error));

  /* "cuda/cuda.pyx":7636
 *     @property
 *     def pitchInBytes(self):
 *         return self._ptr[0].res.pitch2D.pitchInBytes             # <<<<<<<<<<<<<<
 *     @pitchInBytes.setter
 *     def pitchInBytes(self, size_t pitchInBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).res.pitch2D.pitchInBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7635
 *         self._ptr[0].res.pitch2D.height = height
 *     @property
 *     def pitchInBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.pitch2D.pitchInBytes
 *     @pitchInBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.pitchInBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7638
 *         return self._ptr[0].res.pitch2D.pitchInBytes
 *     @pitchInBytes.setter
 *     def pitchInBytes(self, size_t pitchInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.pitch2D.pitchInBytes = pitchInBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_12pitchInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_pitchInBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_12pitchInBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_pitchInBytes) {
  size_t __pyx_v_pitchInBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_pitchInBytes); {
    __pyx_v_pitchInBytes = __Pyx_PyInt_As_size_t(__pyx_arg_pitchInBytes); if (unlikely((__pyx_v_pitchInBytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 7638, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.pitchInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_12pitchInBytes_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self), ((size_t)__pyx_v_pitchInBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_12pitchInBytes_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, size_t __pyx_v_pitchInBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7638, 0, __PYX_ERR(0, 7638, __pyx_L1_error));

  /* "cuda/cuda.pyx":7640
 *     def pitchInBytes(self, size_t pitchInBytes):
 *         pass
 *         self._ptr[0].res.pitch2D.pitchInBytes = pitchInBytes             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s:
 */
  (__pyx_v_self->_ptr[0]).res.pitch2D.pitchInBytes = __pyx_v_pitchInBytes;

  /* "cuda/cuda.pyx":7638
 *         return self._ptr[0].res.pitch2D.pitchInBytes
 *     @pitchInBytes.setter
 *     def pitchInBytes(self, size_t pitchInBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.pitch2D.pitchInBytes = pitchInBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.pitchInBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_8__reduce_cython__[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__297)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__298, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_10__setstate_cython__[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__299)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__300, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7656
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7656, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7656, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7656, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7656, 0, __PYX_ERR(0, 7656, __pyx_L1_error));

  /* "cuda/cuda.pyx":7657
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUDA_RESOURCE_DESC_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":7656
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7658
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7658, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7658, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7658, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7658, 0, __PYX_ERR(0, 7658, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7660
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_4getPtr[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__301)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7660, 0, __PYX_ERR(0, 7660, __pyx_L1_error));

  /* "cuda/cuda.pyx":7661
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7660
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7662
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7662, 0, __PYX_ERR(0, 7662, __pyx_L1_error));

  /* "cuda/cuda.pyx":7663
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7664
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7665
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7666
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7663
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
  }

  /* "cuda/cuda.pyx":7668
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7662
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7671
 * 
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.reserved.reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8reserved___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7671, 0, __PYX_ERR(0, 7671, __pyx_L1_error));

  /* "cuda/cuda.pyx":7672
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].res.reserved.reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_int((__pyx_v_self->_ptr[0]).res.reserved.reserved, 32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7671
 * 
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].res.reserved.reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7674
 *         return self._ptr[0].res.reserved.reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.reserved.reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1[32];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7674, 0, __PYX_ERR(0, 7674, __pyx_L1_error));

  /* "cuda/cuda.pyx":7676
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].res.reserved.reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u:
 */
  if (unlikely(__Pyx_carray_from_py_int(__pyx_v_reserved, __pyx_t_1, 32) < 0)) __PYX_ERR(0, 7676, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).res.reserved.reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).res.reserved.reserved[0]) * (32));

  /* "cuda/cuda.pyx":7674
 *         return self._ptr[0].res.reserved.reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].res.reserved.reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8__reduce_cython__[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__302)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__303, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_10__setstate_cython__[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__304)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__305, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7700
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7700, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7700, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7700, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7700, 0, __PYX_ERR(0, 7700, __pyx_L1_error));

  /* "cuda/cuda.pyx":7701
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._array = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s(_ptr=<void_ptr>self._ptr)
 */
  __pyx_v_self->_ptr = ((struct CUDA_RESOURCE_DESC_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":7700
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7702
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._array = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s(_ptr=<void_ptr>self._ptr)
 *         self._mipmap = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s(_ptr=<void_ptr>self._ptr)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7702, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7702, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7702, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7702, 0, __PYX_ERR(0, 7702, __pyx_L1_error));

  /* "cuda/cuda.pyx":7703
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._array = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *         self._mipmap = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s(_ptr=<void_ptr>self._ptr)
 *         self._linear = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s(_ptr=<void_ptr>self._ptr)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 7703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_array);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_array));
  __pyx_v_self->_array = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7704
 *     def __init__(self, void_ptr _ptr):
 *         self._array = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s(_ptr=<void_ptr>self._ptr)
 *         self._mipmap = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *         self._linear = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s(_ptr=<void_ptr>self._ptr)
 *         self._pitch2D = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(_ptr=<void_ptr>self._ptr)
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 7704, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_mipmap);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_mipmap));
  __pyx_v_self->_mipmap = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7705
 *         self._array = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s(_ptr=<void_ptr>self._ptr)
 *         self._mipmap = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s(_ptr=<void_ptr>self._ptr)
 *         self._linear = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *         self._pitch2D = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(_ptr=<void_ptr>self._ptr)
 *         self._reserved = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s(_ptr=<void_ptr>self._ptr)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 7705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_linear);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_linear));
  __pyx_v_self->_linear = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7706
 *         self._mipmap = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s(_ptr=<void_ptr>self._ptr)
 *         self._linear = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s(_ptr=<void_ptr>self._ptr)
 *         self._pitch2D = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *         self._reserved = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 7706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_pitch2D);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_pitch2D));
  __pyx_v_self->_pitch2D = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7707
 *         self._linear = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s(_ptr=<void_ptr>self._ptr)
 *         self._pitch2D = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(_ptr=<void_ptr>self._ptr)
 *         self._reserved = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 7707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_reserved);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_reserved));
  __pyx_v_self->_reserved = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7702
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._array = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s(_ptr=<void_ptr>self._ptr)
 *         self._mipmap = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s(_ptr=<void_ptr>self._ptr)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7708
 *         self._pitch2D = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(_ptr=<void_ptr>self._ptr)
 *         self._reserved = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_4getPtr[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__306)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7708, 0, __PYX_ERR(0, 7708, __pyx_L1_error));

  /* "cuda/cuda.pyx":7709
 *         self._reserved = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7708
 *         self._pitch2D = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(_ptr=<void_ptr>self._ptr)
 *         self._reserved = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7710
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr16__pyx_v_line = NULL;
  PyObject *__pyx_9genexpr17__pyx_v_line = NULL;
  PyObject *__pyx_9genexpr18__pyx_v_line = NULL;
  PyObject *__pyx_9genexpr19__pyx_v_line = NULL;
  PyObject *__pyx_9genexpr20__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7710, 0, __PYX_ERR(0, 7710, __pyx_L1_error));

  /* "cuda/cuda.pyx":7711
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['array :\n' + '\n'.join(['    ' + line for line in str(self.array).splitlines()])]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7712
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['array :\n' + '\n'.join(['    ' + line for line in str(self.array).splitlines()])]
 *             str_list += ['mipmap :\n' + '\n'.join(['    ' + line for line in str(self.mipmap).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7713
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['array :\n' + '\n'.join(['    ' + line for line in str(self.array).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['mipmap :\n' + '\n'.join(['    ' + line for line in str(self.mipmap).splitlines()])]
 *             str_list += ['linear :\n' + '\n'.join(['    ' + line for line in str(self.linear).splitlines()])]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7713, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_array_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7713, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7713, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7713, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 7713, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7713, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr16__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr16__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7713, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 7713, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_line); __pyx_9genexpr16__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_line); __pyx_9genexpr16__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_array, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7714
 *             str_list = []
 *             str_list += ['array :\n' + '\n'.join(['    ' + line for line in str(self.array).splitlines()])]
 *             str_list += ['mipmap :\n' + '\n'.join(['    ' + line for line in str(self.mipmap).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['linear :\n' + '\n'.join(['    ' + line for line in str(self.linear).splitlines()])]
 *             str_list += ['pitch2D :\n' + '\n'.join(['    ' + line for line in str(self.pitch2D).splitlines()])]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7714, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mipmap_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7714, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7714, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyUnicode_Splitlines(((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7714, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 7714, __pyx_L12_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7714, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr17__pyx_v_line, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr17__pyx_v_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7714, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 7714, __pyx_L12_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_line); __pyx_9genexpr17__pyx_v_line = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_line); __pyx_9genexpr17__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_mipmap, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7715
 *             str_list += ['array :\n' + '\n'.join(['    ' + line for line in str(self.array).splitlines()])]
 *             str_list += ['mipmap :\n' + '\n'.join(['    ' + line for line in str(self.mipmap).splitlines()])]
 *             str_list += ['linear :\n' + '\n'.join(['    ' + line for line in str(self.linear).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['pitch2D :\n' + '\n'.join(['    ' + line for line in str(self.pitch2D).splitlines()])]
 *             str_list += ['reserved :\n' + '\n'.join(['    ' + line for line in str(self.reserved).splitlines()])]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7715, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_linear_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7715, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7715, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7715, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 7715, __pyx_L18_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7715, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr18__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr18__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7715, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 7715, __pyx_L18_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_line); __pyx_9genexpr18__pyx_v_line = 0;
      goto __pyx_L21_exit_scope;
      __pyx_L18_error:;
      __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_line); __pyx_9genexpr18__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L21_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_linear, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7716
 *             str_list += ['mipmap :\n' + '\n'.join(['    ' + line for line in str(self.mipmap).splitlines()])]
 *             str_list += ['linear :\n' + '\n'.join(['    ' + line for line in str(self.linear).splitlines()])]
 *             str_list += ['pitch2D :\n' + '\n'.join(['    ' + line for line in str(self.pitch2D).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved :\n' + '\n'.join(['    ' + line for line in str(self.reserved).splitlines()])]
 *             return '\n'.join(str_list)
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7716, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pitch2D_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7716, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7716, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyUnicode_Splitlines(((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7716, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 7716, __pyx_L24_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7716, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr19__pyx_v_line, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr19__pyx_v_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7716, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 7716, __pyx_L24_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_line); __pyx_9genexpr19__pyx_v_line = 0;
      goto __pyx_L27_exit_scope;
      __pyx_L24_error:;
      __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_line); __pyx_9genexpr19__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L27_exit_scope:;
    } /* exit inner scope */
    __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_pitch2D, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7717
 *             str_list += ['linear :\n' + '\n'.join(['    ' + line for line in str(self.linear).splitlines()])]
 *             str_list += ['pitch2D :\n' + '\n'.join(['    ' + line for line in str(self.pitch2D).splitlines()])]
 *             str_list += ['reserved :\n' + '\n'.join(['    ' + line for line in str(self.reserved).splitlines()])]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7717, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7717, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7717, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7717, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 7717, __pyx_L30_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7717, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr20__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr20__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7717, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 7717, __pyx_L30_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_line); __pyx_9genexpr20__pyx_v_line = 0;
      goto __pyx_L33_exit_scope;
      __pyx_L30_error:;
      __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_line); __pyx_9genexpr20__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L33_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7718
 *             str_list += ['pitch2D :\n' + '\n'.join(['    ' + line for line in str(self.pitch2D).splitlines()])]
 *             str_list += ['reserved :\n' + '\n'.join(['    ' + line for line in str(self.reserved).splitlines()])]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7711
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['array :\n' + '\n'.join(['    ' + line for line in str(self.array).splitlines()])]
 */
  }

  /* "cuda/cuda.pyx":7720
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7710
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_line);
  __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_line);
  __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_line);
  __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_line);
  __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7723
 * 
 *     @property
 *     def array(self):             # <<<<<<<<<<<<<<
 *         return self._array
 *     @array.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5array_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5array_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5array___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5array___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7723, 0, __PYX_ERR(0, 7723, __pyx_L1_error));

  /* "cuda/cuda.pyx":7724
 *     @property
 *     def array(self):
 *         return self._array             # <<<<<<<<<<<<<<
 *     @array.setter
 *     def array(self, array not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_array));
  __pyx_r = ((PyObject *)__pyx_v_self->_array);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7723
 * 
 *     @property
 *     def array(self):             # <<<<<<<<<<<<<<
 *         return self._array
 *     @array.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.array.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7726
 *         return self._array
 *     @array.setter
 *     def array(self, array not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(array):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_array); /*proto*/
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_array) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_array), __pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s, 0, "array", 0))) __PYX_ERR(0, 7726, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5array_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)__pyx_v_array));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5array_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *__pyx_v_array) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7726, 0, __PYX_ERR(0, 7726, __pyx_L1_error));

  /* "cuda/cuda.pyx":7728
 *     def array(self, array not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s):
 *         pass
 *         for _attr in dir(array):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_array)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7728, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7728, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7728, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7728, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7728, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 7728, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":7729
 *         pass
 *         for _attr in dir(array):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7729, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":7730
 *         for _attr in dir(array):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._array, _attr, getattr(array, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":7729
 *         pass
 *         for _attr in dir(array):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":7731
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._array, _attr, getattr(array, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7731, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":7732
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._array, _attr, getattr(array, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def mipmap(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_array);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_array), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 7732, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":7731
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._array, _attr, getattr(array, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":7728
 *     def array(self, array not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s):
 *         pass
 *         for _attr in dir(array):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7726
 *         return self._array
 *     @array.setter
 *     def array(self, array not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(array):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.array.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7734
 *                 setattr(self._array, _attr, getattr(array, _attr))
 *     @property
 *     def mipmap(self):             # <<<<<<<<<<<<<<
 *         return self._mipmap
 *     @mipmap.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6mipmap_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6mipmap_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6mipmap___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6mipmap___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7734, 0, __PYX_ERR(0, 7734, __pyx_L1_error));

  /* "cuda/cuda.pyx":7735
 *     @property
 *     def mipmap(self):
 *         return self._mipmap             # <<<<<<<<<<<<<<
 *     @mipmap.setter
 *     def mipmap(self, mipmap not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_mipmap));
  __pyx_r = ((PyObject *)__pyx_v_self->_mipmap);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7734
 *                 setattr(self._array, _attr, getattr(array, _attr))
 *     @property
 *     def mipmap(self):             # <<<<<<<<<<<<<<
 *         return self._mipmap
 *     @mipmap.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.mipmap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7737
 *         return self._mipmap
 *     @mipmap.setter
 *     def mipmap(self, mipmap not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(mipmap):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6mipmap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mipmap); /*proto*/
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6mipmap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mipmap) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mipmap), __pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s, 0, "mipmap", 0))) __PYX_ERR(0, 7737, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6mipmap_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)__pyx_v_mipmap));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6mipmap_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *__pyx_v_mipmap) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7737, 0, __PYX_ERR(0, 7737, __pyx_L1_error));

  /* "cuda/cuda.pyx":7739
 *     def mipmap(self, mipmap not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s):
 *         pass
 *         for _attr in dir(mipmap):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_mipmap)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7739, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7739, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7739, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7739, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7739, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 7739, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":7740
 *         pass
 *         for _attr in dir(mipmap):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7740, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":7741
 *         for _attr in dir(mipmap):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._mipmap, _attr, getattr(mipmap, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":7740
 *         pass
 *         for _attr in dir(mipmap):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":7742
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._mipmap, _attr, getattr(mipmap, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7742, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":7743
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._mipmap, _attr, getattr(mipmap, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def linear(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_mipmap);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_mipmap), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 7743, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":7742
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._mipmap, _attr, getattr(mipmap, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":7739
 *     def mipmap(self, mipmap not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s):
 *         pass
 *         for _attr in dir(mipmap):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7737
 *         return self._mipmap
 *     @mipmap.setter
 *     def mipmap(self, mipmap not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(mipmap):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.mipmap.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7745
 *                 setattr(self._mipmap, _attr, getattr(mipmap, _attr))
 *     @property
 *     def linear(self):             # <<<<<<<<<<<<<<
 *         return self._linear
 *     @linear.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6linear_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6linear_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6linear___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6linear___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7745, 0, __PYX_ERR(0, 7745, __pyx_L1_error));

  /* "cuda/cuda.pyx":7746
 *     @property
 *     def linear(self):
 *         return self._linear             # <<<<<<<<<<<<<<
 *     @linear.setter
 *     def linear(self, linear not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_linear));
  __pyx_r = ((PyObject *)__pyx_v_self->_linear);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7745
 *                 setattr(self._mipmap, _attr, getattr(mipmap, _attr))
 *     @property
 *     def linear(self):             # <<<<<<<<<<<<<<
 *         return self._linear
 *     @linear.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.linear.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7748
 *         return self._linear
 *     @linear.setter
 *     def linear(self, linear not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(linear):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6linear_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_linear); /*proto*/
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6linear_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_linear) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_linear), __pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s, 0, "linear", 0))) __PYX_ERR(0, 7748, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6linear_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)__pyx_v_linear));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6linear_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *__pyx_v_linear) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7748, 0, __PYX_ERR(0, 7748, __pyx_L1_error));

  /* "cuda/cuda.pyx":7750
 *     def linear(self, linear not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s):
 *         pass
 *         for _attr in dir(linear):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_linear)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7750, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7750, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7750, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7750, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7750, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 7750, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":7751
 *         pass
 *         for _attr in dir(linear):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7751, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":7752
 *         for _attr in dir(linear):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._linear, _attr, getattr(linear, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":7751
 *         pass
 *         for _attr in dir(linear):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":7753
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._linear, _attr, getattr(linear, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7753, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":7754
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._linear, _attr, getattr(linear, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def pitch2D(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_linear);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_linear), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7754, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 7754, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":7753
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._linear, _attr, getattr(linear, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":7750
 *     def linear(self, linear not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s):
 *         pass
 *         for _attr in dir(linear):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7748
 *         return self._linear
 *     @linear.setter
 *     def linear(self, linear not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(linear):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.linear.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7756
 *                 setattr(self._linear, _attr, getattr(linear, _attr))
 *     @property
 *     def pitch2D(self):             # <<<<<<<<<<<<<<
 *         return self._pitch2D
 *     @pitch2D.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7pitch2D_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7pitch2D_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7pitch2D___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7pitch2D___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7756, 0, __PYX_ERR(0, 7756, __pyx_L1_error));

  /* "cuda/cuda.pyx":7757
 *     @property
 *     def pitch2D(self):
 *         return self._pitch2D             # <<<<<<<<<<<<<<
 *     @pitch2D.setter
 *     def pitch2D(self, pitch2D not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_pitch2D));
  __pyx_r = ((PyObject *)__pyx_v_self->_pitch2D);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7756
 *                 setattr(self._linear, _attr, getattr(linear, _attr))
 *     @property
 *     def pitch2D(self):             # <<<<<<<<<<<<<<
 *         return self._pitch2D
 *     @pitch2D.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.pitch2D.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7759
 *         return self._pitch2D
 *     @pitch2D.setter
 *     def pitch2D(self, pitch2D not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(pitch2D):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7pitch2D_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pitch2D); /*proto*/
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7pitch2D_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pitch2D) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pitch2D), __pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s, 0, "pitch2D", 0))) __PYX_ERR(0, 7759, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7pitch2D_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)__pyx_v_pitch2D));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7pitch2D_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *__pyx_v_pitch2D) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7759, 0, __PYX_ERR(0, 7759, __pyx_L1_error));

  /* "cuda/cuda.pyx":7761
 *     def pitch2D(self, pitch2D not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s):
 *         pass
 *         for _attr in dir(pitch2D):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_pitch2D)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7761, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7761, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7761, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7761, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7761, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 7761, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":7762
 *         pass
 *         for _attr in dir(pitch2D):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7762, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":7763
 *         for _attr in dir(pitch2D):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._pitch2D, _attr, getattr(pitch2D, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":7762
 *         pass
 *         for _attr in dir(pitch2D):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":7764
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._pitch2D, _attr, getattr(pitch2D, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":7765
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._pitch2D, _attr, getattr(pitch2D, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_pitch2D);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_pitch2D), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 7765, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":7764
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._pitch2D, _attr, getattr(pitch2D, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":7761
 *     def pitch2D(self, pitch2D not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s):
 *         pass
 *         for _attr in dir(pitch2D):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7759
 *         return self._pitch2D
 *     @pitch2D.setter
 *     def pitch2D(self, pitch2D not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(pitch2D):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.pitch2D.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7767
 *                 setattr(self._pitch2D, _attr, getattr(pitch2D, _attr))
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8reserved___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7767, 0, __PYX_ERR(0, 7767, __pyx_L1_error));

  /* "cuda/cuda.pyx":7768
 *     @property
 *     def reserved(self):
 *         return self._reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_reserved));
  __pyx_r = ((PyObject *)__pyx_v_self->_reserved);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7767
 *                 setattr(self._pitch2D, _attr, getattr(pitch2D, _attr))
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7770
 *         return self._reserved
 *     @reserved.setter
 *     def reserved(self, reserved not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(reserved):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reserved), __pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s, 0, "reserved", 0))) __PYX_ERR(0, 7770, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *)__pyx_v_reserved));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *__pyx_v_reserved) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7770, 0, __PYX_ERR(0, 7770, __pyx_L1_error));

  /* "cuda/cuda.pyx":7772
 *     def reserved(self, reserved not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s):
 *         pass
 *         for _attr in dir(reserved):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_reserved)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7772, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7772, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7772, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7772, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7772, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 7772, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":7773
 *         pass
 *         for _attr in dir(reserved):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7773, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":7774
 *         for _attr in dir(reserved):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._reserved, _attr, getattr(reserved, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":7773
 *         pass
 *         for _attr in dir(reserved):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":7775
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._reserved, _attr, getattr(reserved, _attr))
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7775, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":7776
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._reserved, _attr, getattr(reserved, _attr))             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_RESOURCE_DESC_st:
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_reserved);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_reserved), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7776, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 7776, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":7775
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._reserved, _attr, getattr(reserved, _attr))
 * 
 */
    }

    /* "cuda/cuda.pyx":7772
 *     def reserved(self, reserved not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s):
 *         pass
 *         for _attr in dir(reserved):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7770
 *         return self._reserved
 *     @reserved.setter
 *     def reserved(self, reserved not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(reserved):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8__reduce_cython__[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__307)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__308, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_10__setstate_cython__[] = "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__309)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__310, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7797
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7797, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7797, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7797, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7797, 0, __PYX_ERR(0, 7797, __pyx_L1_error));

  /* "cuda/cuda.pyx":7798
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7799
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":7798
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7801
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._res = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u(_ptr=<void_ptr>self._ptr)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_RESOURCE_DESC_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":7797
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7802
 *         else:
 *             self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._res = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7802, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7802, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7802, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7802, 0, __PYX_ERR(0, 7802, __pyx_L1_error));

  /* "cuda/cuda.pyx":7803
 *             self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._res = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 7803, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_res);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_res));
  __pyx_v_self->_res = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7802
 *         else:
 *             self._ptr = <ccuda.CUDA_RESOURCE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._res = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7804
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._res = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 7804, 0, __PYX_ERR(0, 7804, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_RESOURCE_DESC_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":7806
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_6getPtr[] = "CUDA_RESOURCE_DESC_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__311)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7806, 0, __PYX_ERR(0, 7806, __pyx_L1_error));

  /* "cuda/cuda.pyx":7807
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7806
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7808
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr21__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7808, 0, __PYX_ERR(0, 7808, __pyx_L1_error));

  /* "cuda/cuda.pyx":7809
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['resType : ' + str(self.resType)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7810
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['resType : ' + str(self.resType)]
 *             str_list += ['res :\n' + '\n'.join(['    ' + line for line in str(self.res).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7811
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['resType : ' + str(self.resType)]             # <<<<<<<<<<<<<<
 *             str_list += ['res :\n' + '\n'.join(['    ' + line for line in str(self.res).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_resType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_resType, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7812
 *             str_list = []
 *             str_list += ['resType : ' + str(self.resType)]
 *             str_list += ['res :\n' + '\n'.join(['    ' + line for line in str(self.res).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             return '\n'.join(str_list)
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7812, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_res_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7812, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7812, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7812, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 7812, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7812, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr21__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr21__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7812, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 7812, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_line); __pyx_9genexpr21__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_line); __pyx_9genexpr21__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_res, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7813
 *             str_list += ['resType : ' + str(self.resType)]
 *             str_list += ['res :\n' + '\n'.join(['    ' + line for line in str(self.res).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7814
 *             str_list += ['res :\n' + '\n'.join(['    ' + line for line in str(self.res).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7809
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['resType : ' + str(self.resType)]
 */
  }

  /* "cuda/cuda.pyx":7816
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7808
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7819
 * 
 *     @property
 *     def resType(self):             # <<<<<<<<<<<<<<
 *         return CUresourcetype(self._ptr[0].resType)
 *     @resType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7resType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7resType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7resType___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7resType___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7819, 0, __PYX_ERR(0, 7819, __pyx_L1_error));

  /* "cuda/cuda.pyx":7820
 *     @property
 *     def resType(self):
 *         return CUresourcetype(self._ptr[0].resType)             # <<<<<<<<<<<<<<
 *     @resType.setter
 *     def resType(self, resType not None : CUresourcetype):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUresourcetype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUresourcetype_enum((__pyx_v_self->_ptr[0]).resType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7819
 * 
 *     @property
 *     def resType(self):             # <<<<<<<<<<<<<<
 *         return CUresourcetype(self._ptr[0].resType)
 *     @resType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.resType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7822
 *         return CUresourcetype(self._ptr[0].resType)
 *     @resType.setter
 *     def resType(self, resType not None : CUresourcetype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].resType = resType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7resType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_resType); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7resType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_resType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_resType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "resType"); __PYX_ERR(0, 7822, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7resType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_resType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7resType_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self, PyObject *__pyx_v_resType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresourcetype __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7822, 0, __PYX_ERR(0, 7822, __pyx_L1_error));

  /* "cuda/cuda.pyx":7824
 *     def resType(self, resType not None : CUresourcetype):
 *         pass
 *         self._ptr[0].resType = resType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def res(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_resType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUresourcetype_enum)__Pyx_PyInt_As_enum__CUresourcetype_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).resType = __pyx_t_2;

  /* "cuda/cuda.pyx":7822
 *         return CUresourcetype(self._ptr[0].resType)
 *     @resType.setter
 *     def resType(self, resType not None : CUresourcetype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].resType = resType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.resType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7826
 *         self._ptr[0].resType = resType.value
 *     @property
 *     def res(self):             # <<<<<<<<<<<<<<
 *         return self._res
 *     @res.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3res_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3res_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3res___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3res___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7826, 0, __PYX_ERR(0, 7826, __pyx_L1_error));

  /* "cuda/cuda.pyx":7827
 *     @property
 *     def res(self):
 *         return self._res             # <<<<<<<<<<<<<<
 *     @res.setter
 *     def res(self, res not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_res));
  __pyx_r = ((PyObject *)__pyx_v_self->_res);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7826
 *         self._ptr[0].resType = resType.value
 *     @property
 *     def res(self):             # <<<<<<<<<<<<<<
 *         return self._res
 *     @res.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.res.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7829
 *         return self._res
 *     @res.setter
 *     def res(self, res not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(res):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3res_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3res_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_res) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_res), __pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u, 0, "res", 0))) __PYX_ERR(0, 7829, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3res_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)__pyx_v_res));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3res_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *__pyx_v_res) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7829, 0, __PYX_ERR(0, 7829, __pyx_L1_error));

  /* "cuda/cuda.pyx":7831
 *     def res(self, res not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u):
 *         pass
 *         for _attr in dir(res):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_res)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7831, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7831, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7831, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7831, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7831, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 7831, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":7832
 *         pass
 *         for _attr in dir(res):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7832, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":7833
 *         for _attr in dir(res):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._res, _attr, getattr(res, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":7832
 *         pass
 *         for _attr in dir(res):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":7834
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._res, _attr, getattr(res, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 7834, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":7835
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._res, _attr, getattr(res, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_res);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_res), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 7835, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":7834
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._res, _attr, getattr(res, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":7831
 *     def res(self, res not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u):
 *         pass
 *         for _attr in dir(res):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":7829
 *         return self._res
 *     @res.setter
 *     def res(self, res not None : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(res):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.res.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7837
 *                 setattr(self._res, _attr, getattr(res, _attr))
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7837, 0, __PYX_ERR(0, 7837, __pyx_L1_error));

  /* "cuda/cuda.pyx":7838
 *     @property
 *     def flags(self):
 *         return self._ptr[0].flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7837
 *                 setattr(self._res, _attr, getattr(res, _attr))
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7840
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7840, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7840, 0, __PYX_ERR(0, 7840, __pyx_L1_error));

  /* "cuda/cuda.pyx":7842
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].flags = flags             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_TEXTURE_DESC_st:
 */
  (__pyx_v_self->_ptr[0]).flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":7840
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_10__reduce_cython__[] = "CUDA_RESOURCE_DESC_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__312)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__313, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_12__setstate_cython__[] = "CUDA_RESOURCE_DESC_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__314)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__315, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_DESC_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7877
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 7877, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7877, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7877, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 7877, 0, __PYX_ERR(0, 7877, __pyx_L1_error));

  /* "cuda/cuda.pyx":7878
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7879
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_TEXTURE_DESC_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":7878
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":7881
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_TEXTURE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_TEXTURE_DESC_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":7877
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7882
 *         else:
 *             self._ptr = <ccuda.CUDA_TEXTURE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 7882, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 7882, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 7882, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 7882, 0, __PYX_ERR(0, 7882, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7884
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 7884, 0, __PYX_ERR(0, 7884, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_TEXTURE_DESC_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":7886
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_6getPtr[] = "CUDA_TEXTURE_DESC_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__316)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 7886, 0, __PYX_ERR(0, 7886, __pyx_L1_error));

  /* "cuda/cuda.pyx":7887
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7886
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7888
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 7888, 0, __PYX_ERR(0, 7888, __pyx_L1_error));

  /* "cuda/cuda.pyx":7889
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['addressMode : ' + str(self.addressMode)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":7890
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['addressMode : ' + str(self.addressMode)]
 *             str_list += ['filterMode : ' + str(self.filterMode)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7891
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['addressMode : ' + str(self.addressMode)]             # <<<<<<<<<<<<<<
 *             str_list += ['filterMode : ' + str(self.filterMode)]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_addressMode_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_addressMode, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7892
 *             str_list = []
 *             str_list += ['addressMode : ' + str(self.addressMode)]
 *             str_list += ['filterMode : ' + str(self.filterMode)]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['maxAnisotropy : ' + str(self.maxAnisotropy)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filterMode_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_filterMode, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7893
 *             str_list += ['addressMode : ' + str(self.addressMode)]
 *             str_list += ['filterMode : ' + str(self.filterMode)]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             str_list += ['maxAnisotropy : ' + str(self.maxAnisotropy)]
 *             str_list += ['mipmapFilterMode : ' + str(self.mipmapFilterMode)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7894
 *             str_list += ['filterMode : ' + str(self.filterMode)]
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['maxAnisotropy : ' + str(self.maxAnisotropy)]             # <<<<<<<<<<<<<<
 *             str_list += ['mipmapFilterMode : ' + str(self.mipmapFilterMode)]
 *             str_list += ['mipmapLevelBias : ' + str(self.mipmapLevelBias)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_maxAnisotropy_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_maxAnisotropy, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7895
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['maxAnisotropy : ' + str(self.maxAnisotropy)]
 *             str_list += ['mipmapFilterMode : ' + str(self.mipmapFilterMode)]             # <<<<<<<<<<<<<<
 *             str_list += ['mipmapLevelBias : ' + str(self.mipmapLevelBias)]
 *             str_list += ['minMipmapLevelClamp : ' + str(self.minMipmapLevelClamp)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mipmapFilterMode_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_mipmapFilterMode, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7896
 *             str_list += ['maxAnisotropy : ' + str(self.maxAnisotropy)]
 *             str_list += ['mipmapFilterMode : ' + str(self.mipmapFilterMode)]
 *             str_list += ['mipmapLevelBias : ' + str(self.mipmapLevelBias)]             # <<<<<<<<<<<<<<
 *             str_list += ['minMipmapLevelClamp : ' + str(self.minMipmapLevelClamp)]
 *             str_list += ['maxMipmapLevelClamp : ' + str(self.maxMipmapLevelClamp)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mipmapLevelBias_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_mipmapLevelBias, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7897
 *             str_list += ['mipmapFilterMode : ' + str(self.mipmapFilterMode)]
 *             str_list += ['mipmapLevelBias : ' + str(self.mipmapLevelBias)]
 *             str_list += ['minMipmapLevelClamp : ' + str(self.minMipmapLevelClamp)]             # <<<<<<<<<<<<<<
 *             str_list += ['maxMipmapLevelClamp : ' + str(self.maxMipmapLevelClamp)]
 *             str_list += ['borderColor : ' + str(self.borderColor)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_minMipmapLevelClamp_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_minMipmapLevelClamp, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7898
 *             str_list += ['mipmapLevelBias : ' + str(self.mipmapLevelBias)]
 *             str_list += ['minMipmapLevelClamp : ' + str(self.minMipmapLevelClamp)]
 *             str_list += ['maxMipmapLevelClamp : ' + str(self.maxMipmapLevelClamp)]             # <<<<<<<<<<<<<<
 *             str_list += ['borderColor : ' + str(self.borderColor)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_maxMipmapLevelClamp_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_maxMipmapLevelClamp, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7899
 *             str_list += ['minMipmapLevelClamp : ' + str(self.minMipmapLevelClamp)]
 *             str_list += ['maxMipmapLevelClamp : ' + str(self.maxMipmapLevelClamp)]
 *             str_list += ['borderColor : ' + str(self.borderColor)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_borderColor_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_borderColor, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7900
 *             str_list += ['maxMipmapLevelClamp : ' + str(self.maxMipmapLevelClamp)]
 *             str_list += ['borderColor : ' + str(self.borderColor)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":7901
 *             str_list += ['borderColor : ' + str(self.borderColor)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":7889
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['addressMode : ' + str(self.addressMode)]
 */
  }

  /* "cuda/cuda.pyx":7903
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":7888
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7906
 * 
 *     @property
 *     def addressMode(self):             # <<<<<<<<<<<<<<
 *         return [CUaddress_mode(_x) for _x in list(self._ptr[0].addressMode)]
 *     @addressMode.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11addressMode_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11addressMode_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11addressMode___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11addressMode___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_9genexpr22__pyx_v__x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7906, 0, __PYX_ERR(0, 7906, __pyx_L1_error));

  /* "cuda/cuda.pyx":7907
 *     @property
 *     def addressMode(self):
 *         return [CUaddress_mode(_x) for _x in list(self._ptr[0].addressMode)]             # <<<<<<<<<<<<<<
 *     @addressMode.setter
 *     def addressMode(self, addressMode):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7907, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_carray_to_py_CUaddress_mode((__pyx_v_self->_ptr[0]).addressMode, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7907, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7907, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 7907, __pyx_L5_error)
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7907, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr22__pyx_v__x, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUaddress_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7907, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_9genexpr22__pyx_v__x) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_9genexpr22__pyx_v__x);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7907, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 7907, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr22__pyx_v__x); __pyx_9genexpr22__pyx_v__x = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr22__pyx_v__x); __pyx_9genexpr22__pyx_v__x = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7906
 * 
 *     @property
 *     def addressMode(self):             # <<<<<<<<<<<<<<
 *         return [CUaddress_mode(_x) for _x in list(self._ptr[0].addressMode)]
 *     @addressMode.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.addressMode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr22__pyx_v__x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7909
 *         return [CUaddress_mode(_x) for _x in list(self._ptr[0].addressMode)]
 *     @addressMode.setter
 *     def addressMode(self, addressMode):             # <<<<<<<<<<<<<<
 *         self._ptr[0].addressMode = [_x.value for _x in addressMode]
 *     @property
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11addressMode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_addressMode); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11addressMode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_addressMode) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11addressMode_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_addressMode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11addressMode_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, PyObject *__pyx_v_addressMode) {
  PyObject *__pyx_9genexpr23__pyx_v__x = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  CUaddress_mode __pyx_t_6[3];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7909, 0, __PYX_ERR(0, 7909, __pyx_L1_error));

  /* "cuda/cuda.pyx":7910
 *     @addressMode.setter
 *     def addressMode(self, addressMode):
 *         self._ptr[0].addressMode = [_x.value for _x in addressMode]             # <<<<<<<<<<<<<<
 *     @property
 *     def filterMode(self):
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7910, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_addressMode)) || PyTuple_CheckExact(__pyx_v_addressMode)) {
      __pyx_t_2 = __pyx_v_addressMode; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_addressMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7910, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7910, __pyx_L5_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7910, __pyx_L5_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7910, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 7910, __pyx_L5_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7910, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 7910, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr23__pyx_v__x, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr23__pyx_v__x, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7910, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 7910, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr23__pyx_v__x); __pyx_9genexpr23__pyx_v__x = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr23__pyx_v__x); __pyx_9genexpr23__pyx_v__x = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  if (unlikely(__Pyx_carray_from_py_CUaddress_mode(__pyx_t_1, __pyx_t_6, 3) < 0)) __PYX_ERR(0, 7910, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  memcpy(&((__pyx_v_self->_ptr[0]).addressMode[0]), __pyx_t_6, sizeof((__pyx_v_self->_ptr[0]).addressMode[0]) * (3));

  /* "cuda/cuda.pyx":7909
 *         return [CUaddress_mode(_x) for _x in list(self._ptr[0].addressMode)]
 *     @addressMode.setter
 *     def addressMode(self, addressMode):             # <<<<<<<<<<<<<<
 *         self._ptr[0].addressMode = [_x.value for _x in addressMode]
 *     @property
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.addressMode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr23__pyx_v__x);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7912
 *         self._ptr[0].addressMode = [_x.value for _x in addressMode]
 *     @property
 *     def filterMode(self):             # <<<<<<<<<<<<<<
 *         return CUfilter_mode(self._ptr[0].filterMode)
 *     @filterMode.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10filterMode_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10filterMode_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10filterMode___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10filterMode___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7912, 0, __PYX_ERR(0, 7912, __pyx_L1_error));

  /* "cuda/cuda.pyx":7913
 *     @property
 *     def filterMode(self):
 *         return CUfilter_mode(self._ptr[0].filterMode)             # <<<<<<<<<<<<<<
 *     @filterMode.setter
 *     def filterMode(self, filterMode not None : CUfilter_mode):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUfilter_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUfilter_mode_enum((__pyx_v_self->_ptr[0]).filterMode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7912
 *         self._ptr[0].addressMode = [_x.value for _x in addressMode]
 *     @property
 *     def filterMode(self):             # <<<<<<<<<<<<<<
 *         return CUfilter_mode(self._ptr[0].filterMode)
 *     @filterMode.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.filterMode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7915
 *         return CUfilter_mode(self._ptr[0].filterMode)
 *     @filterMode.setter
 *     def filterMode(self, filterMode not None : CUfilter_mode):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].filterMode = filterMode.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10filterMode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_filterMode); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10filterMode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_filterMode) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_filterMode) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "filterMode"); __PYX_ERR(0, 7915, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10filterMode_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_filterMode));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10filterMode_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, PyObject *__pyx_v_filterMode) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUfilter_mode __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7915, 0, __PYX_ERR(0, 7915, __pyx_L1_error));

  /* "cuda/cuda.pyx":7917
 *     def filterMode(self, filterMode not None : CUfilter_mode):
 *         pass
 *         self._ptr[0].filterMode = filterMode.value             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_filterMode, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUfilter_mode_enum)__Pyx_PyInt_As_enum__CUfilter_mode_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7917, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).filterMode = __pyx_t_2;

  /* "cuda/cuda.pyx":7915
 *         return CUfilter_mode(self._ptr[0].filterMode)
 *     @filterMode.setter
 *     def filterMode(self, filterMode not None : CUfilter_mode):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].filterMode = filterMode.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.filterMode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7919
 *         self._ptr[0].filterMode = filterMode.value
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7919, 0, __PYX_ERR(0, 7919, __pyx_L1_error));

  /* "cuda/cuda.pyx":7920
 *     @property
 *     def flags(self):
 *         return self._ptr[0].flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7919
 *         self._ptr[0].filterMode = filterMode.value
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7922
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7922, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7922, 0, __PYX_ERR(0, 7922, __pyx_L1_error));

  /* "cuda/cuda.pyx":7924
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].flags = flags             # <<<<<<<<<<<<<<
 *     @property
 *     def maxAnisotropy(self):
 */
  (__pyx_v_self->_ptr[0]).flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":7922
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7926
 *         self._ptr[0].flags = flags
 *     @property
 *     def maxAnisotropy(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].maxAnisotropy
 *     @maxAnisotropy.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13maxAnisotropy_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13maxAnisotropy_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13maxAnisotropy___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13maxAnisotropy___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7926, 0, __PYX_ERR(0, 7926, __pyx_L1_error));

  /* "cuda/cuda.pyx":7927
 *     @property
 *     def maxAnisotropy(self):
 *         return self._ptr[0].maxAnisotropy             # <<<<<<<<<<<<<<
 *     @maxAnisotropy.setter
 *     def maxAnisotropy(self, unsigned int maxAnisotropy):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).maxAnisotropy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7926
 *         self._ptr[0].flags = flags
 *     @property
 *     def maxAnisotropy(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].maxAnisotropy
 *     @maxAnisotropy.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.maxAnisotropy.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7929
 *         return self._ptr[0].maxAnisotropy
 *     @maxAnisotropy.setter
 *     def maxAnisotropy(self, unsigned int maxAnisotropy):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].maxAnisotropy = maxAnisotropy
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13maxAnisotropy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_maxAnisotropy); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13maxAnisotropy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_maxAnisotropy) {
  unsigned int __pyx_v_maxAnisotropy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_maxAnisotropy); {
    __pyx_v_maxAnisotropy = __Pyx_PyInt_As_unsigned_int(__pyx_arg_maxAnisotropy); if (unlikely((__pyx_v_maxAnisotropy == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 7929, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.maxAnisotropy.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13maxAnisotropy_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), ((unsigned int)__pyx_v_maxAnisotropy));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13maxAnisotropy_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, unsigned int __pyx_v_maxAnisotropy) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7929, 0, __PYX_ERR(0, 7929, __pyx_L1_error));

  /* "cuda/cuda.pyx":7931
 *     def maxAnisotropy(self, unsigned int maxAnisotropy):
 *         pass
 *         self._ptr[0].maxAnisotropy = maxAnisotropy             # <<<<<<<<<<<<<<
 *     @property
 *     def mipmapFilterMode(self):
 */
  (__pyx_v_self->_ptr[0]).maxAnisotropy = __pyx_v_maxAnisotropy;

  /* "cuda/cuda.pyx":7929
 *         return self._ptr[0].maxAnisotropy
 *     @maxAnisotropy.setter
 *     def maxAnisotropy(self, unsigned int maxAnisotropy):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].maxAnisotropy = maxAnisotropy
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.maxAnisotropy.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7933
 *         self._ptr[0].maxAnisotropy = maxAnisotropy
 *     @property
 *     def mipmapFilterMode(self):             # <<<<<<<<<<<<<<
 *         return CUfilter_mode(self._ptr[0].mipmapFilterMode)
 *     @mipmapFilterMode.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_16mipmapFilterMode_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_16mipmapFilterMode_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_16mipmapFilterMode___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_16mipmapFilterMode___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7933, 0, __PYX_ERR(0, 7933, __pyx_L1_error));

  /* "cuda/cuda.pyx":7934
 *     @property
 *     def mipmapFilterMode(self):
 *         return CUfilter_mode(self._ptr[0].mipmapFilterMode)             # <<<<<<<<<<<<<<
 *     @mipmapFilterMode.setter
 *     def mipmapFilterMode(self, mipmapFilterMode not None : CUfilter_mode):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUfilter_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUfilter_mode_enum((__pyx_v_self->_ptr[0]).mipmapFilterMode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7933
 *         self._ptr[0].maxAnisotropy = maxAnisotropy
 *     @property
 *     def mipmapFilterMode(self):             # <<<<<<<<<<<<<<
 *         return CUfilter_mode(self._ptr[0].mipmapFilterMode)
 *     @mipmapFilterMode.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.mipmapFilterMode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7936
 *         return CUfilter_mode(self._ptr[0].mipmapFilterMode)
 *     @mipmapFilterMode.setter
 *     def mipmapFilterMode(self, mipmapFilterMode not None : CUfilter_mode):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].mipmapFilterMode = mipmapFilterMode.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_16mipmapFilterMode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mipmapFilterMode); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_16mipmapFilterMode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mipmapFilterMode) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_mipmapFilterMode) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "mipmapFilterMode"); __PYX_ERR(0, 7936, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_16mipmapFilterMode_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_mipmapFilterMode));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_16mipmapFilterMode_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, PyObject *__pyx_v_mipmapFilterMode) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUfilter_mode __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7936, 0, __PYX_ERR(0, 7936, __pyx_L1_error));

  /* "cuda/cuda.pyx":7938
 *     def mipmapFilterMode(self, mipmapFilterMode not None : CUfilter_mode):
 *         pass
 *         self._ptr[0].mipmapFilterMode = mipmapFilterMode.value             # <<<<<<<<<<<<<<
 *     @property
 *     def mipmapLevelBias(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mipmapFilterMode, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUfilter_mode_enum)__Pyx_PyInt_As_enum__CUfilter_mode_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 7938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).mipmapFilterMode = __pyx_t_2;

  /* "cuda/cuda.pyx":7936
 *         return CUfilter_mode(self._ptr[0].mipmapFilterMode)
 *     @mipmapFilterMode.setter
 *     def mipmapFilterMode(self, mipmapFilterMode not None : CUfilter_mode):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].mipmapFilterMode = mipmapFilterMode.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.mipmapFilterMode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7940
 *         self._ptr[0].mipmapFilterMode = mipmapFilterMode.value
 *     @property
 *     def mipmapLevelBias(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].mipmapLevelBias
 *     @mipmapLevelBias.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_15mipmapLevelBias_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_15mipmapLevelBias_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_15mipmapLevelBias___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_15mipmapLevelBias___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7940, 0, __PYX_ERR(0, 7940, __pyx_L1_error));

  /* "cuda/cuda.pyx":7941
 *     @property
 *     def mipmapLevelBias(self):
 *         return self._ptr[0].mipmapLevelBias             # <<<<<<<<<<<<<<
 *     @mipmapLevelBias.setter
 *     def mipmapLevelBias(self, float mipmapLevelBias):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr[0]).mipmapLevelBias); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7940
 *         self._ptr[0].mipmapFilterMode = mipmapFilterMode.value
 *     @property
 *     def mipmapLevelBias(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].mipmapLevelBias
 *     @mipmapLevelBias.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.mipmapLevelBias.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7943
 *         return self._ptr[0].mipmapLevelBias
 *     @mipmapLevelBias.setter
 *     def mipmapLevelBias(self, float mipmapLevelBias):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].mipmapLevelBias = mipmapLevelBias
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_15mipmapLevelBias_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_mipmapLevelBias); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_15mipmapLevelBias_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_mipmapLevelBias) {
  float __pyx_v_mipmapLevelBias;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_mipmapLevelBias); {
    __pyx_v_mipmapLevelBias = __pyx_PyFloat_AsFloat(__pyx_arg_mipmapLevelBias); if (unlikely((__pyx_v_mipmapLevelBias == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 7943, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.mipmapLevelBias.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_15mipmapLevelBias_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), ((float)__pyx_v_mipmapLevelBias));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_15mipmapLevelBias_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, float __pyx_v_mipmapLevelBias) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7943, 0, __PYX_ERR(0, 7943, __pyx_L1_error));

  /* "cuda/cuda.pyx":7945
 *     def mipmapLevelBias(self, float mipmapLevelBias):
 *         pass
 *         self._ptr[0].mipmapLevelBias = mipmapLevelBias             # <<<<<<<<<<<<<<
 *     @property
 *     def minMipmapLevelClamp(self):
 */
  (__pyx_v_self->_ptr[0]).mipmapLevelBias = __pyx_v_mipmapLevelBias;

  /* "cuda/cuda.pyx":7943
 *         return self._ptr[0].mipmapLevelBias
 *     @mipmapLevelBias.setter
 *     def mipmapLevelBias(self, float mipmapLevelBias):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].mipmapLevelBias = mipmapLevelBias
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.mipmapLevelBias.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7947
 *         self._ptr[0].mipmapLevelBias = mipmapLevelBias
 *     @property
 *     def minMipmapLevelClamp(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].minMipmapLevelClamp
 *     @minMipmapLevelClamp.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19minMipmapLevelClamp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19minMipmapLevelClamp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19minMipmapLevelClamp___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19minMipmapLevelClamp___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7947, 0, __PYX_ERR(0, 7947, __pyx_L1_error));

  /* "cuda/cuda.pyx":7948
 *     @property
 *     def minMipmapLevelClamp(self):
 *         return self._ptr[0].minMipmapLevelClamp             # <<<<<<<<<<<<<<
 *     @minMipmapLevelClamp.setter
 *     def minMipmapLevelClamp(self, float minMipmapLevelClamp):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr[0]).minMipmapLevelClamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7947
 *         self._ptr[0].mipmapLevelBias = mipmapLevelBias
 *     @property
 *     def minMipmapLevelClamp(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].minMipmapLevelClamp
 *     @minMipmapLevelClamp.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.minMipmapLevelClamp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7950
 *         return self._ptr[0].minMipmapLevelClamp
 *     @minMipmapLevelClamp.setter
 *     def minMipmapLevelClamp(self, float minMipmapLevelClamp):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].minMipmapLevelClamp = minMipmapLevelClamp
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19minMipmapLevelClamp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_minMipmapLevelClamp); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19minMipmapLevelClamp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_minMipmapLevelClamp) {
  float __pyx_v_minMipmapLevelClamp;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_minMipmapLevelClamp); {
    __pyx_v_minMipmapLevelClamp = __pyx_PyFloat_AsFloat(__pyx_arg_minMipmapLevelClamp); if (unlikely((__pyx_v_minMipmapLevelClamp == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 7950, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.minMipmapLevelClamp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19minMipmapLevelClamp_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), ((float)__pyx_v_minMipmapLevelClamp));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19minMipmapLevelClamp_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, float __pyx_v_minMipmapLevelClamp) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7950, 0, __PYX_ERR(0, 7950, __pyx_L1_error));

  /* "cuda/cuda.pyx":7952
 *     def minMipmapLevelClamp(self, float minMipmapLevelClamp):
 *         pass
 *         self._ptr[0].minMipmapLevelClamp = minMipmapLevelClamp             # <<<<<<<<<<<<<<
 *     @property
 *     def maxMipmapLevelClamp(self):
 */
  (__pyx_v_self->_ptr[0]).minMipmapLevelClamp = __pyx_v_minMipmapLevelClamp;

  /* "cuda/cuda.pyx":7950
 *         return self._ptr[0].minMipmapLevelClamp
 *     @minMipmapLevelClamp.setter
 *     def minMipmapLevelClamp(self, float minMipmapLevelClamp):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].minMipmapLevelClamp = minMipmapLevelClamp
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.minMipmapLevelClamp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7954
 *         self._ptr[0].minMipmapLevelClamp = minMipmapLevelClamp
 *     @property
 *     def maxMipmapLevelClamp(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].maxMipmapLevelClamp
 *     @maxMipmapLevelClamp.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19maxMipmapLevelClamp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19maxMipmapLevelClamp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19maxMipmapLevelClamp___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19maxMipmapLevelClamp___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7954, 0, __PYX_ERR(0, 7954, __pyx_L1_error));

  /* "cuda/cuda.pyx":7955
 *     @property
 *     def maxMipmapLevelClamp(self):
 *         return self._ptr[0].maxMipmapLevelClamp             # <<<<<<<<<<<<<<
 *     @maxMipmapLevelClamp.setter
 *     def maxMipmapLevelClamp(self, float maxMipmapLevelClamp):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr[0]).maxMipmapLevelClamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7954
 *         self._ptr[0].minMipmapLevelClamp = minMipmapLevelClamp
 *     @property
 *     def maxMipmapLevelClamp(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].maxMipmapLevelClamp
 *     @maxMipmapLevelClamp.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.maxMipmapLevelClamp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7957
 *         return self._ptr[0].maxMipmapLevelClamp
 *     @maxMipmapLevelClamp.setter
 *     def maxMipmapLevelClamp(self, float maxMipmapLevelClamp):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].maxMipmapLevelClamp = maxMipmapLevelClamp
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19maxMipmapLevelClamp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_maxMipmapLevelClamp); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19maxMipmapLevelClamp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_maxMipmapLevelClamp) {
  float __pyx_v_maxMipmapLevelClamp;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_maxMipmapLevelClamp); {
    __pyx_v_maxMipmapLevelClamp = __pyx_PyFloat_AsFloat(__pyx_arg_maxMipmapLevelClamp); if (unlikely((__pyx_v_maxMipmapLevelClamp == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 7957, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.maxMipmapLevelClamp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19maxMipmapLevelClamp_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), ((float)__pyx_v_maxMipmapLevelClamp));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19maxMipmapLevelClamp_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, float __pyx_v_maxMipmapLevelClamp) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7957, 0, __PYX_ERR(0, 7957, __pyx_L1_error));

  /* "cuda/cuda.pyx":7959
 *     def maxMipmapLevelClamp(self, float maxMipmapLevelClamp):
 *         pass
 *         self._ptr[0].maxMipmapLevelClamp = maxMipmapLevelClamp             # <<<<<<<<<<<<<<
 *     @property
 *     def borderColor(self):
 */
  (__pyx_v_self->_ptr[0]).maxMipmapLevelClamp = __pyx_v_maxMipmapLevelClamp;

  /* "cuda/cuda.pyx":7957
 *         return self._ptr[0].maxMipmapLevelClamp
 *     @maxMipmapLevelClamp.setter
 *     def maxMipmapLevelClamp(self, float maxMipmapLevelClamp):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].maxMipmapLevelClamp = maxMipmapLevelClamp
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.maxMipmapLevelClamp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7961
 *         self._ptr[0].maxMipmapLevelClamp = maxMipmapLevelClamp
 *     @property
 *     def borderColor(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].borderColor
 *     @borderColor.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11borderColor_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11borderColor_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11borderColor___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11borderColor___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7961, 0, __PYX_ERR(0, 7961, __pyx_L1_error));

  /* "cuda/cuda.pyx":7962
 *     @property
 *     def borderColor(self):
 *         return self._ptr[0].borderColor             # <<<<<<<<<<<<<<
 *     @borderColor.setter
 *     def borderColor(self, borderColor):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_float((__pyx_v_self->_ptr[0]).borderColor, 4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7961
 *         self._ptr[0].maxMipmapLevelClamp = maxMipmapLevelClamp
 *     @property
 *     def borderColor(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].borderColor
 *     @borderColor.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.borderColor.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7964
 *         return self._ptr[0].borderColor
 *     @borderColor.setter
 *     def borderColor(self, borderColor):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].borderColor = borderColor
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11borderColor_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_borderColor); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11borderColor_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_borderColor) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11borderColor_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_borderColor));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11borderColor_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, PyObject *__pyx_v_borderColor) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  float __pyx_t_1[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7964, 0, __PYX_ERR(0, 7964, __pyx_L1_error));

  /* "cuda/cuda.pyx":7966
 *     def borderColor(self, borderColor):
 *         pass
 *         self._ptr[0].borderColor = borderColor             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  if (unlikely(__Pyx_carray_from_py_float(__pyx_v_borderColor, __pyx_t_1, 4) < 0)) __PYX_ERR(0, 7966, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).borderColor[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).borderColor[0]) * (4));

  /* "cuda/cuda.pyx":7964
 *         return self._ptr[0].borderColor
 *     @borderColor.setter
 *     def borderColor(self, borderColor):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].borderColor = borderColor
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.borderColor.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7968
 *         self._ptr[0].borderColor = borderColor
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 7968, 0, __PYX_ERR(0, 7968, __pyx_L1_error));

  /* "cuda/cuda.pyx":7969
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_int((__pyx_v_self->_ptr[0]).reserved, 12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":7968
 *         self._ptr[0].borderColor = borderColor
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":7971
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1[12];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 7971, 0, __PYX_ERR(0, 7971, __pyx_L1_error));

  /* "cuda/cuda.pyx":7973
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_RESOURCE_VIEW_DESC_st:
 */
  if (unlikely(__Pyx_carray_from_py_int(__pyx_v_reserved, __pyx_t_1, 12) < 0)) __PYX_ERR(0, 7973, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).reserved[0]) * (12));

  /* "cuda/cuda.pyx":7971
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10__reduce_cython__[] = "CUDA_TEXTURE_DESC_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__317)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__318, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_12__setstate_cython__[] = "CUDA_TEXTURE_DESC_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__319)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__320, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_TEXTURE_DESC_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8006
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8006, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8006, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8006, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8006, 0, __PYX_ERR(0, 8006, __pyx_L1_error));

  /* "cuda/cuda.pyx":8007
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8008
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_RESOURCE_VIEW_DESC_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":8007
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":8010
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_RESOURCE_VIEW_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":8006
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8011
 *         else:
 *             self._ptr = <ccuda.CUDA_RESOURCE_VIEW_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8011, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8011, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8011, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8011, 0, __PYX_ERR(0, 8011, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8013
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 8013, 0, __PYX_ERR(0, 8013, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":8015
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6getPtr[] = "CUDA_RESOURCE_VIEW_DESC_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__321)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8015, 0, __PYX_ERR(0, 8015, __pyx_L1_error));

  /* "cuda/cuda.pyx":8016
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8015
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8017
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8017, 0, __PYX_ERR(0, 8017, __pyx_L1_error));

  /* "cuda/cuda.pyx":8018
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['format : ' + str(self.format)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8019
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['format : ' + str(self.format)]
 *             str_list += ['width : ' + str(self.width)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8020
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['format : ' + str(self.format)]             # <<<<<<<<<<<<<<
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_format, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8021
 *             str_list = []
 *             str_list += ['format : ' + str(self.format)]
 *             str_list += ['width : ' + str(self.width)]             # <<<<<<<<<<<<<<
 *             str_list += ['height : ' + str(self.height)]
 *             str_list += ['depth : ' + str(self.depth)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_width, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8022
 *             str_list += ['format : ' + str(self.format)]
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]             # <<<<<<<<<<<<<<
 *             str_list += ['depth : ' + str(self.depth)]
 *             str_list += ['firstMipmapLevel : ' + str(self.firstMipmapLevel)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_height, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8023
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]
 *             str_list += ['depth : ' + str(self.depth)]             # <<<<<<<<<<<<<<
 *             str_list += ['firstMipmapLevel : ' + str(self.firstMipmapLevel)]
 *             str_list += ['lastMipmapLevel : ' + str(self.lastMipmapLevel)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_depth_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_depth, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8024
 *             str_list += ['height : ' + str(self.height)]
 *             str_list += ['depth : ' + str(self.depth)]
 *             str_list += ['firstMipmapLevel : ' + str(self.firstMipmapLevel)]             # <<<<<<<<<<<<<<
 *             str_list += ['lastMipmapLevel : ' + str(self.lastMipmapLevel)]
 *             str_list += ['firstLayer : ' + str(self.firstLayer)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_firstMipmapLevel_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_firstMipmapLevel, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8025
 *             str_list += ['depth : ' + str(self.depth)]
 *             str_list += ['firstMipmapLevel : ' + str(self.firstMipmapLevel)]
 *             str_list += ['lastMipmapLevel : ' + str(self.lastMipmapLevel)]             # <<<<<<<<<<<<<<
 *             str_list += ['firstLayer : ' + str(self.firstLayer)]
 *             str_list += ['lastLayer : ' + str(self.lastLayer)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lastMipmapLevel_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_lastMipmapLevel, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8026
 *             str_list += ['firstMipmapLevel : ' + str(self.firstMipmapLevel)]
 *             str_list += ['lastMipmapLevel : ' + str(self.lastMipmapLevel)]
 *             str_list += ['firstLayer : ' + str(self.firstLayer)]             # <<<<<<<<<<<<<<
 *             str_list += ['lastLayer : ' + str(self.lastLayer)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_firstLayer_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_firstLayer, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8027
 *             str_list += ['lastMipmapLevel : ' + str(self.lastMipmapLevel)]
 *             str_list += ['firstLayer : ' + str(self.firstLayer)]
 *             str_list += ['lastLayer : ' + str(self.lastLayer)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lastLayer_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_lastLayer, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8028
 *             str_list += ['firstLayer : ' + str(self.firstLayer)]
 *             str_list += ['lastLayer : ' + str(self.lastLayer)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8029
 *             str_list += ['lastLayer : ' + str(self.lastLayer)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8018
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['format : ' + str(self.format)]
 */
  }

  /* "cuda/cuda.pyx":8031
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8017
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8034
 * 
 *     @property
 *     def format(self):             # <<<<<<<<<<<<<<
 *         return CUresourceViewFormat(self._ptr[0].format)
 *     @format.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6format_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6format_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6format___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6format___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8034, 0, __PYX_ERR(0, 8034, __pyx_L1_error));

  /* "cuda/cuda.pyx":8035
 *     @property
 *     def format(self):
 *         return CUresourceViewFormat(self._ptr[0].format)             # <<<<<<<<<<<<<<
 *     @format.setter
 *     def format(self, format not None : CUresourceViewFormat):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUresourceViewFormat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum((__pyx_v_self->_ptr[0]).format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8034
 * 
 *     @property
 *     def format(self):             # <<<<<<<<<<<<<<
 *         return CUresourceViewFormat(self._ptr[0].format)
 *     @format.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8037
 *         return CUresourceViewFormat(self._ptr[0].format)
 *     @format.setter
 *     def format(self, format not None : CUresourceViewFormat):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].format = format.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_format); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(0, 8037, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6format_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6format_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, PyObject *__pyx_v_format) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresourceViewFormat __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8037, 0, __PYX_ERR(0, 8037, __pyx_L1_error));

  /* "cuda/cuda.pyx":8039
 *     def format(self, format not None : CUresourceViewFormat):
 *         pass
 *         self._ptr[0].format = format.value             # <<<<<<<<<<<<<<
 *     @property
 *     def width(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUresourceViewFormat_enum)__Pyx_PyInt_As_enum__CUresourceViewFormat_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 8039, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).format = __pyx_t_2;

  /* "cuda/cuda.pyx":8037
 *         return CUresourceViewFormat(self._ptr[0].format)
 *     @format.setter
 *     def format(self, format not None : CUresourceViewFormat):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].format = format.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.format.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8041
 *         self._ptr[0].format = format.value
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].width
 *     @width.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5width___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5width___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8041, 0, __PYX_ERR(0, 8041, __pyx_L1_error));

  /* "cuda/cuda.pyx":8042
 *     @property
 *     def width(self):
 *         return self._ptr[0].width             # <<<<<<<<<<<<<<
 *     @width.setter
 *     def width(self, size_t width):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8041
 *         self._ptr[0].format = format.value
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].width
 *     @width.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8044
 *         return self._ptr[0].width
 *     @width.setter
 *     def width(self, size_t width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].width = width
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_width); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_width) {
  size_t __pyx_v_width;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_width); {
    __pyx_v_width = __Pyx_PyInt_As_size_t(__pyx_arg_width); if (unlikely((__pyx_v_width == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 8044, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5width_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self), ((size_t)__pyx_v_width));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5width_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, size_t __pyx_v_width) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8044, 0, __PYX_ERR(0, 8044, __pyx_L1_error));

  /* "cuda/cuda.pyx":8046
 *     def width(self, size_t width):
 *         pass
 *         self._ptr[0].width = width             # <<<<<<<<<<<<<<
 *     @property
 *     def height(self):
 */
  (__pyx_v_self->_ptr[0]).width = __pyx_v_width;

  /* "cuda/cuda.pyx":8044
 *         return self._ptr[0].width
 *     @width.setter
 *     def width(self, size_t width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].width = width
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8048
 *         self._ptr[0].width = width
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].height
 *     @height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6height___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6height___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8048, 0, __PYX_ERR(0, 8048, __pyx_L1_error));

  /* "cuda/cuda.pyx":8049
 *     @property
 *     def height(self):
 *         return self._ptr[0].height             # <<<<<<<<<<<<<<
 *     @height.setter
 *     def height(self, size_t height):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8048
 *         self._ptr[0].width = width
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].height
 *     @height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8051
 *         return self._ptr[0].height
 *     @height.setter
 *     def height(self, size_t height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].height = height
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_height); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_height) {
  size_t __pyx_v_height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_height); {
    __pyx_v_height = __Pyx_PyInt_As_size_t(__pyx_arg_height); if (unlikely((__pyx_v_height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 8051, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6height_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self), ((size_t)__pyx_v_height));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6height_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, size_t __pyx_v_height) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8051, 0, __PYX_ERR(0, 8051, __pyx_L1_error));

  /* "cuda/cuda.pyx":8053
 *     def height(self, size_t height):
 *         pass
 *         self._ptr[0].height = height             # <<<<<<<<<<<<<<
 *     @property
 *     def depth(self):
 */
  (__pyx_v_self->_ptr[0]).height = __pyx_v_height;

  /* "cuda/cuda.pyx":8051
 *         return self._ptr[0].height
 *     @height.setter
 *     def height(self, size_t height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].height = height
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8055
 *         self._ptr[0].height = height
 *     @property
 *     def depth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].depth
 *     @depth.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5depth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5depth_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5depth___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5depth___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8055, 0, __PYX_ERR(0, 8055, __pyx_L1_error));

  /* "cuda/cuda.pyx":8056
 *     @property
 *     def depth(self):
 *         return self._ptr[0].depth             # <<<<<<<<<<<<<<
 *     @depth.setter
 *     def depth(self, size_t depth):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).depth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8055
 *         self._ptr[0].height = height
 *     @property
 *     def depth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].depth
 *     @depth.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.depth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8058
 *         return self._ptr[0].depth
 *     @depth.setter
 *     def depth(self, size_t depth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].depth = depth
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5depth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_depth); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5depth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_depth) {
  size_t __pyx_v_depth;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_depth); {
    __pyx_v_depth = __Pyx_PyInt_As_size_t(__pyx_arg_depth); if (unlikely((__pyx_v_depth == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 8058, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.depth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5depth_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self), ((size_t)__pyx_v_depth));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5depth_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, size_t __pyx_v_depth) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8058, 0, __PYX_ERR(0, 8058, __pyx_L1_error));

  /* "cuda/cuda.pyx":8060
 *     def depth(self, size_t depth):
 *         pass
 *         self._ptr[0].depth = depth             # <<<<<<<<<<<<<<
 *     @property
 *     def firstMipmapLevel(self):
 */
  (__pyx_v_self->_ptr[0]).depth = __pyx_v_depth;

  /* "cuda/cuda.pyx":8058
 *         return self._ptr[0].depth
 *     @depth.setter
 *     def depth(self, size_t depth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].depth = depth
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.depth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8062
 *         self._ptr[0].depth = depth
 *     @property
 *     def firstMipmapLevel(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].firstMipmapLevel
 *     @firstMipmapLevel.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_16firstMipmapLevel_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_16firstMipmapLevel_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_16firstMipmapLevel___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_16firstMipmapLevel___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8062, 0, __PYX_ERR(0, 8062, __pyx_L1_error));

  /* "cuda/cuda.pyx":8063
 *     @property
 *     def firstMipmapLevel(self):
 *         return self._ptr[0].firstMipmapLevel             # <<<<<<<<<<<<<<
 *     @firstMipmapLevel.setter
 *     def firstMipmapLevel(self, unsigned int firstMipmapLevel):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).firstMipmapLevel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8062
 *         self._ptr[0].depth = depth
 *     @property
 *     def firstMipmapLevel(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].firstMipmapLevel
 *     @firstMipmapLevel.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.firstMipmapLevel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8065
 *         return self._ptr[0].firstMipmapLevel
 *     @firstMipmapLevel.setter
 *     def firstMipmapLevel(self, unsigned int firstMipmapLevel):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].firstMipmapLevel = firstMipmapLevel
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_16firstMipmapLevel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_firstMipmapLevel); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_16firstMipmapLevel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_firstMipmapLevel) {
  unsigned int __pyx_v_firstMipmapLevel;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_firstMipmapLevel); {
    __pyx_v_firstMipmapLevel = __Pyx_PyInt_As_unsigned_int(__pyx_arg_firstMipmapLevel); if (unlikely((__pyx_v_firstMipmapLevel == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8065, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.firstMipmapLevel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_16firstMipmapLevel_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self), ((unsigned int)__pyx_v_firstMipmapLevel));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_16firstMipmapLevel_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, unsigned int __pyx_v_firstMipmapLevel) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8065, 0, __PYX_ERR(0, 8065, __pyx_L1_error));

  /* "cuda/cuda.pyx":8067
 *     def firstMipmapLevel(self, unsigned int firstMipmapLevel):
 *         pass
 *         self._ptr[0].firstMipmapLevel = firstMipmapLevel             # <<<<<<<<<<<<<<
 *     @property
 *     def lastMipmapLevel(self):
 */
  (__pyx_v_self->_ptr[0]).firstMipmapLevel = __pyx_v_firstMipmapLevel;

  /* "cuda/cuda.pyx":8065
 *         return self._ptr[0].firstMipmapLevel
 *     @firstMipmapLevel.setter
 *     def firstMipmapLevel(self, unsigned int firstMipmapLevel):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].firstMipmapLevel = firstMipmapLevel
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.firstMipmapLevel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8069
 *         self._ptr[0].firstMipmapLevel = firstMipmapLevel
 *     @property
 *     def lastMipmapLevel(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].lastMipmapLevel
 *     @lastMipmapLevel.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_15lastMipmapLevel_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_15lastMipmapLevel_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_15lastMipmapLevel___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_15lastMipmapLevel___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8069, 0, __PYX_ERR(0, 8069, __pyx_L1_error));

  /* "cuda/cuda.pyx":8070
 *     @property
 *     def lastMipmapLevel(self):
 *         return self._ptr[0].lastMipmapLevel             # <<<<<<<<<<<<<<
 *     @lastMipmapLevel.setter
 *     def lastMipmapLevel(self, unsigned int lastMipmapLevel):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).lastMipmapLevel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8069
 *         self._ptr[0].firstMipmapLevel = firstMipmapLevel
 *     @property
 *     def lastMipmapLevel(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].lastMipmapLevel
 *     @lastMipmapLevel.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.lastMipmapLevel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8072
 *         return self._ptr[0].lastMipmapLevel
 *     @lastMipmapLevel.setter
 *     def lastMipmapLevel(self, unsigned int lastMipmapLevel):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].lastMipmapLevel = lastMipmapLevel
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_15lastMipmapLevel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_lastMipmapLevel); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_15lastMipmapLevel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_lastMipmapLevel) {
  unsigned int __pyx_v_lastMipmapLevel;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_lastMipmapLevel); {
    __pyx_v_lastMipmapLevel = __Pyx_PyInt_As_unsigned_int(__pyx_arg_lastMipmapLevel); if (unlikely((__pyx_v_lastMipmapLevel == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8072, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.lastMipmapLevel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_15lastMipmapLevel_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self), ((unsigned int)__pyx_v_lastMipmapLevel));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_15lastMipmapLevel_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, unsigned int __pyx_v_lastMipmapLevel) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8072, 0, __PYX_ERR(0, 8072, __pyx_L1_error));

  /* "cuda/cuda.pyx":8074
 *     def lastMipmapLevel(self, unsigned int lastMipmapLevel):
 *         pass
 *         self._ptr[0].lastMipmapLevel = lastMipmapLevel             # <<<<<<<<<<<<<<
 *     @property
 *     def firstLayer(self):
 */
  (__pyx_v_self->_ptr[0]).lastMipmapLevel = __pyx_v_lastMipmapLevel;

  /* "cuda/cuda.pyx":8072
 *         return self._ptr[0].lastMipmapLevel
 *     @lastMipmapLevel.setter
 *     def lastMipmapLevel(self, unsigned int lastMipmapLevel):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].lastMipmapLevel = lastMipmapLevel
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.lastMipmapLevel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8076
 *         self._ptr[0].lastMipmapLevel = lastMipmapLevel
 *     @property
 *     def firstLayer(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].firstLayer
 *     @firstLayer.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10firstLayer_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10firstLayer_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10firstLayer___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10firstLayer___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8076, 0, __PYX_ERR(0, 8076, __pyx_L1_error));

  /* "cuda/cuda.pyx":8077
 *     @property
 *     def firstLayer(self):
 *         return self._ptr[0].firstLayer             # <<<<<<<<<<<<<<
 *     @firstLayer.setter
 *     def firstLayer(self, unsigned int firstLayer):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).firstLayer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8076
 *         self._ptr[0].lastMipmapLevel = lastMipmapLevel
 *     @property
 *     def firstLayer(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].firstLayer
 *     @firstLayer.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.firstLayer.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8079
 *         return self._ptr[0].firstLayer
 *     @firstLayer.setter
 *     def firstLayer(self, unsigned int firstLayer):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].firstLayer = firstLayer
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10firstLayer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_firstLayer); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10firstLayer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_firstLayer) {
  unsigned int __pyx_v_firstLayer;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_firstLayer); {
    __pyx_v_firstLayer = __Pyx_PyInt_As_unsigned_int(__pyx_arg_firstLayer); if (unlikely((__pyx_v_firstLayer == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8079, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.firstLayer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10firstLayer_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self), ((unsigned int)__pyx_v_firstLayer));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10firstLayer_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, unsigned int __pyx_v_firstLayer) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8079, 0, __PYX_ERR(0, 8079, __pyx_L1_error));

  /* "cuda/cuda.pyx":8081
 *     def firstLayer(self, unsigned int firstLayer):
 *         pass
 *         self._ptr[0].firstLayer = firstLayer             # <<<<<<<<<<<<<<
 *     @property
 *     def lastLayer(self):
 */
  (__pyx_v_self->_ptr[0]).firstLayer = __pyx_v_firstLayer;

  /* "cuda/cuda.pyx":8079
 *         return self._ptr[0].firstLayer
 *     @firstLayer.setter
 *     def firstLayer(self, unsigned int firstLayer):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].firstLayer = firstLayer
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.firstLayer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8083
 *         self._ptr[0].firstLayer = firstLayer
 *     @property
 *     def lastLayer(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].lastLayer
 *     @lastLayer.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9lastLayer_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9lastLayer_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9lastLayer___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9lastLayer___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8083, 0, __PYX_ERR(0, 8083, __pyx_L1_error));

  /* "cuda/cuda.pyx":8084
 *     @property
 *     def lastLayer(self):
 *         return self._ptr[0].lastLayer             # <<<<<<<<<<<<<<
 *     @lastLayer.setter
 *     def lastLayer(self, unsigned int lastLayer):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).lastLayer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8083
 *         self._ptr[0].firstLayer = firstLayer
 *     @property
 *     def lastLayer(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].lastLayer
 *     @lastLayer.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.lastLayer.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8086
 *         return self._ptr[0].lastLayer
 *     @lastLayer.setter
 *     def lastLayer(self, unsigned int lastLayer):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].lastLayer = lastLayer
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9lastLayer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_lastLayer); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9lastLayer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_lastLayer) {
  unsigned int __pyx_v_lastLayer;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_lastLayer); {
    __pyx_v_lastLayer = __Pyx_PyInt_As_unsigned_int(__pyx_arg_lastLayer); if (unlikely((__pyx_v_lastLayer == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8086, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.lastLayer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9lastLayer_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self), ((unsigned int)__pyx_v_lastLayer));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9lastLayer_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, unsigned int __pyx_v_lastLayer) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8086, 0, __PYX_ERR(0, 8086, __pyx_L1_error));

  /* "cuda/cuda.pyx":8088
 *     def lastLayer(self, unsigned int lastLayer):
 *         pass
 *         self._ptr[0].lastLayer = lastLayer             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  (__pyx_v_self->_ptr[0]).lastLayer = __pyx_v_lastLayer;

  /* "cuda/cuda.pyx":8086
 *         return self._ptr[0].lastLayer
 *     @lastLayer.setter
 *     def lastLayer(self, unsigned int lastLayer):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].lastLayer = lastLayer
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.lastLayer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8090
 *         self._ptr[0].lastLayer = lastLayer
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8090, 0, __PYX_ERR(0, 8090, __pyx_L1_error));

  /* "cuda/cuda.pyx":8091
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_unsigned_int((__pyx_v_self->_ptr[0]).reserved, 16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8090
 *         self._ptr[0].lastLayer = lastLayer
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8093
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1[16];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8093, 0, __PYX_ERR(0, 8093, __pyx_L1_error));

  /* "cuda/cuda.pyx":8095
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:
 */
  if (unlikely(__Pyx_carray_from_py_unsigned_int(__pyx_v_reserved, __pyx_t_1, 16) < 0)) __PYX_ERR(0, 8095, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).reserved[0]) * (16));

  /* "cuda/cuda.pyx":8093
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10__reduce_cython__[] = "CUDA_RESOURCE_VIEW_DESC_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__322)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__323, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_12__setstate_cython__[] = "CUDA_RESOURCE_VIEW_DESC_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__324)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__325, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8114
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8114, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8114, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8114, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8114, 0, __PYX_ERR(0, 8114, __pyx_L1_error));

  /* "cuda/cuda.pyx":8115
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8116
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":8115
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":8118
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":8114
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8119
 *         else:
 *             self._ptr = <ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8119, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8119, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8119, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8119, 0, __PYX_ERR(0, 8119, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8121
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 8121, 0, __PYX_ERR(0, 8121, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":8123
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_6getPtr[] = "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__326)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8123, 0, __PYX_ERR(0, 8123, __pyx_L1_error));

  /* "cuda/cuda.pyx":8124
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8123
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8125
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8125, 0, __PYX_ERR(0, 8125, __pyx_L1_error));

  /* "cuda/cuda.pyx":8126
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['p2pToken : ' + str(self.p2pToken)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8127
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['p2pToken : ' + str(self.p2pToken)]
 *             str_list += ['vaSpaceToken : ' + str(self.vaSpaceToken)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8128
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['p2pToken : ' + str(self.p2pToken)]             # <<<<<<<<<<<<<<
 *             str_list += ['vaSpaceToken : ' + str(self.vaSpaceToken)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_p2pToken_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_p2pToken, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8129
 *             str_list = []
 *             str_list += ['p2pToken : ' + str(self.p2pToken)]
 *             str_list += ['vaSpaceToken : ' + str(self.vaSpaceToken)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vaSpaceToken_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_vaSpaceToken, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8130
 *             str_list += ['p2pToken : ' + str(self.p2pToken)]
 *             str_list += ['vaSpaceToken : ' + str(self.vaSpaceToken)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8126
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['p2pToken : ' + str(self.p2pToken)]
 */
  }

  /* "cuda/cuda.pyx":8132
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8125
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8135
 * 
 *     @property
 *     def p2pToken(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].p2pToken
 *     @p2pToken.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8p2pToken_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8p2pToken_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8p2pToken___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8p2pToken___get__(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8135, 0, __PYX_ERR(0, 8135, __pyx_L1_error));

  /* "cuda/cuda.pyx":8136
 *     @property
 *     def p2pToken(self):
 *         return self._ptr[0].p2pToken             # <<<<<<<<<<<<<<
 *     @p2pToken.setter
 *     def p2pToken(self, unsigned long long p2pToken):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).p2pToken); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8135
 * 
 *     @property
 *     def p2pToken(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].p2pToken
 *     @p2pToken.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.p2pToken.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8138
 *         return self._ptr[0].p2pToken
 *     @p2pToken.setter
 *     def p2pToken(self, unsigned long long p2pToken):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].p2pToken = p2pToken
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8p2pToken_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_p2pToken); /*proto*/
static int __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8p2pToken_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_p2pToken) {
  unsigned PY_LONG_LONG __pyx_v_p2pToken;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_p2pToken); {
    __pyx_v_p2pToken = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_p2pToken); if (unlikely((__pyx_v_p2pToken == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8138, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.p2pToken.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8p2pToken_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_p2pToken));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8p2pToken_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_p2pToken) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8138, 0, __PYX_ERR(0, 8138, __pyx_L1_error));

  /* "cuda/cuda.pyx":8140
 *     def p2pToken(self, unsigned long long p2pToken):
 *         pass
 *         self._ptr[0].p2pToken = p2pToken             # <<<<<<<<<<<<<<
 *     @property
 *     def vaSpaceToken(self):
 */
  (__pyx_v_self->_ptr[0]).p2pToken = __pyx_v_p2pToken;

  /* "cuda/cuda.pyx":8138
 *         return self._ptr[0].p2pToken
 *     @p2pToken.setter
 *     def p2pToken(self, unsigned long long p2pToken):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].p2pToken = p2pToken
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.p2pToken.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8142
 *         self._ptr[0].p2pToken = p2pToken
 *     @property
 *     def vaSpaceToken(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].vaSpaceToken
 *     @vaSpaceToken.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12vaSpaceToken_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12vaSpaceToken_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12vaSpaceToken___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12vaSpaceToken___get__(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8142, 0, __PYX_ERR(0, 8142, __pyx_L1_error));

  /* "cuda/cuda.pyx":8143
 *     @property
 *     def vaSpaceToken(self):
 *         return self._ptr[0].vaSpaceToken             # <<<<<<<<<<<<<<
 *     @vaSpaceToken.setter
 *     def vaSpaceToken(self, unsigned int vaSpaceToken):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).vaSpaceToken); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8142
 *         self._ptr[0].p2pToken = p2pToken
 *     @property
 *     def vaSpaceToken(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].vaSpaceToken
 *     @vaSpaceToken.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.vaSpaceToken.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8145
 *         return self._ptr[0].vaSpaceToken
 *     @vaSpaceToken.setter
 *     def vaSpaceToken(self, unsigned int vaSpaceToken):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].vaSpaceToken = vaSpaceToken
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12vaSpaceToken_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_vaSpaceToken); /*proto*/
static int __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12vaSpaceToken_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_vaSpaceToken) {
  unsigned int __pyx_v_vaSpaceToken;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_vaSpaceToken); {
    __pyx_v_vaSpaceToken = __Pyx_PyInt_As_unsigned_int(__pyx_arg_vaSpaceToken); if (unlikely((__pyx_v_vaSpaceToken == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8145, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.vaSpaceToken.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12vaSpaceToken_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *)__pyx_v_self), ((unsigned int)__pyx_v_vaSpaceToken));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12vaSpaceToken_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self, unsigned int __pyx_v_vaSpaceToken) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8145, 0, __PYX_ERR(0, 8145, __pyx_L1_error));

  /* "cuda/cuda.pyx":8147
 *     def vaSpaceToken(self, unsigned int vaSpaceToken):
 *         pass
 *         self._ptr[0].vaSpaceToken = vaSpaceToken             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_LAUNCH_PARAMS_st:
 */
  (__pyx_v_self->_ptr[0]).vaSpaceToken = __pyx_v_vaSpaceToken;

  /* "cuda/cuda.pyx":8145
 *         return self._ptr[0].vaSpaceToken
 *     @vaSpaceToken.setter
 *     def vaSpaceToken(self, unsigned int vaSpaceToken):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].vaSpaceToken = vaSpaceToken
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.vaSpaceToken.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_10__reduce_cython__[] = "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__327)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__328, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12__setstate_cython__[] = "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__329)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__330, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8182
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8182, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8182, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8182, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8182, 0, __PYX_ERR(0, 8182, __pyx_L1_error));

  /* "cuda/cuda.pyx":8183
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8184
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_LAUNCH_PARAMS_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":8183
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":8186
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_LAUNCH_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._function = CUfunction(_ptr=<void_ptr>&self._ptr[0].function)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_LAUNCH_PARAMS_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":8182
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8187
 *         else:
 *             self._ptr = <ccuda.CUDA_LAUNCH_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._function = CUfunction(_ptr=<void_ptr>&self._ptr[0].function)
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8187, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8187, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8187, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8187, 0, __PYX_ERR(0, 8187, __pyx_L1_error));

  /* "cuda/cuda.pyx":8188
 *             self._ptr = <ccuda.CUDA_LAUNCH_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._function = CUfunction(_ptr=<void_ptr>&self._ptr[0].function)             # <<<<<<<<<<<<<<
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).function))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 8188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_function);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_function));
  __pyx_v_self->_function = ((struct __pyx_obj_4cuda_4cuda_CUfunction *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8189
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._function = CUfunction(_ptr=<void_ptr>&self._ptr[0].function)
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).hStream))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 8189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_hStream);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_hStream));
  __pyx_v_self->_hStream = ((struct __pyx_obj_4cuda_4cuda_CUstream *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8187
 *         else:
 *             self._ptr = <ccuda.CUDA_LAUNCH_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._function = CUfunction(_ptr=<void_ptr>&self._ptr[0].function)
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8190
 *         self._function = CUfunction(_ptr=<void_ptr>&self._ptr[0].function)
 *         self._hStream = CUstream(_ptr=<void_ptr>&self._ptr[0].hStream)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 8190, 0, __PYX_ERR(0, 8190, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_LAUNCH_PARAMS_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":8192
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_6getPtr[] = "CUDA_LAUNCH_PARAMS_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__331)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8192, 0, __PYX_ERR(0, 8192, __pyx_L1_error));

  /* "cuda/cuda.pyx":8193
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8192
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8194
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8194, 0, __PYX_ERR(0, 8194, __pyx_L1_error));

  /* "cuda/cuda.pyx":8195
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['function : ' + str(self.function)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8196
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['function : ' + str(self.function)]
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8197
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['function : ' + str(self.function)]             # <<<<<<<<<<<<<<
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_function_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_function, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8198
 *             str_list = []
 *             str_list += ['function : ' + str(self.function)]
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]             # <<<<<<<<<<<<<<
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gridDimX_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_gridDimX, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8199
 *             str_list += ['function : ' + str(self.function)]
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]             # <<<<<<<<<<<<<<
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gridDimY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_gridDimY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8200
 *             str_list += ['gridDimX : ' + str(self.gridDimX)]
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]             # <<<<<<<<<<<<<<
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gridDimZ_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_gridDimZ, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8201
 *             str_list += ['gridDimY : ' + str(self.gridDimY)]
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]             # <<<<<<<<<<<<<<
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_blockDimX_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_blockDimX, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8202
 *             str_list += ['gridDimZ : ' + str(self.gridDimZ)]
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]             # <<<<<<<<<<<<<<
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_blockDimY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_blockDimY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8203
 *             str_list += ['blockDimX : ' + str(self.blockDimX)]
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]             # <<<<<<<<<<<<<<
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]
 *             str_list += ['hStream : ' + str(self.hStream)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_blockDimZ_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_blockDimZ, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8204
 *             str_list += ['blockDimY : ' + str(self.blockDimY)]
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]             # <<<<<<<<<<<<<<
 *             str_list += ['hStream : ' + str(self.hStream)]
 *             str_list += ['kernelParams : ' + str(self.kernelParams)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sharedMemBytes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_sharedMemBytes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8205
 *             str_list += ['blockDimZ : ' + str(self.blockDimZ)]
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]
 *             str_list += ['hStream : ' + str(self.hStream)]             # <<<<<<<<<<<<<<
 *             str_list += ['kernelParams : ' + str(self.kernelParams)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hStream_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_hStream, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8206
 *             str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)]
 *             str_list += ['hStream : ' + str(self.hStream)]
 *             str_list += ['kernelParams : ' + str(self.kernelParams)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_kernelParams_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_kernelParams, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8207
 *             str_list += ['hStream : ' + str(self.hStream)]
 *             str_list += ['kernelParams : ' + str(self.kernelParams)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8195
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['function : ' + str(self.function)]
 */
  }

  /* "cuda/cuda.pyx":8209
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8194
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8212
 * 
 *     @property
 *     def function(self):             # <<<<<<<<<<<<<<
 *         return self._function
 *     @function.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8function_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8function_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8function___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8function___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8212, 0, __PYX_ERR(0, 8212, __pyx_L1_error));

  /* "cuda/cuda.pyx":8213
 *     @property
 *     def function(self):
 *         return self._function             # <<<<<<<<<<<<<<
 *     @function.setter
 *     def function(self, function):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_function));
  __pyx_r = ((PyObject *)__pyx_v_self->_function);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8212
 * 
 *     @property
 *     def function(self):             # <<<<<<<<<<<<<<
 *         return self._function
 *     @function.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.function.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8215
 *         return self._function
 *     @function.setter
 *     def function(self, function):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUfunction cfunction
 *         if function is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8function_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_function); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8function_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_function) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8function_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_function));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8function_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_function) {
  CUfunction __pyx_v_cfunction;
  PyObject *__pyx_v_pfunction = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8215, 0, __PYX_ERR(0, 8215, __pyx_L1_error));

  /* "cuda/cuda.pyx":8217
 *     def function(self, function):
 *         cdef ccuda.CUfunction cfunction
 *         if function is None:             # <<<<<<<<<<<<<<
 *             cfunction = <ccuda.CUfunction><void_ptr>0
 *         elif isinstance(function, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_function == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":8218
 *         cdef ccuda.CUfunction cfunction
 *         if function is None:
 *             cfunction = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(function, (CUfunction)):
 *             pfunction = int(function)
 */
    __pyx_v_cfunction = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":8217
 *     def function(self, function):
 *         cdef ccuda.CUfunction cfunction
 *         if function is None:             # <<<<<<<<<<<<<<
 *             cfunction = <ccuda.CUfunction><void_ptr>0
 *         elif isinstance(function, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":8219
 *         if function is None:
 *             cfunction = <ccuda.CUfunction><void_ptr>0
 *         elif isinstance(function, (CUfunction)):             # <<<<<<<<<<<<<<
 *             pfunction = int(function)
 *             cfunction = <ccuda.CUfunction><void_ptr>pfunction
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_function, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8220
 *             cfunction = <ccuda.CUfunction><void_ptr>0
 *         elif isinstance(function, (CUfunction)):
 *             pfunction = int(function)             # <<<<<<<<<<<<<<
 *             cfunction = <ccuda.CUfunction><void_ptr>pfunction
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pfunction = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":8221
 *         elif isinstance(function, (CUfunction)):
 *             pfunction = int(function)
 *             cfunction = <ccuda.CUfunction><void_ptr>pfunction             # <<<<<<<<<<<<<<
 *         else:
 *             pfunction = int(CUfunction(function))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunction); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8221, __pyx_L1_error)
    __pyx_v_cfunction = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":8219
 *         if function is None:
 *             cfunction = <ccuda.CUfunction><void_ptr>0
 *         elif isinstance(function, (CUfunction)):             # <<<<<<<<<<<<<<
 *             pfunction = int(function)
 *             cfunction = <ccuda.CUfunction><void_ptr>pfunction
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":8223
 *             cfunction = <ccuda.CUfunction><void_ptr>pfunction
 *         else:
 *             pfunction = int(CUfunction(function))             # <<<<<<<<<<<<<<
 *             cfunction = <ccuda.CUfunction><void_ptr>pfunction
 *         self._function._ptr[0] = cfunction
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pfunction = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":8224
 *         else:
 *             pfunction = int(CUfunction(function))
 *             cfunction = <ccuda.CUfunction><void_ptr>pfunction             # <<<<<<<<<<<<<<
 *         self._function._ptr[0] = cfunction
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunction); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8224, __pyx_L1_error)
    __pyx_v_cfunction = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":8225
 *             pfunction = int(CUfunction(function))
 *             cfunction = <ccuda.CUfunction><void_ptr>pfunction
 *         self._function._ptr[0] = cfunction             # <<<<<<<<<<<<<<
 *     @property
 *     def gridDimX(self):
 */
  (__pyx_v_self->_function->_ptr[0]) = __pyx_v_cfunction;

  /* "cuda/cuda.pyx":8215
 *         return self._function
 *     @function.setter
 *     def function(self, function):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUfunction cfunction
 *         if function is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.function.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pfunction);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8227
 *         self._function._ptr[0] = cfunction
 *     @property
 *     def gridDimX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimX
 *     @gridDimX.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimX_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimX_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimX___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimX___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8227, 0, __PYX_ERR(0, 8227, __pyx_L1_error));

  /* "cuda/cuda.pyx":8228
 *     @property
 *     def gridDimX(self):
 *         return self._ptr[0].gridDimX             # <<<<<<<<<<<<<<
 *     @gridDimX.setter
 *     def gridDimX(self, unsigned int gridDimX):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).gridDimX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8227
 *         self._function._ptr[0] = cfunction
 *     @property
 *     def gridDimX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimX
 *     @gridDimX.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.gridDimX.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8230
 *         return self._ptr[0].gridDimX
 *     @gridDimX.setter
 *     def gridDimX(self, unsigned int gridDimX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimX = gridDimX
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimX); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimX) {
  unsigned int __pyx_v_gridDimX;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_gridDimX); {
    __pyx_v_gridDimX = __Pyx_PyInt_As_unsigned_int(__pyx_arg_gridDimX); if (unlikely((__pyx_v_gridDimX == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8230, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.gridDimX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimX_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_gridDimX));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimX_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_gridDimX) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8230, 0, __PYX_ERR(0, 8230, __pyx_L1_error));

  /* "cuda/cuda.pyx":8232
 *     def gridDimX(self, unsigned int gridDimX):
 *         pass
 *         self._ptr[0].gridDimX = gridDimX             # <<<<<<<<<<<<<<
 *     @property
 *     def gridDimY(self):
 */
  (__pyx_v_self->_ptr[0]).gridDimX = __pyx_v_gridDimX;

  /* "cuda/cuda.pyx":8230
 *         return self._ptr[0].gridDimX
 *     @gridDimX.setter
 *     def gridDimX(self, unsigned int gridDimX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimX = gridDimX
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.gridDimX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8234
 *         self._ptr[0].gridDimX = gridDimX
 *     @property
 *     def gridDimY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimY
 *     @gridDimY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimY___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8234, 0, __PYX_ERR(0, 8234, __pyx_L1_error));

  /* "cuda/cuda.pyx":8235
 *     @property
 *     def gridDimY(self):
 *         return self._ptr[0].gridDimY             # <<<<<<<<<<<<<<
 *     @gridDimY.setter
 *     def gridDimY(self, unsigned int gridDimY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).gridDimY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8234
 *         self._ptr[0].gridDimX = gridDimX
 *     @property
 *     def gridDimY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimY
 *     @gridDimY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.gridDimY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8237
 *         return self._ptr[0].gridDimY
 *     @gridDimY.setter
 *     def gridDimY(self, unsigned int gridDimY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimY = gridDimY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimY); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimY) {
  unsigned int __pyx_v_gridDimY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_gridDimY); {
    __pyx_v_gridDimY = __Pyx_PyInt_As_unsigned_int(__pyx_arg_gridDimY); if (unlikely((__pyx_v_gridDimY == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8237, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.gridDimY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimY_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_gridDimY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_gridDimY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8237, 0, __PYX_ERR(0, 8237, __pyx_L1_error));

  /* "cuda/cuda.pyx":8239
 *     def gridDimY(self, unsigned int gridDimY):
 *         pass
 *         self._ptr[0].gridDimY = gridDimY             # <<<<<<<<<<<<<<
 *     @property
 *     def gridDimZ(self):
 */
  (__pyx_v_self->_ptr[0]).gridDimY = __pyx_v_gridDimY;

  /* "cuda/cuda.pyx":8237
 *         return self._ptr[0].gridDimY
 *     @gridDimY.setter
 *     def gridDimY(self, unsigned int gridDimY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimY = gridDimY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.gridDimY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8241
 *         self._ptr[0].gridDimY = gridDimY
 *     @property
 *     def gridDimZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimZ
 *     @gridDimZ.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimZ___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8241, 0, __PYX_ERR(0, 8241, __pyx_L1_error));

  /* "cuda/cuda.pyx":8242
 *     @property
 *     def gridDimZ(self):
 *         return self._ptr[0].gridDimZ             # <<<<<<<<<<<<<<
 *     @gridDimZ.setter
 *     def gridDimZ(self, unsigned int gridDimZ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).gridDimZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8241
 *         self._ptr[0].gridDimY = gridDimY
 *     @property
 *     def gridDimZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].gridDimZ
 *     @gridDimZ.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.gridDimZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8244
 *         return self._ptr[0].gridDimZ
 *     @gridDimZ.setter
 *     def gridDimZ(self, unsigned int gridDimZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimZ = gridDimZ
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimZ); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gridDimZ) {
  unsigned int __pyx_v_gridDimZ;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_gridDimZ); {
    __pyx_v_gridDimZ = __Pyx_PyInt_As_unsigned_int(__pyx_arg_gridDimZ); if (unlikely((__pyx_v_gridDimZ == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8244, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.gridDimZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimZ_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_gridDimZ));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_gridDimZ) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8244, 0, __PYX_ERR(0, 8244, __pyx_L1_error));

  /* "cuda/cuda.pyx":8246
 *     def gridDimZ(self, unsigned int gridDimZ):
 *         pass
 *         self._ptr[0].gridDimZ = gridDimZ             # <<<<<<<<<<<<<<
 *     @property
 *     def blockDimX(self):
 */
  (__pyx_v_self->_ptr[0]).gridDimZ = __pyx_v_gridDimZ;

  /* "cuda/cuda.pyx":8244
 *         return self._ptr[0].gridDimZ
 *     @gridDimZ.setter
 *     def gridDimZ(self, unsigned int gridDimZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].gridDimZ = gridDimZ
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.gridDimZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8248
 *         self._ptr[0].gridDimZ = gridDimZ
 *     @property
 *     def blockDimX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimX
 *     @blockDimX.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimX_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimX_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimX___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimX___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8248, 0, __PYX_ERR(0, 8248, __pyx_L1_error));

  /* "cuda/cuda.pyx":8249
 *     @property
 *     def blockDimX(self):
 *         return self._ptr[0].blockDimX             # <<<<<<<<<<<<<<
 *     @blockDimX.setter
 *     def blockDimX(self, unsigned int blockDimX):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).blockDimX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8248
 *         self._ptr[0].gridDimZ = gridDimZ
 *     @property
 *     def blockDimX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimX
 *     @blockDimX.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.blockDimX.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8251
 *         return self._ptr[0].blockDimX
 *     @blockDimX.setter
 *     def blockDimX(self, unsigned int blockDimX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimX = blockDimX
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimX); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimX) {
  unsigned int __pyx_v_blockDimX;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_blockDimX); {
    __pyx_v_blockDimX = __Pyx_PyInt_As_unsigned_int(__pyx_arg_blockDimX); if (unlikely((__pyx_v_blockDimX == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8251, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.blockDimX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimX_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_blockDimX));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimX_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_blockDimX) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8251, 0, __PYX_ERR(0, 8251, __pyx_L1_error));

  /* "cuda/cuda.pyx":8253
 *     def blockDimX(self, unsigned int blockDimX):
 *         pass
 *         self._ptr[0].blockDimX = blockDimX             # <<<<<<<<<<<<<<
 *     @property
 *     def blockDimY(self):
 */
  (__pyx_v_self->_ptr[0]).blockDimX = __pyx_v_blockDimX;

  /* "cuda/cuda.pyx":8251
 *         return self._ptr[0].blockDimX
 *     @blockDimX.setter
 *     def blockDimX(self, unsigned int blockDimX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimX = blockDimX
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.blockDimX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8255
 *         self._ptr[0].blockDimX = blockDimX
 *     @property
 *     def blockDimY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimY
 *     @blockDimY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimY___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimY___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8255, 0, __PYX_ERR(0, 8255, __pyx_L1_error));

  /* "cuda/cuda.pyx":8256
 *     @property
 *     def blockDimY(self):
 *         return self._ptr[0].blockDimY             # <<<<<<<<<<<<<<
 *     @blockDimY.setter
 *     def blockDimY(self, unsigned int blockDimY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).blockDimY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8255
 *         self._ptr[0].blockDimX = blockDimX
 *     @property
 *     def blockDimY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimY
 *     @blockDimY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.blockDimY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8258
 *         return self._ptr[0].blockDimY
 *     @blockDimY.setter
 *     def blockDimY(self, unsigned int blockDimY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimY = blockDimY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimY); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimY) {
  unsigned int __pyx_v_blockDimY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_blockDimY); {
    __pyx_v_blockDimY = __Pyx_PyInt_As_unsigned_int(__pyx_arg_blockDimY); if (unlikely((__pyx_v_blockDimY == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8258, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.blockDimY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimY_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_blockDimY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimY_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_blockDimY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8258, 0, __PYX_ERR(0, 8258, __pyx_L1_error));

  /* "cuda/cuda.pyx":8260
 *     def blockDimY(self, unsigned int blockDimY):
 *         pass
 *         self._ptr[0].blockDimY = blockDimY             # <<<<<<<<<<<<<<
 *     @property
 *     def blockDimZ(self):
 */
  (__pyx_v_self->_ptr[0]).blockDimY = __pyx_v_blockDimY;

  /* "cuda/cuda.pyx":8258
 *         return self._ptr[0].blockDimY
 *     @blockDimY.setter
 *     def blockDimY(self, unsigned int blockDimY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimY = blockDimY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.blockDimY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8262
 *         self._ptr[0].blockDimY = blockDimY
 *     @property
 *     def blockDimZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimZ
 *     @blockDimZ.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimZ___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimZ___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8262, 0, __PYX_ERR(0, 8262, __pyx_L1_error));

  /* "cuda/cuda.pyx":8263
 *     @property
 *     def blockDimZ(self):
 *         return self._ptr[0].blockDimZ             # <<<<<<<<<<<<<<
 *     @blockDimZ.setter
 *     def blockDimZ(self, unsigned int blockDimZ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).blockDimZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8262
 *         self._ptr[0].blockDimY = blockDimY
 *     @property
 *     def blockDimZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].blockDimZ
 *     @blockDimZ.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.blockDimZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8265
 *         return self._ptr[0].blockDimZ
 *     @blockDimZ.setter
 *     def blockDimZ(self, unsigned int blockDimZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimZ = blockDimZ
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimZ); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_blockDimZ) {
  unsigned int __pyx_v_blockDimZ;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_blockDimZ); {
    __pyx_v_blockDimZ = __Pyx_PyInt_As_unsigned_int(__pyx_arg_blockDimZ); if (unlikely((__pyx_v_blockDimZ == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8265, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.blockDimZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimZ_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_blockDimZ));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimZ_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_blockDimZ) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8265, 0, __PYX_ERR(0, 8265, __pyx_L1_error));

  /* "cuda/cuda.pyx":8267
 *     def blockDimZ(self, unsigned int blockDimZ):
 *         pass
 *         self._ptr[0].blockDimZ = blockDimZ             # <<<<<<<<<<<<<<
 *     @property
 *     def sharedMemBytes(self):
 */
  (__pyx_v_self->_ptr[0]).blockDimZ = __pyx_v_blockDimZ;

  /* "cuda/cuda.pyx":8265
 *         return self._ptr[0].blockDimZ
 *     @blockDimZ.setter
 *     def blockDimZ(self, unsigned int blockDimZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].blockDimZ = blockDimZ
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.blockDimZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8269
 *         self._ptr[0].blockDimZ = blockDimZ
 *     @property
 *     def sharedMemBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].sharedMemBytes
 *     @sharedMemBytes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_14sharedMemBytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_14sharedMemBytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_14sharedMemBytes___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_14sharedMemBytes___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8269, 0, __PYX_ERR(0, 8269, __pyx_L1_error));

  /* "cuda/cuda.pyx":8270
 *     @property
 *     def sharedMemBytes(self):
 *         return self._ptr[0].sharedMemBytes             # <<<<<<<<<<<<<<
 *     @sharedMemBytes.setter
 *     def sharedMemBytes(self, unsigned int sharedMemBytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).sharedMemBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8269
 *         self._ptr[0].blockDimZ = blockDimZ
 *     @property
 *     def sharedMemBytes(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].sharedMemBytes
 *     @sharedMemBytes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.sharedMemBytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8272
 *         return self._ptr[0].sharedMemBytes
 *     @sharedMemBytes.setter
 *     def sharedMemBytes(self, unsigned int sharedMemBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].sharedMemBytes = sharedMemBytes
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_14sharedMemBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_sharedMemBytes); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_14sharedMemBytes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_sharedMemBytes) {
  unsigned int __pyx_v_sharedMemBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_sharedMemBytes); {
    __pyx_v_sharedMemBytes = __Pyx_PyInt_As_unsigned_int(__pyx_arg_sharedMemBytes); if (unlikely((__pyx_v_sharedMemBytes == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8272, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.sharedMemBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_14sharedMemBytes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_sharedMemBytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_14sharedMemBytes_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_sharedMemBytes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8272, 0, __PYX_ERR(0, 8272, __pyx_L1_error));

  /* "cuda/cuda.pyx":8274
 *     def sharedMemBytes(self, unsigned int sharedMemBytes):
 *         pass
 *         self._ptr[0].sharedMemBytes = sharedMemBytes             # <<<<<<<<<<<<<<
 *     @property
 *     def hStream(self):
 */
  (__pyx_v_self->_ptr[0]).sharedMemBytes = __pyx_v_sharedMemBytes;

  /* "cuda/cuda.pyx":8272
 *         return self._ptr[0].sharedMemBytes
 *     @sharedMemBytes.setter
 *     def sharedMemBytes(self, unsigned int sharedMemBytes):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].sharedMemBytes = sharedMemBytes
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.sharedMemBytes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8276
 *         self._ptr[0].sharedMemBytes = sharedMemBytes
 *     @property
 *     def hStream(self):             # <<<<<<<<<<<<<<
 *         return self._hStream
 *     @hStream.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7hStream_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7hStream_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7hStream___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7hStream___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8276, 0, __PYX_ERR(0, 8276, __pyx_L1_error));

  /* "cuda/cuda.pyx":8277
 *     @property
 *     def hStream(self):
 *         return self._hStream             # <<<<<<<<<<<<<<
 *     @hStream.setter
 *     def hStream(self, hStream):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_hStream));
  __pyx_r = ((PyObject *)__pyx_v_self->_hStream);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8276
 *         self._ptr[0].sharedMemBytes = sharedMemBytes
 *     @property
 *     def hStream(self):             # <<<<<<<<<<<<<<
 *         return self._hStream
 *     @hStream.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.hStream.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8279
 *         return self._hStream
 *     @hStream.setter
 *     def hStream(self, hStream):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUstream chStream
 *         if hStream is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7hStream_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_hStream); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7hStream_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_hStream) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7hStream_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_hStream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7hStream_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8279, 0, __PYX_ERR(0, 8279, __pyx_L1_error));

  /* "cuda/cuda.pyx":8281
 *     def hStream(self, hStream):
 *         cdef ccuda.CUstream chStream
 *         if hStream is None:             # <<<<<<<<<<<<<<
 *             chStream = <ccuda.CUstream><void_ptr>0
 *         elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":8282
 *         cdef ccuda.CUstream chStream
 *         if hStream is None:
 *             chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(hStream, (CUstream)):
 *             phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":8281
 *     def hStream(self, hStream):
 *         cdef ccuda.CUstream chStream
 *         if hStream is None:             # <<<<<<<<<<<<<<
 *             chStream = <ccuda.CUstream><void_ptr>0
 *         elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":8283
 *         if hStream is None:
 *             chStream = <ccuda.CUstream><void_ptr>0
 *         elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *             phStream = int(hStream)
 *             chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8284
 *             chStream = <ccuda.CUstream><void_ptr>0
 *         elif isinstance(hStream, (CUstream)):
 *             phStream = int(hStream)             # <<<<<<<<<<<<<<
 *             chStream = <ccuda.CUstream><void_ptr>phStream
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":8285
 *         elif isinstance(hStream, (CUstream)):
 *             phStream = int(hStream)
 *             chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *         else:
 *             phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8285, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":8283
 *         if hStream is None:
 *             chStream = <ccuda.CUstream><void_ptr>0
 *         elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *             phStream = int(hStream)
 *             chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":8287
 *             chStream = <ccuda.CUstream><void_ptr>phStream
 *         else:
 *             phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *             chStream = <ccuda.CUstream><void_ptr>phStream
 *         self._hStream._ptr[0] = chStream
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":8288
 *         else:
 *             phStream = int(CUstream(hStream))
 *             chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *         self._hStream._ptr[0] = chStream
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8288, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":8289
 *             phStream = int(CUstream(hStream))
 *             chStream = <ccuda.CUstream><void_ptr>phStream
 *         self._hStream._ptr[0] = chStream             # <<<<<<<<<<<<<<
 *     @property
 *     def kernelParams(self):
 */
  (__pyx_v_self->_hStream->_ptr[0]) = __pyx_v_chStream;

  /* "cuda/cuda.pyx":8279
 *         return self._hStream
 *     @hStream.setter
 *     def hStream(self, hStream):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUstream chStream
 *         if hStream is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.hStream.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8291
 *         self._hStream._ptr[0] = chStream
 *     @property
 *     def kernelParams(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].kernelParams
 *     @kernelParams.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12kernelParams_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12kernelParams_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12kernelParams___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12kernelParams___get__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8291, 0, __PYX_ERR(0, 8291, __pyx_L1_error));

  /* "cuda/cuda.pyx":8292
 *     @property
 *     def kernelParams(self):
 *         return <void_ptr>self._ptr[0].kernelParams             # <<<<<<<<<<<<<<
 *     @kernelParams.setter
 *     def kernelParams(self, kernelParams):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).kernelParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8291
 *         self._hStream._ptr[0] = chStream
 *     @property
 *     def kernelParams(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].kernelParams
 *     @kernelParams.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.kernelParams.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8294
 *         return <void_ptr>self._ptr[0].kernelParams
 *     @kernelParams.setter
 *     def kernelParams(self, kernelParams):             # <<<<<<<<<<<<<<
 *         self._ckernelParams = utils.HelperKernelParams(kernelParams)
 *         self._ptr[0].kernelParams = <void**><void_ptr>self._ckernelParams.ckernelParams
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12kernelParams_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_kernelParams); /*proto*/
static int __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12kernelParams_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_kernelParams) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12kernelParams_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_kernelParams));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12kernelParams_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_kernelParams) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8294, 0, __PYX_ERR(0, 8294, __pyx_L1_error));

  /* "cuda/cuda.pyx":8295
 *     @kernelParams.setter
 *     def kernelParams(self, kernelParams):
 *         self._ckernelParams = utils.HelperKernelParams(kernelParams)             # <<<<<<<<<<<<<<
 *         self._ptr[0].kernelParams = <void**><void_ptr>self._ckernelParams.ckernelParams
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperKernelParams), __pyx_v_kernelParams); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_ckernelParams);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_ckernelParams));
  __pyx_v_self->_ckernelParams = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperKernelParams *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8296
 *     def kernelParams(self, kernelParams):
 *         self._ckernelParams = utils.HelperKernelParams(kernelParams)
 *         self._ptr[0].kernelParams = <void**><void_ptr>self._ckernelParams.ckernelParams             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_ckernelParams), __pyx_n_s_ckernelParams); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).kernelParams = ((void **)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":8294
 *         return <void_ptr>self._ptr[0].kernelParams
 *     @kernelParams.setter
 *     def kernelParams(self, kernelParams):             # <<<<<<<<<<<<<<
 *         self._ckernelParams = utils.HelperKernelParams(kernelParams)
 *         self._ptr[0].kernelParams = <void**><void_ptr>self._ckernelParams.ckernelParams
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.kernelParams.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_10__reduce_cython__[] = "CUDA_LAUNCH_PARAMS_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__332)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__333, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12__setstate_cython__[] = "CUDA_LAUNCH_PARAMS_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__334)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__335, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_LAUNCH_PARAMS_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8314
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8314, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8314, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8314, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8314, 0, __PYX_ERR(0, 8314, __pyx_L1_error));

  /* "cuda/cuda.pyx":8315
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":8314
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8316
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8316, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8316, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8316, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8316, 0, __PYX_ERR(0, 8316, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8318
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4getPtr[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__336)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8318, 0, __PYX_ERR(0, 8318, __pyx_L1_error));

  /* "cuda/cuda.pyx":8319
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8318
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8320
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8320, 0, __PYX_ERR(0, 8320, __pyx_L1_error));

  /* "cuda/cuda.pyx":8321
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['handle : ' + hex(self.handle)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8322
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['handle : ' + hex(self.handle)]
 *             str_list += ['name : ' + hex(self.name)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8323
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['handle : ' + hex(self.handle)]             # <<<<<<<<<<<<<<
 *             str_list += ['name : ' + hex(self.name)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_handle, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8324
 *             str_list = []
 *             str_list += ['handle : ' + hex(self.handle)]
 *             str_list += ['name : ' + hex(self.name)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_name, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8325
 *             str_list += ['handle : ' + hex(self.handle)]
 *             str_list += ['name : ' + hex(self.name)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8321
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['handle : ' + hex(self.handle)]
 */
  }

  /* "cuda/cuda.pyx":8327
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8320
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8330
 * 
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].handle.win32.handle
 *     @handle.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6handle_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6handle___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6handle___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8330, 0, __PYX_ERR(0, 8330, __pyx_L1_error));

  /* "cuda/cuda.pyx":8331
 *     @property
 *     def handle(self):
 *         return <void_ptr>self._ptr[0].handle.win32.handle             # <<<<<<<<<<<<<<
 *     @handle.setter
 *     def handle(self, handle):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).handle.win32.handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8330
 * 
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].handle.win32.handle
 *     @handle.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8333
 *         return <void_ptr>self._ptr[0].handle.win32.handle
 *     @handle.setter
 *     def handle(self, handle):             # <<<<<<<<<<<<<<
 *         _chandle = utils.HelperInputVoidPtr(handle)
 *         self._ptr[0].handle.win32.handle = <void*><void_ptr>_chandle.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6handle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_handle); /*proto*/
static int __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6handle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_handle) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6handle_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self), ((PyObject *)__pyx_v_handle));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6handle_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, PyObject *__pyx_v_handle) {
  PyObject *__pyx_v__chandle = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8333, 0, __PYX_ERR(0, 8333, __pyx_L1_error));

  /* "cuda/cuda.pyx":8334
 *     @handle.setter
 *     def handle(self, handle):
 *         _chandle = utils.HelperInputVoidPtr(handle)             # <<<<<<<<<<<<<<
 *         self._ptr[0].handle.win32.handle = <void*><void_ptr>_chandle.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__chandle = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8335
 *     def handle(self, handle):
 *         _chandle = utils.HelperInputVoidPtr(handle)
 *         self._ptr[0].handle.win32.handle = <void*><void_ptr>_chandle.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def name(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__chandle, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).handle.win32.handle = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":8333
 *         return <void_ptr>self._ptr[0].handle.win32.handle
 *     @handle.setter
 *     def handle(self, handle):             # <<<<<<<<<<<<<<
 *         _chandle = utils.HelperInputVoidPtr(handle)
 *         self._ptr[0].handle.win32.handle = <void*><void_ptr>_chandle.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.handle.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__chandle);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8337
 *         self._ptr[0].handle.win32.handle = <void*><void_ptr>_chandle.cptr
 *     @property
 *     def name(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].handle.win32.name
 *     @name.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4name___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4name___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8337, 0, __PYX_ERR(0, 8337, __pyx_L1_error));

  /* "cuda/cuda.pyx":8338
 *     @property
 *     def name(self):
 *         return <void_ptr>self._ptr[0].handle.win32.name             # <<<<<<<<<<<<<<
 *     @name.setter
 *     def name(self, name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).handle.win32.name)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8337
 *         self._ptr[0].handle.win32.handle = <void*><void_ptr>_chandle.cptr
 *     @property
 *     def name(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].handle.win32.name
 *     @name.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8340
 *         return <void_ptr>self._ptr[0].handle.win32.name
 *     @name.setter
 *     def name(self, name):             # <<<<<<<<<<<<<<
 *         _cname = utils.HelperInputVoidPtr(name)
 *         self._ptr[0].handle.win32.name = <void*><void_ptr>_cname.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static int __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4name_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4name_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v__cname = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8340, 0, __PYX_ERR(0, 8340, __pyx_L1_error));

  /* "cuda/cuda.pyx":8341
 *     @name.setter
 *     def name(self, name):
 *         _cname = utils.HelperInputVoidPtr(name)             # <<<<<<<<<<<<<<
 *         self._ptr[0].handle.win32.name = <void*><void_ptr>_cname.cptr
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8342
 *     def name(self, name):
 *         _cname = utils.HelperInputVoidPtr(name)
 *         self._ptr[0].handle.win32.name = <void*><void_ptr>_cname.cptr             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cname, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8342, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).handle.win32.name = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":8340
 *         return <void_ptr>self._ptr[0].handle.win32.name
 *     @name.setter
 *     def name(self, name):             # <<<<<<<<<<<<<<
 *         _cname = utils.HelperInputVoidPtr(name)
 *         self._ptr[0].handle.win32.name = <void*><void_ptr>_cname.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cname);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_8__reduce_cython__[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__337)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__338, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_10__setstate_cython__[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__339)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__340, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8362
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8362, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8362, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8362, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8362, 0, __PYX_ERR(0, 8362, __pyx_L1_error));

  /* "cuda/cuda.pyx":8363
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._win32 = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 */
  __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":8362
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8364
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._win32 = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8364, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8364, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8364, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8364, 0, __PYX_ERR(0, 8364, __pyx_L1_error));

  /* "cuda/cuda.pyx":8365
 *         self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._win32 = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 8365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_win32);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_win32));
  __pyx_v_self->_win32 = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8364
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._win32 = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8366
 *     def __init__(self, void_ptr _ptr):
 *         self._win32 = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_4getPtr[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__341)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8366, 0, __PYX_ERR(0, 8366, __pyx_L1_error));

  /* "cuda/cuda.pyx":8367
 *         self._win32 = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8366
 *     def __init__(self, void_ptr _ptr):
 *         self._win32 = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8368
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr24__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8368, 0, __PYX_ERR(0, 8368, __pyx_L1_error));

  /* "cuda/cuda.pyx":8369
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fd : ' + str(self.fd)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8370
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['fd : ' + str(self.fd)]
 *             str_list += ['win32 :\n' + '\n'.join(['    ' + line for line in str(self.win32).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8371
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['fd : ' + str(self.fd)]             # <<<<<<<<<<<<<<
 *             str_list += ['win32 :\n' + '\n'.join(['    ' + line for line in str(self.win32).splitlines()])]
 *             str_list += ['nvSciBufObject : ' + hex(self.nvSciBufObject)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fd_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_fd, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8372
 *             str_list = []
 *             str_list += ['fd : ' + str(self.fd)]
 *             str_list += ['win32 :\n' + '\n'.join(['    ' + line for line in str(self.win32).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['nvSciBufObject : ' + hex(self.nvSciBufObject)]
 *             return '\n'.join(str_list)
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8372, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_win32_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8372, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8372, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8372, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 8372, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8372, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr24__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr24__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8372, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 8372, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_line); __pyx_9genexpr24__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_line); __pyx_9genexpr24__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_win32, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8373
 *             str_list += ['fd : ' + str(self.fd)]
 *             str_list += ['win32 :\n' + '\n'.join(['    ' + line for line in str(self.win32).splitlines()])]
 *             str_list += ['nvSciBufObject : ' + hex(self.nvSciBufObject)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nvSciBufObject_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_nvSciBufObject, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8374
 *             str_list += ['win32 :\n' + '\n'.join(['    ' + line for line in str(self.win32).splitlines()])]
 *             str_list += ['nvSciBufObject : ' + hex(self.nvSciBufObject)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8369
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fd : ' + str(self.fd)]
 */
  }

  /* "cuda/cuda.pyx":8376
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8368
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8379
 * 
 *     @property
 *     def fd(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].handle.fd
 *     @fd.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2fd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2fd_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2fd___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2fd___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8379, 0, __PYX_ERR(0, 8379, __pyx_L1_error));

  /* "cuda/cuda.pyx":8380
 *     @property
 *     def fd(self):
 *         return self._ptr[0].handle.fd             # <<<<<<<<<<<<<<
 *     @fd.setter
 *     def fd(self, int fd):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).handle.fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8379
 * 
 *     @property
 *     def fd(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].handle.fd
 *     @fd.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.fd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8382
 *         return self._ptr[0].handle.fd
 *     @fd.setter
 *     def fd(self, int fd):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].handle.fd = fd
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd); /*proto*/
static int __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd) {
  int __pyx_v_fd;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_fd); {
    __pyx_v_fd = __Pyx_PyInt_As_int(__pyx_arg_fd); if (unlikely((__pyx_v_fd == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8382, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.fd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2fd_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_self), ((int)__pyx_v_fd));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2fd_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self, int __pyx_v_fd) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8382, 0, __PYX_ERR(0, 8382, __pyx_L1_error));

  /* "cuda/cuda.pyx":8384
 *     def fd(self, int fd):
 *         pass
 *         self._ptr[0].handle.fd = fd             # <<<<<<<<<<<<<<
 *     @property
 *     def win32(self):
 */
  (__pyx_v_self->_ptr[0]).handle.fd = __pyx_v_fd;

  /* "cuda/cuda.pyx":8382
 *         return self._ptr[0].handle.fd
 *     @fd.setter
 *     def fd(self, int fd):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].handle.fd = fd
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.fd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8386
 *         self._ptr[0].handle.fd = fd
 *     @property
 *     def win32(self):             # <<<<<<<<<<<<<<
 *         return self._win32
 *     @win32.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5win32_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5win32_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5win32___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5win32___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8386, 0, __PYX_ERR(0, 8386, __pyx_L1_error));

  /* "cuda/cuda.pyx":8387
 *     @property
 *     def win32(self):
 *         return self._win32             # <<<<<<<<<<<<<<
 *     @win32.setter
 *     def win32(self, win32 not None : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_win32));
  __pyx_r = ((PyObject *)__pyx_v_self->_win32);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8386
 *         self._ptr[0].handle.fd = fd
 *     @property
 *     def win32(self):             # <<<<<<<<<<<<<<
 *         return self._win32
 *     @win32.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.win32.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8389
 *         return self._win32
 *     @win32.setter
 *     def win32(self, win32 not None : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(win32):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5win32_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_win32); /*proto*/
static int __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5win32_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_win32) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_win32), __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s, 0, "win32", 0))) __PYX_ERR(0, 8389, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5win32_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_win32));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5win32_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_win32) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8389, 0, __PYX_ERR(0, 8389, __pyx_L1_error));

  /* "cuda/cuda.pyx":8391
 *     def win32(self, win32 not None : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s):
 *         pass
 *         for _attr in dir(win32):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_win32)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8391, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8391, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8391, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8391, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8391, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 8391, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":8392
 *         pass
 *         for _attr in dir(win32):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8392, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":8393
 *         for _attr in dir(win32):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._win32, _attr, getattr(win32, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":8392
 *         pass
 *         for _attr in dir(win32):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":8394
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._win32, _attr, getattr(win32, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8394, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":8395
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._win32, _attr, getattr(win32, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def nvSciBufObject(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_win32);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_win32), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 8395, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":8394
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._win32, _attr, getattr(win32, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":8391
 *     def win32(self, win32 not None : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s):
 *         pass
 *         for _attr in dir(win32):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8389
 *         return self._win32
 *     @win32.setter
 *     def win32(self, win32 not None : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(win32):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.win32.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8397
 *                 setattr(self._win32, _attr, getattr(win32, _attr))
 *     @property
 *     def nvSciBufObject(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].handle.nvSciBufObject
 *     @nvSciBufObject.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_14nvSciBufObject_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_14nvSciBufObject_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_14nvSciBufObject___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_14nvSciBufObject___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8397, 0, __PYX_ERR(0, 8397, __pyx_L1_error));

  /* "cuda/cuda.pyx":8398
 *     @property
 *     def nvSciBufObject(self):
 *         return <void_ptr>self._ptr[0].handle.nvSciBufObject             # <<<<<<<<<<<<<<
 *     @nvSciBufObject.setter
 *     def nvSciBufObject(self, nvSciBufObject):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).handle.nvSciBufObject)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8397
 *                 setattr(self._win32, _attr, getattr(win32, _attr))
 *     @property
 *     def nvSciBufObject(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].handle.nvSciBufObject
 *     @nvSciBufObject.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.nvSciBufObject.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8400
 *         return <void_ptr>self._ptr[0].handle.nvSciBufObject
 *     @nvSciBufObject.setter
 *     def nvSciBufObject(self, nvSciBufObject):             # <<<<<<<<<<<<<<
 *         _cnvSciBufObject = utils.HelperInputVoidPtr(nvSciBufObject)
 *         self._ptr[0].handle.nvSciBufObject = <void*><void_ptr>_cnvSciBufObject.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_14nvSciBufObject_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_nvSciBufObject); /*proto*/
static int __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_14nvSciBufObject_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_nvSciBufObject) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_14nvSciBufObject_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_self), ((PyObject *)__pyx_v_nvSciBufObject));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_14nvSciBufObject_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self, PyObject *__pyx_v_nvSciBufObject) {
  PyObject *__pyx_v__cnvSciBufObject = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8400, 0, __PYX_ERR(0, 8400, __pyx_L1_error));

  /* "cuda/cuda.pyx":8401
 *     @nvSciBufObject.setter
 *     def nvSciBufObject(self, nvSciBufObject):
 *         _cnvSciBufObject = utils.HelperInputVoidPtr(nvSciBufObject)             # <<<<<<<<<<<<<<
 *         self._ptr[0].handle.nvSciBufObject = <void*><void_ptr>_cnvSciBufObject.cptr
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_nvSciBufObject); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cnvSciBufObject = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8402
 *     def nvSciBufObject(self, nvSciBufObject):
 *         _cnvSciBufObject = utils.HelperInputVoidPtr(nvSciBufObject)
 *         self._ptr[0].handle.nvSciBufObject = <void*><void_ptr>_cnvSciBufObject.cptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cnvSciBufObject, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).handle.nvSciBufObject = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":8400
 *         return <void_ptr>self._ptr[0].handle.nvSciBufObject
 *     @nvSciBufObject.setter
 *     def nvSciBufObject(self, nvSciBufObject):             # <<<<<<<<<<<<<<
 *         _cnvSciBufObject = utils.HelperInputVoidPtr(nvSciBufObject)
 *         self._ptr[0].handle.nvSciBufObject = <void*><void_ptr>_cnvSciBufObject.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.nvSciBufObject.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cnvSciBufObject);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_8__reduce_cython__[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__342)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__343, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_10__setstate_cython__[] = "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__344)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__345, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8427
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8427, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8427, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8427, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8427, 0, __PYX_ERR(0, 8427, __pyx_L1_error));

  /* "cuda/cuda.pyx":8428
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8429
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":8428
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":8431
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._handle = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u(_ptr=<void_ptr>self._ptr)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":8427
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8432
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._handle = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8432, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8432, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8432, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8432, 0, __PYX_ERR(0, 8432, __pyx_L1_error));

  /* "cuda/cuda.pyx":8433
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._handle = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 8433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_handle);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_handle));
  __pyx_v_self->_handle = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8432
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._handle = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8434
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._handle = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 8434, 0, __PYX_ERR(0, 8434, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":8436
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6getPtr[] = "CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__346)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8436, 0, __PYX_ERR(0, 8436, __pyx_L1_error));

  /* "cuda/cuda.pyx":8437
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8436
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8438
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr25__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8438, 0, __PYX_ERR(0, 8438, __pyx_L1_error));

  /* "cuda/cuda.pyx":8439
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8440
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['handle :\n' + '\n'.join(['    ' + line for line in str(self.handle).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8441
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]             # <<<<<<<<<<<<<<
 *             str_list += ['handle :\n' + '\n'.join(['    ' + line for line in str(self.handle).splitlines()])]
 *             str_list += ['size : ' + str(self.size)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_type, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8442
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['handle :\n' + '\n'.join(['    ' + line for line in str(self.handle).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['size : ' + str(self.size)]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8442, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8442, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8442, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8442, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 8442, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8442, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr25__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr25__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8442, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 8442, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_line); __pyx_9genexpr25__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_line); __pyx_9genexpr25__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_handle_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8443
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['handle :\n' + '\n'.join(['    ' + line for line in str(self.handle).splitlines()])]
 *             str_list += ['size : ' + str(self.size)]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_size, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8444
 *             str_list += ['handle :\n' + '\n'.join(['    ' + line for line in str(self.handle).splitlines()])]
 *             str_list += ['size : ' + str(self.size)]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8445
 *             str_list += ['size : ' + str(self.size)]
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8446
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8439
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 */
  }

  /* "cuda/cuda.pyx":8448
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8438
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8451
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return CUexternalMemoryHandleType(self._ptr[0].type)
 *     @type.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4type___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4type___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8451, 0, __PYX_ERR(0, 8451, __pyx_L1_error));

  /* "cuda/cuda.pyx":8452
 *     @property
 *     def type(self):
 *         return CUexternalMemoryHandleType(self._ptr[0].type)             # <<<<<<<<<<<<<<
 *     @type.setter
 *     def type(self, type not None : CUexternalMemoryHandleType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUexternalMemoryHandleType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUexternalMemoryHandleType_enum((__pyx_v_self->_ptr[0]).type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8451
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return CUexternalMemoryHandleType(self._ptr[0].type)
 *     @type.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8454
 *         return CUexternalMemoryHandleType(self._ptr[0].type)
 *     @type.setter
 *     def type(self, type not None : CUexternalMemoryHandleType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].type = type.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_type); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "type"); __PYX_ERR(0, 8454, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4type_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_type));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4type_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, PyObject *__pyx_v_type) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUexternalMemoryHandleType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8454, 0, __PYX_ERR(0, 8454, __pyx_L1_error));

  /* "cuda/cuda.pyx":8456
 *     def type(self, type not None : CUexternalMemoryHandleType):
 *         pass
 *         self._ptr[0].type = type.value             # <<<<<<<<<<<<<<
 *     @property
 *     def handle(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUexternalMemoryHandleType_enum)__Pyx_PyInt_As_enum__CUexternalMemoryHandleType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 8456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).type = __pyx_t_2;

  /* "cuda/cuda.pyx":8454
 *         return CUexternalMemoryHandleType(self._ptr[0].type)
 *     @type.setter
 *     def type(self, type not None : CUexternalMemoryHandleType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].type = type.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8458
 *         self._ptr[0].type = type.value
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         return self._handle
 *     @handle.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6handle_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6handle___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6handle___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8458, 0, __PYX_ERR(0, 8458, __pyx_L1_error));

  /* "cuda/cuda.pyx":8459
 *     @property
 *     def handle(self):
 *         return self._handle             # <<<<<<<<<<<<<<
 *     @handle.setter
 *     def handle(self, handle not None : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_handle));
  __pyx_r = ((PyObject *)__pyx_v_self->_handle);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8458
 *         self._ptr[0].type = type.value
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         return self._handle
 *     @handle.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8461
 *         return self._handle
 *     @handle.setter
 *     def handle(self, handle not None : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(handle):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6handle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_handle); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6handle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_handle) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handle), __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u, 0, "handle", 0))) __PYX_ERR(0, 8461, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6handle_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)__pyx_v_handle));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6handle_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *__pyx_v_handle) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8461, 0, __PYX_ERR(0, 8461, __pyx_L1_error));

  /* "cuda/cuda.pyx":8463
 *     def handle(self, handle not None : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u):
 *         pass
 *         for _attr in dir(handle):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8463, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8463, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8463, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8463, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8463, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 8463, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":8464
 *         pass
 *         for _attr in dir(handle):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8464, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":8465
 *         for _attr in dir(handle):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._handle, _attr, getattr(handle, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":8464
 *         pass
 *         for _attr in dir(handle):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":8466
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._handle, _attr, getattr(handle, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8466, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":8467
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._handle, _attr, getattr(handle, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def size(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_handle);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_handle), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8467, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 8467, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":8466
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._handle, _attr, getattr(handle, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":8463
 *     def handle(self, handle not None : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u):
 *         pass
 *         for _attr in dir(handle):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8461
 *         return self._handle
 *     @handle.setter
 *     def handle(self, handle not None : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(handle):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8469
 *                 setattr(self._handle, _attr, getattr(handle, _attr))
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].size
 *     @size.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4size___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4size___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8469, 0, __PYX_ERR(0, 8469, __pyx_L1_error));

  /* "cuda/cuda.pyx":8470
 *     @property
 *     def size(self):
 *         return self._ptr[0].size             # <<<<<<<<<<<<<<
 *     @size.setter
 *     def size(self, unsigned long long size):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8469
 *                 setattr(self._handle, _attr, getattr(handle, _attr))
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].size
 *     @size.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8472
 *         return self._ptr[0].size
 *     @size.setter
 *     def size(self, unsigned long long size):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].size = size
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_size); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_size) {
  unsigned PY_LONG_LONG __pyx_v_size;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_size); {
    __pyx_v_size = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_size); if (unlikely((__pyx_v_size == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8472, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4size_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_size));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4size_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_size) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8472, 0, __PYX_ERR(0, 8472, __pyx_L1_error));

  /* "cuda/cuda.pyx":8474
 *     def size(self, unsigned long long size):
 *         pass
 *         self._ptr[0].size = size             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
  (__pyx_v_self->_ptr[0]).size = __pyx_v_size;

  /* "cuda/cuda.pyx":8472
 *         return self._ptr[0].size
 *     @size.setter
 *     def size(self, unsigned long long size):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].size = size
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8476
 *         self._ptr[0].size = size
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8476, 0, __PYX_ERR(0, 8476, __pyx_L1_error));

  /* "cuda/cuda.pyx":8477
 *     @property
 *     def flags(self):
 *         return self._ptr[0].flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8476
 *         self._ptr[0].size = size
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8479
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8479, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8479, 0, __PYX_ERR(0, 8479, __pyx_L1_error));

  /* "cuda/cuda.pyx":8481
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].flags = flags             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  (__pyx_v_self->_ptr[0]).flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":8479
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8483
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8483, 0, __PYX_ERR(0, 8483, __pyx_L1_error));

  /* "cuda/cuda.pyx":8484
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_unsigned_int((__pyx_v_self->_ptr[0]).reserved, 16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8483
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8486
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1[16];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8486, 0, __PYX_ERR(0, 8486, __pyx_L1_error));

  /* "cuda/cuda.pyx":8488
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:
 */
  if (unlikely(__Pyx_carray_from_py_unsigned_int(__pyx_v_reserved, __pyx_t_1, 16) < 0)) __PYX_ERR(0, 8488, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).reserved[0]) * (16));

  /* "cuda/cuda.pyx":8486
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_10__reduce_cython__[] = "CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__347)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__348, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_12__setstate_cython__[] = "CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__349)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__350, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8511
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8511, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8511, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8511, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8511, 0, __PYX_ERR(0, 8511, __pyx_L1_error));

  /* "cuda/cuda.pyx":8512
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8513
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":8512
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":8515
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":8511
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8516
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8516, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8516, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8516, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8516, 0, __PYX_ERR(0, 8516, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8518
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 8518, 0, __PYX_ERR(0, 8518, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":8520
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6getPtr[] = "CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__351)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8520, 0, __PYX_ERR(0, 8520, __pyx_L1_error));

  /* "cuda/cuda.pyx":8521
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8520
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8522
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8522, 0, __PYX_ERR(0, 8522, __pyx_L1_error));

  /* "cuda/cuda.pyx":8523
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['offset : ' + str(self.offset)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8524
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['offset : ' + str(self.offset)]
 *             str_list += ['size : ' + str(self.size)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8525
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['offset : ' + str(self.offset)]             # <<<<<<<<<<<<<<
 *             str_list += ['size : ' + str(self.size)]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_offset, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8526
 *             str_list = []
 *             str_list += ['offset : ' + str(self.offset)]
 *             str_list += ['size : ' + str(self.size)]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_size, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8527
 *             str_list += ['offset : ' + str(self.offset)]
 *             str_list += ['size : ' + str(self.size)]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8528
 *             str_list += ['size : ' + str(self.size)]
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8529
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8523
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['offset : ' + str(self.offset)]
 */
  }

  /* "cuda/cuda.pyx":8531
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8522
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8534
 * 
 *     @property
 *     def offset(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].offset
 *     @offset.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6offset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6offset___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6offset___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8534, 0, __PYX_ERR(0, 8534, __pyx_L1_error));

  /* "cuda/cuda.pyx":8535
 *     @property
 *     def offset(self):
 *         return self._ptr[0].offset             # <<<<<<<<<<<<<<
 *     @offset.setter
 *     def offset(self, unsigned long long offset):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8534
 * 
 *     @property
 *     def offset(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].offset
 *     @offset.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8537
 *         return self._ptr[0].offset
 *     @offset.setter
 *     def offset(self, unsigned long long offset):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].offset = offset
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offset); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offset) {
  unsigned PY_LONG_LONG __pyx_v_offset;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_offset); {
    __pyx_v_offset = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_offset); if (unlikely((__pyx_v_offset == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8537, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6offset_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_offset));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6offset_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_offset) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8537, 0, __PYX_ERR(0, 8537, __pyx_L1_error));

  /* "cuda/cuda.pyx":8539
 *     def offset(self, unsigned long long offset):
 *         pass
 *         self._ptr[0].offset = offset             # <<<<<<<<<<<<<<
 *     @property
 *     def size(self):
 */
  (__pyx_v_self->_ptr[0]).offset = __pyx_v_offset;

  /* "cuda/cuda.pyx":8537
 *         return self._ptr[0].offset
 *     @offset.setter
 *     def offset(self, unsigned long long offset):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].offset = offset
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8541
 *         self._ptr[0].offset = offset
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].size
 *     @size.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4size___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4size___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8541, 0, __PYX_ERR(0, 8541, __pyx_L1_error));

  /* "cuda/cuda.pyx":8542
 *     @property
 *     def size(self):
 *         return self._ptr[0].size             # <<<<<<<<<<<<<<
 *     @size.setter
 *     def size(self, unsigned long long size):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8541
 *         self._ptr[0].offset = offset
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].size
 *     @size.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8544
 *         return self._ptr[0].size
 *     @size.setter
 *     def size(self, unsigned long long size):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].size = size
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_size); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_size) {
  unsigned PY_LONG_LONG __pyx_v_size;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_size); {
    __pyx_v_size = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_size); if (unlikely((__pyx_v_size == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8544, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4size_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_size));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4size_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_size) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8544, 0, __PYX_ERR(0, 8544, __pyx_L1_error));

  /* "cuda/cuda.pyx":8546
 *     def size(self, unsigned long long size):
 *         pass
 *         self._ptr[0].size = size             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
  (__pyx_v_self->_ptr[0]).size = __pyx_v_size;

  /* "cuda/cuda.pyx":8544
 *         return self._ptr[0].size
 *     @size.setter
 *     def size(self, unsigned long long size):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].size = size
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8548
 *         self._ptr[0].size = size
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8548, 0, __PYX_ERR(0, 8548, __pyx_L1_error));

  /* "cuda/cuda.pyx":8549
 *     @property
 *     def flags(self):
 *         return self._ptr[0].flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8548
 *         self._ptr[0].size = size
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8551
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8551, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8551, 0, __PYX_ERR(0, 8551, __pyx_L1_error));

  /* "cuda/cuda.pyx":8553
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].flags = flags             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  (__pyx_v_self->_ptr[0]).flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":8551
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8555
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8555, 0, __PYX_ERR(0, 8555, __pyx_L1_error));

  /* "cuda/cuda.pyx":8556
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_unsigned_int((__pyx_v_self->_ptr[0]).reserved, 16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8555
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8558
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1[16];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8558, 0, __PYX_ERR(0, 8558, __pyx_L1_error));

  /* "cuda/cuda.pyx":8560
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:
 */
  if (unlikely(__Pyx_carray_from_py_unsigned_int(__pyx_v_reserved, __pyx_t_1, 16) < 0)) __PYX_ERR(0, 8560, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).reserved[0]) * (16));

  /* "cuda/cuda.pyx":8558
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_10__reduce_cython__[] = "CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__352)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__353, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_12__setstate_cython__[] = "CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__354)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__355, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8584
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8584, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8584, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8584, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8584, 0, __PYX_ERR(0, 8584, __pyx_L1_error));

  /* "cuda/cuda.pyx":8585
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8586
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":8585
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":8588
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._arrayDesc = CUDA_ARRAY3D_DESCRIPTOR(_ptr=<void_ptr>&self._ptr[0].arrayDesc)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":8584
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8589
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._arrayDesc = CUDA_ARRAY3D_DESCRIPTOR(_ptr=<void_ptr>&self._ptr[0].arrayDesc)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8589, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8589, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8589, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8589, 0, __PYX_ERR(0, 8589, __pyx_L1_error));

  /* "cuda/cuda.pyx":8590
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._arrayDesc = CUDA_ARRAY3D_DESCRIPTOR(_ptr=<void_ptr>&self._ptr[0].arrayDesc)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).arrayDesc))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 8590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_arrayDesc);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_arrayDesc));
  __pyx_v_self->_arrayDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8589
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._arrayDesc = CUDA_ARRAY3D_DESCRIPTOR(_ptr=<void_ptr>&self._ptr[0].arrayDesc)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8591
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._arrayDesc = CUDA_ARRAY3D_DESCRIPTOR(_ptr=<void_ptr>&self._ptr[0].arrayDesc)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 8591, 0, __PYX_ERR(0, 8591, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":8593
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6getPtr[] = "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__356)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8593, 0, __PYX_ERR(0, 8593, __pyx_L1_error));

  /* "cuda/cuda.pyx":8594
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8593
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8595
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr26__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8595, 0, __PYX_ERR(0, 8595, __pyx_L1_error));

  /* "cuda/cuda.pyx":8596
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['offset : ' + str(self.offset)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8597
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['offset : ' + str(self.offset)]
 *             str_list += ['arrayDesc :\n' + '\n'.join(['    ' + line for line in str(self.arrayDesc).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8598
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['offset : ' + str(self.offset)]             # <<<<<<<<<<<<<<
 *             str_list += ['arrayDesc :\n' + '\n'.join(['    ' + line for line in str(self.arrayDesc).splitlines()])]
 *             str_list += ['numLevels : ' + str(self.numLevels)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_offset, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8599
 *             str_list = []
 *             str_list += ['offset : ' + str(self.offset)]
 *             str_list += ['arrayDesc :\n' + '\n'.join(['    ' + line for line in str(self.arrayDesc).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['numLevels : ' + str(self.numLevels)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8599, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arrayDesc_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8599, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8599, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8599, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 8599, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8599, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr26__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr26__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8599, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 8599, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_line); __pyx_9genexpr26__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_line); __pyx_9genexpr26__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_arrayDesc, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8600
 *             str_list += ['offset : ' + str(self.offset)]
 *             str_list += ['arrayDesc :\n' + '\n'.join(['    ' + line for line in str(self.arrayDesc).splitlines()])]
 *             str_list += ['numLevels : ' + str(self.numLevels)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_numLevels_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_numLevels, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8601
 *             str_list += ['arrayDesc :\n' + '\n'.join(['    ' + line for line in str(self.arrayDesc).splitlines()])]
 *             str_list += ['numLevels : ' + str(self.numLevels)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8602
 *             str_list += ['numLevels : ' + str(self.numLevels)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8596
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['offset : ' + str(self.offset)]
 */
  }

  /* "cuda/cuda.pyx":8604
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8595
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8607
 * 
 *     @property
 *     def offset(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].offset
 *     @offset.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6offset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6offset___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6offset___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8607, 0, __PYX_ERR(0, 8607, __pyx_L1_error));

  /* "cuda/cuda.pyx":8608
 *     @property
 *     def offset(self):
 *         return self._ptr[0].offset             # <<<<<<<<<<<<<<
 *     @offset.setter
 *     def offset(self, unsigned long long offset):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8607
 * 
 *     @property
 *     def offset(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].offset
 *     @offset.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8610
 *         return self._ptr[0].offset
 *     @offset.setter
 *     def offset(self, unsigned long long offset):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].offset = offset
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offset); /*proto*/
static int __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offset) {
  unsigned PY_LONG_LONG __pyx_v_offset;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_offset); {
    __pyx_v_offset = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_offset); if (unlikely((__pyx_v_offset == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8610, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6offset_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_offset));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6offset_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_offset) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8610, 0, __PYX_ERR(0, 8610, __pyx_L1_error));

  /* "cuda/cuda.pyx":8612
 *     def offset(self, unsigned long long offset):
 *         pass
 *         self._ptr[0].offset = offset             # <<<<<<<<<<<<<<
 *     @property
 *     def arrayDesc(self):
 */
  (__pyx_v_self->_ptr[0]).offset = __pyx_v_offset;

  /* "cuda/cuda.pyx":8610
 *         return self._ptr[0].offset
 *     @offset.setter
 *     def offset(self, unsigned long long offset):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].offset = offset
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8614
 *         self._ptr[0].offset = offset
 *     @property
 *     def arrayDesc(self):             # <<<<<<<<<<<<<<
 *         return self._arrayDesc
 *     @arrayDesc.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9arrayDesc_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9arrayDesc_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9arrayDesc___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9arrayDesc___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8614, 0, __PYX_ERR(0, 8614, __pyx_L1_error));

  /* "cuda/cuda.pyx":8615
 *     @property
 *     def arrayDesc(self):
 *         return self._arrayDesc             # <<<<<<<<<<<<<<
 *     @arrayDesc.setter
 *     def arrayDesc(self, arrayDesc not None : CUDA_ARRAY3D_DESCRIPTOR):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_arrayDesc));
  __pyx_r = ((PyObject *)__pyx_v_self->_arrayDesc);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8614
 *         self._ptr[0].offset = offset
 *     @property
 *     def arrayDesc(self):             # <<<<<<<<<<<<<<
 *         return self._arrayDesc
 *     @arrayDesc.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.arrayDesc.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8617
 *         return self._arrayDesc
 *     @arrayDesc.setter
 *     def arrayDesc(self, arrayDesc not None : CUDA_ARRAY3D_DESCRIPTOR):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(arrayDesc):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9arrayDesc_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_arrayDesc); /*proto*/
static int __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9arrayDesc_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_arrayDesc) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arrayDesc), __pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR, 0, "arrayDesc", 0))) __PYX_ERR(0, 8617, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9arrayDesc_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *)__pyx_v_arrayDesc));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9arrayDesc_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_arrayDesc) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8617, 0, __PYX_ERR(0, 8617, __pyx_L1_error));

  /* "cuda/cuda.pyx":8619
 *     def arrayDesc(self, arrayDesc not None : CUDA_ARRAY3D_DESCRIPTOR):
 *         pass
 *         for _attr in dir(arrayDesc):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_arrayDesc)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8619, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8619, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8619, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 8619, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":8620
 *         pass
 *         for _attr in dir(arrayDesc):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8620, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":8621
 *         for _attr in dir(arrayDesc):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._arrayDesc, _attr, getattr(arrayDesc, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":8620
 *         pass
 *         for _attr in dir(arrayDesc):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":8622
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._arrayDesc, _attr, getattr(arrayDesc, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8622, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":8623
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._arrayDesc, _attr, getattr(arrayDesc, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def numLevels(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_arrayDesc);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_arrayDesc), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8623, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 8623, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":8622
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._arrayDesc, _attr, getattr(arrayDesc, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":8619
 *     def arrayDesc(self, arrayDesc not None : CUDA_ARRAY3D_DESCRIPTOR):
 *         pass
 *         for _attr in dir(arrayDesc):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8617
 *         return self._arrayDesc
 *     @arrayDesc.setter
 *     def arrayDesc(self, arrayDesc not None : CUDA_ARRAY3D_DESCRIPTOR):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(arrayDesc):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.arrayDesc.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8625
 *                 setattr(self._arrayDesc, _attr, getattr(arrayDesc, _attr))
 *     @property
 *     def numLevels(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].numLevels
 *     @numLevels.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9numLevels_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9numLevels_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9numLevels___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9numLevels___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8625, 0, __PYX_ERR(0, 8625, __pyx_L1_error));

  /* "cuda/cuda.pyx":8626
 *     @property
 *     def numLevels(self):
 *         return self._ptr[0].numLevels             # <<<<<<<<<<<<<<
 *     @numLevels.setter
 *     def numLevels(self, unsigned int numLevels):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).numLevels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8625
 *                 setattr(self._arrayDesc, _attr, getattr(arrayDesc, _attr))
 *     @property
 *     def numLevels(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].numLevels
 *     @numLevels.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.numLevels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8628
 *         return self._ptr[0].numLevels
 *     @numLevels.setter
 *     def numLevels(self, unsigned int numLevels):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].numLevels = numLevels
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9numLevels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numLevels); /*proto*/
static int __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9numLevels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numLevels) {
  unsigned int __pyx_v_numLevels;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_numLevels); {
    __pyx_v_numLevels = __Pyx_PyInt_As_unsigned_int(__pyx_arg_numLevels); if (unlikely((__pyx_v_numLevels == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8628, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.numLevels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9numLevels_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self), ((unsigned int)__pyx_v_numLevels));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9numLevels_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, unsigned int __pyx_v_numLevels) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8628, 0, __PYX_ERR(0, 8628, __pyx_L1_error));

  /* "cuda/cuda.pyx":8630
 *     def numLevels(self, unsigned int numLevels):
 *         pass
 *         self._ptr[0].numLevels = numLevels             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  (__pyx_v_self->_ptr[0]).numLevels = __pyx_v_numLevels;

  /* "cuda/cuda.pyx":8628
 *         return self._ptr[0].numLevels
 *     @numLevels.setter
 *     def numLevels(self, unsigned int numLevels):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].numLevels = numLevels
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.numLevels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8632
 *         self._ptr[0].numLevels = numLevels
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8632, 0, __PYX_ERR(0, 8632, __pyx_L1_error));

  /* "cuda/cuda.pyx":8633
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_unsigned_int((__pyx_v_self->_ptr[0]).reserved, 16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8632
 *         self._ptr[0].numLevels = numLevels
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8635
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1[16];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8635, 0, __PYX_ERR(0, 8635, __pyx_L1_error));

  /* "cuda/cuda.pyx":8637
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s:
 */
  if (unlikely(__Pyx_carray_from_py_unsigned_int(__pyx_v_reserved, __pyx_t_1, 16) < 0)) __PYX_ERR(0, 8637, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).reserved[0]) * (16));

  /* "cuda/cuda.pyx":8635
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_10__reduce_cython__[] = "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__357)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__358, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_12__setstate_cython__[] = "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__359)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__360, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8655
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8655, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8655, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8655, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8655, 0, __PYX_ERR(0, 8655, __pyx_L1_error));

  /* "cuda/cuda.pyx":8656
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":8655
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8657
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8657, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8657, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8657, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8657, 0, __PYX_ERR(0, 8657, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8659
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4getPtr[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__361)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8659, 0, __PYX_ERR(0, 8659, __pyx_L1_error));

  /* "cuda/cuda.pyx":8660
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8659
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8661
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8661, 0, __PYX_ERR(0, 8661, __pyx_L1_error));

  /* "cuda/cuda.pyx":8662
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['handle : ' + hex(self.handle)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8663
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['handle : ' + hex(self.handle)]
 *             str_list += ['name : ' + hex(self.name)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8664
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['handle : ' + hex(self.handle)]             # <<<<<<<<<<<<<<
 *             str_list += ['name : ' + hex(self.name)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_handle, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8665
 *             str_list = []
 *             str_list += ['handle : ' + hex(self.handle)]
 *             str_list += ['name : ' + hex(self.name)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_name, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8666
 *             str_list += ['handle : ' + hex(self.handle)]
 *             str_list += ['name : ' + hex(self.name)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8662
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['handle : ' + hex(self.handle)]
 */
  }

  /* "cuda/cuda.pyx":8668
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8661
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8671
 * 
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].handle.win32.handle
 *     @handle.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6handle_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6handle___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6handle___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8671, 0, __PYX_ERR(0, 8671, __pyx_L1_error));

  /* "cuda/cuda.pyx":8672
 *     @property
 *     def handle(self):
 *         return <void_ptr>self._ptr[0].handle.win32.handle             # <<<<<<<<<<<<<<
 *     @handle.setter
 *     def handle(self, handle):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).handle.win32.handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8671
 * 
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].handle.win32.handle
 *     @handle.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8674
 *         return <void_ptr>self._ptr[0].handle.win32.handle
 *     @handle.setter
 *     def handle(self, handle):             # <<<<<<<<<<<<<<
 *         _chandle = utils.HelperInputVoidPtr(handle)
 *         self._ptr[0].handle.win32.handle = <void*><void_ptr>_chandle.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6handle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_handle); /*proto*/
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6handle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_handle) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6handle_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self), ((PyObject *)__pyx_v_handle));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6handle_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, PyObject *__pyx_v_handle) {
  PyObject *__pyx_v__chandle = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8674, 0, __PYX_ERR(0, 8674, __pyx_L1_error));

  /* "cuda/cuda.pyx":8675
 *     @handle.setter
 *     def handle(self, handle):
 *         _chandle = utils.HelperInputVoidPtr(handle)             # <<<<<<<<<<<<<<
 *         self._ptr[0].handle.win32.handle = <void*><void_ptr>_chandle.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__chandle = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8676
 *     def handle(self, handle):
 *         _chandle = utils.HelperInputVoidPtr(handle)
 *         self._ptr[0].handle.win32.handle = <void*><void_ptr>_chandle.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def name(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__chandle, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).handle.win32.handle = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":8674
 *         return <void_ptr>self._ptr[0].handle.win32.handle
 *     @handle.setter
 *     def handle(self, handle):             # <<<<<<<<<<<<<<
 *         _chandle = utils.HelperInputVoidPtr(handle)
 *         self._ptr[0].handle.win32.handle = <void*><void_ptr>_chandle.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.handle.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__chandle);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8678
 *         self._ptr[0].handle.win32.handle = <void*><void_ptr>_chandle.cptr
 *     @property
 *     def name(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].handle.win32.name
 *     @name.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4name___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4name___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8678, 0, __PYX_ERR(0, 8678, __pyx_L1_error));

  /* "cuda/cuda.pyx":8679
 *     @property
 *     def name(self):
 *         return <void_ptr>self._ptr[0].handle.win32.name             # <<<<<<<<<<<<<<
 *     @name.setter
 *     def name(self, name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).handle.win32.name)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8678
 *         self._ptr[0].handle.win32.handle = <void*><void_ptr>_chandle.cptr
 *     @property
 *     def name(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].handle.win32.name
 *     @name.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8681
 *         return <void_ptr>self._ptr[0].handle.win32.name
 *     @name.setter
 *     def name(self, name):             # <<<<<<<<<<<<<<
 *         _cname = utils.HelperInputVoidPtr(name)
 *         self._ptr[0].handle.win32.name = <void*><void_ptr>_cname.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4name_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4name_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v__cname = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8681, 0, __PYX_ERR(0, 8681, __pyx_L1_error));

  /* "cuda/cuda.pyx":8682
 *     @name.setter
 *     def name(self, name):
 *         _cname = utils.HelperInputVoidPtr(name)             # <<<<<<<<<<<<<<
 *         self._ptr[0].handle.win32.name = <void*><void_ptr>_cname.cptr
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cname = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8683
 *     def name(self, name):
 *         _cname = utils.HelperInputVoidPtr(name)
 *         self._ptr[0].handle.win32.name = <void*><void_ptr>_cname.cptr             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cname, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).handle.win32.name = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":8681
 *         return <void_ptr>self._ptr[0].handle.win32.name
 *     @name.setter
 *     def name(self, name):             # <<<<<<<<<<<<<<
 *         _cname = utils.HelperInputVoidPtr(name)
 *         self._ptr[0].handle.win32.name = <void*><void_ptr>_cname.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cname);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_8__reduce_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__362)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__363, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_10__setstate_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__364)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__365, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8703
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8703, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8703, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8703, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8703, 0, __PYX_ERR(0, 8703, __pyx_L1_error));

  /* "cuda/cuda.pyx":8704
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._win32 = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 */
  __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":8703
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8705
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._win32 = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8705, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8705, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8705, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8705, 0, __PYX_ERR(0, 8705, __pyx_L1_error));

  /* "cuda/cuda.pyx":8706
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._win32 = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 8706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_win32);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_win32));
  __pyx_v_self->_win32 = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8705
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._win32 = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8707
 *     def __init__(self, void_ptr _ptr):
 *         self._win32 = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_4getPtr[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__366)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8707, 0, __PYX_ERR(0, 8707, __pyx_L1_error));

  /* "cuda/cuda.pyx":8708
 *         self._win32 = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8707
 *     def __init__(self, void_ptr _ptr):
 *         self._win32 = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8709
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr27__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8709, 0, __PYX_ERR(0, 8709, __pyx_L1_error));

  /* "cuda/cuda.pyx":8710
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fd : ' + str(self.fd)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8711
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['fd : ' + str(self.fd)]
 *             str_list += ['win32 :\n' + '\n'.join(['    ' + line for line in str(self.win32).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8712
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['fd : ' + str(self.fd)]             # <<<<<<<<<<<<<<
 *             str_list += ['win32 :\n' + '\n'.join(['    ' + line for line in str(self.win32).splitlines()])]
 *             str_list += ['nvSciSyncObj : ' + hex(self.nvSciSyncObj)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fd_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_fd, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8713
 *             str_list = []
 *             str_list += ['fd : ' + str(self.fd)]
 *             str_list += ['win32 :\n' + '\n'.join(['    ' + line for line in str(self.win32).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['nvSciSyncObj : ' + hex(self.nvSciSyncObj)]
 *             return '\n'.join(str_list)
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8713, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_win32_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8713, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8713, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8713, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 8713, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8713, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr27__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr27__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8713, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 8713, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_line); __pyx_9genexpr27__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_line); __pyx_9genexpr27__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_win32, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8714
 *             str_list += ['fd : ' + str(self.fd)]
 *             str_list += ['win32 :\n' + '\n'.join(['    ' + line for line in str(self.win32).splitlines()])]
 *             str_list += ['nvSciSyncObj : ' + hex(self.nvSciSyncObj)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nvSciSyncObj_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_nvSciSyncObj, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8715
 *             str_list += ['win32 :\n' + '\n'.join(['    ' + line for line in str(self.win32).splitlines()])]
 *             str_list += ['nvSciSyncObj : ' + hex(self.nvSciSyncObj)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8710
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fd : ' + str(self.fd)]
 */
  }

  /* "cuda/cuda.pyx":8717
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8709
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8720
 * 
 *     @property
 *     def fd(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].handle.fd
 *     @fd.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2fd_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2fd_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2fd___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2fd___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8720, 0, __PYX_ERR(0, 8720, __pyx_L1_error));

  /* "cuda/cuda.pyx":8721
 *     @property
 *     def fd(self):
 *         return self._ptr[0].handle.fd             # <<<<<<<<<<<<<<
 *     @fd.setter
 *     def fd(self, int fd):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).handle.fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8720
 * 
 *     @property
 *     def fd(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].handle.fd
 *     @fd.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.fd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8723
 *         return self._ptr[0].handle.fd
 *     @fd.setter
 *     def fd(self, int fd):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].handle.fd = fd
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd); /*proto*/
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd) {
  int __pyx_v_fd;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_fd); {
    __pyx_v_fd = __Pyx_PyInt_As_int(__pyx_arg_fd); if (unlikely((__pyx_v_fd == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8723, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.fd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2fd_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_self), ((int)__pyx_v_fd));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2fd_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self, int __pyx_v_fd) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8723, 0, __PYX_ERR(0, 8723, __pyx_L1_error));

  /* "cuda/cuda.pyx":8725
 *     def fd(self, int fd):
 *         pass
 *         self._ptr[0].handle.fd = fd             # <<<<<<<<<<<<<<
 *     @property
 *     def win32(self):
 */
  (__pyx_v_self->_ptr[0]).handle.fd = __pyx_v_fd;

  /* "cuda/cuda.pyx":8723
 *         return self._ptr[0].handle.fd
 *     @fd.setter
 *     def fd(self, int fd):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].handle.fd = fd
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.fd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8727
 *         self._ptr[0].handle.fd = fd
 *     @property
 *     def win32(self):             # <<<<<<<<<<<<<<
 *         return self._win32
 *     @win32.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5win32_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5win32_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5win32___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5win32___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8727, 0, __PYX_ERR(0, 8727, __pyx_L1_error));

  /* "cuda/cuda.pyx":8728
 *     @property
 *     def win32(self):
 *         return self._win32             # <<<<<<<<<<<<<<
 *     @win32.setter
 *     def win32(self, win32 not None : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_win32));
  __pyx_r = ((PyObject *)__pyx_v_self->_win32);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8727
 *         self._ptr[0].handle.fd = fd
 *     @property
 *     def win32(self):             # <<<<<<<<<<<<<<
 *         return self._win32
 *     @win32.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.win32.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8730
 *         return self._win32
 *     @win32.setter
 *     def win32(self, win32 not None : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(win32):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5win32_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_win32); /*proto*/
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5win32_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_win32) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_win32), __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s, 0, "win32", 0))) __PYX_ERR(0, 8730, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5win32_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)__pyx_v_win32));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5win32_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *__pyx_v_win32) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8730, 0, __PYX_ERR(0, 8730, __pyx_L1_error));

  /* "cuda/cuda.pyx":8732
 *     def win32(self, win32 not None : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s):
 *         pass
 *         for _attr in dir(win32):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_win32)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8732, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8732, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8732, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8732, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8732, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 8732, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":8733
 *         pass
 *         for _attr in dir(win32):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8733, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":8734
 *         for _attr in dir(win32):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._win32, _attr, getattr(win32, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":8733
 *         pass
 *         for _attr in dir(win32):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":8735
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._win32, _attr, getattr(win32, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8735, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":8736
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._win32, _attr, getattr(win32, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def nvSciSyncObj(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_win32);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_win32), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 8736, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":8735
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._win32, _attr, getattr(win32, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":8732
 *     def win32(self, win32 not None : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s):
 *         pass
 *         for _attr in dir(win32):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8730
 *         return self._win32
 *     @win32.setter
 *     def win32(self, win32 not None : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(win32):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.win32.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8738
 *                 setattr(self._win32, _attr, getattr(win32, _attr))
 *     @property
 *     def nvSciSyncObj(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].handle.nvSciSyncObj
 *     @nvSciSyncObj.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_12nvSciSyncObj_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_12nvSciSyncObj_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_12nvSciSyncObj___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_12nvSciSyncObj___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8738, 0, __PYX_ERR(0, 8738, __pyx_L1_error));

  /* "cuda/cuda.pyx":8739
 *     @property
 *     def nvSciSyncObj(self):
 *         return <void_ptr>self._ptr[0].handle.nvSciSyncObj             # <<<<<<<<<<<<<<
 *     @nvSciSyncObj.setter
 *     def nvSciSyncObj(self, nvSciSyncObj):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).handle.nvSciSyncObj)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8738
 *                 setattr(self._win32, _attr, getattr(win32, _attr))
 *     @property
 *     def nvSciSyncObj(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].handle.nvSciSyncObj
 *     @nvSciSyncObj.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.nvSciSyncObj.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8741
 *         return <void_ptr>self._ptr[0].handle.nvSciSyncObj
 *     @nvSciSyncObj.setter
 *     def nvSciSyncObj(self, nvSciSyncObj):             # <<<<<<<<<<<<<<
 *         _cnvSciSyncObj = utils.HelperInputVoidPtr(nvSciSyncObj)
 *         self._ptr[0].handle.nvSciSyncObj = <void*><void_ptr>_cnvSciSyncObj.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_12nvSciSyncObj_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_nvSciSyncObj); /*proto*/
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_12nvSciSyncObj_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_nvSciSyncObj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_12nvSciSyncObj_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_self), ((PyObject *)__pyx_v_nvSciSyncObj));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_12nvSciSyncObj_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self, PyObject *__pyx_v_nvSciSyncObj) {
  PyObject *__pyx_v__cnvSciSyncObj = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8741, 0, __PYX_ERR(0, 8741, __pyx_L1_error));

  /* "cuda/cuda.pyx":8742
 *     @nvSciSyncObj.setter
 *     def nvSciSyncObj(self, nvSciSyncObj):
 *         _cnvSciSyncObj = utils.HelperInputVoidPtr(nvSciSyncObj)             # <<<<<<<<<<<<<<
 *         self._ptr[0].handle.nvSciSyncObj = <void*><void_ptr>_cnvSciSyncObj.cptr
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_nvSciSyncObj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cnvSciSyncObj = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8743
 *     def nvSciSyncObj(self, nvSciSyncObj):
 *         _cnvSciSyncObj = utils.HelperInputVoidPtr(nvSciSyncObj)
 *         self._ptr[0].handle.nvSciSyncObj = <void*><void_ptr>_cnvSciSyncObj.cptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cnvSciSyncObj, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).handle.nvSciSyncObj = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":8741
 *         return <void_ptr>self._ptr[0].handle.nvSciSyncObj
 *     @nvSciSyncObj.setter
 *     def nvSciSyncObj(self, nvSciSyncObj):             # <<<<<<<<<<<<<<
 *         _cnvSciSyncObj = utils.HelperInputVoidPtr(nvSciSyncObj)
 *         self._ptr[0].handle.nvSciSyncObj = <void*><void_ptr>_cnvSciSyncObj.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.nvSciSyncObj.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cnvSciSyncObj);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_8__reduce_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__367)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__368, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_10__setstate_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__369)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__370, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8766
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8766, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8766, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8766, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8766, 0, __PYX_ERR(0, 8766, __pyx_L1_error));

  /* "cuda/cuda.pyx":8767
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8768
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":8767
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":8770
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._handle = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u(_ptr=<void_ptr>self._ptr)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":8766
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8771
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._handle = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8771, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8771, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8771, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8771, 0, __PYX_ERR(0, 8771, __pyx_L1_error));

  /* "cuda/cuda.pyx":8772
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._handle = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 8772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_handle);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_handle));
  __pyx_v_self->_handle = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8771
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._handle = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8773
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._handle = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 8773, 0, __PYX_ERR(0, 8773, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":8775
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6getPtr[] = "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__371)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8775, 0, __PYX_ERR(0, 8775, __pyx_L1_error));

  /* "cuda/cuda.pyx":8776
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8775
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8777
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr28__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8777, 0, __PYX_ERR(0, 8777, __pyx_L1_error));

  /* "cuda/cuda.pyx":8778
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8779
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['handle :\n' + '\n'.join(['    ' + line for line in str(self.handle).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8780
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]             # <<<<<<<<<<<<<<
 *             str_list += ['handle :\n' + '\n'.join(['    ' + line for line in str(self.handle).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_type, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8781
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['handle :\n' + '\n'.join(['    ' + line for line in str(self.handle).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8781, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8781, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8781, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8781, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 8781, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8781, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr28__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr28__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8781, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 8781, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_line); __pyx_9genexpr28__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_line); __pyx_9genexpr28__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_handle_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8782
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['handle :\n' + '\n'.join(['    ' + line for line in str(self.handle).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8783
 *             str_list += ['handle :\n' + '\n'.join(['    ' + line for line in str(self.handle).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8784
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8778
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 */
  }

  /* "cuda/cuda.pyx":8786
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8777
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8789
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return CUexternalSemaphoreHandleType(self._ptr[0].type)
 *     @type.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4type___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4type___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8789, 0, __PYX_ERR(0, 8789, __pyx_L1_error));

  /* "cuda/cuda.pyx":8790
 *     @property
 *     def type(self):
 *         return CUexternalSemaphoreHandleType(self._ptr[0].type)             # <<<<<<<<<<<<<<
 *     @type.setter
 *     def type(self, type not None : CUexternalSemaphoreHandleType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUexternalSemaphoreHandleType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum((__pyx_v_self->_ptr[0]).type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8789
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return CUexternalSemaphoreHandleType(self._ptr[0].type)
 *     @type.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8792
 *         return CUexternalSemaphoreHandleType(self._ptr[0].type)
 *     @type.setter
 *     def type(self, type not None : CUexternalSemaphoreHandleType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].type = type.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_type); /*proto*/
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "type"); __PYX_ERR(0, 8792, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4type_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_type));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4type_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, PyObject *__pyx_v_type) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUexternalSemaphoreHandleType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8792, 0, __PYX_ERR(0, 8792, __pyx_L1_error));

  /* "cuda/cuda.pyx":8794
 *     def type(self, type not None : CUexternalSemaphoreHandleType):
 *         pass
 *         self._ptr[0].type = type.value             # <<<<<<<<<<<<<<
 *     @property
 *     def handle(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUexternalSemaphoreHandleType_enum)__Pyx_PyInt_As_enum__CUexternalSemaphoreHandleType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 8794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).type = __pyx_t_2;

  /* "cuda/cuda.pyx":8792
 *         return CUexternalSemaphoreHandleType(self._ptr[0].type)
 *     @type.setter
 *     def type(self, type not None : CUexternalSemaphoreHandleType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].type = type.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8796
 *         self._ptr[0].type = type.value
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         return self._handle
 *     @handle.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6handle_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6handle___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6handle___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8796, 0, __PYX_ERR(0, 8796, __pyx_L1_error));

  /* "cuda/cuda.pyx":8797
 *     @property
 *     def handle(self):
 *         return self._handle             # <<<<<<<<<<<<<<
 *     @handle.setter
 *     def handle(self, handle not None : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_handle));
  __pyx_r = ((PyObject *)__pyx_v_self->_handle);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8796
 *         self._ptr[0].type = type.value
 *     @property
 *     def handle(self):             # <<<<<<<<<<<<<<
 *         return self._handle
 *     @handle.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8799
 *         return self._handle
 *     @handle.setter
 *     def handle(self, handle not None : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(handle):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6handle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_handle); /*proto*/
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6handle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_handle) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handle), __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u, 0, "handle", 0))) __PYX_ERR(0, 8799, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6handle_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)__pyx_v_handle));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6handle_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *__pyx_v_handle) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8799, 0, __PYX_ERR(0, 8799, __pyx_L1_error));

  /* "cuda/cuda.pyx":8801
 *     def handle(self, handle not None : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u):
 *         pass
 *         for _attr in dir(handle):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8801, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8801, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8801, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8801, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8801, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 8801, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":8802
 *         pass
 *         for _attr in dir(handle):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8802, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":8803
 *         for _attr in dir(handle):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._handle, _attr, getattr(handle, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":8802
 *         pass
 *         for _attr in dir(handle):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":8804
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._handle, _attr, getattr(handle, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8804, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":8805
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._handle, _attr, getattr(handle, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_handle);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_handle), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8805, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 8805, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":8804
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._handle, _attr, getattr(handle, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":8801
 *     def handle(self, handle not None : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u):
 *         pass
 *         for _attr in dir(handle):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8799
 *         return self._handle
 *     @handle.setter
 *     def handle(self, handle not None : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(handle):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8807
 *                 setattr(self._handle, _attr, getattr(handle, _attr))
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8807, 0, __PYX_ERR(0, 8807, __pyx_L1_error));

  /* "cuda/cuda.pyx":8808
 *     @property
 *     def flags(self):
 *         return self._ptr[0].flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8807
 *                 setattr(self._handle, _attr, getattr(handle, _attr))
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8810
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 8810, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8810, 0, __PYX_ERR(0, 8810, __pyx_L1_error));

  /* "cuda/cuda.pyx":8812
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].flags = flags             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  (__pyx_v_self->_ptr[0]).flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":8810
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8814
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8814, 0, __PYX_ERR(0, 8814, __pyx_L1_error));

  /* "cuda/cuda.pyx":8815
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_unsigned_int((__pyx_v_self->_ptr[0]).reserved, 16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8814
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8817
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1[16];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8817, 0, __PYX_ERR(0, 8817, __pyx_L1_error));

  /* "cuda/cuda.pyx":8819
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s:
 */
  if (unlikely(__Pyx_carray_from_py_unsigned_int(__pyx_v_reserved, __pyx_t_1, 16) < 0)) __PYX_ERR(0, 8819, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).reserved[0]) * (16));

  /* "cuda/cuda.pyx":8817
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_10__reduce_cython__[] = "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__372)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__373, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_12__setstate_cython__[] = "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__374)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__375, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8835
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8835, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8835, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8835, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8835, 0, __PYX_ERR(0, 8835, __pyx_L1_error));

  /* "cuda/cuda.pyx":8836
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":8835
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8837
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8837, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8837, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8837, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8837, 0, __PYX_ERR(0, 8837, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8839
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_4getPtr[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__376)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8839, 0, __PYX_ERR(0, 8839, __pyx_L1_error));

  /* "cuda/cuda.pyx":8840
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8839
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8841
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8841, 0, __PYX_ERR(0, 8841, __pyx_L1_error));

  /* "cuda/cuda.pyx":8842
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['value : ' + str(self.value)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8843
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['value : ' + str(self.value)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8844
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['value : ' + str(self.value)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_value_2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8845
 *             str_list = []
 *             str_list += ['value : ' + str(self.value)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8842
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['value : ' + str(self.value)]
 */
  }

  /* "cuda/cuda.pyx":8847
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8841
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8850
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.fence.value
 *     @value.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5value_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5value___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5value___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8850, 0, __PYX_ERR(0, 8850, __pyx_L1_error));

  /* "cuda/cuda.pyx":8851
 *     @property
 *     def value(self):
 *         return self._ptr[0].params.fence.value             # <<<<<<<<<<<<<<
 *     @value.setter
 *     def value(self, unsigned long long value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).params.fence.value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8850
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.fence.value
 *     @value.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8853
 *         return self._ptr[0].params.fence.value
 *     @value.setter
 *     def value(self, unsigned long long value):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.fence.value = value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  unsigned PY_LONG_LONG __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_value); if (unlikely((__pyx_v_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8853, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5value_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5value_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8853, 0, __PYX_ERR(0, 8853, __pyx_L1_error));

  /* "cuda/cuda.pyx":8855
 *     def value(self, unsigned long long value):
 *         pass
 *         self._ptr[0].params.fence.value = value             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u:
 */
  (__pyx_v_self->_ptr[0]).params.fence.value = __pyx_v_value;

  /* "cuda/cuda.pyx":8853
 *         return self._ptr[0].params.fence.value
 *     @value.setter
 *     def value(self, unsigned long long value):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.fence.value = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_8__reduce_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__377)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__378, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_10__setstate_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__379)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__380, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8873
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8873, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8873, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8873, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8873, 0, __PYX_ERR(0, 8873, __pyx_L1_error));

  /* "cuda/cuda.pyx":8874
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":8873
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8875
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8875, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8875, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8875, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8875, 0, __PYX_ERR(0, 8875, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8877
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_4getPtr[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__381)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8877, 0, __PYX_ERR(0, 8877, __pyx_L1_error));

  /* "cuda/cuda.pyx":8878
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8877
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8879
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8879, 0, __PYX_ERR(0, 8879, __pyx_L1_error));

  /* "cuda/cuda.pyx":8880
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fence : ' + hex(self.fence)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8881
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['fence : ' + hex(self.fence)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8882
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['fence : ' + hex(self.fence)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fence_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_fence, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8883
 *             str_list = []
 *             str_list += ['fence : ' + hex(self.fence)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8884
 *             str_list += ['fence : ' + hex(self.fence)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8880
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fence : ' + hex(self.fence)]
 */
  }

  /* "cuda/cuda.pyx":8886
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8879
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8889
 * 
 *     @property
 *     def fence(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].params.nvSciSync.fence
 *     @fence.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5fence_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5fence_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5fence___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5fence___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8889, 0, __PYX_ERR(0, 8889, __pyx_L1_error));

  /* "cuda/cuda.pyx":8890
 *     @property
 *     def fence(self):
 *         return <void_ptr>self._ptr[0].params.nvSciSync.fence             # <<<<<<<<<<<<<<
 *     @fence.setter
 *     def fence(self, fence):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).params.nvSciSync.fence)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8889
 * 
 *     @property
 *     def fence(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].params.nvSciSync.fence
 *     @fence.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.fence.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8892
 *         return <void_ptr>self._ptr[0].params.nvSciSync.fence
 *     @fence.setter
 *     def fence(self, fence):             # <<<<<<<<<<<<<<
 *         _cfence = utils.HelperInputVoidPtr(fence)
 *         self._ptr[0].params.nvSciSync.fence = <void*><void_ptr>_cfence.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5fence_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_fence); /*proto*/
static int __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5fence_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_fence) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5fence_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self), ((PyObject *)__pyx_v_fence));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5fence_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, PyObject *__pyx_v_fence) {
  PyObject *__pyx_v__cfence = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8892, 0, __PYX_ERR(0, 8892, __pyx_L1_error));

  /* "cuda/cuda.pyx":8893
 *     @fence.setter
 *     def fence(self, fence):
 *         _cfence = utils.HelperInputVoidPtr(fence)             # <<<<<<<<<<<<<<
 *         self._ptr[0].params.nvSciSync.fence = <void*><void_ptr>_cfence.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_fence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cfence = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8894
 *     def fence(self, fence):
 *         _cfence = utils.HelperInputVoidPtr(fence)
 *         self._ptr[0].params.nvSciSync.fence = <void*><void_ptr>_cfence.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cfence, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).params.nvSciSync.fence = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":8892
 *         return <void_ptr>self._ptr[0].params.nvSciSync.fence
 *     @fence.setter
 *     def fence(self, fence):             # <<<<<<<<<<<<<<
 *         _cfence = utils.HelperInputVoidPtr(fence)
 *         self._ptr[0].params.nvSciSync.fence = <void*><void_ptr>_cfence.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.fence.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cfence);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8896
 *         self._ptr[0].params.nvSciSync.fence = <void*><void_ptr>_cfence.cptr
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.nvSciSync.reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8reserved___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8896, 0, __PYX_ERR(0, 8896, __pyx_L1_error));

  /* "cuda/cuda.pyx":8897
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].params.nvSciSync.reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, unsigned long long reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).params.nvSciSync.reserved); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8896
 *         self._ptr[0].params.nvSciSync.fence = <void*><void_ptr>_cfence.cptr
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.nvSciSync.reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8899
 *         return self._ptr[0].params.nvSciSync.reserved
 *     @reserved.setter
 *     def reserved(self, unsigned long long reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.nvSciSync.reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_reserved) {
  unsigned PY_LONG_LONG __pyx_v_reserved;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_reserved); {
    __pyx_v_reserved = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_reserved); if (unlikely((__pyx_v_reserved == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8899, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8899, 0, __PYX_ERR(0, 8899, __pyx_L1_error));

  /* "cuda/cuda.pyx":8901
 *     def reserved(self, unsigned long long reserved):
 *         pass
 *         self._ptr[0].params.nvSciSync.reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s:
 */
  (__pyx_v_self->_ptr[0]).params.nvSciSync.reserved = __pyx_v_reserved;

  /* "cuda/cuda.pyx":8899
 *         return self._ptr[0].params.nvSciSync.reserved
 *     @reserved.setter
 *     def reserved(self, unsigned long long reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.nvSciSync.reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8__reduce_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__382)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__383, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_10__setstate_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__384)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__385, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8917
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8917, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8917, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8917, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8917, 0, __PYX_ERR(0, 8917, __pyx_L1_error));

  /* "cuda/cuda.pyx":8918
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":8917
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8919
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8919, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8919, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8919, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8919, 0, __PYX_ERR(0, 8919, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8921
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_4getPtr[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__386)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8921, 0, __PYX_ERR(0, 8921, __pyx_L1_error));

  /* "cuda/cuda.pyx":8922
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8921
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8923
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8923, 0, __PYX_ERR(0, 8923, __pyx_L1_error));

  /* "cuda/cuda.pyx":8924
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['key : ' + str(self.key)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8925
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['key : ' + str(self.key)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8926
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['key : ' + str(self.key)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_key_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_key, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8927
 *             str_list = []
 *             str_list += ['key : ' + str(self.key)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8924
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['key : ' + str(self.key)]
 */
  }

  /* "cuda/cuda.pyx":8929
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8923
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8932
 * 
 *     @property
 *     def key(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.keyedMutex.key
 *     @key.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3key_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3key_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3key___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3key___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8932, 0, __PYX_ERR(0, 8932, __pyx_L1_error));

  /* "cuda/cuda.pyx":8933
 *     @property
 *     def key(self):
 *         return self._ptr[0].params.keyedMutex.key             # <<<<<<<<<<<<<<
 *     @key.setter
 *     def key(self, unsigned long long key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).params.keyedMutex.key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8932
 * 
 *     @property
 *     def key(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.keyedMutex.key
 *     @key.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.key.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8935
 *         return self._ptr[0].params.keyedMutex.key
 *     @key.setter
 *     def key(self, unsigned long long key):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.keyedMutex.key = key
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3key_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_key); /*proto*/
static int __pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3key_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_key) {
  unsigned PY_LONG_LONG __pyx_v_key;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_key); {
    __pyx_v_key = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_key); if (unlikely((__pyx_v_key == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8935, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.key.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3key_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_key));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3key_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_key) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8935, 0, __PYX_ERR(0, 8935, __pyx_L1_error));

  /* "cuda/cuda.pyx":8937
 *     def key(self, unsigned long long key):
 *         pass
 *         self._ptr[0].params.keyedMutex.key = key             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s:
 */
  (__pyx_v_self->_ptr[0]).params.keyedMutex.key = __pyx_v_key;

  /* "cuda/cuda.pyx":8935
 *         return self._ptr[0].params.keyedMutex.key
 *     @key.setter
 *     def key(self, unsigned long long key):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.keyedMutex.key = key
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.key.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_8__reduce_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__387)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__388, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_10__setstate_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__389)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__390, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8959
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 8959, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8959, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8959, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 8959, 0, __PYX_ERR(0, 8959, __pyx_L1_error));

  /* "cuda/cuda.pyx":8960
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._fence = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s(_ptr=<void_ptr>self._ptr)
 */
  __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":8959
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8961
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._fence = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s(_ptr=<void_ptr>self._ptr)
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 8961, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 8961, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 8961, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 8961, 0, __PYX_ERR(0, 8961, __pyx_L1_error));

  /* "cuda/cuda.pyx":8962
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._fence = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 8962, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_fence);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_fence));
  __pyx_v_self->_fence = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8963
 *     def __init__(self, void_ptr _ptr):
 *         self._fence = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s(_ptr=<void_ptr>self._ptr)
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 8963, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_nvSciSync);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_nvSciSync));
  __pyx_v_self->_nvSciSync = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8964
 *         self._fence = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s(_ptr=<void_ptr>self._ptr)
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 8964, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_keyedMutex);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_keyedMutex));
  __pyx_v_self->_keyedMutex = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8961
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._fence = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s(_ptr=<void_ptr>self._ptr)
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8965
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_4getPtr[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__391)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 8965, 0, __PYX_ERR(0, 8965, __pyx_L1_error));

  /* "cuda/cuda.pyx":8966
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8965
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8967
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr29__pyx_v_line = NULL;
  PyObject *__pyx_9genexpr30__pyx_v_line = NULL;
  PyObject *__pyx_9genexpr31__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 8967, 0, __PYX_ERR(0, 8967, __pyx_L1_error));

  /* "cuda/cuda.pyx":8968
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fence :\n' + '\n'.join(['    ' + line for line in str(self.fence).splitlines()])]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":8969
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['fence :\n' + '\n'.join(['    ' + line for line in str(self.fence).splitlines()])]
 *             str_list += ['nvSciSync :\n' + '\n'.join(['    ' + line for line in str(self.nvSciSync).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8969, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8970
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['fence :\n' + '\n'.join(['    ' + line for line in str(self.fence).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['nvSciSync :\n' + '\n'.join(['    ' + line for line in str(self.nvSciSync).splitlines()])]
 *             str_list += ['keyedMutex :\n' + '\n'.join(['    ' + line for line in str(self.keyedMutex).splitlines()])]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8970, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fence_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8970, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8970, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8970, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 8970, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8970, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr29__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr29__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8970, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 8970, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_line); __pyx_9genexpr29__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_line); __pyx_9genexpr29__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_fence_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8971
 *             str_list = []
 *             str_list += ['fence :\n' + '\n'.join(['    ' + line for line in str(self.fence).splitlines()])]
 *             str_list += ['nvSciSync :\n' + '\n'.join(['    ' + line for line in str(self.nvSciSync).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['keyedMutex :\n' + '\n'.join(['    ' + line for line in str(self.keyedMutex).splitlines()])]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8971, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nvSciSync_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8971, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8971, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyUnicode_Splitlines(((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8971, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 8971, __pyx_L12_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8971, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr30__pyx_v_line, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr30__pyx_v_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8971, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 8971, __pyx_L12_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_line); __pyx_9genexpr30__pyx_v_line = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_line); __pyx_9genexpr30__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_nvSciSync, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8972
 *             str_list += ['fence :\n' + '\n'.join(['    ' + line for line in str(self.fence).splitlines()])]
 *             str_list += ['nvSciSync :\n' + '\n'.join(['    ' + line for line in str(self.nvSciSync).splitlines()])]
 *             str_list += ['keyedMutex :\n' + '\n'.join(['    ' + line for line in str(self.keyedMutex).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8972, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keyedMutex_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8972, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8972, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8972, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 8972, __pyx_L18_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8972, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr31__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr31__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8972, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 8972, __pyx_L18_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr31__pyx_v_line); __pyx_9genexpr31__pyx_v_line = 0;
      goto __pyx_L21_exit_scope;
      __pyx_L18_error:;
      __Pyx_XDECREF(__pyx_9genexpr31__pyx_v_line); __pyx_9genexpr31__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L21_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_keyedMutex, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8973
 *             str_list += ['nvSciSync :\n' + '\n'.join(['    ' + line for line in str(self.nvSciSync).splitlines()])]
 *             str_list += ['keyedMutex :\n' + '\n'.join(['    ' + line for line in str(self.keyedMutex).splitlines()])]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":8974
 *             str_list += ['keyedMutex :\n' + '\n'.join(['    ' + line for line in str(self.keyedMutex).splitlines()])]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":8968
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fence :\n' + '\n'.join(['    ' + line for line in str(self.fence).splitlines()])]
 */
  }

  /* "cuda/cuda.pyx":8976
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":8967
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_line);
  __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_line);
  __Pyx_XDECREF(__pyx_9genexpr31__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8979
 * 
 *     @property
 *     def fence(self):             # <<<<<<<<<<<<<<
 *         return self._fence
 *     @fence.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5fence_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5fence_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5fence___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5fence___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8979, 0, __PYX_ERR(0, 8979, __pyx_L1_error));

  /* "cuda/cuda.pyx":8980
 *     @property
 *     def fence(self):
 *         return self._fence             # <<<<<<<<<<<<<<
 *     @fence.setter
 *     def fence(self, fence not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_fence));
  __pyx_r = ((PyObject *)__pyx_v_self->_fence);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8979
 * 
 *     @property
 *     def fence(self):             # <<<<<<<<<<<<<<
 *         return self._fence
 *     @fence.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.fence.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8982
 *         return self._fence
 *     @fence.setter
 *     def fence(self, fence not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(fence):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5fence_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_fence); /*proto*/
static int __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5fence_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_fence) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fence), __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s, 0, "fence", 0))) __PYX_ERR(0, 8982, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5fence_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *)__pyx_v_fence));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5fence_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *__pyx_v_fence) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8982, 0, __PYX_ERR(0, 8982, __pyx_L1_error));

  /* "cuda/cuda.pyx":8984
 *     def fence(self, fence not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s):
 *         pass
 *         for _attr in dir(fence):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_fence)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8984, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8984, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8984, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 8984, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":8985
 *         pass
 *         for _attr in dir(fence):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8985, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":8986
 *         for _attr in dir(fence):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._fence, _attr, getattr(fence, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":8985
 *         pass
 *         for _attr in dir(fence):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":8987
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._fence, _attr, getattr(fence, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8987, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":8988
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._fence, _attr, getattr(fence, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def nvSciSync(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_fence);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_fence), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8988, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 8988, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":8987
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._fence, _attr, getattr(fence, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":8984
 *     def fence(self, fence not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s):
 *         pass
 *         for _attr in dir(fence):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8982
 *         return self._fence
 *     @fence.setter
 *     def fence(self, fence not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(fence):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.fence.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8990
 *                 setattr(self._fence, _attr, getattr(fence, _attr))
 *     @property
 *     def nvSciSync(self):             # <<<<<<<<<<<<<<
 *         return self._nvSciSync
 *     @nvSciSync.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9nvSciSync_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9nvSciSync_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9nvSciSync___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9nvSciSync___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 8990, 0, __PYX_ERR(0, 8990, __pyx_L1_error));

  /* "cuda/cuda.pyx":8991
 *     @property
 *     def nvSciSync(self):
 *         return self._nvSciSync             # <<<<<<<<<<<<<<
 *     @nvSciSync.setter
 *     def nvSciSync(self, nvSciSync not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_nvSciSync));
  __pyx_r = ((PyObject *)__pyx_v_self->_nvSciSync);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":8990
 *                 setattr(self._fence, _attr, getattr(fence, _attr))
 *     @property
 *     def nvSciSync(self):             # <<<<<<<<<<<<<<
 *         return self._nvSciSync
 *     @nvSciSync.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.nvSciSync.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":8993
 *         return self._nvSciSync
 *     @nvSciSync.setter
 *     def nvSciSync(self, nvSciSync not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(nvSciSync):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9nvSciSync_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_nvSciSync); /*proto*/
static int __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9nvSciSync_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_nvSciSync) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nvSciSync), __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u, 0, "nvSciSync", 0))) __PYX_ERR(0, 8993, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9nvSciSync_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_nvSciSync));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9nvSciSync_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *__pyx_v_nvSciSync) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 8993, 0, __PYX_ERR(0, 8993, __pyx_L1_error));

  /* "cuda/cuda.pyx":8995
 *     def nvSciSync(self, nvSciSync not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u):
 *         pass
 *         for _attr in dir(nvSciSync):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_nvSciSync)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8995, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8995, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 8995, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 8995, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":8996
 *         pass
 *         for _attr in dir(nvSciSync):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8996, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":8997
 *         for _attr in dir(nvSciSync):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._nvSciSync, _attr, getattr(nvSciSync, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":8996
 *         pass
 *         for _attr in dir(nvSciSync):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":8998
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._nvSciSync, _attr, getattr(nvSciSync, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 8998, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":8999
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._nvSciSync, _attr, getattr(nvSciSync, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def keyedMutex(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_nvSciSync);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_nvSciSync), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 8999, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 8999, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":8998
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._nvSciSync, _attr, getattr(nvSciSync, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":8995
 *     def nvSciSync(self, nvSciSync not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u):
 *         pass
 *         for _attr in dir(nvSciSync):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":8993
 *         return self._nvSciSync
 *     @nvSciSync.setter
 *     def nvSciSync(self, nvSciSync not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(nvSciSync):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.nvSciSync.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9001
 *                 setattr(self._nvSciSync, _attr, getattr(nvSciSync, _attr))
 *     @property
 *     def keyedMutex(self):             # <<<<<<<<<<<<<<
 *         return self._keyedMutex
 *     @keyedMutex.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10keyedMutex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10keyedMutex_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10keyedMutex___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10keyedMutex___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9001, 0, __PYX_ERR(0, 9001, __pyx_L1_error));

  /* "cuda/cuda.pyx":9002
 *     @property
 *     def keyedMutex(self):
 *         return self._keyedMutex             # <<<<<<<<<<<<<<
 *     @keyedMutex.setter
 *     def keyedMutex(self, keyedMutex not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_keyedMutex));
  __pyx_r = ((PyObject *)__pyx_v_self->_keyedMutex);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9001
 *                 setattr(self._nvSciSync, _attr, getattr(nvSciSync, _attr))
 *     @property
 *     def keyedMutex(self):             # <<<<<<<<<<<<<<
 *         return self._keyedMutex
 *     @keyedMutex.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.keyedMutex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9004
 *         return self._keyedMutex
 *     @keyedMutex.setter
 *     def keyedMutex(self, keyedMutex not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(keyedMutex):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10keyedMutex_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_keyedMutex); /*proto*/
static int __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10keyedMutex_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_keyedMutex) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keyedMutex), __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s, 0, "keyedMutex", 0))) __PYX_ERR(0, 9004, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10keyedMutex_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_keyedMutex));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10keyedMutex_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *__pyx_v_keyedMutex) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9004, 0, __PYX_ERR(0, 9004, __pyx_L1_error));

  /* "cuda/cuda.pyx":9006
 *     def keyedMutex(self, keyedMutex not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s):
 *         pass
 *         for _attr in dir(keyedMutex):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_keyedMutex)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9006, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9006, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9006, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9006, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9006, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 9006, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":9007
 *         pass
 *         for _attr in dir(keyedMutex):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9007, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":9008
 *         for _attr in dir(keyedMutex):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._keyedMutex, _attr, getattr(keyedMutex, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":9007
 *         pass
 *         for _attr in dir(keyedMutex):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":9009
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._keyedMutex, _attr, getattr(keyedMutex, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9009, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":9010
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._keyedMutex, _attr, getattr(keyedMutex, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_keyedMutex);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_keyedMutex), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9010, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 9010, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":9009
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._keyedMutex, _attr, getattr(keyedMutex, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":9006
 *     def keyedMutex(self, keyedMutex not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s):
 *         pass
 *         for _attr in dir(keyedMutex):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9004
 *         return self._keyedMutex
 *     @keyedMutex.setter
 *     def keyedMutex(self, keyedMutex not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(keyedMutex):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.keyedMutex.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9012
 *                 setattr(self._keyedMutex, _attr, getattr(keyedMutex, _attr))
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8reserved___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9012, 0, __PYX_ERR(0, 9012, __pyx_L1_error));

  /* "cuda/cuda.pyx":9013
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].params.reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_unsigned_int((__pyx_v_self->_ptr[0]).params.reserved, 12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9012
 *                 setattr(self._keyedMutex, _attr, getattr(keyedMutex, _attr))
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9015
 *         return self._ptr[0].params.reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1[12];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9015, 0, __PYX_ERR(0, 9015, __pyx_L1_error));

  /* "cuda/cuda.pyx":9017
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].params.reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st:
 */
  if (unlikely(__Pyx_carray_from_py_unsigned_int(__pyx_v_reserved, __pyx_t_1, 12) < 0)) __PYX_ERR(0, 9017, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).params.reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).params.reserved[0]) * (12));

  /* "cuda/cuda.pyx":9015
 *         return self._ptr[0].params.reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8__reduce_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__392)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__393, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10__setstate_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__394)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__395, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9045
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9045, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9045, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9045, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9045, 0, __PYX_ERR(0, 9045, __pyx_L1_error));

  /* "cuda/cuda.pyx":9046
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9047
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":9046
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9049
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._params = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s(_ptr=<void_ptr>self._ptr)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":9045
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9050
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._params = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9050, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9050, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9050, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9050, 0, __PYX_ERR(0, 9050, __pyx_L1_error));

  /* "cuda/cuda.pyx":9051
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._params = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 9051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_params);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_params));
  __pyx_v_self->_params = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9050
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._params = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9052
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._params = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 9052, 0, __PYX_ERR(0, 9052, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":9054
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6getPtr[] = "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__396)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9054, 0, __PYX_ERR(0, 9054, __pyx_L1_error));

  /* "cuda/cuda.pyx":9055
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9054
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9056
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr32__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9056, 0, __PYX_ERR(0, 9056, __pyx_L1_error));

  /* "cuda/cuda.pyx":9057
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['params :\n' + '\n'.join(['    ' + line for line in str(self.params).splitlines()])]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9058
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['params :\n' + '\n'.join(['    ' + line for line in str(self.params).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9059
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['params :\n' + '\n'.join(['    ' + line for line in str(self.params).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9059, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_params_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9059, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9059, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9059, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 9059, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9059, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr32__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr32__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9059, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 9059, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr32__pyx_v_line); __pyx_9genexpr32__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr32__pyx_v_line); __pyx_9genexpr32__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_params, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9060
 *             str_list = []
 *             str_list += ['params :\n' + '\n'.join(['    ' + line for line in str(self.params).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9060, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9061
 *             str_list += ['params :\n' + '\n'.join(['    ' + line for line in str(self.params).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9062
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9057
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['params :\n' + '\n'.join(['    ' + line for line in str(self.params).splitlines()])]
 */
  }

  /* "cuda/cuda.pyx":9064
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9056
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr32__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9067
 * 
 *     @property
 *     def params(self):             # <<<<<<<<<<<<<<
 *         return self._params
 *     @params.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6params_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6params_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6params___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6params___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9067, 0, __PYX_ERR(0, 9067, __pyx_L1_error));

  /* "cuda/cuda.pyx":9068
 *     @property
 *     def params(self):
 *         return self._params             # <<<<<<<<<<<<<<
 *     @params.setter
 *     def params(self, params not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_params));
  __pyx_r = ((PyObject *)__pyx_v_self->_params);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9067
 * 
 *     @property
 *     def params(self):             # <<<<<<<<<<<<<<
 *         return self._params
 *     @params.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9070
 *         return self._params
 *     @params.setter
 *     def params(self, params not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(params):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6params_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_params); /*proto*/
static int __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6params_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_params) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_params), __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s, 0, "params", 0))) __PYX_ERR(0, 9070, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6params_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)__pyx_v_params));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6params_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *__pyx_v_params) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9070, 0, __PYX_ERR(0, 9070, __pyx_L1_error));

  /* "cuda/cuda.pyx":9072
 *     def params(self, params not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s):
 *         pass
 *         for _attr in dir(params):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_params)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9072, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9072, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9072, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9072, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9072, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 9072, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":9073
 *         pass
 *         for _attr in dir(params):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9073, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":9074
 *         for _attr in dir(params):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._params, _attr, getattr(params, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":9073
 *         pass
 *         for _attr in dir(params):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":9075
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._params, _attr, getattr(params, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9075, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9075, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9075, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":9076
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._params, _attr, getattr(params, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_params);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_params), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9076, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 9076, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":9075
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._params, _attr, getattr(params, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":9072
 *     def params(self, params not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s):
 *         pass
 *         for _attr in dir(params):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9070
 *         return self._params
 *     @params.setter
 *     def params(self, params not None : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(params):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9078
 *                 setattr(self._params, _attr, getattr(params, _attr))
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9078, 0, __PYX_ERR(0, 9078, __pyx_L1_error));

  /* "cuda/cuda.pyx":9079
 *     @property
 *     def flags(self):
 *         return self._ptr[0].flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9078
 *                 setattr(self._params, _attr, getattr(params, _attr))
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9081
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9081, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9081, 0, __PYX_ERR(0, 9081, __pyx_L1_error));

  /* "cuda/cuda.pyx":9083
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].flags = flags             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  (__pyx_v_self->_ptr[0]).flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":9081
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9085
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9085, 0, __PYX_ERR(0, 9085, __pyx_L1_error));

  /* "cuda/cuda.pyx":9086
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_unsigned_int((__pyx_v_self->_ptr[0]).reserved, 16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9085
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9088
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1[16];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9088, 0, __PYX_ERR(0, 9088, __pyx_L1_error));

  /* "cuda/cuda.pyx":9090
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s:
 */
  if (unlikely(__Pyx_carray_from_py_unsigned_int(__pyx_v_reserved, __pyx_t_1, 16) < 0)) __PYX_ERR(0, 9090, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).reserved[0]) * (16));

  /* "cuda/cuda.pyx":9088
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_10__reduce_cython__[] = "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__397)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__398, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_12__setstate_cython__[] = "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__399)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__400, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9106
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9106, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9106, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9106, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9106, 0, __PYX_ERR(0, 9106, __pyx_L1_error));

  /* "cuda/cuda.pyx":9107
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":9106
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9108
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9108, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9108, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9108, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9108, 0, __PYX_ERR(0, 9108, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9110
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_4getPtr[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__401)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9110, 0, __PYX_ERR(0, 9110, __pyx_L1_error));

  /* "cuda/cuda.pyx":9111
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9110
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9112
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9112, 0, __PYX_ERR(0, 9112, __pyx_L1_error));

  /* "cuda/cuda.pyx":9113
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['value : ' + str(self.value)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9114
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['value : ' + str(self.value)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9115
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['value : ' + str(self.value)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_value_2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9116
 *             str_list = []
 *             str_list += ['value : ' + str(self.value)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9113
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['value : ' + str(self.value)]
 */
  }

  /* "cuda/cuda.pyx":9118
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9112
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9121
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.fence.value
 *     @value.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5value_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5value___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5value___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9121, 0, __PYX_ERR(0, 9121, __pyx_L1_error));

  /* "cuda/cuda.pyx":9122
 *     @property
 *     def value(self):
 *         return self._ptr[0].params.fence.value             # <<<<<<<<<<<<<<
 *     @value.setter
 *     def value(self, unsigned long long value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).params.fence.value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9121
 * 
 *     @property
 *     def value(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.fence.value
 *     @value.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9124
 *         return self._ptr[0].params.fence.value
 *     @value.setter
 *     def value(self, unsigned long long value):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.fence.value = value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  unsigned PY_LONG_LONG __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_value); if (unlikely((__pyx_v_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9124, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5value_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5value_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_value) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9124, 0, __PYX_ERR(0, 9124, __pyx_L1_error));

  /* "cuda/cuda.pyx":9126
 *     def value(self, unsigned long long value):
 *         pass
 *         self._ptr[0].params.fence.value = value             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u:
 */
  (__pyx_v_self->_ptr[0]).params.fence.value = __pyx_v_value;

  /* "cuda/cuda.pyx":9124
 *         return self._ptr[0].params.fence.value
 *     @value.setter
 *     def value(self, unsigned long long value):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.fence.value = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_8__reduce_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__402)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__403, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_10__setstate_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__404)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__405, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9144
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9144, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9144, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9144, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9144, 0, __PYX_ERR(0, 9144, __pyx_L1_error));

  /* "cuda/cuda.pyx":9145
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":9144
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9146
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9146, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9146, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9146, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9146, 0, __PYX_ERR(0, 9146, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9148
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_4getPtr[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__406)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9148, 0, __PYX_ERR(0, 9148, __pyx_L1_error));

  /* "cuda/cuda.pyx":9149
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9148
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9150
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9150, 0, __PYX_ERR(0, 9150, __pyx_L1_error));

  /* "cuda/cuda.pyx":9151
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fence : ' + hex(self.fence)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9152
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['fence : ' + hex(self.fence)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9153
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['fence : ' + hex(self.fence)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fence_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_fence, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9154
 *             str_list = []
 *             str_list += ['fence : ' + hex(self.fence)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9155
 *             str_list += ['fence : ' + hex(self.fence)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9151
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fence : ' + hex(self.fence)]
 */
  }

  /* "cuda/cuda.pyx":9157
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9150
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9160
 * 
 *     @property
 *     def fence(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].params.nvSciSync.fence
 *     @fence.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5fence_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5fence_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5fence___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5fence___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9160, 0, __PYX_ERR(0, 9160, __pyx_L1_error));

  /* "cuda/cuda.pyx":9161
 *     @property
 *     def fence(self):
 *         return <void_ptr>self._ptr[0].params.nvSciSync.fence             # <<<<<<<<<<<<<<
 *     @fence.setter
 *     def fence(self, fence):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).params.nvSciSync.fence)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9160
 * 
 *     @property
 *     def fence(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].params.nvSciSync.fence
 *     @fence.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.fence.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9163
 *         return <void_ptr>self._ptr[0].params.nvSciSync.fence
 *     @fence.setter
 *     def fence(self, fence):             # <<<<<<<<<<<<<<
 *         _cfence = utils.HelperInputVoidPtr(fence)
 *         self._ptr[0].params.nvSciSync.fence = <void*><void_ptr>_cfence.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5fence_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_fence); /*proto*/
static int __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5fence_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_fence) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5fence_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self), ((PyObject *)__pyx_v_fence));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5fence_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, PyObject *__pyx_v_fence) {
  PyObject *__pyx_v__cfence = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9163, 0, __PYX_ERR(0, 9163, __pyx_L1_error));

  /* "cuda/cuda.pyx":9164
 *     @fence.setter
 *     def fence(self, fence):
 *         _cfence = utils.HelperInputVoidPtr(fence)             # <<<<<<<<<<<<<<
 *         self._ptr[0].params.nvSciSync.fence = <void*><void_ptr>_cfence.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_fence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cfence = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9165
 *     def fence(self, fence):
 *         _cfence = utils.HelperInputVoidPtr(fence)
 *         self._ptr[0].params.nvSciSync.fence = <void*><void_ptr>_cfence.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cfence, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).params.nvSciSync.fence = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":9163
 *         return <void_ptr>self._ptr[0].params.nvSciSync.fence
 *     @fence.setter
 *     def fence(self, fence):             # <<<<<<<<<<<<<<
 *         _cfence = utils.HelperInputVoidPtr(fence)
 *         self._ptr[0].params.nvSciSync.fence = <void*><void_ptr>_cfence.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.fence.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cfence);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9167
 *         self._ptr[0].params.nvSciSync.fence = <void*><void_ptr>_cfence.cptr
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.nvSciSync.reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8reserved___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9167, 0, __PYX_ERR(0, 9167, __pyx_L1_error));

  /* "cuda/cuda.pyx":9168
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].params.nvSciSync.reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, unsigned long long reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).params.nvSciSync.reserved); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9167
 *         self._ptr[0].params.nvSciSync.fence = <void*><void_ptr>_cfence.cptr
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.nvSciSync.reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9170
 *         return self._ptr[0].params.nvSciSync.reserved
 *     @reserved.setter
 *     def reserved(self, unsigned long long reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.nvSciSync.reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_reserved) {
  unsigned PY_LONG_LONG __pyx_v_reserved;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_reserved); {
    __pyx_v_reserved = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_reserved); if (unlikely((__pyx_v_reserved == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9170, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9170, 0, __PYX_ERR(0, 9170, __pyx_L1_error));

  /* "cuda/cuda.pyx":9172
 *     def reserved(self, unsigned long long reserved):
 *         pass
 *         self._ptr[0].params.nvSciSync.reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s:
 */
  (__pyx_v_self->_ptr[0]).params.nvSciSync.reserved = __pyx_v_reserved;

  /* "cuda/cuda.pyx":9170
 *         return self._ptr[0].params.nvSciSync.reserved
 *     @reserved.setter
 *     def reserved(self, unsigned long long reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.nvSciSync.reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8__reduce_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__407)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__408, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_10__setstate_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__409)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__410, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9190
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9190, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9190, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9190, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9190, 0, __PYX_ERR(0, 9190, __pyx_L1_error));

  /* "cuda/cuda.pyx":9191
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":9190
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9192
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9192, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9192, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9192, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9192, 0, __PYX_ERR(0, 9192, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9194
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_4getPtr[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__411)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9194, 0, __PYX_ERR(0, 9194, __pyx_L1_error));

  /* "cuda/cuda.pyx":9195
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9194
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9196
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9196, 0, __PYX_ERR(0, 9196, __pyx_L1_error));

  /* "cuda/cuda.pyx":9197
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['key : ' + str(self.key)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9198
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['key : ' + str(self.key)]
 *             str_list += ['timeoutMs : ' + str(self.timeoutMs)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9199
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['key : ' + str(self.key)]             # <<<<<<<<<<<<<<
 *             str_list += ['timeoutMs : ' + str(self.timeoutMs)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_key_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_key, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9200
 *             str_list = []
 *             str_list += ['key : ' + str(self.key)]
 *             str_list += ['timeoutMs : ' + str(self.timeoutMs)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timeoutMs_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_timeoutMs, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9201
 *             str_list += ['key : ' + str(self.key)]
 *             str_list += ['timeoutMs : ' + str(self.timeoutMs)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9197
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['key : ' + str(self.key)]
 */
  }

  /* "cuda/cuda.pyx":9203
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9196
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9206
 * 
 *     @property
 *     def key(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.keyedMutex.key
 *     @key.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3key_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3key_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3key___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3key___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9206, 0, __PYX_ERR(0, 9206, __pyx_L1_error));

  /* "cuda/cuda.pyx":9207
 *     @property
 *     def key(self):
 *         return self._ptr[0].params.keyedMutex.key             # <<<<<<<<<<<<<<
 *     @key.setter
 *     def key(self, unsigned long long key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).params.keyedMutex.key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9206
 * 
 *     @property
 *     def key(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.keyedMutex.key
 *     @key.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.key.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9209
 *         return self._ptr[0].params.keyedMutex.key
 *     @key.setter
 *     def key(self, unsigned long long key):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.keyedMutex.key = key
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3key_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_key); /*proto*/
static int __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3key_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_key) {
  unsigned PY_LONG_LONG __pyx_v_key;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_key); {
    __pyx_v_key = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_key); if (unlikely((__pyx_v_key == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9209, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.key.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3key_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_key));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3key_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_key) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9209, 0, __PYX_ERR(0, 9209, __pyx_L1_error));

  /* "cuda/cuda.pyx":9211
 *     def key(self, unsigned long long key):
 *         pass
 *         self._ptr[0].params.keyedMutex.key = key             # <<<<<<<<<<<<<<
 *     @property
 *     def timeoutMs(self):
 */
  (__pyx_v_self->_ptr[0]).params.keyedMutex.key = __pyx_v_key;

  /* "cuda/cuda.pyx":9209
 *         return self._ptr[0].params.keyedMutex.key
 *     @key.setter
 *     def key(self, unsigned long long key):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.keyedMutex.key = key
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.key.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9213
 *         self._ptr[0].params.keyedMutex.key = key
 *     @property
 *     def timeoutMs(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.keyedMutex.timeoutMs
 *     @timeoutMs.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9timeoutMs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9timeoutMs_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9timeoutMs___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9timeoutMs___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9213, 0, __PYX_ERR(0, 9213, __pyx_L1_error));

  /* "cuda/cuda.pyx":9214
 *     @property
 *     def timeoutMs(self):
 *         return self._ptr[0].params.keyedMutex.timeoutMs             # <<<<<<<<<<<<<<
 *     @timeoutMs.setter
 *     def timeoutMs(self, unsigned int timeoutMs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).params.keyedMutex.timeoutMs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9213
 *         self._ptr[0].params.keyedMutex.key = key
 *     @property
 *     def timeoutMs(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.keyedMutex.timeoutMs
 *     @timeoutMs.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.timeoutMs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9216
 *         return self._ptr[0].params.keyedMutex.timeoutMs
 *     @timeoutMs.setter
 *     def timeoutMs(self, unsigned int timeoutMs):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.keyedMutex.timeoutMs = timeoutMs
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9timeoutMs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeoutMs); /*proto*/
static int __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9timeoutMs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeoutMs) {
  unsigned int __pyx_v_timeoutMs;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_timeoutMs); {
    __pyx_v_timeoutMs = __Pyx_PyInt_As_unsigned_int(__pyx_arg_timeoutMs); if (unlikely((__pyx_v_timeoutMs == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9216, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.timeoutMs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9timeoutMs_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self), ((unsigned int)__pyx_v_timeoutMs));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9timeoutMs_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, unsigned int __pyx_v_timeoutMs) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9216, 0, __PYX_ERR(0, 9216, __pyx_L1_error));

  /* "cuda/cuda.pyx":9218
 *     def timeoutMs(self, unsigned int timeoutMs):
 *         pass
 *         self._ptr[0].params.keyedMutex.timeoutMs = timeoutMs             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s:
 */
  (__pyx_v_self->_ptr[0]).params.keyedMutex.timeoutMs = __pyx_v_timeoutMs;

  /* "cuda/cuda.pyx":9216
 *         return self._ptr[0].params.keyedMutex.timeoutMs
 *     @timeoutMs.setter
 *     def timeoutMs(self, unsigned int timeoutMs):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.keyedMutex.timeoutMs = timeoutMs
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.timeoutMs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_8__reduce_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__412)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__413, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_10__setstate_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__414)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__415, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9240
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9240, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9240, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9240, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9240, 0, __PYX_ERR(0, 9240, __pyx_L1_error));

  /* "cuda/cuda.pyx":9241
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._fence = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s(_ptr=<void_ptr>self._ptr)
 */
  __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":9240
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9242
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._fence = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s(_ptr=<void_ptr>self._ptr)
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9242, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9242, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9242, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_2__init__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9242, 0, __PYX_ERR(0, 9242, __pyx_L1_error));

  /* "cuda/cuda.pyx":9243
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._fence = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 9243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_fence);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_fence));
  __pyx_v_self->_fence = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9244
 *     def __init__(self, void_ptr _ptr):
 *         self._fence = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s(_ptr=<void_ptr>self._ptr)
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 9244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_nvSciSync);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_nvSciSync));
  __pyx_v_self->_nvSciSync = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9245
 *         self._fence = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s(_ptr=<void_ptr>self._ptr)
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 9245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_keyedMutex);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_keyedMutex));
  __pyx_v_self->_keyedMutex = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9242
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._fence = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s(_ptr=<void_ptr>self._ptr)
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9246
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_4getPtr[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__416)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9246, 0, __PYX_ERR(0, 9246, __pyx_L1_error));

  /* "cuda/cuda.pyx":9247
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9246
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9248
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr33__pyx_v_line = NULL;
  PyObject *__pyx_9genexpr34__pyx_v_line = NULL;
  PyObject *__pyx_9genexpr35__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9248, 0, __PYX_ERR(0, 9248, __pyx_L1_error));

  /* "cuda/cuda.pyx":9249
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fence :\n' + '\n'.join(['    ' + line for line in str(self.fence).splitlines()])]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9250
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['fence :\n' + '\n'.join(['    ' + line for line in str(self.fence).splitlines()])]
 *             str_list += ['nvSciSync :\n' + '\n'.join(['    ' + line for line in str(self.nvSciSync).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9251
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['fence :\n' + '\n'.join(['    ' + line for line in str(self.fence).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['nvSciSync :\n' + '\n'.join(['    ' + line for line in str(self.nvSciSync).splitlines()])]
 *             str_list += ['keyedMutex :\n' + '\n'.join(['    ' + line for line in str(self.keyedMutex).splitlines()])]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9251, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fence_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9251, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9251, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9251, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 9251, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9251, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr33__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr33__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9251, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 9251, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_line); __pyx_9genexpr33__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_line); __pyx_9genexpr33__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_fence_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9252
 *             str_list = []
 *             str_list += ['fence :\n' + '\n'.join(['    ' + line for line in str(self.fence).splitlines()])]
 *             str_list += ['nvSciSync :\n' + '\n'.join(['    ' + line for line in str(self.nvSciSync).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['keyedMutex :\n' + '\n'.join(['    ' + line for line in str(self.keyedMutex).splitlines()])]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9252, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nvSciSync_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9252, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9252, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyUnicode_Splitlines(((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9252, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 9252, __pyx_L12_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9252, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr34__pyx_v_line, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr34__pyx_v_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9252, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 9252, __pyx_L12_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_line); __pyx_9genexpr34__pyx_v_line = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_line); __pyx_9genexpr34__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_nvSciSync, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9253
 *             str_list += ['fence :\n' + '\n'.join(['    ' + line for line in str(self.fence).splitlines()])]
 *             str_list += ['nvSciSync :\n' + '\n'.join(['    ' + line for line in str(self.nvSciSync).splitlines()])]
 *             str_list += ['keyedMutex :\n' + '\n'.join(['    ' + line for line in str(self.keyedMutex).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9253, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keyedMutex_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9253, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9253, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9253, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 9253, __pyx_L18_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9253, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr35__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr35__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9253, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 9253, __pyx_L18_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_line); __pyx_9genexpr35__pyx_v_line = 0;
      goto __pyx_L21_exit_scope;
      __pyx_L18_error:;
      __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_line); __pyx_9genexpr35__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L21_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_keyedMutex, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9254
 *             str_list += ['nvSciSync :\n' + '\n'.join(['    ' + line for line in str(self.nvSciSync).splitlines()])]
 *             str_list += ['keyedMutex :\n' + '\n'.join(['    ' + line for line in str(self.keyedMutex).splitlines()])]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9255
 *             str_list += ['keyedMutex :\n' + '\n'.join(['    ' + line for line in str(self.keyedMutex).splitlines()])]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9249
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['fence :\n' + '\n'.join(['    ' + line for line in str(self.fence).splitlines()])]
 */
  }

  /* "cuda/cuda.pyx":9257
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9248
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_line);
  __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_line);
  __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9260
 * 
 *     @property
 *     def fence(self):             # <<<<<<<<<<<<<<
 *         return self._fence
 *     @fence.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5fence_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5fence_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5fence___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5fence___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9260, 0, __PYX_ERR(0, 9260, __pyx_L1_error));

  /* "cuda/cuda.pyx":9261
 *     @property
 *     def fence(self):
 *         return self._fence             # <<<<<<<<<<<<<<
 *     @fence.setter
 *     def fence(self, fence not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_fence));
  __pyx_r = ((PyObject *)__pyx_v_self->_fence);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9260
 * 
 *     @property
 *     def fence(self):             # <<<<<<<<<<<<<<
 *         return self._fence
 *     @fence.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.fence.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9263
 *         return self._fence
 *     @fence.setter
 *     def fence(self, fence not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(fence):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5fence_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_fence); /*proto*/
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5fence_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_fence) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fence), __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s, 0, "fence", 0))) __PYX_ERR(0, 9263, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5fence_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *)__pyx_v_fence));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5fence_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *__pyx_v_fence) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9263, 0, __PYX_ERR(0, 9263, __pyx_L1_error));

  /* "cuda/cuda.pyx":9265
 *     def fence(self, fence not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s):
 *         pass
 *         for _attr in dir(fence):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_fence)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9265, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9265, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9265, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9265, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9265, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 9265, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":9266
 *         pass
 *         for _attr in dir(fence):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9266, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":9267
 *         for _attr in dir(fence):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._fence, _attr, getattr(fence, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":9266
 *         pass
 *         for _attr in dir(fence):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":9268
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._fence, _attr, getattr(fence, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9268, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":9269
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._fence, _attr, getattr(fence, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def nvSciSync(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_fence);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_fence), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 9269, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":9268
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._fence, _attr, getattr(fence, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":9265
 *     def fence(self, fence not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s):
 *         pass
 *         for _attr in dir(fence):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9263
 *         return self._fence
 *     @fence.setter
 *     def fence(self, fence not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(fence):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.fence.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9271
 *                 setattr(self._fence, _attr, getattr(fence, _attr))
 *     @property
 *     def nvSciSync(self):             # <<<<<<<<<<<<<<
 *         return self._nvSciSync
 *     @nvSciSync.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9nvSciSync_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9nvSciSync_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9nvSciSync___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9nvSciSync___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9271, 0, __PYX_ERR(0, 9271, __pyx_L1_error));

  /* "cuda/cuda.pyx":9272
 *     @property
 *     def nvSciSync(self):
 *         return self._nvSciSync             # <<<<<<<<<<<<<<
 *     @nvSciSync.setter
 *     def nvSciSync(self, nvSciSync not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_nvSciSync));
  __pyx_r = ((PyObject *)__pyx_v_self->_nvSciSync);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9271
 *                 setattr(self._fence, _attr, getattr(fence, _attr))
 *     @property
 *     def nvSciSync(self):             # <<<<<<<<<<<<<<
 *         return self._nvSciSync
 *     @nvSciSync.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.nvSciSync.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9274
 *         return self._nvSciSync
 *     @nvSciSync.setter
 *     def nvSciSync(self, nvSciSync not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(nvSciSync):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9nvSciSync_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_nvSciSync); /*proto*/
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9nvSciSync_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_nvSciSync) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nvSciSync), __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u, 0, "nvSciSync", 0))) __PYX_ERR(0, 9274, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9nvSciSync_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)__pyx_v_nvSciSync));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9nvSciSync_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *__pyx_v_nvSciSync) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9274, 0, __PYX_ERR(0, 9274, __pyx_L1_error));

  /* "cuda/cuda.pyx":9276
 *     def nvSciSync(self, nvSciSync not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u):
 *         pass
 *         for _attr in dir(nvSciSync):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_nvSciSync)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9276, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9276, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9276, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 9276, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":9277
 *         pass
 *         for _attr in dir(nvSciSync):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9277, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":9278
 *         for _attr in dir(nvSciSync):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._nvSciSync, _attr, getattr(nvSciSync, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":9277
 *         pass
 *         for _attr in dir(nvSciSync):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":9279
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._nvSciSync, _attr, getattr(nvSciSync, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9279, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":9280
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._nvSciSync, _attr, getattr(nvSciSync, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def keyedMutex(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_nvSciSync);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_nvSciSync), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9280, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 9280, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":9279
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._nvSciSync, _attr, getattr(nvSciSync, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":9276
 *     def nvSciSync(self, nvSciSync not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u):
 *         pass
 *         for _attr in dir(nvSciSync):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9274
 *         return self._nvSciSync
 *     @nvSciSync.setter
 *     def nvSciSync(self, nvSciSync not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(nvSciSync):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.nvSciSync.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9282
 *                 setattr(self._nvSciSync, _attr, getattr(nvSciSync, _attr))
 *     @property
 *     def keyedMutex(self):             # <<<<<<<<<<<<<<
 *         return self._keyedMutex
 *     @keyedMutex.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10keyedMutex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10keyedMutex_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10keyedMutex___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10keyedMutex___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9282, 0, __PYX_ERR(0, 9282, __pyx_L1_error));

  /* "cuda/cuda.pyx":9283
 *     @property
 *     def keyedMutex(self):
 *         return self._keyedMutex             # <<<<<<<<<<<<<<
 *     @keyedMutex.setter
 *     def keyedMutex(self, keyedMutex not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_keyedMutex));
  __pyx_r = ((PyObject *)__pyx_v_self->_keyedMutex);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9282
 *                 setattr(self._nvSciSync, _attr, getattr(nvSciSync, _attr))
 *     @property
 *     def keyedMutex(self):             # <<<<<<<<<<<<<<
 *         return self._keyedMutex
 *     @keyedMutex.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.keyedMutex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9285
 *         return self._keyedMutex
 *     @keyedMutex.setter
 *     def keyedMutex(self, keyedMutex not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(keyedMutex):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10keyedMutex_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_keyedMutex); /*proto*/
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10keyedMutex_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_keyedMutex) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keyedMutex), __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s, 0, "keyedMutex", 0))) __PYX_ERR(0, 9285, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10keyedMutex_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)__pyx_v_keyedMutex));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10keyedMutex_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *__pyx_v_keyedMutex) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9285, 0, __PYX_ERR(0, 9285, __pyx_L1_error));

  /* "cuda/cuda.pyx":9287
 *     def keyedMutex(self, keyedMutex not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s):
 *         pass
 *         for _attr in dir(keyedMutex):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_keyedMutex)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9287, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9287, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9287, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9287, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9287, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 9287, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":9288
 *         pass
 *         for _attr in dir(keyedMutex):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9288, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":9289
 *         for _attr in dir(keyedMutex):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._keyedMutex, _attr, getattr(keyedMutex, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":9288
 *         pass
 *         for _attr in dir(keyedMutex):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":9290
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._keyedMutex, _attr, getattr(keyedMutex, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9290, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":9291
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._keyedMutex, _attr, getattr(keyedMutex, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_keyedMutex);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_keyedMutex), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 9291, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":9290
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._keyedMutex, _attr, getattr(keyedMutex, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":9287
 *     def keyedMutex(self, keyedMutex not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s):
 *         pass
 *         for _attr in dir(keyedMutex):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9285
 *         return self._keyedMutex
 *     @keyedMutex.setter
 *     def keyedMutex(self, keyedMutex not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(keyedMutex):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.keyedMutex.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9293
 *                 setattr(self._keyedMutex, _attr, getattr(keyedMutex, _attr))
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8reserved___get__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9293, 0, __PYX_ERR(0, 9293, __pyx_L1_error));

  /* "cuda/cuda.pyx":9294
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].params.reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_unsigned_int((__pyx_v_self->_ptr[0]).params.reserved, 10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9293
 *                 setattr(self._keyedMutex, _attr, getattr(keyedMutex, _attr))
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].params.reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9296
 *         return self._ptr[0].params.reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1[10];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9296, 0, __PYX_ERR(0, 9296, __pyx_L1_error));

  /* "cuda/cuda.pyx":9298
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].params.reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st:
 */
  if (unlikely(__Pyx_carray_from_py_unsigned_int(__pyx_v_reserved, __pyx_t_1, 10) < 0)) __PYX_ERR(0, 9298, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).params.reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).params.reserved[0]) * (10));

  /* "cuda/cuda.pyx":9296
 *         return self._ptr[0].params.reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].params.reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8__reduce_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__417)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__418, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10__setstate_cython__[] = "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__419)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__420, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9326
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9326, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9326, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9326, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9326, 0, __PYX_ERR(0, 9326, __pyx_L1_error));

  /* "cuda/cuda.pyx":9327
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9328
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":9327
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9330
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._params = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s(_ptr=<void_ptr>self._ptr)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":9326
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9331
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._params = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9331, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9331, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9331, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9331, 0, __PYX_ERR(0, 9331, __pyx_L1_error));

  /* "cuda/cuda.pyx":9332
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._params = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 9332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_params);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_params));
  __pyx_v_self->_params = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9331
 *         else:
 *             self._ptr = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._params = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9333
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._params = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 9333, 0, __PYX_ERR(0, 9333, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":9335
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6getPtr[] = "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__421)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9335, 0, __PYX_ERR(0, 9335, __pyx_L1_error));

  /* "cuda/cuda.pyx":9336
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9335
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9337
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr36__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9337, 0, __PYX_ERR(0, 9337, __pyx_L1_error));

  /* "cuda/cuda.pyx":9338
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['params :\n' + '\n'.join(['    ' + line for line in str(self.params).splitlines()])]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9339
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['params :\n' + '\n'.join(['    ' + line for line in str(self.params).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9340
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['params :\n' + '\n'.join(['    ' + line for line in str(self.params).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9340, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_params_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9340, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9340, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9340, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 9340, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9340, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr36__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr36__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9340, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 9340, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr36__pyx_v_line); __pyx_9genexpr36__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr36__pyx_v_line); __pyx_9genexpr36__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_params, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9341
 *             str_list = []
 *             str_list += ['params :\n' + '\n'.join(['    ' + line for line in str(self.params).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9342
 *             str_list += ['params :\n' + '\n'.join(['    ' + line for line in str(self.params).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9343
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9338
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['params :\n' + '\n'.join(['    ' + line for line in str(self.params).splitlines()])]
 */
  }

  /* "cuda/cuda.pyx":9345
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9337
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr36__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9348
 * 
 *     @property
 *     def params(self):             # <<<<<<<<<<<<<<
 *         return self._params
 *     @params.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6params_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6params_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6params___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6params___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9348, 0, __PYX_ERR(0, 9348, __pyx_L1_error));

  /* "cuda/cuda.pyx":9349
 *     @property
 *     def params(self):
 *         return self._params             # <<<<<<<<<<<<<<
 *     @params.setter
 *     def params(self, params not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_params));
  __pyx_r = ((PyObject *)__pyx_v_self->_params);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9348
 * 
 *     @property
 *     def params(self):             # <<<<<<<<<<<<<<
 *         return self._params
 *     @params.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9351
 *         return self._params
 *     @params.setter
 *     def params(self, params not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(params):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6params_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_params); /*proto*/
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6params_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_params) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_params), __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s, 0, "params", 0))) __PYX_ERR(0, 9351, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6params_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)__pyx_v_params));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6params_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *__pyx_v_params) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9351, 0, __PYX_ERR(0, 9351, __pyx_L1_error));

  /* "cuda/cuda.pyx":9353
 *     def params(self, params not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s):
 *         pass
 *         for _attr in dir(params):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_params)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9353, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9353, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9353, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 9353, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":9354
 *         pass
 *         for _attr in dir(params):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9354, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":9355
 *         for _attr in dir(params):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._params, _attr, getattr(params, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":9354
 *         pass
 *         for _attr in dir(params):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":9356
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._params, _attr, getattr(params, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9356, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":9357
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._params, _attr, getattr(params, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_params);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_params), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 9357, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":9356
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._params, _attr, getattr(params, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":9353
 *     def params(self, params not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s):
 *         pass
 *         for _attr in dir(params):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9351
 *         return self._params
 *     @params.setter
 *     def params(self, params not None : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(params):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9359
 *                 setattr(self._params, _attr, getattr(params, _attr))
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9359, 0, __PYX_ERR(0, 9359, __pyx_L1_error));

  /* "cuda/cuda.pyx":9360
 *     @property
 *     def flags(self):
 *         return self._ptr[0].flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9359
 *                 setattr(self._params, _attr, getattr(params, _attr))
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9362
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9362, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9362, 0, __PYX_ERR(0, 9362, __pyx_L1_error));

  /* "cuda/cuda.pyx":9364
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].flags = flags             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  (__pyx_v_self->_ptr[0]).flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":9362
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9366
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9366, 0, __PYX_ERR(0, 9366, __pyx_L1_error));

  /* "cuda/cuda.pyx":9367
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_unsigned_int((__pyx_v_self->_ptr[0]).reserved, 16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9366
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9369
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1[16];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9369, 0, __PYX_ERR(0, 9369, __pyx_L1_error));

  /* "cuda/cuda.pyx":9371
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:
 */
  if (unlikely(__Pyx_carray_from_py_unsigned_int(__pyx_v_reserved, __pyx_t_1, 16) < 0)) __PYX_ERR(0, 9371, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).reserved[0]) * (16));

  /* "cuda/cuda.pyx":9369
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_10__reduce_cython__[] = "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__422)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__423, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_12__setstate_cython__[] = "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__424)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__425, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9393
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9393, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9393, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9393, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9393, 0, __PYX_ERR(0, 9393, __pyx_L1_error));

  /* "cuda/cuda.pyx":9394
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9395
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":9394
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9397
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":9393
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9398
 *         else:
 *             self._ptr = <ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9398, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9398, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9398, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9398, 0, __PYX_ERR(0, 9398, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9400
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._extSemArray is not NULL:
 *             free(self._extSemArray)
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_4__dealloc__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 9400, 0, __PYX_ERR(0, 9400, __pyx_L1_error));

  /* "cuda/cuda.pyx":9401
 *         pass
 *     def __dealloc__(self):
 *         if self._extSemArray is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._extSemArray)
 *         if self._paramsArray is not NULL:
 */
  __pyx_t_1 = ((__pyx_v_self->_extSemArray != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9402
 *     def __dealloc__(self):
 *         if self._extSemArray is not NULL:
 *             free(self._extSemArray)             # <<<<<<<<<<<<<<
 *         if self._paramsArray is not NULL:
 *             free(self._paramsArray)
 */
    free(__pyx_v_self->_extSemArray);

    /* "cuda/cuda.pyx":9401
 *         pass
 *     def __dealloc__(self):
 *         if self._extSemArray is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._extSemArray)
 *         if self._paramsArray is not NULL:
 */
  }

  /* "cuda/cuda.pyx":9403
 *         if self._extSemArray is not NULL:
 *             free(self._extSemArray)
 *         if self._paramsArray is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._paramsArray)
 *     def getPtr(self):
 */
  __pyx_t_1 = ((__pyx_v_self->_paramsArray != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9404
 *             free(self._extSemArray)
 *         if self._paramsArray is not NULL:
 *             free(self._paramsArray)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
    free(__pyx_v_self->_paramsArray);

    /* "cuda/cuda.pyx":9403
 *         if self._extSemArray is not NULL:
 *             free(self._extSemArray)
 *         if self._paramsArray is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._paramsArray)
 *     def getPtr(self):
 */
  }

  /* "cuda/cuda.pyx":9400
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._extSemArray is not NULL:
 *             free(self._extSemArray)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":9405
 *         if self._paramsArray is not NULL:
 *             free(self._paramsArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_6getPtr[] = "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__426)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9405, 0, __PYX_ERR(0, 9405, __pyx_L1_error));

  /* "cuda/cuda.pyx":9406
 *             free(self._paramsArray)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9405
 *         if self._paramsArray is not NULL:
 *             free(self._paramsArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9407
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9407, 0, __PYX_ERR(0, 9407, __pyx_L1_error));

  /* "cuda/cuda.pyx":9408
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['extSemArray : ' + str(self.extSemArray)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9409
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['extSemArray : ' + str(self.extSemArray)]
 *             str_list += ['paramsArray : ' + str(self.paramsArray)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9410
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['extSemArray : ' + str(self.extSemArray)]             # <<<<<<<<<<<<<<
 *             str_list += ['paramsArray : ' + str(self.paramsArray)]
 *             str_list += ['numExtSems : ' + str(self.numExtSems)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extSemArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_extSemArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9411
 *             str_list = []
 *             str_list += ['extSemArray : ' + str(self.extSemArray)]
 *             str_list += ['paramsArray : ' + str(self.paramsArray)]             # <<<<<<<<<<<<<<
 *             str_list += ['numExtSems : ' + str(self.numExtSems)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_paramsArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_paramsArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9412
 *             str_list += ['extSemArray : ' + str(self.extSemArray)]
 *             str_list += ['paramsArray : ' + str(self.paramsArray)]
 *             str_list += ['numExtSems : ' + str(self.numExtSems)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_numExtSems_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_numExtSems, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9413
 *             str_list += ['paramsArray : ' + str(self.paramsArray)]
 *             str_list += ['numExtSems : ' + str(self.numExtSems)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9408
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['extSemArray : ' + str(self.extSemArray)]
 */
  }

  /* "cuda/cuda.pyx":9415
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9407
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9418
 * 
 *     @property
 *     def extSemArray(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].extSemArray + x*sizeof(ccuda.CUexternalSemaphore) for x in range(self._extSemArray_length)]
 *         return [CUexternalSemaphore(_ptr=arr) for arr in arrs]
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11extSemArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11extSemArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11extSemArray___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11extSemArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_arrs = NULL;
  size_t __pyx_9genexpr37__pyx_v_x;
  PyObject *__pyx_9genexpr38__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9418, 0, __PYX_ERR(0, 9418, __pyx_L1_error));

  /* "cuda/cuda.pyx":9419
 *     @property
 *     def extSemArray(self):
 *         arrs = [<void_ptr>self._ptr[0].extSemArray + x*sizeof(ccuda.CUexternalSemaphore) for x in range(self._extSemArray_length)]             # <<<<<<<<<<<<<<
 *         return [CUexternalSemaphore(_ptr=arr) for arr in arrs]
 *     @extSemArray.setter
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_v_self->_extSemArray_length;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_9genexpr37__pyx_v_x = __pyx_t_4;
      __pyx_t_5 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).extSemArray) + (__pyx_9genexpr37__pyx_v_x * (sizeof(CUexternalSemaphore))))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9419, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 9419, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_v_arrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9420
 *     def extSemArray(self):
 *         arrs = [<void_ptr>self._ptr[0].extSemArray + x*sizeof(ccuda.CUexternalSemaphore) for x in range(self._extSemArray_length)]
 *         return [CUexternalSemaphore(_ptr=arr) for arr in arrs]             # <<<<<<<<<<<<<<
 *     @extSemArray.setter
 *     def extSemArray(self, val):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9420, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_v_arrs; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 9420, __pyx_L7_error)
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9420, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr38__pyx_v_arr, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9420, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ptr, __pyx_9genexpr38__pyx_v_arr) < 0) __PYX_ERR(0, 9420, __pyx_L7_error)
      __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalSemaphore), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 9420, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 9420, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_9genexpr38__pyx_v_arr); __pyx_9genexpr38__pyx_v_arr = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_9genexpr38__pyx_v_arr); __pyx_9genexpr38__pyx_v_arr = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9418
 * 
 *     @property
 *     def extSemArray(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].extSemArray + x*sizeof(ccuda.CUexternalSemaphore) for x in range(self._extSemArray_length)]
 *         return [CUexternalSemaphore(_ptr=arr) for arr in arrs]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.extSemArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arrs);
  __Pyx_XDECREF(__pyx_9genexpr38__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9422
 *         return [CUexternalSemaphore(_ptr=arr) for arr in arrs]
 *     @extSemArray.setter
 *     def extSemArray(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._extSemArray)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11extSemArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11extSemArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11extSemArray_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11extSemArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_val) {
  Py_ssize_t __pyx_v_idx;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  CUexternalSemaphore *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9422, 0, __PYX_ERR(0, 9422, __pyx_L1_error));

  /* "cuda/cuda.pyx":9423
 *     @extSemArray.setter
 *     def extSemArray(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._extSemArray)
 *             self._extSemArray_length = 0
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9423, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":9424
 *     def extSemArray(self, val):
 *         if len(val) == 0:
 *             free(self._extSemArray)             # <<<<<<<<<<<<<<
 *             self._extSemArray_length = 0
 *             self._ptr[0].extSemArray = NULL
 */
    free(__pyx_v_self->_extSemArray);

    /* "cuda/cuda.pyx":9425
 *         if len(val) == 0:
 *             free(self._extSemArray)
 *             self._extSemArray_length = 0             # <<<<<<<<<<<<<<
 *             self._ptr[0].extSemArray = NULL
 *         else:
 */
    __pyx_v_self->_extSemArray_length = 0;

    /* "cuda/cuda.pyx":9426
 *             free(self._extSemArray)
 *             self._extSemArray_length = 0
 *             self._ptr[0].extSemArray = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             if self._extSemArray_length != <size_t>len(val):
 */
    (__pyx_v_self->_ptr[0]).extSemArray = NULL;

    /* "cuda/cuda.pyx":9423
 *     @extSemArray.setter
 *     def extSemArray(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._extSemArray)
 *             self._extSemArray_length = 0
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9428
 *             self._ptr[0].extSemArray = NULL
 *         else:
 *             if self._extSemArray_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._extSemArray)
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))
 */
  /*else*/ {
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9428, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_v_self->_extSemArray_length != ((size_t)__pyx_t_1)) != 0);
    if (__pyx_t_2) {

      /* "cuda/cuda.pyx":9429
 *         else:
 *             if self._extSemArray_length != <size_t>len(val):
 *                 free(self._extSemArray)             # <<<<<<<<<<<<<<
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))
 *                 if self._extSemArray is NULL:
 */
      free(__pyx_v_self->_extSemArray);

      /* "cuda/cuda.pyx":9430
 *             if self._extSemArray_length != <size_t>len(val):
 *                 free(self._extSemArray)
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))             # <<<<<<<<<<<<<<
 *                 if self._extSemArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9430, __pyx_L1_error)
      __pyx_v_self->_extSemArray = ((CUexternalSemaphore *)calloc(__pyx_t_1, (sizeof(CUexternalSemaphore))));

      /* "cuda/cuda.pyx":9431
 *                 free(self._extSemArray)
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))
 *                 if self._extSemArray is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *                 self._extSemArray_length = <size_t>len(val)
 */
      __pyx_t_2 = ((__pyx_v_self->_extSemArray == NULL) != 0);
      if (unlikely(__pyx_t_2)) {

        /* "cuda/cuda.pyx":9432
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))
 *                 if self._extSemArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))             # <<<<<<<<<<<<<<
 *                 self._extSemArray_length = <size_t>len(val)
 *                 self._ptr[0].extSemArray = self._extSemArray
 */
        __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9432, __pyx_L1_error)
        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_n_u_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(CUexternalSemaphore))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 9432, __pyx_L1_error)

        /* "cuda/cuda.pyx":9431
 *                 free(self._extSemArray)
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))
 *                 if self._extSemArray is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *                 self._extSemArray_length = <size_t>len(val)
 */
      }

      /* "cuda/cuda.pyx":9433
 *                 if self._extSemArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *                 self._extSemArray_length = <size_t>len(val)             # <<<<<<<<<<<<<<
 *                 self._ptr[0].extSemArray = self._extSemArray
 *             for idx in range(len(val)):
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9433, __pyx_L1_error)
      __pyx_v_self->_extSemArray_length = ((size_t)__pyx_t_1);

      /* "cuda/cuda.pyx":9434
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *                 self._extSemArray_length = <size_t>len(val)
 *                 self._ptr[0].extSemArray = self._extSemArray             # <<<<<<<<<<<<<<
 *             for idx in range(len(val)):
 *                 self._extSemArray[idx] = (<CUexternalSemaphore>val[idx])._ptr[0]
 */
      __pyx_t_6 = __pyx_v_self->_extSemArray;
      (__pyx_v_self->_ptr[0]).extSemArray = __pyx_t_6;

      /* "cuda/cuda.pyx":9428
 *             self._ptr[0].extSemArray = NULL
 *         else:
 *             if self._extSemArray_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._extSemArray)
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))
 */
    }

    /* "cuda/cuda.pyx":9435
 *                 self._extSemArray_length = <size_t>len(val)
 *                 self._ptr[0].extSemArray = self._extSemArray
 *             for idx in range(len(val)):             # <<<<<<<<<<<<<<
 *                 self._extSemArray[idx] = (<CUexternalSemaphore>val[idx])._ptr[0]
 *     @property
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9435, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_1;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_idx = __pyx_t_8;

      /* "cuda/cuda.pyx":9436
 *                 self._ptr[0].extSemArray = self._extSemArray
 *             for idx in range(len(val)):
 *                 self._extSemArray[idx] = (<CUexternalSemaphore>val[idx])._ptr[0]             # <<<<<<<<<<<<<<
 *     @property
 *     def paramsArray(self):
 */
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_val, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      (__pyx_v_self->_extSemArray[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_t_5)->_ptr[0]);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":9422
 *         return [CUexternalSemaphore(_ptr=arr) for arr in arrs]
 *     @extSemArray.setter
 *     def extSemArray(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._extSemArray)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.extSemArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9438
 *                 self._extSemArray[idx] = (<CUexternalSemaphore>val[idx])._ptr[0]
 *     @property
 *     def paramsArray(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].paramsArray + x*sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) for x in range(self._paramsArray_length)]
 *         return [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(_ptr=arr) for arr in arrs]
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11paramsArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11paramsArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11paramsArray___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11paramsArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_arrs = NULL;
  size_t __pyx_9genexpr39__pyx_v_x;
  PyObject *__pyx_9genexpr40__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9438, 0, __PYX_ERR(0, 9438, __pyx_L1_error));

  /* "cuda/cuda.pyx":9439
 *     @property
 *     def paramsArray(self):
 *         arrs = [<void_ptr>self._ptr[0].paramsArray + x*sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) for x in range(self._paramsArray_length)]             # <<<<<<<<<<<<<<
 *         return [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(_ptr=arr) for arr in arrs]
 *     @paramsArray.setter
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_v_self->_paramsArray_length;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_9genexpr39__pyx_v_x = __pyx_t_4;
      __pyx_t_5 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).paramsArray) + (__pyx_9genexpr39__pyx_v_x * (sizeof(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9439, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 9439, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_v_arrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9440
 *     def paramsArray(self):
 *         arrs = [<void_ptr>self._ptr[0].paramsArray + x*sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) for x in range(self._paramsArray_length)]
 *         return [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(_ptr=arr) for arr in arrs]             # <<<<<<<<<<<<<<
 *     @paramsArray.setter
 *     def paramsArray(self, val):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9440, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_v_arrs; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 9440, __pyx_L7_error)
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9440, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr40__pyx_v_arr, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9440, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ptr, __pyx_9genexpr40__pyx_v_arr) < 0) __PYX_ERR(0, 9440, __pyx_L7_error)
      __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 9440, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 9440, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_arr); __pyx_9genexpr40__pyx_v_arr = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_arr); __pyx_9genexpr40__pyx_v_arr = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9438
 *                 self._extSemArray[idx] = (<CUexternalSemaphore>val[idx])._ptr[0]
 *     @property
 *     def paramsArray(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].paramsArray + x*sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) for x in range(self._paramsArray_length)]
 *         return [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(_ptr=arr) for arr in arrs]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.paramsArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arrs);
  __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9442
 *         return [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(_ptr=arr) for arr in arrs]
 *     @paramsArray.setter
 *     def paramsArray(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._paramsArray)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11paramsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11paramsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11paramsArray_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11paramsArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_val) {
  Py_ssize_t __pyx_v_idx;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9442, 0, __PYX_ERR(0, 9442, __pyx_L1_error));

  /* "cuda/cuda.pyx":9443
 *     @paramsArray.setter
 *     def paramsArray(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._paramsArray)
 *             self._paramsArray_length = 0
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9443, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":9444
 *     def paramsArray(self, val):
 *         if len(val) == 0:
 *             free(self._paramsArray)             # <<<<<<<<<<<<<<
 *             self._paramsArray_length = 0
 *             self._ptr[0].paramsArray = NULL
 */
    free(__pyx_v_self->_paramsArray);

    /* "cuda/cuda.pyx":9445
 *         if len(val) == 0:
 *             free(self._paramsArray)
 *             self._paramsArray_length = 0             # <<<<<<<<<<<<<<
 *             self._ptr[0].paramsArray = NULL
 *         else:
 */
    __pyx_v_self->_paramsArray_length = 0;

    /* "cuda/cuda.pyx":9446
 *             free(self._paramsArray)
 *             self._paramsArray_length = 0
 *             self._ptr[0].paramsArray = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             if self._paramsArray_length != <size_t>len(val):
 */
    (__pyx_v_self->_ptr[0]).paramsArray = NULL;

    /* "cuda/cuda.pyx":9443
 *     @paramsArray.setter
 *     def paramsArray(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._paramsArray)
 *             self._paramsArray_length = 0
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9448
 *             self._ptr[0].paramsArray = NULL
 *         else:
 *             if self._paramsArray_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._paramsArray)
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 */
  /*else*/ {
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9448, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_v_self->_paramsArray_length != ((size_t)__pyx_t_1)) != 0);
    if (__pyx_t_2) {

      /* "cuda/cuda.pyx":9449
 *         else:
 *             if self._paramsArray_length != <size_t>len(val):
 *                 free(self._paramsArray)             # <<<<<<<<<<<<<<
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 *                 if self._paramsArray is NULL:
 */
      free(__pyx_v_self->_paramsArray);

      /* "cuda/cuda.pyx":9450
 *             if self._paramsArray_length != <size_t>len(val):
 *                 free(self._paramsArray)
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))             # <<<<<<<<<<<<<<
 *                 if self._paramsArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)))
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9450, __pyx_L1_error)
      __pyx_v_self->_paramsArray = ((CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *)calloc(__pyx_t_1, (sizeof(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))));

      /* "cuda/cuda.pyx":9451
 *                 free(self._paramsArray)
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 *                 if self._paramsArray is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)))
 *                 self._paramsArray_length = <size_t>len(val)
 */
      __pyx_t_2 = ((__pyx_v_self->_paramsArray == NULL) != 0);
      if (unlikely(__pyx_t_2)) {

        /* "cuda/cuda.pyx":9452
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 *                 if self._paramsArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)))             # <<<<<<<<<<<<<<
 *                 self._paramsArray_length = <size_t>len(val)
 *                 self._ptr[0].paramsArray = self._paramsArray
 */
        __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9452, __pyx_L1_error)
        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9452, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9452, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9452, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_n_u_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9452, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9452, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9452, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9452, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9452, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 9452, __pyx_L1_error)

        /* "cuda/cuda.pyx":9451
 *                 free(self._paramsArray)
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 *                 if self._paramsArray is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)))
 *                 self._paramsArray_length = <size_t>len(val)
 */
      }

      /* "cuda/cuda.pyx":9453
 *                 if self._paramsArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)))
 *                 self._paramsArray_length = <size_t>len(val)             # <<<<<<<<<<<<<<
 *                 self._ptr[0].paramsArray = self._paramsArray
 *             for idx in range(len(val)):
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9453, __pyx_L1_error)
      __pyx_v_self->_paramsArray_length = ((size_t)__pyx_t_1);

      /* "cuda/cuda.pyx":9454
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)))
 *                 self._paramsArray_length = <size_t>len(val)
 *                 self._ptr[0].paramsArray = self._paramsArray             # <<<<<<<<<<<<<<
 *             for idx in range(len(val)):
 *                 memcpy(&self._paramsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>val[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 */
      __pyx_t_6 = __pyx_v_self->_paramsArray;
      (__pyx_v_self->_ptr[0]).paramsArray = __pyx_t_6;

      /* "cuda/cuda.pyx":9448
 *             self._ptr[0].paramsArray = NULL
 *         else:
 *             if self._paramsArray_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._paramsArray)
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 */
    }

    /* "cuda/cuda.pyx":9455
 *                 self._paramsArray_length = <size_t>len(val)
 *                 self._ptr[0].paramsArray = self._paramsArray
 *             for idx in range(len(val)):             # <<<<<<<<<<<<<<
 *                 memcpy(&self._paramsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>val[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 *     @property
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9455, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_1;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_idx = __pyx_t_8;

      /* "cuda/cuda.pyx":9456
 *                 self._ptr[0].paramsArray = self._paramsArray
 *             for idx in range(len(val)):
 *                 memcpy(&self._paramsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>val[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))             # <<<<<<<<<<<<<<
 *     @property
 *     def numExtSems(self):
 */
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_val, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9456, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      (void)(memcpy((&(__pyx_v_self->_paramsArray[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *)__pyx_t_5)->__pyx_base._ptr, (sizeof(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))));
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":9442
 *         return [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(_ptr=arr) for arr in arrs]
 *     @paramsArray.setter
 *     def paramsArray(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._paramsArray)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.paramsArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9458
 *                 memcpy(&self._paramsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>val[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 *     @property
 *     def numExtSems(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].numExtSems
 *     @numExtSems.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10numExtSems_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10numExtSems_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10numExtSems___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10numExtSems___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9458, 0, __PYX_ERR(0, 9458, __pyx_L1_error));

  /* "cuda/cuda.pyx":9459
 *     @property
 *     def numExtSems(self):
 *         return self._ptr[0].numExtSems             # <<<<<<<<<<<<<<
 *     @numExtSems.setter
 *     def numExtSems(self, unsigned int numExtSems):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).numExtSems); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9458
 *                 memcpy(&self._paramsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>val[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 *     @property
 *     def numExtSems(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].numExtSems
 *     @numExtSems.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.numExtSems.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9461
 *         return self._ptr[0].numExtSems
 *     @numExtSems.setter
 *     def numExtSems(self, unsigned int numExtSems):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].numExtSems = numExtSems
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10numExtSems_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numExtSems); /*proto*/
static int __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10numExtSems_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numExtSems) {
  unsigned int __pyx_v_numExtSems;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_numExtSems); {
    __pyx_v_numExtSems = __Pyx_PyInt_As_unsigned_int(__pyx_arg_numExtSems); if (unlikely((__pyx_v_numExtSems == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9461, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.numExtSems.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10numExtSems_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_numExtSems));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10numExtSems_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_numExtSems) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9461, 0, __PYX_ERR(0, 9461, __pyx_L1_error));

  /* "cuda/cuda.pyx":9463
 *     def numExtSems(self, unsigned int numExtSems):
 *         pass
 *         self._ptr[0].numExtSems = numExtSems             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:
 */
  (__pyx_v_self->_ptr[0]).numExtSems = __pyx_v_numExtSems;

  /* "cuda/cuda.pyx":9461
 *         return self._ptr[0].numExtSems
 *     @numExtSems.setter
 *     def numExtSems(self, unsigned int numExtSems):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].numExtSems = numExtSems
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.numExtSems.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10__reduce_cython__[] = "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__427)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__428, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_12__setstate_cython__[] = "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__429)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__430, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9485
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9485, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9485, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9485, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9485, 0, __PYX_ERR(0, 9485, __pyx_L1_error));

  /* "cuda/cuda.pyx":9486
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9487
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":9486
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9489
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":9485
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9490
 *         else:
 *             self._ptr = <ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9490, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9490, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9490, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9490, 0, __PYX_ERR(0, 9490, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9492
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._extSemArray is not NULL:
 *             free(self._extSemArray)
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_4__dealloc__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 9492, 0, __PYX_ERR(0, 9492, __pyx_L1_error));

  /* "cuda/cuda.pyx":9493
 *         pass
 *     def __dealloc__(self):
 *         if self._extSemArray is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._extSemArray)
 *         if self._paramsArray is not NULL:
 */
  __pyx_t_1 = ((__pyx_v_self->_extSemArray != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9494
 *     def __dealloc__(self):
 *         if self._extSemArray is not NULL:
 *             free(self._extSemArray)             # <<<<<<<<<<<<<<
 *         if self._paramsArray is not NULL:
 *             free(self._paramsArray)
 */
    free(__pyx_v_self->_extSemArray);

    /* "cuda/cuda.pyx":9493
 *         pass
 *     def __dealloc__(self):
 *         if self._extSemArray is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._extSemArray)
 *         if self._paramsArray is not NULL:
 */
  }

  /* "cuda/cuda.pyx":9495
 *         if self._extSemArray is not NULL:
 *             free(self._extSemArray)
 *         if self._paramsArray is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._paramsArray)
 *     def getPtr(self):
 */
  __pyx_t_1 = ((__pyx_v_self->_paramsArray != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9496
 *             free(self._extSemArray)
 *         if self._paramsArray is not NULL:
 *             free(self._paramsArray)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
    free(__pyx_v_self->_paramsArray);

    /* "cuda/cuda.pyx":9495
 *         if self._extSemArray is not NULL:
 *             free(self._extSemArray)
 *         if self._paramsArray is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._paramsArray)
 *     def getPtr(self):
 */
  }

  /* "cuda/cuda.pyx":9492
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._extSemArray is not NULL:
 *             free(self._extSemArray)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":9497
 *         if self._paramsArray is not NULL:
 *             free(self._paramsArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_6getPtr[] = "CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__431)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9497, 0, __PYX_ERR(0, 9497, __pyx_L1_error));

  /* "cuda/cuda.pyx":9498
 *             free(self._paramsArray)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9497
 *         if self._paramsArray is not NULL:
 *             free(self._paramsArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9499
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9499, 0, __PYX_ERR(0, 9499, __pyx_L1_error));

  /* "cuda/cuda.pyx":9500
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['extSemArray : ' + str(self.extSemArray)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9501
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['extSemArray : ' + str(self.extSemArray)]
 *             str_list += ['paramsArray : ' + str(self.paramsArray)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9502
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['extSemArray : ' + str(self.extSemArray)]             # <<<<<<<<<<<<<<
 *             str_list += ['paramsArray : ' + str(self.paramsArray)]
 *             str_list += ['numExtSems : ' + str(self.numExtSems)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extSemArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_extSemArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9503
 *             str_list = []
 *             str_list += ['extSemArray : ' + str(self.extSemArray)]
 *             str_list += ['paramsArray : ' + str(self.paramsArray)]             # <<<<<<<<<<<<<<
 *             str_list += ['numExtSems : ' + str(self.numExtSems)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_paramsArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_paramsArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9504
 *             str_list += ['extSemArray : ' + str(self.extSemArray)]
 *             str_list += ['paramsArray : ' + str(self.paramsArray)]
 *             str_list += ['numExtSems : ' + str(self.numExtSems)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_numExtSems_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_numExtSems, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9505
 *             str_list += ['paramsArray : ' + str(self.paramsArray)]
 *             str_list += ['numExtSems : ' + str(self.numExtSems)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9500
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['extSemArray : ' + str(self.extSemArray)]
 */
  }

  /* "cuda/cuda.pyx":9507
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9499
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9510
 * 
 *     @property
 *     def extSemArray(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].extSemArray + x*sizeof(ccuda.CUexternalSemaphore) for x in range(self._extSemArray_length)]
 *         return [CUexternalSemaphore(_ptr=arr) for arr in arrs]
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11extSemArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11extSemArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11extSemArray___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11extSemArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_arrs = NULL;
  size_t __pyx_9genexpr41__pyx_v_x;
  PyObject *__pyx_9genexpr42__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9510, 0, __PYX_ERR(0, 9510, __pyx_L1_error));

  /* "cuda/cuda.pyx":9511
 *     @property
 *     def extSemArray(self):
 *         arrs = [<void_ptr>self._ptr[0].extSemArray + x*sizeof(ccuda.CUexternalSemaphore) for x in range(self._extSemArray_length)]             # <<<<<<<<<<<<<<
 *         return [CUexternalSemaphore(_ptr=arr) for arr in arrs]
 *     @extSemArray.setter
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_v_self->_extSemArray_length;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_9genexpr41__pyx_v_x = __pyx_t_4;
      __pyx_t_5 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).extSemArray) + (__pyx_9genexpr41__pyx_v_x * (sizeof(CUexternalSemaphore))))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9511, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 9511, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_v_arrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9512
 *     def extSemArray(self):
 *         arrs = [<void_ptr>self._ptr[0].extSemArray + x*sizeof(ccuda.CUexternalSemaphore) for x in range(self._extSemArray_length)]
 *         return [CUexternalSemaphore(_ptr=arr) for arr in arrs]             # <<<<<<<<<<<<<<
 *     @extSemArray.setter
 *     def extSemArray(self, val):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9512, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_v_arrs; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 9512, __pyx_L7_error)
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9512, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr42__pyx_v_arr, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9512, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ptr, __pyx_9genexpr42__pyx_v_arr) < 0) __PYX_ERR(0, 9512, __pyx_L7_error)
      __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalSemaphore), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 9512, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 9512, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_arr); __pyx_9genexpr42__pyx_v_arr = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_arr); __pyx_9genexpr42__pyx_v_arr = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9510
 * 
 *     @property
 *     def extSemArray(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].extSemArray + x*sizeof(ccuda.CUexternalSemaphore) for x in range(self._extSemArray_length)]
 *         return [CUexternalSemaphore(_ptr=arr) for arr in arrs]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.extSemArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arrs);
  __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9514
 *         return [CUexternalSemaphore(_ptr=arr) for arr in arrs]
 *     @extSemArray.setter
 *     def extSemArray(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._extSemArray)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11extSemArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11extSemArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11extSemArray_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11extSemArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_val) {
  Py_ssize_t __pyx_v_idx;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  CUexternalSemaphore *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9514, 0, __PYX_ERR(0, 9514, __pyx_L1_error));

  /* "cuda/cuda.pyx":9515
 *     @extSemArray.setter
 *     def extSemArray(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._extSemArray)
 *             self._extSemArray_length = 0
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9515, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":9516
 *     def extSemArray(self, val):
 *         if len(val) == 0:
 *             free(self._extSemArray)             # <<<<<<<<<<<<<<
 *             self._extSemArray_length = 0
 *             self._ptr[0].extSemArray = NULL
 */
    free(__pyx_v_self->_extSemArray);

    /* "cuda/cuda.pyx":9517
 *         if len(val) == 0:
 *             free(self._extSemArray)
 *             self._extSemArray_length = 0             # <<<<<<<<<<<<<<
 *             self._ptr[0].extSemArray = NULL
 *         else:
 */
    __pyx_v_self->_extSemArray_length = 0;

    /* "cuda/cuda.pyx":9518
 *             free(self._extSemArray)
 *             self._extSemArray_length = 0
 *             self._ptr[0].extSemArray = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             if self._extSemArray_length != <size_t>len(val):
 */
    (__pyx_v_self->_ptr[0]).extSemArray = NULL;

    /* "cuda/cuda.pyx":9515
 *     @extSemArray.setter
 *     def extSemArray(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._extSemArray)
 *             self._extSemArray_length = 0
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9520
 *             self._ptr[0].extSemArray = NULL
 *         else:
 *             if self._extSemArray_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._extSemArray)
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))
 */
  /*else*/ {
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9520, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_v_self->_extSemArray_length != ((size_t)__pyx_t_1)) != 0);
    if (__pyx_t_2) {

      /* "cuda/cuda.pyx":9521
 *         else:
 *             if self._extSemArray_length != <size_t>len(val):
 *                 free(self._extSemArray)             # <<<<<<<<<<<<<<
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))
 *                 if self._extSemArray is NULL:
 */
      free(__pyx_v_self->_extSemArray);

      /* "cuda/cuda.pyx":9522
 *             if self._extSemArray_length != <size_t>len(val):
 *                 free(self._extSemArray)
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))             # <<<<<<<<<<<<<<
 *                 if self._extSemArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9522, __pyx_L1_error)
      __pyx_v_self->_extSemArray = ((CUexternalSemaphore *)calloc(__pyx_t_1, (sizeof(CUexternalSemaphore))));

      /* "cuda/cuda.pyx":9523
 *                 free(self._extSemArray)
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))
 *                 if self._extSemArray is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *                 self._extSemArray_length = <size_t>len(val)
 */
      __pyx_t_2 = ((__pyx_v_self->_extSemArray == NULL) != 0);
      if (unlikely(__pyx_t_2)) {

        /* "cuda/cuda.pyx":9524
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))
 *                 if self._extSemArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))             # <<<<<<<<<<<<<<
 *                 self._extSemArray_length = <size_t>len(val)
 *                 self._ptr[0].extSemArray = self._extSemArray
 */
        __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9524, __pyx_L1_error)
        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_n_u_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(CUexternalSemaphore))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 9524, __pyx_L1_error)

        /* "cuda/cuda.pyx":9523
 *                 free(self._extSemArray)
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))
 *                 if self._extSemArray is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *                 self._extSemArray_length = <size_t>len(val)
 */
      }

      /* "cuda/cuda.pyx":9525
 *                 if self._extSemArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *                 self._extSemArray_length = <size_t>len(val)             # <<<<<<<<<<<<<<
 *                 self._ptr[0].extSemArray = self._extSemArray
 *             for idx in range(len(val)):
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9525, __pyx_L1_error)
      __pyx_v_self->_extSemArray_length = ((size_t)__pyx_t_1);

      /* "cuda/cuda.pyx":9526
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *                 self._extSemArray_length = <size_t>len(val)
 *                 self._ptr[0].extSemArray = self._extSemArray             # <<<<<<<<<<<<<<
 *             for idx in range(len(val)):
 *                 self._extSemArray[idx] = (<CUexternalSemaphore>val[idx])._ptr[0]
 */
      __pyx_t_6 = __pyx_v_self->_extSemArray;
      (__pyx_v_self->_ptr[0]).extSemArray = __pyx_t_6;

      /* "cuda/cuda.pyx":9520
 *             self._ptr[0].extSemArray = NULL
 *         else:
 *             if self._extSemArray_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._extSemArray)
 *                 self._extSemArray = <ccuda.CUexternalSemaphore*> calloc(len(val), sizeof(ccuda.CUexternalSemaphore))
 */
    }

    /* "cuda/cuda.pyx":9527
 *                 self._extSemArray_length = <size_t>len(val)
 *                 self._ptr[0].extSemArray = self._extSemArray
 *             for idx in range(len(val)):             # <<<<<<<<<<<<<<
 *                 self._extSemArray[idx] = (<CUexternalSemaphore>val[idx])._ptr[0]
 *     @property
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9527, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_1;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_idx = __pyx_t_8;

      /* "cuda/cuda.pyx":9528
 *                 self._ptr[0].extSemArray = self._extSemArray
 *             for idx in range(len(val)):
 *                 self._extSemArray[idx] = (<CUexternalSemaphore>val[idx])._ptr[0]             # <<<<<<<<<<<<<<
 *     @property
 *     def paramsArray(self):
 */
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_val, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      (__pyx_v_self->_extSemArray[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_t_5)->_ptr[0]);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":9514
 *         return [CUexternalSemaphore(_ptr=arr) for arr in arrs]
 *     @extSemArray.setter
 *     def extSemArray(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._extSemArray)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.extSemArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9530
 *                 self._extSemArray[idx] = (<CUexternalSemaphore>val[idx])._ptr[0]
 *     @property
 *     def paramsArray(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].paramsArray + x*sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) for x in range(self._paramsArray_length)]
 *         return [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(_ptr=arr) for arr in arrs]
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11paramsArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11paramsArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11paramsArray___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11paramsArray___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_arrs = NULL;
  size_t __pyx_9genexpr43__pyx_v_x;
  PyObject *__pyx_9genexpr44__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9530, 0, __PYX_ERR(0, 9530, __pyx_L1_error));

  /* "cuda/cuda.pyx":9531
 *     @property
 *     def paramsArray(self):
 *         arrs = [<void_ptr>self._ptr[0].paramsArray + x*sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) for x in range(self._paramsArray_length)]             # <<<<<<<<<<<<<<
 *         return [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(_ptr=arr) for arr in arrs]
 *     @paramsArray.setter
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_v_self->_paramsArray_length;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_9genexpr43__pyx_v_x = __pyx_t_4;
      __pyx_t_5 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).paramsArray) + (__pyx_9genexpr43__pyx_v_x * (sizeof(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9531, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 9531, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_v_arrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9532
 *     def paramsArray(self):
 *         arrs = [<void_ptr>self._ptr[0].paramsArray + x*sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) for x in range(self._paramsArray_length)]
 *         return [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(_ptr=arr) for arr in arrs]             # <<<<<<<<<<<<<<
 *     @paramsArray.setter
 *     def paramsArray(self, val):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9532, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_v_arrs; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 9532, __pyx_L7_error)
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9532, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr44__pyx_v_arr, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9532, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ptr, __pyx_9genexpr44__pyx_v_arr) < 0) __PYX_ERR(0, 9532, __pyx_L7_error)
      __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 9532, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 9532, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_9genexpr44__pyx_v_arr); __pyx_9genexpr44__pyx_v_arr = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_9genexpr44__pyx_v_arr); __pyx_9genexpr44__pyx_v_arr = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9530
 *                 self._extSemArray[idx] = (<CUexternalSemaphore>val[idx])._ptr[0]
 *     @property
 *     def paramsArray(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].paramsArray + x*sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) for x in range(self._paramsArray_length)]
 *         return [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(_ptr=arr) for arr in arrs]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.paramsArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arrs);
  __Pyx_XDECREF(__pyx_9genexpr44__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9534
 *         return [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(_ptr=arr) for arr in arrs]
 *     @paramsArray.setter
 *     def paramsArray(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._paramsArray)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11paramsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11paramsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11paramsArray_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11paramsArray_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_val) {
  Py_ssize_t __pyx_v_idx;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9534, 0, __PYX_ERR(0, 9534, __pyx_L1_error));

  /* "cuda/cuda.pyx":9535
 *     @paramsArray.setter
 *     def paramsArray(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._paramsArray)
 *             self._paramsArray_length = 0
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9535, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":9536
 *     def paramsArray(self, val):
 *         if len(val) == 0:
 *             free(self._paramsArray)             # <<<<<<<<<<<<<<
 *             self._paramsArray_length = 0
 *             self._ptr[0].paramsArray = NULL
 */
    free(__pyx_v_self->_paramsArray);

    /* "cuda/cuda.pyx":9537
 *         if len(val) == 0:
 *             free(self._paramsArray)
 *             self._paramsArray_length = 0             # <<<<<<<<<<<<<<
 *             self._ptr[0].paramsArray = NULL
 *         else:
 */
    __pyx_v_self->_paramsArray_length = 0;

    /* "cuda/cuda.pyx":9538
 *             free(self._paramsArray)
 *             self._paramsArray_length = 0
 *             self._ptr[0].paramsArray = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             if self._paramsArray_length != <size_t>len(val):
 */
    (__pyx_v_self->_ptr[0]).paramsArray = NULL;

    /* "cuda/cuda.pyx":9535
 *     @paramsArray.setter
 *     def paramsArray(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._paramsArray)
 *             self._paramsArray_length = 0
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9540
 *             self._ptr[0].paramsArray = NULL
 *         else:
 *             if self._paramsArray_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._paramsArray)
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 */
  /*else*/ {
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9540, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_v_self->_paramsArray_length != ((size_t)__pyx_t_1)) != 0);
    if (__pyx_t_2) {

      /* "cuda/cuda.pyx":9541
 *         else:
 *             if self._paramsArray_length != <size_t>len(val):
 *                 free(self._paramsArray)             # <<<<<<<<<<<<<<
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 *                 if self._paramsArray is NULL:
 */
      free(__pyx_v_self->_paramsArray);

      /* "cuda/cuda.pyx":9542
 *             if self._paramsArray_length != <size_t>len(val):
 *                 free(self._paramsArray)
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))             # <<<<<<<<<<<<<<
 *                 if self._paramsArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)))
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9542, __pyx_L1_error)
      __pyx_v_self->_paramsArray = ((CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *)calloc(__pyx_t_1, (sizeof(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))));

      /* "cuda/cuda.pyx":9543
 *                 free(self._paramsArray)
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 *                 if self._paramsArray is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)))
 *                 self._paramsArray_length = <size_t>len(val)
 */
      __pyx_t_2 = ((__pyx_v_self->_paramsArray == NULL) != 0);
      if (unlikely(__pyx_t_2)) {

        /* "cuda/cuda.pyx":9544
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 *                 if self._paramsArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)))             # <<<<<<<<<<<<<<
 *                 self._paramsArray_length = <size_t>len(val)
 *                 self._ptr[0].paramsArray = self._paramsArray
 */
        __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9544, __pyx_L1_error)
        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_n_u_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9544, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 9544, __pyx_L1_error)

        /* "cuda/cuda.pyx":9543
 *                 free(self._paramsArray)
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 *                 if self._paramsArray is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)))
 *                 self._paramsArray_length = <size_t>len(val)
 */
      }

      /* "cuda/cuda.pyx":9545
 *                 if self._paramsArray is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)))
 *                 self._paramsArray_length = <size_t>len(val)             # <<<<<<<<<<<<<<
 *                 self._ptr[0].paramsArray = self._paramsArray
 *             for idx in range(len(val)):
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9545, __pyx_L1_error)
      __pyx_v_self->_paramsArray_length = ((size_t)__pyx_t_1);

      /* "cuda/cuda.pyx":9546
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)))
 *                 self._paramsArray_length = <size_t>len(val)
 *                 self._ptr[0].paramsArray = self._paramsArray             # <<<<<<<<<<<<<<
 *             for idx in range(len(val)):
 *                 memcpy(&self._paramsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>val[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 */
      __pyx_t_6 = __pyx_v_self->_paramsArray;
      (__pyx_v_self->_ptr[0]).paramsArray = __pyx_t_6;

      /* "cuda/cuda.pyx":9540
 *             self._ptr[0].paramsArray = NULL
 *         else:
 *             if self._paramsArray_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._paramsArray)
 *                 self._paramsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(val), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 */
    }

    /* "cuda/cuda.pyx":9547
 *                 self._paramsArray_length = <size_t>len(val)
 *                 self._ptr[0].paramsArray = self._paramsArray
 *             for idx in range(len(val)):             # <<<<<<<<<<<<<<
 *                 memcpy(&self._paramsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>val[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 *     @property
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 9547, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_1;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_idx = __pyx_t_8;

      /* "cuda/cuda.pyx":9548
 *                 self._ptr[0].paramsArray = self._paramsArray
 *             for idx in range(len(val)):
 *                 memcpy(&self._paramsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>val[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))             # <<<<<<<<<<<<<<
 *     @property
 *     def numExtSems(self):
 */
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_val, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      (void)(memcpy((&(__pyx_v_self->_paramsArray[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *)__pyx_t_5)->__pyx_base._ptr, (sizeof(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))));
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":9534
 *         return [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(_ptr=arr) for arr in arrs]
 *     @paramsArray.setter
 *     def paramsArray(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._paramsArray)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.paramsArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9550
 *                 memcpy(&self._paramsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>val[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 *     @property
 *     def numExtSems(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].numExtSems
 *     @numExtSems.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10numExtSems_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10numExtSems_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10numExtSems___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10numExtSems___get__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9550, 0, __PYX_ERR(0, 9550, __pyx_L1_error));

  /* "cuda/cuda.pyx":9551
 *     @property
 *     def numExtSems(self):
 *         return self._ptr[0].numExtSems             # <<<<<<<<<<<<<<
 *     @numExtSems.setter
 *     def numExtSems(self, unsigned int numExtSems):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).numExtSems); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9550
 *                 memcpy(&self._paramsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>val[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 *     @property
 *     def numExtSems(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].numExtSems
 *     @numExtSems.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.numExtSems.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9553
 *         return self._ptr[0].numExtSems
 *     @numExtSems.setter
 *     def numExtSems(self, unsigned int numExtSems):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].numExtSems = numExtSems
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10numExtSems_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numExtSems); /*proto*/
static int __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10numExtSems_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numExtSems) {
  unsigned int __pyx_v_numExtSems;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_numExtSems); {
    __pyx_v_numExtSems = __Pyx_PyInt_As_unsigned_int(__pyx_arg_numExtSems); if (unlikely((__pyx_v_numExtSems == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9553, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.numExtSems.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10numExtSems_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self), ((unsigned int)__pyx_v_numExtSems));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10numExtSems_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self, unsigned int __pyx_v_numExtSems) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9553, 0, __PYX_ERR(0, 9553, __pyx_L1_error));

  /* "cuda/cuda.pyx":9555
 *     def numExtSems(self, unsigned int numExtSems):
 *         pass
 *         self._ptr[0].numExtSems = numExtSems             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u:
 */
  (__pyx_v_self->_ptr[0]).numExtSems = __pyx_v_numExtSems;

  /* "cuda/cuda.pyx":9553
 *         return self._ptr[0].numExtSems
 *     @numExtSems.setter
 *     def numExtSems(self, unsigned int numExtSems):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].numExtSems = numExtSems
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.numExtSems.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10__reduce_cython__[] = "CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__432)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__433, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_12__setstate_cython__[] = "CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__434)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__435, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9573
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9573, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9573, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9573, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u___cinit__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9573, 0, __PYX_ERR(0, 9573, __pyx_L1_error));

  /* "cuda/cuda.pyx":9574
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._mipmap = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].resource.mipmap)
 */
  __pyx_v_self->_ptr = ((struct CUarrayMapInfo_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":9573
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9575
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._mipmap = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].resource.mipmap)
 *         self._array = CUarray(_ptr=<void_ptr>&self._ptr[0].resource.array)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9575, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9575, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9575, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_2__init__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9575, 0, __PYX_ERR(0, 9575, __pyx_L1_error));

  /* "cuda/cuda.pyx":9576
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._mipmap = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].resource.mipmap)             # <<<<<<<<<<<<<<
 *         self._array = CUarray(_ptr=<void_ptr>&self._ptr[0].resource.array)
 *     def getPtr(self):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).resource.mipmap))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 9576, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_mipmap);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_mipmap));
  __pyx_v_self->_mipmap = ((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9577
 *     def __init__(self, void_ptr _ptr):
 *         self._mipmap = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].resource.mipmap)
 *         self._array = CUarray(_ptr=<void_ptr>&self._ptr[0].resource.array)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).resource.array))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 9577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_array);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_array));
  __pyx_v_self->_array = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9575
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._mipmap = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].resource.mipmap)
 *         self._array = CUarray(_ptr=<void_ptr>&self._ptr[0].resource.array)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9578
 *         self._mipmap = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].resource.mipmap)
 *         self._array = CUarray(_ptr=<void_ptr>&self._ptr[0].resource.array)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_4getPtr[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__436)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9578, 0, __PYX_ERR(0, 9578, __pyx_L1_error));

  /* "cuda/cuda.pyx":9579
 *         self._array = CUarray(_ptr=<void_ptr>&self._ptr[0].resource.array)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9578
 *         self._mipmap = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].resource.mipmap)
 *         self._array = CUarray(_ptr=<void_ptr>&self._ptr[0].resource.array)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9580
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9580, 0, __PYX_ERR(0, 9580, __pyx_L1_error));

  /* "cuda/cuda.pyx":9581
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['mipmap : ' + str(self.mipmap)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9582
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['mipmap : ' + str(self.mipmap)]
 *             str_list += ['array : ' + str(self.array)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9583
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['mipmap : ' + str(self.mipmap)]             # <<<<<<<<<<<<<<
 *             str_list += ['array : ' + str(self.array)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mipmap_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_mipmap_3, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9584
 *             str_list = []
 *             str_list += ['mipmap : ' + str(self.mipmap)]
 *             str_list += ['array : ' + str(self.array)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_array_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_array_3, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9585
 *             str_list += ['mipmap : ' + str(self.mipmap)]
 *             str_list += ['array : ' + str(self.array)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9581
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['mipmap : ' + str(self.mipmap)]
 */
  }

  /* "cuda/cuda.pyx":9587
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9580
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9590
 * 
 *     @property
 *     def mipmap(self):             # <<<<<<<<<<<<<<
 *         return self._mipmap
 *     @mipmap.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6mipmap_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6mipmap_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6mipmap___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6mipmap___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9590, 0, __PYX_ERR(0, 9590, __pyx_L1_error));

  /* "cuda/cuda.pyx":9591
 *     @property
 *     def mipmap(self):
 *         return self._mipmap             # <<<<<<<<<<<<<<
 *     @mipmap.setter
 *     def mipmap(self, mipmap):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_mipmap));
  __pyx_r = ((PyObject *)__pyx_v_self->_mipmap);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9590
 * 
 *     @property
 *     def mipmap(self):             # <<<<<<<<<<<<<<
 *         return self._mipmap
 *     @mipmap.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.mipmap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9593
 *         return self._mipmap
 *     @mipmap.setter
 *     def mipmap(self, mipmap):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUmipmappedArray cmipmap
 *         if mipmap is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6mipmap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mipmap); /*proto*/
static int __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6mipmap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_mipmap) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6mipmap_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)__pyx_v_self), ((PyObject *)__pyx_v_mipmap));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6mipmap_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self, PyObject *__pyx_v_mipmap) {
  CUmipmappedArray __pyx_v_cmipmap;
  PyObject *__pyx_v_pmipmap = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9593, 0, __PYX_ERR(0, 9593, __pyx_L1_error));

  /* "cuda/cuda.pyx":9595
 *     def mipmap(self, mipmap):
 *         cdef ccuda.CUmipmappedArray cmipmap
 *         if mipmap is None:             # <<<<<<<<<<<<<<
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *         elif isinstance(mipmap, (CUmipmappedArray)):
 */
  __pyx_t_1 = (__pyx_v_mipmap == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":9596
 *         cdef ccuda.CUmipmappedArray cmipmap
 *         if mipmap is None:
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(mipmap, (CUmipmappedArray)):
 *             pmipmap = int(mipmap)
 */
    __pyx_v_cmipmap = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":9595
 *     def mipmap(self, mipmap):
 *         cdef ccuda.CUmipmappedArray cmipmap
 *         if mipmap is None:             # <<<<<<<<<<<<<<
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *         elif isinstance(mipmap, (CUmipmappedArray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9597
 *         if mipmap is None:
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *         elif isinstance(mipmap, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *             pmipmap = int(mipmap)
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_mipmap, __pyx_ptype_4cuda_4cuda_CUmipmappedArray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9598
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *         elif isinstance(mipmap, (CUmipmappedArray)):
 *             pmipmap = int(mipmap)             # <<<<<<<<<<<<<<
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_mipmap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pmipmap = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":9599
 *         elif isinstance(mipmap, (CUmipmappedArray)):
 *             pmipmap = int(mipmap)
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap             # <<<<<<<<<<<<<<
 *         else:
 *             pmipmap = int(CUmipmappedArray(mipmap))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pmipmap); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9599, __pyx_L1_error)
    __pyx_v_cmipmap = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":9597
 *         if mipmap is None:
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *         elif isinstance(mipmap, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *             pmipmap = int(mipmap)
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9601
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 *         else:
 *             pmipmap = int(CUmipmappedArray(mipmap))             # <<<<<<<<<<<<<<
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 *         self._mipmap._ptr[0] = cmipmap
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray), __pyx_v_mipmap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pmipmap = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":9602
 *         else:
 *             pmipmap = int(CUmipmappedArray(mipmap))
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap             # <<<<<<<<<<<<<<
 *         self._mipmap._ptr[0] = cmipmap
 *     @property
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pmipmap); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9602, __pyx_L1_error)
    __pyx_v_cmipmap = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":9603
 *             pmipmap = int(CUmipmappedArray(mipmap))
 *             cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 *         self._mipmap._ptr[0] = cmipmap             # <<<<<<<<<<<<<<
 *     @property
 *     def array(self):
 */
  (__pyx_v_self->_mipmap->_ptr[0]) = __pyx_v_cmipmap;

  /* "cuda/cuda.pyx":9593
 *         return self._mipmap
 *     @mipmap.setter
 *     def mipmap(self, mipmap):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUmipmappedArray cmipmap
 *         if mipmap is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.mipmap.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pmipmap);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9605
 *         self._mipmap._ptr[0] = cmipmap
 *     @property
 *     def array(self):             # <<<<<<<<<<<<<<
 *         return self._array
 *     @array.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5array_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5array_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5array___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5array___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9605, 0, __PYX_ERR(0, 9605, __pyx_L1_error));

  /* "cuda/cuda.pyx":9606
 *     @property
 *     def array(self):
 *         return self._array             # <<<<<<<<<<<<<<
 *     @array.setter
 *     def array(self, array):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_array));
  __pyx_r = ((PyObject *)__pyx_v_self->_array);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9605
 *         self._mipmap._ptr[0] = cmipmap
 *     @property
 *     def array(self):             # <<<<<<<<<<<<<<
 *         return self._array
 *     @array.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.array.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9608
 *         return self._array
 *     @array.setter
 *     def array(self, array):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray carray
 *         if array is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_array); /*proto*/
static int __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_array) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5array_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)__pyx_v_self), ((PyObject *)__pyx_v_array));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5array_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self, PyObject *__pyx_v_array) {
  CUarray __pyx_v_carray;
  PyObject *__pyx_v_parray = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9608, 0, __PYX_ERR(0, 9608, __pyx_L1_error));

  /* "cuda/cuda.pyx":9610
 *     def array(self, array):
 *         cdef ccuda.CUarray carray
 *         if array is None:             # <<<<<<<<<<<<<<
 *             carray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(array, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_array == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":9611
 *         cdef ccuda.CUarray carray
 *         if array is None:
 *             carray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(array, (CUarray)):
 *             parray = int(array)
 */
    __pyx_v_carray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":9610
 *     def array(self, array):
 *         cdef ccuda.CUarray carray
 *         if array is None:             # <<<<<<<<<<<<<<
 *             carray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(array, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9612
 *         if array is None:
 *             carray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(array, (CUarray)):             # <<<<<<<<<<<<<<
 *             parray = int(array)
 *             carray = <ccuda.CUarray><void_ptr>parray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_array, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9613
 *             carray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(array, (CUarray)):
 *             parray = int(array)             # <<<<<<<<<<<<<<
 *             carray = <ccuda.CUarray><void_ptr>parray
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_parray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":9614
 *         elif isinstance(array, (CUarray)):
 *             parray = int(array)
 *             carray = <ccuda.CUarray><void_ptr>parray             # <<<<<<<<<<<<<<
 *         else:
 *             parray = int(CUarray(array))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_parray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9614, __pyx_L1_error)
    __pyx_v_carray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":9612
 *         if array is None:
 *             carray = <ccuda.CUarray><void_ptr>0
 *         elif isinstance(array, (CUarray)):             # <<<<<<<<<<<<<<
 *             parray = int(array)
 *             carray = <ccuda.CUarray><void_ptr>parray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9616
 *             carray = <ccuda.CUarray><void_ptr>parray
 *         else:
 *             parray = int(CUarray(array))             # <<<<<<<<<<<<<<
 *             carray = <ccuda.CUarray><void_ptr>parray
 *         self._array._ptr[0] = carray
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_parray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":9617
 *         else:
 *             parray = int(CUarray(array))
 *             carray = <ccuda.CUarray><void_ptr>parray             # <<<<<<<<<<<<<<
 *         self._array._ptr[0] = carray
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_parray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9617, __pyx_L1_error)
    __pyx_v_carray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":9618
 *             parray = int(CUarray(array))
 *             carray = <ccuda.CUarray><void_ptr>parray
 *         self._array._ptr[0] = carray             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s:
 */
  (__pyx_v_self->_array->_ptr[0]) = __pyx_v_carray;

  /* "cuda/cuda.pyx":9608
 *         return self._array
 *     @array.setter
 *     def array(self, array):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUarray carray
 *         if array is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.array.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parray);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_8__reduce_cython__[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__437)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__438, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_10__setstate_cython__[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__439)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__440, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9648
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9648, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9648, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9648, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9648, 0, __PYX_ERR(0, 9648, __pyx_L1_error));

  /* "cuda/cuda.pyx":9649
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUarrayMapInfo_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":9648
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9650
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9650, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9650, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9650, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9650, 0, __PYX_ERR(0, 9650, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9652
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_4getPtr[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__441)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9652, 0, __PYX_ERR(0, 9652, __pyx_L1_error));

  /* "cuda/cuda.pyx":9653
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9652
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9654
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9654, 0, __PYX_ERR(0, 9654, __pyx_L1_error));

  /* "cuda/cuda.pyx":9655
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['level : ' + str(self.level)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9656
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['level : ' + str(self.level)]
 *             str_list += ['layer : ' + str(self.layer)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9657
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['level : ' + str(self.level)]             # <<<<<<<<<<<<<<
 *             str_list += ['layer : ' + str(self.layer)]
 *             str_list += ['offsetX : ' + str(self.offsetX)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_level_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_level, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9658
 *             str_list = []
 *             str_list += ['level : ' + str(self.level)]
 *             str_list += ['layer : ' + str(self.layer)]             # <<<<<<<<<<<<<<
 *             str_list += ['offsetX : ' + str(self.offsetX)]
 *             str_list += ['offsetY : ' + str(self.offsetY)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_layer_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_layer, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9659
 *             str_list += ['level : ' + str(self.level)]
 *             str_list += ['layer : ' + str(self.layer)]
 *             str_list += ['offsetX : ' + str(self.offsetX)]             # <<<<<<<<<<<<<<
 *             str_list += ['offsetY : ' + str(self.offsetY)]
 *             str_list += ['offsetZ : ' + str(self.offsetZ)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offsetX_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_offsetX, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9660
 *             str_list += ['layer : ' + str(self.layer)]
 *             str_list += ['offsetX : ' + str(self.offsetX)]
 *             str_list += ['offsetY : ' + str(self.offsetY)]             # <<<<<<<<<<<<<<
 *             str_list += ['offsetZ : ' + str(self.offsetZ)]
 *             str_list += ['extentWidth : ' + str(self.extentWidth)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offsetY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_offsetY, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9661
 *             str_list += ['offsetX : ' + str(self.offsetX)]
 *             str_list += ['offsetY : ' + str(self.offsetY)]
 *             str_list += ['offsetZ : ' + str(self.offsetZ)]             # <<<<<<<<<<<<<<
 *             str_list += ['extentWidth : ' + str(self.extentWidth)]
 *             str_list += ['extentHeight : ' + str(self.extentHeight)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offsetZ_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_offsetZ, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9662
 *             str_list += ['offsetY : ' + str(self.offsetY)]
 *             str_list += ['offsetZ : ' + str(self.offsetZ)]
 *             str_list += ['extentWidth : ' + str(self.extentWidth)]             # <<<<<<<<<<<<<<
 *             str_list += ['extentHeight : ' + str(self.extentHeight)]
 *             str_list += ['extentDepth : ' + str(self.extentDepth)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extentWidth_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_extentWidth, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9663
 *             str_list += ['offsetZ : ' + str(self.offsetZ)]
 *             str_list += ['extentWidth : ' + str(self.extentWidth)]
 *             str_list += ['extentHeight : ' + str(self.extentHeight)]             # <<<<<<<<<<<<<<
 *             str_list += ['extentDepth : ' + str(self.extentDepth)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extentHeight_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_extentHeight, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9664
 *             str_list += ['extentWidth : ' + str(self.extentWidth)]
 *             str_list += ['extentHeight : ' + str(self.extentHeight)]
 *             str_list += ['extentDepth : ' + str(self.extentDepth)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extentDepth_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_extentDepth, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9665
 *             str_list += ['extentHeight : ' + str(self.extentHeight)]
 *             str_list += ['extentDepth : ' + str(self.extentDepth)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9655
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['level : ' + str(self.level)]
 */
  }

  /* "cuda/cuda.pyx":9667
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9654
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9670
 * 
 *     @property
 *     def level(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.level
 *     @level.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5level_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5level_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5level___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5level___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9670, 0, __PYX_ERR(0, 9670, __pyx_L1_error));

  /* "cuda/cuda.pyx":9671
 *     @property
 *     def level(self):
 *         return self._ptr[0].subresource.sparseLevel.level             # <<<<<<<<<<<<<<
 *     @level.setter
 *     def level(self, unsigned int level):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).subresource.sparseLevel.level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9670
 * 
 *     @property
 *     def level(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.level
 *     @level.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.level.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9673
 *         return self._ptr[0].subresource.sparseLevel.level
 *     @level.setter
 *     def level(self, unsigned int level):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.level = level
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_level); /*proto*/
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_level) {
  unsigned int __pyx_v_level;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_level); {
    __pyx_v_level = __Pyx_PyInt_As_unsigned_int(__pyx_arg_level); if (unlikely((__pyx_v_level == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9673, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.level.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5level_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self), ((unsigned int)__pyx_v_level));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5level_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_level) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9673, 0, __PYX_ERR(0, 9673, __pyx_L1_error));

  /* "cuda/cuda.pyx":9675
 *     def level(self, unsigned int level):
 *         pass
 *         self._ptr[0].subresource.sparseLevel.level = level             # <<<<<<<<<<<<<<
 *     @property
 *     def layer(self):
 */
  (__pyx_v_self->_ptr[0]).subresource.sparseLevel.level = __pyx_v_level;

  /* "cuda/cuda.pyx":9673
 *         return self._ptr[0].subresource.sparseLevel.level
 *     @level.setter
 *     def level(self, unsigned int level):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.level = level
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.level.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9677
 *         self._ptr[0].subresource.sparseLevel.level = level
 *     @property
 *     def layer(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.layer
 *     @layer.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5layer_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5layer_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5layer___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5layer___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9677, 0, __PYX_ERR(0, 9677, __pyx_L1_error));

  /* "cuda/cuda.pyx":9678
 *     @property
 *     def layer(self):
 *         return self._ptr[0].subresource.sparseLevel.layer             # <<<<<<<<<<<<<<
 *     @layer.setter
 *     def layer(self, unsigned int layer):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).subresource.sparseLevel.layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9677
 *         self._ptr[0].subresource.sparseLevel.level = level
 *     @property
 *     def layer(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.layer
 *     @layer.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.layer.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9680
 *         return self._ptr[0].subresource.sparseLevel.layer
 *     @layer.setter
 *     def layer(self, unsigned int layer):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.layer = layer
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5layer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_layer); /*proto*/
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5layer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_layer) {
  unsigned int __pyx_v_layer;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_layer); {
    __pyx_v_layer = __Pyx_PyInt_As_unsigned_int(__pyx_arg_layer); if (unlikely((__pyx_v_layer == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9680, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.layer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5layer_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self), ((unsigned int)__pyx_v_layer));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5layer_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_layer) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9680, 0, __PYX_ERR(0, 9680, __pyx_L1_error));

  /* "cuda/cuda.pyx":9682
 *     def layer(self, unsigned int layer):
 *         pass
 *         self._ptr[0].subresource.sparseLevel.layer = layer             # <<<<<<<<<<<<<<
 *     @property
 *     def offsetX(self):
 */
  (__pyx_v_self->_ptr[0]).subresource.sparseLevel.layer = __pyx_v_layer;

  /* "cuda/cuda.pyx":9680
 *         return self._ptr[0].subresource.sparseLevel.layer
 *     @layer.setter
 *     def layer(self, unsigned int layer):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.layer = layer
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.layer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9684
 *         self._ptr[0].subresource.sparseLevel.layer = layer
 *     @property
 *     def offsetX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.offsetX
 *     @offsetX.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetX_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetX_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetX___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetX___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9684, 0, __PYX_ERR(0, 9684, __pyx_L1_error));

  /* "cuda/cuda.pyx":9685
 *     @property
 *     def offsetX(self):
 *         return self._ptr[0].subresource.sparseLevel.offsetX             # <<<<<<<<<<<<<<
 *     @offsetX.setter
 *     def offsetX(self, unsigned int offsetX):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).subresource.sparseLevel.offsetX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9684
 *         self._ptr[0].subresource.sparseLevel.layer = layer
 *     @property
 *     def offsetX(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.offsetX
 *     @offsetX.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.offsetX.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9687
 *         return self._ptr[0].subresource.sparseLevel.offsetX
 *     @offsetX.setter
 *     def offsetX(self, unsigned int offsetX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.offsetX = offsetX
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offsetX); /*proto*/
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetX_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offsetX) {
  unsigned int __pyx_v_offsetX;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_offsetX); {
    __pyx_v_offsetX = __Pyx_PyInt_As_unsigned_int(__pyx_arg_offsetX); if (unlikely((__pyx_v_offsetX == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9687, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.offsetX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetX_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self), ((unsigned int)__pyx_v_offsetX));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetX_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_offsetX) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9687, 0, __PYX_ERR(0, 9687, __pyx_L1_error));

  /* "cuda/cuda.pyx":9689
 *     def offsetX(self, unsigned int offsetX):
 *         pass
 *         self._ptr[0].subresource.sparseLevel.offsetX = offsetX             # <<<<<<<<<<<<<<
 *     @property
 *     def offsetY(self):
 */
  (__pyx_v_self->_ptr[0]).subresource.sparseLevel.offsetX = __pyx_v_offsetX;

  /* "cuda/cuda.pyx":9687
 *         return self._ptr[0].subresource.sparseLevel.offsetX
 *     @offsetX.setter
 *     def offsetX(self, unsigned int offsetX):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.offsetX = offsetX
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.offsetX.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9691
 *         self._ptr[0].subresource.sparseLevel.offsetX = offsetX
 *     @property
 *     def offsetY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.offsetY
 *     @offsetY.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetY_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetY_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetY___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetY___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9691, 0, __PYX_ERR(0, 9691, __pyx_L1_error));

  /* "cuda/cuda.pyx":9692
 *     @property
 *     def offsetY(self):
 *         return self._ptr[0].subresource.sparseLevel.offsetY             # <<<<<<<<<<<<<<
 *     @offsetY.setter
 *     def offsetY(self, unsigned int offsetY):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).subresource.sparseLevel.offsetY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9691
 *         self._ptr[0].subresource.sparseLevel.offsetX = offsetX
 *     @property
 *     def offsetY(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.offsetY
 *     @offsetY.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.offsetY.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9694
 *         return self._ptr[0].subresource.sparseLevel.offsetY
 *     @offsetY.setter
 *     def offsetY(self, unsigned int offsetY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.offsetY = offsetY
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offsetY); /*proto*/
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetY_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offsetY) {
  unsigned int __pyx_v_offsetY;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_offsetY); {
    __pyx_v_offsetY = __Pyx_PyInt_As_unsigned_int(__pyx_arg_offsetY); if (unlikely((__pyx_v_offsetY == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9694, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.offsetY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetY_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self), ((unsigned int)__pyx_v_offsetY));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetY_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_offsetY) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9694, 0, __PYX_ERR(0, 9694, __pyx_L1_error));

  /* "cuda/cuda.pyx":9696
 *     def offsetY(self, unsigned int offsetY):
 *         pass
 *         self._ptr[0].subresource.sparseLevel.offsetY = offsetY             # <<<<<<<<<<<<<<
 *     @property
 *     def offsetZ(self):
 */
  (__pyx_v_self->_ptr[0]).subresource.sparseLevel.offsetY = __pyx_v_offsetY;

  /* "cuda/cuda.pyx":9694
 *         return self._ptr[0].subresource.sparseLevel.offsetY
 *     @offsetY.setter
 *     def offsetY(self, unsigned int offsetY):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.offsetY = offsetY
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.offsetY.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9698
 *         self._ptr[0].subresource.sparseLevel.offsetY = offsetY
 *     @property
 *     def offsetZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.offsetZ
 *     @offsetZ.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetZ_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetZ_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetZ___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetZ___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9698, 0, __PYX_ERR(0, 9698, __pyx_L1_error));

  /* "cuda/cuda.pyx":9699
 *     @property
 *     def offsetZ(self):
 *         return self._ptr[0].subresource.sparseLevel.offsetZ             # <<<<<<<<<<<<<<
 *     @offsetZ.setter
 *     def offsetZ(self, unsigned int offsetZ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).subresource.sparseLevel.offsetZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9698
 *         self._ptr[0].subresource.sparseLevel.offsetY = offsetY
 *     @property
 *     def offsetZ(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.offsetZ
 *     @offsetZ.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.offsetZ.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9701
 *         return self._ptr[0].subresource.sparseLevel.offsetZ
 *     @offsetZ.setter
 *     def offsetZ(self, unsigned int offsetZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.offsetZ = offsetZ
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offsetZ); /*proto*/
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetZ_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offsetZ) {
  unsigned int __pyx_v_offsetZ;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_offsetZ); {
    __pyx_v_offsetZ = __Pyx_PyInt_As_unsigned_int(__pyx_arg_offsetZ); if (unlikely((__pyx_v_offsetZ == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9701, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.offsetZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetZ_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self), ((unsigned int)__pyx_v_offsetZ));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetZ_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_offsetZ) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9701, 0, __PYX_ERR(0, 9701, __pyx_L1_error));

  /* "cuda/cuda.pyx":9703
 *     def offsetZ(self, unsigned int offsetZ):
 *         pass
 *         self._ptr[0].subresource.sparseLevel.offsetZ = offsetZ             # <<<<<<<<<<<<<<
 *     @property
 *     def extentWidth(self):
 */
  (__pyx_v_self->_ptr[0]).subresource.sparseLevel.offsetZ = __pyx_v_offsetZ;

  /* "cuda/cuda.pyx":9701
 *         return self._ptr[0].subresource.sparseLevel.offsetZ
 *     @offsetZ.setter
 *     def offsetZ(self, unsigned int offsetZ):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.offsetZ = offsetZ
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.offsetZ.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9705
 *         self._ptr[0].subresource.sparseLevel.offsetZ = offsetZ
 *     @property
 *     def extentWidth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.extentWidth
 *     @extentWidth.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentWidth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentWidth_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentWidth___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentWidth___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9705, 0, __PYX_ERR(0, 9705, __pyx_L1_error));

  /* "cuda/cuda.pyx":9706
 *     @property
 *     def extentWidth(self):
 *         return self._ptr[0].subresource.sparseLevel.extentWidth             # <<<<<<<<<<<<<<
 *     @extentWidth.setter
 *     def extentWidth(self, unsigned int extentWidth):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).subresource.sparseLevel.extentWidth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9705
 *         self._ptr[0].subresource.sparseLevel.offsetZ = offsetZ
 *     @property
 *     def extentWidth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.extentWidth
 *     @extentWidth.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.extentWidth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9708
 *         return self._ptr[0].subresource.sparseLevel.extentWidth
 *     @extentWidth.setter
 *     def extentWidth(self, unsigned int extentWidth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.extentWidth = extentWidth
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentWidth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_extentWidth); /*proto*/
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentWidth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_extentWidth) {
  unsigned int __pyx_v_extentWidth;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_extentWidth); {
    __pyx_v_extentWidth = __Pyx_PyInt_As_unsigned_int(__pyx_arg_extentWidth); if (unlikely((__pyx_v_extentWidth == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9708, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.extentWidth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentWidth_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self), ((unsigned int)__pyx_v_extentWidth));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentWidth_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_extentWidth) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9708, 0, __PYX_ERR(0, 9708, __pyx_L1_error));

  /* "cuda/cuda.pyx":9710
 *     def extentWidth(self, unsigned int extentWidth):
 *         pass
 *         self._ptr[0].subresource.sparseLevel.extentWidth = extentWidth             # <<<<<<<<<<<<<<
 *     @property
 *     def extentHeight(self):
 */
  (__pyx_v_self->_ptr[0]).subresource.sparseLevel.extentWidth = __pyx_v_extentWidth;

  /* "cuda/cuda.pyx":9708
 *         return self._ptr[0].subresource.sparseLevel.extentWidth
 *     @extentWidth.setter
 *     def extentWidth(self, unsigned int extentWidth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.extentWidth = extentWidth
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.extentWidth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9712
 *         self._ptr[0].subresource.sparseLevel.extentWidth = extentWidth
 *     @property
 *     def extentHeight(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.extentHeight
 *     @extentHeight.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_12extentHeight_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_12extentHeight_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_12extentHeight___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_12extentHeight___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9712, 0, __PYX_ERR(0, 9712, __pyx_L1_error));

  /* "cuda/cuda.pyx":9713
 *     @property
 *     def extentHeight(self):
 *         return self._ptr[0].subresource.sparseLevel.extentHeight             # <<<<<<<<<<<<<<
 *     @extentHeight.setter
 *     def extentHeight(self, unsigned int extentHeight):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).subresource.sparseLevel.extentHeight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9712
 *         self._ptr[0].subresource.sparseLevel.extentWidth = extentWidth
 *     @property
 *     def extentHeight(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.extentHeight
 *     @extentHeight.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.extentHeight.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9715
 *         return self._ptr[0].subresource.sparseLevel.extentHeight
 *     @extentHeight.setter
 *     def extentHeight(self, unsigned int extentHeight):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.extentHeight = extentHeight
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_12extentHeight_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_extentHeight); /*proto*/
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_12extentHeight_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_extentHeight) {
  unsigned int __pyx_v_extentHeight;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_extentHeight); {
    __pyx_v_extentHeight = __Pyx_PyInt_As_unsigned_int(__pyx_arg_extentHeight); if (unlikely((__pyx_v_extentHeight == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9715, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.extentHeight.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_12extentHeight_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self), ((unsigned int)__pyx_v_extentHeight));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_12extentHeight_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_extentHeight) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9715, 0, __PYX_ERR(0, 9715, __pyx_L1_error));

  /* "cuda/cuda.pyx":9717
 *     def extentHeight(self, unsigned int extentHeight):
 *         pass
 *         self._ptr[0].subresource.sparseLevel.extentHeight = extentHeight             # <<<<<<<<<<<<<<
 *     @property
 *     def extentDepth(self):
 */
  (__pyx_v_self->_ptr[0]).subresource.sparseLevel.extentHeight = __pyx_v_extentHeight;

  /* "cuda/cuda.pyx":9715
 *         return self._ptr[0].subresource.sparseLevel.extentHeight
 *     @extentHeight.setter
 *     def extentHeight(self, unsigned int extentHeight):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.extentHeight = extentHeight
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.extentHeight.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9719
 *         self._ptr[0].subresource.sparseLevel.extentHeight = extentHeight
 *     @property
 *     def extentDepth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.extentDepth
 *     @extentDepth.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentDepth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentDepth_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentDepth___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentDepth___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9719, 0, __PYX_ERR(0, 9719, __pyx_L1_error));

  /* "cuda/cuda.pyx":9720
 *     @property
 *     def extentDepth(self):
 *         return self._ptr[0].subresource.sparseLevel.extentDepth             # <<<<<<<<<<<<<<
 *     @extentDepth.setter
 *     def extentDepth(self, unsigned int extentDepth):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).subresource.sparseLevel.extentDepth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9719
 *         self._ptr[0].subresource.sparseLevel.extentHeight = extentHeight
 *     @property
 *     def extentDepth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.sparseLevel.extentDepth
 *     @extentDepth.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.extentDepth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9722
 *         return self._ptr[0].subresource.sparseLevel.extentDepth
 *     @extentDepth.setter
 *     def extentDepth(self, unsigned int extentDepth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.extentDepth = extentDepth
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentDepth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_extentDepth); /*proto*/
static int __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentDepth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_extentDepth) {
  unsigned int __pyx_v_extentDepth;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_extentDepth); {
    __pyx_v_extentDepth = __Pyx_PyInt_As_unsigned_int(__pyx_arg_extentDepth); if (unlikely((__pyx_v_extentDepth == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9722, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.extentDepth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentDepth_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self), ((unsigned int)__pyx_v_extentDepth));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentDepth_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, unsigned int __pyx_v_extentDepth) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9722, 0, __PYX_ERR(0, 9722, __pyx_L1_error));

  /* "cuda/cuda.pyx":9724
 *     def extentDepth(self, unsigned int extentDepth):
 *         pass
 *         self._ptr[0].subresource.sparseLevel.extentDepth = extentDepth             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s:
 */
  (__pyx_v_self->_ptr[0]).subresource.sparseLevel.extentDepth = __pyx_v_extentDepth;

  /* "cuda/cuda.pyx":9722
 *         return self._ptr[0].subresource.sparseLevel.extentDepth
 *     @extentDepth.setter
 *     def extentDepth(self, unsigned int extentDepth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.sparseLevel.extentDepth = extentDepth
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.extentDepth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_8__reduce_cython__[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__442)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__443, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_10__setstate_cython__[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__444)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__445, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9744
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9744, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9744, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9744, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9744, 0, __PYX_ERR(0, 9744, __pyx_L1_error));

  /* "cuda/cuda.pyx":9745
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUarrayMapInfo_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":9744
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9746
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9746, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9746, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9746, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9746, 0, __PYX_ERR(0, 9746, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9748
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4getPtr[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__446)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9748, 0, __PYX_ERR(0, 9748, __pyx_L1_error));

  /* "cuda/cuda.pyx":9749
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9748
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9750
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9750, 0, __PYX_ERR(0, 9750, __pyx_L1_error));

  /* "cuda/cuda.pyx":9751
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['layer : ' + str(self.layer)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9752
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['layer : ' + str(self.layer)]
 *             str_list += ['offset : ' + str(self.offset)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9753
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['layer : ' + str(self.layer)]             # <<<<<<<<<<<<<<
 *             str_list += ['offset : ' + str(self.offset)]
 *             str_list += ['size : ' + str(self.size)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_layer_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_layer, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9754
 *             str_list = []
 *             str_list += ['layer : ' + str(self.layer)]
 *             str_list += ['offset : ' + str(self.offset)]             # <<<<<<<<<<<<<<
 *             str_list += ['size : ' + str(self.size)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_offset, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9755
 *             str_list += ['layer : ' + str(self.layer)]
 *             str_list += ['offset : ' + str(self.offset)]
 *             str_list += ['size : ' + str(self.size)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_size, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9756
 *             str_list += ['offset : ' + str(self.offset)]
 *             str_list += ['size : ' + str(self.size)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9751
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['layer : ' + str(self.layer)]
 */
  }

  /* "cuda/cuda.pyx":9758
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9750
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9761
 * 
 *     @property
 *     def layer(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.miptail.layer
 *     @layer.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5layer_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5layer_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5layer___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5layer___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9761, 0, __PYX_ERR(0, 9761, __pyx_L1_error));

  /* "cuda/cuda.pyx":9762
 *     @property
 *     def layer(self):
 *         return self._ptr[0].subresource.miptail.layer             # <<<<<<<<<<<<<<
 *     @layer.setter
 *     def layer(self, unsigned int layer):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).subresource.miptail.layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9761
 * 
 *     @property
 *     def layer(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.miptail.layer
 *     @layer.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.layer.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9764
 *         return self._ptr[0].subresource.miptail.layer
 *     @layer.setter
 *     def layer(self, unsigned int layer):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.miptail.layer = layer
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5layer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_layer); /*proto*/
static int __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5layer_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_layer) {
  unsigned int __pyx_v_layer;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_layer); {
    __pyx_v_layer = __Pyx_PyInt_As_unsigned_int(__pyx_arg_layer); if (unlikely((__pyx_v_layer == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 9764, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.layer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5layer_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_self), ((unsigned int)__pyx_v_layer));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5layer_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self, unsigned int __pyx_v_layer) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9764, 0, __PYX_ERR(0, 9764, __pyx_L1_error));

  /* "cuda/cuda.pyx":9766
 *     def layer(self, unsigned int layer):
 *         pass
 *         self._ptr[0].subresource.miptail.layer = layer             # <<<<<<<<<<<<<<
 *     @property
 *     def offset(self):
 */
  (__pyx_v_self->_ptr[0]).subresource.miptail.layer = __pyx_v_layer;

  /* "cuda/cuda.pyx":9764
 *         return self._ptr[0].subresource.miptail.layer
 *     @layer.setter
 *     def layer(self, unsigned int layer):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.miptail.layer = layer
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.layer.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9768
 *         self._ptr[0].subresource.miptail.layer = layer
 *     @property
 *     def offset(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.miptail.offset
 *     @offset.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6offset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6offset___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6offset___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9768, 0, __PYX_ERR(0, 9768, __pyx_L1_error));

  /* "cuda/cuda.pyx":9769
 *     @property
 *     def offset(self):
 *         return self._ptr[0].subresource.miptail.offset             # <<<<<<<<<<<<<<
 *     @offset.setter
 *     def offset(self, unsigned long long offset):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).subresource.miptail.offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9768
 *         self._ptr[0].subresource.miptail.layer = layer
 *     @property
 *     def offset(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.miptail.offset
 *     @offset.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9771
 *         return self._ptr[0].subresource.miptail.offset
 *     @offset.setter
 *     def offset(self, unsigned long long offset):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.miptail.offset = offset
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offset); /*proto*/
static int __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offset) {
  unsigned PY_LONG_LONG __pyx_v_offset;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_offset); {
    __pyx_v_offset = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_offset); if (unlikely((__pyx_v_offset == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9771, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6offset_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_offset));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6offset_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_offset) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9771, 0, __PYX_ERR(0, 9771, __pyx_L1_error));

  /* "cuda/cuda.pyx":9773
 *     def offset(self, unsigned long long offset):
 *         pass
 *         self._ptr[0].subresource.miptail.offset = offset             # <<<<<<<<<<<<<<
 *     @property
 *     def size(self):
 */
  (__pyx_v_self->_ptr[0]).subresource.miptail.offset = __pyx_v_offset;

  /* "cuda/cuda.pyx":9771
 *         return self._ptr[0].subresource.miptail.offset
 *     @offset.setter
 *     def offset(self, unsigned long long offset):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.miptail.offset = offset
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9775
 *         self._ptr[0].subresource.miptail.offset = offset
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.miptail.size
 *     @size.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4size___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4size___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9775, 0, __PYX_ERR(0, 9775, __pyx_L1_error));

  /* "cuda/cuda.pyx":9776
 *     @property
 *     def size(self):
 *         return self._ptr[0].subresource.miptail.size             # <<<<<<<<<<<<<<
 *     @size.setter
 *     def size(self, unsigned long long size):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).subresource.miptail.size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9775
 *         self._ptr[0].subresource.miptail.offset = offset
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].subresource.miptail.size
 *     @size.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9778
 *         return self._ptr[0].subresource.miptail.size
 *     @size.setter
 *     def size(self, unsigned long long size):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.miptail.size = size
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_size); /*proto*/
static int __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_size) {
  unsigned PY_LONG_LONG __pyx_v_size;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_size); {
    __pyx_v_size = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_size); if (unlikely((__pyx_v_size == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9778, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4size_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_size));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4size_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_size) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9778, 0, __PYX_ERR(0, 9778, __pyx_L1_error));

  /* "cuda/cuda.pyx":9780
 *     def size(self, unsigned long long size):
 *         pass
 *         self._ptr[0].subresource.miptail.size = size             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u:
 */
  (__pyx_v_self->_ptr[0]).subresource.miptail.size = __pyx_v_size;

  /* "cuda/cuda.pyx":9778
 *         return self._ptr[0].subresource.miptail.size
 *     @size.setter
 *     def size(self, unsigned long long size):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresource.miptail.size = size
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_8__reduce_cython__[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__447)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__448, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_10__setstate_cython__[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__449)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__450, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9798
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9798, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9798, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9798, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u___cinit__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9798, 0, __PYX_ERR(0, 9798, __pyx_L1_error));

  /* "cuda/cuda.pyx":9799
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._sparseLevel = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(_ptr=<void_ptr>self._ptr)
 */
  __pyx_v_self->_ptr = ((struct CUarrayMapInfo_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":9798
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9800
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._sparseLevel = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(_ptr=<void_ptr>self._ptr)
 *         self._miptail = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(_ptr=<void_ptr>self._ptr)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9800, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9800, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9800, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_2__init__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9800, 0, __PYX_ERR(0, 9800, __pyx_L1_error));

  /* "cuda/cuda.pyx":9801
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._sparseLevel = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *         self._miptail = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 9801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_sparseLevel);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_sparseLevel));
  __pyx_v_self->_sparseLevel = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9802
 *     def __init__(self, void_ptr _ptr):
 *         self._sparseLevel = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(_ptr=<void_ptr>self._ptr)
 *         self._miptail = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 9802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_miptail);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_miptail));
  __pyx_v_self->_miptail = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9800
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._sparseLevel = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(_ptr=<void_ptr>self._ptr)
 *         self._miptail = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(_ptr=<void_ptr>self._ptr)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9803
 *         self._sparseLevel = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(_ptr=<void_ptr>self._ptr)
 *         self._miptail = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_4getPtr[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__451)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9803, 0, __PYX_ERR(0, 9803, __pyx_L1_error));

  /* "cuda/cuda.pyx":9804
 *         self._miptail = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9803
 *         self._sparseLevel = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(_ptr=<void_ptr>self._ptr)
 *         self._miptail = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9805
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr45__pyx_v_line = NULL;
  PyObject *__pyx_9genexpr46__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9805, 0, __PYX_ERR(0, 9805, __pyx_L1_error));

  /* "cuda/cuda.pyx":9806
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['sparseLevel :\n' + '\n'.join(['    ' + line for line in str(self.sparseLevel).splitlines()])]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9807
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['sparseLevel :\n' + '\n'.join(['    ' + line for line in str(self.sparseLevel).splitlines()])]
 *             str_list += ['miptail :\n' + '\n'.join(['    ' + line for line in str(self.miptail).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9808
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['sparseLevel :\n' + '\n'.join(['    ' + line for line in str(self.sparseLevel).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['miptail :\n' + '\n'.join(['    ' + line for line in str(self.miptail).splitlines()])]
 *             return '\n'.join(str_list)
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9808, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sparseLevel_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9808, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9808, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9808, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 9808, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9808, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr45__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr45__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9808, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 9808, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr45__pyx_v_line); __pyx_9genexpr45__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr45__pyx_v_line); __pyx_9genexpr45__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_sparseLevel, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9809
 *             str_list = []
 *             str_list += ['sparseLevel :\n' + '\n'.join(['    ' + line for line in str(self.sparseLevel).splitlines()])]
 *             str_list += ['miptail :\n' + '\n'.join(['    ' + line for line in str(self.miptail).splitlines()])]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9809, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_miptail_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9809, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9809, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyUnicode_Splitlines(((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9809, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 9809, __pyx_L12_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9809, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr46__pyx_v_line, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr46__pyx_v_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9809, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 9809, __pyx_L12_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_9genexpr46__pyx_v_line); __pyx_9genexpr46__pyx_v_line = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_9genexpr46__pyx_v_line); __pyx_9genexpr46__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_miptail, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9810
 *             str_list += ['sparseLevel :\n' + '\n'.join(['    ' + line for line in str(self.sparseLevel).splitlines()])]
 *             str_list += ['miptail :\n' + '\n'.join(['    ' + line for line in str(self.miptail).splitlines()])]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9806
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['sparseLevel :\n' + '\n'.join(['    ' + line for line in str(self.sparseLevel).splitlines()])]
 */
  }

  /* "cuda/cuda.pyx":9812
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9805
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr45__pyx_v_line);
  __Pyx_XDECREF(__pyx_9genexpr46__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9815
 * 
 *     @property
 *     def sparseLevel(self):             # <<<<<<<<<<<<<<
 *         return self._sparseLevel
 *     @sparseLevel.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11sparseLevel_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11sparseLevel_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11sparseLevel___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11sparseLevel___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9815, 0, __PYX_ERR(0, 9815, __pyx_L1_error));

  /* "cuda/cuda.pyx":9816
 *     @property
 *     def sparseLevel(self):
 *         return self._sparseLevel             # <<<<<<<<<<<<<<
 *     @sparseLevel.setter
 *     def sparseLevel(self, sparseLevel not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_sparseLevel));
  __pyx_r = ((PyObject *)__pyx_v_self->_sparseLevel);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9815
 * 
 *     @property
 *     def sparseLevel(self):             # <<<<<<<<<<<<<<
 *         return self._sparseLevel
 *     @sparseLevel.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.sparseLevel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9818
 *         return self._sparseLevel
 *     @sparseLevel.setter
 *     def sparseLevel(self, sparseLevel not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(sparseLevel):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11sparseLevel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_sparseLevel); /*proto*/
static int __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11sparseLevel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_sparseLevel) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sparseLevel), __pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s, 0, "sparseLevel", 0))) __PYX_ERR(0, 9818, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11sparseLevel_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)__pyx_v_sparseLevel));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11sparseLevel_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *__pyx_v_sparseLevel) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9818, 0, __PYX_ERR(0, 9818, __pyx_L1_error));

  /* "cuda/cuda.pyx":9820
 *     def sparseLevel(self, sparseLevel not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s):
 *         pass
 *         for _attr in dir(sparseLevel):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_sparseLevel)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9820, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9820, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9820, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9820, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9820, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 9820, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":9821
 *         pass
 *         for _attr in dir(sparseLevel):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9821, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":9822
 *         for _attr in dir(sparseLevel):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._sparseLevel, _attr, getattr(sparseLevel, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":9821
 *         pass
 *         for _attr in dir(sparseLevel):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":9823
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._sparseLevel, _attr, getattr(sparseLevel, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9823, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":9824
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._sparseLevel, _attr, getattr(sparseLevel, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def miptail(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_sparseLevel);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_sparseLevel), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 9824, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":9823
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._sparseLevel, _attr, getattr(sparseLevel, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":9820
 *     def sparseLevel(self, sparseLevel not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s):
 *         pass
 *         for _attr in dir(sparseLevel):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9818
 *         return self._sparseLevel
 *     @sparseLevel.setter
 *     def sparseLevel(self, sparseLevel not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(sparseLevel):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.sparseLevel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9826
 *                 setattr(self._sparseLevel, _attr, getattr(sparseLevel, _attr))
 *     @property
 *     def miptail(self):             # <<<<<<<<<<<<<<
 *         return self._miptail
 *     @miptail.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7miptail_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7miptail_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7miptail___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7miptail___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9826, 0, __PYX_ERR(0, 9826, __pyx_L1_error));

  /* "cuda/cuda.pyx":9827
 *     @property
 *     def miptail(self):
 *         return self._miptail             # <<<<<<<<<<<<<<
 *     @miptail.setter
 *     def miptail(self, miptail not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_miptail));
  __pyx_r = ((PyObject *)__pyx_v_self->_miptail);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9826
 *                 setattr(self._sparseLevel, _attr, getattr(sparseLevel, _attr))
 *     @property
 *     def miptail(self):             # <<<<<<<<<<<<<<
 *         return self._miptail
 *     @miptail.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.miptail.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9829
 *         return self._miptail
 *     @miptail.setter
 *     def miptail(self, miptail not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(miptail):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7miptail_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_miptail); /*proto*/
static int __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7miptail_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_miptail) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_miptail), __pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s, 0, "miptail", 0))) __PYX_ERR(0, 9829, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7miptail_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)__pyx_v_miptail));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7miptail_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *__pyx_v_miptail) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9829, 0, __PYX_ERR(0, 9829, __pyx_L1_error));

  /* "cuda/cuda.pyx":9831
 *     def miptail(self, miptail not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s):
 *         pass
 *         for _attr in dir(miptail):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_miptail)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9831, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9831, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9831, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9831, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9831, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 9831, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":9832
 *         pass
 *         for _attr in dir(miptail):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9832, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":9833
 *         for _attr in dir(miptail):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._miptail, _attr, getattr(miptail, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":9832
 *         pass
 *         for _attr in dir(miptail):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":9834
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._miptail, _attr, getattr(miptail, _attr))
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9834, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":9835
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._miptail, _attr, getattr(miptail, _attr))             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u:
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_miptail);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_miptail), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 9835, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":9834
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._miptail, _attr, getattr(miptail, _attr))
 * 
 */
    }

    /* "cuda/cuda.pyx":9831
 *     def miptail(self, miptail not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s):
 *         pass
 *         for _attr in dir(miptail):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9829
 *         return self._miptail
 *     @miptail.setter
 *     def miptail(self, miptail not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(miptail):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.miptail.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_8__reduce_cython__[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__452)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__453, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_10__setstate_cython__[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__454)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__455, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9851
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9851, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9851, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9851, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u___cinit__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9851, 0, __PYX_ERR(0, 9851, __pyx_L1_error));

  /* "cuda/cuda.pyx":9852
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         self._memHandle = CUmemGenericAllocationHandle(_ptr=<void_ptr>&self._ptr[0].memHandle.memHandle)
 */
  __pyx_v_self->_ptr = ((struct CUarrayMapInfo_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":9851
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9853
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._memHandle = CUmemGenericAllocationHandle(_ptr=<void_ptr>&self._ptr[0].memHandle.memHandle)
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9853, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9853, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9853, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_2__init__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_2__init__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9853, 0, __PYX_ERR(0, 9853, __pyx_L1_error));

  /* "cuda/cuda.pyx":9854
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 *         self._memHandle = CUmemGenericAllocationHandle(_ptr=<void_ptr>&self._ptr[0].memHandle.memHandle)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).memHandle.memHandle))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 9854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_memHandle);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_memHandle));
  __pyx_v_self->_memHandle = ((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9853
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._memHandle = CUmemGenericAllocationHandle(_ptr=<void_ptr>&self._ptr[0].memHandle.memHandle)
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9855
 *     def __init__(self, void_ptr _ptr):
 *         self._memHandle = CUmemGenericAllocationHandle(_ptr=<void_ptr>&self._ptr[0].memHandle.memHandle)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_4getPtr[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__456)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9855, 0, __PYX_ERR(0, 9855, __pyx_L1_error));

  /* "cuda/cuda.pyx":9856
 *         self._memHandle = CUmemGenericAllocationHandle(_ptr=<void_ptr>&self._ptr[0].memHandle.memHandle)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9855
 *     def __init__(self, void_ptr _ptr):
 *         self._memHandle = CUmemGenericAllocationHandle(_ptr=<void_ptr>&self._ptr[0].memHandle.memHandle)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9857
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9857, 0, __PYX_ERR(0, 9857, __pyx_L1_error));

  /* "cuda/cuda.pyx":9858
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['memHandle : ' + str(self.memHandle)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9859
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['memHandle : ' + str(self.memHandle)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9860
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['memHandle : ' + str(self.memHandle)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memHandle_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_memHandle, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9861
 *             str_list = []
 *             str_list += ['memHandle : ' + str(self.memHandle)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9858
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['memHandle : ' + str(self.memHandle)]
 */
  }

  /* "cuda/cuda.pyx":9863
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9857
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9866
 * 
 *     @property
 *     def memHandle(self):             # <<<<<<<<<<<<<<
 *         return self._memHandle
 *     @memHandle.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9memHandle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9memHandle_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9memHandle___get__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9memHandle___get__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9866, 0, __PYX_ERR(0, 9866, __pyx_L1_error));

  /* "cuda/cuda.pyx":9867
 *     @property
 *     def memHandle(self):
 *         return self._memHandle             # <<<<<<<<<<<<<<
 *     @memHandle.setter
 *     def memHandle(self, memHandle):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_memHandle));
  __pyx_r = ((PyObject *)__pyx_v_self->_memHandle);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9866
 * 
 *     @property
 *     def memHandle(self):             # <<<<<<<<<<<<<<
 *         return self._memHandle
 *     @memHandle.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.memHandle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9869
 *         return self._memHandle
 *     @memHandle.setter
 *     def memHandle(self, memHandle):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUmemGenericAllocationHandle cmemHandle
 *         if memHandle is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9memHandle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_memHandle); /*proto*/
static int __pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9memHandle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_memHandle) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9memHandle_2__set__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)__pyx_v_self), ((PyObject *)__pyx_v_memHandle));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9memHandle_2__set__(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self, PyObject *__pyx_v_memHandle) {
  CUmemGenericAllocationHandle __pyx_v_cmemHandle;
  PyObject *__pyx_v_pmemHandle = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9869, 0, __PYX_ERR(0, 9869, __pyx_L1_error));

  /* "cuda/cuda.pyx":9871
 *     def memHandle(self, memHandle):
 *         cdef ccuda.CUmemGenericAllocationHandle cmemHandle
 *         if memHandle is None:             # <<<<<<<<<<<<<<
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *         elif isinstance(memHandle, (CUmemGenericAllocationHandle)):
 */
  __pyx_t_1 = (__pyx_v_memHandle == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":9872
 *         cdef ccuda.CUmemGenericAllocationHandle cmemHandle
 *         if memHandle is None:
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(memHandle, (CUmemGenericAllocationHandle)):
 *             pmemHandle = int(memHandle)
 */
    __pyx_v_cmemHandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":9871
 *     def memHandle(self, memHandle):
 *         cdef ccuda.CUmemGenericAllocationHandle cmemHandle
 *         if memHandle is None:             # <<<<<<<<<<<<<<
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *         elif isinstance(memHandle, (CUmemGenericAllocationHandle)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9873
 *         if memHandle is None:
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *         elif isinstance(memHandle, (CUmemGenericAllocationHandle)):             # <<<<<<<<<<<<<<
 *             pmemHandle = int(memHandle)
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>pmemHandle
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_memHandle, __pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9874
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *         elif isinstance(memHandle, (CUmemGenericAllocationHandle)):
 *             pmemHandle = int(memHandle)             # <<<<<<<<<<<<<<
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>pmemHandle
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_memHandle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pmemHandle = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":9875
 *         elif isinstance(memHandle, (CUmemGenericAllocationHandle)):
 *             pmemHandle = int(memHandle)
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>pmemHandle             # <<<<<<<<<<<<<<
 *         else:
 *             pmemHandle = int(CUmemGenericAllocationHandle(memHandle))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pmemHandle); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9875, __pyx_L1_error)
    __pyx_v_cmemHandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":9873
 *         if memHandle is None:
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *         elif isinstance(memHandle, (CUmemGenericAllocationHandle)):             # <<<<<<<<<<<<<<
 *             pmemHandle = int(memHandle)
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>pmemHandle
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9877
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>pmemHandle
 *         else:
 *             pmemHandle = int(CUmemGenericAllocationHandle(memHandle))             # <<<<<<<<<<<<<<
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>pmemHandle
 *         self._memHandle._ptr[0] = cmemHandle
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle), __pyx_v_memHandle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pmemHandle = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":9878
 *         else:
 *             pmemHandle = int(CUmemGenericAllocationHandle(memHandle))
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>pmemHandle             # <<<<<<<<<<<<<<
 *         self._memHandle._ptr[0] = cmemHandle
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pmemHandle); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9878, __pyx_L1_error)
    __pyx_v_cmemHandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":9879
 *             pmemHandle = int(CUmemGenericAllocationHandle(memHandle))
 *             cmemHandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>pmemHandle
 *         self._memHandle._ptr[0] = cmemHandle             # <<<<<<<<<<<<<<
 * 
 * cdef class CUarrayMapInfo_st:
 */
  (__pyx_v_self->_memHandle->_ptr[0]) = __pyx_v_cmemHandle;

  /* "cuda/cuda.pyx":9869
 *         return self._memHandle
 *     @memHandle.setter
 *     def memHandle(self, memHandle):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUmemGenericAllocationHandle cmemHandle
 *         if memHandle is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.memHandle.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pmemHandle);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_8__reduce_cython__[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__457)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__458, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_10__setstate_cython__[] = "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__459)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__460, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9917
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 9917, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9917, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9917, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 9917, 0, __PYX_ERR(0, 9917, __pyx_L1_error));

  /* "cuda/cuda.pyx":9918
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9919
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":9918
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":9921
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._resource = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u(_ptr=<void_ptr>self._ptr)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUarrayMapInfo_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":9917
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9922
 *         else:
 *             self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._resource = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u(_ptr=<void_ptr>self._ptr)
 *         self._subresource = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u(_ptr=<void_ptr>self._ptr)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9922, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 9922, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9922, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 9922, 0, __PYX_ERR(0, 9922, __pyx_L1_error));

  /* "cuda/cuda.pyx":9923
 *             self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._resource = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *         self._subresource = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u(_ptr=<void_ptr>self._ptr)
 *         self._memHandle = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u(_ptr=<void_ptr>self._ptr)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 9923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_resource);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_resource));
  __pyx_v_self->_resource = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9924
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._resource = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u(_ptr=<void_ptr>self._ptr)
 *         self._subresource = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *         self._memHandle = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 9924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_subresource);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_subresource));
  __pyx_v_self->_subresource = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9925
 *         self._resource = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u(_ptr=<void_ptr>self._ptr)
 *         self._subresource = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u(_ptr=<void_ptr>self._ptr)
 *         self._memHandle = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 9925, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_memHandle);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_memHandle));
  __pyx_v_self->_memHandle = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9922
 *         else:
 *             self._ptr = <ccuda.CUarrayMapInfo_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._resource = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u(_ptr=<void_ptr>self._ptr)
 *         self._subresource = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u(_ptr=<void_ptr>self._ptr)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9926
 *         self._subresource = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u(_ptr=<void_ptr>self._ptr)
 *         self._memHandle = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 9926, 0, __PYX_ERR(0, 9926, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUarrayMapInfo_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":9928
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_17CUarrayMapInfo_st_6getPtr[] = "CUarrayMapInfo_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17CUarrayMapInfo_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUarrayMapInfo_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__461)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 9928, 0, __PYX_ERR(0, 9928, __pyx_L1_error));

  /* "cuda/cuda.pyx":9929
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9928
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9930
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr47__pyx_v_line = NULL;
  PyObject *__pyx_9genexpr48__pyx_v_line = NULL;
  PyObject *__pyx_9genexpr49__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 9930, 0, __PYX_ERR(0, 9930, __pyx_L1_error));

  /* "cuda/cuda.pyx":9931
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['resourceType : ' + str(self.resourceType)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":9932
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['resourceType : ' + str(self.resourceType)]
 *             str_list += ['resource :\n' + '\n'.join(['    ' + line for line in str(self.resource).splitlines()])]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9933
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['resourceType : ' + str(self.resourceType)]             # <<<<<<<<<<<<<<
 *             str_list += ['resource :\n' + '\n'.join(['    ' + line for line in str(self.resource).splitlines()])]
 *             str_list += ['subresourceType : ' + str(self.subresourceType)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_resourceType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_resourceType, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9934
 *             str_list = []
 *             str_list += ['resourceType : ' + str(self.resourceType)]
 *             str_list += ['resource :\n' + '\n'.join(['    ' + line for line in str(self.resource).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['subresourceType : ' + str(self.subresourceType)]
 *             str_list += ['subresource :\n' + '\n'.join(['    ' + line for line in str(self.subresource).splitlines()])]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9934, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_resource_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9934, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9934, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9934, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 9934, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9934, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr47__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr47__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9934, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 9934, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr47__pyx_v_line); __pyx_9genexpr47__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr47__pyx_v_line); __pyx_9genexpr47__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_resource, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9935
 *             str_list += ['resourceType : ' + str(self.resourceType)]
 *             str_list += ['resource :\n' + '\n'.join(['    ' + line for line in str(self.resource).splitlines()])]
 *             str_list += ['subresourceType : ' + str(self.subresourceType)]             # <<<<<<<<<<<<<<
 *             str_list += ['subresource :\n' + '\n'.join(['    ' + line for line in str(self.subresource).splitlines()])]
 *             str_list += ['memOperationType : ' + str(self.memOperationType)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_subresourceType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_subresourceType, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9936
 *             str_list += ['resource :\n' + '\n'.join(['    ' + line for line in str(self.resource).splitlines()])]
 *             str_list += ['subresourceType : ' + str(self.subresourceType)]
 *             str_list += ['subresource :\n' + '\n'.join(['    ' + line for line in str(self.subresource).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['memOperationType : ' + str(self.memOperationType)]
 *             str_list += ['memHandleType : ' + str(self.memHandleType)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9936, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_subresource_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9936, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9936, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyUnicode_Splitlines(((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9936, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 9936, __pyx_L12_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9936, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr48__pyx_v_line, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr48__pyx_v_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9936, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 9936, __pyx_L12_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_line); __pyx_9genexpr48__pyx_v_line = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_line); __pyx_9genexpr48__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_subresource, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9937
 *             str_list += ['subresourceType : ' + str(self.subresourceType)]
 *             str_list += ['subresource :\n' + '\n'.join(['    ' + line for line in str(self.subresource).splitlines()])]
 *             str_list += ['memOperationType : ' + str(self.memOperationType)]             # <<<<<<<<<<<<<<
 *             str_list += ['memHandleType : ' + str(self.memHandleType)]
 *             str_list += ['memHandle :\n' + '\n'.join(['    ' + line for line in str(self.memHandle).splitlines()])]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memOperationType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_memOperationType, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9938
 *             str_list += ['subresource :\n' + '\n'.join(['    ' + line for line in str(self.subresource).splitlines()])]
 *             str_list += ['memOperationType : ' + str(self.memOperationType)]
 *             str_list += ['memHandleType : ' + str(self.memHandleType)]             # <<<<<<<<<<<<<<
 *             str_list += ['memHandle :\n' + '\n'.join(['    ' + line for line in str(self.memHandle).splitlines()])]
 *             str_list += ['offset : ' + str(self.offset)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memHandleType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_memHandleType, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9939
 *             str_list += ['memOperationType : ' + str(self.memOperationType)]
 *             str_list += ['memHandleType : ' + str(self.memHandleType)]
 *             str_list += ['memHandle :\n' + '\n'.join(['    ' + line for line in str(self.memHandle).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['offset : ' + str(self.offset)]
 *             str_list += ['deviceBitMask : ' + str(self.deviceBitMask)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9939, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memHandle_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9939, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9939, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9939, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 9939, __pyx_L18_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9939, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr49__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr49__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9939, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 9939, __pyx_L18_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr49__pyx_v_line); __pyx_9genexpr49__pyx_v_line = 0;
      goto __pyx_L21_exit_scope;
      __pyx_L18_error:;
      __Pyx_XDECREF(__pyx_9genexpr49__pyx_v_line); __pyx_9genexpr49__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L21_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_memHandle_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9940
 *             str_list += ['memHandleType : ' + str(self.memHandleType)]
 *             str_list += ['memHandle :\n' + '\n'.join(['    ' + line for line in str(self.memHandle).splitlines()])]
 *             str_list += ['offset : ' + str(self.offset)]             # <<<<<<<<<<<<<<
 *             str_list += ['deviceBitMask : ' + str(self.deviceBitMask)]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_offset_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_offset, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9941
 *             str_list += ['memHandle :\n' + '\n'.join(['    ' + line for line in str(self.memHandle).splitlines()])]
 *             str_list += ['offset : ' + str(self.offset)]
 *             str_list += ['deviceBitMask : ' + str(self.deviceBitMask)]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_deviceBitMask_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_deviceBitMask, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9942
 *             str_list += ['offset : ' + str(self.offset)]
 *             str_list += ['deviceBitMask : ' + str(self.deviceBitMask)]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9943
 *             str_list += ['deviceBitMask : ' + str(self.deviceBitMask)]
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":9944
 *             str_list += ['flags : ' + str(self.flags)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":9931
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['resourceType : ' + str(self.resourceType)]
 */
  }

  /* "cuda/cuda.pyx":9946
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":9930
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr47__pyx_v_line);
  __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_line);
  __Pyx_XDECREF(__pyx_9genexpr49__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9949
 * 
 *     @property
 *     def resourceType(self):             # <<<<<<<<<<<<<<
 *         return CUresourcetype(self._ptr[0].resourceType)
 *     @resourceType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_12resourceType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_12resourceType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_12resourceType___get__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_12resourceType___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9949, 0, __PYX_ERR(0, 9949, __pyx_L1_error));

  /* "cuda/cuda.pyx":9950
 *     @property
 *     def resourceType(self):
 *         return CUresourcetype(self._ptr[0].resourceType)             # <<<<<<<<<<<<<<
 *     @resourceType.setter
 *     def resourceType(self, resourceType not None : CUresourcetype):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUresourcetype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUresourcetype_enum((__pyx_v_self->_ptr[0]).resourceType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9949
 * 
 *     @property
 *     def resourceType(self):             # <<<<<<<<<<<<<<
 *         return CUresourcetype(self._ptr[0].resourceType)
 *     @resourceType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.resourceType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9952
 *         return CUresourcetype(self._ptr[0].resourceType)
 *     @resourceType.setter
 *     def resourceType(self, resourceType not None : CUresourcetype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].resourceType = resourceType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_12resourceType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_resourceType); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_12resourceType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_resourceType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_resourceType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "resourceType"); __PYX_ERR(0, 9952, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_12resourceType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), ((PyObject *)__pyx_v_resourceType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_12resourceType_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, PyObject *__pyx_v_resourceType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresourcetype __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9952, 0, __PYX_ERR(0, 9952, __pyx_L1_error));

  /* "cuda/cuda.pyx":9954
 *     def resourceType(self, resourceType not None : CUresourcetype):
 *         pass
 *         self._ptr[0].resourceType = resourceType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def resource(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_resourceType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUresourcetype_enum)__Pyx_PyInt_As_enum__CUresourcetype_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 9954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).resourceType = __pyx_t_2;

  /* "cuda/cuda.pyx":9952
 *         return CUresourcetype(self._ptr[0].resourceType)
 *     @resourceType.setter
 *     def resourceType(self, resourceType not None : CUresourcetype):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].resourceType = resourceType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.resourceType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9956
 *         self._ptr[0].resourceType = resourceType.value
 *     @property
 *     def resource(self):             # <<<<<<<<<<<<<<
 *         return self._resource
 *     @resource.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_8resource_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_8resource_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8resource___get__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8resource___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9956, 0, __PYX_ERR(0, 9956, __pyx_L1_error));

  /* "cuda/cuda.pyx":9957
 *     @property
 *     def resource(self):
 *         return self._resource             # <<<<<<<<<<<<<<
 *     @resource.setter
 *     def resource(self, resource not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_resource));
  __pyx_r = ((PyObject *)__pyx_v_self->_resource);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9956
 *         self._ptr[0].resourceType = resourceType.value
 *     @property
 *     def resource(self):             # <<<<<<<<<<<<<<
 *         return self._resource
 *     @resource.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.resource.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9959
 *         return self._resource
 *     @resource.setter
 *     def resource(self, resource not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(resource):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_8resource_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_resource); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_8resource_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_resource) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_resource), __pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u, 0, "resource", 0))) __PYX_ERR(0, 9959, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8resource_2__set__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)__pyx_v_resource));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8resource_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *__pyx_v_resource) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9959, 0, __PYX_ERR(0, 9959, __pyx_L1_error));

  /* "cuda/cuda.pyx":9961
 *     def resource(self, resource not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u):
 *         pass
 *         for _attr in dir(resource):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_resource)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9961, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9961, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9961, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 9961, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":9962
 *         pass
 *         for _attr in dir(resource):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9962, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":9963
 *         for _attr in dir(resource):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._resource, _attr, getattr(resource, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":9962
 *         pass
 *         for _attr in dir(resource):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":9964
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._resource, _attr, getattr(resource, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9964, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":9965
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._resource, _attr, getattr(resource, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def subresourceType(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_resource);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_resource), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 9965, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":9964
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._resource, _attr, getattr(resource, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":9961
 *     def resource(self, resource not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u):
 *         pass
 *         for _attr in dir(resource):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9959
 *         return self._resource
 *     @resource.setter
 *     def resource(self, resource not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(resource):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.resource.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9967
 *                 setattr(self._resource, _attr, getattr(resource, _attr))
 *     @property
 *     def subresourceType(self):             # <<<<<<<<<<<<<<
 *         return CUarraySparseSubresourceType(self._ptr[0].subresourceType)
 *     @subresourceType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_15subresourceType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_15subresourceType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_15subresourceType___get__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_15subresourceType___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9967, 0, __PYX_ERR(0, 9967, __pyx_L1_error));

  /* "cuda/cuda.pyx":9968
 *     @property
 *     def subresourceType(self):
 *         return CUarraySparseSubresourceType(self._ptr[0].subresourceType)             # <<<<<<<<<<<<<<
 *     @subresourceType.setter
 *     def subresourceType(self, subresourceType not None : CUarraySparseSubresourceType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUarraySparseSubresourceType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUarraySparseSubresourceType_enum((__pyx_v_self->_ptr[0]).subresourceType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9967
 *                 setattr(self._resource, _attr, getattr(resource, _attr))
 *     @property
 *     def subresourceType(self):             # <<<<<<<<<<<<<<
 *         return CUarraySparseSubresourceType(self._ptr[0].subresourceType)
 *     @subresourceType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.subresourceType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9970
 *         return CUarraySparseSubresourceType(self._ptr[0].subresourceType)
 *     @subresourceType.setter
 *     def subresourceType(self, subresourceType not None : CUarraySparseSubresourceType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresourceType = subresourceType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_15subresourceType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_subresourceType); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_15subresourceType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_subresourceType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_subresourceType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "subresourceType"); __PYX_ERR(0, 9970, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_15subresourceType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), ((PyObject *)__pyx_v_subresourceType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_15subresourceType_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, PyObject *__pyx_v_subresourceType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUarraySparseSubresourceType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9970, 0, __PYX_ERR(0, 9970, __pyx_L1_error));

  /* "cuda/cuda.pyx":9972
 *     def subresourceType(self, subresourceType not None : CUarraySparseSubresourceType):
 *         pass
 *         self._ptr[0].subresourceType = subresourceType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def subresource(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_subresourceType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUarraySparseSubresourceType_enum)__Pyx_PyInt_As_enum__CUarraySparseSubresourceType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 9972, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).subresourceType = __pyx_t_2;

  /* "cuda/cuda.pyx":9970
 *         return CUarraySparseSubresourceType(self._ptr[0].subresourceType)
 *     @subresourceType.setter
 *     def subresourceType(self, subresourceType not None : CUarraySparseSubresourceType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].subresourceType = subresourceType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.subresourceType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9974
 *         self._ptr[0].subresourceType = subresourceType.value
 *     @property
 *     def subresource(self):             # <<<<<<<<<<<<<<
 *         return self._subresource
 *     @subresource.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_11subresource_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_11subresource_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_11subresource___get__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_11subresource___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9974, 0, __PYX_ERR(0, 9974, __pyx_L1_error));

  /* "cuda/cuda.pyx":9975
 *     @property
 *     def subresource(self):
 *         return self._subresource             # <<<<<<<<<<<<<<
 *     @subresource.setter
 *     def subresource(self, subresource not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_subresource));
  __pyx_r = ((PyObject *)__pyx_v_self->_subresource);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9974
 *         self._ptr[0].subresourceType = subresourceType.value
 *     @property
 *     def subresource(self):             # <<<<<<<<<<<<<<
 *         return self._subresource
 *     @subresource.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.subresource.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9977
 *         return self._subresource
 *     @subresource.setter
 *     def subresource(self, subresource not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(subresource):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_11subresource_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_subresource); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_11subresource_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_subresource) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subresource), __pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u, 0, "subresource", 0))) __PYX_ERR(0, 9977, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_11subresource_2__set__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)__pyx_v_subresource));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_11subresource_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *__pyx_v_subresource) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9977, 0, __PYX_ERR(0, 9977, __pyx_L1_error));

  /* "cuda/cuda.pyx":9979
 *     def subresource(self, subresource not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u):
 *         pass
 *         for _attr in dir(subresource):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_subresource)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9979, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9979, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9979, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 9979, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9979, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 9979, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":9980
 *         pass
 *         for _attr in dir(subresource):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9980, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":9981
 *         for _attr in dir(subresource):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._subresource, _attr, getattr(subresource, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":9980
 *         pass
 *         for _attr in dir(subresource):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":9982
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._subresource, _attr, getattr(subresource, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 9982, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":9983
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._subresource, _attr, getattr(subresource, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def memOperationType(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_subresource);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_subresource), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 9983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 9983, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":9982
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._subresource, _attr, getattr(subresource, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":9979
 *     def subresource(self, subresource not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u):
 *         pass
 *         for _attr in dir(subresource):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9977
 *         return self._subresource
 *     @subresource.setter
 *     def subresource(self, subresource not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(subresource):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.subresource.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9985
 *                 setattr(self._subresource, _attr, getattr(subresource, _attr))
 *     @property
 *     def memOperationType(self):             # <<<<<<<<<<<<<<
 *         return CUmemOperationType(self._ptr[0].memOperationType)
 *     @memOperationType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_16memOperationType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_16memOperationType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_16memOperationType___get__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_16memOperationType___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9985, 0, __PYX_ERR(0, 9985, __pyx_L1_error));

  /* "cuda/cuda.pyx":9986
 *     @property
 *     def memOperationType(self):
 *         return CUmemOperationType(self._ptr[0].memOperationType)             # <<<<<<<<<<<<<<
 *     @memOperationType.setter
 *     def memOperationType(self, memOperationType not None : CUmemOperationType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemOperationType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemOperationType_enum((__pyx_v_self->_ptr[0]).memOperationType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9985
 *                 setattr(self._subresource, _attr, getattr(subresource, _attr))
 *     @property
 *     def memOperationType(self):             # <<<<<<<<<<<<<<
 *         return CUmemOperationType(self._ptr[0].memOperationType)
 *     @memOperationType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.memOperationType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9988
 *         return CUmemOperationType(self._ptr[0].memOperationType)
 *     @memOperationType.setter
 *     def memOperationType(self, memOperationType not None : CUmemOperationType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].memOperationType = memOperationType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_16memOperationType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_memOperationType); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_16memOperationType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_memOperationType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_memOperationType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "memOperationType"); __PYX_ERR(0, 9988, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_16memOperationType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), ((PyObject *)__pyx_v_memOperationType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_16memOperationType_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, PyObject *__pyx_v_memOperationType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemOperationType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9988, 0, __PYX_ERR(0, 9988, __pyx_L1_error));

  /* "cuda/cuda.pyx":9990
 *     def memOperationType(self, memOperationType not None : CUmemOperationType):
 *         pass
 *         self._ptr[0].memOperationType = memOperationType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def memHandleType(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_memOperationType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemOperationType_enum)__Pyx_PyInt_As_enum__CUmemOperationType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 9990, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).memOperationType = __pyx_t_2;

  /* "cuda/cuda.pyx":9988
 *         return CUmemOperationType(self._ptr[0].memOperationType)
 *     @memOperationType.setter
 *     def memOperationType(self, memOperationType not None : CUmemOperationType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].memOperationType = memOperationType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.memOperationType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9992
 *         self._ptr[0].memOperationType = memOperationType.value
 *     @property
 *     def memHandleType(self):             # <<<<<<<<<<<<<<
 *         return CUmemHandleType(self._ptr[0].memHandleType)
 *     @memHandleType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13memHandleType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13memHandleType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_13memHandleType___get__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_13memHandleType___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9992, 0, __PYX_ERR(0, 9992, __pyx_L1_error));

  /* "cuda/cuda.pyx":9993
 *     @property
 *     def memHandleType(self):
 *         return CUmemHandleType(self._ptr[0].memHandleType)             # <<<<<<<<<<<<<<
 *     @memHandleType.setter
 *     def memHandleType(self, memHandleType not None : CUmemHandleType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemHandleType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemHandleType_enum((__pyx_v_self->_ptr[0]).memHandleType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9992
 *         self._ptr[0].memOperationType = memOperationType.value
 *     @property
 *     def memHandleType(self):             # <<<<<<<<<<<<<<
 *         return CUmemHandleType(self._ptr[0].memHandleType)
 *     @memHandleType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.memHandleType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9995
 *         return CUmemHandleType(self._ptr[0].memHandleType)
 *     @memHandleType.setter
 *     def memHandleType(self, memHandleType not None : CUmemHandleType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].memHandleType = memHandleType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13memHandleType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_memHandleType); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13memHandleType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_memHandleType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_memHandleType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "memHandleType"); __PYX_ERR(0, 9995, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_13memHandleType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), ((PyObject *)__pyx_v_memHandleType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_13memHandleType_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, PyObject *__pyx_v_memHandleType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemHandleType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 9995, 0, __PYX_ERR(0, 9995, __pyx_L1_error));

  /* "cuda/cuda.pyx":9997
 *     def memHandleType(self, memHandleType not None : CUmemHandleType):
 *         pass
 *         self._ptr[0].memHandleType = memHandleType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def memHandle(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_memHandleType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemHandleType_enum)__Pyx_PyInt_As_enum__CUmemHandleType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 9997, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).memHandleType = __pyx_t_2;

  /* "cuda/cuda.pyx":9995
 *         return CUmemHandleType(self._ptr[0].memHandleType)
 *     @memHandleType.setter
 *     def memHandleType(self, memHandleType not None : CUmemHandleType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].memHandleType = memHandleType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.memHandleType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":9999
 *         self._ptr[0].memHandleType = memHandleType.value
 *     @property
 *     def memHandle(self):             # <<<<<<<<<<<<<<
 *         return self._memHandle
 *     @memHandle.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_9memHandle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_9memHandle_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_9memHandle___get__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_9memHandle___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 9999, 0, __PYX_ERR(0, 9999, __pyx_L1_error));

  /* "cuda/cuda.pyx":10000
 *     @property
 *     def memHandle(self):
 *         return self._memHandle             # <<<<<<<<<<<<<<
 *     @memHandle.setter
 *     def memHandle(self, memHandle not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_memHandle));
  __pyx_r = ((PyObject *)__pyx_v_self->_memHandle);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":9999
 *         self._ptr[0].memHandleType = memHandleType.value
 *     @property
 *     def memHandle(self):             # <<<<<<<<<<<<<<
 *         return self._memHandle
 *     @memHandle.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.memHandle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10002
 *         return self._memHandle
 *     @memHandle.setter
 *     def memHandle(self, memHandle not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(memHandle):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_9memHandle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_memHandle); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_9memHandle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_memHandle) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memHandle), __pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u, 0, "memHandle", 0))) __PYX_ERR(0, 10002, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_9memHandle_2__set__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)__pyx_v_memHandle));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_9memHandle_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *__pyx_v_memHandle) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10002, 0, __PYX_ERR(0, 10002, __pyx_L1_error));

  /* "cuda/cuda.pyx":10004
 *     def memHandle(self, memHandle not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u):
 *         pass
 *         for _attr in dir(memHandle):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_memHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10004, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10004, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10004, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10004, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10004, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 10004, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":10005
 *         pass
 *         for _attr in dir(memHandle):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10005, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":10006
 *         for _attr in dir(memHandle):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._memHandle, _attr, getattr(memHandle, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":10005
 *         pass
 *         for _attr in dir(memHandle):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":10007
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._memHandle, _attr, getattr(memHandle, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10007, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":10008
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._memHandle, _attr, getattr(memHandle, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def offset(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_memHandle);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_memHandle), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10008, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 10008, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":10007
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._memHandle, _attr, getattr(memHandle, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":10004
 *     def memHandle(self, memHandle not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u):
 *         pass
 *         for _attr in dir(memHandle):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":10002
 *         return self._memHandle
 *     @memHandle.setter
 *     def memHandle(self, memHandle not None : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(memHandle):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.memHandle.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10010
 *                 setattr(self._memHandle, _attr, getattr(memHandle, _attr))
 *     @property
 *     def offset(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].offset
 *     @offset.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_6offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_6offset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_6offset___get__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_6offset___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10010, 0, __PYX_ERR(0, 10010, __pyx_L1_error));

  /* "cuda/cuda.pyx":10011
 *     @property
 *     def offset(self):
 *         return self._ptr[0].offset             # <<<<<<<<<<<<<<
 *     @offset.setter
 *     def offset(self, unsigned long long offset):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((__pyx_v_self->_ptr[0]).offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10010
 *                 setattr(self._memHandle, _attr, getattr(memHandle, _attr))
 *     @property
 *     def offset(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].offset
 *     @offset.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10013
 *         return self._ptr[0].offset
 *     @offset.setter
 *     def offset(self, unsigned long long offset):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].offset = offset
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_6offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offset); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_6offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_offset) {
  unsigned PY_LONG_LONG __pyx_v_offset;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_offset); {
    __pyx_v_offset = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_arg_offset); if (unlikely((__pyx_v_offset == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10013, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_6offset_2__set__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), ((unsigned PY_LONG_LONG)__pyx_v_offset));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_6offset_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_offset) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10013, 0, __PYX_ERR(0, 10013, __pyx_L1_error));

  /* "cuda/cuda.pyx":10015
 *     def offset(self, unsigned long long offset):
 *         pass
 *         self._ptr[0].offset = offset             # <<<<<<<<<<<<<<
 *     @property
 *     def deviceBitMask(self):
 */
  (__pyx_v_self->_ptr[0]).offset = __pyx_v_offset;

  /* "cuda/cuda.pyx":10013
 *         return self._ptr[0].offset
 *     @offset.setter
 *     def offset(self, unsigned long long offset):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].offset = offset
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10017
 *         self._ptr[0].offset = offset
 *     @property
 *     def deviceBitMask(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].deviceBitMask
 *     @deviceBitMask.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13deviceBitMask_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13deviceBitMask_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_13deviceBitMask___get__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_13deviceBitMask___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10017, 0, __PYX_ERR(0, 10017, __pyx_L1_error));

  /* "cuda/cuda.pyx":10018
 *     @property
 *     def deviceBitMask(self):
 *         return self._ptr[0].deviceBitMask             # <<<<<<<<<<<<<<
 *     @deviceBitMask.setter
 *     def deviceBitMask(self, unsigned int deviceBitMask):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).deviceBitMask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10017
 *         self._ptr[0].offset = offset
 *     @property
 *     def deviceBitMask(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].deviceBitMask
 *     @deviceBitMask.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.deviceBitMask.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10020
 *         return self._ptr[0].deviceBitMask
 *     @deviceBitMask.setter
 *     def deviceBitMask(self, unsigned int deviceBitMask):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].deviceBitMask = deviceBitMask
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13deviceBitMask_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_deviceBitMask); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13deviceBitMask_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_deviceBitMask) {
  unsigned int __pyx_v_deviceBitMask;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_deviceBitMask); {
    __pyx_v_deviceBitMask = __Pyx_PyInt_As_unsigned_int(__pyx_arg_deviceBitMask); if (unlikely((__pyx_v_deviceBitMask == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 10020, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.deviceBitMask.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_13deviceBitMask_2__set__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), ((unsigned int)__pyx_v_deviceBitMask));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_13deviceBitMask_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, unsigned int __pyx_v_deviceBitMask) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10020, 0, __PYX_ERR(0, 10020, __pyx_L1_error));

  /* "cuda/cuda.pyx":10022
 *     def deviceBitMask(self, unsigned int deviceBitMask):
 *         pass
 *         self._ptr[0].deviceBitMask = deviceBitMask             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
  (__pyx_v_self->_ptr[0]).deviceBitMask = __pyx_v_deviceBitMask;

  /* "cuda/cuda.pyx":10020
 *         return self._ptr[0].deviceBitMask
 *     @deviceBitMask.setter
 *     def deviceBitMask(self, unsigned int deviceBitMask):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].deviceBitMask = deviceBitMask
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.deviceBitMask.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10024
 *         self._ptr[0].deviceBitMask = deviceBitMask
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10024, 0, __PYX_ERR(0, 10024, __pyx_L1_error));

  /* "cuda/cuda.pyx":10025
 *     @property
 *     def flags(self):
 *         return self._ptr[0].flags             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, unsigned int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10024
 *         self._ptr[0].deviceBitMask = deviceBitMask
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].flags
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10027
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 10027, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, unsigned int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10027, 0, __PYX_ERR(0, 10027, __pyx_L1_error));

  /* "cuda/cuda.pyx":10029
 *     def flags(self, unsigned int flags):
 *         pass
 *         self._ptr[0].flags = flags             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  (__pyx_v_self->_ptr[0]).flags = __pyx_v_flags;

  /* "cuda/cuda.pyx":10027
 *         return self._ptr[0].flags
 *     @flags.setter
 *     def flags(self, unsigned int flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10031
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10031, 0, __PYX_ERR(0, 10031, __pyx_L1_error));

  /* "cuda/cuda.pyx":10032
 *     @property
 *     def reserved(self):
 *         return self._ptr[0].reserved             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_carray_to_py_unsigned_int((__pyx_v_self->_ptr[0]).reserved, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10031
 *         self._ptr[0].flags = flags
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].reserved
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10034
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1[2];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10034, 0, __PYX_ERR(0, 10034, __pyx_L1_error));

  /* "cuda/cuda.pyx":10036
 *     def reserved(self, reserved):
 *         pass
 *         self._ptr[0].reserved = reserved             # <<<<<<<<<<<<<<
 * 
 * cdef class CUmemLocation_st:
 */
  if (unlikely(__Pyx_carray_from_py_unsigned_int(__pyx_v_reserved, __pyx_t_1, 2) < 0)) __PYX_ERR(0, 10036, __pyx_L1_error)
  memcpy(&((__pyx_v_self->_ptr[0]).reserved[0]), __pyx_t_1, sizeof((__pyx_v_self->_ptr[0]).reserved[0]) * (2));

  /* "cuda/cuda.pyx":10034
 *         return self._ptr[0].reserved
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].reserved = reserved
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_17CUarrayMapInfo_st_10__reduce_cython__[] = "CUarrayMapInfo_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17CUarrayMapInfo_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUarrayMapInfo_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__462)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__463, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_17CUarrayMapInfo_st_12__setstate_cython__[] = "CUarrayMapInfo_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17CUarrayMapInfo_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_17CUarrayMapInfo_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUarrayMapInfo_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__464)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__465, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUarrayMapInfo_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10055
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUmemLocation_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUmemLocation_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10055, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10055, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10055, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmemLocation_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUmemLocation_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10055, 0, __PYX_ERR(0, 10055, __pyx_L1_error));

  /* "cuda/cuda.pyx":10056
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10057
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUmemLocation_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10056
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10059
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUmemLocation_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUmemLocation_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10055
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10060
 *         else:
 *             self._ptr = <ccuda.CUmemLocation_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUmemLocation_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUmemLocation_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 10060, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10060, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10060, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmemLocation_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUmemLocation_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 10060, 0, __PYX_ERR(0, 10060, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10062
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_16CUmemLocation_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_16CUmemLocation_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_16CUmemLocation_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_16CUmemLocation_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10062, 0, __PYX_ERR(0, 10062, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUmemLocation_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10064
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUmemLocation_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUmemLocation_st_6getPtr[] = "CUmemLocation_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUmemLocation_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUmemLocation_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUmemLocation_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_16CUmemLocation_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmemLocation_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUmemLocation_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__466)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10064, 0, __PYX_ERR(0, 10064, __pyx_L1_error));

  /* "cuda/cuda.pyx":10065
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10064
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10066
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUmemLocation_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUmemLocation_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmemLocation_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUmemLocation_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10066, 0, __PYX_ERR(0, 10066, __pyx_L1_error));

  /* "cuda/cuda.pyx":10067
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10068
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['id : ' + str(self.id)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10069
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]             # <<<<<<<<<<<<<<
 *             str_list += ['id : ' + str(self.id)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_type, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10070
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['id : ' + str(self.id)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_id, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10071
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['id : ' + str(self.id)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":10067
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 */
  }

  /* "cuda/cuda.pyx":10073
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":10066
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10076
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return CUmemLocationType(self._ptr[0].type)
 *     @type.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUmemLocation_st_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUmemLocation_st_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmemLocation_st_4type___get__(((struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUmemLocation_st_4type___get__(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10076, 0, __PYX_ERR(0, 10076, __pyx_L1_error));

  /* "cuda/cuda.pyx":10077
 *     @property
 *     def type(self):
 *         return CUmemLocationType(self._ptr[0].type)             # <<<<<<<<<<<<<<
 *     @type.setter
 *     def type(self, type not None : CUmemLocationType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemLocationType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemLocationType_enum((__pyx_v_self->_ptr[0]).type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10076
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return CUmemLocationType(self._ptr[0].type)
 *     @type.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10079
 *         return CUmemLocationType(self._ptr[0].type)
 *     @type.setter
 *     def type(self, type not None : CUmemLocationType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].type = type.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUmemLocation_st_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_type); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUmemLocation_st_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "type"); __PYX_ERR(0, 10079, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmemLocation_st_4type_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *)__pyx_v_self), ((PyObject *)__pyx_v_type));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUmemLocation_st_4type_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self, PyObject *__pyx_v_type) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemLocationType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10079, 0, __PYX_ERR(0, 10079, __pyx_L1_error));

  /* "cuda/cuda.pyx":10081
 *     def type(self, type not None : CUmemLocationType):
 *         pass
 *         self._ptr[0].type = type.value             # <<<<<<<<<<<<<<
 *     @property
 *     def id(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemLocationType_enum)__Pyx_PyInt_As_enum__CUmemLocationType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 10081, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).type = __pyx_t_2;

  /* "cuda/cuda.pyx":10079
 *         return CUmemLocationType(self._ptr[0].type)
 *     @type.setter
 *     def type(self, type not None : CUmemLocationType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].type = type.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10083
 *         self._ptr[0].type = type.value
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].id
 *     @id.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUmemLocation_st_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16CUmemLocation_st_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmemLocation_st_2id___get__(((struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUmemLocation_st_2id___get__(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10083, 0, __PYX_ERR(0, 10083, __pyx_L1_error));

  /* "cuda/cuda.pyx":10084
 *     @property
 *     def id(self):
 *         return self._ptr[0].id             # <<<<<<<<<<<<<<
 *     @id.setter
 *     def id(self, int id):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_ptr[0]).id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10083
 *         self._ptr[0].type = type.value
 *     @property
 *     def id(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].id
 *     @id.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10086
 *         return self._ptr[0].id
 *     @id.setter
 *     def id(self, int id):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].id = id
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16CUmemLocation_st_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_id); /*proto*/
static int __pyx_pw_4cuda_4cuda_16CUmemLocation_st_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_id) {
  int __pyx_v_id;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_id); {
    __pyx_v_id = __Pyx_PyInt_As_int(__pyx_arg_id); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 10086, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmemLocation_st_2id_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *)__pyx_v_self), ((int)__pyx_v_id));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16CUmemLocation_st_2id_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self, int __pyx_v_id) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10086, 0, __PYX_ERR(0, 10086, __pyx_L1_error));

  /* "cuda/cuda.pyx":10088
 *     def id(self, int id):
 *         pass
 *         self._ptr[0].id = id             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s:
 */
  (__pyx_v_self->_ptr[0]).id = __pyx_v_id;

  /* "cuda/cuda.pyx":10086
 *         return self._ptr[0].id
 *     @id.setter
 *     def id(self, int id):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].id = id
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUmemLocation_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUmemLocation_st_10__reduce_cython__[] = "CUmemLocation_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUmemLocation_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUmemLocation_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUmemLocation_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16CUmemLocation_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmemLocation_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUmemLocation_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__467)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__468, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16CUmemLocation_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_16CUmemLocation_st_12__setstate_cython__[] = "CUmemLocation_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16CUmemLocation_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUmemLocation_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16CUmemLocation_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16CUmemLocation_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16CUmemLocation_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16CUmemLocation_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemLocation_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__469)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__470, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemLocation_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10110
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUmemAllocationProp_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10110, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10110, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10110, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s___cinit__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s___cinit__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10110, 0, __PYX_ERR(0, 10110, __pyx_L1_error));

  /* "cuda/cuda.pyx":10111
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUmemAllocationProp_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct CUmemAllocationProp_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":10110
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUmemAllocationProp_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10112
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUmemAllocationProp_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 10112, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10112, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10112, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_2__init__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 10112, 0, __PYX_ERR(0, 10112, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10114
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_4getPtr[] = "_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_4getPtr(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__471)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10114, 0, __PYX_ERR(0, 10114, __pyx_L1_error));

  /* "cuda/cuda.pyx":10115
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10114
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10116
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_6__repr__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10116, 0, __PYX_ERR(0, 10116, __pyx_L1_error));

  /* "cuda/cuda.pyx":10117
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['compressionType : ' + str(self.compressionType)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10118
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['compressionType : ' + str(self.compressionType)]
 *             str_list += ['gpuDirectRDMACapable : ' + str(self.gpuDirectRDMACapable)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10119
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['compressionType : ' + str(self.compressionType)]             # <<<<<<<<<<<<<<
 *             str_list += ['gpuDirectRDMACapable : ' + str(self.gpuDirectRDMACapable)]
 *             str_list += ['usage : ' + str(self.usage)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_compressionType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_compressionType, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10120
 *             str_list = []
 *             str_list += ['compressionType : ' + str(self.compressionType)]
 *             str_list += ['gpuDirectRDMACapable : ' + str(self.gpuDirectRDMACapable)]             # <<<<<<<<<<<<<<
 *             str_list += ['usage : ' + str(self.usage)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gpuDirectRDMACapable_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_gpuDirectRDMACapable, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10121
 *             str_list += ['compressionType : ' + str(self.compressionType)]
 *             str_list += ['gpuDirectRDMACapable : ' + str(self.gpuDirectRDMACapable)]
 *             str_list += ['usage : ' + str(self.usage)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_usage_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_usage, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10122
 *             str_list += ['gpuDirectRDMACapable : ' + str(self.gpuDirectRDMACapable)]
 *             str_list += ['usage : ' + str(self.usage)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10123
 *             str_list += ['usage : ' + str(self.usage)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":10117
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['compressionType : ' + str(self.compressionType)]
 */
  }

  /* "cuda/cuda.pyx":10125
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":10116
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10128
 * 
 *     @property
 *     def compressionType(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].allocFlags.compressionType
 *     @compressionType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_15compressionType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_15compressionType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_15compressionType___get__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_15compressionType___get__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10128, 0, __PYX_ERR(0, 10128, __pyx_L1_error));

  /* "cuda/cuda.pyx":10129
 *     @property
 *     def compressionType(self):
 *         return self._ptr[0].allocFlags.compressionType             # <<<<<<<<<<<<<<
 *     @compressionType.setter
 *     def compressionType(self, unsigned char compressionType):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_char((__pyx_v_self->_ptr[0]).allocFlags.compressionType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10128
 * 
 *     @property
 *     def compressionType(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].allocFlags.compressionType
 *     @compressionType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.compressionType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10131
 *         return self._ptr[0].allocFlags.compressionType
 *     @compressionType.setter
 *     def compressionType(self, unsigned char compressionType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].allocFlags.compressionType = compressionType
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_15compressionType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_compressionType); /*proto*/
static int __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_15compressionType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_compressionType) {
  unsigned char __pyx_v_compressionType;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_compressionType); {
    __pyx_v_compressionType = __Pyx_PyInt_As_unsigned_char(__pyx_arg_compressionType); if (unlikely((__pyx_v_compressionType == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 10131, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.compressionType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_15compressionType_2__set__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self), ((unsigned char)__pyx_v_compressionType));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_15compressionType_2__set__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, unsigned char __pyx_v_compressionType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10131, 0, __PYX_ERR(0, 10131, __pyx_L1_error));

  /* "cuda/cuda.pyx":10133
 *     def compressionType(self, unsigned char compressionType):
 *         pass
 *         self._ptr[0].allocFlags.compressionType = compressionType             # <<<<<<<<<<<<<<
 *     @property
 *     def gpuDirectRDMACapable(self):
 */
  (__pyx_v_self->_ptr[0]).allocFlags.compressionType = __pyx_v_compressionType;

  /* "cuda/cuda.pyx":10131
 *         return self._ptr[0].allocFlags.compressionType
 *     @compressionType.setter
 *     def compressionType(self, unsigned char compressionType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].allocFlags.compressionType = compressionType
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.compressionType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10135
 *         self._ptr[0].allocFlags.compressionType = compressionType
 *     @property
 *     def gpuDirectRDMACapable(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].allocFlags.gpuDirectRDMACapable
 *     @gpuDirectRDMACapable.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_20gpuDirectRDMACapable_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_20gpuDirectRDMACapable_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_20gpuDirectRDMACapable___get__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_20gpuDirectRDMACapable___get__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10135, 0, __PYX_ERR(0, 10135, __pyx_L1_error));

  /* "cuda/cuda.pyx":10136
 *     @property
 *     def gpuDirectRDMACapable(self):
 *         return self._ptr[0].allocFlags.gpuDirectRDMACapable             # <<<<<<<<<<<<<<
 *     @gpuDirectRDMACapable.setter
 *     def gpuDirectRDMACapable(self, unsigned char gpuDirectRDMACapable):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_char((__pyx_v_self->_ptr[0]).allocFlags.gpuDirectRDMACapable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10135
 *         self._ptr[0].allocFlags.compressionType = compressionType
 *     @property
 *     def gpuDirectRDMACapable(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].allocFlags.gpuDirectRDMACapable
 *     @gpuDirectRDMACapable.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.gpuDirectRDMACapable.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10138
 *         return self._ptr[0].allocFlags.gpuDirectRDMACapable
 *     @gpuDirectRDMACapable.setter
 *     def gpuDirectRDMACapable(self, unsigned char gpuDirectRDMACapable):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].allocFlags.gpuDirectRDMACapable = gpuDirectRDMACapable
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_20gpuDirectRDMACapable_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gpuDirectRDMACapable); /*proto*/
static int __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_20gpuDirectRDMACapable_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_gpuDirectRDMACapable) {
  unsigned char __pyx_v_gpuDirectRDMACapable;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_gpuDirectRDMACapable); {
    __pyx_v_gpuDirectRDMACapable = __Pyx_PyInt_As_unsigned_char(__pyx_arg_gpuDirectRDMACapable); if (unlikely((__pyx_v_gpuDirectRDMACapable == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 10138, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.gpuDirectRDMACapable.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_20gpuDirectRDMACapable_2__set__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self), ((unsigned char)__pyx_v_gpuDirectRDMACapable));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_20gpuDirectRDMACapable_2__set__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, unsigned char __pyx_v_gpuDirectRDMACapable) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10138, 0, __PYX_ERR(0, 10138, __pyx_L1_error));

  /* "cuda/cuda.pyx":10140
 *     def gpuDirectRDMACapable(self, unsigned char gpuDirectRDMACapable):
 *         pass
 *         self._ptr[0].allocFlags.gpuDirectRDMACapable = gpuDirectRDMACapable             # <<<<<<<<<<<<<<
 *     @property
 *     def usage(self):
 */
  (__pyx_v_self->_ptr[0]).allocFlags.gpuDirectRDMACapable = __pyx_v_gpuDirectRDMACapable;

  /* "cuda/cuda.pyx":10138
 *         return self._ptr[0].allocFlags.gpuDirectRDMACapable
 *     @gpuDirectRDMACapable.setter
 *     def gpuDirectRDMACapable(self, unsigned char gpuDirectRDMACapable):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].allocFlags.gpuDirectRDMACapable = gpuDirectRDMACapable
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.gpuDirectRDMACapable.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10142
 *         self._ptr[0].allocFlags.gpuDirectRDMACapable = gpuDirectRDMACapable
 *     @property
 *     def usage(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].allocFlags.usage
 *     @usage.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5usage_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5usage_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5usage___get__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5usage___get__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10142, 0, __PYX_ERR(0, 10142, __pyx_L1_error));

  /* "cuda/cuda.pyx":10143
 *     @property
 *     def usage(self):
 *         return self._ptr[0].allocFlags.usage             # <<<<<<<<<<<<<<
 *     @usage.setter
 *     def usage(self, unsigned short usage):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_short((__pyx_v_self->_ptr[0]).allocFlags.usage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10142
 *         self._ptr[0].allocFlags.gpuDirectRDMACapable = gpuDirectRDMACapable
 *     @property
 *     def usage(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].allocFlags.usage
 *     @usage.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.usage.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10145
 *         return self._ptr[0].allocFlags.usage
 *     @usage.setter
 *     def usage(self, unsigned short usage):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].allocFlags.usage = usage
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5usage_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_usage); /*proto*/
static int __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5usage_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_usage) {
  unsigned short __pyx_v_usage;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_usage); {
    __pyx_v_usage = __Pyx_PyInt_As_unsigned_short(__pyx_arg_usage); if (unlikely((__pyx_v_usage == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 10145, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.usage.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5usage_2__set__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self), ((unsigned short)__pyx_v_usage));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5usage_2__set__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, unsigned short __pyx_v_usage) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10145, 0, __PYX_ERR(0, 10145, __pyx_L1_error));

  /* "cuda/cuda.pyx":10147
 *     def usage(self, unsigned short usage):
 *         pass
 *         self._ptr[0].allocFlags.usage = usage             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  (__pyx_v_self->_ptr[0]).allocFlags.usage = __pyx_v_usage;

  /* "cuda/cuda.pyx":10145
 *         return self._ptr[0].allocFlags.usage
 *     @usage.setter
 *     def usage(self, unsigned short usage):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].allocFlags.usage = usage
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.usage.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10149
 *         self._ptr[0].allocFlags.usage = usage
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].allocFlags.reserved, 4)
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8reserved___get__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8reserved___get__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10149, 0, __PYX_ERR(0, 10149, __pyx_L1_error));

  /* "cuda/cuda.pyx":10150
 *     @property
 *     def reserved(self):
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].allocFlags.reserved, 4)             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyBytes_FromStringAndSize(((char *)(__pyx_v_self->_ptr[0]).allocFlags.reserved), 4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10149
 *         self._ptr[0].allocFlags.usage = usage
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].allocFlags.reserved, 4)
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10152
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].allocFlags.reserved, 4)
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         if len(reserved) != 4:
 *             raise ValueError("reserved length must be 4, is " + str(len(reserved)))
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, PyObject *__pyx_v_reserved) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_b = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  unsigned char __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10152, 0, __PYX_ERR(0, 10152, __pyx_L1_error));

  /* "cuda/cuda.pyx":10153
 *     @reserved.setter
 *     def reserved(self, reserved):
 *         if len(reserved) != 4:             # <<<<<<<<<<<<<<
 *             raise ValueError("reserved length must be 4, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_reserved); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10153, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != 4) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":10154
 *     def reserved(self, reserved):
 *         if len(reserved) != 4:
 *             raise ValueError("reserved length must be 4, is " + str(len(reserved)))             # <<<<<<<<<<<<<<
 *         for i, b in enumerate(reserved):
 *             self._ptr[0].allocFlags.reserved[i] = b
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_reserved); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10154, __pyx_L1_error)
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved_length_must_be_4_is, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 10154, __pyx_L1_error)

    /* "cuda/cuda.pyx":10153
 *     @reserved.setter
 *     def reserved(self, reserved):
 *         if len(reserved) != 4:             # <<<<<<<<<<<<<<
 *             raise ValueError("reserved length must be 4, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):
 */
  }

  /* "cuda/cuda.pyx":10155
 *         if len(reserved) != 4:
 *             raise ValueError("reserved length must be 4, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *             self._ptr[0].allocFlags.reserved[i] = b
 * 
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_4 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_reserved)) || PyTuple_CheckExact(__pyx_v_reserved)) {
    __pyx_t_3 = __pyx_v_reserved; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_reserved); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10155, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10155, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10155, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 10155, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4);
    __pyx_t_4 = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "cuda/cuda.pyx":10156
 *             raise ValueError("reserved length must be 4, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):
 *             self._ptr[0].allocFlags.reserved[i] = b             # <<<<<<<<<<<<<<
 * 
 * cdef class CUmemAllocationProp_st:
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_char(__pyx_v_b); if (unlikely((__pyx_t_7 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 10156, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 10156, __pyx_L1_error)
    ((__pyx_v_self->_ptr[0]).allocFlags.reserved[__pyx_t_8]) = __pyx_t_7;

    /* "cuda/cuda.pyx":10155
 *         if len(reserved) != 4:
 *             raise ValueError("reserved length must be 4, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *             self._ptr[0].allocFlags.reserved[i] = b
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":10152
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].allocFlags.reserved, 4)
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         if len(reserved) != 4:
 *             raise ValueError("reserved length must be 4, is " + str(len(reserved)))
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8__reduce_cython__[] = "_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__472)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__473, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_10__setstate_cython__[] = "_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__474)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__475, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10185
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10185, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10185, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10185, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10185, 0, __PYX_ERR(0, 10185, __pyx_L1_error));

  /* "cuda/cuda.pyx":10186
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10187
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUmemAllocationProp_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10186
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10189
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUmemAllocationProp_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUmemAllocationProp_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10185
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10190
 *         else:
 *             self._ptr = <ccuda.CUmemAllocationProp_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 *         self._allocFlags = _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s(_ptr=<void_ptr>self._ptr)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 10190, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10190, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10190, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 10190, 0, __PYX_ERR(0, 10190, __pyx_L1_error));

  /* "cuda/cuda.pyx":10191
 *             self._ptr = <ccuda.CUmemAllocationProp_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)             # <<<<<<<<<<<<<<
 *         self._allocFlags = _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).location))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 10191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemLocation), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_location);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_location));
  __pyx_v_self->_location = ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":10192
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 *         self._allocFlags = _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 10192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_allocFlags);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_allocFlags));
  __pyx_v_self->_allocFlags = ((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10190
 *         else:
 *             self._ptr = <ccuda.CUmemAllocationProp_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 *         self._allocFlags = _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s(_ptr=<void_ptr>self._ptr)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10193
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 *         self._allocFlags = _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10193, 0, __PYX_ERR(0, 10193, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUmemAllocationProp_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10195
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_22CUmemAllocationProp_st_6getPtr[] = "CUmemAllocationProp_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_22CUmemAllocationProp_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_22CUmemAllocationProp_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__476)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10195, 0, __PYX_ERR(0, 10195, __pyx_L1_error));

  /* "cuda/cuda.pyx":10196
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10195
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10197
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr50__pyx_v_line = NULL;
  PyObject *__pyx_9genexpr51__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10197, 0, __PYX_ERR(0, 10197, __pyx_L1_error));

  /* "cuda/cuda.pyx":10198
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10199
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['requestedHandleTypes : ' + str(self.requestedHandleTypes)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10200
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]             # <<<<<<<<<<<<<<
 *             str_list += ['requestedHandleTypes : ' + str(self.requestedHandleTypes)]
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_type, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10201
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['requestedHandleTypes : ' + str(self.requestedHandleTypes)]             # <<<<<<<<<<<<<<
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 *             str_list += ['win32HandleMetaData : ' + hex(self.win32HandleMetaData)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_requestedHandleTypes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_requestedHandleTypes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10202
 *             str_list += ['type : ' + str(self.type)]
 *             str_list += ['requestedHandleTypes : ' + str(self.requestedHandleTypes)]
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['win32HandleMetaData : ' + hex(self.win32HandleMetaData)]
 *             str_list += ['allocFlags :\n' + '\n'.join(['    ' + line for line in str(self.allocFlags).splitlines()])]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10202, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_location_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10202, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10202, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10202, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 10202, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10202, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr50__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr50__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10202, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 10202, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr50__pyx_v_line); __pyx_9genexpr50__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr50__pyx_v_line); __pyx_9genexpr50__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_location, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10203
 *             str_list += ['requestedHandleTypes : ' + str(self.requestedHandleTypes)]
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 *             str_list += ['win32HandleMetaData : ' + hex(self.win32HandleMetaData)]             # <<<<<<<<<<<<<<
 *             str_list += ['allocFlags :\n' + '\n'.join(['    ' + line for line in str(self.allocFlags).splitlines()])]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_win32HandleMetaData_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_win32HandleMetaData, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10204
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 *             str_list += ['win32HandleMetaData : ' + hex(self.win32HandleMetaData)]
 *             str_list += ['allocFlags :\n' + '\n'.join(['    ' + line for line in str(self.allocFlags).splitlines()])]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10204, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_allocFlags_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10204, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10204, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyUnicode_Splitlines(((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10204, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 10204, __pyx_L12_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10204, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr51__pyx_v_line, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr51__pyx_v_line); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10204, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 10204, __pyx_L12_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_9genexpr51__pyx_v_line); __pyx_9genexpr51__pyx_v_line = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L12_error:;
      __Pyx_XDECREF(__pyx_9genexpr51__pyx_v_line); __pyx_9genexpr51__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_allocFlags, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10205
 *             str_list += ['win32HandleMetaData : ' + hex(self.win32HandleMetaData)]
 *             str_list += ['allocFlags :\n' + '\n'.join(['    ' + line for line in str(self.allocFlags).splitlines()])]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":10198
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['type : ' + str(self.type)]
 */
  }

  /* "cuda/cuda.pyx":10207
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":10197
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr50__pyx_v_line);
  __Pyx_XDECREF(__pyx_9genexpr51__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10210
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return CUmemAllocationType(self._ptr[0].type)
 *     @type.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_4type___get__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_4type___get__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10210, 0, __PYX_ERR(0, 10210, __pyx_L1_error));

  /* "cuda/cuda.pyx":10211
 *     @property
 *     def type(self):
 *         return CUmemAllocationType(self._ptr[0].type)             # <<<<<<<<<<<<<<
 *     @type.setter
 *     def type(self, type not None : CUmemAllocationType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemAllocationType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemAllocationType_enum((__pyx_v_self->_ptr[0]).type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10210
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return CUmemAllocationType(self._ptr[0].type)
 *     @type.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10213
 *         return CUmemAllocationType(self._ptr[0].type)
 *     @type.setter
 *     def type(self, type not None : CUmemAllocationType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].type = type.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_type); /*proto*/
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_type) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_type) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "type"); __PYX_ERR(0, 10213, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_4type_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self), ((PyObject *)__pyx_v_type));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_4type_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, PyObject *__pyx_v_type) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemAllocationType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10213, 0, __PYX_ERR(0, 10213, __pyx_L1_error));

  /* "cuda/cuda.pyx":10215
 *     def type(self, type not None : CUmemAllocationType):
 *         pass
 *         self._ptr[0].type = type.value             # <<<<<<<<<<<<<<
 *     @property
 *     def requestedHandleTypes(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_type, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemAllocationType_enum)__Pyx_PyInt_As_enum__CUmemAllocationType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 10215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).type = __pyx_t_2;

  /* "cuda/cuda.pyx":10213
 *         return CUmemAllocationType(self._ptr[0].type)
 *     @type.setter
 *     def type(self, type not None : CUmemAllocationType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].type = type.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10217
 *         self._ptr[0].type = type.value
 *     @property
 *     def requestedHandleTypes(self):             # <<<<<<<<<<<<<<
 *         return CUmemAllocationHandleType(self._ptr[0].requestedHandleTypes)
 *     @requestedHandleTypes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_20requestedHandleTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_20requestedHandleTypes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_20requestedHandleTypes___get__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_20requestedHandleTypes___get__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10217, 0, __PYX_ERR(0, 10217, __pyx_L1_error));

  /* "cuda/cuda.pyx":10218
 *     @property
 *     def requestedHandleTypes(self):
 *         return CUmemAllocationHandleType(self._ptr[0].requestedHandleTypes)             # <<<<<<<<<<<<<<
 *     @requestedHandleTypes.setter
 *     def requestedHandleTypes(self, requestedHandleTypes not None : CUmemAllocationHandleType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemAllocationHandleType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemAllocationHandleType_enum((__pyx_v_self->_ptr[0]).requestedHandleTypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10217
 *         self._ptr[0].type = type.value
 *     @property
 *     def requestedHandleTypes(self):             # <<<<<<<<<<<<<<
 *         return CUmemAllocationHandleType(self._ptr[0].requestedHandleTypes)
 *     @requestedHandleTypes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.requestedHandleTypes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10220
 *         return CUmemAllocationHandleType(self._ptr[0].requestedHandleTypes)
 *     @requestedHandleTypes.setter
 *     def requestedHandleTypes(self, requestedHandleTypes not None : CUmemAllocationHandleType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].requestedHandleTypes = requestedHandleTypes.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_20requestedHandleTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_requestedHandleTypes); /*proto*/
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_20requestedHandleTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_requestedHandleTypes) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_requestedHandleTypes) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "requestedHandleTypes"); __PYX_ERR(0, 10220, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_20requestedHandleTypes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self), ((PyObject *)__pyx_v_requestedHandleTypes));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_20requestedHandleTypes_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, PyObject *__pyx_v_requestedHandleTypes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemAllocationHandleType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10220, 0, __PYX_ERR(0, 10220, __pyx_L1_error));

  /* "cuda/cuda.pyx":10222
 *     def requestedHandleTypes(self, requestedHandleTypes not None : CUmemAllocationHandleType):
 *         pass
 *         self._ptr[0].requestedHandleTypes = requestedHandleTypes.value             # <<<<<<<<<<<<<<
 *     @property
 *     def location(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_requestedHandleTypes, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemAllocationHandleType_enum)__Pyx_PyInt_As_enum__CUmemAllocationHandleType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 10222, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).requestedHandleTypes = __pyx_t_2;

  /* "cuda/cuda.pyx":10220
 *         return CUmemAllocationHandleType(self._ptr[0].requestedHandleTypes)
 *     @requestedHandleTypes.setter
 *     def requestedHandleTypes(self, requestedHandleTypes not None : CUmemAllocationHandleType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].requestedHandleTypes = requestedHandleTypes.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.requestedHandleTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10224
 *         self._ptr[0].requestedHandleTypes = requestedHandleTypes.value
 *     @property
 *     def location(self):             # <<<<<<<<<<<<<<
 *         return self._location
 *     @location.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_8location_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_8location_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_8location___get__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_8location___get__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10224, 0, __PYX_ERR(0, 10224, __pyx_L1_error));

  /* "cuda/cuda.pyx":10225
 *     @property
 *     def location(self):
 *         return self._location             # <<<<<<<<<<<<<<
 *     @location.setter
 *     def location(self, location not None : CUmemLocation):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_location));
  __pyx_r = ((PyObject *)__pyx_v_self->_location);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10224
 *         self._ptr[0].requestedHandleTypes = requestedHandleTypes.value
 *     @property
 *     def location(self):             # <<<<<<<<<<<<<<
 *         return self._location
 *     @location.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.location.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10227
 *         return self._location
 *     @location.setter
 *     def location(self, location not None : CUmemLocation):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(location):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_8location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_location); /*proto*/
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_8location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_location) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_location), __pyx_ptype_4cuda_4cuda_CUmemLocation, 0, "location", 0))) __PYX_ERR(0, 10227, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_8location_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)__pyx_v_location));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_8location_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUmemLocation *__pyx_v_location) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10227, 0, __PYX_ERR(0, 10227, __pyx_L1_error));

  /* "cuda/cuda.pyx":10229
 *     def location(self, location not None : CUmemLocation):
 *         pass
 *         for _attr in dir(location):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_location)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10229, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10229, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10229, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10229, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10229, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 10229, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":10230
 *         pass
 *         for _attr in dir(location):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10230, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":10231
 *         for _attr in dir(location):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._location, _attr, getattr(location, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":10230
 *         pass
 *         for _attr in dir(location):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":10232
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._location, _attr, getattr(location, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10232, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":10233
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._location, _attr, getattr(location, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def win32HandleMetaData(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_location);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_location), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 10233, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":10232
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._location, _attr, getattr(location, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":10229
 *     def location(self, location not None : CUmemLocation):
 *         pass
 *         for _attr in dir(location):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":10227
 *         return self._location
 *     @location.setter
 *     def location(self, location not None : CUmemLocation):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(location):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.location.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10235
 *                 setattr(self._location, _attr, getattr(location, _attr))
 *     @property
 *     def win32HandleMetaData(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].win32HandleMetaData
 *     @win32HandleMetaData.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_19win32HandleMetaData_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_19win32HandleMetaData_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_19win32HandleMetaData___get__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_19win32HandleMetaData___get__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10235, 0, __PYX_ERR(0, 10235, __pyx_L1_error));

  /* "cuda/cuda.pyx":10236
 *     @property
 *     def win32HandleMetaData(self):
 *         return <void_ptr>self._ptr[0].win32HandleMetaData             # <<<<<<<<<<<<<<
 *     @win32HandleMetaData.setter
 *     def win32HandleMetaData(self, win32HandleMetaData):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).win32HandleMetaData)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10235
 *                 setattr(self._location, _attr, getattr(location, _attr))
 *     @property
 *     def win32HandleMetaData(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].win32HandleMetaData
 *     @win32HandleMetaData.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.win32HandleMetaData.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10238
 *         return <void_ptr>self._ptr[0].win32HandleMetaData
 *     @win32HandleMetaData.setter
 *     def win32HandleMetaData(self, win32HandleMetaData):             # <<<<<<<<<<<<<<
 *         _cwin32HandleMetaData = utils.HelperInputVoidPtr(win32HandleMetaData)
 *         self._ptr[0].win32HandleMetaData = <void*><void_ptr>_cwin32HandleMetaData.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_19win32HandleMetaData_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_win32HandleMetaData); /*proto*/
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_19win32HandleMetaData_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_win32HandleMetaData) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_19win32HandleMetaData_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self), ((PyObject *)__pyx_v_win32HandleMetaData));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_19win32HandleMetaData_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, PyObject *__pyx_v_win32HandleMetaData) {
  PyObject *__pyx_v__cwin32HandleMetaData = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10238, 0, __PYX_ERR(0, 10238, __pyx_L1_error));

  /* "cuda/cuda.pyx":10239
 *     @win32HandleMetaData.setter
 *     def win32HandleMetaData(self, win32HandleMetaData):
 *         _cwin32HandleMetaData = utils.HelperInputVoidPtr(win32HandleMetaData)             # <<<<<<<<<<<<<<
 *         self._ptr[0].win32HandleMetaData = <void*><void_ptr>_cwin32HandleMetaData.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_win32HandleMetaData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cwin32HandleMetaData = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10240
 *     def win32HandleMetaData(self, win32HandleMetaData):
 *         _cwin32HandleMetaData = utils.HelperInputVoidPtr(win32HandleMetaData)
 *         self._ptr[0].win32HandleMetaData = <void*><void_ptr>_cwin32HandleMetaData.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def allocFlags(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cwin32HandleMetaData, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).win32HandleMetaData = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":10238
 *         return <void_ptr>self._ptr[0].win32HandleMetaData
 *     @win32HandleMetaData.setter
 *     def win32HandleMetaData(self, win32HandleMetaData):             # <<<<<<<<<<<<<<
 *         _cwin32HandleMetaData = utils.HelperInputVoidPtr(win32HandleMetaData)
 *         self._ptr[0].win32HandleMetaData = <void*><void_ptr>_cwin32HandleMetaData.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.win32HandleMetaData.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cwin32HandleMetaData);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10242
 *         self._ptr[0].win32HandleMetaData = <void*><void_ptr>_cwin32HandleMetaData.cptr
 *     @property
 *     def allocFlags(self):             # <<<<<<<<<<<<<<
 *         return self._allocFlags
 *     @allocFlags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_10allocFlags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_10allocFlags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_10allocFlags___get__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_10allocFlags___get__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10242, 0, __PYX_ERR(0, 10242, __pyx_L1_error));

  /* "cuda/cuda.pyx":10243
 *     @property
 *     def allocFlags(self):
 *         return self._allocFlags             # <<<<<<<<<<<<<<
 *     @allocFlags.setter
 *     def allocFlags(self, allocFlags not None : _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_allocFlags));
  __pyx_r = ((PyObject *)__pyx_v_self->_allocFlags);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10242
 *         self._ptr[0].win32HandleMetaData = <void*><void_ptr>_cwin32HandleMetaData.cptr
 *     @property
 *     def allocFlags(self):             # <<<<<<<<<<<<<<
 *         return self._allocFlags
 *     @allocFlags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.allocFlags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10245
 *         return self._allocFlags
 *     @allocFlags.setter
 *     def allocFlags(self, allocFlags not None : _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(allocFlags):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_10allocFlags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_allocFlags); /*proto*/
static int __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_10allocFlags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_allocFlags) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_allocFlags), __pyx_ptype_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s, 0, "allocFlags", 0))) __PYX_ERR(0, 10245, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_10allocFlags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)__pyx_v_allocFlags));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_10allocFlags_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *__pyx_v_allocFlags) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10245, 0, __PYX_ERR(0, 10245, __pyx_L1_error));

  /* "cuda/cuda.pyx":10247
 *     def allocFlags(self, allocFlags not None : _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s):
 *         pass
 *         for _attr in dir(allocFlags):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_allocFlags)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10247, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10247, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10247, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10247, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10247, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 10247, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":10248
 *         pass
 *         for _attr in dir(allocFlags):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10248, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":10249
 *         for _attr in dir(allocFlags):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._allocFlags, _attr, getattr(allocFlags, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":10248
 *         pass
 *         for _attr in dir(allocFlags):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":10250
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._allocFlags, _attr, getattr(allocFlags, _attr))
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10250, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":10251
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._allocFlags, _attr, getattr(allocFlags, _attr))             # <<<<<<<<<<<<<<
 * 
 * cdef class CUmemAccessDesc_st:
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_allocFlags);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_allocFlags), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 10251, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":10250
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._allocFlags, _attr, getattr(allocFlags, _attr))
 * 
 */
    }

    /* "cuda/cuda.pyx":10247
 *     def allocFlags(self, allocFlags not None : _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s):
 *         pass
 *         for _attr in dir(allocFlags):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":10245
 *         return self._allocFlags
 *     @allocFlags.setter
 *     def allocFlags(self, allocFlags not None : _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(allocFlags):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.allocFlags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_22CUmemAllocationProp_st_10__reduce_cython__[] = "CUmemAllocationProp_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_22CUmemAllocationProp_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_22CUmemAllocationProp_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__477)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__478, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_22CUmemAllocationProp_st_12__setstate_cython__[] = "CUmemAllocationProp_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_22CUmemAllocationProp_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_22CUmemAllocationProp_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22CUmemAllocationProp_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__479)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__480, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemAllocationProp_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10270
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10270, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10270, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10270, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemAccessDesc_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10270, 0, __PYX_ERR(0, 10270, __pyx_L1_error));

  /* "cuda/cuda.pyx":10271
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10272
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUmemAccessDesc_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10271
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10274
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUmemAccessDesc_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUmemAccessDesc_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10270
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemAccessDesc_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10275
 *         else:
 *             self._ptr = <ccuda.CUmemAccessDesc_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 10275, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10275, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10275, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemAccessDesc_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 10275, 0, __PYX_ERR(0, 10275, __pyx_L1_error));

  /* "cuda/cuda.pyx":10276
 *             self._ptr = <ccuda.CUmemAccessDesc_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).location))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 10276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemLocation), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_location);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_location));
  __pyx_v_self->_location = ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":10275
 *         else:
 *             self._ptr = <ccuda.CUmemAccessDesc_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUmemAccessDesc_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10277
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10277, 0, __PYX_ERR(0, 10277, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUmemAccessDesc_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10279
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_18CUmemAccessDesc_st_6getPtr[] = "CUmemAccessDesc_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_18CUmemAccessDesc_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_18CUmemAccessDesc_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__481)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10279, 0, __PYX_ERR(0, 10279, __pyx_L1_error));

  /* "cuda/cuda.pyx":10280
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10279
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemAccessDesc_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10281
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr52__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10281, 0, __PYX_ERR(0, 10281, __pyx_L1_error));

  /* "cuda/cuda.pyx":10282
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10283
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10284
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['flags : ' + str(self.flags)]
 *             return '\n'.join(str_list)
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10284, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_location_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10284, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10284, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10284, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 10284, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10284, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr52__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr52__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10284, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 10284, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr52__pyx_v_line); __pyx_9genexpr52__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr52__pyx_v_line); __pyx_9genexpr52__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_location, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10285
 *             str_list = []
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_flags, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10286
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 *             str_list += ['flags : ' + str(self.flags)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":10282
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 */
  }

  /* "cuda/cuda.pyx":10288
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":10281
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUmemAccessDesc_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr52__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10291
 * 
 *     @property
 *     def location(self):             # <<<<<<<<<<<<<<
 *         return self._location
 *     @location.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_8location_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_8location_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_8location___get__(((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_8location___get__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10291, 0, __PYX_ERR(0, 10291, __pyx_L1_error));

  /* "cuda/cuda.pyx":10292
 *     @property
 *     def location(self):
 *         return self._location             # <<<<<<<<<<<<<<
 *     @location.setter
 *     def location(self, location not None : CUmemLocation):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_location));
  __pyx_r = ((PyObject *)__pyx_v_self->_location);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10291
 * 
 *     @property
 *     def location(self):             # <<<<<<<<<<<<<<
 *         return self._location
 *     @location.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemAccessDesc_st.location.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10294
 *         return self._location
 *     @location.setter
 *     def location(self, location not None : CUmemLocation):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(location):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_8location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_location); /*proto*/
static int __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_8location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_location) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_location), __pyx_ptype_4cuda_4cuda_CUmemLocation, 0, "location", 0))) __PYX_ERR(0, 10294, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_8location_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)__pyx_v_location));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_8location_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUmemLocation *__pyx_v_location) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10294, 0, __PYX_ERR(0, 10294, __pyx_L1_error));

  /* "cuda/cuda.pyx":10296
 *     def location(self, location not None : CUmemLocation):
 *         pass
 *         for _attr in dir(location):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_location)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10296, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10296, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10296, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10296, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10296, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 10296, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":10297
 *         pass
 *         for _attr in dir(location):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10297, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":10298
 *         for _attr in dir(location):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._location, _attr, getattr(location, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":10297
 *         pass
 *         for _attr in dir(location):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":10299
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._location, _attr, getattr(location, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10299, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":10300
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._location, _attr, getattr(location, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def flags(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_location);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_location), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10300, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 10300, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":10299
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._location, _attr, getattr(location, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":10296
 *     def location(self, location not None : CUmemLocation):
 *         pass
 *         for _attr in dir(location):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":10294
 *         return self._location
 *     @location.setter
 *     def location(self, location not None : CUmemLocation):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(location):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUmemAccessDesc_st.location.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10302
 *                 setattr(self._location, _attr, getattr(location, _attr))
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return CUmemAccess_flags(self._ptr[0].flags)
 *     @flags.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_5flags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_5flags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_5flags___get__(((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_5flags___get__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10302, 0, __PYX_ERR(0, 10302, __pyx_L1_error));

  /* "cuda/cuda.pyx":10303
 *     @property
 *     def flags(self):
 *         return CUmemAccess_flags(self._ptr[0].flags)             # <<<<<<<<<<<<<<
 *     @flags.setter
 *     def flags(self, flags not None : CUmemAccess_flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemAccess_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemAccess_flags_enum((__pyx_v_self->_ptr[0]).flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10302
 *                 setattr(self._location, _attr, getattr(location, _attr))
 *     @property
 *     def flags(self):             # <<<<<<<<<<<<<<
 *         return CUmemAccess_flags(self._ptr[0].flags)
 *     @flags.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUmemAccessDesc_st.flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10305
 *         return CUmemAccess_flags(self._ptr[0].flags)
 *     @flags.setter
 *     def flags(self, flags not None : CUmemAccess_flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_flags); /*proto*/
static int __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_5flags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_flags) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_flags) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "flags"); __PYX_ERR(0, 10305, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_5flags_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)__pyx_v_self), ((PyObject *)__pyx_v_flags));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_5flags_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self, PyObject *__pyx_v_flags) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemAccess_flags __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10305, 0, __PYX_ERR(0, 10305, __pyx_L1_error));

  /* "cuda/cuda.pyx":10307
 *     def flags(self, flags not None : CUmemAccess_flags):
 *         pass
 *         self._ptr[0].flags = flags.value             # <<<<<<<<<<<<<<
 * 
 * cdef class CUmemPoolProps_st:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_flags, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemAccess_flags_enum)__Pyx_PyInt_As_enum__CUmemAccess_flags_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 10307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).flags = __pyx_t_2;

  /* "cuda/cuda.pyx":10305
 *         return CUmemAccess_flags(self._ptr[0].flags)
 *     @flags.setter
 *     def flags(self, flags not None : CUmemAccess_flags):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].flags = flags.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemAccessDesc_st.flags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_18CUmemAccessDesc_st_10__reduce_cython__[] = "CUmemAccessDesc_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_18CUmemAccessDesc_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_18CUmemAccessDesc_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__482)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__483, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemAccessDesc_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_18CUmemAccessDesc_st_12__setstate_cython__[] = "CUmemAccessDesc_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_18CUmemAccessDesc_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_18CUmemAccessDesc_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18CUmemAccessDesc_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__484)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__485, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemAccessDesc_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10337
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10337, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10337, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10337, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10337, 0, __PYX_ERR(0, 10337, __pyx_L1_error));

  /* "cuda/cuda.pyx":10338
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10339
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUmemPoolProps_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10338
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10341
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUmemPoolProps_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUmemPoolProps_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10337
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10342
 *         else:
 *             self._ptr = <ccuda.CUmemPoolProps_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 10342, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10342, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10342, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 10342, 0, __PYX_ERR(0, 10342, __pyx_L1_error));

  /* "cuda/cuda.pyx":10343
 *             self._ptr = <ccuda.CUmemPoolProps_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).location))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 10343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemLocation), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_location);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_location));
  __pyx_v_self->_location = ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":10342
 *         else:
 *             self._ptr = <ccuda.CUmemPoolProps_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10344
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._location = CUmemLocation(_ptr=<void_ptr>&self._ptr[0].location)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10344, 0, __PYX_ERR(0, 10344, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUmemPoolProps_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10346
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_17CUmemPoolProps_st_6getPtr[] = "CUmemPoolProps_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17CUmemPoolProps_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUmemPoolProps_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__486)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10346, 0, __PYX_ERR(0, 10346, __pyx_L1_error));

  /* "cuda/cuda.pyx":10347
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10346
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10348
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr53__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10348, 0, __PYX_ERR(0, 10348, __pyx_L1_error));

  /* "cuda/cuda.pyx":10349
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['allocType : ' + str(self.allocType)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10350
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['allocType : ' + str(self.allocType)]
 *             str_list += ['handleTypes : ' + str(self.handleTypes)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10351
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['allocType : ' + str(self.allocType)]             # <<<<<<<<<<<<<<
 *             str_list += ['handleTypes : ' + str(self.handleTypes)]
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_allocType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_allocType, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10352
 *             str_list = []
 *             str_list += ['allocType : ' + str(self.allocType)]
 *             str_list += ['handleTypes : ' + str(self.handleTypes)]             # <<<<<<<<<<<<<<
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 *             str_list += ['win32SecurityAttributes : ' + hex(self.win32SecurityAttributes)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handleTypes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_handleTypes, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10353
 *             str_list += ['allocType : ' + str(self.allocType)]
 *             str_list += ['handleTypes : ' + str(self.handleTypes)]
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['win32SecurityAttributes : ' + hex(self.win32SecurityAttributes)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10353, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_location_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10353, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10353, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10353, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 10353, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10353, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr53__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr53__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10353, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 10353, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr53__pyx_v_line); __pyx_9genexpr53__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr53__pyx_v_line); __pyx_9genexpr53__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_location, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10354
 *             str_list += ['handleTypes : ' + str(self.handleTypes)]
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 *             str_list += ['win32SecurityAttributes : ' + hex(self.win32SecurityAttributes)]             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_win32SecurityAttributes_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_kp_u_win32SecurityAttributes, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10355
 *             str_list += ['location :\n' + '\n'.join(['    ' + line for line in str(self.location).splitlines()])]
 *             str_list += ['win32SecurityAttributes : ' + hex(self.win32SecurityAttributes)]
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10356
 *             str_list += ['win32SecurityAttributes : ' + hex(self.win32SecurityAttributes)]
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":10349
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['allocType : ' + str(self.allocType)]
 */
  }

  /* "cuda/cuda.pyx":10358
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":10348
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr53__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10361
 * 
 *     @property
 *     def allocType(self):             # <<<<<<<<<<<<<<
 *         return CUmemAllocationType(self._ptr[0].allocType)
 *     @allocType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_9allocType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_9allocType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_9allocType___get__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_9allocType___get__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10361, 0, __PYX_ERR(0, 10361, __pyx_L1_error));

  /* "cuda/cuda.pyx":10362
 *     @property
 *     def allocType(self):
 *         return CUmemAllocationType(self._ptr[0].allocType)             # <<<<<<<<<<<<<<
 *     @allocType.setter
 *     def allocType(self, allocType not None : CUmemAllocationType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemAllocationType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemAllocationType_enum((__pyx_v_self->_ptr[0]).allocType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10361
 * 
 *     @property
 *     def allocType(self):             # <<<<<<<<<<<<<<
 *         return CUmemAllocationType(self._ptr[0].allocType)
 *     @allocType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.allocType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10364
 *         return CUmemAllocationType(self._ptr[0].allocType)
 *     @allocType.setter
 *     def allocType(self, allocType not None : CUmemAllocationType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].allocType = allocType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_9allocType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_allocType); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_9allocType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_allocType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_allocType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "allocType"); __PYX_ERR(0, 10364, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_9allocType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self), ((PyObject *)__pyx_v_allocType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_9allocType_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, PyObject *__pyx_v_allocType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemAllocationType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10364, 0, __PYX_ERR(0, 10364, __pyx_L1_error));

  /* "cuda/cuda.pyx":10366
 *     def allocType(self, allocType not None : CUmemAllocationType):
 *         pass
 *         self._ptr[0].allocType = allocType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def handleTypes(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_allocType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemAllocationType_enum)__Pyx_PyInt_As_enum__CUmemAllocationType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 10366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).allocType = __pyx_t_2;

  /* "cuda/cuda.pyx":10364
 *         return CUmemAllocationType(self._ptr[0].allocType)
 *     @allocType.setter
 *     def allocType(self, allocType not None : CUmemAllocationType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].allocType = allocType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.allocType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10368
 *         self._ptr[0].allocType = allocType.value
 *     @property
 *     def handleTypes(self):             # <<<<<<<<<<<<<<
 *         return CUmemAllocationHandleType(self._ptr[0].handleTypes)
 *     @handleTypes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_11handleTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_11handleTypes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_11handleTypes___get__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_11handleTypes___get__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10368, 0, __PYX_ERR(0, 10368, __pyx_L1_error));

  /* "cuda/cuda.pyx":10369
 *     @property
 *     def handleTypes(self):
 *         return CUmemAllocationHandleType(self._ptr[0].handleTypes)             # <<<<<<<<<<<<<<
 *     @handleTypes.setter
 *     def handleTypes(self, handleTypes not None : CUmemAllocationHandleType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemAllocationHandleType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUmemAllocationHandleType_enum((__pyx_v_self->_ptr[0]).handleTypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10368
 *         self._ptr[0].allocType = allocType.value
 *     @property
 *     def handleTypes(self):             # <<<<<<<<<<<<<<
 *         return CUmemAllocationHandleType(self._ptr[0].handleTypes)
 *     @handleTypes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.handleTypes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10371
 *         return CUmemAllocationHandleType(self._ptr[0].handleTypes)
 *     @handleTypes.setter
 *     def handleTypes(self, handleTypes not None : CUmemAllocationHandleType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].handleTypes = handleTypes.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_11handleTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_handleTypes); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_11handleTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_handleTypes) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_handleTypes) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "handleTypes"); __PYX_ERR(0, 10371, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_11handleTypes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self), ((PyObject *)__pyx_v_handleTypes));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_11handleTypes_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, PyObject *__pyx_v_handleTypes) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUmemAllocationHandleType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10371, 0, __PYX_ERR(0, 10371, __pyx_L1_error));

  /* "cuda/cuda.pyx":10373
 *     def handleTypes(self, handleTypes not None : CUmemAllocationHandleType):
 *         pass
 *         self._ptr[0].handleTypes = handleTypes.value             # <<<<<<<<<<<<<<
 *     @property
 *     def location(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_handleTypes, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUmemAllocationHandleType_enum)__Pyx_PyInt_As_enum__CUmemAllocationHandleType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 10373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).handleTypes = __pyx_t_2;

  /* "cuda/cuda.pyx":10371
 *         return CUmemAllocationHandleType(self._ptr[0].handleTypes)
 *     @handleTypes.setter
 *     def handleTypes(self, handleTypes not None : CUmemAllocationHandleType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].handleTypes = handleTypes.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.handleTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10375
 *         self._ptr[0].handleTypes = handleTypes.value
 *     @property
 *     def location(self):             # <<<<<<<<<<<<<<
 *         return self._location
 *     @location.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_8location_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_8location_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8location___get__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8location___get__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10375, 0, __PYX_ERR(0, 10375, __pyx_L1_error));

  /* "cuda/cuda.pyx":10376
 *     @property
 *     def location(self):
 *         return self._location             # <<<<<<<<<<<<<<
 *     @location.setter
 *     def location(self, location not None : CUmemLocation):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_location));
  __pyx_r = ((PyObject *)__pyx_v_self->_location);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10375
 *         self._ptr[0].handleTypes = handleTypes.value
 *     @property
 *     def location(self):             # <<<<<<<<<<<<<<
 *         return self._location
 *     @location.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.location.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10378
 *         return self._location
 *     @location.setter
 *     def location(self, location not None : CUmemLocation):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(location):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_8location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_location); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_8location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_location) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_location), __pyx_ptype_4cuda_4cuda_CUmemLocation, 0, "location", 0))) __PYX_ERR(0, 10378, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8location_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)__pyx_v_location));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8location_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUmemLocation *__pyx_v_location) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10378, 0, __PYX_ERR(0, 10378, __pyx_L1_error));

  /* "cuda/cuda.pyx":10380
 *     def location(self, location not None : CUmemLocation):
 *         pass
 *         for _attr in dir(location):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_location)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10380, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10380, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10380, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10380, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10380, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 10380, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":10381
 *         pass
 *         for _attr in dir(location):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10381, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":10382
 *         for _attr in dir(location):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._location, _attr, getattr(location, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":10381
 *         pass
 *         for _attr in dir(location):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":10383
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._location, _attr, getattr(location, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10383, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":10384
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._location, _attr, getattr(location, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def win32SecurityAttributes(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_location);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_location), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 10384, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":10383
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._location, _attr, getattr(location, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":10380
 *     def location(self, location not None : CUmemLocation):
 *         pass
 *         for _attr in dir(location):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":10378
 *         return self._location
 *     @location.setter
 *     def location(self, location not None : CUmemLocation):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(location):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.location.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10386
 *                 setattr(self._location, _attr, getattr(location, _attr))
 *     @property
 *     def win32SecurityAttributes(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].win32SecurityAttributes
 *     @win32SecurityAttributes.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_23win32SecurityAttributes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_23win32SecurityAttributes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_23win32SecurityAttributes___get__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_23win32SecurityAttributes___get__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10386, 0, __PYX_ERR(0, 10386, __pyx_L1_error));

  /* "cuda/cuda.pyx":10387
 *     @property
 *     def win32SecurityAttributes(self):
 *         return <void_ptr>self._ptr[0].win32SecurityAttributes             # <<<<<<<<<<<<<<
 *     @win32SecurityAttributes.setter
 *     def win32SecurityAttributes(self, win32SecurityAttributes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).win32SecurityAttributes)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10386
 *                 setattr(self._location, _attr, getattr(location, _attr))
 *     @property
 *     def win32SecurityAttributes(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr[0].win32SecurityAttributes
 *     @win32SecurityAttributes.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.win32SecurityAttributes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10389
 *         return <void_ptr>self._ptr[0].win32SecurityAttributes
 *     @win32SecurityAttributes.setter
 *     def win32SecurityAttributes(self, win32SecurityAttributes):             # <<<<<<<<<<<<<<
 *         _cwin32SecurityAttributes = utils.HelperInputVoidPtr(win32SecurityAttributes)
 *         self._ptr[0].win32SecurityAttributes = <void*><void_ptr>_cwin32SecurityAttributes.cptr
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_23win32SecurityAttributes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_win32SecurityAttributes); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_23win32SecurityAttributes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_win32SecurityAttributes) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_23win32SecurityAttributes_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self), ((PyObject *)__pyx_v_win32SecurityAttributes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_23win32SecurityAttributes_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, PyObject *__pyx_v_win32SecurityAttributes) {
  PyObject *__pyx_v__cwin32SecurityAttributes = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10389, 0, __PYX_ERR(0, 10389, __pyx_L1_error));

  /* "cuda/cuda.pyx":10390
 *     @win32SecurityAttributes.setter
 *     def win32SecurityAttributes(self, win32SecurityAttributes):
 *         _cwin32SecurityAttributes = utils.HelperInputVoidPtr(win32SecurityAttributes)             # <<<<<<<<<<<<<<
 *         self._ptr[0].win32SecurityAttributes = <void*><void_ptr>_cwin32SecurityAttributes.cptr
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_win32SecurityAttributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__cwin32SecurityAttributes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10391
 *     def win32SecurityAttributes(self, win32SecurityAttributes):
 *         _cwin32SecurityAttributes = utils.HelperInputVoidPtr(win32SecurityAttributes)
 *         self._ptr[0].win32SecurityAttributes = <void*><void_ptr>_cwin32SecurityAttributes.cptr             # <<<<<<<<<<<<<<
 *     @property
 *     def reserved(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__cwin32SecurityAttributes, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).win32SecurityAttributes = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":10389
 *         return <void_ptr>self._ptr[0].win32SecurityAttributes
 *     @win32SecurityAttributes.setter
 *     def win32SecurityAttributes(self, win32SecurityAttributes):             # <<<<<<<<<<<<<<
 *         _cwin32SecurityAttributes = utils.HelperInputVoidPtr(win32SecurityAttributes)
 *         self._ptr[0].win32SecurityAttributes = <void*><void_ptr>_cwin32SecurityAttributes.cptr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.win32SecurityAttributes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__cwin32SecurityAttributes);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10393
 *         self._ptr[0].win32SecurityAttributes = <void*><void_ptr>_cwin32SecurityAttributes.cptr
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].reserved, 64)
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10393, 0, __PYX_ERR(0, 10393, __pyx_L1_error));

  /* "cuda/cuda.pyx":10394
 *     @property
 *     def reserved(self):
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].reserved, 64)             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyBytes_FromStringAndSize(((char *)(__pyx_v_self->_ptr[0]).reserved), 64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10393
 *         self._ptr[0].win32SecurityAttributes = <void*><void_ptr>_cwin32SecurityAttributes.cptr
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].reserved, 64)
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10396
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].reserved, 64)
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_b = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  unsigned char __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10396, 0, __PYX_ERR(0, 10396, __pyx_L1_error));

  /* "cuda/cuda.pyx":10397
 *     @reserved.setter
 *     def reserved(self, reserved):
 *         if len(reserved) != 64:             # <<<<<<<<<<<<<<
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_reserved); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10397, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != 64) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":10398
 *     def reserved(self, reserved):
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))             # <<<<<<<<<<<<<<
 *         for i, b in enumerate(reserved):
 *             self._ptr[0].reserved[i] = b
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_reserved); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10398, __pyx_L1_error)
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved_length_must_be_64_is, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 10398, __pyx_L1_error)

    /* "cuda/cuda.pyx":10397
 *     @reserved.setter
 *     def reserved(self, reserved):
 *         if len(reserved) != 64:             # <<<<<<<<<<<<<<
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):
 */
  }

  /* "cuda/cuda.pyx":10399
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *             self._ptr[0].reserved[i] = b
 * 
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_4 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_reserved)) || PyTuple_CheckExact(__pyx_v_reserved)) {
    __pyx_t_3 = __pyx_v_reserved; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_reserved); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10399, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10399, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10399, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10399, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10399, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 10399, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4);
    __pyx_t_4 = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "cuda/cuda.pyx":10400
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):
 *             self._ptr[0].reserved[i] = b             # <<<<<<<<<<<<<<
 * 
 * cdef class CUmemPoolPtrExportData_st:
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_char(__pyx_v_b); if (unlikely((__pyx_t_7 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 10400, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 10400, __pyx_L1_error)
    ((__pyx_v_self->_ptr[0]).reserved[__pyx_t_8]) = __pyx_t_7;

    /* "cuda/cuda.pyx":10399
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *             self._ptr[0].reserved[i] = b
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":10396
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].reserved, 64)
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_17CUmemPoolProps_st_10__reduce_cython__[] = "CUmemPoolProps_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17CUmemPoolProps_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUmemPoolProps_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__487)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__488, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_17CUmemPoolProps_st_12__setstate_cython__[] = "CUmemPoolProps_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17CUmemPoolProps_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_17CUmemPoolProps_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17CUmemPoolProps_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__489)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__490, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolProps_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10417
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10417, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10417, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10417, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolPtrExportData_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10417, 0, __PYX_ERR(0, 10417, __pyx_L1_error));

  /* "cuda/cuda.pyx":10418
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10419
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUmemPoolPtrExportData_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10418
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10421
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUmemPoolPtrExportData_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUmemPoolPtrExportData_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10417
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolPtrExportData_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10422
 *         else:
 *             self._ptr = <ccuda.CUmemPoolPtrExportData_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         pass
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 10422, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10422, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10422, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolPtrExportData_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 10422, 0, __PYX_ERR(0, 10422, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolPtrExportData_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10424
 *     def __init__(self, void_ptr _ptr = 0):
 *         pass
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10424, 0, __PYX_ERR(0, 10424, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUmemPoolPtrExportData_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10426
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_25CUmemPoolPtrExportData_st_6getPtr[] = "CUmemPoolPtrExportData_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_25CUmemPoolPtrExportData_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_25CUmemPoolPtrExportData_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__491)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10426, 0, __PYX_ERR(0, 10426, __pyx_L1_error));

  /* "cuda/cuda.pyx":10427
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10426
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolPtrExportData_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10428
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10428, 0, __PYX_ERR(0, 10428, __pyx_L1_error));

  /* "cuda/cuda.pyx":10429
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10430
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10431
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reserved_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10432
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":10429
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['reserved : ' + str(self.reserved)]
 */
  }

  /* "cuda/cuda.pyx":10434
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":10428
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolPtrExportData_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10437
 * 
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].reserved, 64)
 *     @reserved.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_8reserved_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_8reserved_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_8reserved___get__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_8reserved___get__(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10437, 0, __PYX_ERR(0, 10437, __pyx_L1_error));

  /* "cuda/cuda.pyx":10438
 *     @property
 *     def reserved(self):
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].reserved, 64)             # <<<<<<<<<<<<<<
 *     @reserved.setter
 *     def reserved(self, reserved):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyBytes_FromStringAndSize(((char *)(__pyx_v_self->_ptr[0]).reserved), 64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10437
 * 
 *     @property
 *     def reserved(self):             # <<<<<<<<<<<<<<
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].reserved, 64)
 *     @reserved.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolPtrExportData_st.reserved.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10440
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].reserved, 64)
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved); /*proto*/
static int __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_8reserved_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reserved) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_8reserved_2__set__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *)__pyx_v_self), ((PyObject *)__pyx_v_reserved));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_8reserved_2__set__(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self, PyObject *__pyx_v_reserved) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_b = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  unsigned char __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10440, 0, __PYX_ERR(0, 10440, __pyx_L1_error));

  /* "cuda/cuda.pyx":10441
 *     @reserved.setter
 *     def reserved(self, reserved):
 *         if len(reserved) != 64:             # <<<<<<<<<<<<<<
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_reserved); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10441, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != 64) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":10442
 *     def reserved(self, reserved):
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))             # <<<<<<<<<<<<<<
 *         for i, b in enumerate(reserved):
 *             self._ptr[0].reserved[i] = b
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_reserved); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10442, __pyx_L1_error)
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_reserved_length_must_be_64_is, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 10442, __pyx_L1_error)

    /* "cuda/cuda.pyx":10441
 *     @reserved.setter
 *     def reserved(self, reserved):
 *         if len(reserved) != 64:             # <<<<<<<<<<<<<<
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):
 */
  }

  /* "cuda/cuda.pyx":10443
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *             self._ptr[0].reserved[i] = b
 * 
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_4 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_reserved)) || PyTuple_CheckExact(__pyx_v_reserved)) {
    __pyx_t_3 = __pyx_v_reserved; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_reserved); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10443, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10443, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10443, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10443, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10443, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 10443, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4);
    __pyx_t_4 = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "cuda/cuda.pyx":10444
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):
 *             self._ptr[0].reserved[i] = b             # <<<<<<<<<<<<<<
 * 
 * cdef class CUDA_MEM_ALLOC_NODE_PARAMS_st:
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_char(__pyx_v_b); if (unlikely((__pyx_t_7 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 10444, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 10444, __pyx_L1_error)
    ((__pyx_v_self->_ptr[0]).reserved[__pyx_t_8]) = __pyx_t_7;

    /* "cuda/cuda.pyx":10443
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 *         for i, b in enumerate(reserved):             # <<<<<<<<<<<<<<
 *             self._ptr[0].reserved[i] = b
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":10440
 *         return PyBytes_FromStringAndSize(<char*>self._ptr[0].reserved, 64)
 *     @reserved.setter
 *     def reserved(self, reserved):             # <<<<<<<<<<<<<<
 *         if len(reserved) != 64:
 *             raise ValueError("reserved length must be 64, is " + str(len(reserved)))
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolPtrExportData_st.reserved.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_25CUmemPoolPtrExportData_st_10__reduce_cython__[] = "CUmemPoolPtrExportData_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_25CUmemPoolPtrExportData_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_25CUmemPoolPtrExportData_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__492)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__493, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolPtrExportData_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_25CUmemPoolPtrExportData_st_12__setstate_cython__[] = "CUmemPoolPtrExportData_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_25CUmemPoolPtrExportData_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_25CUmemPoolPtrExportData_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_25CUmemPoolPtrExportData_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__494)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__495, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemPoolPtrExportData_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10473
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10473, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10473, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10473, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10473, 0, __PYX_ERR(0, 10473, __pyx_L1_error));

  /* "cuda/cuda.pyx":10474
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10475
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUDA_MEM_ALLOC_NODE_PARAMS_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10474
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10477
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUDA_MEM_ALLOC_NODE_PARAMS_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._poolProps = CUmemPoolProps(_ptr=<void_ptr>&self._ptr[0].poolProps)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10473
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10478
 *         else:
 *             self._ptr = <ccuda.CUDA_MEM_ALLOC_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._poolProps = CUmemPoolProps(_ptr=<void_ptr>&self._ptr[0].poolProps)
 *         self._dptr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dptr)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 10478, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10478, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10478, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 10478, 0, __PYX_ERR(0, 10478, __pyx_L1_error));

  /* "cuda/cuda.pyx":10479
 *             self._ptr = <ccuda.CUDA_MEM_ALLOC_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._poolProps = CUmemPoolProps(_ptr=<void_ptr>&self._ptr[0].poolProps)             # <<<<<<<<<<<<<<
 *         self._dptr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dptr)
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).poolProps))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 10479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemPoolProps), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_poolProps);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_poolProps));
  __pyx_v_self->_poolProps = ((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":10480
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._poolProps = CUmemPoolProps(_ptr=<void_ptr>&self._ptr[0].poolProps)
 *         self._dptr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dptr)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         if self._accessDescs is not NULL:
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(&(__pyx_v_self->_ptr[0]).dptr))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ptr, __pyx_t_1) < 0) __PYX_ERR(0, 10480, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_dptr);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_dptr));
  __pyx_v_self->_dptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10478
 *         else:
 *             self._ptr = <ccuda.CUDA_MEM_ALLOC_NODE_PARAMS_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._poolProps = CUmemPoolProps(_ptr=<void_ptr>&self._ptr[0].poolProps)
 *         self._dptr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dptr)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10481
 *         self._poolProps = CUmemPoolProps(_ptr=<void_ptr>&self._ptr[0].poolProps)
 *         self._dptr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._accessDescs is not NULL:
 *             free(self._accessDescs)
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4__dealloc__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10481, 0, __PYX_ERR(0, 10481, __pyx_L1_error));

  /* "cuda/cuda.pyx":10482
 *         self._dptr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dptr)
 *     def __dealloc__(self):
 *         if self._accessDescs is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._accessDescs)
 *     def getPtr(self):
 */
  __pyx_t_1 = ((__pyx_v_self->_accessDescs != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10483
 *     def __dealloc__(self):
 *         if self._accessDescs is not NULL:
 *             free(self._accessDescs)             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
    free(__pyx_v_self->_accessDescs);

    /* "cuda/cuda.pyx":10482
 *         self._dptr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dptr)
 *     def __dealloc__(self):
 *         if self._accessDescs is not NULL:             # <<<<<<<<<<<<<<
 *             free(self._accessDescs)
 *     def getPtr(self):
 */
  }

  /* "cuda/cuda.pyx":10481
 *         self._poolProps = CUmemPoolProps(_ptr=<void_ptr>&self._ptr[0].poolProps)
 *         self._dptr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].dptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._accessDescs is not NULL:
 *             free(self._accessDescs)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10484
 *         if self._accessDescs is not NULL:
 *             free(self._accessDescs)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_6getPtr[] = "CUDA_MEM_ALLOC_NODE_PARAMS_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__496)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10484, 0, __PYX_ERR(0, 10484, __pyx_L1_error));

  /* "cuda/cuda.pyx":10485
 *             free(self._accessDescs)
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10484
 *         if self._accessDescs is not NULL:
 *             free(self._accessDescs)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10486
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr54__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10486, 0, __PYX_ERR(0, 10486, __pyx_L1_error));

  /* "cuda/cuda.pyx":10487
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['poolProps :\n' + '\n'.join(['    ' + line for line in str(self.poolProps).splitlines()])]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10488
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['poolProps :\n' + '\n'.join(['    ' + line for line in str(self.poolProps).splitlines()])]
 *             str_list += ['accessDescs : ' + str(self.accessDescs)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10489
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['poolProps :\n' + '\n'.join(['    ' + line for line in str(self.poolProps).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['accessDescs : ' + str(self.accessDescs)]
 *             str_list += ['accessDescCount : ' + str(self.accessDescCount)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10489, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_poolProps_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10489, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10489, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10489, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 10489, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10489, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr54__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr54__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10489, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 10489, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr54__pyx_v_line); __pyx_9genexpr54__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr54__pyx_v_line); __pyx_9genexpr54__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_poolProps, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10490
 *             str_list = []
 *             str_list += ['poolProps :\n' + '\n'.join(['    ' + line for line in str(self.poolProps).splitlines()])]
 *             str_list += ['accessDescs : ' + str(self.accessDescs)]             # <<<<<<<<<<<<<<
 *             str_list += ['accessDescCount : ' + str(self.accessDescCount)]
 *             str_list += ['bytesize : ' + str(self.bytesize)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_accessDescs_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_accessDescs, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10491
 *             str_list += ['poolProps :\n' + '\n'.join(['    ' + line for line in str(self.poolProps).splitlines()])]
 *             str_list += ['accessDescs : ' + str(self.accessDescs)]
 *             str_list += ['accessDescCount : ' + str(self.accessDescCount)]             # <<<<<<<<<<<<<<
 *             str_list += ['bytesize : ' + str(self.bytesize)]
 *             str_list += ['dptr : ' + str(self.dptr)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_accessDescCount_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_accessDescCount, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10492
 *             str_list += ['accessDescs : ' + str(self.accessDescs)]
 *             str_list += ['accessDescCount : ' + str(self.accessDescCount)]
 *             str_list += ['bytesize : ' + str(self.bytesize)]             # <<<<<<<<<<<<<<
 *             str_list += ['dptr : ' + str(self.dptr)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bytesize_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_bytesize, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10493
 *             str_list += ['accessDescCount : ' + str(self.accessDescCount)]
 *             str_list += ['bytesize : ' + str(self.bytesize)]
 *             str_list += ['dptr : ' + str(self.dptr)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dptr_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_dptr, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10494
 *             str_list += ['bytesize : ' + str(self.bytesize)]
 *             str_list += ['dptr : ' + str(self.dptr)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":10487
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['poolProps :\n' + '\n'.join(['    ' + line for line in str(self.poolProps).splitlines()])]
 */
  }

  /* "cuda/cuda.pyx":10496
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":10486
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr54__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10499
 * 
 *     @property
 *     def poolProps(self):             # <<<<<<<<<<<<<<
 *         return self._poolProps
 *     @poolProps.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9poolProps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9poolProps_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9poolProps___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9poolProps___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10499, 0, __PYX_ERR(0, 10499, __pyx_L1_error));

  /* "cuda/cuda.pyx":10500
 *     @property
 *     def poolProps(self):
 *         return self._poolProps             # <<<<<<<<<<<<<<
 *     @poolProps.setter
 *     def poolProps(self, poolProps not None : CUmemPoolProps):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_poolProps));
  __pyx_r = ((PyObject *)__pyx_v_self->_poolProps);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10499
 * 
 *     @property
 *     def poolProps(self):             # <<<<<<<<<<<<<<
 *         return self._poolProps
 *     @poolProps.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.poolProps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10502
 *         return self._poolProps
 *     @poolProps.setter
 *     def poolProps(self, poolProps not None : CUmemPoolProps):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(poolProps):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9poolProps_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_poolProps); /*proto*/
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9poolProps_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_poolProps) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_poolProps), __pyx_ptype_4cuda_4cuda_CUmemPoolProps, 0, "poolProps", 0))) __PYX_ERR(0, 10502, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9poolProps_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps *)__pyx_v_poolProps));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9poolProps_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda_CUmemPoolProps *__pyx_v_poolProps) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10502, 0, __PYX_ERR(0, 10502, __pyx_L1_error));

  /* "cuda/cuda.pyx":10504
 *     def poolProps(self, poolProps not None : CUmemPoolProps):
 *         pass
 *         for _attr in dir(poolProps):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_poolProps)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10504, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10504, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10504, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 10504, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":10505
 *         pass
 *         for _attr in dir(poolProps):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10505, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":10506
 *         for _attr in dir(poolProps):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._poolProps, _attr, getattr(poolProps, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":10505
 *         pass
 *         for _attr in dir(poolProps):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":10507
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._poolProps, _attr, getattr(poolProps, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10507, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":10508
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._poolProps, _attr, getattr(poolProps, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def accessDescs(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_poolProps);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_poolProps), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10508, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 10508, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":10507
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._poolProps, _attr, getattr(poolProps, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":10504
 *     def poolProps(self, poolProps not None : CUmemPoolProps):
 *         pass
 *         for _attr in dir(poolProps):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":10502
 *         return self._poolProps
 *     @poolProps.setter
 *     def poolProps(self, poolProps not None : CUmemPoolProps):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(poolProps):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.poolProps.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10510
 *                 setattr(self._poolProps, _attr, getattr(poolProps, _attr))
 *     @property
 *     def accessDescs(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].accessDescs + x*sizeof(ccuda.CUmemAccessDesc) for x in range(self._accessDescs_length)]
 *         return [CUmemAccessDesc(_ptr=arr) for arr in arrs]
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11accessDescs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11accessDescs_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11accessDescs___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11accessDescs___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_v_arrs = NULL;
  size_t __pyx_9genexpr55__pyx_v_x;
  PyObject *__pyx_9genexpr56__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10510, 0, __PYX_ERR(0, 10510, __pyx_L1_error));

  /* "cuda/cuda.pyx":10511
 *     @property
 *     def accessDescs(self):
 *         arrs = [<void_ptr>self._ptr[0].accessDescs + x*sizeof(ccuda.CUmemAccessDesc) for x in range(self._accessDescs_length)]             # <<<<<<<<<<<<<<
 *         return [CUmemAccessDesc(_ptr=arr) for arr in arrs]
 *     @accessDescs.setter
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_v_self->_accessDescs_length;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_9genexpr55__pyx_v_x = __pyx_t_4;
      __pyx_t_5 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG((((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_self->_ptr[0]).accessDescs) + (__pyx_9genexpr55__pyx_v_x * (sizeof(CUmemAccessDesc))))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10511, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 10511, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_v_arrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10512
 *     def accessDescs(self):
 *         arrs = [<void_ptr>self._ptr[0].accessDescs + x*sizeof(ccuda.CUmemAccessDesc) for x in range(self._accessDescs_length)]
 *         return [CUmemAccessDesc(_ptr=arr) for arr in arrs]             # <<<<<<<<<<<<<<
 *     @accessDescs.setter
 *     def accessDescs(self, val):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10512, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_v_arrs; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 10512, __pyx_L7_error)
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 10512, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr56__pyx_v_arr, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 10512, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ptr, __pyx_9genexpr56__pyx_v_arr) < 0) __PYX_ERR(0, 10512, __pyx_L7_error)
      __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemAccessDesc), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 10512, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 10512, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_9genexpr56__pyx_v_arr); __pyx_9genexpr56__pyx_v_arr = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_9genexpr56__pyx_v_arr); __pyx_9genexpr56__pyx_v_arr = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10510
 *                 setattr(self._poolProps, _attr, getattr(poolProps, _attr))
 *     @property
 *     def accessDescs(self):             # <<<<<<<<<<<<<<
 *         arrs = [<void_ptr>self._ptr[0].accessDescs + x*sizeof(ccuda.CUmemAccessDesc) for x in range(self._accessDescs_length)]
 *         return [CUmemAccessDesc(_ptr=arr) for arr in arrs]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.accessDescs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arrs);
  __Pyx_XDECREF(__pyx_9genexpr56__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10514
 *         return [CUmemAccessDesc(_ptr=arr) for arr in arrs]
 *     @accessDescs.setter
 *     def accessDescs(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._accessDescs)
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11accessDescs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11accessDescs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11accessDescs_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11accessDescs_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_val) {
  Py_ssize_t __pyx_v_idx;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  CUmemAccessDesc *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10514, 0, __PYX_ERR(0, 10514, __pyx_L1_error));

  /* "cuda/cuda.pyx":10515
 *     @accessDescs.setter
 *     def accessDescs(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._accessDescs)
 *             self._accessDescs_length = 0
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10515, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":10516
 *     def accessDescs(self, val):
 *         if len(val) == 0:
 *             free(self._accessDescs)             # <<<<<<<<<<<<<<
 *             self._accessDescs_length = 0
 *             self._ptr[0].accessDescs = NULL
 */
    free(__pyx_v_self->_accessDescs);

    /* "cuda/cuda.pyx":10517
 *         if len(val) == 0:
 *             free(self._accessDescs)
 *             self._accessDescs_length = 0             # <<<<<<<<<<<<<<
 *             self._ptr[0].accessDescs = NULL
 *         else:
 */
    __pyx_v_self->_accessDescs_length = 0;

    /* "cuda/cuda.pyx":10518
 *             free(self._accessDescs)
 *             self._accessDescs_length = 0
 *             self._ptr[0].accessDescs = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             if self._accessDescs_length != <size_t>len(val):
 */
    (__pyx_v_self->_ptr[0]).accessDescs = NULL;

    /* "cuda/cuda.pyx":10515
 *     @accessDescs.setter
 *     def accessDescs(self, val):
 *         if len(val) == 0:             # <<<<<<<<<<<<<<
 *             free(self._accessDescs)
 *             self._accessDescs_length = 0
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10520
 *             self._ptr[0].accessDescs = NULL
 *         else:
 *             if self._accessDescs_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._accessDescs)
 *                 self._accessDescs = <ccuda.CUmemAccessDesc*> calloc(len(val), sizeof(ccuda.CUmemAccessDesc))
 */
  /*else*/ {
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10520, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_v_self->_accessDescs_length != ((size_t)__pyx_t_1)) != 0);
    if (__pyx_t_2) {

      /* "cuda/cuda.pyx":10521
 *         else:
 *             if self._accessDescs_length != <size_t>len(val):
 *                 free(self._accessDescs)             # <<<<<<<<<<<<<<
 *                 self._accessDescs = <ccuda.CUmemAccessDesc*> calloc(len(val), sizeof(ccuda.CUmemAccessDesc))
 *                 if self._accessDescs is NULL:
 */
      free(__pyx_v_self->_accessDescs);

      /* "cuda/cuda.pyx":10522
 *             if self._accessDescs_length != <size_t>len(val):
 *                 free(self._accessDescs)
 *                 self._accessDescs = <ccuda.CUmemAccessDesc*> calloc(len(val), sizeof(ccuda.CUmemAccessDesc))             # <<<<<<<<<<<<<<
 *                 if self._accessDescs is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10522, __pyx_L1_error)
      __pyx_v_self->_accessDescs = ((CUmemAccessDesc *)calloc(__pyx_t_1, (sizeof(CUmemAccessDesc))));

      /* "cuda/cuda.pyx":10523
 *                 free(self._accessDescs)
 *                 self._accessDescs = <ccuda.CUmemAccessDesc*> calloc(len(val), sizeof(ccuda.CUmemAccessDesc))
 *                 if self._accessDescs is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 *                 self._accessDescs_length = <size_t>len(val)
 */
      __pyx_t_2 = ((__pyx_v_self->_accessDescs == NULL) != 0);
      if (unlikely(__pyx_t_2)) {

        /* "cuda/cuda.pyx":10524
 *                 self._accessDescs = <ccuda.CUmemAccessDesc*> calloc(len(val), sizeof(ccuda.CUmemAccessDesc))
 *                 if self._accessDescs is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))             # <<<<<<<<<<<<<<
 *                 self._accessDescs_length = <size_t>len(val)
 *                 self._ptr[0].accessDescs = self._accessDescs
 */
        __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10524, __pyx_L1_error)
        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_n_u_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(CUmemAccessDesc))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10524, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 10524, __pyx_L1_error)

        /* "cuda/cuda.pyx":10523
 *                 free(self._accessDescs)
 *                 self._accessDescs = <ccuda.CUmemAccessDesc*> calloc(len(val), sizeof(ccuda.CUmemAccessDesc))
 *                 if self._accessDescs is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 *                 self._accessDescs_length = <size_t>len(val)
 */
      }

      /* "cuda/cuda.pyx":10525
 *                 if self._accessDescs is NULL:
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 *                 self._accessDescs_length = <size_t>len(val)             # <<<<<<<<<<<<<<
 *                 self._ptr[0].accessDescs = self._accessDescs
 *             for idx in range(len(val)):
 */
      __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10525, __pyx_L1_error)
      __pyx_v_self->_accessDescs_length = ((size_t)__pyx_t_1);

      /* "cuda/cuda.pyx":10526
 *                     raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 *                 self._accessDescs_length = <size_t>len(val)
 *                 self._ptr[0].accessDescs = self._accessDescs             # <<<<<<<<<<<<<<
 *             for idx in range(len(val)):
 *                 memcpy(&self._accessDescs[idx], (<CUmemAccessDesc>val[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))
 */
      __pyx_t_6 = __pyx_v_self->_accessDescs;
      (__pyx_v_self->_ptr[0]).accessDescs = __pyx_t_6;

      /* "cuda/cuda.pyx":10520
 *             self._ptr[0].accessDescs = NULL
 *         else:
 *             if self._accessDescs_length != <size_t>len(val):             # <<<<<<<<<<<<<<
 *                 free(self._accessDescs)
 *                 self._accessDescs = <ccuda.CUmemAccessDesc*> calloc(len(val), sizeof(ccuda.CUmemAccessDesc))
 */
    }

    /* "cuda/cuda.pyx":10527
 *                 self._accessDescs_length = <size_t>len(val)
 *                 self._ptr[0].accessDescs = self._accessDescs
 *             for idx in range(len(val)):             # <<<<<<<<<<<<<<
 *                 memcpy(&self._accessDescs[idx], (<CUmemAccessDesc>val[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))
 *     @property
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10527, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_1;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_idx = __pyx_t_8;

      /* "cuda/cuda.pyx":10528
 *                 self._ptr[0].accessDescs = self._accessDescs
 *             for idx in range(len(val)):
 *                 memcpy(&self._accessDescs[idx], (<CUmemAccessDesc>val[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))             # <<<<<<<<<<<<<<
 *     @property
 *     def accessDescCount(self):
 */
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_val, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      (void)(memcpy((&(__pyx_v_self->_accessDescs[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc *)__pyx_t_5)->__pyx_base._ptr, (sizeof(CUmemAccessDesc))));
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10514
 *         return [CUmemAccessDesc(_ptr=arr) for arr in arrs]
 *     @accessDescs.setter
 *     def accessDescs(self, val):             # <<<<<<<<<<<<<<
 *         if len(val) == 0:
 *             free(self._accessDescs)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.accessDescs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10530
 *                 memcpy(&self._accessDescs[idx], (<CUmemAccessDesc>val[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))
 *     @property
 *     def accessDescCount(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].accessDescCount
 *     @accessDescCount.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_15accessDescCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_15accessDescCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_15accessDescCount___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_15accessDescCount___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10530, 0, __PYX_ERR(0, 10530, __pyx_L1_error));

  /* "cuda/cuda.pyx":10531
 *     @property
 *     def accessDescCount(self):
 *         return self._ptr[0].accessDescCount             # <<<<<<<<<<<<<<
 *     @accessDescCount.setter
 *     def accessDescCount(self, size_t accessDescCount):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).accessDescCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10530
 *                 memcpy(&self._accessDescs[idx], (<CUmemAccessDesc>val[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))
 *     @property
 *     def accessDescCount(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].accessDescCount
 *     @accessDescCount.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.accessDescCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10533
 *         return self._ptr[0].accessDescCount
 *     @accessDescCount.setter
 *     def accessDescCount(self, size_t accessDescCount):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].accessDescCount = accessDescCount
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_15accessDescCount_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_accessDescCount); /*proto*/
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_15accessDescCount_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_accessDescCount) {
  size_t __pyx_v_accessDescCount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_accessDescCount); {
    __pyx_v_accessDescCount = __Pyx_PyInt_As_size_t(__pyx_arg_accessDescCount); if (unlikely((__pyx_v_accessDescCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 10533, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.accessDescCount.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_15accessDescCount_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self), ((size_t)__pyx_v_accessDescCount));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_15accessDescCount_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, size_t __pyx_v_accessDescCount) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10533, 0, __PYX_ERR(0, 10533, __pyx_L1_error));

  /* "cuda/cuda.pyx":10535
 *     def accessDescCount(self, size_t accessDescCount):
 *         pass
 *         self._ptr[0].accessDescCount = accessDescCount             # <<<<<<<<<<<<<<
 *     @property
 *     def bytesize(self):
 */
  (__pyx_v_self->_ptr[0]).accessDescCount = __pyx_v_accessDescCount;

  /* "cuda/cuda.pyx":10533
 *         return self._ptr[0].accessDescCount
 *     @accessDescCount.setter
 *     def accessDescCount(self, size_t accessDescCount):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].accessDescCount = accessDescCount
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.accessDescCount.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10537
 *         self._ptr[0].accessDescCount = accessDescCount
 *     @property
 *     def bytesize(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].bytesize
 *     @bytesize.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8bytesize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8bytesize_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8bytesize___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8bytesize___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10537, 0, __PYX_ERR(0, 10537, __pyx_L1_error));

  /* "cuda/cuda.pyx":10538
 *     @property
 *     def bytesize(self):
 *         return self._ptr[0].bytesize             # <<<<<<<<<<<<<<
 *     @bytesize.setter
 *     def bytesize(self, size_t bytesize):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_self->_ptr[0]).bytesize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10537
 *         self._ptr[0].accessDescCount = accessDescCount
 *     @property
 *     def bytesize(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].bytesize
 *     @bytesize.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.bytesize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10540
 *         return self._ptr[0].bytesize
 *     @bytesize.setter
 *     def bytesize(self, size_t bytesize):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].bytesize = bytesize
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8bytesize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_bytesize); /*proto*/
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8bytesize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_bytesize) {
  size_t __pyx_v_bytesize;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_bytesize); {
    __pyx_v_bytesize = __Pyx_PyInt_As_size_t(__pyx_arg_bytesize); if (unlikely((__pyx_v_bytesize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 10540, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.bytesize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8bytesize_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self), ((size_t)__pyx_v_bytesize));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8bytesize_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, size_t __pyx_v_bytesize) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10540, 0, __PYX_ERR(0, 10540, __pyx_L1_error));

  /* "cuda/cuda.pyx":10542
 *     def bytesize(self, size_t bytesize):
 *         pass
 *         self._ptr[0].bytesize = bytesize             # <<<<<<<<<<<<<<
 *     @property
 *     def dptr(self):
 */
  (__pyx_v_self->_ptr[0]).bytesize = __pyx_v_bytesize;

  /* "cuda/cuda.pyx":10540
 *         return self._ptr[0].bytesize
 *     @bytesize.setter
 *     def bytesize(self, size_t bytesize):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].bytesize = bytesize
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.bytesize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10544
 *         self._ptr[0].bytesize = bytesize
 *     @property
 *     def dptr(self):             # <<<<<<<<<<<<<<
 *         return self._dptr
 *     @dptr.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4dptr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4dptr_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4dptr___get__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4dptr___get__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10544, 0, __PYX_ERR(0, 10544, __pyx_L1_error));

  /* "cuda/cuda.pyx":10545
 *     @property
 *     def dptr(self):
 *         return self._dptr             # <<<<<<<<<<<<<<
 *     @dptr.setter
 *     def dptr(self, dptr):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_dptr));
  __pyx_r = ((PyObject *)__pyx_v_self->_dptr);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10544
 *         self._ptr[0].bytesize = bytesize
 *     @property
 *     def dptr(self):             # <<<<<<<<<<<<<<
 *         return self._dptr
 *     @dptr.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.dptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10547
 *         return self._dptr
 *     @dptr.setter
 *     def dptr(self, dptr):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdptr
 *         if dptr is None:
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4dptr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dptr); /*proto*/
static int __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4dptr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_dptr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4dptr_2__set__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v_dptr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4dptr_2__set__(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, PyObject *__pyx_v_dptr) {
  CUdeviceptr __pyx_v_cdptr;
  PyObject *__pyx_v_pdptr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10547, 0, __PYX_ERR(0, 10547, __pyx_L1_error));

  /* "cuda/cuda.pyx":10549
 *     def dptr(self, dptr):
 *         cdef ccuda.CUdeviceptr cdptr
 *         if dptr is None:             # <<<<<<<<<<<<<<
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":10550
 *         cdef ccuda.CUdeviceptr cdptr
 *         if dptr is None:
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *         elif isinstance(dptr, (CUdeviceptr)):
 *             pdptr = int(dptr)
 */
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":10549
 *     def dptr(self, dptr):
 *         cdef ccuda.CUdeviceptr cdptr
 *         if dptr is None:             # <<<<<<<<<<<<<<
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10551
 *         if dptr is None:
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdptr = int(dptr)
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10552
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dptr, (CUdeviceptr)):
 *             pdptr = int(dptr)             # <<<<<<<<<<<<<<
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *         else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":10553
 *         elif isinstance(dptr, (CUdeviceptr)):
 *             pdptr = int(dptr)
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 *         else:
 *             pdptr = int(CUdeviceptr(dptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10553, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":10551
 *         if dptr is None:
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *         elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *             pdptr = int(dptr)
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10555
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *         else:
 *             pdptr = int(CUdeviceptr(dptr))             # <<<<<<<<<<<<<<
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *         self._dptr._ptr[0] = cdptr
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":10556
 *         else:
 *             pdptr = int(CUdeviceptr(dptr))
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 *         self._dptr._ptr[0] = cdptr
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10556, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10557
 *             pdptr = int(CUdeviceptr(dptr))
 *             cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *         self._dptr._ptr[0] = cdptr             # <<<<<<<<<<<<<<
 * 
 * cdef class _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u:
 */
  (__pyx_v_self->_dptr->_ptr[0]) = __pyx_v_cdptr;

  /* "cuda/cuda.pyx":10547
 *         return self._dptr
 *     @dptr.setter
 *     def dptr(self, dptr):             # <<<<<<<<<<<<<<
 *         cdef ccuda.CUdeviceptr cdptr
 *         if dptr is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.dptr.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdptr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_10__reduce_cython__[] = "CUDA_MEM_ALLOC_NODE_PARAMS_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__497)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__498, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_12__setstate_cython__[] = "CUDA_MEM_ALLOC_NODE_PARAMS_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__499)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__500, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10575
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUeglFrame_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10575, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10575, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10575, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u___cinit__(((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u___cinit__(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10575, 0, __PYX_ERR(0, 10575, __pyx_L1_error));

  /* "cuda/cuda.pyx":10576
 *     """
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUeglFrame_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr):
 *         pass
 */
  __pyx_v_self->_ptr = ((struct __pyx_t_4cuda_5ccuda_CUeglFrame_st *)__pyx_v__ptr);

  /* "cuda/cuda.pyx":10575
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         self._ptr = <ccuda.CUeglFrame_st *>_ptr
 *     def __init__(self, void_ptr _ptr):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10577
 *     def __cinit__(self, void_ptr _ptr):
 *         self._ptr = <ccuda.CUeglFrame_st *>_ptr
 *     def __init__(self, void_ptr _ptr):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 10577, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10577, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10577, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_2__init__(((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 10577, 0, __PYX_ERR(0, 10577, __pyx_L1_error));

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10579
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_4getPtr[] = "_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_5getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_4getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_5getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_4getPtr(((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_4getPtr(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__501)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10579, 0, __PYX_ERR(0, 10579, __pyx_L1_error));

  /* "cuda/cuda.pyx":10580
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10579
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10581
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6__repr__(((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6__repr__(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10581, 0, __PYX_ERR(0, 10581, __pyx_L1_error));

  /* "cuda/cuda.pyx":10582
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['pArray : ' + str(self.pArray)]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10583
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['pArray : ' + str(self.pArray)]
 *             str_list += ['pPitch : ' + str(self.pPitch)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10584
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['pArray : ' + str(self.pArray)]             # <<<<<<<<<<<<<<
 *             str_list += ['pPitch : ' + str(self.pPitch)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pArray_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_pArray, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10585
 *             str_list = []
 *             str_list += ['pArray : ' + str(self.pArray)]
 *             str_list += ['pPitch : ' + str(self.pPitch)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pPitch_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_pPitch, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10586
 *             str_list += ['pArray : ' + str(self.pArray)]
 *             str_list += ['pPitch : ' + str(self.pPitch)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":10582
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['pArray : ' + str(self.pArray)]
 */
  }

  /* "cuda/cuda.pyx":10588
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":10581
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10591
 * 
 *     @property
 *     def pArray(self):             # <<<<<<<<<<<<<<
 *         return [CUarray(init_value=<void_ptr>_pArray) for _pArray in self._ptr[0].frame.pArray]
 *     @pArray.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pArray_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pArray_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pArray___get__(((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pArray___get__(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self) {
  CUarray __pyx_9genexpr57__pyx_v__pArray;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUarray *__pyx_t_2;
  CUarray *__pyx_t_3;
  CUarray *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10591, 0, __PYX_ERR(0, 10591, __pyx_L1_error));

  /* "cuda/cuda.pyx":10592
 *     @property
 *     def pArray(self):
 *         return [CUarray(init_value=<void_ptr>_pArray) for _pArray in self._ptr[0].frame.pArray]             # <<<<<<<<<<<<<<
 *     @pArray.setter
 *     def pArray(self, pArray : List[CUarray]):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = ((__pyx_v_self->_ptr[0]).frame.pArray + 3);
    for (__pyx_t_4 = (__pyx_v_self->_ptr[0]).frame.pArray; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
      __pyx_t_2 = __pyx_t_4;
      __pyx_9genexpr57__pyx_v__pArray = (__pyx_t_2[0]);
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_9genexpr57__pyx_v__pArray)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_init_value, __pyx_t_6) < 0) __PYX_ERR(0, 10592, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 10592, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10591
 * 
 *     @property
 *     def pArray(self):             # <<<<<<<<<<<<<<
 *         return [CUarray(init_value=<void_ptr>_pArray) for _pArray in self._ptr[0].frame.pArray]
 *     @pArray.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.pArray.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10594
 *         return [CUarray(init_value=<void_ptr>_pArray) for _pArray in self._ptr[0].frame.pArray]
 *     @pArray.setter
 *     def pArray(self, pArray : List[CUarray]):             # <<<<<<<<<<<<<<
 *         if len(pArray) != 3:
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pArray))
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pArray); /*proto*/
static int __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pArray) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pArray_2__set__(((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)__pyx_v_self), ((PyObject *)__pyx_v_pArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pArray_2__set__(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self, PyObject *__pyx_v_pArray) {
  PyObject *__pyx_v__idx = NULL;
  PyObject *__pyx_v__pArray = NULL;
  PyObject *__pyx_9genexpr58__pyx_v__pArray = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10594, 0, __PYX_ERR(0, 10594, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_pArray);

  /* "cuda/cuda.pyx":10595
 *     @pArray.setter
 *     def pArray(self, pArray : List[CUarray]):
 *         if len(pArray) != 3:             # <<<<<<<<<<<<<<
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pArray))
 *         pArray = [int(_pArray) for _pArray in pArray]
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_pArray); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10595, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != 3) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":10596
 *     def pArray(self, pArray : List[CUarray]):
 *         if len(pArray) != 3:
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pArray))             # <<<<<<<<<<<<<<
 *         pArray = [int(_pArray) for _pArray in pArray]
 *         for _idx, _pArray in enumerate(pArray):
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_pArray); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10596, __pyx_L1_error)
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_kp_u_not_enough_values_found_during_a);
    __Pyx_GIVEREF(__pyx_kp_u_not_enough_values_found_during_a);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_not_enough_values_found_during_a);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 10596, __pyx_L1_error)

    /* "cuda/cuda.pyx":10595
 *     @pArray.setter
 *     def pArray(self, pArray : List[CUarray]):
 *         if len(pArray) != 3:             # <<<<<<<<<<<<<<
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pArray))
 *         pArray = [int(_pArray) for _pArray in pArray]
 */
  }

  /* "cuda/cuda.pyx":10597
 *         if len(pArray) != 3:
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pArray))
 *         pArray = [int(_pArray) for _pArray in pArray]             # <<<<<<<<<<<<<<
 *         for _idx, _pArray in enumerate(pArray):
 *             self._ptr[0].frame.pArray[_idx] = <ccuda.CUarray><void_ptr>_pArray
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10597, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_v_pArray)) || PyTuple_CheckExact(__pyx_v_pArray)) {
      __pyx_t_4 = __pyx_v_pArray; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_pArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10597, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10597, __pyx_L6_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10597, __pyx_L6_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10597, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10597, __pyx_L6_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10597, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_4);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 10597, __pyx_L6_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr58__pyx_v__pArray, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_9genexpr58__pyx_v__pArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10597, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 10597, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_9genexpr58__pyx_v__pArray); __pyx_9genexpr58__pyx_v__pArray = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_9genexpr58__pyx_v__pArray); __pyx_9genexpr58__pyx_v__pArray = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_pArray, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":10598
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pArray))
 *         pArray = [int(_pArray) for _pArray in pArray]
 *         for _idx, _pArray in enumerate(pArray):             # <<<<<<<<<<<<<<
 *             self._ptr[0].frame.pArray[_idx] = <ccuda.CUarray><void_ptr>_pArray
 *     @property
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_3 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_pArray)) || PyTuple_CheckExact(__pyx_v_pArray)) {
    __pyx_t_4 = __pyx_v_pArray; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_pArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10598, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10598, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10598, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10598, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10598, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_4);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 10598, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v__pArray, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v__idx, __pyx_t_3);
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3);
    __pyx_t_3 = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "cuda/cuda.pyx":10599
 *         pArray = [int(_pArray) for _pArray in pArray]
 *         for _idx, _pArray in enumerate(pArray):
 *             self._ptr[0].frame.pArray[_idx] = <ccuda.CUarray><void_ptr>_pArray             # <<<<<<<<<<<<<<
 *     @property
 *     def pPitch(self):
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v__pArray); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10599, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v__idx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 10599, __pyx_L1_error)
    ((__pyx_v_self->_ptr[0]).frame.pArray[__pyx_t_8]) = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_7));

    /* "cuda/cuda.pyx":10598
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pArray))
 *         pArray = [int(_pArray) for _pArray in pArray]
 *         for _idx, _pArray in enumerate(pArray):             # <<<<<<<<<<<<<<
 *             self._ptr[0].frame.pArray[_idx] = <ccuda.CUarray><void_ptr>_pArray
 *     @property
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":10594
 *         return [CUarray(init_value=<void_ptr>_pArray) for _pArray in self._ptr[0].frame.pArray]
 *     @pArray.setter
 *     def pArray(self, pArray : List[CUarray]):             # <<<<<<<<<<<<<<
 *         if len(pArray) != 3:
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pArray))
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.pArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__idx);
  __Pyx_XDECREF(__pyx_v__pArray);
  __Pyx_XDECREF(__pyx_9genexpr58__pyx_v__pArray);
  __Pyx_XDECREF(__pyx_v_pArray);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10601
 *             self._ptr[0].frame.pArray[_idx] = <ccuda.CUarray><void_ptr>_pArray
 *     @property
 *     def pPitch(self):             # <<<<<<<<<<<<<<
 *         return [<void_ptr>_pPitch for _pPitch in self._ptr[0].frame.pPitch]
 *     @pPitch.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pPitch_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pPitch_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pPitch___get__(((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pPitch___get__(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self) {
  void *__pyx_9genexpr59__pyx_v__pPitch;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  void **__pyx_t_2;
  void **__pyx_t_3;
  void **__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10601, 0, __PYX_ERR(0, 10601, __pyx_L1_error));

  /* "cuda/cuda.pyx":10602
 *     @property
 *     def pPitch(self):
 *         return [<void_ptr>_pPitch for _pPitch in self._ptr[0].frame.pPitch]             # <<<<<<<<<<<<<<
 *     @pPitch.setter
 *     def pPitch(self, pPitch : List[int]):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = ((__pyx_v_self->_ptr[0]).frame.pPitch + 3);
    for (__pyx_t_4 = (__pyx_v_self->_ptr[0]).frame.pPitch; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
      __pyx_t_2 = __pyx_t_4;
      __pyx_9genexpr59__pyx_v__pPitch = (__pyx_t_2[0]);
      __pyx_t_5 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_9genexpr59__pyx_v__pPitch)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10602, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 10602, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10601
 *             self._ptr[0].frame.pArray[_idx] = <ccuda.CUarray><void_ptr>_pArray
 *     @property
 *     def pPitch(self):             # <<<<<<<<<<<<<<
 *         return [<void_ptr>_pPitch for _pPitch in self._ptr[0].frame.pPitch]
 *     @pPitch.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.pPitch.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10604
 *         return [<void_ptr>_pPitch for _pPitch in self._ptr[0].frame.pPitch]
 *     @pPitch.setter
 *     def pPitch(self, pPitch : List[int]):             # <<<<<<<<<<<<<<
 *         if len(pPitch) != 3:
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pPitch))
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pPitch); /*proto*/
static int __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pPitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_pPitch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pPitch_2__set__(((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)__pyx_v_self), ((PyObject *)__pyx_v_pPitch));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pPitch_2__set__(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self, PyObject *__pyx_v_pPitch) {
  PyObject *__pyx_v__idx = NULL;
  PyObject *__pyx_v__pPitch = NULL;
  PyObject *__pyx_9genexpr60__pyx_v__pPitch = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10604, 0, __PYX_ERR(0, 10604, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_pPitch);

  /* "cuda/cuda.pyx":10605
 *     @pPitch.setter
 *     def pPitch(self, pPitch : List[int]):
 *         if len(pPitch) != 3:             # <<<<<<<<<<<<<<
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pPitch))
 *         pPitch = [<void_ptr>_pPitch for _pPitch in pPitch]
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_pPitch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10605, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != 3) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":10606
 *     def pPitch(self, pPitch : List[int]):
 *         if len(pPitch) != 3:
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pPitch))             # <<<<<<<<<<<<<<
 *         pPitch = [<void_ptr>_pPitch for _pPitch in pPitch]
 *         for _idx, _pPitch in enumerate(pPitch):
 */
    __pyx_t_1 = PyObject_Length(__pyx_v_pPitch); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 10606, __pyx_L1_error)
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_kp_u_not_enough_values_found_during_a);
    __Pyx_GIVEREF(__pyx_kp_u_not_enough_values_found_during_a);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_not_enough_values_found_during_a);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 10606, __pyx_L1_error)

    /* "cuda/cuda.pyx":10605
 *     @pPitch.setter
 *     def pPitch(self, pPitch : List[int]):
 *         if len(pPitch) != 3:             # <<<<<<<<<<<<<<
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pPitch))
 *         pPitch = [<void_ptr>_pPitch for _pPitch in pPitch]
 */
  }

  /* "cuda/cuda.pyx":10607
 *         if len(pPitch) != 3:
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pPitch))
 *         pPitch = [<void_ptr>_pPitch for _pPitch in pPitch]             # <<<<<<<<<<<<<<
 *         for _idx, _pPitch in enumerate(pPitch):
 *             self._ptr[0].frame.pPitch[_idx] = <void*><void_ptr>_pPitch
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10607, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_v_pPitch)) || PyTuple_CheckExact(__pyx_v_pPitch)) {
      __pyx_t_4 = __pyx_v_pPitch; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_pPitch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10607, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10607, __pyx_L6_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10607, __pyx_L6_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10607, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10607, __pyx_L6_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10607, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_4);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 10607, __pyx_L6_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr60__pyx_v__pPitch, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_9genexpr60__pyx_v__pPitch); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10607, __pyx_L6_error)
      __pyx_t_6 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10607, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 10607, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_9genexpr60__pyx_v__pPitch); __pyx_9genexpr60__pyx_v__pPitch = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_9genexpr60__pyx_v__pPitch); __pyx_9genexpr60__pyx_v__pPitch = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_pPitch, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":10608
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pPitch))
 *         pPitch = [<void_ptr>_pPitch for _pPitch in pPitch]
 *         for _idx, _pPitch in enumerate(pPitch):             # <<<<<<<<<<<<<<
 *             self._ptr[0].frame.pPitch[_idx] = <void*><void_ptr>_pPitch
 * 
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_3 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_pPitch)) || PyTuple_CheckExact(__pyx_v_pPitch)) {
    __pyx_t_4 = __pyx_v_pPitch; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_pPitch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10608, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10608, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10608, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 10608, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10608, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_4);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 10608, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v__pPitch, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v__idx, __pyx_t_3);
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3);
    __pyx_t_3 = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "cuda/cuda.pyx":10609
 *         pPitch = [<void_ptr>_pPitch for _pPitch in pPitch]
 *         for _idx, _pPitch in enumerate(pPitch):
 *             self._ptr[0].frame.pPitch[_idx] = <void*><void_ptr>_pPitch             # <<<<<<<<<<<<<<
 * 
 * cdef class CUeglFrame_st:
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v__pPitch); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10609, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v__idx); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 10609, __pyx_L1_error)
    ((__pyx_v_self->_ptr[0]).frame.pPitch[__pyx_t_8]) = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_7));

    /* "cuda/cuda.pyx":10608
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pPitch))
 *         pPitch = [<void_ptr>_pPitch for _pPitch in pPitch]
 *         for _idx, _pPitch in enumerate(pPitch):             # <<<<<<<<<<<<<<
 *             self._ptr[0].frame.pPitch[_idx] = <void*><void_ptr>_pPitch
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":10604
 *         return [<void_ptr>_pPitch for _pPitch in self._ptr[0].frame.pPitch]
 *     @pPitch.setter
 *     def pPitch(self, pPitch : List[int]):             # <<<<<<<<<<<<<<
 *         if len(pPitch) != 3:
 *             raise IndexError('not enough values found during array assignment, expected 3, got', len(pPitch))
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.pPitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__idx);
  __Pyx_XDECREF(__pyx_v__pPitch);
  __Pyx_XDECREF(__pyx_9genexpr60__pyx_v__pPitch);
  __Pyx_XDECREF(__pyx_v_pPitch);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_8__reduce_cython__[] = "_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_8__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_8__reduce_cython__(((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__502)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__503, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_10__setstate_cython__[] = "_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_10__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_10__setstate_cython__(((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__504)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__505, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10646
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10646, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10646, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10646, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st___cinit__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st___cinit__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10646, 0, __PYX_ERR(0, 10646, __pyx_L1_error));

  /* "cuda/cuda.pyx":10647
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10648
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUeglFrame_st *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10647
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10650
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUeglFrame_st *>_ptr             # <<<<<<<<<<<<<<
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._frame = _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u(_ptr=<void_ptr>self._ptr)
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((struct __pyx_t_4cuda_5ccuda_CUeglFrame_st *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10646
 * 
 *     """
 *     def __cinit__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10651
 *         else:
 *             self._ptr = <ccuda.CUeglFrame_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._frame = _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 10651, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10651, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10651, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_2__init__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_2__init__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, CYTHON_UNUSED __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_TraceCall("__init__", __pyx_f[0], 10651, 0, __PYX_ERR(0, 10651, __pyx_L1_error));

  /* "cuda/cuda.pyx":10652
 *             self._ptr = <ccuda.CUeglFrame_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._frame = _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u(_ptr=<void_ptr>self._ptr)             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ptr, __pyx_t_2) < 0) __PYX_ERR(0, 10652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_frame);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_frame));
  __pyx_v_self->_frame = ((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":10651
 *         else:
 *             self._ptr = <ccuda.CUeglFrame_st *>_ptr
 *     def __init__(self, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         self._frame = _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10653
 *     def __init__(self, void_ptr _ptr = 0):
 *         self._frame = _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u(_ptr=<void_ptr>self._ptr)
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def getPtr(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_13CUeglFrame_st_4__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_13CUeglFrame_st_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10653, 0, __PYX_ERR(0, 10653, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUeglFrame_st.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10655
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_13CUeglFrame_st_6getPtr[] = "CUeglFrame_st.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_13CUeglFrame_st_7getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_13CUeglFrame_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_13CUeglFrame_st_6getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_7getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_6getPtr(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_6getPtr(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__506)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10655, 0, __PYX_ERR(0, 10655, __pyx_L1_error));

  /* "cuda/cuda.pyx":10656
 *         pass
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10655
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10657
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_8__repr__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_8__repr__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_v_str_list = NULL;
  PyObject *__pyx_9genexpr61__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10657, 0, __PYX_ERR(0, 10657, __pyx_L1_error));

  /* "cuda/cuda.pyx":10658
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['frame :\n' + '\n'.join(['    ' + line for line in str(self.frame).splitlines()])]
 */
  __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10659
 *     def __repr__(self):
 *         if self._ptr is not NULL:
 *             str_list = []             # <<<<<<<<<<<<<<
 *             str_list += ['frame :\n' + '\n'.join(['    ' + line for line in str(self.frame).splitlines()])]
 *             str_list += ['width : ' + str(self.width)]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_str_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10660
 *         if self._ptr is not NULL:
 *             str_list = []
 *             str_list += ['frame :\n' + '\n'.join(['    ' + line for line in str(self.frame).splitlines()])]             # <<<<<<<<<<<<<<
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10660, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_frame_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10660, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10660, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyUnicode_Splitlines(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10660, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 10660, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10660, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr61__pyx_v_line, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_kp_u__165, __pyx_9genexpr61__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10660, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 10660, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr61__pyx_v_line); __pyx_9genexpr61__pyx_v_line = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr61__pyx_v_line); __pyx_9genexpr61__pyx_v_line = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__128, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_frame, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10661
 *             str_list = []
 *             str_list += ['frame :\n' + '\n'.join(['    ' + line for line in str(self.frame).splitlines()])]
 *             str_list += ['width : ' + str(self.width)]             # <<<<<<<<<<<<<<
 *             str_list += ['height : ' + str(self.height)]
 *             str_list += ['depth : ' + str(self.depth)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_width, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10662
 *             str_list += ['frame :\n' + '\n'.join(['    ' + line for line in str(self.frame).splitlines()])]
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]             # <<<<<<<<<<<<<<
 *             str_list += ['depth : ' + str(self.depth)]
 *             str_list += ['pitch : ' + str(self.pitch)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_height, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10663
 *             str_list += ['width : ' + str(self.width)]
 *             str_list += ['height : ' + str(self.height)]
 *             str_list += ['depth : ' + str(self.depth)]             # <<<<<<<<<<<<<<
 *             str_list += ['pitch : ' + str(self.pitch)]
 *             str_list += ['planeCount : ' + str(self.planeCount)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_depth_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_depth, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10664
 *             str_list += ['height : ' + str(self.height)]
 *             str_list += ['depth : ' + str(self.depth)]
 *             str_list += ['pitch : ' + str(self.pitch)]             # <<<<<<<<<<<<<<
 *             str_list += ['planeCount : ' + str(self.planeCount)]
 *             str_list += ['numChannels : ' + str(self.numChannels)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pitch_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_pitch, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10665
 *             str_list += ['depth : ' + str(self.depth)]
 *             str_list += ['pitch : ' + str(self.pitch)]
 *             str_list += ['planeCount : ' + str(self.planeCount)]             # <<<<<<<<<<<<<<
 *             str_list += ['numChannels : ' + str(self.numChannels)]
 *             str_list += ['frameType : ' + str(self.frameType)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_planeCount_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_planeCount, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10666
 *             str_list += ['pitch : ' + str(self.pitch)]
 *             str_list += ['planeCount : ' + str(self.planeCount)]
 *             str_list += ['numChannels : ' + str(self.numChannels)]             # <<<<<<<<<<<<<<
 *             str_list += ['frameType : ' + str(self.frameType)]
 *             str_list += ['eglColorFormat : ' + str(self.eglColorFormat)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_numChannels_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_numChannels, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10667
 *             str_list += ['planeCount : ' + str(self.planeCount)]
 *             str_list += ['numChannels : ' + str(self.numChannels)]
 *             str_list += ['frameType : ' + str(self.frameType)]             # <<<<<<<<<<<<<<
 *             str_list += ['eglColorFormat : ' + str(self.eglColorFormat)]
 *             str_list += ['cuFormat : ' + str(self.cuFormat)]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_frameType_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_frameType, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10668
 *             str_list += ['numChannels : ' + str(self.numChannels)]
 *             str_list += ['frameType : ' + str(self.frameType)]
 *             str_list += ['eglColorFormat : ' + str(self.eglColorFormat)]             # <<<<<<<<<<<<<<
 *             str_list += ['cuFormat : ' + str(self.cuFormat)]
 *             return '\n'.join(str_list)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_eglColorFormat_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_eglColorFormat, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10669
 *             str_list += ['frameType : ' + str(self.frameType)]
 *             str_list += ['eglColorFormat : ' + str(self.eglColorFormat)]
 *             str_list += ['cuFormat : ' + str(self.cuFormat)]             # <<<<<<<<<<<<<<
 *             return '\n'.join(str_list)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cuFormat_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_cuFormat, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_str_list, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_str_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cuda/cuda.pyx":10670
 *             str_list += ['eglColorFormat : ' + str(self.eglColorFormat)]
 *             str_list += ['cuFormat : ' + str(self.cuFormat)]
 *             return '\n'.join(str_list)             # <<<<<<<<<<<<<<
 *         else:
 *             return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__128, __pyx_v_str_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":10658
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 *         if self._ptr is not NULL:             # <<<<<<<<<<<<<<
 *             str_list = []
 *             str_list += ['frame :\n' + '\n'.join(['    ' + line for line in str(self.frame).splitlines()])]
 */
  }

  /* "cuda/cuda.pyx":10672
 *             return '\n'.join(str_list)
 *         else:
 *             return ''             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u__129);
    __pyx_r = __pyx_kp_u__129;
    goto __pyx_L0;
  }

  /* "cuda/cuda.pyx":10657
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self._ptr is not NULL:
 *             str_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_str_list);
  __Pyx_XDECREF(__pyx_9genexpr61__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10675
 * 
 *     @property
 *     def frame(self):             # <<<<<<<<<<<<<<
 *         return self._frame
 *     @frame.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_5frame_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_5frame_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5frame___get__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_5frame___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10675, 0, __PYX_ERR(0, 10675, __pyx_L1_error));

  /* "cuda/cuda.pyx":10676
 *     @property
 *     def frame(self):
 *         return self._frame             # <<<<<<<<<<<<<<
 *     @frame.setter
 *     def frame(self, frame not None : _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_frame));
  __pyx_r = ((PyObject *)__pyx_v_self->_frame);
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10675
 * 
 *     @property
 *     def frame(self):             # <<<<<<<<<<<<<<
 *         return self._frame
 *     @frame.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.frame.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10678
 *         return self._frame
 *     @frame.setter
 *     def frame(self, frame not None : _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(frame):
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_frame); /*proto*/
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5frame_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_frame) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_frame), __pyx_ptype_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u, 0, "frame", 0))) __PYX_ERR(0, 10678, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5frame_2__set__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), ((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)__pyx_v_frame));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5frame_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *__pyx_v_frame) {
  PyObject *__pyx_v__attr = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10678, 0, __PYX_ERR(0, 10678, __pyx_L1_error));

  /* "cuda/cuda.pyx":10680
 *     def frame(self, frame not None : _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u):
 *         pass
 *         for _attr in dir(frame):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
  __pyx_t_1 = PyObject_Dir(((PyObject *)__pyx_v_frame)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10680, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10680, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10680, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 10680, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10680, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 10680, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v__attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":10681
 *         pass
 *         for _attr in dir(frame):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v__attr, __pyx_n_u_getPtr, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10681, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cuda/cuda.pyx":10682
 *         for _attr in dir(frame):
 *             if _attr == 'getPtr':
 *                 continue             # <<<<<<<<<<<<<<
 *             if not _attr.startswith('_'):
 *                 setattr(self._frame, _attr, getattr(frame, _attr))
 */
      goto __pyx_L3_continue;

      /* "cuda/cuda.pyx":10681
 *         pass
 *         for _attr in dir(frame):
 *             if _attr == 'getPtr':             # <<<<<<<<<<<<<<
 *                 continue
 *             if not _attr.startswith('_'):
 */
    }

    /* "cuda/cuda.pyx":10683
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._frame, _attr, getattr(frame, _attr))
 *     @property
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v__attr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_n_u__166) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u__166);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 10683, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = ((!__pyx_t_5) != 0);
    if (__pyx_t_8) {

      /* "cuda/cuda.pyx":10684
 *                 continue
 *             if not _attr.startswith('_'):
 *                 setattr(self._frame, _attr, getattr(frame, _attr))             # <<<<<<<<<<<<<<
 *     @property
 *     def width(self):
 */
      __pyx_t_1 = ((PyObject *)__pyx_v_self->_frame);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_GetAttr(((PyObject *)__pyx_v_frame), __pyx_v__attr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10684, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_SetAttr(__pyx_t_1, __pyx_v__attr, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 10684, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cuda/cuda.pyx":10683
 *             if _attr == 'getPtr':
 *                 continue
 *             if not _attr.startswith('_'):             # <<<<<<<<<<<<<<
 *                 setattr(self._frame, _attr, getattr(frame, _attr))
 *     @property
 */
    }

    /* "cuda/cuda.pyx":10680
 *     def frame(self, frame not None : _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u):
 *         pass
 *         for _attr in dir(frame):             # <<<<<<<<<<<<<<
 *             if _attr == 'getPtr':
 *                 continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":10678
 *         return self._frame
 *     @frame.setter
 *     def frame(self, frame not None : _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u):             # <<<<<<<<<<<<<<
 *         pass
 *         for _attr in dir(frame):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.frame.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__attr);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10686
 *                 setattr(self._frame, _attr, getattr(frame, _attr))
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].width
 *     @width.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_5width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_5width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5width___get__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_5width___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10686, 0, __PYX_ERR(0, 10686, __pyx_L1_error));

  /* "cuda/cuda.pyx":10687
 *     @property
 *     def width(self):
 *         return self._ptr[0].width             # <<<<<<<<<<<<<<
 *     @width.setter
 *     def width(self, unsigned int width):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10686
 *                 setattr(self._frame, _attr, getattr(frame, _attr))
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].width
 *     @width.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10689
 *         return self._ptr[0].width
 *     @width.setter
 *     def width(self, unsigned int width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].width = width
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_width); /*proto*/
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_width) {
  unsigned int __pyx_v_width;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_width); {
    __pyx_v_width = __Pyx_PyInt_As_unsigned_int(__pyx_arg_width); if (unlikely((__pyx_v_width == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 10689, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5width_2__set__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), ((unsigned int)__pyx_v_width));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5width_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, unsigned int __pyx_v_width) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10689, 0, __PYX_ERR(0, 10689, __pyx_L1_error));

  /* "cuda/cuda.pyx":10691
 *     def width(self, unsigned int width):
 *         pass
 *         self._ptr[0].width = width             # <<<<<<<<<<<<<<
 *     @property
 *     def height(self):
 */
  (__pyx_v_self->_ptr[0]).width = __pyx_v_width;

  /* "cuda/cuda.pyx":10689
 *         return self._ptr[0].width
 *     @width.setter
 *     def width(self, unsigned int width):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].width = width
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10693
 *         self._ptr[0].width = width
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].height
 *     @height.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_6height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_6height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_6height___get__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_6height___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10693, 0, __PYX_ERR(0, 10693, __pyx_L1_error));

  /* "cuda/cuda.pyx":10694
 *     @property
 *     def height(self):
 *         return self._ptr[0].height             # <<<<<<<<<<<<<<
 *     @height.setter
 *     def height(self, unsigned int height):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10693
 *         self._ptr[0].width = width
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].height
 *     @height.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10696
 *         return self._ptr[0].height
 *     @height.setter
 *     def height(self, unsigned int height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].height = height
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_6height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_height); /*proto*/
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_6height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_height) {
  unsigned int __pyx_v_height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_height); {
    __pyx_v_height = __Pyx_PyInt_As_unsigned_int(__pyx_arg_height); if (unlikely((__pyx_v_height == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 10696, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_6height_2__set__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), ((unsigned int)__pyx_v_height));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_6height_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, unsigned int __pyx_v_height) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10696, 0, __PYX_ERR(0, 10696, __pyx_L1_error));

  /* "cuda/cuda.pyx":10698
 *     def height(self, unsigned int height):
 *         pass
 *         self._ptr[0].height = height             # <<<<<<<<<<<<<<
 *     @property
 *     def depth(self):
 */
  (__pyx_v_self->_ptr[0]).height = __pyx_v_height;

  /* "cuda/cuda.pyx":10696
 *         return self._ptr[0].height
 *     @height.setter
 *     def height(self, unsigned int height):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].height = height
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10700
 *         self._ptr[0].height = height
 *     @property
 *     def depth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].depth
 *     @depth.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_5depth_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_5depth_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5depth___get__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_5depth___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10700, 0, __PYX_ERR(0, 10700, __pyx_L1_error));

  /* "cuda/cuda.pyx":10701
 *     @property
 *     def depth(self):
 *         return self._ptr[0].depth             # <<<<<<<<<<<<<<
 *     @depth.setter
 *     def depth(self, unsigned int depth):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).depth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10700
 *         self._ptr[0].height = height
 *     @property
 *     def depth(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].depth
 *     @depth.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.depth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10703
 *         return self._ptr[0].depth
 *     @depth.setter
 *     def depth(self, unsigned int depth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].depth = depth
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5depth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_depth); /*proto*/
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5depth_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_depth) {
  unsigned int __pyx_v_depth;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_depth); {
    __pyx_v_depth = __Pyx_PyInt_As_unsigned_int(__pyx_arg_depth); if (unlikely((__pyx_v_depth == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 10703, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.depth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5depth_2__set__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), ((unsigned int)__pyx_v_depth));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5depth_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, unsigned int __pyx_v_depth) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10703, 0, __PYX_ERR(0, 10703, __pyx_L1_error));

  /* "cuda/cuda.pyx":10705
 *     def depth(self, unsigned int depth):
 *         pass
 *         self._ptr[0].depth = depth             # <<<<<<<<<<<<<<
 *     @property
 *     def pitch(self):
 */
  (__pyx_v_self->_ptr[0]).depth = __pyx_v_depth;

  /* "cuda/cuda.pyx":10703
 *         return self._ptr[0].depth
 *     @depth.setter
 *     def depth(self, unsigned int depth):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].depth = depth
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.depth.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10707
 *         self._ptr[0].depth = depth
 *     @property
 *     def pitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].pitch
 *     @pitch.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_5pitch_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_5pitch_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5pitch___get__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_5pitch___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10707, 0, __PYX_ERR(0, 10707, __pyx_L1_error));

  /* "cuda/cuda.pyx":10708
 *     @property
 *     def pitch(self):
 *         return self._ptr[0].pitch             # <<<<<<<<<<<<<<
 *     @pitch.setter
 *     def pitch(self, unsigned int pitch):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).pitch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10707
 *         self._ptr[0].depth = depth
 *     @property
 *     def pitch(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].pitch
 *     @pitch.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.pitch.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10710
 *         return self._ptr[0].pitch
 *     @pitch.setter
 *     def pitch(self, unsigned int pitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].pitch = pitch
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5pitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_pitch); /*proto*/
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5pitch_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_pitch) {
  unsigned int __pyx_v_pitch;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_pitch); {
    __pyx_v_pitch = __Pyx_PyInt_As_unsigned_int(__pyx_arg_pitch); if (unlikely((__pyx_v_pitch == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 10710, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.pitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5pitch_2__set__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), ((unsigned int)__pyx_v_pitch));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_5pitch_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, unsigned int __pyx_v_pitch) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10710, 0, __PYX_ERR(0, 10710, __pyx_L1_error));

  /* "cuda/cuda.pyx":10712
 *     def pitch(self, unsigned int pitch):
 *         pass
 *         self._ptr[0].pitch = pitch             # <<<<<<<<<<<<<<
 *     @property
 *     def planeCount(self):
 */
  (__pyx_v_self->_ptr[0]).pitch = __pyx_v_pitch;

  /* "cuda/cuda.pyx":10710
 *         return self._ptr[0].pitch
 *     @pitch.setter
 *     def pitch(self, unsigned int pitch):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].pitch = pitch
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.pitch.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10714
 *         self._ptr[0].pitch = pitch
 *     @property
 *     def planeCount(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].planeCount
 *     @planeCount.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_10planeCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_10planeCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_10planeCount___get__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_10planeCount___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10714, 0, __PYX_ERR(0, 10714, __pyx_L1_error));

  /* "cuda/cuda.pyx":10715
 *     @property
 *     def planeCount(self):
 *         return self._ptr[0].planeCount             # <<<<<<<<<<<<<<
 *     @planeCount.setter
 *     def planeCount(self, unsigned int planeCount):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).planeCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10714
 *         self._ptr[0].pitch = pitch
 *     @property
 *     def planeCount(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].planeCount
 *     @planeCount.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.planeCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10717
 *         return self._ptr[0].planeCount
 *     @planeCount.setter
 *     def planeCount(self, unsigned int planeCount):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].planeCount = planeCount
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_10planeCount_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_planeCount); /*proto*/
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_10planeCount_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_planeCount) {
  unsigned int __pyx_v_planeCount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_planeCount); {
    __pyx_v_planeCount = __Pyx_PyInt_As_unsigned_int(__pyx_arg_planeCount); if (unlikely((__pyx_v_planeCount == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 10717, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.planeCount.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_10planeCount_2__set__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), ((unsigned int)__pyx_v_planeCount));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_10planeCount_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, unsigned int __pyx_v_planeCount) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10717, 0, __PYX_ERR(0, 10717, __pyx_L1_error));

  /* "cuda/cuda.pyx":10719
 *     def planeCount(self, unsigned int planeCount):
 *         pass
 *         self._ptr[0].planeCount = planeCount             # <<<<<<<<<<<<<<
 *     @property
 *     def numChannels(self):
 */
  (__pyx_v_self->_ptr[0]).planeCount = __pyx_v_planeCount;

  /* "cuda/cuda.pyx":10717
 *         return self._ptr[0].planeCount
 *     @planeCount.setter
 *     def planeCount(self, unsigned int planeCount):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].planeCount = planeCount
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.planeCount.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10721
 *         self._ptr[0].planeCount = planeCount
 *     @property
 *     def numChannels(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].numChannels
 *     @numChannels.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_11numChannels_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_11numChannels_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_11numChannels___get__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_11numChannels___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10721, 0, __PYX_ERR(0, 10721, __pyx_L1_error));

  /* "cuda/cuda.pyx":10722
 *     @property
 *     def numChannels(self):
 *         return self._ptr[0].numChannels             # <<<<<<<<<<<<<<
 *     @numChannels.setter
 *     def numChannels(self, unsigned int numChannels):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->_ptr[0]).numChannels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10721
 *         self._ptr[0].planeCount = planeCount
 *     @property
 *     def numChannels(self):             # <<<<<<<<<<<<<<
 *         return self._ptr[0].numChannels
 *     @numChannels.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.numChannels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10724
 *         return self._ptr[0].numChannels
 *     @numChannels.setter
 *     def numChannels(self, unsigned int numChannels):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].numChannels = numChannels
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_11numChannels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numChannels); /*proto*/
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_11numChannels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_numChannels) {
  unsigned int __pyx_v_numChannels;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_numChannels); {
    __pyx_v_numChannels = __Pyx_PyInt_As_unsigned_int(__pyx_arg_numChannels); if (unlikely((__pyx_v_numChannels == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 10724, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.numChannels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_11numChannels_2__set__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), ((unsigned int)__pyx_v_numChannels));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_11numChannels_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, unsigned int __pyx_v_numChannels) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10724, 0, __PYX_ERR(0, 10724, __pyx_L1_error));

  /* "cuda/cuda.pyx":10726
 *     def numChannels(self, unsigned int numChannels):
 *         pass
 *         self._ptr[0].numChannels = numChannels             # <<<<<<<<<<<<<<
 *     @property
 *     def frameType(self):
 */
  (__pyx_v_self->_ptr[0]).numChannels = __pyx_v_numChannels;

  /* "cuda/cuda.pyx":10724
 *         return self._ptr[0].numChannels
 *     @numChannels.setter
 *     def numChannels(self, unsigned int numChannels):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].numChannels = numChannels
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.numChannels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10728
 *         self._ptr[0].numChannels = numChannels
 *     @property
 *     def frameType(self):             # <<<<<<<<<<<<<<
 *         return CUeglFrameType(self._ptr[0].frameType)
 *     @frameType.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_9frameType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_9frameType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_9frameType___get__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_9frameType___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10728, 0, __PYX_ERR(0, 10728, __pyx_L1_error));

  /* "cuda/cuda.pyx":10729
 *     @property
 *     def frameType(self):
 *         return CUeglFrameType(self._ptr[0].frameType)             # <<<<<<<<<<<<<<
 *     @frameType.setter
 *     def frameType(self, frameType not None : CUeglFrameType):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUeglFrameType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglFrameType_enum((__pyx_v_self->_ptr[0]).frameType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10728
 *         self._ptr[0].numChannels = numChannels
 *     @property
 *     def frameType(self):             # <<<<<<<<<<<<<<
 *         return CUeglFrameType(self._ptr[0].frameType)
 *     @frameType.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.frameType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10731
 *         return CUeglFrameType(self._ptr[0].frameType)
 *     @frameType.setter
 *     def frameType(self, frameType not None : CUeglFrameType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].frameType = frameType.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_9frameType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_frameType); /*proto*/
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_9frameType_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_frameType) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_frameType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "frameType"); __PYX_ERR(0, 10731, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_9frameType_2__set__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), ((PyObject *)__pyx_v_frameType));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_9frameType_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, PyObject *__pyx_v_frameType) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_5ccuda_CUeglFrameType __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10731, 0, __PYX_ERR(0, 10731, __pyx_L1_error));

  /* "cuda/cuda.pyx":10733
 *     def frameType(self, frameType not None : CUeglFrameType):
 *         pass
 *         self._ptr[0].frameType = frameType.value             # <<<<<<<<<<<<<<
 *     @property
 *     def eglColorFormat(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frameType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)__Pyx_PyInt_As_enum____pyx_t_4cuda_5ccuda_CUeglFrameType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 10733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).frameType = __pyx_t_2;

  /* "cuda/cuda.pyx":10731
 *         return CUeglFrameType(self._ptr[0].frameType)
 *     @frameType.setter
 *     def frameType(self, frameType not None : CUeglFrameType):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].frameType = frameType.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.frameType.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10735
 *         self._ptr[0].frameType = frameType.value
 *     @property
 *     def eglColorFormat(self):             # <<<<<<<<<<<<<<
 *         return CUeglColorFormat(self._ptr[0].eglColorFormat)
 *     @eglColorFormat.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_14eglColorFormat_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_14eglColorFormat_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_14eglColorFormat___get__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_14eglColorFormat___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10735, 0, __PYX_ERR(0, 10735, __pyx_L1_error));

  /* "cuda/cuda.pyx":10736
 *     @property
 *     def eglColorFormat(self):
 *         return CUeglColorFormat(self._ptr[0].eglColorFormat)             # <<<<<<<<<<<<<<
 *     @eglColorFormat.setter
 *     def eglColorFormat(self, eglColorFormat not None : CUeglColorFormat):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUeglColorFormat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum((__pyx_v_self->_ptr[0]).eglColorFormat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10735
 *         self._ptr[0].frameType = frameType.value
 *     @property
 *     def eglColorFormat(self):             # <<<<<<<<<<<<<<
 *         return CUeglColorFormat(self._ptr[0].eglColorFormat)
 *     @eglColorFormat.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.eglColorFormat.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10738
 *         return CUeglColorFormat(self._ptr[0].eglColorFormat)
 *     @eglColorFormat.setter
 *     def eglColorFormat(self, eglColorFormat not None : CUeglColorFormat):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].eglColorFormat = eglColorFormat.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_14eglColorFormat_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_eglColorFormat); /*proto*/
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_14eglColorFormat_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_eglColorFormat) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_eglColorFormat) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "eglColorFormat"); __PYX_ERR(0, 10738, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_14eglColorFormat_2__set__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), ((PyObject *)__pyx_v_eglColorFormat));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_14eglColorFormat_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, PyObject *__pyx_v_eglColorFormat) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_5ccuda_CUeglColorFormat __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10738, 0, __PYX_ERR(0, 10738, __pyx_L1_error));

  /* "cuda/cuda.pyx":10740
 *     def eglColorFormat(self, eglColorFormat not None : CUeglColorFormat):
 *         pass
 *         self._ptr[0].eglColorFormat = eglColorFormat.value             # <<<<<<<<<<<<<<
 *     @property
 *     def cuFormat(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_eglColorFormat, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)__Pyx_PyInt_As_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 10740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).eglColorFormat = __pyx_t_2;

  /* "cuda/cuda.pyx":10738
 *         return CUeglColorFormat(self._ptr[0].eglColorFormat)
 *     @eglColorFormat.setter
 *     def eglColorFormat(self, eglColorFormat not None : CUeglColorFormat):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].eglColorFormat = eglColorFormat.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.eglColorFormat.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10742
 *         self._ptr[0].eglColorFormat = eglColorFormat.value
 *     @property
 *     def cuFormat(self):             # <<<<<<<<<<<<<<
 *         return CUarray_format(self._ptr[0].cuFormat)
 *     @cuFormat.setter
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_8cuFormat_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_8cuFormat_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_8cuFormat___get__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_8cuFormat___get__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_TraceCall("__get__", __pyx_f[0], 10742, 0, __PYX_ERR(0, 10742, __pyx_L1_error));

  /* "cuda/cuda.pyx":10743
 *     @property
 *     def cuFormat(self):
 *         return CUarray_format(self._ptr[0].cuFormat)             # <<<<<<<<<<<<<<
 *     @cuFormat.setter
 *     def cuFormat(self, cuFormat not None : CUarray_format):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUarray_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_enum__CUarray_format_enum((__pyx_v_self->_ptr[0]).cuFormat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10742
 *         self._ptr[0].eglColorFormat = eglColorFormat.value
 *     @property
 *     def cuFormat(self):             # <<<<<<<<<<<<<<
 *         return CUarray_format(self._ptr[0].cuFormat)
 *     @cuFormat.setter
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.cuFormat.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10745
 *         return CUarray_format(self._ptr[0].cuFormat)
 *     @cuFormat.setter
 *     def cuFormat(self, cuFormat not None : CUarray_format):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].cuFormat = cuFormat.value
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_8cuFormat_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_cuFormat); /*proto*/
static int __pyx_pw_4cuda_4cuda_13CUeglFrame_st_8cuFormat_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_cuFormat) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_cuFormat) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "cuFormat"); __PYX_ERR(0, 10745, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_8cuFormat_2__set__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), ((PyObject *)__pyx_v_cuFormat));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_13CUeglFrame_st_8cuFormat_2__set__(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, PyObject *__pyx_v_cuFormat) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUarray_format __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_TraceCall("__set__", __pyx_f[0], 10745, 0, __PYX_ERR(0, 10745, __pyx_L1_error));

  /* "cuda/cuda.pyx":10747
 *     def cuFormat(self, cuFormat not None : CUarray_format):
 *         pass
 *         self._ptr[0].cuFormat = cuFormat.value             # <<<<<<<<<<<<<<
 * 
 * cdef class cuuint32_t:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cuFormat, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUarray_format_enum)__Pyx_PyInt_As_enum__CUarray_format_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 10747, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->_ptr[0]).cuFormat = __pyx_t_2;

  /* "cuda/cuda.pyx":10745
 *         return CUarray_format(self._ptr[0].cuFormat)
 *     @cuFormat.setter
 *     def cuFormat(self, cuFormat not None : CUarray_format):             # <<<<<<<<<<<<<<
 *         pass
 *         self._ptr[0].cuFormat = cuFormat.value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.cuFormat.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_13CUeglFrame_st_10__reduce_cython__[] = "CUeglFrame_st.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_13CUeglFrame_st_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_13CUeglFrame_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_13CUeglFrame_st_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__507)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__508, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_13CUeglFrame_st_12__setstate_cython__[] = "CUeglFrame_st.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_13CUeglFrame_st_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_13CUeglFrame_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_13CUeglFrame_st_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_13CUeglFrame_st_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_13CUeglFrame_st_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_13CUeglFrame_st_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__509)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__510, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUeglFrame_st.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10758
 * 
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_10cuuint32_t_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_10cuuint32_t_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  uint32_t __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10758, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_init_value == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 10758, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((uint32_t)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10758, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10758, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuuint32_t.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuuint32_t___cinit__(((struct __pyx_obj_4cuda_4cuda_cuuint32_t *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_10cuuint32_t___cinit__(struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self, uint32_t __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10758, 0, __PYX_ERR(0, 10758, __pyx_L1_error));

  /* "cuda/cuda.pyx":10759
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10760
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.cuuint32_t *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10759
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10762
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.cuuint32_t *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((cuuint32_t *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10763
 *         else:
 *             self._ptr = <ccuda.cuuint32_t *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10764
 *             self._ptr = <ccuda.cuuint32_t *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":10763
 *         else:
 *             self._ptr = <ccuda.cuuint32_t *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":10758
 * 
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuuint32_t.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10765
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_10cuuint32_t_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_10cuuint32_t_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_10cuuint32_t_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_cuuint32_t *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_10cuuint32_t_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10765, 0, __PYX_ERR(0, 10765, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.cuuint32_t.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10767
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<cuuint32_t ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint32_t_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint32_t_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuuint32_t_4__repr__(((struct __pyx_obj_4cuda_4cuda_cuuint32_t *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10cuuint32_t_4__repr__(struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10767, 0, __PYX_ERR(0, 10767, __pyx_L1_error));

  /* "cuda/cuda.pyx":10768
 *         pass
 *     def __repr__(self):
 *         return '<cuuint32_t ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_cuuint32_t, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10767
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<cuuint32_t ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.cuuint32_t.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10769
 *     def __repr__(self):
 *         return '<cuuint32_t ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint32_t_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint32_t_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuuint32_t_6__int__(((struct __pyx_obj_4cuda_4cuda_cuuint32_t *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10cuuint32_t_6__int__(struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 10769, 0, __PYX_ERR(0, 10769, __pyx_L1_error));

  /* "cuda/cuda.pyx":10770
 *         return '<cuuint32_t ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(((uint32_t)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10769
 *     def __repr__(self):
 *         return '<cuuint32_t ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.cuuint32_t.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10771
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint32_t_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_10cuuint32_t_8getPtr[] = "cuuint32_t.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_10cuuint32_t_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_10cuuint32_t_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_10cuuint32_t_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint32_t_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuuint32_t_8getPtr(((struct __pyx_obj_4cuda_4cuda_cuuint32_t *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10cuuint32_t_8getPtr(struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__511)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10771, 0, __PYX_ERR(0, 10771, __pyx_L1_error));

  /* "cuda/cuda.pyx":10772
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class cuuint64_t:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10771
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.cuuint32_t.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint32_t_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_10cuuint32_t_10__reduce_cython__[] = "cuuint32_t.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_10cuuint32_t_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10cuuint32_t_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_10cuuint32_t_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint32_t_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuuint32_t_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_cuuint32_t *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10cuuint32_t_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__512)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__513, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.cuuint32_t.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint32_t_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_10cuuint32_t_12__setstate_cython__[] = "cuuint32_t.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_10cuuint32_t_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10cuuint32_t_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_10cuuint32_t_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint32_t_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuuint32_t_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_cuuint32_t *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10cuuint32_t_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_cuuint32_t *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__514)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__515, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.cuuint32_t.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10783
 * 
 *     """
 *     def __cinit__(self, uint64_t init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_10cuuint64_t_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_10cuuint64_t_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  uint64_t __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10783, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_init_value == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 10783, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((uint64_t)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10783, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10783, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuuint64_t.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuuint64_t___cinit__(((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_10cuuint64_t___cinit__(struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self, uint64_t __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10783, 0, __PYX_ERR(0, 10783, __pyx_L1_error));

  /* "cuda/cuda.pyx":10784
 *     """
 *     def __cinit__(self, uint64_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10785
 *     def __cinit__(self, uint64_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.cuuint64_t *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10784
 *     """
 *     def __cinit__(self, uint64_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10787
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.cuuint64_t *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((cuuint64_t *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10788
 *         else:
 *             self._ptr = <ccuda.cuuint64_t *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10789
 *             self._ptr = <ccuda.cuuint64_t *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":10788
 *         else:
 *             self._ptr = <ccuda.cuuint64_t *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":10783
 * 
 *     """
 *     def __cinit__(self, uint64_t init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuuint64_t.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10790
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_10cuuint64_t_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_10cuuint64_t_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_10cuuint64_t_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_10cuuint64_t_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10790, 0, __PYX_ERR(0, 10790, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.cuuint64_t.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10792
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<cuuint64_t ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint64_t_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint64_t_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuuint64_t_4__repr__(((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10cuuint64_t_4__repr__(struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10792, 0, __PYX_ERR(0, 10792, __pyx_L1_error));

  /* "cuda/cuda.pyx":10793
 *         pass
 *     def __repr__(self):
 *         return '<cuuint64_t ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <uint64_t>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_cuuint64_t, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10792
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<cuuint64_t ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.cuuint64_t.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10794
 *     def __repr__(self):
 *         return '<cuuint64_t ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <uint64_t>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint64_t_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint64_t_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuuint64_t_6__int__(((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10cuuint64_t_6__int__(struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 10794, 0, __PYX_ERR(0, 10794, __pyx_L1_error));

  /* "cuda/cuda.pyx":10795
 *         return '<cuuint64_t ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <uint64_t>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((uint64_t)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10794
 *     def __repr__(self):
 *         return '<cuuint64_t ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <uint64_t>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.cuuint64_t.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10796
 *     def __int__(self):
 *         return <uint64_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint64_t_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_10cuuint64_t_8getPtr[] = "cuuint64_t.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_10cuuint64_t_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_10cuuint64_t_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_10cuuint64_t_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint64_t_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuuint64_t_8getPtr(((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10cuuint64_t_8getPtr(struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__516)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10796, 0, __PYX_ERR(0, 10796, __pyx_L1_error));

  /* "cuda/cuda.pyx":10797
 *         return <uint64_t>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUdeviceptr_v2:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10796
 *     def __int__(self):
 *         return <uint64_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.cuuint64_t.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint64_t_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_10cuuint64_t_10__reduce_cython__[] = "cuuint64_t.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_10cuuint64_t_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10cuuint64_t_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_10cuuint64_t_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint64_t_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuuint64_t_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10cuuint64_t_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__517)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__518, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.cuuint64_t.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint64_t_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_10cuuint64_t_12__setstate_cython__[] = "cuuint64_t.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_10cuuint64_t_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10cuuint64_t_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_10cuuint64_t_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_10cuuint64_t_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuuint64_t_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10cuuint64_t_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__519)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__520, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.cuuint64_t.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10810
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned PY_LONG_LONG __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10810, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10810, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((unsigned PY_LONG_LONG)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10810, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10810, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr_v2.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_14CUdeviceptr_v2___cinit__(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_14CUdeviceptr_v2___cinit__(struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10810, 0, __PYX_ERR(0, 10810, __pyx_L1_error));

  /* "cuda/cuda.pyx":10811
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10812
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUdeviceptr_v2 *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10811
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10814
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUdeviceptr_v2 *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUdeviceptr_v2 *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10815
 *         else:
 *             self._ptr = <ccuda.CUdeviceptr_v2 *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10816
 *             self._ptr = <ccuda.CUdeviceptr_v2 *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":10815
 *         else:
 *             self._ptr = <ccuda.CUdeviceptr_v2 *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":10810
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr_v2.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10817
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10817, 0, __PYX_ERR(0, 10817, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUdeviceptr_v2.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10819
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUdeviceptr_v2 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_4__repr__(struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10819, 0, __PYX_ERR(0, 10819, __pyx_L1_error));

  /* "cuda/cuda.pyx":10820
 *         pass
 *     def __repr__(self):
 *         return '<CUdeviceptr_v2 ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUdeviceptr_v2, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10819
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUdeviceptr_v2 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr_v2.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10821
 *     def __repr__(self):
 *         return '<CUdeviceptr_v2 ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_6__int__(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_6__int__(struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 10821, 0, __PYX_ERR(0, 10821, __pyx_L1_error));

  /* "cuda/cuda.pyx":10822
 *         return '<CUdeviceptr_v2 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((unsigned PY_LONG_LONG)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10821
 *     def __repr__(self):
 *         return '<CUdeviceptr_v2 ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr_v2.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10823
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_14CUdeviceptr_v2_8getPtr[] = "CUdeviceptr_v2.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_14CUdeviceptr_v2_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_14CUdeviceptr_v2_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_8getPtr(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_8getPtr(struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__521)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10823, 0, __PYX_ERR(0, 10823, __pyx_L1_error));

  /* "cuda/cuda.pyx":10824
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUdeviceptr:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10823
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr_v2.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_14CUdeviceptr_v2_10__reduce_cython__[] = "CUdeviceptr_v2.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_14CUdeviceptr_v2_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_14CUdeviceptr_v2_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__522)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__523, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr_v2.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_14CUdeviceptr_v2_12__setstate_cython__[] = "CUdeviceptr_v2.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_14CUdeviceptr_v2_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_14CUdeviceptr_v2_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_14CUdeviceptr_v2_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__524)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__525, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr_v2.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10837
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_11CUdeviceptr_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_11CUdeviceptr_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned PY_LONG_LONG __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10837, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10837, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((unsigned PY_LONG_LONG)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10837, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10837, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUdeviceptr___cinit__(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_11CUdeviceptr___cinit__(struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10837, 0, __PYX_ERR(0, 10837, __pyx_L1_error));

  /* "cuda/cuda.pyx":10838
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10839
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUdeviceptr *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10838
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10841
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUdeviceptr *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUdeviceptr *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10842
 *         else:
 *             self._ptr = <ccuda.CUdeviceptr *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10843
 *             self._ptr = <ccuda.CUdeviceptr *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":10842
 *         else:
 *             self._ptr = <ccuda.CUdeviceptr *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":10837
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10844
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_11CUdeviceptr_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_11CUdeviceptr_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_11CUdeviceptr_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_11CUdeviceptr_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10844, 0, __PYX_ERR(0, 10844, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUdeviceptr.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10846
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUdeviceptr ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUdeviceptr_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUdeviceptr_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUdeviceptr_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUdeviceptr_4__repr__(struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10846, 0, __PYX_ERR(0, 10846, __pyx_L1_error));

  /* "cuda/cuda.pyx":10847
 *         pass
 *     def __repr__(self):
 *         return '<CUdeviceptr ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUdeviceptr, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10846
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUdeviceptr ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10848
 *     def __repr__(self):
 *         return '<CUdeviceptr ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUdeviceptr_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUdeviceptr_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUdeviceptr_6__int__(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUdeviceptr_6__int__(struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 10848, 0, __PYX_ERR(0, 10848, __pyx_L1_error));

  /* "cuda/cuda.pyx":10849
 *         return '<CUdeviceptr ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((unsigned PY_LONG_LONG)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10848
 *     def __repr__(self):
 *         return '<CUdeviceptr ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10850
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUdeviceptr_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUdeviceptr_8getPtr[] = "CUdeviceptr.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUdeviceptr_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUdeviceptr_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUdeviceptr_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_11CUdeviceptr_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUdeviceptr_8getPtr(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUdeviceptr_8getPtr(struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__526)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10850, 0, __PYX_ERR(0, 10850, __pyx_L1_error));

  /* "cuda/cuda.pyx":10851
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUdevice_v1:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10850
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUdeviceptr_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUdeviceptr_10__reduce_cython__[] = "CUdeviceptr.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUdeviceptr_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUdeviceptr_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUdeviceptr_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11CUdeviceptr_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUdeviceptr_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUdeviceptr_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__527)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__528, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUdeviceptr_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUdeviceptr_12__setstate_cython__[] = "CUdeviceptr.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUdeviceptr_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUdeviceptr_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11CUdeviceptr_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11CUdeviceptr_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUdeviceptr_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUdeviceptr_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__529)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__530, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdeviceptr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10864
 * 
 *     """
 *     def __cinit__(self, int init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_11CUdevice_v1_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_11CUdevice_v1_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10864, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_init_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 10864, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((int)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10864, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10864, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevice_v1.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUdevice_v1___cinit__(((struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_11CUdevice_v1___cinit__(struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self, int __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10864, 0, __PYX_ERR(0, 10864, __pyx_L1_error));

  /* "cuda/cuda.pyx":10865
 *     """
 *     def __cinit__(self, int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10866
 *     def __cinit__(self, int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUdevice_v1 *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10865
 *     """
 *     def __cinit__(self, int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10868
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUdevice_v1 *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUdevice_v1 *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10869
 *         else:
 *             self._ptr = <ccuda.CUdevice_v1 *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10870
 *             self._ptr = <ccuda.CUdevice_v1 *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":10869
 *         else:
 *             self._ptr = <ccuda.CUdevice_v1 *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":10864
 * 
 *     """
 *     def __cinit__(self, int init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevice_v1.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10871
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_11CUdevice_v1_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_11CUdevice_v1_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_11CUdevice_v1_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_11CUdevice_v1_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10871, 0, __PYX_ERR(0, 10871, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUdevice_v1.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10873
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUdevice_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUdevice_v1_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUdevice_v1_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUdevice_v1_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUdevice_v1_4__repr__(struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10873, 0, __PYX_ERR(0, 10873, __pyx_L1_error));

  /* "cuda/cuda.pyx":10874
 *         pass
 *     def __repr__(self):
 *         return '<CUdevice_v1 ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <int>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUdevice_v1, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10873
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUdevice_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUdevice_v1.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10875
 *     def __repr__(self):
 *         return '<CUdevice_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <int>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUdevice_v1_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUdevice_v1_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUdevice_v1_6__int__(((struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUdevice_v1_6__int__(struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 10875, 0, __PYX_ERR(0, 10875, __pyx_L1_error));

  /* "cuda/cuda.pyx":10876
 *         return '<CUdevice_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <int>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10875
 *     def __repr__(self):
 *         return '<CUdevice_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <int>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevice_v1.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10877
 *     def __int__(self):
 *         return <int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUdevice_v1_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUdevice_v1_8getPtr[] = "CUdevice_v1.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUdevice_v1_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUdevice_v1_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUdevice_v1_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_11CUdevice_v1_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUdevice_v1_8getPtr(((struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUdevice_v1_8getPtr(struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__531)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10877, 0, __PYX_ERR(0, 10877, __pyx_L1_error));

  /* "cuda/cuda.pyx":10878
 *         return <int>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUdevice:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10877
 *     def __int__(self):
 *         return <int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevice_v1.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUdevice_v1_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUdevice_v1_10__reduce_cython__[] = "CUdevice_v1.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUdevice_v1_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUdevice_v1_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUdevice_v1_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11CUdevice_v1_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUdevice_v1_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUdevice_v1_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__532)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__533, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevice_v1.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUdevice_v1_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUdevice_v1_12__setstate_cython__[] = "CUdevice_v1.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUdevice_v1_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUdevice_v1_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11CUdevice_v1_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11CUdevice_v1_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUdevice_v1_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUdevice_v1_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevice_v1 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__534)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__535, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevice_v1.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10891
 * 
 *     """
 *     def __cinit__(self, int init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_8CUdevice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_8CUdevice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10891, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_init_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 10891, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((int)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10891, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10891, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevice.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUdevice___cinit__(((struct __pyx_obj_4cuda_4cuda_CUdevice *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_8CUdevice___cinit__(struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self, int __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10891, 0, __PYX_ERR(0, 10891, __pyx_L1_error));

  /* "cuda/cuda.pyx":10892
 *     """
 *     def __cinit__(self, int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10893
 *     def __cinit__(self, int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUdevice *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10892
 *     """
 *     def __cinit__(self, int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10895
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUdevice *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUdevice *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10896
 *         else:
 *             self._ptr = <ccuda.CUdevice *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10897
 *             self._ptr = <ccuda.CUdevice *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":10896
 *         else:
 *             self._ptr = <ccuda.CUdevice *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":10891
 * 
 *     """
 *     def __cinit__(self, int init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUdevice.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10898
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_8CUdevice_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_8CUdevice_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_8CUdevice_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUdevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_8CUdevice_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10898, 0, __PYX_ERR(0, 10898, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUdevice.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10900
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUdevice ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUdevice_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUdevice_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUdevice_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUdevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUdevice_4__repr__(struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10900, 0, __PYX_ERR(0, 10900, __pyx_L1_error));

  /* "cuda/cuda.pyx":10901
 *         pass
 *     def __repr__(self):
 *         return '<CUdevice ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <int>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUdevice, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10900
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUdevice ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUdevice.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10902
 *     def __repr__(self):
 *         return '<CUdevice ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <int>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUdevice_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_8CUdevice_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUdevice_6__int__(((struct __pyx_obj_4cuda_4cuda_CUdevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUdevice_6__int__(struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 10902, 0, __PYX_ERR(0, 10902, __pyx_L1_error));

  /* "cuda/cuda.pyx":10903
 *         return '<CUdevice ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <int>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10902
 *     def __repr__(self):
 *         return '<CUdevice ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <int>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevice.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10904
 *     def __int__(self):
 *         return <int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUdevice_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUdevice_8getPtr[] = "CUdevice.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUdevice_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUdevice_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUdevice_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_8CUdevice_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUdevice_8getPtr(((struct __pyx_obj_4cuda_4cuda_CUdevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUdevice_8getPtr(struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__536)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10904, 0, __PYX_ERR(0, 10904, __pyx_L1_error));

  /* "cuda/cuda.pyx":10905
 *         return <int>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUtexObject_v1:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10904
 *     def __int__(self):
 *         return <int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevice.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUdevice_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUdevice_10__reduce_cython__[] = "CUdevice.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUdevice_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUdevice_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUdevice_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_8CUdevice_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUdevice_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUdevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUdevice_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__537)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__538, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_8CUdevice_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_8CUdevice_12__setstate_cython__[] = "CUdevice.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_8CUdevice_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUdevice_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_8CUdevice_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_8CUdevice_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_8CUdevice_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUdevice *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8CUdevice_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__539)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__540, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUdevice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10918
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_14CUtexObject_v1_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_14CUtexObject_v1_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned PY_LONG_LONG __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10918, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10918, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((unsigned PY_LONG_LONG)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10918, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10918, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUtexObject_v1.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_14CUtexObject_v1___cinit__(((struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_14CUtexObject_v1___cinit__(struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10918, 0, __PYX_ERR(0, 10918, __pyx_L1_error));

  /* "cuda/cuda.pyx":10919
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10920
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUtexObject_v1 *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10919
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10922
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUtexObject_v1 *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUtexObject_v1 *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10923
 *         else:
 *             self._ptr = <ccuda.CUtexObject_v1 *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10924
 *             self._ptr = <ccuda.CUtexObject_v1 *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":10923
 *         else:
 *             self._ptr = <ccuda.CUtexObject_v1 *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":10918
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUtexObject_v1.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10925
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_14CUtexObject_v1_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_14CUtexObject_v1_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_14CUtexObject_v1_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_14CUtexObject_v1_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10925, 0, __PYX_ERR(0, 10925, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUtexObject_v1.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10927
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUtexObject_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_14CUtexObject_v1_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_14CUtexObject_v1_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_14CUtexObject_v1_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_14CUtexObject_v1_4__repr__(struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10927, 0, __PYX_ERR(0, 10927, __pyx_L1_error));

  /* "cuda/cuda.pyx":10928
 *         pass
 *     def __repr__(self):
 *         return '<CUtexObject_v1 ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUtexObject_v1, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10927
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUtexObject_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUtexObject_v1.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10929
 *     def __repr__(self):
 *         return '<CUtexObject_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_14CUtexObject_v1_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_14CUtexObject_v1_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_14CUtexObject_v1_6__int__(((struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_14CUtexObject_v1_6__int__(struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 10929, 0, __PYX_ERR(0, 10929, __pyx_L1_error));

  /* "cuda/cuda.pyx":10930
 *         return '<CUtexObject_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((unsigned PY_LONG_LONG)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10929
 *     def __repr__(self):
 *         return '<CUtexObject_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUtexObject_v1.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10931
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_14CUtexObject_v1_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_14CUtexObject_v1_8getPtr[] = "CUtexObject_v1.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_14CUtexObject_v1_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_14CUtexObject_v1_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_14CUtexObject_v1_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_14CUtexObject_v1_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_14CUtexObject_v1_8getPtr(((struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_14CUtexObject_v1_8getPtr(struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__541)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10931, 0, __PYX_ERR(0, 10931, __pyx_L1_error));

  /* "cuda/cuda.pyx":10932
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUtexObject:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10931
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUtexObject_v1.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_14CUtexObject_v1_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_14CUtexObject_v1_10__reduce_cython__[] = "CUtexObject_v1.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_14CUtexObject_v1_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_14CUtexObject_v1_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_14CUtexObject_v1_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_14CUtexObject_v1_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_14CUtexObject_v1_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_14CUtexObject_v1_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__542)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__543, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUtexObject_v1.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_14CUtexObject_v1_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_14CUtexObject_v1_12__setstate_cython__[] = "CUtexObject_v1.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_14CUtexObject_v1_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_14CUtexObject_v1_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_14CUtexObject_v1_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_14CUtexObject_v1_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_14CUtexObject_v1_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_14CUtexObject_v1_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexObject_v1 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__544)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__545, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUtexObject_v1.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10945
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_11CUtexObject_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_11CUtexObject_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned PY_LONG_LONG __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10945, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10945, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((unsigned PY_LONG_LONG)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10945, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10945, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUtexObject.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUtexObject___cinit__(((struct __pyx_obj_4cuda_4cuda_CUtexObject *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_11CUtexObject___cinit__(struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10945, 0, __PYX_ERR(0, 10945, __pyx_L1_error));

  /* "cuda/cuda.pyx":10946
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10947
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUtexObject *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10946
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10949
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUtexObject *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUtexObject *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10950
 *         else:
 *             self._ptr = <ccuda.CUtexObject *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10951
 *             self._ptr = <ccuda.CUtexObject *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":10950
 *         else:
 *             self._ptr = <ccuda.CUtexObject *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":10945
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUtexObject.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10952
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_11CUtexObject_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_11CUtexObject_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_11CUtexObject_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUtexObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_11CUtexObject_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10952, 0, __PYX_ERR(0, 10952, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUtexObject.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10954
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUtexObject ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUtexObject_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUtexObject_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUtexObject_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUtexObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUtexObject_4__repr__(struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10954, 0, __PYX_ERR(0, 10954, __pyx_L1_error));

  /* "cuda/cuda.pyx":10955
 *         pass
 *     def __repr__(self):
 *         return '<CUtexObject ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUtexObject, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10954
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUtexObject ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUtexObject.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10956
 *     def __repr__(self):
 *         return '<CUtexObject ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUtexObject_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_11CUtexObject_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUtexObject_6__int__(((struct __pyx_obj_4cuda_4cuda_CUtexObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUtexObject_6__int__(struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 10956, 0, __PYX_ERR(0, 10956, __pyx_L1_error));

  /* "cuda/cuda.pyx":10957
 *         return '<CUtexObject ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((unsigned PY_LONG_LONG)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10956
 *     def __repr__(self):
 *         return '<CUtexObject ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUtexObject.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10958
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUtexObject_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUtexObject_8getPtr[] = "CUtexObject.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUtexObject_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUtexObject_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUtexObject_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_11CUtexObject_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUtexObject_8getPtr(((struct __pyx_obj_4cuda_4cuda_CUtexObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUtexObject_8getPtr(struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__546)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10958, 0, __PYX_ERR(0, 10958, __pyx_L1_error));

  /* "cuda/cuda.pyx":10959
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUsurfObject_v1:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10958
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUtexObject.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUtexObject_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUtexObject_10__reduce_cython__[] = "CUtexObject.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUtexObject_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUtexObject_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUtexObject_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11CUtexObject_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUtexObject_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUtexObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUtexObject_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__547)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__548, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUtexObject.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11CUtexObject_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_11CUtexObject_12__setstate_cython__[] = "CUtexObject.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11CUtexObject_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUtexObject_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11CUtexObject_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_11CUtexObject_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_11CUtexObject_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUtexObject *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_11CUtexObject_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__549)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__550, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUtexObject.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10972
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_15CUsurfObject_v1_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_15CUsurfObject_v1_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned PY_LONG_LONG __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10972, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10972, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((unsigned PY_LONG_LONG)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10972, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10972, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject_v1.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_15CUsurfObject_v1___cinit__(((struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_15CUsurfObject_v1___cinit__(struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10972, 0, __PYX_ERR(0, 10972, __pyx_L1_error));

  /* "cuda/cuda.pyx":10973
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10974
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUsurfObject_v1 *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":10973
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":10976
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUsurfObject_v1 *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUsurfObject_v1 *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":10977
 *         else:
 *             self._ptr = <ccuda.CUsurfObject_v1 *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":10978
 *             self._ptr = <ccuda.CUsurfObject_v1 *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":10977
 *         else:
 *             self._ptr = <ccuda.CUsurfObject_v1 *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":10972
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject_v1.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10979
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_15CUsurfObject_v1_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_15CUsurfObject_v1_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_15CUsurfObject_v1_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_15CUsurfObject_v1_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 10979, 0, __PYX_ERR(0, 10979, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUsurfObject_v1.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":10981
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUsurfObject_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_15CUsurfObject_v1_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_15CUsurfObject_v1_4__repr__(struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 10981, 0, __PYX_ERR(0, 10981, __pyx_L1_error));

  /* "cuda/cuda.pyx":10982
 *         pass
 *     def __repr__(self):
 *         return '<CUsurfObject_v1 ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUsurfObject_v1, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10981
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUsurfObject_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject_v1.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10983
 *     def __repr__(self):
 *         return '<CUsurfObject_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_15CUsurfObject_v1_6__int__(((struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_15CUsurfObject_v1_6__int__(struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 10983, 0, __PYX_ERR(0, 10983, __pyx_L1_error));

  /* "cuda/cuda.pyx":10984
 *         return '<CUsurfObject_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((unsigned PY_LONG_LONG)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10983
 *     def __repr__(self):
 *         return '<CUsurfObject_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject_v1.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10985
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_15CUsurfObject_v1_8getPtr[] = "CUsurfObject_v1.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_15CUsurfObject_v1_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_15CUsurfObject_v1_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_15CUsurfObject_v1_8getPtr(((struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_15CUsurfObject_v1_8getPtr(struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__551)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 10985, 0, __PYX_ERR(0, 10985, __pyx_L1_error));

  /* "cuda/cuda.pyx":10986
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUsurfObject:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":10985
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject_v1.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_15CUsurfObject_v1_10__reduce_cython__[] = "CUsurfObject_v1.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_15CUsurfObject_v1_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_15CUsurfObject_v1_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_15CUsurfObject_v1_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_15CUsurfObject_v1_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__552)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__553, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject_v1.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_15CUsurfObject_v1_12__setstate_cython__[] = "CUsurfObject_v1.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_15CUsurfObject_v1_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_15CUsurfObject_v1_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_15CUsurfObject_v1_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_15CUsurfObject_v1_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__554)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__555, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject_v1.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":10999
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_12CUsurfObject_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_12CUsurfObject_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned PY_LONG_LONG __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 10999, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10999, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((unsigned PY_LONG_LONG)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 10999, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 10999, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUsurfObject___cinit__(((struct __pyx_obj_4cuda_4cuda_CUsurfObject *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_12CUsurfObject___cinit__(struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 10999, 0, __PYX_ERR(0, 10999, __pyx_L1_error));

  /* "cuda/cuda.pyx":11000
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11001
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUsurfObject *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":11000
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11003
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUsurfObject *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUsurfObject *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11004
 *         else:
 *             self._ptr = <ccuda.CUsurfObject *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11005
 *             self._ptr = <ccuda.CUsurfObject *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":11004
 *         else:
 *             self._ptr = <ccuda.CUsurfObject *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":10999
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11006
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_12CUsurfObject_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_12CUsurfObject_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_12CUsurfObject_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUsurfObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_12CUsurfObject_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 11006, 0, __PYX_ERR(0, 11006, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUsurfObject.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":11008
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUsurfObject ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUsurfObject_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUsurfObject_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUsurfObject_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUsurfObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUsurfObject_4__repr__(struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 11008, 0, __PYX_ERR(0, 11008, __pyx_L1_error));

  /* "cuda/cuda.pyx":11009
 *         pass
 *     def __repr__(self):
 *         return '<CUsurfObject ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUsurfObject, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11008
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUsurfObject ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11010
 *     def __repr__(self):
 *         return '<CUsurfObject ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUsurfObject_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_12CUsurfObject_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUsurfObject_6__int__(((struct __pyx_obj_4cuda_4cuda_CUsurfObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUsurfObject_6__int__(struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 11010, 0, __PYX_ERR(0, 11010, __pyx_L1_error));

  /* "cuda/cuda.pyx":11011
 *         return '<CUsurfObject ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((unsigned PY_LONG_LONG)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11010
 *     def __repr__(self):
 *         return '<CUsurfObject ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11012
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUsurfObject_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_12CUsurfObject_8getPtr[] = "CUsurfObject.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12CUsurfObject_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUsurfObject_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUsurfObject_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_12CUsurfObject_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUsurfObject_8getPtr(((struct __pyx_obj_4cuda_4cuda_CUsurfObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUsurfObject_8getPtr(struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__556)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 11012, 0, __PYX_ERR(0, 11012, __pyx_L1_error));

  /* "cuda/cuda.pyx":11013
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUmemGenericAllocationHandle_v1:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11012
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUsurfObject_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_12CUsurfObject_10__reduce_cython__[] = "CUsurfObject.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12CUsurfObject_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUsurfObject_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUsurfObject_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_12CUsurfObject_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUsurfObject_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUsurfObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUsurfObject_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__557)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__558, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_12CUsurfObject_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_12CUsurfObject_12__setstate_cython__[] = "CUsurfObject.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_12CUsurfObject_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUsurfObject_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_12CUsurfObject_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_12CUsurfObject_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_12CUsurfObject_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUsurfObject *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12CUsurfObject_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__559)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__560, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUsurfObject.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11024
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned PY_LONG_LONG __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 11024, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 11024, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((unsigned PY_LONG_LONG)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 11024, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 11024, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle_v1.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1___cinit__(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 11024, 0, __PYX_ERR(0, 11024, __pyx_L1_error));

  /* "cuda/cuda.pyx":11025
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11026
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUmemGenericAllocationHandle_v1 *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":11025
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11028
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUmemGenericAllocationHandle_v1 *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUmemGenericAllocationHandle_v1 *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11029
 *         else:
 *             self._ptr = <ccuda.CUmemGenericAllocationHandle_v1 *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11030
 *             self._ptr = <ccuda.CUmemGenericAllocationHandle_v1 *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":11029
 *         else:
 *             self._ptr = <ccuda.CUmemGenericAllocationHandle_v1 *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":11024
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle_v1.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11031
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 11031, 0, __PYX_ERR(0, 11031, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUmemGenericAllocationHandle_v1.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":11033
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUmemGenericAllocationHandle_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_4__repr__(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 11033, 0, __PYX_ERR(0, 11033, __pyx_L1_error));

  /* "cuda/cuda.pyx":11034
 *         pass
 *     def __repr__(self):
 *         return '<CUmemGenericAllocationHandle_v1 ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUmemGenericAllocationHandle_v1, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11033
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUmemGenericAllocationHandle_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle_v1.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11035
 *     def __repr__(self):
 *         return '<CUmemGenericAllocationHandle_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_6__int__(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_6__int__(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 11035, 0, __PYX_ERR(0, 11035, __pyx_L1_error));

  /* "cuda/cuda.pyx":11036
 *         return '<CUmemGenericAllocationHandle_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((unsigned PY_LONG_LONG)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11035
 *     def __repr__(self):
 *         return '<CUmemGenericAllocationHandle_v1 ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle_v1.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11037
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_8getPtr[] = "CUmemGenericAllocationHandle_v1.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_8getPtr(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_8getPtr(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__561)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 11037, 0, __PYX_ERR(0, 11037, __pyx_L1_error));

  /* "cuda/cuda.pyx":11038
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class CUmemGenericAllocationHandle:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11037
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle_v1.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_10__reduce_cython__[] = "CUmemGenericAllocationHandle_v1.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__562)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__563, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle_v1.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_12__setstate_cython__[] = "CUmemGenericAllocationHandle_v1.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__564)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__565, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle_v1.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11049
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned PY_LONG_LONG __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 11049, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 11049, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((unsigned PY_LONG_LONG)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 11049, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 11049, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle___cinit__(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle___cinit__(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 11049, 0, __PYX_ERR(0, 11049, __pyx_L1_error));

  /* "cuda/cuda.pyx":11050
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11051
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.CUmemGenericAllocationHandle *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":11050
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11053
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.CUmemGenericAllocationHandle *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((CUmemGenericAllocationHandle *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11054
 *         else:
 *             self._ptr = <ccuda.CUmemGenericAllocationHandle *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11055
 *             self._ptr = <ccuda.CUmemGenericAllocationHandle *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":11054
 *         else:
 *             self._ptr = <ccuda.CUmemGenericAllocationHandle *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":11049
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11056
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 11056, 0, __PYX_ERR(0, 11056, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.CUmemGenericAllocationHandle.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":11058
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUmemGenericAllocationHandle ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_4__repr__(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_4__repr__(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 11058, 0, __PYX_ERR(0, 11058, __pyx_L1_error));

  /* "cuda/cuda.pyx":11059
 *         pass
 *     def __repr__(self):
 *         return '<CUmemGenericAllocationHandle ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_CUmemGenericAllocationHandle, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11058
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<CUmemGenericAllocationHandle ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11060
 *     def __repr__(self):
 *         return '<CUmemGenericAllocationHandle ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_6__int__(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_6__int__(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 11060, 0, __PYX_ERR(0, 11060, __pyx_L1_error));

  /* "cuda/cuda.pyx":11061
 *         return '<CUmemGenericAllocationHandle ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((unsigned PY_LONG_LONG)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11060
 *     def __repr__(self):
 *         return '<CUmemGenericAllocationHandle ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11062
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_28CUmemGenericAllocationHandle_8getPtr[] = "CUmemGenericAllocationHandle.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_28CUmemGenericAllocationHandle_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_28CUmemGenericAllocationHandle_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_8getPtr(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_8getPtr(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__566)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 11062, 0, __PYX_ERR(0, 11062, __pyx_L1_error));

  /* "cuda/cuda.pyx":11063
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class GLenum:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11062
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_28CUmemGenericAllocationHandle_10__reduce_cython__[] = "CUmemGenericAllocationHandle.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_28CUmemGenericAllocationHandle_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_28CUmemGenericAllocationHandle_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__567)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__568, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_28CUmemGenericAllocationHandle_12__setstate_cython__[] = "CUmemGenericAllocationHandle.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_28CUmemGenericAllocationHandle_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_28CUmemGenericAllocationHandle_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28CUmemGenericAllocationHandle_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__569)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__570, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.CUmemGenericAllocationHandle.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11074
 * 
 *     """
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_6GLenum_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_6GLenum_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 11074, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_init_value == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 11074, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((unsigned int)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 11074, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 11074, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.GLenum.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_6GLenum___cinit__(((struct __pyx_obj_4cuda_4cuda_GLenum *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_6GLenum___cinit__(struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self, unsigned int __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 11074, 0, __PYX_ERR(0, 11074, __pyx_L1_error));

  /* "cuda/cuda.pyx":11075
 *     """
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11076
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.GLenum *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":11075
 *     """
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11078
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.GLenum *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((__pyx_t_4cuda_5ccuda_GLenum *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11079
 *         else:
 *             self._ptr = <ccuda.GLenum *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11080
 *             self._ptr = <ccuda.GLenum *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":11079
 *         else:
 *             self._ptr = <ccuda.GLenum *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":11074
 * 
 *     """
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.GLenum.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11081
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_6GLenum_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_6GLenum_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_6GLenum_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_GLenum *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_6GLenum_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 11081, 0, __PYX_ERR(0, 11081, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.GLenum.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":11083
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<GLenum ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6GLenum_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_6GLenum_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6GLenum_4__repr__(((struct __pyx_obj_4cuda_4cuda_GLenum *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6GLenum_4__repr__(struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 11083, 0, __PYX_ERR(0, 11083, __pyx_L1_error));

  /* "cuda/cuda.pyx":11084
 *         pass
 *     def __repr__(self):
 *         return '<GLenum ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_GLenum, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11083
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<GLenum ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.GLenum.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11085
 *     def __repr__(self):
 *         return '<GLenum ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6GLenum_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_6GLenum_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6GLenum_6__int__(((struct __pyx_obj_4cuda_4cuda_GLenum *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6GLenum_6__int__(struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 11085, 0, __PYX_ERR(0, 11085, __pyx_L1_error));

  /* "cuda/cuda.pyx":11086
 *         return '<GLenum ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(((unsigned int)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11085
 *     def __repr__(self):
 *         return '<GLenum ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.GLenum.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11087
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6GLenum_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_6GLenum_8getPtr[] = "GLenum.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_6GLenum_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_6GLenum_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_6GLenum_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_6GLenum_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6GLenum_8getPtr(((struct __pyx_obj_4cuda_4cuda_GLenum *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6GLenum_8getPtr(struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__571)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 11087, 0, __PYX_ERR(0, 11087, __pyx_L1_error));

  /* "cuda/cuda.pyx":11088
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class GLuint:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11087
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.GLenum.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6GLenum_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_6GLenum_10__reduce_cython__[] = "GLenum.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_6GLenum_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_6GLenum_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_6GLenum_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_6GLenum_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6GLenum_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_GLenum *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6GLenum_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__572)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__573, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.GLenum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6GLenum_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_6GLenum_12__setstate_cython__[] = "GLenum.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_6GLenum_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_6GLenum_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_6GLenum_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_6GLenum_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6GLenum_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_GLenum *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6GLenum_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_GLenum *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__574)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__575, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.GLenum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11099
 * 
 *     """
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_6GLuint_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_6GLuint_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 11099, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_init_value == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 11099, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((unsigned int)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 11099, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 11099, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.GLuint.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_6GLuint___cinit__(((struct __pyx_obj_4cuda_4cuda_GLuint *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_6GLuint___cinit__(struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self, unsigned int __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 11099, 0, __PYX_ERR(0, 11099, __pyx_L1_error));

  /* "cuda/cuda.pyx":11100
 *     """
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11101
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.GLuint *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":11100
 *     """
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11103
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.GLuint *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((__pyx_t_4cuda_5ccuda_GLuint *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11104
 *         else:
 *             self._ptr = <ccuda.GLuint *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11105
 *             self._ptr = <ccuda.GLuint *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":11104
 *         else:
 *             self._ptr = <ccuda.GLuint *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":11099
 * 
 *     """
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.GLuint.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11106
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_6GLuint_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_6GLuint_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_6GLuint_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_GLuint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_6GLuint_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 11106, 0, __PYX_ERR(0, 11106, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.GLuint.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":11108
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<GLuint ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6GLuint_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_6GLuint_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6GLuint_4__repr__(((struct __pyx_obj_4cuda_4cuda_GLuint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6GLuint_4__repr__(struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 11108, 0, __PYX_ERR(0, 11108, __pyx_L1_error));

  /* "cuda/cuda.pyx":11109
 *         pass
 *     def __repr__(self):
 *         return '<GLuint ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_GLuint, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11108
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<GLuint ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.GLuint.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11110
 *     def __repr__(self):
 *         return '<GLuint ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6GLuint_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_6GLuint_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6GLuint_6__int__(((struct __pyx_obj_4cuda_4cuda_GLuint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6GLuint_6__int__(struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 11110, 0, __PYX_ERR(0, 11110, __pyx_L1_error));

  /* "cuda/cuda.pyx":11111
 *         return '<GLuint ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(((unsigned int)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11110
 *     def __repr__(self):
 *         return '<GLuint ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.GLuint.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11112
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6GLuint_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_6GLuint_8getPtr[] = "GLuint.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_6GLuint_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_6GLuint_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_6GLuint_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_6GLuint_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6GLuint_8getPtr(((struct __pyx_obj_4cuda_4cuda_GLuint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6GLuint_8getPtr(struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__576)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 11112, 0, __PYX_ERR(0, 11112, __pyx_L1_error));

  /* "cuda/cuda.pyx":11113
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class EGLint:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11112
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.GLuint.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6GLuint_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_6GLuint_10__reduce_cython__[] = "GLuint.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_6GLuint_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_6GLuint_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_6GLuint_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_6GLuint_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6GLuint_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_GLuint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6GLuint_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__577)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__578, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.GLuint.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6GLuint_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_6GLuint_12__setstate_cython__[] = "GLuint.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_6GLuint_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_6GLuint_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_6GLuint_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_6GLuint_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6GLuint_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_GLuint *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6GLuint_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_GLuint *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__579)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__580, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.GLuint.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11124
 * 
 *     """
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_6EGLint_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_6EGLint_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 11124, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_init_value == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 11124, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((unsigned int)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 11124, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 11124, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.EGLint.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_6EGLint___cinit__(((struct __pyx_obj_4cuda_4cuda_EGLint *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_6EGLint___cinit__(struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self, unsigned int __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 11124, 0, __PYX_ERR(0, 11124, __pyx_L1_error));

  /* "cuda/cuda.pyx":11125
 *     """
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11126
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.EGLint *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":11125
 *     """
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11128
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.EGLint *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((__pyx_t_4cuda_5ccuda_EGLint *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11129
 *         else:
 *             self._ptr = <ccuda.EGLint *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11130
 *             self._ptr = <ccuda.EGLint *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":11129
 *         else:
 *             self._ptr = <ccuda.EGLint *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":11124
 * 
 *     """
 *     def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.EGLint.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11131
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_6EGLint_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_6EGLint_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_6EGLint_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_EGLint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_6EGLint_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 11131, 0, __PYX_ERR(0, 11131, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.EGLint.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":11133
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<EGLint ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6EGLint_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_6EGLint_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6EGLint_4__repr__(((struct __pyx_obj_4cuda_4cuda_EGLint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6EGLint_4__repr__(struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 11133, 0, __PYX_ERR(0, 11133, __pyx_L1_error));

  /* "cuda/cuda.pyx":11134
 *         pass
 *     def __repr__(self):
 *         return '<EGLint ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_EGLint, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11133
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<EGLint ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.EGLint.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11135
 *     def __repr__(self):
 *         return '<EGLint ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6EGLint_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_6EGLint_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6EGLint_6__int__(((struct __pyx_obj_4cuda_4cuda_EGLint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6EGLint_6__int__(struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 11135, 0, __PYX_ERR(0, 11135, __pyx_L1_error));

  /* "cuda/cuda.pyx":11136
 *         return '<EGLint ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(((unsigned int)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11135
 *     def __repr__(self):
 *         return '<EGLint ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLint.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11137
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6EGLint_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_6EGLint_8getPtr[] = "EGLint.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_6EGLint_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_6EGLint_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_6EGLint_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_6EGLint_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6EGLint_8getPtr(((struct __pyx_obj_4cuda_4cuda_EGLint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6EGLint_8getPtr(struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__581)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 11137, 0, __PYX_ERR(0, 11137, __pyx_L1_error));

  /* "cuda/cuda.pyx":11138
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class VdpDevice:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11137
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLint.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6EGLint_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_6EGLint_10__reduce_cython__[] = "EGLint.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_6EGLint_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_6EGLint_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_6EGLint_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_6EGLint_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6EGLint_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_EGLint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6EGLint_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__582)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__583, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLint.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_6EGLint_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_6EGLint_12__setstate_cython__[] = "EGLint.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_6EGLint_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_6EGLint_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_6EGLint_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_6EGLint_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6EGLint_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_EGLint *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6EGLint_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_EGLint *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__584)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__585, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.EGLint.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11149
 * 
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_9VdpDevice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_9VdpDevice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  uint32_t __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 11149, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_init_value == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11149, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((uint32_t)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 11149, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 11149, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.VdpDevice.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_9VdpDevice___cinit__(((struct __pyx_obj_4cuda_4cuda_VdpDevice *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_9VdpDevice___cinit__(struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self, uint32_t __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 11149, 0, __PYX_ERR(0, 11149, __pyx_L1_error));

  /* "cuda/cuda.pyx":11150
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11151
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.VdpDevice *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":11150
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11153
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.VdpDevice *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((__pyx_t_4cuda_5ccuda_VdpDevice *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11154
 *         else:
 *             self._ptr = <ccuda.VdpDevice *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11155
 *             self._ptr = <ccuda.VdpDevice *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":11154
 *         else:
 *             self._ptr = <ccuda.VdpDevice *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":11149
 * 
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.VdpDevice.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11156
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_9VdpDevice_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_9VdpDevice_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_9VdpDevice_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_VdpDevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_9VdpDevice_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 11156, 0, __PYX_ERR(0, 11156, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.VdpDevice.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":11158
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<VdpDevice ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9VdpDevice_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_9VdpDevice_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9VdpDevice_4__repr__(((struct __pyx_obj_4cuda_4cuda_VdpDevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9VdpDevice_4__repr__(struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 11158, 0, __PYX_ERR(0, 11158, __pyx_L1_error));

  /* "cuda/cuda.pyx":11159
 *         pass
 *     def __repr__(self):
 *         return '<VdpDevice ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_VdpDevice, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11158
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<VdpDevice ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.VdpDevice.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11160
 *     def __repr__(self):
 *         return '<VdpDevice ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9VdpDevice_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_9VdpDevice_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9VdpDevice_6__int__(((struct __pyx_obj_4cuda_4cuda_VdpDevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9VdpDevice_6__int__(struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 11160, 0, __PYX_ERR(0, 11160, __pyx_L1_error));

  /* "cuda/cuda.pyx":11161
 *         return '<VdpDevice ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(((uint32_t)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11160
 *     def __repr__(self):
 *         return '<VdpDevice ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpDevice.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11162
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9VdpDevice_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_9VdpDevice_8getPtr[] = "VdpDevice.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9VdpDevice_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_9VdpDevice_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_9VdpDevice_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_9VdpDevice_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9VdpDevice_8getPtr(((struct __pyx_obj_4cuda_4cuda_VdpDevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9VdpDevice_8getPtr(struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__586)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 11162, 0, __PYX_ERR(0, 11162, __pyx_L1_error));

  /* "cuda/cuda.pyx":11163
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class VdpGetProcAddress:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11162
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpDevice.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9VdpDevice_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_9VdpDevice_10__reduce_cython__[] = "VdpDevice.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9VdpDevice_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9VdpDevice_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_9VdpDevice_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_9VdpDevice_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9VdpDevice_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_VdpDevice *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9VdpDevice_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__587)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__588, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpDevice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9VdpDevice_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_9VdpDevice_12__setstate_cython__[] = "VdpDevice.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9VdpDevice_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9VdpDevice_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_9VdpDevice_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_9VdpDevice_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_9VdpDevice_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_VdpDevice *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_9VdpDevice_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpDevice *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__589)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__590, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpDevice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11174
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_17VdpGetProcAddress_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_17VdpGetProcAddress_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned PY_LONG_LONG __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 11174, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 11174, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((unsigned PY_LONG_LONG)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 11174, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 11174, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.VdpGetProcAddress.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_17VdpGetProcAddress___cinit__(((struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_17VdpGetProcAddress___cinit__(struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self, unsigned PY_LONG_LONG __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 11174, 0, __PYX_ERR(0, 11174, __pyx_L1_error));

  /* "cuda/cuda.pyx":11175
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11176
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.VdpGetProcAddress *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":11175
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11178
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.VdpGetProcAddress *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((__pyx_t_4cuda_5ccuda_VdpGetProcAddress *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11179
 *         else:
 *             self._ptr = <ccuda.VdpGetProcAddress *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11180
 *             self._ptr = <ccuda.VdpGetProcAddress *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":11179
 *         else:
 *             self._ptr = <ccuda.VdpGetProcAddress *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":11174
 * 
 *     """
 *     def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.VdpGetProcAddress.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11181
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_17VdpGetProcAddress_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_17VdpGetProcAddress_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_17VdpGetProcAddress_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_17VdpGetProcAddress_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 11181, 0, __PYX_ERR(0, 11181, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.VdpGetProcAddress.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":11183
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<VdpGetProcAddress ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17VdpGetProcAddress_4__repr__(((struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17VdpGetProcAddress_4__repr__(struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 11183, 0, __PYX_ERR(0, 11183, __pyx_L1_error));

  /* "cuda/cuda.pyx":11184
 *         pass
 *     def __repr__(self):
 *         return '<VdpGetProcAddress ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_VdpGetProcAddress, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11183
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<VdpGetProcAddress ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.VdpGetProcAddress.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11185
 *     def __repr__(self):
 *         return '<VdpGetProcAddress ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17VdpGetProcAddress_6__int__(((struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17VdpGetProcAddress_6__int__(struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 11185, 0, __PYX_ERR(0, 11185, __pyx_L1_error));

  /* "cuda/cuda.pyx":11186
 *         return '<VdpGetProcAddress ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((unsigned PY_LONG_LONG)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11185
 *     def __repr__(self):
 *         return '<VdpGetProcAddress ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpGetProcAddress.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11187
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_17VdpGetProcAddress_8getPtr[] = "VdpGetProcAddress.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17VdpGetProcAddress_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_17VdpGetProcAddress_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17VdpGetProcAddress_8getPtr(((struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17VdpGetProcAddress_8getPtr(struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__591)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 11187, 0, __PYX_ERR(0, 11187, __pyx_L1_error));

  /* "cuda/cuda.pyx":11188
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class VdpVideoSurface:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11187
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpGetProcAddress.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_17VdpGetProcAddress_10__reduce_cython__[] = "VdpGetProcAddress.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17VdpGetProcAddress_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_17VdpGetProcAddress_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17VdpGetProcAddress_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17VdpGetProcAddress_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__592)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__593, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpGetProcAddress.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_17VdpGetProcAddress_12__setstate_cython__[] = "VdpGetProcAddress.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17VdpGetProcAddress_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_17VdpGetProcAddress_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_17VdpGetProcAddress_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_17VdpGetProcAddress_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__594)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__595, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpGetProcAddress.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11199
 * 
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_15VdpVideoSurface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_15VdpVideoSurface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  uint32_t __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 11199, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_init_value == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11199, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((uint32_t)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 11199, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 11199, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.VdpVideoSurface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_15VdpVideoSurface___cinit__(((struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_15VdpVideoSurface___cinit__(struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self, uint32_t __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 11199, 0, __PYX_ERR(0, 11199, __pyx_L1_error));

  /* "cuda/cuda.pyx":11200
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11201
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.VdpVideoSurface *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":11200
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11203
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.VdpVideoSurface *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((__pyx_t_4cuda_5ccuda_VdpVideoSurface *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11204
 *         else:
 *             self._ptr = <ccuda.VdpVideoSurface *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11205
 *             self._ptr = <ccuda.VdpVideoSurface *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":11204
 *         else:
 *             self._ptr = <ccuda.VdpVideoSurface *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":11199
 * 
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.VdpVideoSurface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11206
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_15VdpVideoSurface_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_15VdpVideoSurface_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_15VdpVideoSurface_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_15VdpVideoSurface_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 11206, 0, __PYX_ERR(0, 11206, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.VdpVideoSurface.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":11208
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<VdpVideoSurface ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_15VdpVideoSurface_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_15VdpVideoSurface_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_15VdpVideoSurface_4__repr__(((struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_15VdpVideoSurface_4__repr__(struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 11208, 0, __PYX_ERR(0, 11208, __pyx_L1_error));

  /* "cuda/cuda.pyx":11209
 *         pass
 *     def __repr__(self):
 *         return '<VdpVideoSurface ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_VdpVideoSurface, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11208
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<VdpVideoSurface ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.VdpVideoSurface.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11210
 *     def __repr__(self):
 *         return '<VdpVideoSurface ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_15VdpVideoSurface_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_15VdpVideoSurface_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_15VdpVideoSurface_6__int__(((struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_15VdpVideoSurface_6__int__(struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 11210, 0, __PYX_ERR(0, 11210, __pyx_L1_error));

  /* "cuda/cuda.pyx":11211
 *         return '<VdpVideoSurface ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(((uint32_t)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11210
 *     def __repr__(self):
 *         return '<VdpVideoSurface ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpVideoSurface.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11212
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_15VdpVideoSurface_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_15VdpVideoSurface_8getPtr[] = "VdpVideoSurface.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_15VdpVideoSurface_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_15VdpVideoSurface_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_15VdpVideoSurface_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_15VdpVideoSurface_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_15VdpVideoSurface_8getPtr(((struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_15VdpVideoSurface_8getPtr(struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__596)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 11212, 0, __PYX_ERR(0, 11212, __pyx_L1_error));

  /* "cuda/cuda.pyx":11213
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * cdef class VdpOutputSurface:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11212
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpVideoSurface.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_15VdpVideoSurface_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_15VdpVideoSurface_10__reduce_cython__[] = "VdpVideoSurface.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_15VdpVideoSurface_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_15VdpVideoSurface_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_15VdpVideoSurface_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_15VdpVideoSurface_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_15VdpVideoSurface_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_15VdpVideoSurface_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__597)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__598, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpVideoSurface.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_15VdpVideoSurface_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_15VdpVideoSurface_12__setstate_cython__[] = "VdpVideoSurface.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_15VdpVideoSurface_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_15VdpVideoSurface_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_15VdpVideoSurface_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_15VdpVideoSurface_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_15VdpVideoSurface_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_15VdpVideoSurface_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpVideoSurface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__599)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__600, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpVideoSurface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11224
 * 
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

/* Python wrapper */
static int __pyx_pw_4cuda_4cuda_16VdpOutputSurface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4cuda_4cuda_16VdpOutputSurface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  uint32_t __pyx_v_init_value;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_value,&__pyx_n_s_ptr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init_value);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 11224, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_init_value = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_init_value == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11224, __pyx_L3_error)
    } else {
      __pyx_v_init_value = ((uint32_t)0);
    }
    if (values[1]) {
      __pyx_v__ptr = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 11224, __pyx_L3_error)
    } else {
      __pyx_v__ptr = ((__pyx_t_4cuda_4cuda_void_ptr)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 11224, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.VdpOutputSurface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_16VdpOutputSurface___cinit__(((struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4cuda_4cuda_16VdpOutputSurface___cinit__(struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self, uint32_t __pyx_v_init_value, __pyx_t_4cuda_4cuda_void_ptr __pyx_v__ptr) {
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_TraceCall("__cinit__", __pyx_f[0], 11224, 0, __PYX_ERR(0, 11224, __pyx_L1_error));

  /* "cuda/cuda.pyx":11225
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
  __pyx_t_1 = ((__pyx_v__ptr == 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11226
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:
 *             self._ptr = &self.__val             # <<<<<<<<<<<<<<
 *         else:
 *             self._ptr = <ccuda.VdpOutputSurface *>_ptr
 */
    __pyx_v_self->_ptr = (&__pyx_v_self->__pyx___val);

    /* "cuda/cuda.pyx":11225
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):
 *         if _ptr == 0:             # <<<<<<<<<<<<<<
 *             self._ptr = &self.__val
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11228
 *             self._ptr = &self.__val
 *         else:
 *             self._ptr = <ccuda.VdpOutputSurface *>_ptr             # <<<<<<<<<<<<<<
 *         if init_value:
 *             self._ptr[0] = init_value
 */
  /*else*/ {
    __pyx_v_self->_ptr = ((__pyx_t_4cuda_5ccuda_VdpOutputSurface *)__pyx_v__ptr);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11229
 *         else:
 *             self._ptr = <ccuda.VdpOutputSurface *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  __pyx_t_1 = (__pyx_v_init_value != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11230
 *             self._ptr = <ccuda.VdpOutputSurface *>_ptr
 *         if init_value:
 *             self._ptr[0] = init_value             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         pass
 */
    (__pyx_v_self->_ptr[0]) = __pyx_v_init_value;

    /* "cuda/cuda.pyx":11229
 *         else:
 *             self._ptr = <ccuda.VdpOutputSurface *>_ptr
 *         if init_value:             # <<<<<<<<<<<<<<
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):
 */
  }

  /* "cuda/cuda.pyx":11224
 * 
 *     """
 *     def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0):             # <<<<<<<<<<<<<<
 *         if _ptr == 0:
 *             self._ptr = &self.__val
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.VdpOutputSurface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11231
 *         if init_value:
 *             self._ptr[0] = init_value
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         pass
 *     def __repr__(self):
 */

/* Python wrapper */
static void __pyx_pw_4cuda_4cuda_16VdpOutputSurface_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4cuda_4cuda_16VdpOutputSurface_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_4cuda_4cuda_16VdpOutputSurface_2__dealloc__(((struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4cuda_4cuda_16VdpOutputSurface_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self) {
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);
  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 11231, 0, __PYX_ERR(0, 11231, __pyx_L1_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("cuda.cuda.VdpOutputSurface.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
}

/* "cuda/cuda.pyx":11233
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<VdpOutputSurface ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16VdpOutputSurface_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16VdpOutputSurface_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16VdpOutputSurface_4__repr__(((struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16VdpOutputSurface_4__repr__(struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);
  __Pyx_TraceCall("__repr__", __pyx_f[0], 11233, 0, __PYX_ERR(0, 11233, __pyx_L1_error));

  /* "cuda/cuda.pyx":11234
 *         pass
 *     def __repr__(self):
 *         return '<VdpOutputSurface ' + str(self.__int__()) + '>'             # <<<<<<<<<<<<<<
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_VdpOutputSurface, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11233
 *     def __dealloc__(self):
 *         pass
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<VdpOutputSurface ' + str(self.__int__()) + '>'
 *     def __int__(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.VdpOutputSurface.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11235
 *     def __repr__(self):
 *         return '<VdpOutputSurface ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16VdpOutputSurface_7__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_4cuda_4cuda_16VdpOutputSurface_7__int__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16VdpOutputSurface_6__int__(((struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16VdpOutputSurface_6__int__(struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);
  __Pyx_TraceCall("__int__", __pyx_f[0], 11235, 0, __PYX_ERR(0, 11235, __pyx_L1_error));

  /* "cuda/cuda.pyx":11236
 *         return '<VdpOutputSurface ' + str(self.__int__()) + '>'
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]             # <<<<<<<<<<<<<<
 *     def getPtr(self):
 *         return <void_ptr>self._ptr
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(((uint32_t)(__pyx_v_self->_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11235
 *     def __repr__(self):
 *         return '<VdpOutputSurface ' + str(self.__int__()) + '>'
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpOutputSurface.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11237
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16VdpOutputSurface_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16VdpOutputSurface_8getPtr[] = "VdpOutputSurface.getPtr(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16VdpOutputSurface_9getPtr = {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16VdpOutputSurface_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16VdpOutputSurface_8getPtr};
static PyObject *__pyx_pw_4cuda_4cuda_16VdpOutputSurface_9getPtr(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPtr (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16VdpOutputSurface_8getPtr(((struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16VdpOutputSurface_8getPtr(struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__601)
  __Pyx_RefNannySetupContext("getPtr", 0);
  __Pyx_TraceCall("getPtr", __pyx_f[0], 11237, 0, __PYX_ERR(0, 11237, __pyx_L1_error));

  /* "cuda/cuda.pyx":11238
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):
 *         return <void_ptr>self._ptr             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11237
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpOutputSurface.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16VdpOutputSurface_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_16VdpOutputSurface_10__reduce_cython__[] = "VdpOutputSurface.__reduce_cython__(self)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16VdpOutputSurface_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16VdpOutputSurface_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16VdpOutputSurface_10__reduce_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16VdpOutputSurface_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16VdpOutputSurface_10__reduce_cython__(((struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16VdpOutputSurface_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__602)
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__603, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpOutputSurface.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_16VdpOutputSurface_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_16VdpOutputSurface_12__setstate_cython__[] = "VdpOutputSurface.__setstate_cython__(self, __pyx_state)";
static PyMethodDef __pyx_mdef_4cuda_4cuda_16VdpOutputSurface_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16VdpOutputSurface_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16VdpOutputSurface_12__setstate_cython__};
static PyObject *__pyx_pw_4cuda_4cuda_16VdpOutputSurface_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16VdpOutputSurface_12__setstate_cython__(((struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16VdpOutputSurface_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_4cuda_VdpOutputSurface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__604)
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__605, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cuda.cuda.VdpOutputSurface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11241
 * 
 * @cython.embedsignature(True)
 * def cuGetErrorString(error not None : CUresult):             # <<<<<<<<<<<<<<
 *     """ Gets the string description of an error code.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_1cuGetErrorString(PyObject *__pyx_self, PyObject *__pyx_v_error); /*proto*/
static char __pyx_doc_4cuda_4cuda_cuGetErrorString[] = "cuGetErrorString(error: CUresult)\n Gets the string description of an error code.\n\n    Sets `*pStr` to the address of a NULL-terminated string description of\n    the error code `error`. If the error code is not recognized,\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned and `*pStr` will\n    be set to the NULL address.\n\n    Parameters\n    ----------\n    error : :py:obj:`~.CUresult`\n        Error code to convert to string\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pStr : bytes\n        Address of the string pointer.\n\n    See Also\n    --------\n    :py:obj:`~.CUresult`, :py:obj:`~.cudaGetErrorString`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_1cuGetErrorString = {"cuGetErrorString", (PyCFunction)__pyx_pw_4cuda_4cuda_1cuGetErrorString, METH_O, __pyx_doc_4cuda_4cuda_cuGetErrorString};
static PyObject *__pyx_pw_4cuda_4cuda_1cuGetErrorString(PyObject *__pyx_self, PyObject *__pyx_v_error) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGetErrorString (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_error) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "error"); __PYX_ERR(0, 11241, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_cuGetErrorString(__pyx_self, ((PyObject *)__pyx_v_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_cuGetErrorString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_error) {
  CUresult __pyx_v_cerror;
  char const *__pyx_v_pStr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__606)
  __Pyx_RefNannySetupContext("cuGetErrorString", 0);
  __Pyx_TraceCall("cuGetErrorString", __pyx_f[0], 11241, 0, __PYX_ERR(0, 11241, __pyx_L1_error));

  /* "cuda/cuda.pyx":11265
 *     :py:obj:`~.CUresult`, :py:obj:`~.cudaGetErrorString`
 *     """
 *     cdef ccuda.CUresult cerror = error.value             # <<<<<<<<<<<<<<
 *     cdef const char* pStr = NULL
 *     err = ccuda.cuGetErrorString(cerror, &pStr)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum cudaError_enum)__Pyx_PyInt_As_enum__cudaError_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cerror = __pyx_t_2;

  /* "cuda/cuda.pyx":11266
 *     """
 *     cdef ccuda.CUresult cerror = error.value
 *     cdef const char* pStr = NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGetErrorString(cerror, &pStr)
 *     return (CUresult(err), <bytes>pStr)
 */
  __pyx_v_pStr = NULL;

  /* "cuda/cuda.pyx":11267
 *     cdef ccuda.CUresult cerror = error.value
 *     cdef const char* pStr = NULL
 *     err = ccuda.cuGetErrorString(cerror, &pStr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), <bytes>pStr)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuGetErrorString(__pyx_v_cerror, (&__pyx_v_pStr)); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 11267, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":11268
 *     cdef const char* pStr = NULL
 *     err = ccuda.cuGetErrorString(cerror, &pStr)
 *     return (CUresult(err), <bytes>pStr)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_pStr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject*)__pyx_t_3));
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11241
 * 
 * @cython.embedsignature(True)
 * def cuGetErrorString(error not None : CUresult):             # <<<<<<<<<<<<<<
 *     """ Gets the string description of an error code.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11271
 * 
 * @cython.embedsignature(True)
 * def cuGetErrorName(error not None : CUresult):             # <<<<<<<<<<<<<<
 *     """ Gets the string representation of an error code enum name.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_3cuGetErrorName(PyObject *__pyx_self, PyObject *__pyx_v_error); /*proto*/
static char __pyx_doc_4cuda_4cuda_2cuGetErrorName[] = "cuGetErrorName(error: CUresult)\n Gets the string representation of an error code enum name.\n\n    Sets `*pStr` to the address of a NULL-terminated string representation\n    of the name of the enum error code `error`. If the error code is not\n    recognized, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned and\n    `*pStr` will be set to the NULL address.\n\n    Parameters\n    ----------\n    error : :py:obj:`~.CUresult`\n        Error code to convert to string\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pStr : bytes\n        Address of the string pointer.\n\n    See Also\n    --------\n    :py:obj:`~.CUresult`, :py:obj:`~.cudaGetErrorName`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_3cuGetErrorName = {"cuGetErrorName", (PyCFunction)__pyx_pw_4cuda_4cuda_3cuGetErrorName, METH_O, __pyx_doc_4cuda_4cuda_2cuGetErrorName};
static PyObject *__pyx_pw_4cuda_4cuda_3cuGetErrorName(PyObject *__pyx_self, PyObject *__pyx_v_error) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGetErrorName (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_error) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "error"); __PYX_ERR(0, 11271, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_2cuGetErrorName(__pyx_self, ((PyObject *)__pyx_v_error));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_2cuGetErrorName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_error) {
  CUresult __pyx_v_cerror;
  char const *__pyx_v_pStr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__607)
  __Pyx_RefNannySetupContext("cuGetErrorName", 0);
  __Pyx_TraceCall("cuGetErrorName", __pyx_f[0], 11271, 0, __PYX_ERR(0, 11271, __pyx_L1_error));

  /* "cuda/cuda.pyx":11295
 *     :py:obj:`~.CUresult`, :py:obj:`~.cudaGetErrorName`
 *     """
 *     cdef ccuda.CUresult cerror = error.value             # <<<<<<<<<<<<<<
 *     cdef const char* pStr = NULL
 *     err = ccuda.cuGetErrorName(cerror, &pStr)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum cudaError_enum)__Pyx_PyInt_As_enum__cudaError_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cerror = __pyx_t_2;

  /* "cuda/cuda.pyx":11296
 *     """
 *     cdef ccuda.CUresult cerror = error.value
 *     cdef const char* pStr = NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGetErrorName(cerror, &pStr)
 *     return (CUresult(err), <bytes>pStr)
 */
  __pyx_v_pStr = NULL;

  /* "cuda/cuda.pyx":11297
 *     cdef ccuda.CUresult cerror = error.value
 *     cdef const char* pStr = NULL
 *     err = ccuda.cuGetErrorName(cerror, &pStr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), <bytes>pStr)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuGetErrorName(__pyx_v_cerror, (&__pyx_v_pStr)); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 11297, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":11298
 *     cdef const char* pStr = NULL
 *     err = ccuda.cuGetErrorName(cerror, &pStr)
 *     return (CUresult(err), <bytes>pStr)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_pStr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject*)__pyx_t_3));
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11271
 * 
 * @cython.embedsignature(True)
 * def cuGetErrorName(error not None : CUresult):             # <<<<<<<<<<<<<<
 *     """ Gets the string representation of an error code enum name.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuGetErrorName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11301
 * 
 * @cython.embedsignature(True)
 * def cuInit(unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Initialize the CUDA driver API.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_5cuInit(PyObject *__pyx_self, PyObject *__pyx_arg_Flags); /*proto*/
static char __pyx_doc_4cuda_4cuda_4cuInit[] = "cuInit(unsigned int Flags)\n Initialize the CUDA driver API.\n\n    Initializes the driver API and must be called before any other function\n    from the driver API. Currently, the `Flags` parameter must be 0. If\n    :py:obj:`~.cuInit()` has not been called, any function from the driver\n    API will return :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`.\n\n    Parameters\n    ----------\n    Flags : unsigned int\n        Initialization flag for CUDA.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_SYSTEM_DRIVER_MISMATCH`, :py:obj:`~.CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_5cuInit = {"cuInit", (PyCFunction)__pyx_pw_4cuda_4cuda_5cuInit, METH_O, __pyx_doc_4cuda_4cuda_4cuInit};
static PyObject *__pyx_pw_4cuda_4cuda_5cuInit(PyObject *__pyx_self, PyObject *__pyx_arg_Flags) {
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuInit (wrapper)", 0);
  assert(__pyx_arg_Flags); {
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_Flags); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 11301, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuInit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_4cuInit(__pyx_self, ((unsigned int)__pyx_v_Flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_4cuInit(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__608)
  __Pyx_RefNannySetupContext("cuInit", 0);
  __Pyx_TraceCall("cuInit", __pyx_f[0], 11301, 0, __PYX_ERR(0, 11301, __pyx_L1_error));

  /* "cuda/cuda.pyx":11319
 *         :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_SYSTEM_DRIVER_MISMATCH`, :py:obj:`~.CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE`
 *     """
 *     err = ccuda.cuInit(Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuInit(__pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 11319, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":11320
 *     """
 *     err = ccuda.cuInit(Flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11301
 * 
 * @cython.embedsignature(True)
 * def cuInit(unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Initialize the CUDA driver API.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuInit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11323
 * 
 * @cython.embedsignature(True)
 * def cuDriverGetVersion():             # <<<<<<<<<<<<<<
 *     """ Returns the latest CUDA version supported by driver.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_7cuDriverGetVersion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_6cuDriverGetVersion[] = "cuDriverGetVersion()\n Returns the latest CUDA version supported by driver.\n\n    Returns in `*driverVersion` the version of CUDA supported by the\n    driver. The version is returned as (1000 * major + 10 * minor). For\n    example, CUDA 9.2 would be represented by 9020.\n\n    This function automatically returns\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if `driverVersion` is NULL.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    driverVersion : int\n        Returns the CUDA driver version\n\n    See Also\n    --------\n    :py:obj:`~.cudaDriverGetVersion`, :py:obj:`~.cudaRuntimeGetVersion`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_7cuDriverGetVersion = {"cuDriverGetVersion", (PyCFunction)__pyx_pw_4cuda_4cuda_7cuDriverGetVersion, METH_NOARGS, __pyx_doc_4cuda_4cuda_6cuDriverGetVersion};
static PyObject *__pyx_pw_4cuda_4cuda_7cuDriverGetVersion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDriverGetVersion (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_6cuDriverGetVersion(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_6cuDriverGetVersion(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_driverVersion;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__609)
  __Pyx_RefNannySetupContext("cuDriverGetVersion", 0);
  __Pyx_TraceCall("cuDriverGetVersion", __pyx_f[0], 11323, 0, __PYX_ERR(0, 11323, __pyx_L1_error));

  /* "cuda/cuda.pyx":11344
 *     :py:obj:`~.cudaDriverGetVersion`, :py:obj:`~.cudaRuntimeGetVersion`
 *     """
 *     cdef int driverVersion = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDriverGetVersion(&driverVersion)
 *     return (CUresult(err), driverVersion)
 */
  __pyx_v_driverVersion = 0;

  /* "cuda/cuda.pyx":11345
 *     """
 *     cdef int driverVersion = 0
 *     err = ccuda.cuDriverGetVersion(&driverVersion)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), driverVersion)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuDriverGetVersion((&__pyx_v_driverVersion)); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 11345, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":11346
 *     cdef int driverVersion = 0
 *     err = ccuda.cuDriverGetVersion(&driverVersion)
 *     return (CUresult(err), driverVersion)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_driverVersion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11323
 * 
 * @cython.embedsignature(True)
 * def cuDriverGetVersion():             # <<<<<<<<<<<<<<
 *     """ Returns the latest CUDA version supported by driver.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuDriverGetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11349
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGet(int ordinal):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a compute device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_9cuDeviceGet(PyObject *__pyx_self, PyObject *__pyx_arg_ordinal); /*proto*/
static char __pyx_doc_4cuda_4cuda_8cuDeviceGet[] = "cuDeviceGet(int ordinal)\n Returns a handle to a compute device.\n\n    Returns in `*device` a device handle given an ordinal in the range [0,\n    :py:obj:`~.cuDeviceGetCount()`-1].\n\n    Parameters\n    ----------\n    ordinal : int\n        Device number to get handle for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    device : :py:obj:`~.CUdevice`\n        Returned device handle\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_9cuDeviceGet = {"cuDeviceGet", (PyCFunction)__pyx_pw_4cuda_4cuda_9cuDeviceGet, METH_O, __pyx_doc_4cuda_4cuda_8cuDeviceGet};
static PyObject *__pyx_pw_4cuda_4cuda_9cuDeviceGet(PyObject *__pyx_self, PyObject *__pyx_arg_ordinal) {
  int __pyx_v_ordinal;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGet (wrapper)", 0);
  assert(__pyx_arg_ordinal); {
    __pyx_v_ordinal = __Pyx_PyInt_As_int(__pyx_arg_ordinal); if (unlikely((__pyx_v_ordinal == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 11349, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_8cuDeviceGet(__pyx_self, ((int)__pyx_v_ordinal));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_8cuDeviceGet(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_ordinal) {
  struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_device = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__610)
  __Pyx_RefNannySetupContext("cuDeviceGet", 0);
  __Pyx_TraceCall("cuDeviceGet", __pyx_f[0], 11349, 0, __PYX_ERR(0, 11349, __pyx_L1_error));

  /* "cuda/cuda.pyx":11371
 *     :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`
 *     """
 *     cdef CUdevice device = CUdevice()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGet(device._ptr, ordinal)
 *     return (CUresult(err), device)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_device = ((struct __pyx_obj_4cuda_4cuda_CUdevice *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11372
 *     """
 *     cdef CUdevice device = CUdevice()
 *     err = ccuda.cuDeviceGet(device._ptr, ordinal)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), device)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuDeviceGet(__pyx_v_device->_ptr, __pyx_v_ordinal); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 11372, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":11373
 *     cdef CUdevice device = CUdevice()
 *     err = ccuda.cuDeviceGet(device._ptr, ordinal)
 *     return (CUresult(err), device)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_device));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_device));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_device));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11349
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGet(int ordinal):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a compute device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_device);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11376
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetCount():             # <<<<<<<<<<<<<<
 *     """ Returns the number of compute-capable devices.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_11cuDeviceGetCount(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_10cuDeviceGetCount[] = "cuDeviceGetCount()\n Returns the number of compute-capable devices.\n\n    Returns in `*count` the number of devices with compute capability\n    greater than or equal to 2.0 that are available for execution. If there\n    is no such device, :py:obj:`~.cuDeviceGetCount()` returns 0.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    count : int\n        Returned number of compute-capable devices\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaGetDeviceCount`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_11cuDeviceGetCount = {"cuDeviceGetCount", (PyCFunction)__pyx_pw_4cuda_4cuda_11cuDeviceGetCount, METH_NOARGS, __pyx_doc_4cuda_4cuda_10cuDeviceGetCount};
static PyObject *__pyx_pw_4cuda_4cuda_11cuDeviceGetCount(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetCount (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_10cuDeviceGetCount(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_10cuDeviceGetCount(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_count;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__611)
  __Pyx_RefNannySetupContext("cuDeviceGetCount", 0);
  __Pyx_TraceCall("cuDeviceGetCount", __pyx_f[0], 11376, 0, __PYX_ERR(0, 11376, __pyx_L1_error));

  /* "cuda/cuda.pyx":11394
 *     :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaGetDeviceCount`
 *     """
 *     cdef int count = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetCount(&count)
 *     return (CUresult(err), count)
 */
  __pyx_v_count = 0;

  /* "cuda/cuda.pyx":11395
 *     """
 *     cdef int count = 0
 *     err = ccuda.cuDeviceGetCount(&count)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), count)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuDeviceGetCount((&__pyx_v_count)); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 11395, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":11396
 *     cdef int count = 0
 *     err = ccuda.cuDeviceGetCount(&count)
 *     return (CUresult(err), count)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11376
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetCount():             # <<<<<<<<<<<<<<
 *     """ Returns the number of compute-capable devices.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11399
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetName(int length, dev):             # <<<<<<<<<<<<<<
 *     """ Returns an identifer string for the device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_13cuDeviceGetName(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_12cuDeviceGetName[] = "cuDeviceGetName(int length, dev)\n Returns an identifer string for the device.\n\n    Returns an ASCII string identifying the device `dev` in the NULL-\n    terminated string pointed to by `name`. `length` specifies the maximum\n    length of the string that may be returned.\n\n    Parameters\n    ----------\n    length : int\n        Maximum length of string to store in `name`\n    dev : :py:obj:`~.CUdevice`\n        Device to get identifier string for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    name : bytes\n        Returned identifier string for the device\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaGetDeviceProperties`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_13cuDeviceGetName = {"cuDeviceGetName", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_13cuDeviceGetName, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_12cuDeviceGetName};
static PyObject *__pyx_pw_4cuda_4cuda_13cuDeviceGetName(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_length;
  PyObject *__pyx_v_dev = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetName (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_length,&__pyx_n_s_dev,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dev)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceGetName", 1, 2, 2, 1); __PYX_ERR(0, 11399, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuDeviceGetName") < 0)) __PYX_ERR(0, 11399, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_length = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 11399, __pyx_L3_error)
    __pyx_v_dev = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuDeviceGetName", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 11399, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_12cuDeviceGetName(__pyx_self, __pyx_v_length, __pyx_v_dev);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_12cuDeviceGetName(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_length, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  PyObject *__pyx_v_pyname = NULL;
  char *__pyx_v_name;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__612)
  __Pyx_RefNannySetupContext("cuDeviceGetName", 0);
  __Pyx_TraceCall("cuDeviceGetName", __pyx_f[0], 11399, 0, __PYX_ERR(0, 11399, __pyx_L1_error));

  /* "cuda/cuda.pyx":11425
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":11426
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":11425
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11427
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11428
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":11429
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11429, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":11427
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11431
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":11432
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     pyname = b" " * length
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11432, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11434
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     pyname = b" " * length             # <<<<<<<<<<<<<<
 *     cdef char* name = pyname
 *     err = ccuda.cuDeviceGetName(name, length, cdev)
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyNumber_Multiply(__pyx_kp_b__613, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 11434, __pyx_L1_error)
  __pyx_v_pyname = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":11435
 * 
 *     pyname = b" " * length
 *     cdef char* name = pyname             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetName(name, length, cdev)
 *     return (CUresult(err), pyname)
 */
  if (unlikely(__pyx_v_pyname == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 11435, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_pyname); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 11435, __pyx_L1_error)
  __pyx_v_name = __pyx_t_6;

  /* "cuda/cuda.pyx":11436
 *     pyname = b" " * length
 *     cdef char* name = pyname
 *     err = ccuda.cuDeviceGetName(name, length, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pyname)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuDeviceGetName(__pyx_v_name, __pyx_v_length, __pyx_v_cdev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 11436, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":11437
 *     cdef char* name = pyname
 *     err = ccuda.cuDeviceGetName(name, length, cdev)
 *     return (CUresult(err), pyname)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 11437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_pyname);
  __Pyx_GIVEREF(__pyx_v_pyname);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_pyname);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11399
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetName(int length, dev):             # <<<<<<<<<<<<<<
 *     """ Returns an identifer string for the device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XDECREF(__pyx_v_pyname);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11440
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetUuid(dev):             # <<<<<<<<<<<<<<
 *     """ Return an UUID for the device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_15cuDeviceGetUuid(PyObject *__pyx_self, PyObject *__pyx_v_dev); /*proto*/
static char __pyx_doc_4cuda_4cuda_14cuDeviceGetUuid[] = "cuDeviceGetUuid(dev)\n Return an UUID for the device.\n\n    Note there is a later version of this API,\n    :py:obj:`~.cuDeviceGetUuid_v2`. It will supplant this version in 12.0,\n    which is retained for minor version compatibility.\n\n    Returns 16-octets identifing the device `dev` in the structure pointed\n    by the `uuid`.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        Device to get identifier string for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    uuid : :py:obj:`~.CUuuid`\n        Returned UUID\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetUuid_v2` :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaGetDeviceProperties`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_15cuDeviceGetUuid = {"cuDeviceGetUuid", (PyCFunction)__pyx_pw_4cuda_4cuda_15cuDeviceGetUuid, METH_O, __pyx_doc_4cuda_4cuda_14cuDeviceGetUuid};
static PyObject *__pyx_pw_4cuda_4cuda_15cuDeviceGetUuid(PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetUuid (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_14cuDeviceGetUuid(__pyx_self, ((PyObject *)__pyx_v_dev));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_14cuDeviceGetUuid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  struct __pyx_obj_4cuda_4cuda_CUuuid *__pyx_v_uuid = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__614)
  __Pyx_RefNannySetupContext("cuDeviceGetUuid", 0);
  __Pyx_TraceCall("cuDeviceGetUuid", __pyx_f[0], 11440, 0, __PYX_ERR(0, 11440, __pyx_L1_error));

  /* "cuda/cuda.pyx":11467
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":11468
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":11467
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11469
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11470
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":11471
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11471, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":11469
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11473
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":11474
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef CUuuid uuid = CUuuid()
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11474, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11476
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef CUuuid uuid = CUuuid()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetUuid(uuid._ptr, cdev)
 *     return (CUresult(err), uuid)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUuuid)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_uuid = ((struct __pyx_obj_4cuda_4cuda_CUuuid *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":11477
 * 
 *     cdef CUuuid uuid = CUuuid()
 *     err = ccuda.cuDeviceGetUuid(uuid._ptr, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), uuid)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDeviceGetUuid(__pyx_v_uuid->__pyx_base._ptr, __pyx_v_cdev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 11477, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":11478
 *     cdef CUuuid uuid = CUuuid()
 *     err = ccuda.cuDeviceGetUuid(uuid._ptr, cdev)
 *     return (CUresult(err), uuid)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_uuid));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_uuid));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_uuid));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11440
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetUuid(dev):             # <<<<<<<<<<<<<<
 *     """ Return an UUID for the device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetUuid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XDECREF((PyObject *)__pyx_v_uuid);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11481
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetUuid_v2(dev):             # <<<<<<<<<<<<<<
 *     """ Return an UUID for the device (11.4+)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_17cuDeviceGetUuid_v2(PyObject *__pyx_self, PyObject *__pyx_v_dev); /*proto*/
static char __pyx_doc_4cuda_4cuda_16cuDeviceGetUuid_v2[] = "cuDeviceGetUuid_v2(dev)\n Return an UUID for the device (11.4+)\n\n    Returns 16-octets identifing the device `dev` in the structure pointed\n    by the `uuid`. If the device is in MIG mode, returns its MIG UUID which\n    uniquely identifies the subscribed MIG compute instance.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        Device to get identifier string for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    uuid : :py:obj:`~.CUuuid`\n        Returned UUID\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cudaGetDeviceProperties`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_17cuDeviceGetUuid_v2 = {"cuDeviceGetUuid_v2", (PyCFunction)__pyx_pw_4cuda_4cuda_17cuDeviceGetUuid_v2, METH_O, __pyx_doc_4cuda_4cuda_16cuDeviceGetUuid_v2};
static PyObject *__pyx_pw_4cuda_4cuda_17cuDeviceGetUuid_v2(PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetUuid_v2 (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_16cuDeviceGetUuid_v2(__pyx_self, ((PyObject *)__pyx_v_dev));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_16cuDeviceGetUuid_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  struct __pyx_obj_4cuda_4cuda_CUuuid *__pyx_v_uuid = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__615)
  __Pyx_RefNannySetupContext("cuDeviceGetUuid_v2", 0);
  __Pyx_TraceCall("cuDeviceGetUuid_v2", __pyx_f[0], 11481, 0, __PYX_ERR(0, 11481, __pyx_L1_error));

  /* "cuda/cuda.pyx":11505
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":11506
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":11505
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11507
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11508
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":11509
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11509, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":11507
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11511
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":11512
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef CUuuid uuid = CUuuid()
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11512, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11514
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef CUuuid uuid = CUuuid()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetUuid_v2(uuid._ptr, cdev)
 *     return (CUresult(err), uuid)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUuuid)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_uuid = ((struct __pyx_obj_4cuda_4cuda_CUuuid *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":11515
 * 
 *     cdef CUuuid uuid = CUuuid()
 *     err = ccuda.cuDeviceGetUuid_v2(uuid._ptr, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), uuid)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDeviceGetUuid_v2(__pyx_v_uuid->__pyx_base._ptr, __pyx_v_cdev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 11515, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":11516
 *     cdef CUuuid uuid = CUuuid()
 *     err = ccuda.cuDeviceGetUuid_v2(uuid._ptr, cdev)
 *     return (CUresult(err), uuid)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_uuid));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_uuid));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_uuid));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11481
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetUuid_v2(dev):             # <<<<<<<<<<<<<<
 *     """ Return an UUID for the device (11.4+)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetUuid_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XDECREF((PyObject *)__pyx_v_uuid);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11519
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetLuid(dev):             # <<<<<<<<<<<<<<
 *     """ Return an LUID and device node mask for the device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_19cuDeviceGetLuid(PyObject *__pyx_self, PyObject *__pyx_v_dev); /*proto*/
static char __pyx_doc_4cuda_4cuda_18cuDeviceGetLuid[] = "cuDeviceGetLuid(dev)\n Return an LUID and device node mask for the device.\n\n    Return identifying information (`luid` and `deviceNodeMask`) to allow\n    matching device with graphics APIs.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        Device to get identifier string for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    luid : bytes\n        Returned LUID\n    deviceNodeMask : unsigned int\n        Returned device node mask\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaGetDeviceProperties`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_19cuDeviceGetLuid = {"cuDeviceGetLuid", (PyCFunction)__pyx_pw_4cuda_4cuda_19cuDeviceGetLuid, METH_O, __pyx_doc_4cuda_4cuda_18cuDeviceGetLuid};
static PyObject *__pyx_pw_4cuda_4cuda_19cuDeviceGetLuid(PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetLuid (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_18cuDeviceGetLuid(__pyx_self, ((PyObject *)__pyx_v_dev));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_18cuDeviceGetLuid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  char __pyx_v_luid[8];
  unsigned int __pyx_v_deviceNodeMask;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__616)
  __Pyx_RefNannySetupContext("cuDeviceGetLuid", 0);
  __Pyx_TraceCall("cuDeviceGetLuid", __pyx_f[0], 11519, 0, __PYX_ERR(0, 11519, __pyx_L1_error));

  /* "cuda/cuda.pyx":11544
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":11545
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":11544
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11546
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11547
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":11548
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11548, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":11546
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11550
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":11551
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef char luid[8]
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11551, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11554
 * 
 *     cdef char luid[8]
 *     cdef unsigned int deviceNodeMask = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetLuid(luid, &deviceNodeMask, cdev)
 *     return (CUresult(err), <bytes>luid, deviceNodeMask)
 */
  __pyx_v_deviceNodeMask = 0;

  /* "cuda/cuda.pyx":11555
 *     cdef char luid[8]
 *     cdef unsigned int deviceNodeMask = 0
 *     err = ccuda.cuDeviceGetLuid(luid, &deviceNodeMask, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), <bytes>luid, deviceNodeMask)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDeviceGetLuid(__pyx_v_luid, (&__pyx_v_deviceNodeMask), __pyx_v_cdev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 11555, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":11556
 *     cdef unsigned int deviceNodeMask = 0
 *     err = ccuda.cuDeviceGetLuid(luid, &deviceNodeMask, cdev)
 *     return (CUresult(err), <bytes>luid, deviceNodeMask)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_FromString(__pyx_v_luid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_deviceNodeMask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 11556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject*)__pyx_t_3));
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
  __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11519
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetLuid(dev):             # <<<<<<<<<<<<<<
 *     """ Return an LUID and device node mask for the device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetLuid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11559
 * 
 * @cython.embedsignature(True)
 * def cuDeviceTotalMem(dev):             # <<<<<<<<<<<<<<
 *     """ Returns the total amount of memory on the device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_21cuDeviceTotalMem(PyObject *__pyx_self, PyObject *__pyx_v_dev); /*proto*/
static char __pyx_doc_4cuda_4cuda_20cuDeviceTotalMem[] = "cuDeviceTotalMem(dev)\n Returns the total amount of memory on the device.\n\n    Returns in `*bytes` the total amount of memory available on the device\n    `dev` in bytes.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        Device handle\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    numbytes : int\n        Returned memory available on device in bytes\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaMemGetInfo`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_21cuDeviceTotalMem = {"cuDeviceTotalMem", (PyCFunction)__pyx_pw_4cuda_4cuda_21cuDeviceTotalMem, METH_O, __pyx_doc_4cuda_4cuda_20cuDeviceTotalMem};
static PyObject *__pyx_pw_4cuda_4cuda_21cuDeviceTotalMem(PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceTotalMem (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_20cuDeviceTotalMem(__pyx_self, ((PyObject *)__pyx_v_dev));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_20cuDeviceTotalMem(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  size_t __pyx_v_numbytes;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__617)
  __Pyx_RefNannySetupContext("cuDeviceTotalMem", 0);
  __Pyx_TraceCall("cuDeviceTotalMem", __pyx_f[0], 11559, 0, __PYX_ERR(0, 11559, __pyx_L1_error));

  /* "cuda/cuda.pyx":11582
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":11583
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":11582
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11584
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11585
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":11586
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11586, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":11584
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11588
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":11589
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef size_t numbytes = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11589, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11591
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef size_t numbytes = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceTotalMem(&numbytes, cdev)
 *     return (CUresult(err), numbytes)
 */
  __pyx_v_numbytes = 0;

  /* "cuda/cuda.pyx":11592
 * 
 *     cdef size_t numbytes = 0
 *     err = ccuda.cuDeviceTotalMem(&numbytes, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), numbytes)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDeviceTotalMem((&__pyx_v_numbytes), __pyx_v_cdev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 11592, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":11593
 *     cdef size_t numbytes = 0
 *     err = ccuda.cuDeviceTotalMem(&numbytes, cdev)
 *     return (CUresult(err), numbytes)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_numbytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 11593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11559
 * 
 * @cython.embedsignature(True)
 * def cuDeviceTotalMem(dev):             # <<<<<<<<<<<<<<
 *     """ Returns the total amount of memory on the device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceTotalMem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11596
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetTexture1DLinearMaxWidth(pformat not None : CUarray_format, unsigned numChannels, dev):             # <<<<<<<<<<<<<<
 *     """ Returns the maximum number of elements allocatable in a 1D linear texture for a given texture element size.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_23cuDeviceGetTexture1DLinearMaxWidth(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_22cuDeviceGetTexture1DLinearMaxWidth[] = "cuDeviceGetTexture1DLinearMaxWidth(pformat: CUarray_format, unsigned int numChannels, dev)\n Returns the maximum number of elements allocatable in a 1D linear texture for a given texture element size.\n\n    Returns in `maxWidthInElements` the maximum number of texture elements\n    allocatable in a 1D linear texture for given `pformat` and\n    `numChannels`.\n\n    Parameters\n    ----------\n    pformat : :py:obj:`~.CUarray_format`\n        Texture format.\n    numChannels : unsigned\n        Number of channels per texture element.\n    dev : :py:obj:`~.CUdevice`\n        Device handle.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    maxWidthInElements : int\n        Returned maximum number of texture elements allocatable for given\n        `pformat` and `numChannels`.\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cudaMemGetInfo`, :py:obj:`~.cuDeviceTotalMem`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_23cuDeviceGetTexture1DLinearMaxWidth = {"cuDeviceGetTexture1DLinearMaxWidth", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_23cuDeviceGetTexture1DLinearMaxWidth, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_22cuDeviceGetTexture1DLinearMaxWidth};
static PyObject *__pyx_pw_4cuda_4cuda_23cuDeviceGetTexture1DLinearMaxWidth(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_pformat = 0;
  unsigned int __pyx_v_numChannels;
  PyObject *__pyx_v_dev = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetTexture1DLinearMaxWidth (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pformat,&__pyx_n_s_numChannels_2,&__pyx_n_s_dev,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pformat)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numChannels_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceGetTexture1DLinearMaxWidth", 1, 3, 3, 1); __PYX_ERR(0, 11596, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dev)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceGetTexture1DLinearMaxWidth", 1, 3, 3, 2); __PYX_ERR(0, 11596, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuDeviceGetTexture1DLinearMaxWidth") < 0)) __PYX_ERR(0, 11596, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_pformat = values[0];
    __pyx_v_numChannels = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_numChannels == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 11596, __pyx_L3_error)
    __pyx_v_dev = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuDeviceGetTexture1DLinearMaxWidth", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 11596, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetTexture1DLinearMaxWidth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_pformat) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "pformat"); __PYX_ERR(0, 11596, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_22cuDeviceGetTexture1DLinearMaxWidth(__pyx_self, __pyx_v_pformat, __pyx_v_numChannels, __pyx_v_dev);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_22cuDeviceGetTexture1DLinearMaxWidth(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pformat, unsigned int __pyx_v_numChannels, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  size_t __pyx_v_maxWidthInElements;
  CUarray_format __pyx_v_cpformat;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUarray_format __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__618)
  __Pyx_RefNannySetupContext("cuDeviceGetTexture1DLinearMaxWidth", 0);
  __Pyx_TraceCall("cuDeviceGetTexture1DLinearMaxWidth", __pyx_f[0], 11596, 0, __PYX_ERR(0, 11596, __pyx_L1_error));

  /* "cuda/cuda.pyx":11625
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":11626
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":11625
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11627
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":11628
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":11629
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11629, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":11627
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":11631
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":11632
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef size_t maxWidthInElements = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 11632, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":11634
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef size_t maxWidthInElements = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUarray_format cpformat = pformat.value
 *     err = ccuda.cuDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cpformat, numChannels, cdev)
 */
  __pyx_v_maxWidthInElements = 0;

  /* "cuda/cuda.pyx":11635
 * 
 *     cdef size_t maxWidthInElements = 0
 *     cdef ccuda.CUarray_format cpformat = pformat.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cpformat, numChannels, cdev)
 *     return (CUresult(err), maxWidthInElements)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_pformat, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUarray_format_enum)__Pyx_PyInt_As_enum__CUarray_format_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 11635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cpformat = __pyx_t_6;

  /* "cuda/cuda.pyx":11636
 *     cdef size_t maxWidthInElements = 0
 *     cdef ccuda.CUarray_format cpformat = pformat.value
 *     err = ccuda.cuDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cpformat, numChannels, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), maxWidthInElements)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuDeviceGetTexture1DLinearMaxWidth((&__pyx_v_maxWidthInElements), __pyx_v_cpformat, __pyx_v_numChannels, __pyx_v_cdev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 11636, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":11637
 *     cdef ccuda.CUarray_format cpformat = pformat.value
 *     err = ccuda.cuDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cpformat, numChannels, cdev)
 *     return (CUresult(err), maxWidthInElements)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 11637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_maxWidthInElements); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 11637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11596
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetTexture1DLinearMaxWidth(pformat not None : CUarray_format, unsigned numChannels, dev):             # <<<<<<<<<<<<<<
 *     """ Returns the maximum number of elements allocatable in a 1D linear texture for a given texture element size.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetTexture1DLinearMaxWidth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":11640
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetAttribute(attrib not None : CUdevice_attribute, dev):             # <<<<<<<<<<<<<<
 *     """ Returns information about the device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_25cuDeviceGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_24cuDeviceGetAttribute[] = "cuDeviceGetAttribute(attrib: CUdevice_attribute, dev)\n Returns information about the device.\n\n    Returns in `*pi` the integer value of the attribute `attrib` on device\n    `dev`. The supported attributes are:\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK`: Maximum number\n      of threads per block;\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X`: Maximum x-dimension\n      of a block\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y`: Maximum y-dimension\n      of a block\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z`: Maximum z-dimension\n      of a block\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X`: Maximum x-dimension\n      of a grid\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y`: Maximum y-dimension\n      of a grid\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z`: Maximum z-dimension\n      of a grid\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK`: Maximum\n      amount of shared memory available to a thread block in bytes\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY`: Memory\n      available on device for constant variables in a CUDA C kernel in\n      bytes\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_WARP_SIZE`: Warp size in threads\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PITCH`: Maximum pitch in bytes\n      allowed by the memory copy functions that involve memory regions\n      allocated through :py:obj:`~.cuMemAllocPitch()`\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH`: Maximum 1D\n      texture width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH`:\n      Maximum width for a 1D texture bound to linear memory\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH`:\n      Maximum mipmapped 1D texture width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH`: Maximum 2D\n      texture width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT`: Maximum 2D\n    ""  texture height\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH`:\n      Maximum width for a 2D texture bound to linear memory\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT`:\n      Maximum height for a 2D texture bound to linear memory\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH`:\n      Maximum pitch in bytes for a 2D texture bound to linear memory\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH`:\n      Maximum mipmapped 2D texture width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT`:\n      Maximum mipmapped 2D texture height\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH`: Maximum 3D\n      texture width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT`: Maximum 3D\n      texture height\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH`: Maximum 3D\n      texture depth\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE`:\n      Alternate maximum 3D texture width, 0 if no alternate maximum 3D\n      texture size is supported\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE`:\n      Alternate maximum 3D texture height, 0 if no alternate maximum 3D\n      texture size is supported\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE`:\n      Alternate maximum 3D texture depth, 0 if no alternate maximum 3D\n      texture size is supported\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH`: Maximum\n      cubemap texture width or height\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH`:\n      Maximum 1D layered texture width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS`:\n      Maximum layers in a 1D layered texture\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH`:\n      Maximum 2D layered texture width\n\n    - :py:obj:`~.CU_D""EVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT`:\n      Maximum 2D layered texture height\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS`:\n      Maximum layers in a 2D layered texture\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH`:\n      Maximum cubemap layered texture width or height\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS`:\n      Maximum layers in a cubemap layered texture\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH`: Maximum 1D\n      surface width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH`: Maximum 2D\n      surface width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT`: Maximum 2D\n      surface height\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH`: Maximum 3D\n      surface width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT`: Maximum 3D\n      surface height\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH`: Maximum 3D\n      surface depth\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH`:\n      Maximum 1D layered surface width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS`:\n      Maximum layers in a 1D layered surface\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH`:\n      Maximum 2D layered surface width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT`:\n      Maximum 2D layered surface height\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS`:\n      Maximum layers in a 2D layered surface\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH`: Maximum\n      cubemap surface width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH`:\n      Maximum cubemap layered surface width\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS`:\n      Maximum layers in a cubem""ap layered surface\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK`: Maximum\n      number of 32-bit registers available to a thread block\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_CLOCK_RATE`: The typical clock\n      frequency in kilohertz\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT`: Alignment\n      requirement; texture base addresses aligned to\n      :py:obj:`~.textureAlign` bytes do not need an offset applied to\n      texture fetches\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT`: Pitch\n      alignment requirement for 2D texture references bound to pitched\n      memory\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_OVERLAP`: 1 if the device can\n      concurrently copy memory between host and device while executing a\n      kernel, or 0 if not\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`: Number of\n      multiprocessors on the device\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT`: 1 if there is a\n      run time limit for kernels executed on the device, or 0 if not\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_INTEGRATED`: 1 if the device is\n      integrated with the memory subsystem, or 0 if not\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY`: 1 if the device\n      can map host memory into the CUDA address space, or 0 if not\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE`: Compute mode that\n      device is currently in. Available modes are as follows:\n\n      - :py:obj:`~.CU_COMPUTEMODE_DEFAULT`: Default mode - Device is not\n        restricted and can have multiple CUDA contexts present at a single\n        time.\n\n      - :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`: Compute-prohibited mode -\n        Device is prohibited from creating new CUDA contexts.\n\n      - :py:obj:`~.CU_COMPUTEMODE_EXCLUSIVE_PROCESS`: Compute-exclusive-\n        process mode - Device can have only one context used by a single\n        process at a time.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_""CONCURRENT_KERNELS`: 1 if the device\n      supports executing multiple kernels within the same context\n      simultaneously, or 0 if not. It is not guaranteed that multiple\n      kernels will be resident on the device concurrently so this feature\n      should not be relied upon for correctness.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_ECC_ENABLED`: 1 if error correction is\n      enabled on the device, 0 if error correction is disabled or not\n      supported by the device\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_PCI_BUS_ID`: PCI bus identifier of the\n      device\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID`: PCI device (also known\n      as slot) identifier of the device\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID`: PCI domain identifier\n      of the device\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_TCC_DRIVER`: 1 if the device is using\n      a TCC driver. TCC is only available on Tesla hardware running Windows\n      Vista or later\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE`: Peak memory clock\n      frequency in kilohertz\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH`: Global\n      memory bus width in bits\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE`: Size of L2 cache in\n      bytes. 0 if the device doesn't have L2 cache\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR`:\n      Maximum resident threads per multiprocessor\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING`: 1 if the device\n      shares a unified address space with the host, or 0 if not\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR`: Major\n      compute capability version number\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR`: Minor\n      compute capability version number\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED`: 1 if\n      device supports caching globals in L1 cache, 0 if caching globals in\n      L1 cache is not supported by the device""\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED`: 1 if device\n      supports caching locals in L1 cache, 0 if caching locals in L1 cache\n      is not supported by the device\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR`:\n      Maximum amount of shared memory available to a multiprocessor in\n      bytes; this amount is shared by all thread blocks simultaneously\n      resident on a multiprocessor\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR`:\n      Maximum number of 32-bit registers available to a multiprocessor;\n      this number is shared by all thread blocks simultaneously resident on\n      a multiprocessor\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY`: 1 if device supports\n      allocating managed memory on this system, 0 if allocating managed\n      memory is not supported by the device on this system.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD`: 1 if device is on a\n      multi-GPU board, 0 if not.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID`: Unique\n      identifier for a group of devices associated with the same board.\n      Devices on the same multi-GPU board will share the same identifier.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED`: 1 if\n      Link between the device and the host supports native atomic\n      operations.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO`:\n      Ratio of single precision performance (in floating-point operations\n      per second) to double precision performance.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`: Device\n      suppports coherently accessing pageable memory without calling\n      cudaHostRegister on it.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`: Device can\n      coherently access managed memory concurrently with the CPU.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPO""RTED`: Device\n      supports Compute Preemption.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM`:\n      Device can access host registered memory at the same virtual address\n      as the CPU.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN`:\n      The maximum per block shared memory size suported on this device.\n      This is the maximum value that can be opted into when using the\n      :py:obj:`~.cuFuncSetAttribute()` call. For more details see\n      :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES`\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`:\n      Device accesses pageable memory via the host's page tables.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST`:\n      The host can directly access managed memory on the device without\n      migration.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED`:\n      Device supports virtual memory management APIs like\n      :py:obj:`~.cuMemAddressReserve`, :py:obj:`~.cuMemCreate`,\n      :py:obj:`~.cuMemMap` and related APIs\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED`:\n      Device supports exporting memory to a posix file descriptor with\n      :py:obj:`~.cuMemExportToShareableHandle`, if requested via\n      :py:obj:`~.cuMemCreate`\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED`:\n      Device supports exporting memory to a Win32 NT handle with\n      :py:obj:`~.cuMemExportToShareableHandle`, if requested via\n      :py:obj:`~.cuMemCreate`\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED`:\n      Device supports exporting memory to a Win32 KMT handle with\n      :py:obj:`~.cuMemExportToShareableHandle`, if requested via\n      :py:obj:`~.cuMemCreate`\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR`:\n      Maximum number of thread block""s that can reside on a multiprocessor\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED`: Device\n      supports compressible memory allocation via :py:obj:`~.cuMemCreate`\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE`: Maximum\n      L2 persisting lines capacity setting in bytes\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE`:\n      Maximum value of :py:obj:`~.CUaccessPolicyWindow.num_bytes`\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED`:\n      Device supports specifying the GPUDirect RDMA flag with\n      :py:obj:`~.cuMemCreate`.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK`:\n      Amount of shared memory per block reserved by CUDA driver in bytes\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED`: Device\n      supports sparse CUDA arrays and sparse CUDA mipmapped arrays.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED`:\n      Device supports using the :py:obj:`~.cuMemHostRegister` flag\n      :py:obj:`~.CU_MEMHOSTERGISTER_READ_ONLY` to register memory that must\n      be mapped as read-only to the GPU\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED`: Device\n      supports using the :py:obj:`~.cuMemAllocAsync` and\n      :py:obj:`~.cuMemPool` family of APIs\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED`: Device\n      supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see\n      https://docs.nvidia.com/cuda/gpudirect-rdma for more information)\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS`:\n      The returned attribute shall be interpreted as a bitmask, where the\n      individual bits are described by the\n      :py:obj:`~.CUflushGPUDirectRDMAWritesOptions` enum\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING`:\n      GPUDirect RDMA writes to the device do not need to be flushed for\n      con""sumers within the scope indicated by the returned attribute. See\n      :py:obj:`~.CUGPUDirectRDMAWritesOrdering` for the numerical values\n      returned here.\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES`:\n      Bitmask of handle types supported with mempool based IPC\n\n    - :py:obj:`~.CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED`:\n      Device supports deferred mapping CUDA arrays and CUDA mipmapped\n      arrays.\n\n    Parameters\n    ----------\n    attrib : :py:obj:`~.CUdevice_attribute`\n        Device attribute to query\n    dev : :py:obj:`~.CUdevice`\n        Device handle\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    pi : int\n        Returned device attribute value\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaDeviceGetAttribute`, :py:obj:`~.cudaGetDeviceProperties`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_25cuDeviceGetAttribute = {"cuDeviceGetAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_25cuDeviceGetAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_24cuDeviceGetAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_25cuDeviceGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attrib = 0;
  PyObject *__pyx_v_dev = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attrib,&__pyx_n_s_dev,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrib)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dev)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceGetAttribute", 1, 2, 2, 1); __PYX_ERR(0, 11640, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuDeviceGetAttribute") < 0)) __PYX_ERR(0, 11640, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_attrib = values[0];
    __pyx_v_dev = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuDeviceGetAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 11640, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attrib) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attrib"); __PYX_ERR(0, 11640, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_24cuDeviceGetAttribute(__pyx_self, __pyx_v_attrib, __pyx_v_dev);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_24cuDeviceGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attrib, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  int __pyx_v_pi;
  CUdevice_attribute __pyx_v_cattrib;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUdevice_attribute __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__619)
  __Pyx_RefNannySetupContext("cuDeviceGetAttribute", 0);
  __Pyx_TraceCall("cuDeviceGetAttribute", __pyx_f[0], 11640, 0, __PYX_ERR(0, 11640, __pyx_L1_error));

  /* "cuda/cuda.pyx":12042
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12043
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12042
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12044
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12045
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12046
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12046, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12044
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12048
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12049
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef int pi = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12049, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12051
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef int pi = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUdevice_attribute cattrib = attrib.value
 *     err = ccuda.cuDeviceGetAttribute(&pi, cattrib, cdev)
 */
  __pyx_v_pi = 0;

  /* "cuda/cuda.pyx":12052
 * 
 *     cdef int pi = 0
 *     cdef ccuda.CUdevice_attribute cattrib = attrib.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetAttribute(&pi, cattrib, cdev)
 *     return (CUresult(err), pi)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUdevice_attribute_enum)__Pyx_PyInt_As_enum__CUdevice_attribute_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattrib = __pyx_t_6;

  /* "cuda/cuda.pyx":12053
 *     cdef int pi = 0
 *     cdef ccuda.CUdevice_attribute cattrib = attrib.value
 *     err = ccuda.cuDeviceGetAttribute(&pi, cattrib, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pi)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuDeviceGetAttribute((&__pyx_v_pi), __pyx_v_cattrib, __pyx_v_cdev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12053, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":12054
 *     cdef ccuda.CUdevice_attribute cattrib = attrib.value
 *     err = ccuda.cuDeviceGetAttribute(&pi, cattrib, cdev)
 *     return (CUresult(err), pi)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 12054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 12054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":11640
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetAttribute(attrib not None : CUdevice_attribute, dev):             # <<<<<<<<<<<<<<
 *     """ Returns information about the device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12057
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, int flags):             # <<<<<<<<<<<<<<
 *     """ Return NvSciSync attributes that this device can support.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_27cuDeviceGetNvSciSyncAttributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_26cuDeviceGetNvSciSyncAttributes[] = "cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, int flags)\n Return NvSciSync attributes that this device can support.\n\n    Returns in `nvSciSyncAttrList`, the properties of NvSciSync that this\n    CUDA device, `dev` can support. The returned `nvSciSyncAttrList` can be\n    used to create an NvSciSync object that matches this device's\n    capabilities.\n\n    If NvSciSyncAttrKey_RequiredPerm field in `nvSciSyncAttrList` is\n    already set this API will return :py:obj:`~.CUDA_ERROR_INVALID_VALUE`.\n\n    The applications should set `nvSciSyncAttrList` to a valid\n    NvSciSyncAttrList failing which this API will return\n    :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`.\n\n    The `flags` controls how applications intends to use the NvSciSync\n    created from the `nvSciSyncAttrList`. The valid flags are:\n\n    - :py:obj:`~.CUDA_NVSCISYNC_ATTR_SIGNAL`, specifies that the\n      applications intends to signal an NvSciSync on this CUDA device.\n\n    - :py:obj:`~.CUDA_NVSCISYNC_ATTR_WAIT`, specifies that the applications\n      intends to wait on an NvSciSync on this CUDA device.\n\n    At least one of these flags must be set, failing which the API returns\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. Both the flags are orthogonal to\n    one another: a developer may set both these flags that allows to set\n    both wait and signal specific attributes in the same\n    `nvSciSyncAttrList`.\n\n    :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`,\n    :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`,\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n    :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`,\n    :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`,\n    :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`,\n    :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n\n    Parameters\n    ----------\n    nvSciSyncAttrList : Any\n        Return NvSciSync attributes supported.\n    dev : :py:obj:`~.CUdevice`\n        Valid Cuda Device to get NvSciSync attributes for.\n    flags : int\n        flags describing NvSciSync u""sage.\n\n    Returns\n    -------\n    CUresult\n\n\n    See Also\n    --------\n    :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuDestroyExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_27cuDeviceGetNvSciSyncAttributes = {"cuDeviceGetNvSciSyncAttributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_27cuDeviceGetNvSciSyncAttributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_26cuDeviceGetNvSciSyncAttributes};
static PyObject *__pyx_pw_4cuda_4cuda_27cuDeviceGetNvSciSyncAttributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_nvSciSyncAttrList = 0;
  PyObject *__pyx_v_dev = 0;
  int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetNvSciSyncAttributes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nvSciSyncAttrList,&__pyx_n_s_dev,&__pyx_n_s_flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nvSciSyncAttrList)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dev)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceGetNvSciSyncAttributes", 1, 3, 3, 1); __PYX_ERR(0, 12057, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceGetNvSciSyncAttributes", 1, 3, 3, 2); __PYX_ERR(0, 12057, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuDeviceGetNvSciSyncAttributes") < 0)) __PYX_ERR(0, 12057, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_nvSciSyncAttrList = values[0];
    __pyx_v_dev = values[1];
    __pyx_v_flags = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 12057, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuDeviceGetNvSciSyncAttributes", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 12057, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetNvSciSyncAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_26cuDeviceGetNvSciSyncAttributes(__pyx_self, __pyx_v_nvSciSyncAttrList, __pyx_v_dev, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_26cuDeviceGetNvSciSyncAttributes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_nvSciSyncAttrList, PyObject *__pyx_v_dev, int __pyx_v_flags) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  PyObject *__pyx_v_cnvSciSyncAttrList = NULL;
  void *__pyx_v_cnvSciSyncAttrList_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__620)
  __Pyx_RefNannySetupContext("cuDeviceGetNvSciSyncAttributes", 0);
  __Pyx_TraceCall("cuDeviceGetNvSciSyncAttributes", __pyx_f[0], 12057, 0, __PYX_ERR(0, 12057, __pyx_L1_error));

  /* "cuda/cuda.pyx":12114
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12115
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12114
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12116
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12117
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12118
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12118, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12116
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12120
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12121
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cnvSciSyncAttrList = utils.HelperInputVoidPtr(nvSciSyncAttrList)
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12121, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12123
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cnvSciSyncAttrList = utils.HelperInputVoidPtr(nvSciSyncAttrList)             # <<<<<<<<<<<<<<
 *     cdef void* cnvSciSyncAttrList_ptr = <void*><void_ptr>cnvSciSyncAttrList.cptr
 *     err = ccuda.cuDeviceGetNvSciSyncAttributes(cnvSciSyncAttrList_ptr, cdev, flags)
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_nvSciSyncAttrList); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_cnvSciSyncAttrList = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":12124
 * 
 *     cnvSciSyncAttrList = utils.HelperInputVoidPtr(nvSciSyncAttrList)
 *     cdef void* cnvSciSyncAttrList_ptr = <void*><void_ptr>cnvSciSyncAttrList.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetNvSciSyncAttributes(cnvSciSyncAttrList_ptr, cdev, flags)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cnvSciSyncAttrList, __pyx_n_s_cptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 12124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cnvSciSyncAttrList_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

  /* "cuda/cuda.pyx":12125
 *     cnvSciSyncAttrList = utils.HelperInputVoidPtr(nvSciSyncAttrList)
 *     cdef void* cnvSciSyncAttrList_ptr = <void*><void_ptr>cnvSciSyncAttrList.cptr
 *     err = ccuda.cuDeviceGetNvSciSyncAttributes(cnvSciSyncAttrList_ptr, cdev, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuDeviceGetNvSciSyncAttributes(__pyx_v_cnvSciSyncAttrList_ptr, __pyx_v_cdev, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12125, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":12126
 *     cdef void* cnvSciSyncAttrList_ptr = <void*><void_ptr>cnvSciSyncAttrList.cptr
 *     err = ccuda.cuDeviceGetNvSciSyncAttributes(cnvSciSyncAttrList_ptr, cdev, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 12126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12057
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, int flags):             # <<<<<<<<<<<<<<
 *     """ Return NvSciSync attributes that this device can support.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetNvSciSyncAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XDECREF(__pyx_v_cnvSciSyncAttrList);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12129
 * 
 * @cython.embedsignature(True)
 * def cuDeviceSetMemPool(dev, pool):             # <<<<<<<<<<<<<<
 *     """ Sets the current memory pool of a device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_29cuDeviceSetMemPool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_28cuDeviceSetMemPool[] = "cuDeviceSetMemPool(dev, pool)\n Sets the current memory pool of a device.\n\n    The memory pool must be local to the specified device.\n    :py:obj:`~.cuMemAllocAsync` allocates from the current mempool of the\n    provided stream's device. By default, a device's current memory pool is\n    its default memory pool.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        None\n    pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t`\n        None\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cuMemPoolDestroy`, :py:obj:`~.cuMemAllocFromPoolAsync`\n\n    Notes\n    -----\n    Use :py:obj:`~.cuMemAllocFromPoolAsync` to specify asynchronous allocations from a device different than the one the stream runs on.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_29cuDeviceSetMemPool = {"cuDeviceSetMemPool", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_29cuDeviceSetMemPool, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_28cuDeviceSetMemPool};
static PyObject *__pyx_pw_4cuda_4cuda_29cuDeviceSetMemPool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dev = 0;
  PyObject *__pyx_v_pool = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceSetMemPool (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dev,&__pyx_n_s_pool,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dev)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pool)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceSetMemPool", 1, 2, 2, 1); __PYX_ERR(0, 12129, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuDeviceSetMemPool") < 0)) __PYX_ERR(0, 12129, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_dev = values[0];
    __pyx_v_pool = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuDeviceSetMemPool", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 12129, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceSetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_28cuDeviceSetMemPool(__pyx_self, __pyx_v_dev, __pyx_v_pool);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_28cuDeviceSetMemPool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev, PyObject *__pyx_v_pool) {
  CUmemoryPool __pyx_v_cpool;
  PyObject *__pyx_v_ppool = NULL;
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUdevice __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__621)
  __Pyx_RefNannySetupContext("cuDeviceSetMemPool", 0);
  __Pyx_TraceCall("cuDeviceSetMemPool", __pyx_f[0], 12129, 0, __PYX_ERR(0, 12129, __pyx_L1_error));

  /* "cuda/cuda.pyx":12158
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
  __pyx_t_1 = (__pyx_v_pool == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12159
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 */
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":12158
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12160
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pool, __pyx_ptype_4cuda_4cuda_CUmemoryPool); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12161
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ppool = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12162
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 12162, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":12160
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12164
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 *         ppool = int(CUmemoryPool(pool))             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool), __pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ppool = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12165
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdevice cdev
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 12165, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12168
 * 
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12169
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12168
 * 
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":12170
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12171
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12172
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_6 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_6 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12172, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_6);

    /* "cuda/cuda.pyx":12170
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":12174
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12175
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuDeviceSetMemPool(cdev, cpool)
 */
    __pyx_t_6 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_6 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12175, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_6);
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":12177
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     err = ccuda.cuDeviceSetMemPool(cdev, cpool)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuDeviceSetMemPool(__pyx_v_cdev, __pyx_v_cpool); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12177, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":12178
 * 
 *     err = ccuda.cuDeviceSetMemPool(cdev, cpool)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 12178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12129
 * 
 * @cython.embedsignature(True)
 * def cuDeviceSetMemPool(dev, pool):             # <<<<<<<<<<<<<<
 *     """ Sets the current memory pool of a device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceSetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppool);
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12181
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetMemPool(dev):             # <<<<<<<<<<<<<<
 *     """ Gets the current mempool for a device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_31cuDeviceGetMemPool(PyObject *__pyx_self, PyObject *__pyx_v_dev); /*proto*/
static char __pyx_doc_4cuda_4cuda_30cuDeviceGetMemPool[] = "cuDeviceGetMemPool(dev)\n Gets the current mempool for a device.\n\n    Returns the last pool provided to :py:obj:`~.cuDeviceSetMemPool` for\n    this device or the device's default memory pool if\n    :py:obj:`~.cuDeviceSetMemPool` has never been called. By default the\n    current mempool is the default mempool for a device. Otherwise the\n    returned pool must have been set with :py:obj:`~.cuDeviceSetMemPool`.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        None\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pool : :py:obj:`~.CUmemoryPool`\n        None\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cuDeviceSetMemPool`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_31cuDeviceGetMemPool = {"cuDeviceGetMemPool", (PyCFunction)__pyx_pw_4cuda_4cuda_31cuDeviceGetMemPool, METH_O, __pyx_doc_4cuda_4cuda_30cuDeviceGetMemPool};
static PyObject *__pyx_pw_4cuda_4cuda_31cuDeviceGetMemPool(PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetMemPool (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_30cuDeviceGetMemPool(__pyx_self, ((PyObject *)__pyx_v_dev));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_30cuDeviceGetMemPool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_pool = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__622)
  __Pyx_RefNannySetupContext("cuDeviceGetMemPool", 0);
  __Pyx_TraceCall("cuDeviceGetMemPool", __pyx_f[0], 12181, 0, __PYX_ERR(0, 12181, __pyx_L1_error));

  /* "cuda/cuda.pyx":12207
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12208
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12207
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12209
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12210
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12211
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12211, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12209
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12213
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12214
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef CUmemoryPool pool = CUmemoryPool()
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12214, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12216
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef CUmemoryPool pool = CUmemoryPool()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetMemPool(pool._ptr, cdev)
 *     return (CUresult(err), pool)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pool = ((struct __pyx_obj_4cuda_4cuda_CUmemoryPool *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":12217
 * 
 *     cdef CUmemoryPool pool = CUmemoryPool()
 *     err = ccuda.cuDeviceGetMemPool(pool._ptr, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pool)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDeviceGetMemPool(__pyx_v_pool->_ptr, __pyx_v_cdev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12217, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":12218
 *     cdef CUmemoryPool pool = CUmemoryPool()
 *     err = ccuda.cuDeviceGetMemPool(pool._ptr, cdev)
 *     return (CUresult(err), pool)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pool));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pool));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pool));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12181
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetMemPool(dev):             # <<<<<<<<<<<<<<
 *     """ Gets the current mempool for a device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XDECREF((PyObject *)__pyx_v_pool);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12221
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetDefaultMemPool(dev):             # <<<<<<<<<<<<<<
 *     """ Returns the default mempool of a device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_33cuDeviceGetDefaultMemPool(PyObject *__pyx_self, PyObject *__pyx_v_dev); /*proto*/
static char __pyx_doc_4cuda_4cuda_32cuDeviceGetDefaultMemPool[] = "cuDeviceGetDefaultMemPool(dev)\n Returns the default mempool of a device.\n\n    The default mempool of a device contains device memory from that\n    device.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        None\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n    pool_out : :py:obj:`~.CUmemoryPool`\n        None\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemPoolTrimTo`, :py:obj:`~.cuMemPoolGetAttribute`, :py:obj:`~.cuMemPoolSetAttribute`, :py:obj:`~.cuMemPoolSetAccess`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_33cuDeviceGetDefaultMemPool = {"cuDeviceGetDefaultMemPool", (PyCFunction)__pyx_pw_4cuda_4cuda_33cuDeviceGetDefaultMemPool, METH_O, __pyx_doc_4cuda_4cuda_32cuDeviceGetDefaultMemPool};
static PyObject *__pyx_pw_4cuda_4cuda_33cuDeviceGetDefaultMemPool(PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetDefaultMemPool (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_32cuDeviceGetDefaultMemPool(__pyx_self, ((PyObject *)__pyx_v_dev));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_32cuDeviceGetDefaultMemPool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_pool_out = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__623)
  __Pyx_RefNannySetupContext("cuDeviceGetDefaultMemPool", 0);
  __Pyx_TraceCall("cuDeviceGetDefaultMemPool", __pyx_f[0], 12221, 0, __PYX_ERR(0, 12221, __pyx_L1_error));

  /* "cuda/cuda.pyx":12244
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12245
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12244
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12246
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12247
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12248
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12248, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12246
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12250
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12251
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef CUmemoryPool pool_out = CUmemoryPool()
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12251, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12253
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef CUmemoryPool pool_out = CUmemoryPool()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetDefaultMemPool(pool_out._ptr, cdev)
 *     return (CUresult(err), pool_out)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pool_out = ((struct __pyx_obj_4cuda_4cuda_CUmemoryPool *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":12254
 * 
 *     cdef CUmemoryPool pool_out = CUmemoryPool()
 *     err = ccuda.cuDeviceGetDefaultMemPool(pool_out._ptr, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pool_out)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDeviceGetDefaultMemPool(__pyx_v_pool_out->_ptr, __pyx_v_cdev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12254, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":12255
 *     cdef CUmemoryPool pool_out = CUmemoryPool()
 *     err = ccuda.cuDeviceGetDefaultMemPool(pool_out._ptr, cdev)
 *     return (CUresult(err), pool_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pool_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pool_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pool_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12221
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetDefaultMemPool(dev):             # <<<<<<<<<<<<<<
 *     """ Returns the default mempool of a device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetDefaultMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XDECREF((PyObject *)__pyx_v_pool_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12258
 * 
 * @cython.embedsignature(True)
 * def cuFlushGPUDirectRDMAWrites(target not None : CUflushGPUDirectRDMAWritesTarget, scope not None : CUflushGPUDirectRDMAWritesScope):             # <<<<<<<<<<<<<<
 *     """ Blocks until remote writes are visible to the specified scope.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_35cuFlushGPUDirectRDMAWrites(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_34cuFlushGPUDirectRDMAWrites[] = "cuFlushGPUDirectRDMAWrites(target: CUflushGPUDirectRDMAWritesTarget, scope: CUflushGPUDirectRDMAWritesScope)\n Blocks until remote writes are visible to the specified scope.\n\n    Blocks until GPUDirect RDMA writes to the target context via mappings\n    created through APIs like nvidia_p2p_get_pages (see\n    https://docs.nvidia.com/cuda/gpudirect-rdma for more information), are\n    visible to the specified scope.\n\n    If the scope equals or lies within the scope indicated by\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING`, the\n    call will be a no-op and can be safely omitted for performance. This\n    can be determined by comparing the numerical values between the two\n    enums, with smaller scopes having smaller values.\n\n    Users may query support for this API via\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_FLUSH_FLUSH_GPU_DIRECT_RDMA_OPTIONS`.\n\n    Parameters\n    ----------\n    target : :py:obj:`~.CUflushGPUDirectRDMAWritesTarget`\n        The target of the operation, see\n        :py:obj:`~.CUflushGPUDirectRDMAWritesTarget`\n    scope : :py:obj:`~.CUflushGPUDirectRDMAWritesScope`\n        The scope of the operation, see\n        :py:obj:`~.CUflushGPUDirectRDMAWritesScope`\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_35cuFlushGPUDirectRDMAWrites = {"cuFlushGPUDirectRDMAWrites", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_35cuFlushGPUDirectRDMAWrites, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_34cuFlushGPUDirectRDMAWrites};
static PyObject *__pyx_pw_4cuda_4cuda_35cuFlushGPUDirectRDMAWrites(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_target = 0;
  PyObject *__pyx_v_scope = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuFlushGPUDirectRDMAWrites (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_target,&__pyx_n_s_scope,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scope)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuFlushGPUDirectRDMAWrites", 1, 2, 2, 1); __PYX_ERR(0, 12258, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuFlushGPUDirectRDMAWrites") < 0)) __PYX_ERR(0, 12258, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_target = values[0];
    __pyx_v_scope = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuFlushGPUDirectRDMAWrites", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 12258, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuFlushGPUDirectRDMAWrites", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_target) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "target"); __PYX_ERR(0, 12258, __pyx_L1_error)
  }
  if (unlikely(((PyObject *)__pyx_v_scope) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "scope"); __PYX_ERR(0, 12258, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_34cuFlushGPUDirectRDMAWrites(__pyx_self, __pyx_v_target, __pyx_v_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_34cuFlushGPUDirectRDMAWrites(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_target, PyObject *__pyx_v_scope) {
  CUflushGPUDirectRDMAWritesTarget __pyx_v_ctarget;
  CUflushGPUDirectRDMAWritesScope __pyx_v_cscope;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUflushGPUDirectRDMAWritesTarget __pyx_t_2;
  CUflushGPUDirectRDMAWritesScope __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__624)
  __Pyx_RefNannySetupContext("cuFlushGPUDirectRDMAWrites", 0);
  __Pyx_TraceCall("cuFlushGPUDirectRDMAWrites", __pyx_f[0], 12258, 0, __PYX_ERR(0, 12258, __pyx_L1_error));

  /* "cuda/cuda.pyx":12289
 *         :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,
 *     """
 *     cdef ccuda.CUflushGPUDirectRDMAWritesTarget ctarget = target.value             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUflushGPUDirectRDMAWritesScope cscope = scope.value
 *     err = ccuda.cuFlushGPUDirectRDMAWrites(ctarget, cscope)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUflushGPUDirectRDMAWritesTarget_enum)__Pyx_PyInt_As_enum__CUflushGPUDirectRDMAWritesTarget_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ctarget = __pyx_t_2;

  /* "cuda/cuda.pyx":12290
 *     """
 *     cdef ccuda.CUflushGPUDirectRDMAWritesTarget ctarget = target.value
 *     cdef ccuda.CUflushGPUDirectRDMAWritesScope cscope = scope.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuFlushGPUDirectRDMAWrites(ctarget, cscope)
 *     return (CUresult(err),)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_scope, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = ((enum CUflushGPUDirectRDMAWritesScope_enum)__Pyx_PyInt_As_enum__CUflushGPUDirectRDMAWritesScope_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cscope = __pyx_t_3;

  /* "cuda/cuda.pyx":12291
 *     cdef ccuda.CUflushGPUDirectRDMAWritesTarget ctarget = target.value
 *     cdef ccuda.CUflushGPUDirectRDMAWritesScope cscope = scope.value
 *     err = ccuda.cuFlushGPUDirectRDMAWrites(ctarget, cscope)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuFlushGPUDirectRDMAWrites(__pyx_v_ctarget, __pyx_v_cscope); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12291, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":12292
 *     cdef ccuda.CUflushGPUDirectRDMAWritesScope cscope = scope.value
 *     err = ccuda.cuFlushGPUDirectRDMAWrites(ctarget, cscope)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 12292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12258
 * 
 * @cython.embedsignature(True)
 * def cuFlushGPUDirectRDMAWrites(target not None : CUflushGPUDirectRDMAWritesTarget, scope not None : CUflushGPUDirectRDMAWritesScope):             # <<<<<<<<<<<<<<
 *     """ Blocks until remote writes are visible to the specified scope.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuFlushGPUDirectRDMAWrites", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12295
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetProperties(dev):             # <<<<<<<<<<<<<<
 *     """ Returns properties for a selected device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_37cuDeviceGetProperties(PyObject *__pyx_self, PyObject *__pyx_v_dev); /*proto*/
static char __pyx_doc_4cuda_4cuda_36cuDeviceGetProperties[] = "cuDeviceGetProperties(dev)\n Returns properties for a selected device.\n\n    [Deprecated]\n\n    This function was deprecated as of CUDA 5.0 and replaced by\n    :py:obj:`~.cuDeviceGetAttribute()`.\n\n    Returns in `*prop` the properties of device `dev`. The\n    :py:obj:`~.CUdevprop` structure is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - :py:obj:`~.maxThreadsPerBlock` is the maximum number of threads per\n      block;\n\n    - :py:obj:`~.maxThreadsDim`[3] is the maximum sizes of each dimension\n      of a block;\n\n    - :py:obj:`~.maxGridSize`[3] is the maximum sizes of each dimension of\n      a grid;\n\n    - :py:obj:`~.sharedMemPerBlock` is the total amount of shared memory\n      available per block in bytes;\n\n    - :py:obj:`~.totalConstantMemory` is the total amount of constant\n      memory available on the device in bytes;\n\n    - :py:obj:`~.SIMDWidth` is the warp size;\n\n    - :py:obj:`~.memPitch` is the maximum pitch allowed by the memory copy\n      functions that involve memory regions allocated through\n      :py:obj:`~.cuMemAllocPitch()`;\n\n    - :py:obj:`~.regsPerBlock` is the total number of registers available\n      per block;\n\n    - :py:obj:`~.clockRate` is the clock frequency in kilohertz;\n\n    - :py:obj:`~.textureAlign` is the alignment requirement; texture base\n      addresses that are aligned to :py:obj:`~.textureAlign` bytes do not\n      need an offset applied to texture fetches.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        Device to get properties for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    prop : :py:obj:`~.CUdevprop`\n        Returned properties of device\n\n    See Also\n    --------\n    :py:obj:`~.cuDevi""ceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_37cuDeviceGetProperties = {"cuDeviceGetProperties", (PyCFunction)__pyx_pw_4cuda_4cuda_37cuDeviceGetProperties, METH_O, __pyx_doc_4cuda_4cuda_36cuDeviceGetProperties};
static PyObject *__pyx_pw_4cuda_4cuda_37cuDeviceGetProperties(PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetProperties (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_36cuDeviceGetProperties(__pyx_self, ((PyObject *)__pyx_v_dev));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_36cuDeviceGetProperties(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  struct __pyx_obj_4cuda_4cuda_CUdevprop *__pyx_v_prop = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__625)
  __Pyx_RefNannySetupContext("cuDeviceGetProperties", 0);
  __Pyx_TraceCall("cuDeviceGetProperties", __pyx_f[0], 12295, 0, __PYX_ERR(0, 12295, __pyx_L1_error));

  /* "cuda/cuda.pyx":12357
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12358
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12357
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12359
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12360
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12361
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12361, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12359
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12363
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12364
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef CUdevprop prop = CUdevprop()
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12364, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12366
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef CUdevprop prop = CUdevprop()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetProperties(prop._ptr, cdev)
 *     return (CUresult(err), prop)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevprop)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_prop = ((struct __pyx_obj_4cuda_4cuda_CUdevprop *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":12367
 * 
 *     cdef CUdevprop prop = CUdevprop()
 *     err = ccuda.cuDeviceGetProperties(prop._ptr, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), prop)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDeviceGetProperties(__pyx_v_prop->__pyx_base._ptr, __pyx_v_cdev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12367, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":12368
 *     cdef CUdevprop prop = CUdevprop()
 *     err = ccuda.cuDeviceGetProperties(prop._ptr, cdev)
 *     return (CUresult(err), prop)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_prop));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_prop));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_prop));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12295
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetProperties(dev):             # <<<<<<<<<<<<<<
 *     """ Returns properties for a selected device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetProperties", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XDECREF((PyObject *)__pyx_v_prop);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12371
 * 
 * @cython.embedsignature(True)
 * def cuDeviceComputeCapability(dev):             # <<<<<<<<<<<<<<
 *     """ Returns the compute capability of the device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_39cuDeviceComputeCapability(PyObject *__pyx_self, PyObject *__pyx_v_dev); /*proto*/
static char __pyx_doc_4cuda_4cuda_38cuDeviceComputeCapability[] = "cuDeviceComputeCapability(dev)\n Returns the compute capability of the device.\n\n    [Deprecated]\n\n    This function was deprecated as of CUDA 5.0 and its functionality\n    superceded by :py:obj:`~.cuDeviceGetAttribute()`.\n\n    Returns in `*major` and `*minor` the major and minor revision numbers\n    that define the compute capability of the device `dev`.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        Device handle\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    major : int\n        Major revision number\n    minor : int\n        Minor revision number\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_39cuDeviceComputeCapability = {"cuDeviceComputeCapability", (PyCFunction)__pyx_pw_4cuda_4cuda_39cuDeviceComputeCapability, METH_O, __pyx_doc_4cuda_4cuda_38cuDeviceComputeCapability};
static PyObject *__pyx_pw_4cuda_4cuda_39cuDeviceComputeCapability(PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceComputeCapability (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_38cuDeviceComputeCapability(__pyx_self, ((PyObject *)__pyx_v_dev));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_38cuDeviceComputeCapability(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  int __pyx_v_major;
  int __pyx_v_minor;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__626)
  __Pyx_RefNannySetupContext("cuDeviceComputeCapability", 0);
  __Pyx_TraceCall("cuDeviceComputeCapability", __pyx_f[0], 12371, 0, __PYX_ERR(0, 12371, __pyx_L1_error));

  /* "cuda/cuda.pyx":12401
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12402
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12401
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12403
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12404
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12405
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12405, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12403
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12407
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12408
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef int major = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12408, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12410
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef int major = 0             # <<<<<<<<<<<<<<
 *     cdef int minor = 0
 *     err = ccuda.cuDeviceComputeCapability(&major, &minor, cdev)
 */
  __pyx_v_major = 0;

  /* "cuda/cuda.pyx":12411
 * 
 *     cdef int major = 0
 *     cdef int minor = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceComputeCapability(&major, &minor, cdev)
 *     return (CUresult(err), major, minor)
 */
  __pyx_v_minor = 0;

  /* "cuda/cuda.pyx":12412
 *     cdef int major = 0
 *     cdef int minor = 0
 *     err = ccuda.cuDeviceComputeCapability(&major, &minor, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), major, minor)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDeviceComputeCapability((&__pyx_v_major), (&__pyx_v_minor), __pyx_v_cdev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12412, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":12413
 *     cdef int minor = 0
 *     err = ccuda.cuDeviceComputeCapability(&major, &minor, cdev)
 *     return (CUresult(err), major, minor)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_major); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_minor); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 12413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12371
 * 
 * @cython.embedsignature(True)
 * def cuDeviceComputeCapability(dev):             # <<<<<<<<<<<<<<
 *     """ Returns the compute capability of the device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceComputeCapability", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12416
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxRetain(dev):             # <<<<<<<<<<<<<<
 *     """ Retain the primary context on the GPU.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_41cuDevicePrimaryCtxRetain(PyObject *__pyx_self, PyObject *__pyx_v_dev); /*proto*/
static char __pyx_doc_4cuda_4cuda_40cuDevicePrimaryCtxRetain[] = "cuDevicePrimaryCtxRetain(dev)\n Retain the primary context on the GPU.\n\n    Retains the primary context on the device. Once the user successfully\n    retains the primary context, the primary context will be active and\n    available to the user until the user releases it with\n    :py:obj:`~.cuDevicePrimaryCtxRelease()` or resets it with\n    :py:obj:`~.cuDevicePrimaryCtxReset()`. Unlike :py:obj:`~.cuCtxCreate()`\n    the newly retained context is not pushed onto the stack.\n\n    Retaining the primary context for the first time will fail with\n    :py:obj:`~.CUDA_ERROR_UNKNOWN` if the compute mode of the device is\n    :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`. The function\n    :py:obj:`~.cuDeviceGetAttribute()` can be used with\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE` to determine the compute\n    mode of the device. The `nvidia-smi` tool can be used to set the\n    compute mode for devices. Documentation for `nvidia-smi` can be\n    obtained by passing a -h option to it.\n\n    Please note that the primary context always supports pinned\n    allocations. Other flags can be specified by\n    :py:obj:`~.cuDevicePrimaryCtxSetFlags()`.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        Device for which primary context is requested\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    pctx : :py:obj:`~.CUcontext`\n        Returned context handle of the new context\n\n    See Also\n    --------\n    :py:obj:`~.cuDevicePrimaryCtxRelease`, :py:obj:`~.cuDevicePrimaryCtxSetFlags`, :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:""obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_41cuDevicePrimaryCtxRetain = {"cuDevicePrimaryCtxRetain", (PyCFunction)__pyx_pw_4cuda_4cuda_41cuDevicePrimaryCtxRetain, METH_O, __pyx_doc_4cuda_4cuda_40cuDevicePrimaryCtxRetain};
static PyObject *__pyx_pw_4cuda_4cuda_41cuDevicePrimaryCtxRetain(PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDevicePrimaryCtxRetain (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_40cuDevicePrimaryCtxRetain(__pyx_self, ((PyObject *)__pyx_v_dev));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_40cuDevicePrimaryCtxRetain(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_pctx = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__627)
  __Pyx_RefNannySetupContext("cuDevicePrimaryCtxRetain", 0);
  __Pyx_TraceCall("cuDevicePrimaryCtxRetain", __pyx_f[0], 12416, 0, __PYX_ERR(0, 12416, __pyx_L1_error));

  /* "cuda/cuda.pyx":12456
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12457
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12456
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12458
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12459
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12460
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12460, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12458
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12462
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12463
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef CUcontext pctx = CUcontext()
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12463, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12465
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef CUcontext pctx = CUcontext()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDevicePrimaryCtxRetain(pctx._ptr, cdev)
 *     return (CUresult(err), pctx)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pctx = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":12466
 * 
 *     cdef CUcontext pctx = CUcontext()
 *     err = ccuda.cuDevicePrimaryCtxRetain(pctx._ptr, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pctx)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxRetain(__pyx_v_pctx->_ptr, __pyx_v_cdev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12466, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":12467
 *     cdef CUcontext pctx = CUcontext()
 *     err = ccuda.cuDevicePrimaryCtxRetain(pctx._ptr, cdev)
 *     return (CUresult(err), pctx)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pctx));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pctx));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pctx));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12416
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxRetain(dev):             # <<<<<<<<<<<<<<
 *     """ Retain the primary context on the GPU.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDevicePrimaryCtxRetain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XDECREF((PyObject *)__pyx_v_pctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12470
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxRelease(dev):             # <<<<<<<<<<<<<<
 *     """ Release the primary context on the GPU.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_43cuDevicePrimaryCtxRelease(PyObject *__pyx_self, PyObject *__pyx_v_dev); /*proto*/
static char __pyx_doc_4cuda_4cuda_42cuDevicePrimaryCtxRelease[] = "cuDevicePrimaryCtxRelease(dev)\n Release the primary context on the GPU.\n\n    Releases the primary context interop on the device. A retained context\n    should always be released once the user is done using it. The context\n    is automatically reset once the last reference to it is released. This\n    behavior is different when the primary context was retained by the CUDA\n    runtime from CUDA 4.0 and earlier. In this case, the primary context\n    remains always active.\n\n    Releasing a primary context that has not been previously retained will\n    fail with :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`.\n\n    Please note that unlike :py:obj:`~.cuCtxDestroy()` this method does not\n    pop the context from stack in any circumstances.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        Device which primary context is released\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`\n\n    See Also\n    --------\n    :py:obj:`~.cuDevicePrimaryCtxRetain`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_43cuDevicePrimaryCtxRelease = {"cuDevicePrimaryCtxRelease", (PyCFunction)__pyx_pw_4cuda_4cuda_43cuDevicePrimaryCtxRelease, METH_O, __pyx_doc_4cuda_4cuda_42cuDevicePrimaryCtxRelease};
static PyObject *__pyx_pw_4cuda_4cuda_43cuDevicePrimaryCtxRelease(PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDevicePrimaryCtxRelease (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_42cuDevicePrimaryCtxRelease(__pyx_self, ((PyObject *)__pyx_v_dev));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_42cuDevicePrimaryCtxRelease(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__628)
  __Pyx_RefNannySetupContext("cuDevicePrimaryCtxRelease", 0);
  __Pyx_TraceCall("cuDevicePrimaryCtxRelease", __pyx_f[0], 12470, 0, __PYX_ERR(0, 12470, __pyx_L1_error));

  /* "cuda/cuda.pyx":12501
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12502
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12501
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12503
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12504
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12505
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12505, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12503
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12507
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12508
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuDevicePrimaryCtxRelease(cdev)
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12508, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12510
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     err = ccuda.cuDevicePrimaryCtxRelease(cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxRelease(__pyx_v_cdev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12510, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":12511
 * 
 *     err = ccuda.cuDevicePrimaryCtxRelease(cdev)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12470
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxRelease(dev):             # <<<<<<<<<<<<<<
 *     """ Release the primary context on the GPU.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDevicePrimaryCtxRelease", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12514
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxSetFlags(dev, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Set flags for the primary context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_45cuDevicePrimaryCtxSetFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_44cuDevicePrimaryCtxSetFlags[] = "cuDevicePrimaryCtxSetFlags(dev, unsigned int flags)\n Set flags for the primary context.\n\n    Sets the flags for the primary context on the device overwriting\n    perviously set ones.\n\n    The three LSBs of the `flags` parameter can be used to control how the\n    OS thread, which owns the CUDA context at the time of an API call,\n    interacts with the OS scheduler when waiting for results from the GPU.\n    Only one of the scheduling flags can be set when creating a context.\n\n    - :py:obj:`~.CU_CTX_SCHED_SPIN`: Instruct CUDA to actively spin when\n      waiting for results from the GPU. This can decrease latency when\n      waiting for the GPU, but may lower the performance of CPU threads if\n      they are performing work in parallel with the CUDA thread.\n\n    - :py:obj:`~.CU_CTX_SCHED_YIELD`: Instruct CUDA to yield its thread\n      when waiting for results from the GPU. This can increase latency when\n      waiting for the GPU, but can increase the performance of CPU threads\n      performing work in parallel with the GPU.\n\n    - :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`: Instruct CUDA to block the\n      CPU thread on a synchronization primitive when waiting for the GPU to\n      finish work.\n\n    - :py:obj:`~.CU_CTX_BLOCKING_SYNC`: Instruct CUDA to block the CPU\n      thread on a synchronization primitive when waiting for the GPU to\n      finish work.   Deprecated: This flag was deprecated as of CUDA 4.0\n      and was replaced with :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`.\n\n    - :py:obj:`~.CU_CTX_SCHED_AUTO`: The default value if the `flags`\n      parameter is zero, uses a heuristic based on the number of active\n      CUDA contexts in the process `C` and the number of logical processors\n      in the system `P`. If `C` > `P`, then CUDA will yield to other OS\n      threads when waiting for the GPU (:py:obj:`~.CU_CTX_SCHED_YIELD`),\n      otherwise CUDA will not yield while waiting for results and actively\n      spin on the processor (:py:obj"":`~.CU_CTX_SCHED_SPIN`). Additionally,\n      on Tegra devices, :py:obj:`~.CU_CTX_SCHED_AUTO` uses a heuristic\n      based on the power profile of the platform and may choose\n      :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC` for low-powered devices.\n\n    - :py:obj:`~.CU_CTX_LMEM_RESIZE_TO_MAX`: Instruct CUDA to not reduce\n      local memory after resizing local memory for a kernel. This can\n      prevent thrashing by local memory allocations when launching many\n      kernels with high local memory usage at the cost of potentially\n      increased memory usage.   Deprecated: This flag is deprecated and the\n      behavior enabled by this flag is now the default and cannot be\n      disabled.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        Device for which the primary context flags are set\n    flags : unsigned int\n        New flags for the device\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuDevicePrimaryCtxRetain`, :py:obj:`~.cuDevicePrimaryCtxGetState`, :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cudaSetDeviceFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_45cuDevicePrimaryCtxSetFlags = {"cuDevicePrimaryCtxSetFlags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_45cuDevicePrimaryCtxSetFlags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_44cuDevicePrimaryCtxSetFlags};
static PyObject *__pyx_pw_4cuda_4cuda_45cuDevicePrimaryCtxSetFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dev = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDevicePrimaryCtxSetFlags (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dev,&__pyx_n_s_flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dev)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDevicePrimaryCtxSetFlags", 1, 2, 2, 1); __PYX_ERR(0, 12514, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuDevicePrimaryCtxSetFlags") < 0)) __PYX_ERR(0, 12514, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_dev = values[0];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 12514, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuDevicePrimaryCtxSetFlags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 12514, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDevicePrimaryCtxSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_44cuDevicePrimaryCtxSetFlags(__pyx_self, __pyx_v_dev, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_44cuDevicePrimaryCtxSetFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev, unsigned int __pyx_v_flags) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__629)
  __Pyx_RefNannySetupContext("cuDevicePrimaryCtxSetFlags", 0);
  __Pyx_TraceCall("cuDevicePrimaryCtxSetFlags", __pyx_f[0], 12514, 0, __PYX_ERR(0, 12514, __pyx_L1_error));

  /* "cuda/cuda.pyx":12580
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12581
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12580
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12582
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12583
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12584
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12584, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12582
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12586
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12587
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuDevicePrimaryCtxSetFlags(cdev, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12587, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12589
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     err = ccuda.cuDevicePrimaryCtxSetFlags(cdev, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxSetFlags(__pyx_v_cdev, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12589, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":12590
 * 
 *     err = ccuda.cuDevicePrimaryCtxSetFlags(cdev, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12514
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxSetFlags(dev, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Set flags for the primary context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDevicePrimaryCtxSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12593
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxGetState(dev):             # <<<<<<<<<<<<<<
 *     """ Get the state of the primary context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_47cuDevicePrimaryCtxGetState(PyObject *__pyx_self, PyObject *__pyx_v_dev); /*proto*/
static char __pyx_doc_4cuda_4cuda_46cuDevicePrimaryCtxGetState[] = "cuDevicePrimaryCtxGetState(dev)\n Get the state of the primary context.\n\n    Returns in `*flags` the flags for the primary context of `dev`, and in\n    `*active` whether it is active. See\n    :py:obj:`~.cuDevicePrimaryCtxSetFlags` for flag values.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        Device to get primary context flags for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n    flags : unsigned int\n        Pointer to store flags\n    active : int\n        Pointer to store context state; 0 = inactive, 1 = active\n\n    See Also\n    --------\n    :py:obj:`~.cuDevicePrimaryCtxSetFlags`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cudaGetDeviceFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_47cuDevicePrimaryCtxGetState = {"cuDevicePrimaryCtxGetState", (PyCFunction)__pyx_pw_4cuda_4cuda_47cuDevicePrimaryCtxGetState, METH_O, __pyx_doc_4cuda_4cuda_46cuDevicePrimaryCtxGetState};
static PyObject *__pyx_pw_4cuda_4cuda_47cuDevicePrimaryCtxGetState(PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDevicePrimaryCtxGetState (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_46cuDevicePrimaryCtxGetState(__pyx_self, ((PyObject *)__pyx_v_dev));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_46cuDevicePrimaryCtxGetState(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  unsigned int __pyx_v_flags;
  int __pyx_v_active;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__630)
  __Pyx_RefNannySetupContext("cuDevicePrimaryCtxGetState", 0);
  __Pyx_TraceCall("cuDevicePrimaryCtxGetState", __pyx_f[0], 12593, 0, __PYX_ERR(0, 12593, __pyx_L1_error));

  /* "cuda/cuda.pyx":12619
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12620
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12619
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12621
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12622
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12623
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12623, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12621
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12625
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12626
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef unsigned int flags = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12626, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12628
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef unsigned int flags = 0             # <<<<<<<<<<<<<<
 *     cdef int active = 0
 *     err = ccuda.cuDevicePrimaryCtxGetState(cdev, &flags, &active)
 */
  __pyx_v_flags = 0;

  /* "cuda/cuda.pyx":12629
 * 
 *     cdef unsigned int flags = 0
 *     cdef int active = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDevicePrimaryCtxGetState(cdev, &flags, &active)
 *     return (CUresult(err), flags, active)
 */
  __pyx_v_active = 0;

  /* "cuda/cuda.pyx":12630
 *     cdef unsigned int flags = 0
 *     cdef int active = 0
 *     err = ccuda.cuDevicePrimaryCtxGetState(cdev, &flags, &active)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), flags, active)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxGetState(__pyx_v_cdev, (&__pyx_v_flags), (&__pyx_v_active)); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12630, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":12631
 *     cdef int active = 0
 *     err = ccuda.cuDevicePrimaryCtxGetState(cdev, &flags, &active)
 *     return (CUresult(err), flags, active)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_active); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 12631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12593
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxGetState(dev):             # <<<<<<<<<<<<<<
 *     """ Get the state of the primary context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDevicePrimaryCtxGetState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12634
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxReset(dev):             # <<<<<<<<<<<<<<
 *     """ Destroy all allocations and reset all state on the primary context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_49cuDevicePrimaryCtxReset(PyObject *__pyx_self, PyObject *__pyx_v_dev); /*proto*/
static char __pyx_doc_4cuda_4cuda_48cuDevicePrimaryCtxReset[] = "cuDevicePrimaryCtxReset(dev)\n Destroy all allocations and reset all state on the primary context.\n\n    Explicitly destroys and cleans up all resources associated with the\n    current device in the current process.\n\n    Note that it is responsibility of the calling function to ensure that\n    no other module in the process is using the device any more. For that\n    reason it is recommended to use :py:obj:`~.cuDevicePrimaryCtxRelease()`\n    in most cases. However it is safe for other modules to call\n    :py:obj:`~.cuDevicePrimaryCtxRelease()` even after resetting the\n    device. Resetting the primary context does not release it, an\n    application that has retained the primary context should explicitly\n    release its usage.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        Device for which primary context is destroyed\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE`\n\n    See Also\n    --------\n    :py:obj:`~.cuDevicePrimaryCtxRetain`, :py:obj:`~.cuDevicePrimaryCtxRelease`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceReset`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_49cuDevicePrimaryCtxReset = {"cuDevicePrimaryCtxReset", (PyCFunction)__pyx_pw_4cuda_4cuda_49cuDevicePrimaryCtxReset, METH_O, __pyx_doc_4cuda_4cuda_48cuDevicePrimaryCtxReset};
static PyObject *__pyx_pw_4cuda_4cuda_49cuDevicePrimaryCtxReset(PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDevicePrimaryCtxReset (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_48cuDevicePrimaryCtxReset(__pyx_self, ((PyObject *)__pyx_v_dev));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_48cuDevicePrimaryCtxReset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__631)
  __Pyx_RefNannySetupContext("cuDevicePrimaryCtxReset", 0);
  __Pyx_TraceCall("cuDevicePrimaryCtxReset", __pyx_f[0], 12634, 0, __PYX_ERR(0, 12634, __pyx_L1_error));

  /* "cuda/cuda.pyx":12664
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12665
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12664
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12666
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12667
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12668
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12668, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12666
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12670
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12671
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuDevicePrimaryCtxReset(cdev)
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12671, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12673
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     err = ccuda.cuDevicePrimaryCtxReset(cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxReset(__pyx_v_cdev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12673, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":12674
 * 
 *     err = ccuda.cuDevicePrimaryCtxReset(cdev)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12634
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxReset(dev):             # <<<<<<<<<<<<<<
 *     """ Destroy all allocations and reset all state on the primary context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDevicePrimaryCtxReset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12677
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetExecAffinitySupport(typename not None : CUexecAffinityType, dev):             # <<<<<<<<<<<<<<
 *     """ Returns information about the execution affinity support of the device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_51cuDeviceGetExecAffinitySupport(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_50cuDeviceGetExecAffinitySupport[] = "cuDeviceGetExecAffinitySupport(typename: CUexecAffinityType, dev)\n Returns information about the execution affinity support of the device.\n\n    Returns in `*pi` whether execution affinity type `typename` is\n    supported by device `dev`. The supported types are:\n\n    - :py:obj:`~.CU_EXEC_AFFINITY_TYPE_SM_COUNT`: 1 if context with limited\n      SMs is supported by the device, or 0 if not;\n\n    Parameters\n    ----------\n    typename : :py:obj:`~.CUexecAffinityType`\n        Execution affinity type to query\n    dev : :py:obj:`~.CUdevice`\n        Device handle\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    pi : int\n        1 if the execution affinity type `typename` is supported by the\n        device, or 0 if not\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_51cuDeviceGetExecAffinitySupport = {"cuDeviceGetExecAffinitySupport", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_51cuDeviceGetExecAffinitySupport, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_50cuDeviceGetExecAffinitySupport};
static PyObject *__pyx_pw_4cuda_4cuda_51cuDeviceGetExecAffinitySupport(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_typename = 0;
  PyObject *__pyx_v_dev = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetExecAffinitySupport (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_typename,&__pyx_n_s_dev,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typename)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dev)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceGetExecAffinitySupport", 1, 2, 2, 1); __PYX_ERR(0, 12677, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuDeviceGetExecAffinitySupport") < 0)) __PYX_ERR(0, 12677, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_typename = values[0];
    __pyx_v_dev = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuDeviceGetExecAffinitySupport", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 12677, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetExecAffinitySupport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_typename) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "typename"); __PYX_ERR(0, 12677, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_50cuDeviceGetExecAffinitySupport(__pyx_self, __pyx_v_typename, __pyx_v_dev);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_50cuDeviceGetExecAffinitySupport(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_typename, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  int __pyx_v_pi;
  CUexecAffinityType __pyx_v_ctypename;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUexecAffinityType __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__632)
  __Pyx_RefNannySetupContext("cuDeviceGetExecAffinitySupport", 0);
  __Pyx_TraceCall("cuDeviceGetExecAffinitySupport", __pyx_f[0], 12677, 0, __PYX_ERR(0, 12677, __pyx_L1_error));

  /* "cuda/cuda.pyx":12706
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12707
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12706
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12708
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12709
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12710
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12710, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12708
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12712
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12713
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef int pi = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12713, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12715
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef int pi = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUexecAffinityType ctypename = typename.value
 *     err = ccuda.cuDeviceGetExecAffinitySupport(&pi, ctypename, cdev)
 */
  __pyx_v_pi = 0;

  /* "cuda/cuda.pyx":12716
 * 
 *     cdef int pi = 0
 *     cdef ccuda.CUexecAffinityType ctypename = typename.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetExecAffinitySupport(&pi, ctypename, cdev)
 *     return (CUresult(err), pi)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_typename, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUexecAffinityType_enum)__Pyx_PyInt_As_enum__CUexecAffinityType_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_ctypename = __pyx_t_6;

  /* "cuda/cuda.pyx":12717
 *     cdef int pi = 0
 *     cdef ccuda.CUexecAffinityType ctypename = typename.value
 *     err = ccuda.cuDeviceGetExecAffinitySupport(&pi, ctypename, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pi)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuDeviceGetExecAffinitySupport((&__pyx_v_pi), __pyx_v_ctypename, __pyx_v_cdev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12717, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":12718
 *     cdef ccuda.CUexecAffinityType ctypename = typename.value
 *     err = ccuda.cuDeviceGetExecAffinitySupport(&pi, ctypename, cdev)
 *     return (CUresult(err), pi)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 12718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 12718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12677
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetExecAffinitySupport(typename not None : CUexecAffinityType, dev):             # <<<<<<<<<<<<<<
 *     """ Returns information about the execution affinity support of the device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetExecAffinitySupport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12721
 * 
 * @cython.embedsignature(True)
 * def cuCtxCreate(unsigned int flags, dev):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_53cuCtxCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_52cuCtxCreate[] = "cuCtxCreate(unsigned int flags, dev)\n Create a CUDA context.\n\n    Creates a new CUDA context and associates it with the calling thread.\n    The `flags` parameter is described below. The context is created with a\n    usage count of 1 and the caller of :py:obj:`~.cuCtxCreate()` must call\n    :py:obj:`~.cuCtxDestroy()` or when done using the context. If a context\n    is already current to the thread, it is supplanted by the newly created\n    context and may be restored by a subsequent call to\n    :py:obj:`~.cuCtxPopCurrent()`.\n\n    The three LSBs of the `flags` parameter can be used to control how the\n    OS thread, which owns the CUDA context at the time of an API call,\n    interacts with the OS scheduler when waiting for results from the GPU.\n    Only one of the scheduling flags can be set when creating a context.\n\n    - :py:obj:`~.CU_CTX_SCHED_SPIN`: Instruct CUDA to actively spin when\n      waiting for results from the GPU. This can decrease latency when\n      waiting for the GPU, but may lower the performance of CPU threads if\n      they are performing work in parallel with the CUDA thread.\n\n    - :py:obj:`~.CU_CTX_SCHED_YIELD`: Instruct CUDA to yield its thread\n      when waiting for results from the GPU. This can increase latency when\n      waiting for the GPU, but can increase the performance of CPU threads\n      performing work in parallel with the GPU.\n\n    - :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`: Instruct CUDA to block the\n      CPU thread on a synchronization primitive when waiting for the GPU to\n      finish work.\n\n    - :py:obj:`~.CU_CTX_BLOCKING_SYNC`: Instruct CUDA to block the CPU\n      thread on a synchronization primitive when waiting for the GPU to\n      finish work.   Deprecated: This flag was deprecated as of CUDA 4.0\n      and was replaced with :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`.\n\n    - :py:obj:`~.CU_CTX_SCHED_AUTO`: The default value if the `flags`\n      parameter is zero, uses a heuristic based on the nu""mber of active\n      CUDA contexts in the process `C` and the number of logical processors\n      in the system `P`. If `C` > `P`, then CUDA will yield to other OS\n      threads when waiting for the GPU (:py:obj:`~.CU_CTX_SCHED_YIELD`),\n      otherwise CUDA will not yield while waiting for results and actively\n      spin on the processor (:py:obj:`~.CU_CTX_SCHED_SPIN`). Additionally,\n      on Tegra devices, :py:obj:`~.CU_CTX_SCHED_AUTO` uses a heuristic\n      based on the power profile of the platform and may choose\n      :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC` for low-powered devices.\n\n    - :py:obj:`~.CU_CTX_MAP_HOST`: Instruct CUDA to support mapped pinned\n      allocations. This flag must be set in order to allocate pinned host\n      memory that is accessible to the GPU.\n\n    - :py:obj:`~.CU_CTX_LMEM_RESIZE_TO_MAX`: Instruct CUDA to not reduce\n      local memory after resizing local memory for a kernel. This can\n      prevent thrashing by local memory allocations when launching many\n      kernels with high local memory usage at the cost of potentially\n      increased memory usage.   Deprecated: This flag is deprecated and the\n      behavior enabled by this flag is now the default and cannot be\n      disabled. Instead, the per-thread stack size can be controlled with\n      :py:obj:`~.cuCtxSetLimit()`.\n\n    Context creation will fail with :py:obj:`~.CUDA_ERROR_UNKNOWN` if the\n    compute mode of the device is :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`.\n    The function :py:obj:`~.cuDeviceGetAttribute()` can be used with\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE` to determine the compute\n    mode of the device. The `nvidia-smi` tool can be used to set the\n    compute mode for * devices. Documentation for `nvidia-smi` can be\n    obtained by passing a -h option to it.\n\n    Parameters\n    ----------\n    flags : unsigned int\n        Context creation flags\n    dev : :py:obj:`~.CUdevice`\n        Device to create context on\n\n    Return""s\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    pctx : :py:obj:`~.CUcontext`\n        Returned context handle of the new context\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`\n\n    Notes\n    -----\n    In most cases it is recommended to use :py:obj:`~.cuDevicePrimaryCtxRetain`.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_53cuCtxCreate = {"cuCtxCreate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_53cuCtxCreate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_52cuCtxCreate};
static PyObject *__pyx_pw_4cuda_4cuda_53cuCtxCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_flags;
  PyObject *__pyx_v_dev = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxCreate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flags_2,&__pyx_n_s_dev,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dev)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuCtxCreate", 1, 2, 2, 1); __PYX_ERR(0, 12721, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuCtxCreate") < 0)) __PYX_ERR(0, 12721, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 12721, __pyx_L3_error)
    __pyx_v_dev = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuCtxCreate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 12721, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuCtxCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_52cuCtxCreate(__pyx_self, __pyx_v_flags, __pyx_v_dev);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_52cuCtxCreate(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_pctx = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__633)
  __Pyx_RefNannySetupContext("cuCtxCreate", 0);
  __Pyx_TraceCall("cuCtxCreate", __pyx_f[0], 12721, 0, __PYX_ERR(0, 12721, __pyx_L1_error));

  /* "cuda/cuda.pyx":12811
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12812
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12811
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12813
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12814
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12815
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12815, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12813
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12817
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12818
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef CUcontext pctx = CUcontext()
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12818, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12820
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef CUcontext pctx = CUcontext()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxCreate(pctx._ptr, flags, cdev)
 *     return (CUresult(err), pctx)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pctx = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":12821
 * 
 *     cdef CUcontext pctx = CUcontext()
 *     err = ccuda.cuCtxCreate(pctx._ptr, flags, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pctx)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuCtxCreate(__pyx_v_pctx->_ptr, __pyx_v_flags, __pyx_v_cdev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12821, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":12822
 *     cdef CUcontext pctx = CUcontext()
 *     err = ccuda.cuCtxCreate(pctx._ptr, flags, cdev)
 *     return (CUresult(err), pctx)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pctx));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pctx));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pctx));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12721
 * 
 * @cython.embedsignature(True)
 * def cuCtxCreate(unsigned int flags, dev):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuCtxCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XDECREF((PyObject *)__pyx_v_pctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12825
 * 
 * @cython.embedsignature(True)
 * def cuCtxCreate_v3(paramsArray : List[CUexecAffinityParam], int numParams, unsigned int flags, dev):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context with execution affinity.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_55cuCtxCreate_v3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_54cuCtxCreate_v3[] = "cuCtxCreate_v3(paramsArray: List[CUexecAffinityParam], int numParams, unsigned int flags, dev)\n Create a CUDA context with execution affinity.\n\n    Creates a new CUDA context with execution affinity and associates it\n    with the calling thread. The `paramsArray` and `flags` parameter are\n    described below. The context is created with a usage count of 1 and the\n    caller of :py:obj:`~.cuCtxCreate()` must call\n    :py:obj:`~.cuCtxDestroy()` or when done using the context. If a context\n    is already current to the thread, it is supplanted by the newly created\n    context and may be restored by a subsequent call to\n    :py:obj:`~.cuCtxPopCurrent()`.\n\n    The type and the amount of execution resource the context can use is\n    limited by `paramsArray` and `numParams`. The `paramsArray` is an array\n    of `CUexecAffinityParam` and the `numParams` describes the size of the\n    array. If two `CUexecAffinityParam` in the array have the same type,\n    the latter execution affinity parameter overrides the former execution\n    affinity parameter. The supported execution affinity types are:\n\n    - :py:obj:`~.CU_EXEC_AFFINITY_TYPE_SM_COUNT` limits the portion of SMs\n      that the context can use. The portion of SMs is specified as the\n      number of SMs via `CUexecAffinitySmCount`. This limit will be\n      internally rounded up to the next hardware-supported amount. Hence,\n      it is imperative to query the actual execution affinity of the\n      context via `cuCtxGetExecAffinity` after context creation. Currently,\n      this attribute is only supported under Volta+ MPS.\n\n    The three LSBs of the `flags` parameter can be used to control how the\n    OS thread, which owns the CUDA context at the time of an API call,\n    interacts with the OS scheduler when waiting for results from the GPU.\n    Only one of the scheduling flags can be set when creating a context.\n\n    - :py:obj:`~.CU_CTX_SCHED_SPIN`: Instruct CUDA to actively spin when\n      w""aiting for results from the GPU. This can decrease latency when\n      waiting for the GPU, but may lower the performance of CPU threads if\n      they are performing work in parallel with the CUDA thread.\n\n    - :py:obj:`~.CU_CTX_SCHED_YIELD`: Instruct CUDA to yield its thread\n      when waiting for results from the GPU. This can increase latency when\n      waiting for the GPU, but can increase the performance of CPU threads\n      performing work in parallel with the GPU.\n\n    - :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`: Instruct CUDA to block the\n      CPU thread on a synchronization primitive when waiting for the GPU to\n      finish work.\n\n    - :py:obj:`~.CU_CTX_BLOCKING_SYNC`: Instruct CUDA to block the CPU\n      thread on a synchronization primitive when waiting for the GPU to\n      finish work.   Deprecated: This flag was deprecated as of CUDA 4.0\n      and was replaced with :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`.\n\n    - :py:obj:`~.CU_CTX_SCHED_AUTO`: The default value if the `flags`\n      parameter is zero, uses a heuristic based on the number of active\n      CUDA contexts in the process `C` and the number of logical processors\n      in the system `P`. If `C` > `P`, then CUDA will yield to other OS\n      threads when waiting for the GPU (:py:obj:`~.CU_CTX_SCHED_YIELD`),\n      otherwise CUDA will not yield while waiting for results and actively\n      spin on the processor (:py:obj:`~.CU_CTX_SCHED_SPIN`). Additionally,\n      on Tegra devices, :py:obj:`~.CU_CTX_SCHED_AUTO` uses a heuristic\n      based on the power profile of the platform and may choose\n      :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC` for low-powered devices.\n\n    - :py:obj:`~.CU_CTX_MAP_HOST`: Instruct CUDA to support mapped pinned\n      allocations. This flag must be set in order to allocate pinned host\n      memory that is accessible to the GPU.\n\n    - :py:obj:`~.CU_CTX_LMEM_RESIZE_TO_MAX`: Instruct CUDA to not reduce\n      local memory after resizing local memory for"" a kernel. This can\n      prevent thrashing by local memory allocations when launching many\n      kernels with high local memory usage at the cost of potentially\n      increased memory usage.   Deprecated: This flag is deprecated and the\n      behavior enabled by this flag is now the default and cannot be\n      disabled. Instead, the per-thread stack size can be controlled with\n      :py:obj:`~.cuCtxSetLimit()`.\n\n    Context creation will fail with :py:obj:`~.CUDA_ERROR_UNKNOWN` if the\n    compute mode of the device is :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`.\n    The function :py:obj:`~.cuDeviceGetAttribute()` can be used with\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE` to determine the compute\n    mode of the device. The `nvidia-smi` tool can be used to set the\n    compute mode for * devices. Documentation for `nvidia-smi` can be\n    obtained by passing a -h option to it.\n\n    Parameters\n    ----------\n    paramsArray : List[:py:obj:`~.CUexecAffinityParam`]\n        Execution affinity parameters\n    numParams : int\n        Number of execution affinity parameters\n    flags : unsigned int\n        Context creation flags\n    dev : :py:obj:`~.CUdevice`\n        Device to create context on\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    pctx : :py:obj:`~.CUcontext`\n        Returned context handle of the new context\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheCo""nfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.CUexecAffinityParam`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_55cuCtxCreate_v3 = {"cuCtxCreate_v3", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_55cuCtxCreate_v3, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_54cuCtxCreate_v3};
static PyObject *__pyx_pw_4cuda_4cuda_55cuCtxCreate_v3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_paramsArray = 0;
  int __pyx_v_numParams;
  unsigned int __pyx_v_flags;
  PyObject *__pyx_v_dev = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxCreate_v3 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_paramsArray_2,&__pyx_n_s_numParams,&__pyx_n_s_flags_2,&__pyx_n_s_dev,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paramsArray_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuCtxCreate_v3", 1, 4, 4, 1); __PYX_ERR(0, 12825, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuCtxCreate_v3", 1, 4, 4, 2); __PYX_ERR(0, 12825, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dev)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuCtxCreate_v3", 1, 4, 4, 3); __PYX_ERR(0, 12825, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuCtxCreate_v3") < 0)) __PYX_ERR(0, 12825, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_paramsArray = values[0];
    __pyx_v_numParams = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_numParams == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 12825, __pyx_L3_error)
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 12825, __pyx_L3_error)
    __pyx_v_dev = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuCtxCreate_v3", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 12825, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuCtxCreate_v3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_54cuCtxCreate_v3(__pyx_self, __pyx_v_paramsArray, __pyx_v_numParams, __pyx_v_flags, __pyx_v_dev);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_14cuCtxCreate_v3_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":12941
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUexecAffinityParam)) for _x in paramsArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUexecAffinityParam]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_14cuCtxCreate_v3_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_1_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 12941, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_14cuCtxCreate_v3_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuCtxCreate_v3_locals_genexpr, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 12941, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuCtxCreate_v3.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_14cuCtxCreate_v3_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 12941, 0, __PYX_ERR(0, 12941, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 12941, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray)) { __Pyx_RaiseClosureNameError("paramsArray"); __PYX_ERR(0, 12941, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12941, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 12941, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12941, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 12941, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12941, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 12941, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUexecAffinityParam); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12825
 * 
 * @cython.embedsignature(True)
 * def cuCtxCreate_v3(paramsArray : List[CUexecAffinityParam], int numParams, unsigned int flags, dev):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context with execution affinity.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_54cuCtxCreate_v3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_paramsArray, int __pyx_v_numParams, unsigned int __pyx_v_flags, PyObject *__pyx_v_dev) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *__pyx_cur_scope;
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_pctx = 0;
  CUexecAffinityParam *__pyx_v_cparamsArray;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_14cuCtxCreate_v3_2generator = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct CUexecAffinityParam_st *__pyx_t_10;
  CUresult __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__634)
  __Pyx_RefNannySetupContext("cuCtxCreate_v3", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3(__pyx_ptype_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 12825, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuCtxCreate_v3", __pyx_f[0], 12825, 0, __PYX_ERR(0, 12825, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_paramsArray = __pyx_v_paramsArray;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_paramsArray);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_paramsArray);

  /* "cuda/cuda.pyx":12931
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12932
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":12931
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12933
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":12934
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":12935
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12935, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":12933
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":12937
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":12938
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 12938, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":12940
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUexecAffinityParam)) for _x in paramsArray):
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUexecAffinityParam]")
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_paramsArray == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_paramsArray);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_paramsArray;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_paramsArray);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_paramsArray, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":12941
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUexecAffinityParam)) for _x in paramsArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUexecAffinityParam]")
 * 
 */
  __pyx_t_5 = __pyx_pf_4cuda_4cuda_14cuCtxCreate_v3_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 12941, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":12942
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUexecAffinityParam)) for _x in paramsArray):
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUexecAffinityParam]")             # <<<<<<<<<<<<<<
 * 
 *     cdef CUcontext pctx = CUcontext()
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__635, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 12942, __pyx_L1_error)

    /* "cuda/cuda.pyx":12941
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUexecAffinityParam)) for _x in paramsArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUexecAffinityParam]")
 * 
 */
  }

  /* "cuda/cuda.pyx":12944
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUexecAffinityParam]")
 * 
 *     cdef CUcontext pctx = CUcontext()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUexecAffinityParam* cparamsArray = NULL
 *     if len(paramsArray) > 0:
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_pctx = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":12945
 * 
 *     cdef CUcontext pctx = CUcontext()
 *     cdef ccuda.CUexecAffinityParam* cparamsArray = NULL             # <<<<<<<<<<<<<<
 *     if len(paramsArray) > 0:
 *         cparamsArray = <ccuda.CUexecAffinityParam*> calloc(len(paramsArray), sizeof(ccuda.CUexecAffinityParam))
 */
  __pyx_v_cparamsArray = NULL;

  /* "cuda/cuda.pyx":12946
 *     cdef CUcontext pctx = CUcontext()
 *     cdef ccuda.CUexecAffinityParam* cparamsArray = NULL
 *     if len(paramsArray) > 0:             # <<<<<<<<<<<<<<
 *         cparamsArray = <ccuda.CUexecAffinityParam*> calloc(len(paramsArray), sizeof(ccuda.CUexecAffinityParam))
 *         if cparamsArray is NULL:
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_paramsArray;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 12946, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12947
 *     cdef ccuda.CUexecAffinityParam* cparamsArray = NULL
 *     if len(paramsArray) > 0:
 *         cparamsArray = <ccuda.CUexecAffinityParam*> calloc(len(paramsArray), sizeof(ccuda.CUexecAffinityParam))             # <<<<<<<<<<<<<<
 *         if cparamsArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUexecAffinityParam)))
 */
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_paramsArray;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 12947, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_cparamsArray = ((CUexecAffinityParam *)calloc(__pyx_t_6, (sizeof(CUexecAffinityParam))));

    /* "cuda/cuda.pyx":12948
 *     if len(paramsArray) > 0:
 *         cparamsArray = <ccuda.CUexecAffinityParam*> calloc(len(paramsArray), sizeof(ccuda.CUexecAffinityParam))
 *         if cparamsArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUexecAffinityParam)))
 *         for idx in range(len(paramsArray)):
 */
    __pyx_t_2 = ((__pyx_v_cparamsArray == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":12949
 *         cparamsArray = <ccuda.CUexecAffinityParam*> calloc(len(paramsArray), sizeof(ccuda.CUexecAffinityParam))
 *         if cparamsArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUexecAffinityParam)))             # <<<<<<<<<<<<<<
 *         for idx in range(len(paramsArray)):
 *             memcpy(&cparamsArray[idx], (<CUexecAffinityParam>paramsArray[idx])._ptr, sizeof(ccuda.CUexecAffinityParam))
 */
      __pyx_t_3 = __pyx_cur_scope->__pyx_v_paramsArray;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 12949, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(CUexecAffinityParam))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 12949, __pyx_L1_error)

      /* "cuda/cuda.pyx":12948
 *     if len(paramsArray) > 0:
 *         cparamsArray = <ccuda.CUexecAffinityParam*> calloc(len(paramsArray), sizeof(ccuda.CUexecAffinityParam))
 *         if cparamsArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUexecAffinityParam)))
 *         for idx in range(len(paramsArray)):
 */
    }

    /* "cuda/cuda.pyx":12950
 *         if cparamsArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUexecAffinityParam)))
 *         for idx in range(len(paramsArray)):             # <<<<<<<<<<<<<<
 *             memcpy(&cparamsArray[idx], (<CUexecAffinityParam>paramsArray[idx])._ptr, sizeof(ccuda.CUexecAffinityParam))
 * 
 */
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramsArray;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 12950, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = __pyx_t_6;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_idx = __pyx_t_9;

      /* "cuda/cuda.pyx":12951
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUexecAffinityParam)))
 *         for idx in range(len(paramsArray)):
 *             memcpy(&cparamsArray[idx], (<CUexecAffinityParam>paramsArray[idx])._ptr, sizeof(ccuda.CUexecAffinityParam))             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuCtxCreate_v3(pctx._ptr, (<CUexecAffinityParam>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numParams, flags, cdev)
 */
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_paramsArray, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12951, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      (void)(memcpy((&(__pyx_v_cparamsArray[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam *)__pyx_t_7)->__pyx_base._ptr, (sizeof(CUexecAffinityParam))));
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }

    /* "cuda/cuda.pyx":12946
 *     cdef CUcontext pctx = CUcontext()
 *     cdef ccuda.CUexecAffinityParam* cparamsArray = NULL
 *     if len(paramsArray) > 0:             # <<<<<<<<<<<<<<
 *         cparamsArray = <ccuda.CUexecAffinityParam*> calloc(len(paramsArray), sizeof(ccuda.CUexecAffinityParam))
 *         if cparamsArray is NULL:
 */
  }

  /* "cuda/cuda.pyx":12953
 *             memcpy(&cparamsArray[idx], (<CUexecAffinityParam>paramsArray[idx])._ptr, sizeof(ccuda.CUexecAffinityParam))
 * 
 *     err = ccuda.cuCtxCreate_v3(pctx._ptr, (<CUexecAffinityParam>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numParams, flags, cdev)             # <<<<<<<<<<<<<<
 *     if cparamsArray is not NULL:
 *         free(cparamsArray)
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramsArray;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 12953, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_paramsArray, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam *)__pyx_t_7)->__pyx_base._ptr;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cparamsArray;
  }
  __pyx_t_11 = __pyx_f_4cuda_5ccuda_cuCtxCreate_v3(__pyx_v_pctx->_ptr, __pyx_t_10, __pyx_v_numParams, __pyx_v_flags, __pyx_v_cdev); if (unlikely(__pyx_t_11 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 12953, __pyx_L1_error)
  __pyx_v_err = __pyx_t_11;

  /* "cuda/cuda.pyx":12954
 * 
 *     err = ccuda.cuCtxCreate_v3(pctx._ptr, (<CUexecAffinityParam>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numParams, flags, cdev)
 *     if cparamsArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cparamsArray)
 *     return (CUresult(err), pctx)
 */
  __pyx_t_2 = ((__pyx_v_cparamsArray != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":12955
 *     err = ccuda.cuCtxCreate_v3(pctx._ptr, (<CUexecAffinityParam>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numParams, flags, cdev)
 *     if cparamsArray is not NULL:
 *         free(cparamsArray)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pctx)
 * 
 */
    free(__pyx_v_cparamsArray);

    /* "cuda/cuda.pyx":12954
 * 
 *     err = ccuda.cuCtxCreate_v3(pctx._ptr, (<CUexecAffinityParam>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numParams, flags, cdev)
 *     if cparamsArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cparamsArray)
 *     return (CUresult(err), pctx)
 */
  }

  /* "cuda/cuda.pyx":12956
 *     if cparamsArray is not NULL:
 *         free(cparamsArray)
 *     return (CUresult(err), pctx)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_7 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 12956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_v_pctx));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pctx));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pctx));
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12825
 * 
 * @cython.embedsignature(True)
 * def cuCtxCreate_v3(paramsArray : List[CUexecAffinityParam], int numParams, unsigned int flags, dev):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context with execution affinity.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuCtxCreate_v3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XDECREF((PyObject *)__pyx_v_pctx);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_14cuCtxCreate_v3_2generator);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":12959
 * 
 * @cython.embedsignature(True)
 * def cuCtxDestroy(ctx):             # <<<<<<<<<<<<<<
 *     """ Destroy a CUDA context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_57cuCtxDestroy(PyObject *__pyx_self, PyObject *__pyx_v_ctx); /*proto*/
static char __pyx_doc_4cuda_4cuda_56cuCtxDestroy[] = "cuCtxDestroy(ctx)\n Destroy a CUDA context.\n\n    Destroys the CUDA context specified by `ctx`. The context `ctx` will be\n    destroyed regardless of how many threads it is current to. It is the\n    responsibility of the calling function to ensure that no API call\n    issues using `ctx` while :py:obj:`~.cuCtxDestroy()` is executing.\n\n    Destroys and cleans up all resources associated with the context. It is\n    the caller's responsibility to ensure that the context or its resources\n    are not accessed or passed in subsequent API calls and doing so will\n    result in undefined behavior. These resources include CUDA types such\n    as :py:obj:`~.CUmodule`, :py:obj:`~.CUfunction`, :py:obj:`~.CUstream`,\n    :py:obj:`~.CUevent`, :py:obj:`~.CUarray`, :py:obj:`~.CUmipmappedArray`,\n    :py:obj:`~.CUtexObject`, :py:obj:`~.CUsurfObject`,\n    :py:obj:`~.CUtexref`, :py:obj:`~.CUsurfref`,\n    :py:obj:`~.CUgraphicsResource`, :py:obj:`~.CUlinkState`,\n    :py:obj:`~.CUexternalMemory` and :py:obj:`~.CUexternalSemaphore`.\n\n    If `ctx` is current to the calling thread then `ctx` will also be\n    popped from the current thread's context stack (as though\n    :py:obj:`~.cuCtxPopCurrent()` were called). If `ctx` is current to\n    other threads, then `ctx` will remain current to those threads, and\n    attempting to access `ctx` from those threads will result in the error\n    :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED`.\n\n    Parameters\n    ----------\n    ctx : :py:obj:`~.CUcontext`\n        Context to destroy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurr""ent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_57cuCtxDestroy = {"cuCtxDestroy", (PyCFunction)__pyx_pw_4cuda_4cuda_57cuCtxDestroy, METH_O, __pyx_doc_4cuda_4cuda_56cuCtxDestroy};
static PyObject *__pyx_pw_4cuda_4cuda_57cuCtxDestroy(PyObject *__pyx_self, PyObject *__pyx_v_ctx) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_56cuCtxDestroy(__pyx_self, ((PyObject *)__pyx_v_ctx));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_56cuCtxDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ctx) {
  CUcontext __pyx_v_cctx;
  PyObject *__pyx_v_pctx = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__636)
  __Pyx_RefNannySetupContext("cuCtxDestroy", 0);
  __Pyx_TraceCall("cuCtxDestroy", __pyx_f[0], 12959, 0, __PYX_ERR(0, 12959, __pyx_L1_error));

  /* "cuda/cuda.pyx":13000
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_ctx == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":13001
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 */
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":13000
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13002
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ctx, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":13003
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pctx = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":13004
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 *     else:
 *         pctx = int(CUcontext(ctx))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13004, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":13002
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13006
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 *         pctx = int(CUcontext(ctx))             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pctx = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":13007
 *     else:
 *         pctx = int(CUcontext(ctx))
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuCtxDestroy(cctx)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13007, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":13009
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 *     err = ccuda.cuCtxDestroy(cctx)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuCtxDestroy(__pyx_v_cctx); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13009, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":13010
 * 
 *     err = ccuda.cuCtxDestroy(cctx)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":12959
 * 
 * @cython.embedsignature(True)
 * def cuCtxDestroy(ctx):             # <<<<<<<<<<<<<<
 *     """ Destroy a CUDA context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuCtxDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13013
 * 
 * @cython.embedsignature(True)
 * def cuCtxPushCurrent(ctx):             # <<<<<<<<<<<<<<
 *     """ Pushes a context on the current CPU thread.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_59cuCtxPushCurrent(PyObject *__pyx_self, PyObject *__pyx_v_ctx); /*proto*/
static char __pyx_doc_4cuda_4cuda_58cuCtxPushCurrent[] = "cuCtxPushCurrent(ctx)\n Pushes a context on the current CPU thread.\n\n    Pushes the given context `ctx` onto the CPU thread's stack of current\n    contexts. The specified context becomes the CPU thread's current\n    context, so all CUDA functions that operate on the current context are\n    affected.\n\n    The previous current context may be made current again by calling\n    :py:obj:`~.cuCtxDestroy()` or :py:obj:`~.cuCtxPopCurrent()`.\n\n    Parameters\n    ----------\n    ctx : :py:obj:`~.CUcontext`\n        Context to push\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_59cuCtxPushCurrent = {"cuCtxPushCurrent", (PyCFunction)__pyx_pw_4cuda_4cuda_59cuCtxPushCurrent, METH_O, __pyx_doc_4cuda_4cuda_58cuCtxPushCurrent};
static PyObject *__pyx_pw_4cuda_4cuda_59cuCtxPushCurrent(PyObject *__pyx_self, PyObject *__pyx_v_ctx) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxPushCurrent (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_58cuCtxPushCurrent(__pyx_self, ((PyObject *)__pyx_v_ctx));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_58cuCtxPushCurrent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ctx) {
  CUcontext __pyx_v_cctx;
  PyObject *__pyx_v_pctx = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__637)
  __Pyx_RefNannySetupContext("cuCtxPushCurrent", 0);
  __Pyx_TraceCall("cuCtxPushCurrent", __pyx_f[0], 13013, 0, __PYX_ERR(0, 13013, __pyx_L1_error));

  /* "cuda/cuda.pyx":13039
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_ctx == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":13040
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 */
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":13039
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13041
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ctx, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":13042
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pctx = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":13043
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 *     else:
 *         pctx = int(CUcontext(ctx))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13043, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":13041
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13045
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 *         pctx = int(CUcontext(ctx))             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pctx = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":13046
 *     else:
 *         pctx = int(CUcontext(ctx))
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuCtxPushCurrent(cctx)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13046, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":13048
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 *     err = ccuda.cuCtxPushCurrent(cctx)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuCtxPushCurrent(__pyx_v_cctx); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13048, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":13049
 * 
 *     err = ccuda.cuCtxPushCurrent(cctx)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13013
 * 
 * @cython.embedsignature(True)
 * def cuCtxPushCurrent(ctx):             # <<<<<<<<<<<<<<
 *     """ Pushes a context on the current CPU thread.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuCtxPushCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13052
 * 
 * @cython.embedsignature(True)
 * def cuCtxPopCurrent():             # <<<<<<<<<<<<<<
 *     """ Pops the current CUDA context from the current CPU thread.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_61cuCtxPopCurrent(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_60cuCtxPopCurrent[] = "cuCtxPopCurrent()\n Pops the current CUDA context from the current CPU thread.\n\n    Pops the current CUDA context from the CPU thread and passes back the\n    old context handle in `*pctx`. That context may then be made current to\n    a different CPU thread by calling :py:obj:`~.cuCtxPushCurrent()`.\n\n    If a context was current to the CPU thread before\n    :py:obj:`~.cuCtxCreate()` or :py:obj:`~.cuCtxPushCurrent()` was called,\n    this function makes that context current to the CPU thread again.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`\n    pctx : :py:obj:`~.CUcontext`\n        Returned popped context handle\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_61cuCtxPopCurrent = {"cuCtxPopCurrent", (PyCFunction)__pyx_pw_4cuda_4cuda_61cuCtxPopCurrent, METH_NOARGS, __pyx_doc_4cuda_4cuda_60cuCtxPopCurrent};
static PyObject *__pyx_pw_4cuda_4cuda_61cuCtxPopCurrent(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxPopCurrent (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_60cuCtxPopCurrent(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_60cuCtxPopCurrent(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_pctx = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__638)
  __Pyx_RefNannySetupContext("cuCtxPopCurrent", 0);
  __Pyx_TraceCall("cuCtxPopCurrent", __pyx_f[0], 13052, 0, __PYX_ERR(0, 13052, __pyx_L1_error));

  /* "cuda/cuda.pyx":13074
 *     :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`
 *     """
 *     cdef CUcontext pctx = CUcontext()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxPopCurrent(pctx._ptr)
 *     return (CUresult(err), pctx)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pctx = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13075
 *     """
 *     cdef CUcontext pctx = CUcontext()
 *     err = ccuda.cuCtxPopCurrent(pctx._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pctx)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuCtxPopCurrent(__pyx_v_pctx->_ptr); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13075, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":13076
 *     cdef CUcontext pctx = CUcontext()
 *     err = ccuda.cuCtxPopCurrent(pctx._ptr)
 *     return (CUresult(err), pctx)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pctx));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pctx));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pctx));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13052
 * 
 * @cython.embedsignature(True)
 * def cuCtxPopCurrent():             # <<<<<<<<<<<<<<
 *     """ Pops the current CUDA context from the current CPU thread.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuCtxPopCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13079
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetCurrent(ctx):             # <<<<<<<<<<<<<<
 *     """ Binds the specified CUDA context to the calling CPU thread.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_63cuCtxSetCurrent(PyObject *__pyx_self, PyObject *__pyx_v_ctx); /*proto*/
static char __pyx_doc_4cuda_4cuda_62cuCtxSetCurrent[] = "cuCtxSetCurrent(ctx)\n Binds the specified CUDA context to the calling CPU thread.\n\n    Binds the specified CUDA context to the calling CPU thread. If `ctx` is\n    NULL then the CUDA context previously bound to the calling CPU thread\n    is unbound and :py:obj:`~.CUDA_SUCCESS` is returned.\n\n    If there exists a CUDA context stack on the calling CPU thread, this\n    will replace the top of that stack with `ctx`. If `ctx` is NULL then\n    this will be equivalent to popping the top of the calling CPU thread's\n    CUDA context stack (or a no-op if the calling CPU thread's CUDA context\n    stack is empty).\n\n    Parameters\n    ----------\n    ctx : :py:obj:`~.CUcontext`\n        Context to bind to the calling CPU thread\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxGetCurrent`, :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cudaSetDevice`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_63cuCtxSetCurrent = {"cuCtxSetCurrent", (PyCFunction)__pyx_pw_4cuda_4cuda_63cuCtxSetCurrent, METH_O, __pyx_doc_4cuda_4cuda_62cuCtxSetCurrent};
static PyObject *__pyx_pw_4cuda_4cuda_63cuCtxSetCurrent(PyObject *__pyx_self, PyObject *__pyx_v_ctx) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxSetCurrent (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_62cuCtxSetCurrent(__pyx_self, ((PyObject *)__pyx_v_ctx));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_62cuCtxSetCurrent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ctx) {
  CUcontext __pyx_v_cctx;
  PyObject *__pyx_v_pctx = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__639)
  __Pyx_RefNannySetupContext("cuCtxSetCurrent", 0);
  __Pyx_TraceCall("cuCtxSetCurrent", __pyx_f[0], 13079, 0, __PYX_ERR(0, 13079, __pyx_L1_error));

  /* "cuda/cuda.pyx":13107
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_ctx == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":13108
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 */
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":13107
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13109
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ctx, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":13110
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pctx = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":13111
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 *     else:
 *         pctx = int(CUcontext(ctx))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13111, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":13109
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13113
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 *         pctx = int(CUcontext(ctx))             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pctx = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":13114
 *     else:
 *         pctx = int(CUcontext(ctx))
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuCtxSetCurrent(cctx)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13114, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":13116
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 *     err = ccuda.cuCtxSetCurrent(cctx)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuCtxSetCurrent(__pyx_v_cctx); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13116, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":13117
 * 
 *     err = ccuda.cuCtxSetCurrent(cctx)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13079
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetCurrent(ctx):             # <<<<<<<<<<<<<<
 *     """ Binds the specified CUDA context to the calling CPU thread.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuCtxSetCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13120
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetCurrent():             # <<<<<<<<<<<<<<
 *     """ Returns the CUDA context bound to the calling CPU thread.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_65cuCtxGetCurrent(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_64cuCtxGetCurrent[] = "cuCtxGetCurrent()\n Returns the CUDA context bound to the calling CPU thread.\n\n    Returns in `*pctx` the CUDA context bound to the calling CPU thread. If\n    no context is bound to the calling CPU thread then `*pctx` is set to\n    NULL and :py:obj:`~.CUDA_SUCCESS` is returned.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`,\n    pctx : :py:obj:`~.CUcontext`\n        Returned context handle\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxSetCurrent`, :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cudaGetDevice`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_65cuCtxGetCurrent = {"cuCtxGetCurrent", (PyCFunction)__pyx_pw_4cuda_4cuda_65cuCtxGetCurrent, METH_NOARGS, __pyx_doc_4cuda_4cuda_64cuCtxGetCurrent};
static PyObject *__pyx_pw_4cuda_4cuda_65cuCtxGetCurrent(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxGetCurrent (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_64cuCtxGetCurrent(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_64cuCtxGetCurrent(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_pctx = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__640)
  __Pyx_RefNannySetupContext("cuCtxGetCurrent", 0);
  __Pyx_TraceCall("cuCtxGetCurrent", __pyx_f[0], 13120, 0, __PYX_ERR(0, 13120, __pyx_L1_error));

  /* "cuda/cuda.pyx":13138
 *     :py:obj:`~.cuCtxSetCurrent`, :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cudaGetDevice`
 *     """
 *     cdef CUcontext pctx = CUcontext()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxGetCurrent(pctx._ptr)
 *     return (CUresult(err), pctx)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pctx = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13139
 *     """
 *     cdef CUcontext pctx = CUcontext()
 *     err = ccuda.cuCtxGetCurrent(pctx._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pctx)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuCtxGetCurrent(__pyx_v_pctx->_ptr); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13139, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":13140
 *     cdef CUcontext pctx = CUcontext()
 *     err = ccuda.cuCtxGetCurrent(pctx._ptr)
 *     return (CUresult(err), pctx)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pctx));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pctx));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pctx));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13120
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetCurrent():             # <<<<<<<<<<<<<<
 *     """ Returns the CUDA context bound to the calling CPU thread.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuCtxGetCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13143
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetDevice():             # <<<<<<<<<<<<<<
 *     """ Returns the device ID for the current context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_67cuCtxGetDevice(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_66cuCtxGetDevice[] = "cuCtxGetDevice()\n Returns the device ID for the current context.\n\n    Returns in `*device` the ordinal of the current context's device.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n    device : :py:obj:`~.CUdevice`\n        Returned device ID for the current context\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaGetDevice`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_67cuCtxGetDevice = {"cuCtxGetDevice", (PyCFunction)__pyx_pw_4cuda_4cuda_67cuCtxGetDevice, METH_NOARGS, __pyx_doc_4cuda_4cuda_66cuCtxGetDevice};
static PyObject *__pyx_pw_4cuda_4cuda_67cuCtxGetDevice(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxGetDevice (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_66cuCtxGetDevice(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_66cuCtxGetDevice(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_device = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__641)
  __Pyx_RefNannySetupContext("cuCtxGetDevice", 0);
  __Pyx_TraceCall("cuCtxGetDevice", __pyx_f[0], 13143, 0, __PYX_ERR(0, 13143, __pyx_L1_error));

  /* "cuda/cuda.pyx":13159
 *     :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaGetDevice`
 *     """
 *     cdef CUdevice device = CUdevice()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxGetDevice(device._ptr)
 *     return (CUresult(err), device)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_device = ((struct __pyx_obj_4cuda_4cuda_CUdevice *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13160
 *     """
 *     cdef CUdevice device = CUdevice()
 *     err = ccuda.cuCtxGetDevice(device._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), device)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuCtxGetDevice(__pyx_v_device->_ptr); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13160, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":13161
 *     cdef CUdevice device = CUdevice()
 *     err = ccuda.cuCtxGetDevice(device._ptr)
 *     return (CUresult(err), device)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_device));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_device));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_device));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13143
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetDevice():             # <<<<<<<<<<<<<<
 *     """ Returns the device ID for the current context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuCtxGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_device);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13164
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetFlags():             # <<<<<<<<<<<<<<
 *     """ Returns the flags for the current context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_69cuCtxGetFlags(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_68cuCtxGetFlags[] = "cuCtxGetFlags()\n Returns the flags for the current context.\n\n    Returns in `*flags` the flags of the current context. See\n    :py:obj:`~.cuCtxCreate` for flag values.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n    flags : unsigned int\n        Pointer to store flags of current context\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetCurrent`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxGetSharedMemConfig`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cudaGetDeviceFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_69cuCtxGetFlags = {"cuCtxGetFlags", (PyCFunction)__pyx_pw_4cuda_4cuda_69cuCtxGetFlags, METH_NOARGS, __pyx_doc_4cuda_4cuda_68cuCtxGetFlags};
static PyObject *__pyx_pw_4cuda_4cuda_69cuCtxGetFlags(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxGetFlags (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_68cuCtxGetFlags(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_68cuCtxGetFlags(CYTHON_UNUSED PyObject *__pyx_self) {
  unsigned int __pyx_v_flags;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__642)
  __Pyx_RefNannySetupContext("cuCtxGetFlags", 0);
  __Pyx_TraceCall("cuCtxGetFlags", __pyx_f[0], 13164, 0, __PYX_ERR(0, 13164, __pyx_L1_error));

  /* "cuda/cuda.pyx":13181
 *     :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetCurrent`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxGetSharedMemConfig`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cudaGetDeviceFlags`
 *     """
 *     cdef unsigned int flags = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxGetFlags(&flags)
 *     return (CUresult(err), flags)
 */
  __pyx_v_flags = 0;

  /* "cuda/cuda.pyx":13182
 *     """
 *     cdef unsigned int flags = 0
 *     err = ccuda.cuCtxGetFlags(&flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), flags)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuCtxGetFlags((&__pyx_v_flags)); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13182, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":13183
 *     cdef unsigned int flags = 0
 *     err = ccuda.cuCtxGetFlags(&flags)
 *     return (CUresult(err), flags)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13164
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetFlags():             # <<<<<<<<<<<<<<
 *     """ Returns the flags for the current context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuCtxGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13186
 * 
 * @cython.embedsignature(True)
 * def cuCtxSynchronize():             # <<<<<<<<<<<<<<
 *     """ Block for a context's tasks to complete.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_71cuCtxSynchronize(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_70cuCtxSynchronize[] = "cuCtxSynchronize()\n Block for a context's tasks to complete.\n\n    Blocks until the device has completed all preceding requested tasks.\n    :py:obj:`~.cuCtxSynchronize()` returns an error if one of the preceding\n    tasks failed. If the context was created with the\n    :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC` flag, the CPU thread will block\n    until the GPU context has finished its work.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cudaDeviceSynchronize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_71cuCtxSynchronize = {"cuCtxSynchronize", (PyCFunction)__pyx_pw_4cuda_4cuda_71cuCtxSynchronize, METH_NOARGS, __pyx_doc_4cuda_4cuda_70cuCtxSynchronize};
static PyObject *__pyx_pw_4cuda_4cuda_71cuCtxSynchronize(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxSynchronize (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_70cuCtxSynchronize(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_70cuCtxSynchronize(CYTHON_UNUSED PyObject *__pyx_self) {
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__643)
  __Pyx_RefNannySetupContext("cuCtxSynchronize", 0);
  __Pyx_TraceCall("cuCtxSynchronize", __pyx_f[0], 13186, 0, __PYX_ERR(0, 13186, __pyx_L1_error));

  /* "cuda/cuda.pyx":13204
 *     :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cudaDeviceSynchronize`
 *     """
 *     err = ccuda.cuCtxSynchronize()             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuCtxSynchronize(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13204, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":13205
 *     """
 *     err = ccuda.cuCtxSynchronize()
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13186
 * 
 * @cython.embedsignature(True)
 * def cuCtxSynchronize():             # <<<<<<<<<<<<<<
 *     """ Block for a context's tasks to complete.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuCtxSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13208
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetLimit(limit not None : CUlimit, size_t value):             # <<<<<<<<<<<<<<
 *     """ Set resource limits.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_73cuCtxSetLimit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_72cuCtxSetLimit[] = "cuCtxSetLimit(limit: CUlimit, size_t value)\n Set resource limits.\n\n    Setting `limit` to `value` is a request by the application to update\n    the current limit maintained by the context. The driver is free to\n    modify the requested value to meet h/w requirements (this could be\n    clamping to minimum or maximum values, rounding up to nearest element\n    size, etc). The application can use :py:obj:`~.cuCtxGetLimit()` to find\n    out exactly what the limit has been set to.\n\n    Setting each :py:obj:`~.CUlimit` has its own specific restrictions, so\n    each is discussed here.\n\n    - :py:obj:`~.CU_LIMIT_STACK_SIZE` controls the stack size in bytes of\n      each GPU thread. The driver automatically increases the per-thread\n      stack size for each kernel launch as needed. This size isn't reset\n      back to the original value after each launch. Setting this value will\n      take effect immediately, and if necessary, the device will block\n      until all preceding requested tasks are complete.\n\n    - :py:obj:`~.CU_LIMIT_PRINTF_FIFO_SIZE` controls the size in bytes of\n      the FIFO used by the :py:obj:`~.printf()` device system call. Setting\n      :py:obj:`~.CU_LIMIT_PRINTF_FIFO_SIZE` must be performed before\n      launching any kernel that uses the :py:obj:`~.printf()` device system\n      call, otherwise :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be\n      returned.\n\n    - :py:obj:`~.CU_LIMIT_MALLOC_HEAP_SIZE` controls the size in bytes of\n      the heap used by the :py:obj:`~.malloc()` and :py:obj:`~.free()`\n      device system calls. Setting :py:obj:`~.CU_LIMIT_MALLOC_HEAP_SIZE`\n      must be performed before launching any kernel that uses the\n      :py:obj:`~.malloc()` or :py:obj:`~.free()` device system calls,\n      otherwise :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned.\n\n    - :py:obj:`~.CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH` controls the maximum\n      nesting depth of a grid at which a thread can safely call\n      :py:obj:`""~.cudaDeviceSynchronize()`. Setting this limit must be\n      performed before any launch of a kernel that uses the device runtime\n      and calls :py:obj:`~.cudaDeviceSynchronize()` above the default sync\n      depth, two levels of grids. Calls to\n      :py:obj:`~.cudaDeviceSynchronize()` will fail with error code\n      :py:obj:`~.cudaErrorSyncDepthExceeded` if the limitation is violated.\n      This limit can be set smaller than the default or up the maximum\n      launch depth of 24. When setting this limit, keep in mind that\n      additional levels of sync depth require the driver to reserve large\n      amounts of device memory which can no longer be used for user\n      allocations. If these reservations of device memory fail,\n      :py:obj:`~.cuCtxSetLimit()` will return\n      :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, and the limit can be reset to a\n      lower value. This limit is only applicable to devices of compute\n      capability 3.5 and higher. Attempting to set this limit on devices of\n      compute capability less than 3.5 will result in the error\n      :py:obj:`~.CUDA_ERROR_UNSUPPORTED_LIMIT` being returned.\n\n    - :py:obj:`~.CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT` controls the\n      maximum number of outstanding device runtime launches that can be\n      made from the current context. A grid is outstanding from the point\n      of launch up until the grid is known to have been completed. Device\n      runtime launches which violate this limitation fail and return\n      :py:obj:`~.cudaErrorLaunchPendingCountExceeded` when\n      :py:obj:`~.cudaGetLastError()` is called after launch. If more\n      pending launches than the default (2048 launches) are needed for a\n      module using the device runtime, this limit can be increased. Keep in\n      mind that being able to sustain additional pending launches will\n      require the driver to reserve larger amounts of device memory upfront\n      which can no longer be used for allocations."" If these reservations\n      fail, :py:obj:`~.cuCtxSetLimit()` will return\n      :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, and the limit can be reset to a\n      lower value. This limit is only applicable to devices of compute\n      capability 3.5 and higher. Attempting to set this limit on devices of\n      compute capability less than 3.5 will result in the error\n      :py:obj:`~.CUDA_ERROR_UNSUPPORTED_LIMIT` being returned.\n\n    - :py:obj:`~.CU_LIMIT_MAX_L2_FETCH_GRANULARITY` controls the L2 cache\n      fetch granularity. Values can range from 0B to 128B. This is purely a\n      performence hint and it can be ignored or clamped depending on the\n      platform.\n\n    - :py:obj:`~.CU_LIMIT_PERSISTING_L2_CACHE_SIZE` controls size in bytes\n      availabe for persisting L2 cache. This is purely a performance hint\n      and it can be ignored or clamped depending on the platform.\n\n    Parameters\n    ----------\n    limit : :py:obj:`~.CUlimit`\n        Limit to set\n    value : size_t\n        Size of limit\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_LIMIT`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceSetLimit`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_73cuCtxSetLimit = {"cuCtxSetLimit", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_73cuCtxSetLimit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_72cuCtxSetLimit};
static PyObject *__pyx_pw_4cuda_4cuda_73cuCtxSetLimit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_limit = 0;
  size_t __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxSetLimit (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_limit,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_limit)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuCtxSetLimit", 1, 2, 2, 1); __PYX_ERR(0, 13208, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuCtxSetLimit") < 0)) __PYX_ERR(0, 13208, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_limit = values[0];
    __pyx_v_value = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_value == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 13208, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuCtxSetLimit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 13208, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuCtxSetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_limit) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "limit"); __PYX_ERR(0, 13208, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_72cuCtxSetLimit(__pyx_self, __pyx_v_limit, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_72cuCtxSetLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_limit, size_t __pyx_v_value) {
  CUlimit __pyx_v_climit;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUlimit __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__644)
  __Pyx_RefNannySetupContext("cuCtxSetLimit", 0);
  __Pyx_TraceCall("cuCtxSetLimit", __pyx_f[0], 13208, 0, __PYX_ERR(0, 13208, __pyx_L1_error));

  /* "cuda/cuda.pyx":13306
 *     :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceSetLimit`
 *     """
 *     cdef ccuda.CUlimit climit = limit.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxSetLimit(climit, value)
 *     return (CUresult(err),)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_limit, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUlimit_enum)__Pyx_PyInt_As_enum__CUlimit_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 13306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_climit = __pyx_t_2;

  /* "cuda/cuda.pyx":13307
 *     """
 *     cdef ccuda.CUlimit climit = limit.value
 *     err = ccuda.cuCtxSetLimit(climit, value)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuCtxSetLimit(__pyx_v_climit, __pyx_v_value); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13307, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":13308
 *     cdef ccuda.CUlimit climit = limit.value
 *     err = ccuda.cuCtxSetLimit(climit, value)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13208
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetLimit(limit not None : CUlimit, size_t value):             # <<<<<<<<<<<<<<
 *     """ Set resource limits.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuCtxSetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13311
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetLimit(limit not None : CUlimit):             # <<<<<<<<<<<<<<
 *     """ Returns resource limits.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_75cuCtxGetLimit(PyObject *__pyx_self, PyObject *__pyx_v_limit); /*proto*/
static char __pyx_doc_4cuda_4cuda_74cuCtxGetLimit[] = "cuCtxGetLimit(limit: CUlimit)\n Returns resource limits.\n\n    Returns in `*pvalue` the current size of `limit`. The supported\n    :py:obj:`~.CUlimit` values are:\n\n    - :py:obj:`~.CU_LIMIT_STACK_SIZE`: stack size in bytes of each GPU\n      thread.\n\n    - :py:obj:`~.CU_LIMIT_PRINTF_FIFO_SIZE`: size in bytes of the FIFO used\n      by the :py:obj:`~.printf()` device system call.\n\n    - :py:obj:`~.CU_LIMIT_MALLOC_HEAP_SIZE`: size in bytes of the heap used\n      by the :py:obj:`~.malloc()` and :py:obj:`~.free()` device system\n      calls.\n\n    - :py:obj:`~.CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH`: maximum grid depth at\n      which a thread can issue the device runtime call\n      :py:obj:`~.cudaDeviceSynchronize()` to wait on child grid launches to\n      complete.\n\n    - :py:obj:`~.CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT`: maximum number\n      of outstanding device runtime launches that can be made from this\n      context.\n\n    - :py:obj:`~.CU_LIMIT_MAX_L2_FETCH_GRANULARITY`: L2 cache fetch\n      granularity.\n\n    - :py:obj:`~.CU_LIMIT_PERSISTING_L2_CACHE_SIZE`: Persisting L2 cache\n      size in bytes\n\n    Parameters\n    ----------\n    limit : :py:obj:`~.CUlimit`\n        Limit to query\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_LIMIT`\n    pvalue : int\n        Returned size of limit\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceGetLimit`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_75cuCtxGetLimit = {"cuCtxGetLimit", (PyCFunction)__pyx_pw_4cuda_4cuda_75cuCtxGetLimit, METH_O, __pyx_doc_4cuda_4cuda_74cuCtxGetLimit};
static PyObject *__pyx_pw_4cuda_4cuda_75cuCtxGetLimit(PyObject *__pyx_self, PyObject *__pyx_v_limit) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxGetLimit (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_limit) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "limit"); __PYX_ERR(0, 13311, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_74cuCtxGetLimit(__pyx_self, ((PyObject *)__pyx_v_limit));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_74cuCtxGetLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_limit) {
  size_t __pyx_v_pvalue;
  CUlimit __pyx_v_climit;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUlimit __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__645)
  __Pyx_RefNannySetupContext("cuCtxGetLimit", 0);
  __Pyx_TraceCall("cuCtxGetLimit", __pyx_f[0], 13311, 0, __PYX_ERR(0, 13311, __pyx_L1_error));

  /* "cuda/cuda.pyx":13358
 *     :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceGetLimit`
 *     """
 *     cdef size_t pvalue = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUlimit climit = limit.value
 *     err = ccuda.cuCtxGetLimit(&pvalue, climit)
 */
  __pyx_v_pvalue = 0;

  /* "cuda/cuda.pyx":13359
 *     """
 *     cdef size_t pvalue = 0
 *     cdef ccuda.CUlimit climit = limit.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxGetLimit(&pvalue, climit)
 *     return (CUresult(err), pvalue)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_limit, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUlimit_enum)__Pyx_PyInt_As_enum__CUlimit_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 13359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_climit = __pyx_t_2;

  /* "cuda/cuda.pyx":13360
 *     cdef size_t pvalue = 0
 *     cdef ccuda.CUlimit climit = limit.value
 *     err = ccuda.cuCtxGetLimit(&pvalue, climit)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pvalue)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuCtxGetLimit((&__pyx_v_pvalue), __pyx_v_climit); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13360, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":13361
 *     cdef ccuda.CUlimit climit = limit.value
 *     err = ccuda.cuCtxGetLimit(&pvalue, climit)
 *     return (CUresult(err), pvalue)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_pvalue); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13311
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetLimit(limit not None : CUlimit):             # <<<<<<<<<<<<<<
 *     """ Returns resource limits.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuCtxGetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13364
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetCacheConfig():             # <<<<<<<<<<<<<<
 *     """ Returns the preferred cache configuration for the current context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_77cuCtxGetCacheConfig(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_76cuCtxGetCacheConfig[] = "cuCtxGetCacheConfig()\n Returns the preferred cache configuration for the current context.\n\n    On devices where the L1 cache and shared memory use the same hardware\n    resources, this function returns through `pconfig` the preferred cache\n    configuration for the current context. This is only a preference. The\n    driver will use the requested configuration if possible, but it is free\n    to choose a different configuration if required to execute functions.\n\n    This will return a `pconfig` of :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE`\n    on devices where the size of the L1 cache and shared memory are fixed.\n\n    The supported cache configurations are:\n\n    - :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE`: no preference for shared\n      memory or L1 (default)\n\n    - :py:obj:`~.CU_FUNC_CACHE_PREFER_SHARED`: prefer larger shared memory\n      and smaller L1 cache\n\n    - :py:obj:`~.CU_FUNC_CACHE_PREFER_L1`: prefer larger L1 cache and\n      smaller shared memory\n\n    - :py:obj:`~.CU_FUNC_CACHE_PREFER_EQUAL`: prefer equal sized L1 cache\n      and shared memory\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pconfig : :py:obj:`~.CUfunc_cache`\n        Returned cache configuration\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cudaDeviceGetCacheConfig`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_77cuCtxGetCacheConfig = {"cuCtxGetCacheConfig", (PyCFunction)__pyx_pw_4cuda_4cuda_77cuCtxGetCacheConfig, METH_NOARGS, __pyx_doc_4cuda_4cuda_76cuCtxGetCacheConfig};
static PyObject *__pyx_pw_4cuda_4cuda_77cuCtxGetCacheConfig(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxGetCacheConfig (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_76cuCtxGetCacheConfig(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_76cuCtxGetCacheConfig(CYTHON_UNUSED PyObject *__pyx_self) {
  CUfunc_cache __pyx_v_pconfig;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__646)
  __Pyx_RefNannySetupContext("cuCtxGetCacheConfig", 0);
  __Pyx_TraceCall("cuCtxGetCacheConfig", __pyx_f[0], 13364, 0, __PYX_ERR(0, 13364, __pyx_L1_error));

  /* "cuda/cuda.pyx":13402
 *     """
 *     cdef ccuda.CUfunc_cache pconfig
 *     err = ccuda.cuCtxGetCacheConfig(&pconfig)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUfunc_cache(pconfig))
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuCtxGetCacheConfig((&__pyx_v_pconfig)); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13402, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":13403
 *     cdef ccuda.CUfunc_cache pconfig
 *     err = ccuda.cuCtxGetCacheConfig(&pconfig)
 *     return (CUresult(err), CUfunc_cache(pconfig))             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUfunc_cache); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__CUfunc_cache_enum(__pyx_v_pconfig); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13364
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetCacheConfig():             # <<<<<<<<<<<<<<
 *     """ Returns the preferred cache configuration for the current context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuCtxGetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13406
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetCacheConfig(config not None : CUfunc_cache):             # <<<<<<<<<<<<<<
 *     """ Sets the preferred cache configuration for the current context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_79cuCtxSetCacheConfig(PyObject *__pyx_self, PyObject *__pyx_v_config); /*proto*/
static char __pyx_doc_4cuda_4cuda_78cuCtxSetCacheConfig[] = "cuCtxSetCacheConfig(config: CUfunc_cache)\n Sets the preferred cache configuration for the current context.\n\n    On devices where the L1 cache and shared memory use the same hardware\n    resources, this sets through `config` the preferred cache configuration\n    for the current context. This is only a preference. The driver will use\n    the requested configuration if possible, but it is free to choose a\n    different configuration if required to execute the function. Any\n    function preference set via :py:obj:`~.cuFuncSetCacheConfig()` will be\n    preferred over this context-wide setting. Setting the context-wide\n    cache configuration to :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE` will cause\n    subsequent kernel launches to prefer to not change the cache\n    configuration unless required to launch the kernel.\n\n    This setting does nothing on devices where the size of the L1 cache and\n    shared memory are fixed.\n\n    Launching a kernel with a different preference than the most recent\n    preference setting may insert a device-side synchronization point.\n\n    The supported cache configurations are:\n\n    - :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE`: no preference for shared\n      memory or L1 (default)\n\n    - :py:obj:`~.CU_FUNC_CACHE_PREFER_SHARED`: prefer larger shared memory\n      and smaller L1 cache\n\n    - :py:obj:`~.CU_FUNC_CACHE_PREFER_L1`: prefer larger L1 cache and\n      smaller shared memory\n\n    - :py:obj:`~.CU_FUNC_CACHE_PREFER_EQUAL`: prefer equal sized L1 cache\n      and shared memory\n\n    Parameters\n    ----------\n    config : :py:obj:`~.CUfunc_cache`\n        Requested cache configuration\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVe""rsion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cudaDeviceSetCacheConfig`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_79cuCtxSetCacheConfig = {"cuCtxSetCacheConfig", (PyCFunction)__pyx_pw_4cuda_4cuda_79cuCtxSetCacheConfig, METH_O, __pyx_doc_4cuda_4cuda_78cuCtxSetCacheConfig};
static PyObject *__pyx_pw_4cuda_4cuda_79cuCtxSetCacheConfig(PyObject *__pyx_self, PyObject *__pyx_v_config) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxSetCacheConfig (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_config) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "config"); __PYX_ERR(0, 13406, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_78cuCtxSetCacheConfig(__pyx_self, ((PyObject *)__pyx_v_config));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_78cuCtxSetCacheConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config) {
  CUfunc_cache __pyx_v_cconfig;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUfunc_cache __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__647)
  __Pyx_RefNannySetupContext("cuCtxSetCacheConfig", 0);
  __Pyx_TraceCall("cuCtxSetCacheConfig", __pyx_f[0], 13406, 0, __PYX_ERR(0, 13406, __pyx_L1_error));

  /* "cuda/cuda.pyx":13454
 *     :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cudaDeviceSetCacheConfig`
 *     """
 *     cdef ccuda.CUfunc_cache cconfig = config.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxSetCacheConfig(cconfig)
 *     return (CUresult(err),)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUfunc_cache_enum)__Pyx_PyInt_As_enum__CUfunc_cache_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 13454, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cconfig = __pyx_t_2;

  /* "cuda/cuda.pyx":13455
 *     """
 *     cdef ccuda.CUfunc_cache cconfig = config.value
 *     err = ccuda.cuCtxSetCacheConfig(cconfig)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuCtxSetCacheConfig(__pyx_v_cconfig); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13455, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":13456
 *     cdef ccuda.CUfunc_cache cconfig = config.value
 *     err = ccuda.cuCtxSetCacheConfig(cconfig)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13406
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetCacheConfig(config not None : CUfunc_cache):             # <<<<<<<<<<<<<<
 *     """ Sets the preferred cache configuration for the current context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuCtxSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13459
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetSharedMemConfig():             # <<<<<<<<<<<<<<
 *     """ Returns the current shared memory configuration for the current context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_81cuCtxGetSharedMemConfig(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_80cuCtxGetSharedMemConfig[] = "cuCtxGetSharedMemConfig()\n Returns the current shared memory configuration for the current context.\n\n    This function will return in `pConfig` the current size of shared\n    memory banks in the current context. On devices with configurable\n    shared memory banks, :py:obj:`~.cuCtxSetSharedMemConfig` can be used to\n    change this setting, so that all subsequent kernel launches will by\n    default use the new bank size. When :py:obj:`~.cuCtxGetSharedMemConfig`\n    is called on devices without configurable shared memory, it will return\n    the fixed bank size of the hardware.\n\n    The returned bank configurations can be either:\n\n    - :py:obj:`~.CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE`: shared memory\n      bank width is four bytes.\n\n    - :py:obj:`~.CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE`: shared memory\n      bank width will eight bytes.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pConfig : :py:obj:`~.CUsharedconfig`\n        returned shared memory configuration\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cuCtxGetSharedMemConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cudaDeviceGetSharedMemConfig`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_81cuCtxGetSharedMemConfig = {"cuCtxGetSharedMemConfig", (PyCFunction)__pyx_pw_4cuda_4cuda_81cuCtxGetSharedMemConfig, METH_NOARGS, __pyx_doc_4cuda_4cuda_80cuCtxGetSharedMemConfig};
static PyObject *__pyx_pw_4cuda_4cuda_81cuCtxGetSharedMemConfig(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxGetSharedMemConfig (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_80cuCtxGetSharedMemConfig(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_80cuCtxGetSharedMemConfig(CYTHON_UNUSED PyObject *__pyx_self) {
  CUsharedconfig __pyx_v_pConfig;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__648)
  __Pyx_RefNannySetupContext("cuCtxGetSharedMemConfig", 0);
  __Pyx_TraceCall("cuCtxGetSharedMemConfig", __pyx_f[0], 13459, 0, __PYX_ERR(0, 13459, __pyx_L1_error));

  /* "cuda/cuda.pyx":13490
 *     """
 *     cdef ccuda.CUsharedconfig pConfig
 *     err = ccuda.cuCtxGetSharedMemConfig(&pConfig)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUsharedconfig(pConfig))
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuCtxGetSharedMemConfig((&__pyx_v_pConfig)); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13490, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":13491
 *     cdef ccuda.CUsharedconfig pConfig
 *     err = ccuda.cuCtxGetSharedMemConfig(&pConfig)
 *     return (CUresult(err), CUsharedconfig(pConfig))             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUsharedconfig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__CUsharedconfig_enum(__pyx_v_pConfig); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13459
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetSharedMemConfig():             # <<<<<<<<<<<<<<
 *     """ Returns the current shared memory configuration for the current context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuCtxGetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13494
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetSharedMemConfig(config not None : CUsharedconfig):             # <<<<<<<<<<<<<<
 *     """ Sets the shared memory configuration for the current context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_83cuCtxSetSharedMemConfig(PyObject *__pyx_self, PyObject *__pyx_v_config); /*proto*/
static char __pyx_doc_4cuda_4cuda_82cuCtxSetSharedMemConfig[] = "cuCtxSetSharedMemConfig(config: CUsharedconfig)\n Sets the shared memory configuration for the current context.\n\n    On devices with configurable shared memory banks, this function will\n    set the context's shared memory bank size which is used for subsequent\n    kernel launches.\n\n    Changed the shared memory configuration between launches may insert a\n    device side synchronization point between those launches.\n\n    Changing the shared memory bank size will not increase shared memory\n    usage or affect occupancy of kernels, but may have major effects on\n    performance. Larger bank sizes will allow for greater potential\n    bandwidth to shared memory, but will change what kinds of accesses to\n    shared memory will result in bank conflicts.\n\n    This function will do nothing on devices with fixed shared memory bank\n    size.\n\n    The supported bank configurations are:\n\n    - :py:obj:`~.CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE`: set bank width to\n      the default initial setting (currently, four bytes).\n\n    - :py:obj:`~.CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE`: set shared\n      memory bank width to be natively four bytes.\n\n    - :py:obj:`~.CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE`: set shared\n      memory bank width to be natively eight bytes.\n\n    Parameters\n    ----------\n    config : :py:obj:`~.CUsharedconfig`\n        requested shared memory configuration\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, "":py:obj:`~.cuCtxGetSharedMemConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cudaDeviceSetSharedMemConfig`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_83cuCtxSetSharedMemConfig = {"cuCtxSetSharedMemConfig", (PyCFunction)__pyx_pw_4cuda_4cuda_83cuCtxSetSharedMemConfig, METH_O, __pyx_doc_4cuda_4cuda_82cuCtxSetSharedMemConfig};
static PyObject *__pyx_pw_4cuda_4cuda_83cuCtxSetSharedMemConfig(PyObject *__pyx_self, PyObject *__pyx_v_config) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxSetSharedMemConfig (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_config) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "config"); __PYX_ERR(0, 13494, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_82cuCtxSetSharedMemConfig(__pyx_self, ((PyObject *)__pyx_v_config));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_82cuCtxSetSharedMemConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config) {
  CUsharedconfig __pyx_v_cconfig;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUsharedconfig __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__649)
  __Pyx_RefNannySetupContext("cuCtxSetSharedMemConfig", 0);
  __Pyx_TraceCall("cuCtxSetSharedMemConfig", __pyx_f[0], 13494, 0, __PYX_ERR(0, 13494, __pyx_L1_error));

  /* "cuda/cuda.pyx":13538
 *     :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cuCtxGetSharedMemConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cudaDeviceSetSharedMemConfig`
 *     """
 *     cdef ccuda.CUsharedconfig cconfig = config.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxSetSharedMemConfig(cconfig)
 *     return (CUresult(err),)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUsharedconfig_enum)__Pyx_PyInt_As_enum__CUsharedconfig_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 13538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cconfig = __pyx_t_2;

  /* "cuda/cuda.pyx":13539
 *     """
 *     cdef ccuda.CUsharedconfig cconfig = config.value
 *     err = ccuda.cuCtxSetSharedMemConfig(cconfig)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuCtxSetSharedMemConfig(__pyx_v_cconfig); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13539, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":13540
 *     cdef ccuda.CUsharedconfig cconfig = config.value
 *     err = ccuda.cuCtxSetSharedMemConfig(cconfig)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13494
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetSharedMemConfig(config not None : CUsharedconfig):             # <<<<<<<<<<<<<<
 *     """ Sets the shared memory configuration for the current context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuCtxSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13543
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetApiVersion(ctx):             # <<<<<<<<<<<<<<
 *     """ Gets the context's API version.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_85cuCtxGetApiVersion(PyObject *__pyx_self, PyObject *__pyx_v_ctx); /*proto*/
static char __pyx_doc_4cuda_4cuda_84cuCtxGetApiVersion[] = "cuCtxGetApiVersion(ctx)\n Gets the context's API version.\n\n    Returns a version number in `version` corresponding to the capabilities\n    of the context (e.g. 3010 or 3020), which library developers can use to\n    direct callers to a specific API version. If `ctx` is NULL, returns the\n    API version used to create the currently bound context.\n\n    Note that new API versions are only introduced when context\n    capabilities are changed that break binary compatibility, so the API\n    version and driver version may be different. For example, it is valid\n    for the API version to be 3020 while the driver version is 4020.\n\n    Parameters\n    ----------\n    ctx : :py:obj:`~.CUcontext`\n        Context to check\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    version : unsigned int\n        Pointer to version\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_85cuCtxGetApiVersion = {"cuCtxGetApiVersion", (PyCFunction)__pyx_pw_4cuda_4cuda_85cuCtxGetApiVersion, METH_O, __pyx_doc_4cuda_4cuda_84cuCtxGetApiVersion};
static PyObject *__pyx_pw_4cuda_4cuda_85cuCtxGetApiVersion(PyObject *__pyx_self, PyObject *__pyx_v_ctx) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxGetApiVersion (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_84cuCtxGetApiVersion(__pyx_self, ((PyObject *)__pyx_v_ctx));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_84cuCtxGetApiVersion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ctx) {
  CUcontext __pyx_v_cctx;
  PyObject *__pyx_v_pctx = NULL;
  unsigned int __pyx_v_version;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__650)
  __Pyx_RefNannySetupContext("cuCtxGetApiVersion", 0);
  __Pyx_TraceCall("cuCtxGetApiVersion", __pyx_f[0], 13543, 0, __PYX_ERR(0, 13543, __pyx_L1_error));

  /* "cuda/cuda.pyx":13573
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_ctx == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":13574
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 */
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":13573
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13575
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ctx, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":13576
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pctx = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":13577
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 *     else:
 *         pctx = int(CUcontext(ctx))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13577, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":13575
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13579
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 *         pctx = int(CUcontext(ctx))             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pctx = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":13580
 *     else:
 *         pctx = int(CUcontext(ctx))
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 * 
 *     cdef unsigned int version = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13580, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":13582
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 *     cdef unsigned int version = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxGetApiVersion(cctx, &version)
 *     return (CUresult(err), version)
 */
  __pyx_v_version = 0;

  /* "cuda/cuda.pyx":13583
 * 
 *     cdef unsigned int version = 0
 *     err = ccuda.cuCtxGetApiVersion(cctx, &version)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), version)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuCtxGetApiVersion(__pyx_v_cctx, (&__pyx_v_version)); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13583, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":13584
 *     cdef unsigned int version = 0
 *     err = ccuda.cuCtxGetApiVersion(cctx, &version)
 *     return (CUresult(err), version)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13543
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetApiVersion(ctx):             # <<<<<<<<<<<<<<
 *     """ Gets the context's API version.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuCtxGetApiVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13587
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetStreamPriorityRange():             # <<<<<<<<<<<<<<
 *     """ Returns numerical values that correspond to the least and greatest stream priorities.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_87cuCtxGetStreamPriorityRange(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_86cuCtxGetStreamPriorityRange[] = "cuCtxGetStreamPriorityRange()\n Returns numerical values that correspond to the least and greatest stream priorities.\n\n    Returns in `*leastPriority` and `*greatestPriority` the numerical\n    values that correspond to the least and greatest stream priorities\n    respectively. Stream priorities follow a convention where lower numbers\n    imply greater priorities. The range of meaningful stream priorities is\n    given by [`*greatestPriority`, `*leastPriority`]. If the user attempts\n    to create a stream with a priority value that is outside the meaningful\n    range as specified by this API, the priority is automatically clamped\n    down or up to either `*leastPriority` or `*greatestPriority`\n    respectively. See :py:obj:`~.cuStreamCreateWithPriority` for details on\n    creating a priority stream. A NULL may be passed in for\n    `*leastPriority` or `*greatestPriority` if the value is not desired.\n\n    This function will return '0' in both `*leastPriority` and\n    `*greatestPriority` if the current context's device does not support\n    stream priorities (see :py:obj:`~.cuDeviceGetAttribute`).\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n    leastPriority : int\n        Pointer to an int in which the numerical value for least stream\n        priority is returned\n    greatestPriority : int\n        Pointer to an int in which the numerical value for greatest stream\n        priority is returned\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceGetStreamPriorityRange`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_87cuCtxGetStreamPriorityRange = {"cuCtxGetStreamPriorityRange", (PyCFunction)__pyx_pw_4cuda_4cuda_87cuCtxGetStreamPriorityRange, METH_NOARGS, __pyx_doc_4cuda_4cuda_86cuCtxGetStreamPriorityRange};
static PyObject *__pyx_pw_4cuda_4cuda_87cuCtxGetStreamPriorityRange(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxGetStreamPriorityRange (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_86cuCtxGetStreamPriorityRange(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_86cuCtxGetStreamPriorityRange(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_leastPriority;
  int __pyx_v_greatestPriority;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__651)
  __Pyx_RefNannySetupContext("cuCtxGetStreamPriorityRange", 0);
  __Pyx_TraceCall("cuCtxGetStreamPriorityRange", __pyx_f[0], 13587, 0, __PYX_ERR(0, 13587, __pyx_L1_error));

  /* "cuda/cuda.pyx":13621
 *     :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceGetStreamPriorityRange`
 *     """
 *     cdef int leastPriority = 0             # <<<<<<<<<<<<<<
 *     cdef int greatestPriority = 0
 *     err = ccuda.cuCtxGetStreamPriorityRange(&leastPriority, &greatestPriority)
 */
  __pyx_v_leastPriority = 0;

  /* "cuda/cuda.pyx":13622
 *     """
 *     cdef int leastPriority = 0
 *     cdef int greatestPriority = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxGetStreamPriorityRange(&leastPriority, &greatestPriority)
 *     return (CUresult(err), leastPriority, greatestPriority)
 */
  __pyx_v_greatestPriority = 0;

  /* "cuda/cuda.pyx":13623
 *     cdef int leastPriority = 0
 *     cdef int greatestPriority = 0
 *     err = ccuda.cuCtxGetStreamPriorityRange(&leastPriority, &greatestPriority)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), leastPriority, greatestPriority)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuCtxGetStreamPriorityRange((&__pyx_v_leastPriority), (&__pyx_v_greatestPriority)); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13623, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":13624
 *     cdef int greatestPriority = 0
 *     err = ccuda.cuCtxGetStreamPriorityRange(&leastPriority, &greatestPriority)
 *     return (CUresult(err), leastPriority, greatestPriority)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_leastPriority); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_greatestPriority); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13587
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetStreamPriorityRange():             # <<<<<<<<<<<<<<
 *     """ Returns numerical values that correspond to the least and greatest stream priorities.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuCtxGetStreamPriorityRange", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13627
 * 
 * @cython.embedsignature(True)
 * def cuCtxResetPersistingL2Cache():             # <<<<<<<<<<<<<<
 *     """ Resets all persisting lines in cache to normal status.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_89cuCtxResetPersistingL2Cache(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_88cuCtxResetPersistingL2Cache[] = "cuCtxResetPersistingL2Cache()\n Resets all persisting lines in cache to normal status.\n\n    :py:obj:`~.cuCtxResetPersistingL2Cache` Resets all persisting lines in\n    cache to normal status. Takes effect on function return.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.CUaccessPolicyWindow`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_89cuCtxResetPersistingL2Cache = {"cuCtxResetPersistingL2Cache", (PyCFunction)__pyx_pw_4cuda_4cuda_89cuCtxResetPersistingL2Cache, METH_NOARGS, __pyx_doc_4cuda_4cuda_88cuCtxResetPersistingL2Cache};
static PyObject *__pyx_pw_4cuda_4cuda_89cuCtxResetPersistingL2Cache(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxResetPersistingL2Cache (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_88cuCtxResetPersistingL2Cache(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_88cuCtxResetPersistingL2Cache(CYTHON_UNUSED PyObject *__pyx_self) {
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__652)
  __Pyx_RefNannySetupContext("cuCtxResetPersistingL2Cache", 0);
  __Pyx_TraceCall("cuCtxResetPersistingL2Cache", __pyx_f[0], 13627, 0, __PYX_ERR(0, 13627, __pyx_L1_error));

  /* "cuda/cuda.pyx":13642
 *     :py:obj:`~.CUaccessPolicyWindow`
 *     """
 *     err = ccuda.cuCtxResetPersistingL2Cache()             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuCtxResetPersistingL2Cache(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13642, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":13643
 *     """
 *     err = ccuda.cuCtxResetPersistingL2Cache()
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13627
 * 
 * @cython.embedsignature(True)
 * def cuCtxResetPersistingL2Cache():             # <<<<<<<<<<<<<<
 *     """ Resets all persisting lines in cache to normal status.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuCtxResetPersistingL2Cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13646
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetExecAffinity(typename not None : CUexecAffinityType):             # <<<<<<<<<<<<<<
 *     """ Returns the execution affinity setting for the current context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_91cuCtxGetExecAffinity(PyObject *__pyx_self, PyObject *__pyx_v_typename); /*proto*/
static char __pyx_doc_4cuda_4cuda_90cuCtxGetExecAffinity[] = "cuCtxGetExecAffinity(typename: CUexecAffinityType)\n Returns the execution affinity setting for the current context.\n\n    Returns in `*pExecAffinity` the current value of `typename`. The\n    supported :py:obj:`~.CUexecAffinityType` values are:\n\n    - :py:obj:`~.CU_EXEC_AFFINITY_TYPE_SM_COUNT`: number of SMs the context\n      is limited to use.\n\n    Parameters\n    ----------\n    typename : :py:obj:`~.CUexecAffinityType`\n        Execution affinity type to query\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY`\n    pExecAffinity : :py:obj:`~.CUexecAffinityParam`\n        Returned execution affinity\n\n    See Also\n    --------\n    :py:obj:`~.CUexecAffinityParam`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_91cuCtxGetExecAffinity = {"cuCtxGetExecAffinity", (PyCFunction)__pyx_pw_4cuda_4cuda_91cuCtxGetExecAffinity, METH_O, __pyx_doc_4cuda_4cuda_90cuCtxGetExecAffinity};
static PyObject *__pyx_pw_4cuda_4cuda_91cuCtxGetExecAffinity(PyObject *__pyx_self, PyObject *__pyx_v_typename) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxGetExecAffinity (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_typename) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "typename"); __PYX_ERR(0, 13646, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_90cuCtxGetExecAffinity(__pyx_self, ((PyObject *)__pyx_v_typename));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_90cuCtxGetExecAffinity(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_typename) {
  struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam *__pyx_v_pExecAffinity = 0;
  CUexecAffinityType __pyx_v_ctypename;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUexecAffinityType __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__653)
  __Pyx_RefNannySetupContext("cuCtxGetExecAffinity", 0);
  __Pyx_TraceCall("cuCtxGetExecAffinity", __pyx_f[0], 13646, 0, __PYX_ERR(0, 13646, __pyx_L1_error));

  /* "cuda/cuda.pyx":13671
 *     :py:obj:`~.CUexecAffinityParam`
 *     """
 *     cdef CUexecAffinityParam pExecAffinity = CUexecAffinityParam()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUexecAffinityType ctypename = typename.value
 *     err = ccuda.cuCtxGetExecAffinity(pExecAffinity._ptr, ctypename)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUexecAffinityParam)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pExecAffinity = ((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13672
 *     """
 *     cdef CUexecAffinityParam pExecAffinity = CUexecAffinityParam()
 *     cdef ccuda.CUexecAffinityType ctypename = typename.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxGetExecAffinity(pExecAffinity._ptr, ctypename)
 *     return (CUresult(err), pExecAffinity)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_typename, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUexecAffinityType_enum)__Pyx_PyInt_As_enum__CUexecAffinityType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 13672, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ctypename = __pyx_t_2;

  /* "cuda/cuda.pyx":13673
 *     cdef CUexecAffinityParam pExecAffinity = CUexecAffinityParam()
 *     cdef ccuda.CUexecAffinityType ctypename = typename.value
 *     err = ccuda.cuCtxGetExecAffinity(pExecAffinity._ptr, ctypename)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pExecAffinity)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuCtxGetExecAffinity(__pyx_v_pExecAffinity->__pyx_base._ptr, __pyx_v_ctypename); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13673, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":13674
 *     cdef ccuda.CUexecAffinityType ctypename = typename.value
 *     err = ccuda.cuCtxGetExecAffinity(pExecAffinity._ptr, ctypename)
 *     return (CUresult(err), pExecAffinity)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pExecAffinity));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pExecAffinity));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_pExecAffinity));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13646
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetExecAffinity(typename not None : CUexecAffinityType):             # <<<<<<<<<<<<<<
 *     """ Returns the execution affinity setting for the current context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuCtxGetExecAffinity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pExecAffinity);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13677
 * 
 * @cython.embedsignature(True)
 * def cuCtxAttach(unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Increment a context's usage-count.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_93cuCtxAttach(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
static char __pyx_doc_4cuda_4cuda_92cuCtxAttach[] = "cuCtxAttach(unsigned int flags)\n Increment a context's usage-count.\n\n    [Deprecated]\n\n    Note that this function is deprecated and should not be used.\n\n    Increments the usage count of the context and passes back a context\n    handle in `*pctx` that must be passed to :py:obj:`~.cuCtxDetach()` when\n    the application is done with the context. :py:obj:`~.cuCtxAttach()`\n    fails if there is no context current to the thread.\n\n    Currently, the `flags` parameter must be 0.\n\n    Parameters\n    ----------\n    flags : unsigned int\n        Context attach flags (must be 0)\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pctx : :py:obj:`~.CUcontext`\n        Returned context handle of the current context\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxDetach`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_93cuCtxAttach = {"cuCtxAttach", (PyCFunction)__pyx_pw_4cuda_4cuda_93cuCtxAttach, METH_O, __pyx_doc_4cuda_4cuda_92cuCtxAttach};
static PyObject *__pyx_pw_4cuda_4cuda_93cuCtxAttach(PyObject *__pyx_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxAttach (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 13677, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuCtxAttach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_92cuCtxAttach(__pyx_self, ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_92cuCtxAttach(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags) {
  struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_pctx = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__654)
  __Pyx_RefNannySetupContext("cuCtxAttach", 0);
  __Pyx_TraceCall("cuCtxAttach", __pyx_f[0], 13677, 0, __PYX_ERR(0, 13677, __pyx_L1_error));

  /* "cuda/cuda.pyx":13707
 *     :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxDetach`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`
 *     """
 *     cdef CUcontext pctx = CUcontext()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuCtxAttach(pctx._ptr, flags)
 *     return (CUresult(err), pctx)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pctx = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13708
 *     """
 *     cdef CUcontext pctx = CUcontext()
 *     err = ccuda.cuCtxAttach(pctx._ptr, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pctx)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuCtxAttach(__pyx_v_pctx->_ptr, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13708, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":13709
 *     cdef CUcontext pctx = CUcontext()
 *     err = ccuda.cuCtxAttach(pctx._ptr, flags)
 *     return (CUresult(err), pctx)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pctx));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pctx));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pctx));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13677
 * 
 * @cython.embedsignature(True)
 * def cuCtxAttach(unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Increment a context's usage-count.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuCtxAttach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13712
 * 
 * @cython.embedsignature(True)
 * def cuCtxDetach(ctx):             # <<<<<<<<<<<<<<
 *     """ Decrement a context's usage-count.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_95cuCtxDetach(PyObject *__pyx_self, PyObject *__pyx_v_ctx); /*proto*/
static char __pyx_doc_4cuda_4cuda_94cuCtxDetach[] = "cuCtxDetach(ctx)\n Decrement a context's usage-count.\n\n    [Deprecated]\n\n    Note that this function is deprecated and should not be used.\n\n    Decrements the usage count of the context `ctx`, and destroys the\n    context if the usage count goes to 0. The context must be a handle that\n    was passed back by :py:obj:`~.cuCtxCreate()` or\n    :py:obj:`~.cuCtxAttach()`, and must be current to the calling thread.\n\n    Parameters\n    ----------\n    ctx : :py:obj:`~.CUcontext`\n        Context to destroy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_95cuCtxDetach = {"cuCtxDetach", (PyCFunction)__pyx_pw_4cuda_4cuda_95cuCtxDetach, METH_O, __pyx_doc_4cuda_4cuda_94cuCtxDetach};
static PyObject *__pyx_pw_4cuda_4cuda_95cuCtxDetach(PyObject *__pyx_self, PyObject *__pyx_v_ctx) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxDetach (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_94cuCtxDetach(__pyx_self, ((PyObject *)__pyx_v_ctx));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_94cuCtxDetach(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ctx) {
  CUcontext __pyx_v_cctx;
  PyObject *__pyx_v_pctx = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__655)
  __Pyx_RefNannySetupContext("cuCtxDetach", 0);
  __Pyx_TraceCall("cuCtxDetach", __pyx_f[0], 13712, 0, __PYX_ERR(0, 13712, __pyx_L1_error));

  /* "cuda/cuda.pyx":13739
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_ctx == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":13740
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 */
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":13739
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13741
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ctx, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":13742
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pctx = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":13743
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 *     else:
 *         pctx = int(CUcontext(ctx))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13743, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":13741
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13745
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 *         pctx = int(CUcontext(ctx))             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pctx = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":13746
 *     else:
 *         pctx = int(CUcontext(ctx))
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuCtxDetach(cctx)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13746, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":13748
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 *     err = ccuda.cuCtxDetach(cctx)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuCtxDetach(__pyx_v_cctx); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13748, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":13749
 * 
 *     err = ccuda.cuCtxDetach(cctx)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13712
 * 
 * @cython.embedsignature(True)
 * def cuCtxDetach(ctx):             # <<<<<<<<<<<<<<
 *     """ Decrement a context's usage-count.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuCtxDetach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13752
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoad(char* fname):             # <<<<<<<<<<<<<<
 *     """ Loads a compute module.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_97cuModuleLoad(PyObject *__pyx_self, PyObject *__pyx_arg_fname); /*proto*/
static char __pyx_doc_4cuda_4cuda_96cuModuleLoad[] = "cuModuleLoad(char *fname)\n Loads a compute module.\n\n    Takes a filename `fname` and loads the corresponding module `module`\n    into the current context. The CUDA driver API does not attempt to\n    lazily allocate the resources needed by a module; if the memory for\n    functions and data (constant and global) needed by the module cannot be\n    allocated, :py:obj:`~.cuModuleLoad()` fails. The file should be a\n    `cubin` file as output by nvcc, or a `PTX` file either as output by\n    nvcc or handwritten, or a `fatbin` file as output by nvcc from\n    toolchain 4.0 or later.\n\n    Parameters\n    ----------\n    fname : bytes\n        Filename of module to load\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_FILE_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_JIT_COMPILER_NOT_FOUND`\n    module : :py:obj:`~.CUmodule`\n        Returned module\n\n    See Also\n    --------\n    :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_97cuModuleLoad = {"cuModuleLoad", (PyCFunction)__pyx_pw_4cuda_4cuda_97cuModuleLoad, METH_O, __pyx_doc_4cuda_4cuda_96cuModuleLoad};
static PyObject *__pyx_pw_4cuda_4cuda_97cuModuleLoad(PyObject *__pyx_self, PyObject *__pyx_arg_fname) {
  char *__pyx_v_fname;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuModuleLoad (wrapper)", 0);
  assert(__pyx_arg_fname); {
    __pyx_v_fname = __Pyx_PyObject_AsWritableString(__pyx_arg_fname); if (unlikely((!__pyx_v_fname) && PyErr_Occurred())) __PYX_ERR(0, 13752, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuModuleLoad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_96cuModuleLoad(__pyx_self, ((char *)__pyx_v_fname));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_96cuModuleLoad(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_fname) {
  struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_module = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__656)
  __Pyx_RefNannySetupContext("cuModuleLoad", 0);
  __Pyx_TraceCall("cuModuleLoad", __pyx_f[0], 13752, 0, __PYX_ERR(0, 13752, __pyx_L1_error));

  /* "cuda/cuda.pyx":13780
 *     :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload`
 *     """
 *     cdef CUmodule module = CUmodule()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuModuleLoad(module._ptr, fname)
 *     return (CUresult(err), module)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmodule)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_module = ((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13781
 *     """
 *     cdef CUmodule module = CUmodule()
 *     err = ccuda.cuModuleLoad(module._ptr, fname)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), module)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuModuleLoad(__pyx_v_module->_ptr, __pyx_v_fname); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13781, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":13782
 *     cdef CUmodule module = CUmodule()
 *     err = ccuda.cuModuleLoad(module._ptr, fname)
 *     return (CUresult(err), module)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_module));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_module));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_module));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13752
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoad(char* fname):             # <<<<<<<<<<<<<<
 *     """ Loads a compute module.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuModuleLoad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_module);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13785
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadData(image):             # <<<<<<<<<<<<<<
 *     """ Load a module's data.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_99cuModuleLoadData(PyObject *__pyx_self, PyObject *__pyx_v_image); /*proto*/
static char __pyx_doc_4cuda_4cuda_98cuModuleLoadData[] = "cuModuleLoadData(image)\n Load a module's data.\n\n    Takes a pointer `image` and loads the corresponding module `module`\n    into the current context. The pointer may be obtained by mapping a\n    `cubin` or `PTX` or `fatbin` file, passing a `cubin` or `PTX` or\n    `fatbin` file as a NULL-terminated text string, or incorporating a\n    `cubin` or `fatbin` object into the executable resources and using\n    operating system calls such as Windows `FindResource()` to obtain the\n    pointer.\n\n    Parameters\n    ----------\n    image : Any\n        Module data to load\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_JIT_COMPILER_NOT_FOUND`\n    module : :py:obj:`~.CUmodule`\n        Returned module\n\n    See Also\n    --------\n    :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_99cuModuleLoadData = {"cuModuleLoadData", (PyCFunction)__pyx_pw_4cuda_4cuda_99cuModuleLoadData, METH_O, __pyx_doc_4cuda_4cuda_98cuModuleLoadData};
static PyObject *__pyx_pw_4cuda_4cuda_99cuModuleLoadData(PyObject *__pyx_self, PyObject *__pyx_v_image) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuModuleLoadData (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_98cuModuleLoadData(__pyx_self, ((PyObject *)__pyx_v_image));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_98cuModuleLoadData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_image) {
  struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_module = 0;
  PyObject *__pyx_v_cimage = NULL;
  void *__pyx_v_cimage_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__657)
  __Pyx_RefNannySetupContext("cuModuleLoadData", 0);
  __Pyx_TraceCall("cuModuleLoadData", __pyx_f[0], 13785, 0, __PYX_ERR(0, 13785, __pyx_L1_error));

  /* "cuda/cuda.pyx":13812
 *     :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload`
 *     """
 *     cdef CUmodule module = CUmodule()             # <<<<<<<<<<<<<<
 *     cimage = utils.HelperInputVoidPtr(image)
 *     cdef void* cimage_ptr = <void*><void_ptr>cimage.cptr
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmodule)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_module = ((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13813
 *     """
 *     cdef CUmodule module = CUmodule()
 *     cimage = utils.HelperInputVoidPtr(image)             # <<<<<<<<<<<<<<
 *     cdef void* cimage_ptr = <void*><void_ptr>cimage.cptr
 *     err = ccuda.cuModuleLoadData(module._ptr, cimage_ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_image); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cimage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13814
 *     cdef CUmodule module = CUmodule()
 *     cimage = utils.HelperInputVoidPtr(image)
 *     cdef void* cimage_ptr = <void*><void_ptr>cimage.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuModuleLoadData(module._ptr, cimage_ptr)
 *     return (CUresult(err), module)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cimage, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cimage_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":13815
 *     cimage = utils.HelperInputVoidPtr(image)
 *     cdef void* cimage_ptr = <void*><void_ptr>cimage.cptr
 *     err = ccuda.cuModuleLoadData(module._ptr, cimage_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), module)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuModuleLoadData(__pyx_v_module->_ptr, __pyx_v_cimage_ptr); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13815, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":13816
 *     cdef void* cimage_ptr = <void*><void_ptr>cimage.cptr
 *     err = ccuda.cuModuleLoadData(module._ptr, cimage_ptr)
 *     return (CUresult(err), module)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_module));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_module));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_module));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13785
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadData(image):             # <<<<<<<<<<<<<<
 *     """ Load a module's data.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuModuleLoadData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_module);
  __Pyx_XDECREF(__pyx_v_cimage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13819
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadDataEx(image, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Load a module's data with options.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_101cuModuleLoadDataEx(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_100cuModuleLoadDataEx[] = "cuModuleLoadDataEx(image, unsigned int numOptions, options: List[CUjit_option], optionValues: List[Any])\n Load a module's data with options.\n\n    Takes a pointer `image` and loads the corresponding module `module`\n    into the current context. The pointer may be obtained by mapping a\n    `cubin` or `PTX` or `fatbin` file, passing a `cubin` or `PTX` or\n    `fatbin` file as a NULL-terminated text string, or incorporating a\n    `cubin` or `fatbin` object into the executable resources and using\n    operating system calls such as Windows `FindResource()` to obtain the\n    pointer. Options are passed as an array via `options` and any\n    corresponding parameters are passed in `optionValues`. The number of\n    total options is supplied via `numOptions`. Any outputs will be\n    returned via `optionValues`.\n\n    Parameters\n    ----------\n    image : Any\n        Module data to load\n    numOptions : unsigned int\n        Number of options\n    options : List[:py:obj:`~.CUjit_option`]\n        Options for JIT\n    optionValues : List[Any]\n        Option values for JIT\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_JIT_COMPILER_NOT_FOUND`\n    module : :py:obj:`~.CUmodule`\n        Returned module\n\n    See Also\n    --------\n    :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_101cuModuleLoadDataEx = {"cuModuleLoadDataEx", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_101cuModuleLoadDataEx, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_100cuModuleLoadDataEx};
static PyObject *__pyx_pw_4cuda_4cuda_101cuModuleLoadDataEx(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_image = 0;
  unsigned int __pyx_v_numOptions;
  PyObject *__pyx_v_options = 0;
  PyObject *__pyx_v_optionValues = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuModuleLoadDataEx (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_image,&__pyx_n_s_numOptions,&__pyx_n_s_options,&__pyx_n_s_optionValues,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_image)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numOptions)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuModuleLoadDataEx", 1, 4, 4, 1); __PYX_ERR(0, 13819, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_options)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuModuleLoadDataEx", 1, 4, 4, 2); __PYX_ERR(0, 13819, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_optionValues)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuModuleLoadDataEx", 1, 4, 4, 3); __PYX_ERR(0, 13819, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuModuleLoadDataEx") < 0)) __PYX_ERR(0, 13819, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_image = values[0];
    __pyx_v_numOptions = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_numOptions == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 13819, __pyx_L3_error)
    __pyx_v_options = values[2];
    __pyx_v_optionValues = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuModuleLoadDataEx", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 13819, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuModuleLoadDataEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_100cuModuleLoadDataEx(__pyx_self, __pyx_v_image, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_18cuModuleLoadDataEx_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":13856
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_18cuModuleLoadDataEx_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_3_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 13856, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_18cuModuleLoadDataEx_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuModuleLoadDataEx_locals_genexp, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 13856, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuModuleLoadDataEx.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_18cuModuleLoadDataEx_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 13856, 0, __PYX_ERR(0, 13856, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 13856, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options)) { __Pyx_RaiseClosureNameError("options"); __PYX_ERR(0, 13856, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_options; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13856, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 13856, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13856, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 13856, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13856, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 13856, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUjit_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v__x, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 13856, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13819
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadDataEx(image, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Load a module's data with options.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_100cuModuleLoadDataEx(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_image, unsigned int __pyx_v_numOptions, PyObject *__pyx_v_options, PyObject *__pyx_v_optionValues) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *__pyx_cur_scope;
  struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_module = 0;
  PyObject *__pyx_v_cimage = NULL;
  void *__pyx_v_cimage_ptr;
  std::vector<CUjit_option>  __pyx_v_coptions;
  PyObject *__pyx_v_pylist = NULL;
  struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *__pyx_v_voidStarHelper = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_18cuModuleLoadDataEx_2generator1 = 0;
  PyObject *__pyx_9genexpr64__pyx_v_pyoptions = NULL;
  PyObject *__pyx_9genexpr65__pyx_v_pyoptions = NULL;
  PyObject *__pyx_9genexpr65__pyx_v_pyoptionValues = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  std::vector<CUjit_option>  __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *(*__pyx_t_13)(PyObject *);
  CUresult __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__658)
  __Pyx_RefNannySetupContext("cuModuleLoadDataEx", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 13819, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuModuleLoadDataEx", __pyx_f[0], 13819, 0, __PYX_ERR(0, 13819, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_options = __pyx_v_options;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_options);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_options);

  /* "cuda/cuda.pyx":13855
 *     :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload`
 *     """
 *     options = [] if options is None else options             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_options == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_options);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_options;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_options);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_options, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13856
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_18cuModuleLoadDataEx_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 13856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":13857
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")             # <<<<<<<<<<<<<<
 * 
 *     cdef CUmodule module = CUmodule()
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__659, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 13857, __pyx_L1_error)

    /* "cuda/cuda.pyx":13856
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */
  }

  /* "cuda/cuda.pyx":13859
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 *     cdef CUmodule module = CUmodule()             # <<<<<<<<<<<<<<
 *     cimage = utils.HelperInputVoidPtr(image)
 *     cdef void* cimage_ptr = <void*><void_ptr>cimage.cptr
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmodule)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_module = ((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13860
 * 
 *     cdef CUmodule module = CUmodule()
 *     cimage = utils.HelperInputVoidPtr(image)             # <<<<<<<<<<<<<<
 *     cdef void* cimage_ptr = <void*><void_ptr>cimage.cptr
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_image); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_cimage = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13861
 *     cdef CUmodule module = CUmodule()
 *     cimage = utils.HelperInputVoidPtr(image)
 *     cdef void* cimage_ptr = <void*><void_ptr>cimage.cptr             # <<<<<<<<<<<<<<
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cimage, __pyx_n_s_cptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_3); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13861, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cimage_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

  /* "cuda/cuda.pyx":13862
 *     cimage = utils.HelperInputVoidPtr(image)
 *     cdef void* cimage_ptr = <void*><void_ptr>cimage.cptr
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))             # <<<<<<<<<<<<<<
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_options;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((__pyx_v_numOptions > __pyx_t_6) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_options;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13862, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numOptions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 13862, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":13863
 *     cdef void* cimage_ptr = <void*><void_ptr>cimage.cptr
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))             # <<<<<<<<<<<<<<
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_optionValues); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13863, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_v_numOptions > __pyx_t_6) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_6 = PyObject_Length(__pyx_v_optionValues); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13863, __pyx_L1_error)
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numOptions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 13863, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":13864
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]             # <<<<<<<<<<<<<<
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13864, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_options)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_options)) {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_options; __Pyx_INCREF(__pyx_t_7); __pyx_t_6 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_options); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13864, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 13864, __pyx_L8_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 13864, __pyx_L8_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_7, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13864, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 13864, __pyx_L8_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_7, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13864, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_8(__pyx_t_7);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 13864, __pyx_L8_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr64__pyx_v_pyoptions, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr64__pyx_v_pyoptions, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13864, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 13864, __pyx_L8_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_9genexpr64__pyx_v_pyoptions); __pyx_9genexpr64__pyx_v_pyoptions = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_9genexpr64__pyx_v_pyoptions); __pyx_9genexpr64__pyx_v_pyoptions = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __pyx_t_9 = __pyx_convert_vector_from_py_CUjit_option(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 13864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_coptions = __pyx_t_9;

  /* "cuda/cuda.pyx":13865
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]             # <<<<<<<<<<<<<<
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     err = ccuda.cuModuleLoadDataEx(module._ptr, cimage_ptr, numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr)
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13865, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13865, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_options);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_options);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_cur_scope->__pyx_v_options);
    __Pyx_INCREF(__pyx_v_optionValues);
    __Pyx_GIVEREF(__pyx_v_optionValues);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_optionValues);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13865, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_7 = __pyx_t_3; __Pyx_INCREF(__pyx_t_7); __pyx_t_6 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13865, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 13865, __pyx_L14_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 13865, __pyx_L14_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_7, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13865, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 13865, __pyx_L14_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_7, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13865, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_8(__pyx_t_7);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 13865, __pyx_L14_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
        PyObject* sequence = __pyx_t_3;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 13865, __pyx_L14_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_11 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_11);
        #else
        __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 13865, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 13865, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_12 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 13865, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext;
        index = 0; __pyx_t_10 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_10)) goto __pyx_L17_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_10);
        index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L17_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_11);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(0, 13865, __pyx_L14_error)
        __pyx_t_13 = NULL;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L18_unpacking_done;
        __pyx_L17_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_13 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 13865, __pyx_L14_error)
        __pyx_L18_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr65__pyx_v_pyoptions, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_XDECREF_SET(__pyx_9genexpr65__pyx_v_pyoptionValues, __pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13865, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_9genexpr65__pyx_v_pyoptions);
      __Pyx_GIVEREF(__pyx_9genexpr65__pyx_v_pyoptions);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr65__pyx_v_pyoptions);
      __Pyx_INCREF(__pyx_9genexpr65__pyx_v_pyoptionValues);
      __Pyx_GIVEREF(__pyx_9genexpr65__pyx_v_pyoptionValues);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr65__pyx_v_pyoptionValues);
      __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUjit_option), __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 13865, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 13865, __pyx_L14_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_9genexpr65__pyx_v_pyoptionValues); __pyx_9genexpr65__pyx_v_pyoptionValues = 0;
    __Pyx_XDECREF(__pyx_9genexpr65__pyx_v_pyoptions); __pyx_9genexpr65__pyx_v_pyoptions = 0;
    goto __pyx_L19_exit_scope;
    __pyx_L14_error:;
    __Pyx_XDECREF(__pyx_9genexpr65__pyx_v_pyoptionValues); __pyx_9genexpr65__pyx_v_pyoptionValues = 0;
    __Pyx_XDECREF(__pyx_9genexpr65__pyx_v_pyoptions); __pyx_9genexpr65__pyx_v_pyoptions = 0;
    goto __pyx_L1_error;
    __pyx_L19_exit_scope:;
  } /* exit inner scope */
  __pyx_v_pylist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13866
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)             # <<<<<<<<<<<<<<
 *     err = ccuda.cuModuleLoadDataEx(module._ptr, cimage_ptr, numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr)
 *     return (CUresult(err), module)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_InputVoidPtrPtrHelper), __pyx_v_pylist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_voidStarHelper = ((struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13867
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     err = ccuda.cuModuleLoadDataEx(module._ptr, cimage_ptr, numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), module)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_voidStarHelper), __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13867, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_14 = __pyx_f_4cuda_5ccuda_cuModuleLoadDataEx(__pyx_v_module->_ptr, __pyx_v_cimage_ptr, __pyx_v_numOptions, __pyx_v_coptions.data(), ((void **)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5))); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13867, __pyx_L1_error)
  __pyx_v_err = __pyx_t_14;

  /* "cuda/cuda.pyx":13868
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     err = ccuda.cuModuleLoadDataEx(module._ptr, cimage_ptr, numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr)
 *     return (CUresult(err), module)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_11 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 13868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_11);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_module));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_module));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_module));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13819
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadDataEx(image, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Load a module's data with options.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuModuleLoadDataEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_module);
  __Pyx_XDECREF(__pyx_v_cimage);
  __Pyx_XDECREF(__pyx_v_pylist);
  __Pyx_XDECREF((PyObject *)__pyx_v_voidStarHelper);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_18cuModuleLoadDataEx_2generator1);
  __Pyx_XDECREF(__pyx_9genexpr64__pyx_v_pyoptions);
  __Pyx_XDECREF(__pyx_9genexpr65__pyx_v_pyoptions);
  __Pyx_XDECREF(__pyx_9genexpr65__pyx_v_pyoptionValues);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13871
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadFatBinary(fatCubin):             # <<<<<<<<<<<<<<
 *     """ Load a module's data.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_103cuModuleLoadFatBinary(PyObject *__pyx_self, PyObject *__pyx_v_fatCubin); /*proto*/
static char __pyx_doc_4cuda_4cuda_102cuModuleLoadFatBinary[] = "cuModuleLoadFatBinary(fatCubin)\n Load a module's data.\n\n    Takes a pointer `fatCubin` and loads the corresponding module `module`\n    into the current context. The pointer represents a `fat binary` object,\n    which is a collection of different `cubin` and/or `PTX` files, all\n    representing the same device code, but compiled and optimized for\n    different architectures.\n\n    Prior to CUDA 4.0, there was no documented API for constructing and\n    using fat binary objects by programmers. Starting with CUDA 4.0, fat\n    binary objects can be constructed by providing the `-fatbin option` to\n    nvcc. More information can be found in the nvcc document.\n\n    Parameters\n    ----------\n    fatCubin : Any\n        Fat binary to load\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_JIT_COMPILER_NOT_FOUND`\n    module : :py:obj:`~.CUmodule`\n        Returned module\n\n    See Also\n    --------\n    :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleUnload`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_103cuModuleLoadFatBinary = {"cuModuleLoadFatBinary", (PyCFunction)__pyx_pw_4cuda_4cuda_103cuModuleLoadFatBinary, METH_O, __pyx_doc_4cuda_4cuda_102cuModuleLoadFatBinary};
static PyObject *__pyx_pw_4cuda_4cuda_103cuModuleLoadFatBinary(PyObject *__pyx_self, PyObject *__pyx_v_fatCubin) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuModuleLoadFatBinary (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_102cuModuleLoadFatBinary(__pyx_self, ((PyObject *)__pyx_v_fatCubin));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_102cuModuleLoadFatBinary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fatCubin) {
  struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_module = 0;
  PyObject *__pyx_v_cfatCubin = NULL;
  void *__pyx_v_cfatCubin_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__661)
  __Pyx_RefNannySetupContext("cuModuleLoadFatBinary", 0);
  __Pyx_TraceCall("cuModuleLoadFatBinary", __pyx_f[0], 13871, 0, __PYX_ERR(0, 13871, __pyx_L1_error));

  /* "cuda/cuda.pyx":13901
 *     :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleUnload`
 *     """
 *     cdef CUmodule module = CUmodule()             # <<<<<<<<<<<<<<
 *     cfatCubin = utils.HelperInputVoidPtr(fatCubin)
 *     cdef void* cfatCubin_ptr = <void*><void_ptr>cfatCubin.cptr
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmodule)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_module = ((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13902
 *     """
 *     cdef CUmodule module = CUmodule()
 *     cfatCubin = utils.HelperInputVoidPtr(fatCubin)             # <<<<<<<<<<<<<<
 *     cdef void* cfatCubin_ptr = <void*><void_ptr>cfatCubin.cptr
 *     err = ccuda.cuModuleLoadFatBinary(module._ptr, cfatCubin_ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_fatCubin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cfatCubin = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13903
 *     cdef CUmodule module = CUmodule()
 *     cfatCubin = utils.HelperInputVoidPtr(fatCubin)
 *     cdef void* cfatCubin_ptr = <void*><void_ptr>cfatCubin.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuModuleLoadFatBinary(module._ptr, cfatCubin_ptr)
 *     return (CUresult(err), module)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cfatCubin, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cfatCubin_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":13904
 *     cfatCubin = utils.HelperInputVoidPtr(fatCubin)
 *     cdef void* cfatCubin_ptr = <void*><void_ptr>cfatCubin.cptr
 *     err = ccuda.cuModuleLoadFatBinary(module._ptr, cfatCubin_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), module)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuModuleLoadFatBinary(__pyx_v_module->_ptr, __pyx_v_cfatCubin_ptr); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13904, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":13905
 *     cdef void* cfatCubin_ptr = <void*><void_ptr>cfatCubin.cptr
 *     err = ccuda.cuModuleLoadFatBinary(module._ptr, cfatCubin_ptr)
 *     return (CUresult(err), module)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_module));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_module));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_module));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13871
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadFatBinary(fatCubin):             # <<<<<<<<<<<<<<
 *     """ Load a module's data.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuModuleLoadFatBinary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_module);
  __Pyx_XDECREF(__pyx_v_cfatCubin);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13908
 * 
 * @cython.embedsignature(True)
 * def cuModuleUnload(hmod):             # <<<<<<<<<<<<<<
 *     """ Unloads a module.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_105cuModuleUnload(PyObject *__pyx_self, PyObject *__pyx_v_hmod); /*proto*/
static char __pyx_doc_4cuda_4cuda_104cuModuleUnload[] = "cuModuleUnload(hmod)\n Unloads a module.\n\n    Unloads a module `hmod` from the current context.\n\n    Parameters\n    ----------\n    hmod : :py:obj:`~.CUmodule`\n        Module to unload\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_105cuModuleUnload = {"cuModuleUnload", (PyCFunction)__pyx_pw_4cuda_4cuda_105cuModuleUnload, METH_O, __pyx_doc_4cuda_4cuda_104cuModuleUnload};
static PyObject *__pyx_pw_4cuda_4cuda_105cuModuleUnload(PyObject *__pyx_self, PyObject *__pyx_v_hmod) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuModuleUnload (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_104cuModuleUnload(__pyx_self, ((PyObject *)__pyx_v_hmod));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_104cuModuleUnload(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hmod) {
  CUmodule __pyx_v_chmod;
  PyObject *__pyx_v_phmod = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__662)
  __Pyx_RefNannySetupContext("cuModuleUnload", 0);
  __Pyx_TraceCall("cuModuleUnload", __pyx_f[0], 13908, 0, __PYX_ERR(0, 13908, __pyx_L1_error));

  /* "cuda/cuda.pyx":13928
 *     """
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 */
  __pyx_t_1 = (__pyx_v_hmod == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":13929
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)
 */
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":13928
 *     """
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13930
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):             # <<<<<<<<<<<<<<
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hmod, __pyx_ptype_4cuda_4cuda_CUmodule); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":13931
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hmod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phmod = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":13932
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod             # <<<<<<<<<<<<<<
 *     else:
 *         phmod = int(CUmodule(hmod))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phmod); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13932, __pyx_L1_error)
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":13930
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):             # <<<<<<<<<<<<<<
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13934
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 *     else:
 *         phmod = int(CUmodule(hmod))             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmodule), __pyx_v_hmod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phmod = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":13935
 *     else:
 *         phmod = int(CUmodule(hmod))
 *         chmod = <ccuda.CUmodule><void_ptr>phmod             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuModuleUnload(chmod)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phmod); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13935, __pyx_L1_error)
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":13937
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 * 
 *     err = ccuda.cuModuleUnload(chmod)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuModuleUnload(__pyx_v_chmod); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13937, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":13938
 * 
 *     err = ccuda.cuModuleUnload(chmod)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13908
 * 
 * @cython.embedsignature(True)
 * def cuModuleUnload(hmod):             # <<<<<<<<<<<<<<
 *     """ Unloads a module.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuModuleUnload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phmod);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13941
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetLoadingMode():             # <<<<<<<<<<<<<<
 *     """ Query lazy loading mode.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_107cuModuleGetLoadingMode(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_106cuModuleGetLoadingMode[] = "cuModuleGetLoadingMode()\n Query lazy loading mode.\n\n    Returns lazy loading mode Module loading mode is controlled by\n    CUDA_MODULE_LOADING env variable\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n    mode : :py:obj:`~.CUmoduleLoadingMode`\n        Returns the lazy loading mode\n\n    See Also\n    --------\n    :py:obj:`~.cuModuleLoad`,\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_107cuModuleGetLoadingMode = {"cuModuleGetLoadingMode", (PyCFunction)__pyx_pw_4cuda_4cuda_107cuModuleGetLoadingMode, METH_NOARGS, __pyx_doc_4cuda_4cuda_106cuModuleGetLoadingMode};
static PyObject *__pyx_pw_4cuda_4cuda_107cuModuleGetLoadingMode(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuModuleGetLoadingMode (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_106cuModuleGetLoadingMode(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_106cuModuleGetLoadingMode(CYTHON_UNUSED PyObject *__pyx_self) {
  CUmoduleLoadingMode __pyx_v_mode;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__663)
  __Pyx_RefNannySetupContext("cuModuleGetLoadingMode", 0);
  __Pyx_TraceCall("cuModuleGetLoadingMode", __pyx_f[0], 13941, 0, __PYX_ERR(0, 13941, __pyx_L1_error));

  /* "cuda/cuda.pyx":13959
 *     """
 *     cdef ccuda.CUmoduleLoadingMode mode
 *     err = ccuda.cuModuleGetLoadingMode(&mode)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUmoduleLoadingMode(mode))
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuModuleGetLoadingMode((&__pyx_v_mode)); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 13959, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":13960
 *     cdef ccuda.CUmoduleLoadingMode mode
 *     err = ccuda.cuModuleGetLoadingMode(&mode)
 *     return (CUresult(err), CUmoduleLoadingMode(mode))             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUmoduleLoadingMode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__CUmoduleLoadingMode_enum(__pyx_v_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13941
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetLoadingMode():             # <<<<<<<<<<<<<<
 *     """ Query lazy loading mode.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuModuleGetLoadingMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":13963
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetFunction(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a function handle.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_109cuModuleGetFunction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_108cuModuleGetFunction[] = "cuModuleGetFunction(hmod, char *name)\n Returns a function handle.\n\n    Returns in `*hfunc` the handle of the function of name `name` located\n    in module `hmod`. If no function of that name exists,\n    :py:obj:`~.cuModuleGetFunction()` returns\n    :py:obj:`~.CUDA_ERROR_NOT_FOUND`.\n\n    Parameters\n    ----------\n    hmod : :py:obj:`~.CUmodule`\n        Module to retrieve function from\n    name : bytes\n        Name of function to retrieve\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`\n    hfunc : :py:obj:`~.CUfunction`\n        Returned function handle\n\n    See Also\n    --------\n    :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_109cuModuleGetFunction = {"cuModuleGetFunction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_109cuModuleGetFunction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_108cuModuleGetFunction};
static PyObject *__pyx_pw_4cuda_4cuda_109cuModuleGetFunction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hmod = 0;
  char *__pyx_v_name;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuModuleGetFunction (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hmod,&__pyx_n_s_name_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hmod)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuModuleGetFunction", 1, 2, 2, 1); __PYX_ERR(0, 13963, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuModuleGetFunction") < 0)) __PYX_ERR(0, 13963, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hmod = values[0];
    __pyx_v_name = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(0, 13963, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuModuleGetFunction", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 13963, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuModuleGetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_108cuModuleGetFunction(__pyx_self, __pyx_v_hmod, __pyx_v_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_108cuModuleGetFunction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hmod, char *__pyx_v_name) {
  CUmodule __pyx_v_chmod;
  PyObject *__pyx_v_phmod = NULL;
  struct __pyx_obj_4cuda_4cuda_CUfunction *__pyx_v_hfunc = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__664)
  __Pyx_RefNannySetupContext("cuModuleGetFunction", 0);
  __Pyx_TraceCall("cuModuleGetFunction", __pyx_f[0], 13963, 0, __PYX_ERR(0, 13963, __pyx_L1_error));

  /* "cuda/cuda.pyx":13990
 *     """
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 */
  __pyx_t_1 = (__pyx_v_hmod == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":13991
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)
 */
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":13990
 *     """
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13992
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):             # <<<<<<<<<<<<<<
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hmod, __pyx_ptype_4cuda_4cuda_CUmodule); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":13993
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hmod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phmod = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":13994
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod             # <<<<<<<<<<<<<<
 *     else:
 *         phmod = int(CUmodule(hmod))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phmod); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13994, __pyx_L1_error)
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":13992
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):             # <<<<<<<<<<<<<<
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":13996
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 *     else:
 *         phmod = int(CUmodule(hmod))             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmodule), __pyx_v_hmod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phmod = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":13997
 *     else:
 *         phmod = int(CUmodule(hmod))
 *         chmod = <ccuda.CUmodule><void_ptr>phmod             # <<<<<<<<<<<<<<
 * 
 *     cdef CUfunction hfunc = CUfunction()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phmod); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 13997, __pyx_L1_error)
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":13999
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 * 
 *     cdef CUfunction hfunc = CUfunction()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuModuleGetFunction(hfunc._ptr, chmod, name)
 *     return (CUresult(err), hfunc)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_hfunc = ((struct __pyx_obj_4cuda_4cuda_CUfunction *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":14000
 * 
 *     cdef CUfunction hfunc = CUfunction()
 *     err = ccuda.cuModuleGetFunction(hfunc._ptr, chmod, name)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), hfunc)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuModuleGetFunction(__pyx_v_hfunc->_ptr, __pyx_v_chmod, __pyx_v_name); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14000, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":14001
 *     cdef CUfunction hfunc = CUfunction()
 *     err = ccuda.cuModuleGetFunction(hfunc._ptr, chmod, name)
 *     return (CUresult(err), hfunc)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_hfunc));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_hfunc));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_hfunc));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":13963
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetFunction(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a function handle.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuModuleGetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phmod);
  __Pyx_XDECREF((PyObject *)__pyx_v_hfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14004
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetGlobal(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a global pointer from a module.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_111cuModuleGetGlobal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_110cuModuleGetGlobal[] = "cuModuleGetGlobal(hmod, char *name)\n Returns a global pointer from a module.\n\n    Returns in `*dptr` and `*bytes` the base pointer and size of the global\n    of name `name` located in module `hmod`. If no variable of that name\n    exists, :py:obj:`~.cuModuleGetGlobal()` returns\n    :py:obj:`~.CUDA_ERROR_NOT_FOUND`. Both parameters `dptr` and `numbytes`\n    are optional. If one of them is NULL, it is ignored.\n\n    Parameters\n    ----------\n    hmod : :py:obj:`~.CUmodule`\n        Module to retrieve global from\n    name : bytes\n        Name of global to retrieve\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`\n    dptr : :py:obj:`~.CUdeviceptr`\n        Returned global device pointer\n    numbytes : int\n        Returned global size in bytes\n\n    See Also\n    --------\n    :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload`, :py:obj:`~.cudaGetSymbolAddress`, :py:obj:`~.cudaGetSymbolSize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_111cuModuleGetGlobal = {"cuModuleGetGlobal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_111cuModuleGetGlobal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_110cuModuleGetGlobal};
static PyObject *__pyx_pw_4cuda_4cuda_111cuModuleGetGlobal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hmod = 0;
  char *__pyx_v_name;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuModuleGetGlobal (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hmod,&__pyx_n_s_name_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hmod)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuModuleGetGlobal", 1, 2, 2, 1); __PYX_ERR(0, 14004, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuModuleGetGlobal") < 0)) __PYX_ERR(0, 14004, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hmod = values[0];
    __pyx_v_name = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(0, 14004, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuModuleGetGlobal", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 14004, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuModuleGetGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_110cuModuleGetGlobal(__pyx_self, __pyx_v_hmod, __pyx_v_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_110cuModuleGetGlobal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hmod, char *__pyx_v_name) {
  CUmodule __pyx_v_chmod;
  PyObject *__pyx_v_phmod = NULL;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_dptr = 0;
  size_t __pyx_v_numbytes;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__665)
  __Pyx_RefNannySetupContext("cuModuleGetGlobal", 0);
  __Pyx_TraceCall("cuModuleGetGlobal", __pyx_f[0], 14004, 0, __PYX_ERR(0, 14004, __pyx_L1_error));

  /* "cuda/cuda.pyx":14034
 *     """
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 */
  __pyx_t_1 = (__pyx_v_hmod == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":14035
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)
 */
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":14034
 *     """
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14036
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):             # <<<<<<<<<<<<<<
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hmod, __pyx_ptype_4cuda_4cuda_CUmodule); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":14037
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hmod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phmod = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":14038
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod             # <<<<<<<<<<<<<<
 *     else:
 *         phmod = int(CUmodule(hmod))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phmod); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14038, __pyx_L1_error)
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":14036
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):             # <<<<<<<<<<<<<<
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14040
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 *     else:
 *         phmod = int(CUmodule(hmod))             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmodule), __pyx_v_hmod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phmod = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":14041
 *     else:
 *         phmod = int(CUmodule(hmod))
 *         chmod = <ccuda.CUmodule><void_ptr>phmod             # <<<<<<<<<<<<<<
 * 
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phmod); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14041, __pyx_L1_error)
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":14043
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 * 
 *     cdef CUdeviceptr dptr = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     cdef size_t numbytes = 0
 *     err = ccuda.cuModuleGetGlobal(dptr._ptr, &numbytes, chmod, name)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_dptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":14044
 * 
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 *     cdef size_t numbytes = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuModuleGetGlobal(dptr._ptr, &numbytes, chmod, name)
 *     return (CUresult(err), dptr, numbytes)
 */
  __pyx_v_numbytes = 0;

  /* "cuda/cuda.pyx":14045
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 *     cdef size_t numbytes = 0
 *     err = ccuda.cuModuleGetGlobal(dptr._ptr, &numbytes, chmod, name)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), dptr, numbytes)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuModuleGetGlobal(__pyx_v_dptr->_ptr, (&__pyx_v_numbytes), __pyx_v_chmod, __pyx_v_name); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14045, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":14046
 *     cdef size_t numbytes = 0
 *     err = ccuda.cuModuleGetGlobal(dptr._ptr, &numbytes, chmod, name)
 *     return (CUresult(err), dptr, numbytes)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_numbytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_dptr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dptr));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_dptr));
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14004
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetGlobal(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a global pointer from a module.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuModuleGetGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phmod);
  __Pyx_XDECREF((PyObject *)__pyx_v_dptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14049
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetTexRef(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_113cuModuleGetTexRef(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_112cuModuleGetTexRef[] = "cuModuleGetTexRef(hmod, char *name)\n Returns a handle to a texture reference.\n\n    Returns in `*pTexRef` the handle of the texture reference of name\n    `name` in the module `hmod`. If no texture reference of that name\n    exists, :py:obj:`~.cuModuleGetTexRef()` returns\n    :py:obj:`~.CUDA_ERROR_NOT_FOUND`. This texture reference handle should\n    not be destroyed, since it will be destroyed when the module is\n    unloaded.\n\n    Parameters\n    ----------\n    hmod : :py:obj:`~.CUmodule`\n        Module to retrieve texture reference from\n    name : bytes\n        Name of texture reference to retrieve\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`\n    pTexRef : :py:obj:`~.CUtexref`\n        Returned texture reference\n\n    See Also\n    --------\n    :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetSurfRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload`, :py:obj:`~.cudaGetTextureReference`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_113cuModuleGetTexRef = {"cuModuleGetTexRef", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_113cuModuleGetTexRef, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_112cuModuleGetTexRef};
static PyObject *__pyx_pw_4cuda_4cuda_113cuModuleGetTexRef(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hmod = 0;
  char *__pyx_v_name;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuModuleGetTexRef (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hmod,&__pyx_n_s_name_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hmod)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuModuleGetTexRef", 1, 2, 2, 1); __PYX_ERR(0, 14049, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuModuleGetTexRef") < 0)) __PYX_ERR(0, 14049, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hmod = values[0];
    __pyx_v_name = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(0, 14049, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuModuleGetTexRef", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 14049, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuModuleGetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_112cuModuleGetTexRef(__pyx_self, __pyx_v_hmod, __pyx_v_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_112cuModuleGetTexRef(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hmod, char *__pyx_v_name) {
  CUmodule __pyx_v_chmod;
  PyObject *__pyx_v_phmod = NULL;
  struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_pTexRef = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__666)
  __Pyx_RefNannySetupContext("cuModuleGetTexRef", 0);
  __Pyx_TraceCall("cuModuleGetTexRef", __pyx_f[0], 14049, 0, __PYX_ERR(0, 14049, __pyx_L1_error));

  /* "cuda/cuda.pyx":14078
 *     """
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 */
  __pyx_t_1 = (__pyx_v_hmod == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":14079
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)
 */
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":14078
 *     """
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14080
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):             # <<<<<<<<<<<<<<
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hmod, __pyx_ptype_4cuda_4cuda_CUmodule); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":14081
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hmod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phmod = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":14082
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod             # <<<<<<<<<<<<<<
 *     else:
 *         phmod = int(CUmodule(hmod))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phmod); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14082, __pyx_L1_error)
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":14080
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):             # <<<<<<<<<<<<<<
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14084
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 *     else:
 *         phmod = int(CUmodule(hmod))             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmodule), __pyx_v_hmod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phmod = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":14085
 *     else:
 *         phmod = int(CUmodule(hmod))
 *         chmod = <ccuda.CUmodule><void_ptr>phmod             # <<<<<<<<<<<<<<
 * 
 *     cdef CUtexref pTexRef = CUtexref()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phmod); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14085, __pyx_L1_error)
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":14087
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 * 
 *     cdef CUtexref pTexRef = CUtexref()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuModuleGetTexRef(pTexRef._ptr, chmod, name)
 *     return (CUresult(err), pTexRef)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pTexRef = ((struct __pyx_obj_4cuda_4cuda_CUtexref *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":14088
 * 
 *     cdef CUtexref pTexRef = CUtexref()
 *     err = ccuda.cuModuleGetTexRef(pTexRef._ptr, chmod, name)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pTexRef)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuModuleGetTexRef(__pyx_v_pTexRef->_ptr, __pyx_v_chmod, __pyx_v_name); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14088, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":14089
 *     cdef CUtexref pTexRef = CUtexref()
 *     err = ccuda.cuModuleGetTexRef(pTexRef._ptr, chmod, name)
 *     return (CUresult(err), pTexRef)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pTexRef));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pTexRef));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pTexRef));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14049
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetTexRef(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuModuleGetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phmod);
  __Pyx_XDECREF((PyObject *)__pyx_v_pTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14092
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetSurfRef(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a surface reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_115cuModuleGetSurfRef(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_114cuModuleGetSurfRef[] = "cuModuleGetSurfRef(hmod, char *name)\n Returns a handle to a surface reference.\n\n    Returns in `*pSurfRef` the handle of the surface reference of name\n    `name` in the module `hmod`. If no surface reference of that name\n    exists, :py:obj:`~.cuModuleGetSurfRef()` returns\n    :py:obj:`~.CUDA_ERROR_NOT_FOUND`.\n\n    Parameters\n    ----------\n    hmod : :py:obj:`~.CUmodule`\n        Module to retrieve surface reference from\n    name : bytes\n        Name of surface reference to retrieve\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`\n    pSurfRef : :py:obj:`~.CUsurfref`\n        Returned surface reference\n\n    See Also\n    --------\n    :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload`, :py:obj:`~.cudaGetSurfaceReference`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_115cuModuleGetSurfRef = {"cuModuleGetSurfRef", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_115cuModuleGetSurfRef, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_114cuModuleGetSurfRef};
static PyObject *__pyx_pw_4cuda_4cuda_115cuModuleGetSurfRef(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hmod = 0;
  char *__pyx_v_name;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuModuleGetSurfRef (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hmod,&__pyx_n_s_name_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hmod)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuModuleGetSurfRef", 1, 2, 2, 1); __PYX_ERR(0, 14092, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuModuleGetSurfRef") < 0)) __PYX_ERR(0, 14092, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hmod = values[0];
    __pyx_v_name = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(0, 14092, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuModuleGetSurfRef", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 14092, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuModuleGetSurfRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_114cuModuleGetSurfRef(__pyx_self, __pyx_v_hmod, __pyx_v_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_114cuModuleGetSurfRef(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hmod, char *__pyx_v_name) {
  CUmodule __pyx_v_chmod;
  PyObject *__pyx_v_phmod = NULL;
  struct __pyx_obj_4cuda_4cuda_CUsurfref *__pyx_v_pSurfRef = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__667)
  __Pyx_RefNannySetupContext("cuModuleGetSurfRef", 0);
  __Pyx_TraceCall("cuModuleGetSurfRef", __pyx_f[0], 14092, 0, __PYX_ERR(0, 14092, __pyx_L1_error));

  /* "cuda/cuda.pyx":14119
 *     """
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 */
  __pyx_t_1 = (__pyx_v_hmod == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":14120
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)
 */
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":14119
 *     """
 *     cdef ccuda.CUmodule chmod
 *     if hmod is None:             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14121
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):             # <<<<<<<<<<<<<<
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hmod, __pyx_ptype_4cuda_4cuda_CUmodule); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":14122
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hmod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phmod = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":14123
 *     elif isinstance(hmod, (CUmodule)):
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod             # <<<<<<<<<<<<<<
 *     else:
 *         phmod = int(CUmodule(hmod))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phmod); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14123, __pyx_L1_error)
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":14121
 *     if hmod is None:
 *         chmod = <ccuda.CUmodule><void_ptr>0
 *     elif isinstance(hmod, (CUmodule)):             # <<<<<<<<<<<<<<
 *         phmod = int(hmod)
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14125
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 *     else:
 *         phmod = int(CUmodule(hmod))             # <<<<<<<<<<<<<<
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmodule), __pyx_v_hmod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phmod = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":14126
 *     else:
 *         phmod = int(CUmodule(hmod))
 *         chmod = <ccuda.CUmodule><void_ptr>phmod             # <<<<<<<<<<<<<<
 * 
 *     cdef CUsurfref pSurfRef = CUsurfref()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phmod); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14126, __pyx_L1_error)
    __pyx_v_chmod = ((CUmodule)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":14128
 *         chmod = <ccuda.CUmodule><void_ptr>phmod
 * 
 *     cdef CUsurfref pSurfRef = CUsurfref()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuModuleGetSurfRef(pSurfRef._ptr, chmod, name)
 *     return (CUresult(err), pSurfRef)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUsurfref)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pSurfRef = ((struct __pyx_obj_4cuda_4cuda_CUsurfref *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":14129
 * 
 *     cdef CUsurfref pSurfRef = CUsurfref()
 *     err = ccuda.cuModuleGetSurfRef(pSurfRef._ptr, chmod, name)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pSurfRef)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuModuleGetSurfRef(__pyx_v_pSurfRef->_ptr, __pyx_v_chmod, __pyx_v_name); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14129, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":14130
 *     cdef CUsurfref pSurfRef = CUsurfref()
 *     err = ccuda.cuModuleGetSurfRef(pSurfRef._ptr, chmod, name)
 *     return (CUresult(err), pSurfRef)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pSurfRef));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pSurfRef));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pSurfRef));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14092
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetSurfRef(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a surface reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuModuleGetSurfRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phmod);
  __Pyx_XDECREF((PyObject *)__pyx_v_pSurfRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14133
 * 
 * @cython.embedsignature(True)
 * def cuLinkCreate(unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Creates a pending JIT linker invocation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_117cuLinkCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_116cuLinkCreate[] = "cuLinkCreate(unsigned int numOptions, options: List[CUjit_option], optionValues: List[Any])\n Creates a pending JIT linker invocation.\n\n    If the call is successful, the caller owns the returned CUlinkState,\n    which should eventually be destroyed with :py:obj:`~.cuLinkDestroy`.\n    The device code machine size (32 or 64 bit) will match the calling\n    application.\n\n    Both linker and compiler options may be specified. Compiler options\n    will be applied to inputs to this linker action which must be compiled\n    from PTX. The options :py:obj:`~.CU_JIT_WALL_TIME`,\n    :py:obj:`~.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES`, and\n    :py:obj:`~.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES` will accumulate data\n    until the CUlinkState is destroyed.\n\n    `optionValues` must remain valid for the life of the CUlinkState if\n    output options are used. No other references to inputs are maintained\n    after this call returns.\n\n    Parameters\n    ----------\n    numOptions : unsigned int\n        Size of options arrays\n    options : List[:py:obj:`~.CUjit_option`]\n        Array of linker and compiler options\n    optionValues : List[Any]\n        Array of option values, each cast to void *\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_JIT_COMPILER_NOT_FOUND`\n    stateOut : :py:obj:`~.CUlinkState`\n        On success, this will contain a CUlinkState to specify and complete\n        this action\n\n    See Also\n    --------\n    :py:obj:`~.cuLinkAddData`, :py:obj:`~.cuLinkAddFile`, :py:obj:`~.cuLinkComplete`, :py:obj:`~.cuLinkDestroy`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_117cuLinkCreate = {"cuLinkCreate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_117cuLinkCreate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_116cuLinkCreate};
static PyObject *__pyx_pw_4cuda_4cuda_117cuLinkCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_numOptions;
  PyObject *__pyx_v_options = 0;
  PyObject *__pyx_v_optionValues = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLinkCreate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_numOptions,&__pyx_n_s_options,&__pyx_n_s_optionValues,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numOptions)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_options)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkCreate", 1, 3, 3, 1); __PYX_ERR(0, 14133, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_optionValues)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkCreate", 1, 3, 3, 2); __PYX_ERR(0, 14133, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuLinkCreate") < 0)) __PYX_ERR(0, 14133, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_numOptions = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_numOptions == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 14133, __pyx_L3_error)
    __pyx_v_options = values[1];
    __pyx_v_optionValues = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuLinkCreate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 14133, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLinkCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_116cuLinkCreate(__pyx_self, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_12cuLinkCreate_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":14174
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_12cuLinkCreate_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_5_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_5_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 14174, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_12cuLinkCreate_2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuLinkCreate_locals_genexpr, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 14174, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLinkCreate.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_12cuLinkCreate_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 14174, 0, __PYX_ERR(0, 14174, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 14174, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options)) { __Pyx_RaiseClosureNameError("options"); __PYX_ERR(0, 14174, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_options; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14174, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 14174, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14174, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 14174, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14174, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 14174, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUjit_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v__x, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 14174, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14133
 * 
 * @cython.embedsignature(True)
 * def cuLinkCreate(unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Creates a pending JIT linker invocation.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_116cuLinkCreate(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_numOptions, PyObject *__pyx_v_options, PyObject *__pyx_v_optionValues) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *__pyx_cur_scope;
  std::vector<CUjit_option>  __pyx_v_coptions;
  PyObject *__pyx_v_pylist = NULL;
  struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *__pyx_v_voidStarHelper = 0;
  struct __pyx_obj_4cuda_4cuda_CUlinkState *__pyx_v_stateOut = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_v_option = NULL;
  PyObject *__pyx_gb_4cuda_4cuda_12cuLinkCreate_2generator2 = 0;
  PyObject *__pyx_9genexpr67__pyx_v_pyoptions = NULL;
  PyObject *__pyx_9genexpr68__pyx_v_pyoptions = NULL;
  PyObject *__pyx_9genexpr68__pyx_v_pyoptionValues = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  std::vector<CUjit_option>  __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_13;
  CUresult __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__668)
  __Pyx_RefNannySetupContext("cuLinkCreate", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 14133, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuLinkCreate", __pyx_f[0], 14133, 0, __PYX_ERR(0, 14133, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_options = __pyx_v_options;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_options);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_options);

  /* "cuda/cuda.pyx":14173
 *     :py:obj:`~.cuLinkAddData`, :py:obj:`~.cuLinkAddFile`, :py:obj:`~.cuLinkComplete`, :py:obj:`~.cuLinkDestroy`
 *     """
 *     options = [] if options is None else options             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_options == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_options);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_options;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_options);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_options, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14174
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_12cuLinkCreate_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 14174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":14175
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")             # <<<<<<<<<<<<<<
 * 
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__659, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 14175, __pyx_L1_error)

    /* "cuda/cuda.pyx":14174
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */
  }

  /* "cuda/cuda.pyx":14177
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))             # <<<<<<<<<<<<<<
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_options;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 14177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((__pyx_v_numOptions > __pyx_t_5) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_options;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 14177, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numOptions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 14177, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":14178
 * 
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))             # <<<<<<<<<<<<<<
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_optionValues); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 14178, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_v_numOptions > __pyx_t_5) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_5 = PyObject_Length(__pyx_v_optionValues); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 14178, __pyx_L1_error)
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_kp_u__660); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numOptions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 14178, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":14179
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]             # <<<<<<<<<<<<<<
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14179, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_options)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_options)) {
      __pyx_t_6 = __pyx_cur_scope->__pyx_v_options; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_options); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14179, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14179, __pyx_L8_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 14179, __pyx_L8_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14179, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 14179, __pyx_L8_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14179, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_7(__pyx_t_6);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 14179, __pyx_L8_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr67__pyx_v_pyoptions, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr67__pyx_v_pyoptions, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14179, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 14179, __pyx_L8_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_9genexpr67__pyx_v_pyoptions); __pyx_9genexpr67__pyx_v_pyoptions = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_9genexpr67__pyx_v_pyoptions); __pyx_9genexpr67__pyx_v_pyoptions = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __pyx_t_8 = __pyx_convert_vector_from_py_CUjit_option(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 14179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_coptions = __pyx_t_8;

  /* "cuda/cuda.pyx":14180
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]             # <<<<<<<<<<<<<<
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     cdef CUlinkState stateOut = CUlinkState()
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14180, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14180, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_options);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_options);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_options);
    __Pyx_INCREF(__pyx_v_optionValues);
    __Pyx_GIVEREF(__pyx_v_optionValues);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_optionValues);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14180, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14180, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14180, __pyx_L14_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 14180, __pyx_L14_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14180, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 14180, __pyx_L14_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14180, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_7(__pyx_t_6);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 14180, __pyx_L14_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
        PyObject* sequence = __pyx_t_3;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 14180, __pyx_L14_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        #else
        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 14180, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 14180, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 14180, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
        index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L17_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L17_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_10);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 14180, __pyx_L14_error)
        __pyx_t_12 = NULL;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L18_unpacking_done;
        __pyx_L17_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_12 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 14180, __pyx_L14_error)
        __pyx_L18_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr68__pyx_v_pyoptions, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_9genexpr68__pyx_v_pyoptionValues, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14180, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_9genexpr68__pyx_v_pyoptions);
      __Pyx_GIVEREF(__pyx_9genexpr68__pyx_v_pyoptions);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr68__pyx_v_pyoptions);
      __Pyx_INCREF(__pyx_9genexpr68__pyx_v_pyoptionValues);
      __Pyx_GIVEREF(__pyx_9genexpr68__pyx_v_pyoptionValues);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr68__pyx_v_pyoptionValues);
      __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUjit_option), __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 14180, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 14180, __pyx_L14_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_9genexpr68__pyx_v_pyoptionValues); __pyx_9genexpr68__pyx_v_pyoptionValues = 0;
    __Pyx_XDECREF(__pyx_9genexpr68__pyx_v_pyoptions); __pyx_9genexpr68__pyx_v_pyoptions = 0;
    goto __pyx_L19_exit_scope;
    __pyx_L14_error:;
    __Pyx_XDECREF(__pyx_9genexpr68__pyx_v_pyoptionValues); __pyx_9genexpr68__pyx_v_pyoptionValues = 0;
    __Pyx_XDECREF(__pyx_9genexpr68__pyx_v_pyoptions); __pyx_9genexpr68__pyx_v_pyoptions = 0;
    goto __pyx_L1_error;
    __pyx_L19_exit_scope:;
  } /* exit inner scope */
  __pyx_v_pylist = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14181
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)             # <<<<<<<<<<<<<<
 *     cdef CUlinkState stateOut = CUlinkState()
 *     err = ccuda.cuLinkCreate(numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr, stateOut._ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_InputVoidPtrPtrHelper), __pyx_v_pylist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_voidStarHelper = ((struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14182
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     cdef CUlinkState stateOut = CUlinkState()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuLinkCreate(numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr, stateOut._ptr)
 *     stateOut._keepalive.append(voidStarHelper)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUlinkState)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_stateOut = ((struct __pyx_obj_4cuda_4cuda_CUlinkState *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14183
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     cdef CUlinkState stateOut = CUlinkState()
 *     err = ccuda.cuLinkCreate(numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr, stateOut._ptr)             # <<<<<<<<<<<<<<
 *     stateOut._keepalive.append(voidStarHelper)
 *     for option in pylist:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_voidStarHelper), __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_13 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_13 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_14 = __pyx_f_4cuda_5ccuda_cuLinkCreate(__pyx_v_numOptions, __pyx_v_coptions.data(), ((void **)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_13)), __pyx_v_stateOut->_ptr); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14183, __pyx_L1_error)
  __pyx_v_err = __pyx_t_14;

  /* "cuda/cuda.pyx":14184
 *     cdef CUlinkState stateOut = CUlinkState()
 *     err = ccuda.cuLinkCreate(numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr, stateOut._ptr)
 *     stateOut._keepalive.append(voidStarHelper)             # <<<<<<<<<<<<<<
 *     for option in pylist:
 *         stateOut._keepalive.append(option)
 */
  if (unlikely(__pyx_v_stateOut->_keepalive == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
    __PYX_ERR(0, 14184, __pyx_L1_error)
  }
  __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_stateOut->_keepalive, ((PyObject *)__pyx_v_voidStarHelper)); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 14184, __pyx_L1_error)

  /* "cuda/cuda.pyx":14185
 *     err = ccuda.cuLinkCreate(numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr, stateOut._ptr)
 *     stateOut._keepalive.append(voidStarHelper)
 *     for option in pylist:             # <<<<<<<<<<<<<<
 *         stateOut._keepalive.append(option)
 *     return (CUresult(err), stateOut)
 */
  __pyx_t_1 = __pyx_v_pylist; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
  for (;;) {
    if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 14185, __pyx_L1_error)
    #else
    __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_option, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cuda/cuda.pyx":14186
 *     stateOut._keepalive.append(voidStarHelper)
 *     for option in pylist:
 *         stateOut._keepalive.append(option)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), stateOut)
 * 
 */
    if (unlikely(__pyx_v_stateOut->_keepalive == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
      __PYX_ERR(0, 14186, __pyx_L1_error)
    }
    __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_stateOut->_keepalive, __pyx_v_option); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 14186, __pyx_L1_error)

    /* "cuda/cuda.pyx":14185
 *     err = ccuda.cuLinkCreate(numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr, stateOut._ptr)
 *     stateOut._keepalive.append(voidStarHelper)
 *     for option in pylist:             # <<<<<<<<<<<<<<
 *         stateOut._keepalive.append(option)
 *     return (CUresult(err), stateOut)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14187
 *     for option in pylist:
 *         stateOut._keepalive.append(option)
 *     return (CUresult(err), stateOut)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 14187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_stateOut));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_stateOut));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_stateOut));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14133
 * 
 * @cython.embedsignature(True)
 * def cuLinkCreate(unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Creates a pending JIT linker invocation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cuda.cuda.cuLinkCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pylist);
  __Pyx_XDECREF((PyObject *)__pyx_v_voidStarHelper);
  __Pyx_XDECREF((PyObject *)__pyx_v_stateOut);
  __Pyx_XDECREF(__pyx_v_option);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_12cuLinkCreate_2generator2);
  __Pyx_XDECREF(__pyx_9genexpr67__pyx_v_pyoptions);
  __Pyx_XDECREF(__pyx_9genexpr68__pyx_v_pyoptions);
  __Pyx_XDECREF(__pyx_9genexpr68__pyx_v_pyoptionValues);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14190
 * 
 * @cython.embedsignature(True)
 * def cuLinkAddData(state, typename not None : CUjitInputType, data, size_t size, char* name, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Add an input to a pending linker invocation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_119cuLinkAddData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_118cuLinkAddData[] = "cuLinkAddData(state, typename: CUjitInputType, data, size_t size, char *name, unsigned int numOptions, options: List[CUjit_option], optionValues: List[Any])\n Add an input to a pending linker invocation.\n\n    Ownership of `data` is retained by the caller. No reference is retained\n    to any inputs after this call returns.\n\n    This method accepts only compiler options, which are used if the data\n    must be compiled from PTX, and does not accept any of\n    :py:obj:`~.CU_JIT_WALL_TIME`, :py:obj:`~.CU_JIT_INFO_LOG_BUFFER`,\n    :py:obj:`~.CU_JIT_ERROR_LOG_BUFFER`,\n    :py:obj:`~.CU_JIT_TARGET_FROM_CUCONTEXT`, or :py:obj:`~.CU_JIT_TARGET`.\n\n    Parameters\n    ----------\n    state : :py:obj:`~.CUlinkState`\n        A pending linker action.\n    typename : :py:obj:`~.CUjitInputType`\n        The type of the input data.\n    data : Any\n        The input data. PTX must be NULL-terminated.\n    size : size_t\n        The length of the input data.\n    name : bytes\n        An optional name for this input in log messages.\n    numOptions : unsigned int\n        Size of options.\n    options : List[:py:obj:`~.CUjit_option`]\n        Options to be applied only for this input (overrides options from\n        :py:obj:`~.cuLinkCreate`).\n    optionValues : List[Any]\n        Array of option values, each cast to void *.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU`\n\n    See Also\n    --------\n    :py:obj:`~.cuLinkCreate`, :py:obj:`~.cuLinkAddFile`, :py:obj:`~.cuLinkComplete`, :py:obj:`~.cuLinkDestroy`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_119cuLinkAddData = {"cuLinkAddData", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_119cuLinkAddData, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_118cuLinkAddData};
static PyObject *__pyx_pw_4cuda_4cuda_119cuLinkAddData(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v_typename = 0;
  PyObject *__pyx_v_data = 0;
  size_t __pyx_v_size;
  char *__pyx_v_name;
  unsigned int __pyx_v_numOptions;
  PyObject *__pyx_v_options = 0;
  PyObject *__pyx_v_optionValues = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLinkAddData (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_state,&__pyx_n_s_typename,&__pyx_n_s_data,&__pyx_n_s_size_2,&__pyx_n_s_name_2,&__pyx_n_s_numOptions,&__pyx_n_s_options,&__pyx_n_s_optionValues,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typename)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkAddData", 1, 8, 8, 1); __PYX_ERR(0, 14190, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkAddData", 1, 8, 8, 2); __PYX_ERR(0, 14190, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkAddData", 1, 8, 8, 3); __PYX_ERR(0, 14190, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkAddData", 1, 8, 8, 4); __PYX_ERR(0, 14190, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numOptions)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkAddData", 1, 8, 8, 5); __PYX_ERR(0, 14190, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_options)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkAddData", 1, 8, 8, 6); __PYX_ERR(0, 14190, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_optionValues)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkAddData", 1, 8, 8, 7); __PYX_ERR(0, 14190, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuLinkAddData") < 0)) __PYX_ERR(0, 14190, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
    }
    __pyx_v_state = values[0];
    __pyx_v_typename = values[1];
    __pyx_v_data = values[2];
    __pyx_v_size = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 14190, __pyx_L3_error)
    __pyx_v_name = __Pyx_PyObject_AsWritableString(values[4]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(0, 14190, __pyx_L3_error)
    __pyx_v_numOptions = __Pyx_PyInt_As_unsigned_int(values[5]); if (unlikely((__pyx_v_numOptions == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 14190, __pyx_L3_error)
    __pyx_v_options = values[6];
    __pyx_v_optionValues = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuLinkAddData", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 14190, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLinkAddData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_typename) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "typename"); __PYX_ERR(0, 14190, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_118cuLinkAddData(__pyx_self, __pyx_v_state, __pyx_v_typename, __pyx_v_data, __pyx_v_size, __pyx_v_name, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_13cuLinkAddData_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":14232
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_13cuLinkAddData_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_7_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_7_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 14232, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_13cuLinkAddData_2generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuLinkAddData_locals_genexpr, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 14232, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLinkAddData.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_13cuLinkAddData_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 14232, 0, __PYX_ERR(0, 14232, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 14232, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options)) { __Pyx_RaiseClosureNameError("options"); __PYX_ERR(0, 14232, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_options; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14232, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 14232, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 14232, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 14232, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUjit_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v__x, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 14232, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14190
 * 
 * @cython.embedsignature(True)
 * def cuLinkAddData(state, typename not None : CUjitInputType, data, size_t size, char* name, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Add an input to a pending linker invocation.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_118cuLinkAddData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_state, PyObject *__pyx_v_typename, PyObject *__pyx_v_data, size_t __pyx_v_size, char *__pyx_v_name, unsigned int __pyx_v_numOptions, PyObject *__pyx_v_options, PyObject *__pyx_v_optionValues) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *__pyx_cur_scope;
  CUlinkState __pyx_v_cstate;
  PyObject *__pyx_v_pstate = NULL;
  CUjitInputType __pyx_v_ctypename;
  PyObject *__pyx_v_cdata = NULL;
  void *__pyx_v_cdata_ptr;
  std::vector<CUjit_option>  __pyx_v_coptions;
  PyObject *__pyx_v_pylist = NULL;
  struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *__pyx_v_voidStarHelper = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_13cuLinkAddData_2generator3 = 0;
  PyObject *__pyx_9genexpr70__pyx_v_pyoptions = NULL;
  PyObject *__pyx_9genexpr71__pyx_v_pyoptions = NULL;
  PyObject *__pyx_9genexpr71__pyx_v_pyoptionValues = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  CUjitInputType __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  std::vector<CUjit_option>  __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *(*__pyx_t_14)(PyObject *);
  CUresult __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__669)
  __Pyx_RefNannySetupContext("cuLinkAddData", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 14190, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuLinkAddData", __pyx_f[0], 14190, 0, __PYX_ERR(0, 14190, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_options = __pyx_v_options;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_options);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_options);

  /* "cuda/cuda.pyx":14231
 *     :py:obj:`~.cuLinkCreate`, :py:obj:`~.cuLinkAddFile`, :py:obj:`~.cuLinkComplete`, :py:obj:`~.cuLinkDestroy`
 *     """
 *     options = [] if options is None else options             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_options == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_options);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_options;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_options);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_options, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14232
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_13cuLinkAddData_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 14232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":14233
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUlinkState cstate
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__659, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 14233, __pyx_L1_error)

    /* "cuda/cuda.pyx":14232
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */
  }

  /* "cuda/cuda.pyx":14236
 * 
 *     cdef ccuda.CUlinkState cstate
 *     if state is None:             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):
 */
  __pyx_t_4 = (__pyx_v_state == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":14237
 *     cdef ccuda.CUlinkState cstate
 *     if state is None:
 *         cstate = <ccuda.CUlinkState><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(state, (CUlinkState)):
 *         pstate = int(state)
 */
    __pyx_v_cstate = ((CUlinkState)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":14236
 * 
 *     cdef ccuda.CUlinkState cstate
 *     if state is None:             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":14238
 *     if state is None:
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):             # <<<<<<<<<<<<<<
 *         pstate = int(state)
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_state, __pyx_ptype_4cuda_4cuda_CUlinkState); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":14239
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):
 *         pstate = int(state)             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstate = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":14240
 *     elif isinstance(state, (CUlinkState)):
 *         pstate = int(state)
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate             # <<<<<<<<<<<<<<
 *     else:
 *         pstate = int(CUlinkState(state))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstate); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14240, __pyx_L1_error)
    __pyx_v_cstate = ((CUlinkState)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":14238
 *     if state is None:
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):             # <<<<<<<<<<<<<<
 *         pstate = int(state)
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":14242
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 *     else:
 *         pstate = int(CUlinkState(state))             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUlinkState), __pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstate = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":14243
 *     else:
 *         pstate = int(CUlinkState(state))
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUjitInputType ctypename = typename.value
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstate); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14243, __pyx_L1_error)
    __pyx_v_cstate = ((CUlinkState)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":14245
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 * 
 *     cdef ccuda.CUjitInputType ctypename = typename.value             # <<<<<<<<<<<<<<
 *     cdata = utils.HelperInputVoidPtr(data)
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_typename, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = ((enum CUjitInputType_enum)__Pyx_PyInt_As_enum__CUjitInputType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 14245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ctypename = __pyx_t_6;

  /* "cuda/cuda.pyx":14246
 * 
 *     cdef ccuda.CUjitInputType ctypename = typename.value
 *     cdata = utils.HelperInputVoidPtr(data)             # <<<<<<<<<<<<<<
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cdata = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14247
 *     cdef ccuda.CUjitInputType ctypename = typename.value
 *     cdata = utils.HelperInputVoidPtr(data)
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr             # <<<<<<<<<<<<<<
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdata, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cdata_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

  /* "cuda/cuda.pyx":14248
 *     cdata = utils.HelperInputVoidPtr(data)
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))             # <<<<<<<<<<<<<<
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_options;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 14248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_v_numOptions > __pyx_t_7) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_options;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 14248, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u__660); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numOptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __PYX_ERR(0, 14248, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":14249
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))             # <<<<<<<<<<<<<<
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_optionValues); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 14249, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_v_numOptions > __pyx_t_7) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_7 = PyObject_Length(__pyx_v_optionValues); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 14249, __pyx_L1_error)
    __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numOptions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 14249, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":14250
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]             # <<<<<<<<<<<<<<
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14250, __pyx_L9_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_options)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_options)) {
      __pyx_t_8 = __pyx_cur_scope->__pyx_v_options; __Pyx_INCREF(__pyx_t_8); __pyx_t_7 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_options); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14250, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 14250, __pyx_L9_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 14250, __pyx_L9_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14250, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 14250, __pyx_L9_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14250, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_9(__pyx_t_8);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 14250, __pyx_L9_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr70__pyx_v_pyoptions, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr70__pyx_v_pyoptions, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14250, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 14250, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_9genexpr70__pyx_v_pyoptions); __pyx_9genexpr70__pyx_v_pyoptions = 0;
    goto __pyx_L12_exit_scope;
    __pyx_L9_error:;
    __Pyx_XDECREF(__pyx_9genexpr70__pyx_v_pyoptions); __pyx_9genexpr70__pyx_v_pyoptions = 0;
    goto __pyx_L1_error;
    __pyx_L12_exit_scope:;
  } /* exit inner scope */
  __pyx_t_10 = __pyx_convert_vector_from_py_CUjit_option(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 14250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_coptions = __pyx_t_10;

  /* "cuda/cuda.pyx":14251
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]             # <<<<<<<<<<<<<<
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     err = ccuda.cuLinkAddData(cstate, ctypename, cdata_ptr, size, name, numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr)
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14251, __pyx_L15_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14251, __pyx_L15_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_options);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_options);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_cur_scope->__pyx_v_options);
    __Pyx_INCREF(__pyx_v_optionValues);
    __Pyx_GIVEREF(__pyx_v_optionValues);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_optionValues);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14251, __pyx_L15_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_8 = __pyx_t_1; __Pyx_INCREF(__pyx_t_8); __pyx_t_7 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14251, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 14251, __pyx_L15_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 14251, __pyx_L15_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14251, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 14251, __pyx_L15_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14251, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_9(__pyx_t_8);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 14251, __pyx_L15_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 14251, __pyx_L15_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_11 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_12 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_12);
        #else
        __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 14251, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 14251, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_12);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 14251, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext;
        index = 0; __pyx_t_11 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_11)) goto __pyx_L18_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_11);
        index = 1; __pyx_t_12 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L18_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_12);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) __PYX_ERR(0, 14251, __pyx_L15_error)
        __pyx_t_14 = NULL;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        goto __pyx_L19_unpacking_done;
        __pyx_L18_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_14 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 14251, __pyx_L15_error)
        __pyx_L19_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr71__pyx_v_pyoptions, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_9genexpr71__pyx_v_pyoptionValues, __pyx_t_12);
      __pyx_t_12 = 0;
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14251, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_9genexpr71__pyx_v_pyoptions);
      __Pyx_GIVEREF(__pyx_9genexpr71__pyx_v_pyoptions);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_9genexpr71__pyx_v_pyoptions);
      __Pyx_INCREF(__pyx_9genexpr71__pyx_v_pyoptionValues);
      __Pyx_GIVEREF(__pyx_9genexpr71__pyx_v_pyoptionValues);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_9genexpr71__pyx_v_pyoptionValues);
      __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUjit_option), __pyx_t_1, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 14251, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 14251, __pyx_L15_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_9genexpr71__pyx_v_pyoptionValues); __pyx_9genexpr71__pyx_v_pyoptionValues = 0;
    __Pyx_XDECREF(__pyx_9genexpr71__pyx_v_pyoptions); __pyx_9genexpr71__pyx_v_pyoptions = 0;
    goto __pyx_L20_exit_scope;
    __pyx_L15_error:;
    __Pyx_XDECREF(__pyx_9genexpr71__pyx_v_pyoptionValues); __pyx_9genexpr71__pyx_v_pyoptionValues = 0;
    __Pyx_XDECREF(__pyx_9genexpr71__pyx_v_pyoptions); __pyx_9genexpr71__pyx_v_pyoptions = 0;
    goto __pyx_L1_error;
    __pyx_L20_exit_scope:;
  } /* exit inner scope */
  __pyx_v_pylist = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":14252
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)             # <<<<<<<<<<<<<<
 *     err = ccuda.cuLinkAddData(cstate, ctypename, cdata_ptr, size, name, numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_InputVoidPtrPtrHelper), __pyx_v_pylist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_voidStarHelper = ((struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":14253
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     err = ccuda.cuLinkAddData(cstate, ctypename, cdata_ptr, size, name, numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_voidStarHelper), __pyx_n_s_cptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_3); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_15 = __pyx_f_4cuda_5ccuda_cuLinkAddData(__pyx_v_cstate, __pyx_v_ctypename, __pyx_v_cdata_ptr, __pyx_v_size, __pyx_v_name, __pyx_v_numOptions, __pyx_v_coptions.data(), ((void **)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5))); if (unlikely(__pyx_t_15 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14253, __pyx_L1_error)
  __pyx_v_err = __pyx_t_15;

  /* "cuda/cuda.pyx":14254
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     err = ccuda.cuLinkAddData(cstate, ctypename, cdata_ptr, size, name, numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_12 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 14254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_12);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14190
 * 
 * @cython.embedsignature(True)
 * def cuLinkAddData(state, typename not None : CUjitInputType, data, size_t size, char* name, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Add an input to a pending linker invocation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuLinkAddData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pstate);
  __Pyx_XDECREF(__pyx_v_cdata);
  __Pyx_XDECREF(__pyx_v_pylist);
  __Pyx_XDECREF((PyObject *)__pyx_v_voidStarHelper);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_13cuLinkAddData_2generator3);
  __Pyx_XDECREF(__pyx_9genexpr70__pyx_v_pyoptions);
  __Pyx_XDECREF(__pyx_9genexpr71__pyx_v_pyoptions);
  __Pyx_XDECREF(__pyx_9genexpr71__pyx_v_pyoptionValues);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14257
 * 
 * @cython.embedsignature(True)
 * def cuLinkAddFile(state, typename not None : CUjitInputType, char* path, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Add a file input to a pending linker invocation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_121cuLinkAddFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_120cuLinkAddFile[] = "cuLinkAddFile(state, typename: CUjitInputType, char *path, unsigned int numOptions, options: List[CUjit_option], optionValues: List[Any])\n Add a file input to a pending linker invocation.\n\n    No reference is retained to any inputs after this call returns.\n\n    This method accepts only compiler options, which are used if the input\n    must be compiled from PTX, and does not accept any of\n    :py:obj:`~.CU_JIT_WALL_TIME`, :py:obj:`~.CU_JIT_INFO_LOG_BUFFER`,\n    :py:obj:`~.CU_JIT_ERROR_LOG_BUFFER`,\n    :py:obj:`~.CU_JIT_TARGET_FROM_CUCONTEXT`, or :py:obj:`~.CU_JIT_TARGET`.\n\n    This method is equivalent to invoking :py:obj:`~.cuLinkAddData` on the\n    contents of the file.\n\n    Parameters\n    ----------\n    state : :py:obj:`~.CUlinkState`\n        A pending linker action\n    typename : :py:obj:`~.CUjitInputType`\n        The type of the input data\n    path : bytes\n        Path to the input file\n    numOptions : unsigned int\n        Size of options\n    options : List[:py:obj:`~.CUjit_option`]\n        Options to be applied only for this input (overrides options from\n        :py:obj:`~.cuLinkCreate`)\n    optionValues : List[Any]\n        Array of option values, each cast to void *\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_FILE_NOT_FOUND` :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU`\n\n    See Also\n    --------\n    :py:obj:`~.cuLinkCreate`, :py:obj:`~.cuLinkAddData`, :py:obj:`~.cuLinkComplete`, :py:obj:`~.cuLinkDestroy`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_121cuLinkAddFile = {"cuLinkAddFile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_121cuLinkAddFile, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_120cuLinkAddFile};
static PyObject *__pyx_pw_4cuda_4cuda_121cuLinkAddFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v_typename = 0;
  char *__pyx_v_path;
  unsigned int __pyx_v_numOptions;
  PyObject *__pyx_v_options = 0;
  PyObject *__pyx_v_optionValues = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLinkAddFile (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_state,&__pyx_n_s_typename,&__pyx_n_s_path,&__pyx_n_s_numOptions,&__pyx_n_s_options,&__pyx_n_s_optionValues,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typename)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkAddFile", 1, 6, 6, 1); __PYX_ERR(0, 14257, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkAddFile", 1, 6, 6, 2); __PYX_ERR(0, 14257, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numOptions)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkAddFile", 1, 6, 6, 3); __PYX_ERR(0, 14257, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_options)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkAddFile", 1, 6, 6, 4); __PYX_ERR(0, 14257, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_optionValues)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLinkAddFile", 1, 6, 6, 5); __PYX_ERR(0, 14257, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuLinkAddFile") < 0)) __PYX_ERR(0, 14257, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_state = values[0];
    __pyx_v_typename = values[1];
    __pyx_v_path = __Pyx_PyObject_AsWritableString(values[2]); if (unlikely((!__pyx_v_path) && PyErr_Occurred())) __PYX_ERR(0, 14257, __pyx_L3_error)
    __pyx_v_numOptions = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_numOptions == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 14257, __pyx_L3_error)
    __pyx_v_options = values[4];
    __pyx_v_optionValues = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuLinkAddFile", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 14257, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLinkAddFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_typename) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "typename"); __PYX_ERR(0, 14257, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_120cuLinkAddFile(__pyx_self, __pyx_v_state, __pyx_v_typename, __pyx_v_path, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_13cuLinkAddFile_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":14297
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_13cuLinkAddFile_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_9_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_9_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 14297, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_13cuLinkAddFile_2generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuLinkAddFile_locals_genexpr, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 14297, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLinkAddFile.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_13cuLinkAddFile_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 14297, 0, __PYX_ERR(0, 14297, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 14297, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options)) { __Pyx_RaiseClosureNameError("options"); __PYX_ERR(0, 14297, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_options; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14297, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 14297, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14297, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 14297, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14297, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 14297, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUjit_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v__x, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 14297, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14257
 * 
 * @cython.embedsignature(True)
 * def cuLinkAddFile(state, typename not None : CUjitInputType, char* path, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Add a file input to a pending linker invocation.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_120cuLinkAddFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_state, PyObject *__pyx_v_typename, char *__pyx_v_path, unsigned int __pyx_v_numOptions, PyObject *__pyx_v_options, PyObject *__pyx_v_optionValues) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *__pyx_cur_scope;
  CUlinkState __pyx_v_cstate;
  PyObject *__pyx_v_pstate = NULL;
  CUjitInputType __pyx_v_ctypename;
  std::vector<CUjit_option>  __pyx_v_coptions;
  PyObject *__pyx_v_pylist = NULL;
  struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *__pyx_v_voidStarHelper = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_13cuLinkAddFile_2generator4 = 0;
  PyObject *__pyx_9genexpr73__pyx_v_pyoptions = NULL;
  PyObject *__pyx_9genexpr74__pyx_v_pyoptions = NULL;
  PyObject *__pyx_9genexpr74__pyx_v_pyoptionValues = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  CUjitInputType __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  std::vector<CUjit_option>  __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *(*__pyx_t_14)(PyObject *);
  CUresult __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__670)
  __Pyx_RefNannySetupContext("cuLinkAddFile", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 14257, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuLinkAddFile", __pyx_f[0], 14257, 0, __PYX_ERR(0, 14257, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_options = __pyx_v_options;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_options);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_options);

  /* "cuda/cuda.pyx":14296
 *     :py:obj:`~.cuLinkCreate`, :py:obj:`~.cuLinkAddData`, :py:obj:`~.cuLinkComplete`, :py:obj:`~.cuLinkDestroy`
 *     """
 *     options = [] if options is None else options             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_options == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_options);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_options;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_options);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_options, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14297
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_13cuLinkAddFile_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 14297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":14298
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUlinkState cstate
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__659, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 14298, __pyx_L1_error)

    /* "cuda/cuda.pyx":14297
 *     """
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")
 * 
 */
  }

  /* "cuda/cuda.pyx":14301
 * 
 *     cdef ccuda.CUlinkState cstate
 *     if state is None:             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):
 */
  __pyx_t_4 = (__pyx_v_state == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":14302
 *     cdef ccuda.CUlinkState cstate
 *     if state is None:
 *         cstate = <ccuda.CUlinkState><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(state, (CUlinkState)):
 *         pstate = int(state)
 */
    __pyx_v_cstate = ((CUlinkState)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":14301
 * 
 *     cdef ccuda.CUlinkState cstate
 *     if state is None:             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":14303
 *     if state is None:
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):             # <<<<<<<<<<<<<<
 *         pstate = int(state)
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_state, __pyx_ptype_4cuda_4cuda_CUlinkState); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":14304
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):
 *         pstate = int(state)             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstate = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":14305
 *     elif isinstance(state, (CUlinkState)):
 *         pstate = int(state)
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate             # <<<<<<<<<<<<<<
 *     else:
 *         pstate = int(CUlinkState(state))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstate); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14305, __pyx_L1_error)
    __pyx_v_cstate = ((CUlinkState)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":14303
 *     if state is None:
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):             # <<<<<<<<<<<<<<
 *         pstate = int(state)
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":14307
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 *     else:
 *         pstate = int(CUlinkState(state))             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUlinkState), __pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstate = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":14308
 *     else:
 *         pstate = int(CUlinkState(state))
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUjitInputType ctypename = typename.value
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstate); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14308, __pyx_L1_error)
    __pyx_v_cstate = ((CUlinkState)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":14310
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 * 
 *     cdef ccuda.CUjitInputType ctypename = typename.value             # <<<<<<<<<<<<<<
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_typename, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = ((enum CUjitInputType_enum)__Pyx_PyInt_As_enum__CUjitInputType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 14310, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ctypename = __pyx_t_6;

  /* "cuda/cuda.pyx":14311
 * 
 *     cdef ccuda.CUjitInputType ctypename = typename.value
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))             # <<<<<<<<<<<<<<
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_options;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 14311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_v_numOptions > __pyx_t_7) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_options;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 14311, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u__660); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numOptions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __PYX_ERR(0, 14311, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":14312
 *     cdef ccuda.CUjitInputType ctypename = typename.value
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))             # <<<<<<<<<<<<<<
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_optionValues); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 14312, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_v_numOptions > __pyx_t_7) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_7 = PyObject_Length(__pyx_v_optionValues); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 14312, __pyx_L1_error)
    __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numOptions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 14312, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":14313
 *     if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]             # <<<<<<<<<<<<<<
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14313, __pyx_L9_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_options)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_options)) {
      __pyx_t_8 = __pyx_cur_scope->__pyx_v_options; __Pyx_INCREF(__pyx_t_8); __pyx_t_7 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_options); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14313, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 14313, __pyx_L9_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 14313, __pyx_L9_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14313, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 14313, __pyx_L9_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14313, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_9(__pyx_t_8);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 14313, __pyx_L9_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr73__pyx_v_pyoptions, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr73__pyx_v_pyoptions, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14313, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 14313, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_9genexpr73__pyx_v_pyoptions); __pyx_9genexpr73__pyx_v_pyoptions = 0;
    goto __pyx_L12_exit_scope;
    __pyx_L9_error:;
    __Pyx_XDECREF(__pyx_9genexpr73__pyx_v_pyoptions); __pyx_9genexpr73__pyx_v_pyoptions = 0;
    goto __pyx_L1_error;
    __pyx_L12_exit_scope:;
  } /* exit inner scope */
  __pyx_t_10 = __pyx_convert_vector_from_py_CUjit_option(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 14313, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_coptions = __pyx_t_10;

  /* "cuda/cuda.pyx":14314
 *     if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]             # <<<<<<<<<<<<<<
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     err = ccuda.cuLinkAddFile(cstate, ctypename, path, numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr)
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14314, __pyx_L15_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14314, __pyx_L15_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_options);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_options);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_cur_scope->__pyx_v_options);
    __Pyx_INCREF(__pyx_v_optionValues);
    __Pyx_GIVEREF(__pyx_v_optionValues);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_optionValues);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14314, __pyx_L15_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_8 = __pyx_t_1; __Pyx_INCREF(__pyx_t_8); __pyx_t_7 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14314, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 14314, __pyx_L15_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 14314, __pyx_L15_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14314, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 14314, __pyx_L15_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14314, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_9(__pyx_t_8);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 14314, __pyx_L15_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 14314, __pyx_L15_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_11 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_12 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_12);
        #else
        __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 14314, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 14314, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_12);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 14314, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext;
        index = 0; __pyx_t_11 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_11)) goto __pyx_L18_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_11);
        index = 1; __pyx_t_12 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L18_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_12);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) __PYX_ERR(0, 14314, __pyx_L15_error)
        __pyx_t_14 = NULL;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        goto __pyx_L19_unpacking_done;
        __pyx_L18_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_14 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 14314, __pyx_L15_error)
        __pyx_L19_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr74__pyx_v_pyoptions, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_9genexpr74__pyx_v_pyoptionValues, __pyx_t_12);
      __pyx_t_12 = 0;
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14314, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_9genexpr74__pyx_v_pyoptions);
      __Pyx_GIVEREF(__pyx_9genexpr74__pyx_v_pyoptions);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_9genexpr74__pyx_v_pyoptions);
      __Pyx_INCREF(__pyx_9genexpr74__pyx_v_pyoptionValues);
      __Pyx_GIVEREF(__pyx_9genexpr74__pyx_v_pyoptionValues);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_9genexpr74__pyx_v_pyoptionValues);
      __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUjit_option), __pyx_t_1, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 14314, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 14314, __pyx_L15_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_9genexpr74__pyx_v_pyoptionValues); __pyx_9genexpr74__pyx_v_pyoptionValues = 0;
    __Pyx_XDECREF(__pyx_9genexpr74__pyx_v_pyoptions); __pyx_9genexpr74__pyx_v_pyoptions = 0;
    goto __pyx_L20_exit_scope;
    __pyx_L15_error:;
    __Pyx_XDECREF(__pyx_9genexpr74__pyx_v_pyoptionValues); __pyx_9genexpr74__pyx_v_pyoptionValues = 0;
    __Pyx_XDECREF(__pyx_9genexpr74__pyx_v_pyoptions); __pyx_9genexpr74__pyx_v_pyoptions = 0;
    goto __pyx_L1_error;
    __pyx_L20_exit_scope:;
  } /* exit inner scope */
  __pyx_v_pylist = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":14315
 *     cdef vector[ccuda.CUjit_option] coptions = [pyoptions.value for pyoptions in (options)]
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)             # <<<<<<<<<<<<<<
 *     err = ccuda.cuLinkAddFile(cstate, ctypename, path, numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_InputVoidPtrPtrHelper), __pyx_v_pylist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_voidStarHelper = ((struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":14316
 *     pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     err = ccuda.cuLinkAddFile(cstate, ctypename, path, numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_voidStarHelper), __pyx_n_s_cptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_3); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14316, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_15 = __pyx_f_4cuda_5ccuda_cuLinkAddFile(__pyx_v_cstate, __pyx_v_ctypename, __pyx_v_path, __pyx_v_numOptions, __pyx_v_coptions.data(), ((void **)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5))); if (unlikely(__pyx_t_15 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14316, __pyx_L1_error)
  __pyx_v_err = __pyx_t_15;

  /* "cuda/cuda.pyx":14317
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     err = ccuda.cuLinkAddFile(cstate, ctypename, path, numOptions, coptions.data(), <void**><void_ptr>voidStarHelper.cptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_12 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 14317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_12);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14257
 * 
 * @cython.embedsignature(True)
 * def cuLinkAddFile(state, typename not None : CUjitInputType, char* path, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Add a file input to a pending linker invocation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuLinkAddFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pstate);
  __Pyx_XDECREF(__pyx_v_pylist);
  __Pyx_XDECREF((PyObject *)__pyx_v_voidStarHelper);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_13cuLinkAddFile_2generator4);
  __Pyx_XDECREF(__pyx_9genexpr73__pyx_v_pyoptions);
  __Pyx_XDECREF(__pyx_9genexpr74__pyx_v_pyoptions);
  __Pyx_XDECREF(__pyx_9genexpr74__pyx_v_pyoptionValues);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14320
 * 
 * @cython.embedsignature(True)
 * def cuLinkComplete(state):             # <<<<<<<<<<<<<<
 *     """ Complete a pending linker invocation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_123cuLinkComplete(PyObject *__pyx_self, PyObject *__pyx_v_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_122cuLinkComplete[] = "cuLinkComplete(state)\n Complete a pending linker invocation.\n\n    Completes the pending linker action and returns the cubin image for the\n    linked device code, which can be used with\n    :py:obj:`~.cuModuleLoadData`. The cubin is owned by `state`, so it\n    should be loaded before `state` is destroyed via\n    :py:obj:`~.cuLinkDestroy`. This call does not destroy `state`.\n\n    Parameters\n    ----------\n    state : :py:obj:`~.CUlinkState`\n        A pending linker invocation\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    cubinOut : Any\n        On success, this will point to the output image\n    sizeOut : int\n        Optional parameter to receive the size of the generated image\n\n    See Also\n    --------\n    :py:obj:`~.cuLinkCreate`, :py:obj:`~.cuLinkAddData`, :py:obj:`~.cuLinkAddFile`, :py:obj:`~.cuLinkDestroy`, :py:obj:`~.cuModuleLoadData`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_123cuLinkComplete = {"cuLinkComplete", (PyCFunction)__pyx_pw_4cuda_4cuda_123cuLinkComplete, METH_O, __pyx_doc_4cuda_4cuda_122cuLinkComplete};
static PyObject *__pyx_pw_4cuda_4cuda_123cuLinkComplete(PyObject *__pyx_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLinkComplete (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_122cuLinkComplete(__pyx_self, ((PyObject *)__pyx_v_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_122cuLinkComplete(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_state) {
  CUlinkState __pyx_v_cstate;
  PyObject *__pyx_v_pstate = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_cubinOut;
  size_t __pyx_v_sizeOut;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__671)
  __Pyx_RefNannySetupContext("cuLinkComplete", 0);
  __Pyx_TraceCall("cuLinkComplete", __pyx_f[0], 14320, 0, __PYX_ERR(0, 14320, __pyx_L1_error));

  /* "cuda/cuda.pyx":14348
 *     """
 *     cdef ccuda.CUlinkState cstate
 *     if state is None:             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):
 */
  __pyx_t_1 = (__pyx_v_state == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":14349
 *     cdef ccuda.CUlinkState cstate
 *     if state is None:
 *         cstate = <ccuda.CUlinkState><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(state, (CUlinkState)):
 *         pstate = int(state)
 */
    __pyx_v_cstate = ((CUlinkState)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":14348
 *     """
 *     cdef ccuda.CUlinkState cstate
 *     if state is None:             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14350
 *     if state is None:
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):             # <<<<<<<<<<<<<<
 *         pstate = int(state)
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_state, __pyx_ptype_4cuda_4cuda_CUlinkState); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":14351
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):
 *         pstate = int(state)             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstate = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":14352
 *     elif isinstance(state, (CUlinkState)):
 *         pstate = int(state)
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate             # <<<<<<<<<<<<<<
 *     else:
 *         pstate = int(CUlinkState(state))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstate); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14352, __pyx_L1_error)
    __pyx_v_cstate = ((CUlinkState)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":14350
 *     if state is None:
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):             # <<<<<<<<<<<<<<
 *         pstate = int(state)
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14354
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 *     else:
 *         pstate = int(CUlinkState(state))             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUlinkState), __pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstate = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":14355
 *     else:
 *         pstate = int(CUlinkState(state))
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate             # <<<<<<<<<<<<<<
 * 
 *     cdef void_ptr cubinOut = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstate); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14355, __pyx_L1_error)
    __pyx_v_cstate = ((CUlinkState)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":14357
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 * 
 *     cdef void_ptr cubinOut = 0             # <<<<<<<<<<<<<<
 *     cdef size_t sizeOut = 0
 *     err = ccuda.cuLinkComplete(cstate, <void**>&cubinOut, &sizeOut)
 */
  __pyx_v_cubinOut = 0;

  /* "cuda/cuda.pyx":14358
 * 
 *     cdef void_ptr cubinOut = 0
 *     cdef size_t sizeOut = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuLinkComplete(cstate, <void**>&cubinOut, &sizeOut)
 *     return (CUresult(err), cubinOut, sizeOut)
 */
  __pyx_v_sizeOut = 0;

  /* "cuda/cuda.pyx":14359
 *     cdef void_ptr cubinOut = 0
 *     cdef size_t sizeOut = 0
 *     err = ccuda.cuLinkComplete(cstate, <void**>&cubinOut, &sizeOut)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), cubinOut, sizeOut)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuLinkComplete(__pyx_v_cstate, ((void **)(&__pyx_v_cubinOut)), (&__pyx_v_sizeOut)); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14359, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":14360
 *     cdef size_t sizeOut = 0
 *     err = ccuda.cuLinkComplete(cstate, <void**>&cubinOut, &sizeOut)
 *     return (CUresult(err), cubinOut, sizeOut)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_cubinOut); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_sizeOut); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14320
 * 
 * @cython.embedsignature(True)
 * def cuLinkComplete(state):             # <<<<<<<<<<<<<<
 *     """ Complete a pending linker invocation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuLinkComplete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pstate);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14363
 * 
 * @cython.embedsignature(True)
 * def cuLinkDestroy(state):             # <<<<<<<<<<<<<<
 *     """ Destroys state for a JIT linker invocation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_125cuLinkDestroy(PyObject *__pyx_self, PyObject *__pyx_v_state); /*proto*/
static char __pyx_doc_4cuda_4cuda_124cuLinkDestroy[] = "cuLinkDestroy(state)\n Destroys state for a JIT linker invocation.\n\n    Parameters\n    ----------\n    state : :py:obj:`~.CUlinkState`\n        State object for the linker invocation\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuLinkCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_125cuLinkDestroy = {"cuLinkDestroy", (PyCFunction)__pyx_pw_4cuda_4cuda_125cuLinkDestroy, METH_O, __pyx_doc_4cuda_4cuda_124cuLinkDestroy};
static PyObject *__pyx_pw_4cuda_4cuda_125cuLinkDestroy(PyObject *__pyx_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLinkDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_124cuLinkDestroy(__pyx_self, ((PyObject *)__pyx_v_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_124cuLinkDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_state) {
  CUlinkState __pyx_v_cstate;
  PyObject *__pyx_v_pstate = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__672)
  __Pyx_RefNannySetupContext("cuLinkDestroy", 0);
  __Pyx_TraceCall("cuLinkDestroy", __pyx_f[0], 14363, 0, __PYX_ERR(0, 14363, __pyx_L1_error));

  /* "cuda/cuda.pyx":14381
 *     """
 *     cdef ccuda.CUlinkState cstate
 *     if state is None:             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):
 */
  __pyx_t_1 = (__pyx_v_state == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":14382
 *     cdef ccuda.CUlinkState cstate
 *     if state is None:
 *         cstate = <ccuda.CUlinkState><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(state, (CUlinkState)):
 *         pstate = int(state)
 */
    __pyx_v_cstate = ((CUlinkState)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":14381
 *     """
 *     cdef ccuda.CUlinkState cstate
 *     if state is None:             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14383
 *     if state is None:
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):             # <<<<<<<<<<<<<<
 *         pstate = int(state)
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_state, __pyx_ptype_4cuda_4cuda_CUlinkState); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":14384
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):
 *         pstate = int(state)             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstate = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":14385
 *     elif isinstance(state, (CUlinkState)):
 *         pstate = int(state)
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate             # <<<<<<<<<<<<<<
 *     else:
 *         pstate = int(CUlinkState(state))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstate); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14385, __pyx_L1_error)
    __pyx_v_cstate = ((CUlinkState)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":14383
 *     if state is None:
 *         cstate = <ccuda.CUlinkState><void_ptr>0
 *     elif isinstance(state, (CUlinkState)):             # <<<<<<<<<<<<<<
 *         pstate = int(state)
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14387
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 *     else:
 *         pstate = int(CUlinkState(state))             # <<<<<<<<<<<<<<
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUlinkState), __pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstate = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":14388
 *     else:
 *         pstate = int(CUlinkState(state))
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuLinkDestroy(cstate)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstate); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14388, __pyx_L1_error)
    __pyx_v_cstate = ((CUlinkState)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":14390
 *         cstate = <ccuda.CUlinkState><void_ptr>pstate
 * 
 *     err = ccuda.cuLinkDestroy(cstate)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuLinkDestroy(__pyx_v_cstate); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14390, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":14391
 * 
 *     err = ccuda.cuLinkDestroy(cstate)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14363
 * 
 * @cython.embedsignature(True)
 * def cuLinkDestroy(state):             # <<<<<<<<<<<<<<
 *     """ Destroys state for a JIT linker invocation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuLinkDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pstate);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14394
 * 
 * @cython.embedsignature(True)
 * def cuMemGetInfo():             # <<<<<<<<<<<<<<
 *     """ Gets free and total memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_127cuMemGetInfo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_126cuMemGetInfo[] = "cuMemGetInfo()\n Gets free and total memory.\n\n    Returns in `*total` the total amount of memory available to the the\n    current context. Returns in `*free` the amount of memory on the device\n    that is free according to the OS. CUDA is not guaranteed to be able to\n    allocate all of the memory that the OS reports as free. In a multi-\n    tenet situation, free estimate returned is prone to race condition\n    where a new allocation/free done by a different process or a different\n    thread in the same process between the time when free memory was\n    estimated and reported, will result in deviation in free value reported\n    and actual free memory.\n\n    The integrated GPU on Tegra shares memory with CPU and other component\n    of the SoC. The free and total values returned by the API excludes the\n    SWAP memory space maintained by the OS on some platforms. The OS may\n    move some of the memory pages into swap area as the GPU or CPU allocate\n    or access memory. See Tegra app note on how to calculate total and free\n    memory on Tegra.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    free : int\n        Returned free memory in bytes\n    total : int\n        Returned total memory in bytes\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cu""MemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemGetInfo`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_127cuMemGetInfo = {"cuMemGetInfo", (PyCFunction)__pyx_pw_4cuda_4cuda_127cuMemGetInfo, METH_NOARGS, __pyx_doc_4cuda_4cuda_126cuMemGetInfo};
static PyObject *__pyx_pw_4cuda_4cuda_127cuMemGetInfo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemGetInfo (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_126cuMemGetInfo(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_126cuMemGetInfo(CYTHON_UNUSED PyObject *__pyx_self) {
  size_t __pyx_v_free;
  size_t __pyx_v_total;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__673)
  __Pyx_RefNannySetupContext("cuMemGetInfo", 0);
  __Pyx_TraceCall("cuMemGetInfo", __pyx_f[0], 14394, 0, __PYX_ERR(0, 14394, __pyx_L1_error));

  /* "cuda/cuda.pyx":14427
 *     :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemGetInfo`
 *     """
 *     cdef size_t free = 0             # <<<<<<<<<<<<<<
 *     cdef size_t total = 0
 *     err = ccuda.cuMemGetInfo(&free, &total)
 */
  __pyx_v_free = 0;

  /* "cuda/cuda.pyx":14428
 *     """
 *     cdef size_t free = 0
 *     cdef size_t total = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemGetInfo(&free, &total)
 *     return (CUresult(err), free, total)
 */
  __pyx_v_total = 0;

  /* "cuda/cuda.pyx":14429
 *     cdef size_t free = 0
 *     cdef size_t total = 0
 *     err = ccuda.cuMemGetInfo(&free, &total)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), free, total)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuMemGetInfo((&__pyx_v_free), (&__pyx_v_total)); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14429, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":14430
 *     cdef size_t total = 0
 *     err = ccuda.cuMemGetInfo(&free, &total)
 *     return (CUresult(err), free, total)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_free); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_total); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14394
 * 
 * @cython.embedsignature(True)
 * def cuMemGetInfo():             # <<<<<<<<<<<<<<
 *     """ Gets free and total memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuMemGetInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14433
 * 
 * @cython.embedsignature(True)
 * def cuMemAlloc(size_t bytesize):             # <<<<<<<<<<<<<<
 *     """ Allocates device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_129cuMemAlloc(PyObject *__pyx_self, PyObject *__pyx_arg_bytesize); /*proto*/
static char __pyx_doc_4cuda_4cuda_128cuMemAlloc[] = "cuMemAlloc(size_t bytesize)\n Allocates device memory.\n\n    Allocates `bytesize` bytes of linear memory on the device and returns\n    in `*dptr` a pointer to the allocated memory. The allocated memory is\n    suitably aligned for any kind of variable. The memory is not cleared.\n    If `bytesize` is 0, :py:obj:`~.cuMemAlloc()` returns\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE`.\n\n    Parameters\n    ----------\n    bytesize : size_t\n        Requested allocation size in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    dptr : :py:obj:`~.CUdeviceptr`\n        Returned device pointer\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMalloc`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_129cuMemAlloc = {"cuMemAlloc", (PyCFunction)__pyx_pw_4cuda_4cuda_129cuMemAlloc, METH_O, __pyx_doc_4cuda_4cuda_128cuMemAlloc};
static PyObject *__pyx_pw_4cuda_4cuda_129cuMemAlloc(PyObject *__pyx_self, PyObject *__pyx_arg_bytesize) {
  size_t __pyx_v_bytesize;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemAlloc (wrapper)", 0);
  assert(__pyx_arg_bytesize); {
    __pyx_v_bytesize = __Pyx_PyInt_As_size_t(__pyx_arg_bytesize); if (unlikely((__pyx_v_bytesize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 14433, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemAlloc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_128cuMemAlloc(__pyx_self, ((size_t)__pyx_v_bytesize));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_128cuMemAlloc(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_bytesize) {
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_dptr = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__674)
  __Pyx_RefNannySetupContext("cuMemAlloc", 0);
  __Pyx_TraceCall("cuMemAlloc", __pyx_f[0], 14433, 0, __PYX_ERR(0, 14433, __pyx_L1_error));

  /* "cuda/cuda.pyx":14458
 *     :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMalloc`
 *     """
 *     cdef CUdeviceptr dptr = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemAlloc(dptr._ptr, bytesize)
 *     return (CUresult(err), dptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14459
 *     """
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 *     err = ccuda.cuMemAlloc(dptr._ptr, bytesize)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), dptr)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuMemAlloc(__pyx_v_dptr->_ptr, __pyx_v_bytesize); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14459, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":14460
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 *     err = ccuda.cuMemAlloc(dptr._ptr, bytesize)
 *     return (CUresult(err), dptr)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_dptr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dptr));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_dptr));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14433
 * 
 * @cython.embedsignature(True)
 * def cuMemAlloc(size_t bytesize):             # <<<<<<<<<<<<<<
 *     """ Allocates device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuMemAlloc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14463
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocPitch(size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes):             # <<<<<<<<<<<<<<
 *     """ Allocates pitched device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_131cuMemAllocPitch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_130cuMemAllocPitch[] = "cuMemAllocPitch(size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes)\n Allocates pitched device memory.\n\n    Allocates at least `WidthInBytes` * `Height` bytes of linear memory on\n    the device and returns in `*dptr` a pointer to the allocated memory.\n    The function may pad the allocation to ensure that corresponding\n    pointers in any given row will continue to meet the alignment\n    requirements for coalescing as the address is updated from row to row.\n    `ElementSizeBytes` specifies the size of the largest reads and writes\n    that will be performed on the memory range. `ElementSizeBytes` may be\n    4, 8 or 16 (since coalesced memory transactions are not possible on\n    other data sizes). If `ElementSizeBytes` is smaller than the actual\n    read/write size of a kernel, the kernel will run correctly, but\n    possibly at reduced speed. The pitch returned in `*pPitch` by\n    :py:obj:`~.cuMemAllocPitch()` is the width in bytes of the allocation.\n    The intended usage of pitch is as a separate parameter of the\n    allocation, used to compute addresses within the 2D array. Given the\n    row and column of an array element of type T, the address is computed\n    as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    The pitch returned by :py:obj:`~.cuMemAllocPitch()` is guaranteed to\n    work with :py:obj:`~.cuMemcpy2D()` under all circumstances. For\n    allocations of 2D arrays, it is recommended that programmers consider\n    performing pitch allocations using :py:obj:`~.cuMemAllocPitch()`. Due\n    to alignment restrictions in the hardware, this is especially true if\n    the application will be performing 2D memory copies between different\n    regions of device memory (whether linear memory or CUDA arrays).\n\n    The byte alignment of the pitch returned by\n    :py:obj:`~.cuMemAllocPitch()` is guaranteed to match or exceed the\n    alignment requirement for texture binding with\n    :py:obj:`~.cuTexRefSetA""ddress2D()`.\n\n    Parameters\n    ----------\n    WidthInBytes : size_t\n        Requested allocation width in bytes\n    Height : size_t\n        Requested allocation height in rows\n    ElementSizeBytes : unsigned int\n        Size of largest reads/writes for range\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    dptr : :py:obj:`~.CUdeviceptr`\n        Returned device pointer\n    pPitch : int\n        Returned pitch of allocation in bytes\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMallocPitch`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_131cuMemAllocPitch = {"cuMemAllocPitch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_131cuMemAllocPitch, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_130cuMemAllocPitch};
static PyObject *__pyx_pw_4cuda_4cuda_131cuMemAllocPitch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_WidthInBytes;
  size_t __pyx_v_Height;
  unsigned int __pyx_v_ElementSizeBytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemAllocPitch (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_WidthInBytes_2,&__pyx_n_s_Height_2,&__pyx_n_s_ElementSizeBytes,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_WidthInBytes_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Height_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAllocPitch", 1, 3, 3, 1); __PYX_ERR(0, 14463, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ElementSizeBytes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAllocPitch", 1, 3, 3, 2); __PYX_ERR(0, 14463, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemAllocPitch") < 0)) __PYX_ERR(0, 14463, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_WidthInBytes = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_WidthInBytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 14463, __pyx_L3_error)
    __pyx_v_Height = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_Height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 14463, __pyx_L3_error)
    __pyx_v_ElementSizeBytes = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_ElementSizeBytes == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 14463, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemAllocPitch", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 14463, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemAllocPitch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_130cuMemAllocPitch(__pyx_self, __pyx_v_WidthInBytes, __pyx_v_Height, __pyx_v_ElementSizeBytes);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_130cuMemAllocPitch(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_WidthInBytes, size_t __pyx_v_Height, unsigned int __pyx_v_ElementSizeBytes) {
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_dptr = 0;
  size_t __pyx_v_pPitch;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__675)
  __Pyx_RefNannySetupContext("cuMemAllocPitch", 0);
  __Pyx_TraceCall("cuMemAllocPitch", __pyx_f[0], 14463, 0, __PYX_ERR(0, 14463, __pyx_L1_error));

  /* "cuda/cuda.pyx":14520
 *     :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMallocPitch`
 *     """
 *     cdef CUdeviceptr dptr = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     cdef size_t pPitch = 0
 *     err = ccuda.cuMemAllocPitch(dptr._ptr, &pPitch, WidthInBytes, Height, ElementSizeBytes)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14521
 *     """
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 *     cdef size_t pPitch = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemAllocPitch(dptr._ptr, &pPitch, WidthInBytes, Height, ElementSizeBytes)
 *     return (CUresult(err), dptr, pPitch)
 */
  __pyx_v_pPitch = 0;

  /* "cuda/cuda.pyx":14522
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 *     cdef size_t pPitch = 0
 *     err = ccuda.cuMemAllocPitch(dptr._ptr, &pPitch, WidthInBytes, Height, ElementSizeBytes)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), dptr, pPitch)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuMemAllocPitch(__pyx_v_dptr->_ptr, (&__pyx_v_pPitch), __pyx_v_WidthInBytes, __pyx_v_Height, __pyx_v_ElementSizeBytes); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14522, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":14523
 *     cdef size_t pPitch = 0
 *     err = ccuda.cuMemAllocPitch(dptr._ptr, &pPitch, WidthInBytes, Height, ElementSizeBytes)
 *     return (CUresult(err), dptr, pPitch)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_pPitch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_dptr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dptr));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_dptr));
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14463
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocPitch(size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes):             # <<<<<<<<<<<<<<
 *     """ Allocates pitched device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuMemAllocPitch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14526
 * 
 * @cython.embedsignature(True)
 * def cuMemFree(dptr):             # <<<<<<<<<<<<<<
 *     """ Frees device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_133cuMemFree(PyObject *__pyx_self, PyObject *__pyx_v_dptr); /*proto*/
static char __pyx_doc_4cuda_4cuda_132cuMemFree[] = "cuMemFree(dptr)\n Frees device memory.\n\n    Frees the memory space pointed to by `dptr`, which must have been\n    returned by a previous call to one of the following memory allocation\n    APIs - :py:obj:`~.cuMemAlloc()`, :py:obj:`~.cuMemAllocPitch()`,\n    :py:obj:`~.cuMemAllocManaged()`, :py:obj:`~.cuMemAllocAsync()`,\n    :py:obj:`~.cuMemAllocFromPoolAsync()`\n\n    Note - This API will not perform any implict synchronization when the\n    pointer was allocated with :py:obj:`~.cuMemAllocAsync` or\n    :py:obj:`~.cuMemAllocFromPoolAsync`. Callers must ensure that all\n    accesses to the pointer have completed before invoking\n    :py:obj:`~.cuMemFree`. For best performance and memory reuse, users\n    should use :py:obj:`~.cuMemFreeAsync` to free memory allocated via the\n    stream ordered memory allocator.\n\n    Parameters\n    ----------\n    dptr : :py:obj:`~.CUdeviceptr`\n        Pointer to memory to free\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemAllocManaged`, :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemAllocFromPoolAsync`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`,"" :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaFree`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_133cuMemFree = {"cuMemFree", (PyCFunction)__pyx_pw_4cuda_4cuda_133cuMemFree, METH_O, __pyx_doc_4cuda_4cuda_132cuMemFree};
static PyObject *__pyx_pw_4cuda_4cuda_133cuMemFree(PyObject *__pyx_self, PyObject *__pyx_v_dptr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemFree (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_132cuMemFree(__pyx_self, ((PyObject *)__pyx_v_dptr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_132cuMemFree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dptr) {
  CUdeviceptr __pyx_v_cdptr;
  PyObject *__pyx_v_pdptr = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__676)
  __Pyx_RefNannySetupContext("cuMemFree", 0);
  __Pyx_TraceCall("cuMemFree", __pyx_f[0], 14526, 0, __PYX_ERR(0, 14526, __pyx_L1_error));

  /* "cuda/cuda.pyx":14558
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":14559
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 */
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":14558
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14560
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":14561
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":14562
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14562, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":14560
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14564
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":14565
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemFree(cdptr)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14565, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":14567
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 *     err = ccuda.cuMemFree(cdptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemFree(__pyx_v_cdptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14567, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":14568
 * 
 *     err = ccuda.cuMemFree(cdptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14526
 * 
 * @cython.embedsignature(True)
 * def cuMemFree(dptr):             # <<<<<<<<<<<<<<
 *     """ Frees device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemFree", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14571
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAddressRange(dptr):             # <<<<<<<<<<<<<<
 *     """ Get information on memory allocations.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_135cuMemGetAddressRange(PyObject *__pyx_self, PyObject *__pyx_v_dptr); /*proto*/
static char __pyx_doc_4cuda_4cuda_134cuMemGetAddressRange[] = "cuMemGetAddressRange(dptr)\n Get information on memory allocations.\n\n    Returns the base address in `*pbase` and size in `*psize` of the\n    allocation by :py:obj:`~.cuMemAlloc()` or :py:obj:`~.cuMemAllocPitch()`\n    that contains the input pointer `dptr`. Both parameters `pbase` and\n    `psize` are optional. If one of them is NULL, it is ignored.\n\n    Parameters\n    ----------\n    dptr : :py:obj:`~.CUdeviceptr`\n        Device pointer to query\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pbase : :py:obj:`~.CUdeviceptr`\n        Returned base address\n    psize : int\n        Returned size of device memory allocation\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_135cuMemGetAddressRange = {"cuMemGetAddressRange", (PyCFunction)__pyx_pw_4cuda_4cuda_135cuMemGetAddressRange, METH_O, __pyx_doc_4cuda_4cuda_134cuMemGetAddressRange};
static PyObject *__pyx_pw_4cuda_4cuda_135cuMemGetAddressRange(PyObject *__pyx_self, PyObject *__pyx_v_dptr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemGetAddressRange (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_134cuMemGetAddressRange(__pyx_self, ((PyObject *)__pyx_v_dptr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_134cuMemGetAddressRange(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dptr) {
  CUdeviceptr __pyx_v_cdptr;
  PyObject *__pyx_v_pdptr = NULL;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_pbase = 0;
  size_t __pyx_v_psize;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__677)
  __Pyx_RefNannySetupContext("cuMemGetAddressRange", 0);
  __Pyx_TraceCall("cuMemGetAddressRange", __pyx_f[0], 14571, 0, __PYX_ERR(0, 14571, __pyx_L1_error));

  /* "cuda/cuda.pyx":14598
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":14599
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 */
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":14598
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14600
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":14601
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":14602
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14602, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":14600
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":14604
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":14605
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 * 
 *     cdef CUdeviceptr pbase = CUdeviceptr()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14605, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":14607
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 *     cdef CUdeviceptr pbase = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     cdef size_t psize = 0
 *     err = ccuda.cuMemGetAddressRange(pbase._ptr, &psize, cdptr)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pbase = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":14608
 * 
 *     cdef CUdeviceptr pbase = CUdeviceptr()
 *     cdef size_t psize = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemGetAddressRange(pbase._ptr, &psize, cdptr)
 *     return (CUresult(err), pbase, psize)
 */
  __pyx_v_psize = 0;

  /* "cuda/cuda.pyx":14609
 *     cdef CUdeviceptr pbase = CUdeviceptr()
 *     cdef size_t psize = 0
 *     err = ccuda.cuMemGetAddressRange(pbase._ptr, &psize, cdptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pbase, psize)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemGetAddressRange(__pyx_v_pbase->_ptr, (&__pyx_v_psize), __pyx_v_cdptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14609, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":14610
 *     cdef size_t psize = 0
 *     err = ccuda.cuMemGetAddressRange(pbase._ptr, &psize, cdptr)
 *     return (CUresult(err), pbase, psize)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_psize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pbase));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pbase));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_pbase));
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14571
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAddressRange(dptr):             # <<<<<<<<<<<<<<
 *     """ Get information on memory allocations.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemGetAddressRange", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdptr);
  __Pyx_XDECREF((PyObject *)__pyx_v_pbase);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14613
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocHost(size_t bytesize):             # <<<<<<<<<<<<<<
 *     """ Allocates page-locked host memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_137cuMemAllocHost(PyObject *__pyx_self, PyObject *__pyx_arg_bytesize); /*proto*/
static char __pyx_doc_4cuda_4cuda_136cuMemAllocHost[] = "cuMemAllocHost(size_t bytesize)\n Allocates page-locked host memory.\n\n    Allocates `bytesize` bytes of host memory that is page-locked and\n    accessible to the device. The driver tracks the virtual memory ranges\n    allocated with this function and automatically accelerates calls to\n    functions such as :py:obj:`~.cuMemcpy()`. Since the memory can be\n    accessed directly by the device, it can be read or written with much\n    higher bandwidth than pageable memory obtained with functions such as\n    :py:obj:`~.malloc()`. Allocating excessive amounts of memory with\n    :py:obj:`~.cuMemAllocHost()` may degrade system performance, since it\n    reduces the amount of memory available to the system for paging. As a\n    result, this function is best used sparingly to allocate staging areas\n    for data exchange between host and device.\n\n    Note all host memory allocated using :py:obj:`~.cuMemHostAlloc()` will\n    automatically be immediately accessible to all contexts on all devices\n    which support unified addressing (as may be queried using\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING`). The device pointer\n    that may be used to access this host memory from those contexts is\n    always equal to the returned host pointer `*pp`. See :py:obj:`~.Unified\n    Addressing` for additional details.\n\n    Parameters\n    ----------\n    bytesize : size_t\n        Requested allocation size in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    pp : Any\n        Returned host pointer to page-locked memory\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~"".cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMallocHost`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_137cuMemAllocHost = {"cuMemAllocHost", (PyCFunction)__pyx_pw_4cuda_4cuda_137cuMemAllocHost, METH_O, __pyx_doc_4cuda_4cuda_136cuMemAllocHost};
static PyObject *__pyx_pw_4cuda_4cuda_137cuMemAllocHost(PyObject *__pyx_self, PyObject *__pyx_arg_bytesize) {
  size_t __pyx_v_bytesize;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemAllocHost (wrapper)", 0);
  assert(__pyx_arg_bytesize); {
    __pyx_v_bytesize = __Pyx_PyInt_As_size_t(__pyx_arg_bytesize); if (unlikely((__pyx_v_bytesize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 14613, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemAllocHost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_136cuMemAllocHost(__pyx_self, ((size_t)__pyx_v_bytesize));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_136cuMemAllocHost(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_bytesize) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_pp;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__678)
  __Pyx_RefNannySetupContext("cuMemAllocHost", 0);
  __Pyx_TraceCall("cuMemAllocHost", __pyx_f[0], 14613, 0, __PYX_ERR(0, 14613, __pyx_L1_error));

  /* "cuda/cuda.pyx":14652
 *     :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMallocHost`
 *     """
 *     cdef void_ptr pp = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemAllocHost(<void**>&pp, bytesize)
 *     return (CUresult(err), pp)
 */
  __pyx_v_pp = 0;

  /* "cuda/cuda.pyx":14653
 *     """
 *     cdef void_ptr pp = 0
 *     err = ccuda.cuMemAllocHost(<void**>&pp, bytesize)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pp)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuMemAllocHost(((void **)(&__pyx_v_pp)), __pyx_v_bytesize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14653, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":14654
 *     cdef void_ptr pp = 0
 *     err = ccuda.cuMemAllocHost(<void**>&pp, bytesize)
 *     return (CUresult(err), pp)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_pp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14613
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocHost(size_t bytesize):             # <<<<<<<<<<<<<<
 *     """ Allocates page-locked host memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuMemAllocHost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14657
 * 
 * @cython.embedsignature(True)
 * def cuMemFreeHost(p):             # <<<<<<<<<<<<<<
 *     """ Frees page-locked host memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_139cuMemFreeHost(PyObject *__pyx_self, PyObject *__pyx_v_p); /*proto*/
static char __pyx_doc_4cuda_4cuda_138cuMemFreeHost[] = "cuMemFreeHost(p)\n Frees page-locked host memory.\n\n    Frees the memory space pointed to by `p`, which must have been returned\n    by a previous call to :py:obj:`~.cuMemAllocHost()`.\n\n    Parameters\n    ----------\n    p : Any\n        Pointer to memory to free\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaFreeHost`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_139cuMemFreeHost = {"cuMemFreeHost", (PyCFunction)__pyx_pw_4cuda_4cuda_139cuMemFreeHost, METH_O, __pyx_doc_4cuda_4cuda_138cuMemFreeHost};
static PyObject *__pyx_pw_4cuda_4cuda_139cuMemFreeHost(PyObject *__pyx_self, PyObject *__pyx_v_p) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemFreeHost (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_138cuMemFreeHost(__pyx_self, ((PyObject *)__pyx_v_p));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_138cuMemFreeHost(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p) {
  PyObject *__pyx_v_cp = NULL;
  void *__pyx_v_cp_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__679)
  __Pyx_RefNannySetupContext("cuMemFreeHost", 0);
  __Pyx_TraceCall("cuMemFreeHost", __pyx_f[0], 14657, 0, __PYX_ERR(0, 14657, __pyx_L1_error));

  /* "cuda/cuda.pyx":14677
 *     :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaFreeHost`
 *     """
 *     cp = utils.HelperInputVoidPtr(p)             # <<<<<<<<<<<<<<
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemFreeHost(cp_ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14678
 *     """
 *     cp = utils.HelperInputVoidPtr(p)
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemFreeHost(cp_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cp, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cp_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":14679
 *     cp = utils.HelperInputVoidPtr(p)
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemFreeHost(cp_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuMemFreeHost(__pyx_v_cp_ptr); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14679, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":14680
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemFreeHost(cp_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14657
 * 
 * @cython.embedsignature(True)
 * def cuMemFreeHost(p):             # <<<<<<<<<<<<<<
 *     """ Frees page-locked host memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuMemFreeHost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14683
 * 
 * @cython.embedsignature(True)
 * def cuMemHostAlloc(size_t bytesize, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Allocates page-locked host memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_141cuMemHostAlloc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_140cuMemHostAlloc[] = "cuMemHostAlloc(size_t bytesize, unsigned int Flags)\n Allocates page-locked host memory.\n\n    Allocates `bytesize` bytes of host memory that is page-locked and\n    accessible to the device. The driver tracks the virtual memory ranges\n    allocated with this function and automatically accelerates calls to\n    functions such as :py:obj:`~.cuMemcpyHtoD()`. Since the memory can be\n    accessed directly by the device, it can be read or written with much\n    higher bandwidth than pageable memory obtained with functions such as\n    :py:obj:`~.malloc()`. Allocating excessive amounts of pinned memory may\n    degrade system performance, since it reduces the amount of memory\n    available to the system for paging. As a result, this function is best\n    used sparingly to allocate staging areas for data exchange between host\n    and device.\n\n    The `Flags` parameter enables different options to be specified that\n    affect the allocation, as follows.\n\n    - :py:obj:`~.CU_MEMHOSTALLOC_PORTABLE`: The memory returned by this\n      call will be considered as pinned memory by all CUDA contexts, not\n      just the one that performed the allocation.\n\n    - :py:obj:`~.CU_MEMHOSTALLOC_DEVICEMAP`: Maps the allocation into the\n      CUDA address space. The device pointer to the memory may be obtained\n      by calling :py:obj:`~.cuMemHostGetDevicePointer()`.\n\n    - :py:obj:`~.CU_MEMHOSTALLOC_WRITECOMBINED`: Allocates the memory as\n      write-combined (WC). WC memory can be transferred across the PCI\n      Express bus more quickly on some system configurations, but cannot be\n      read efficiently by most CPUs. WC memory is a good option for buffers\n      that will be written by the CPU and read by the GPU via mapped pinned\n      memory or host->device transfers.\n\n    All of these flags are orthogonal to one another: a developer may\n    allocate memory that is portable, mapped and/or write-combined with no\n    restrictions.\n\n    The :py:obj:`~.CU_MEMHOST""ALLOC_DEVICEMAP` flag may be specified on CUDA\n    contexts for devices that do not support mapped pinned memory. The\n    failure is deferred to :py:obj:`~.cuMemHostGetDevicePointer()` because\n    the memory may be mapped into other CUDA contexts via the\n    :py:obj:`~.CU_MEMHOSTALLOC_PORTABLE` flag.\n\n    The memory allocated by this function must be freed with\n    :py:obj:`~.cuMemFreeHost()`.\n\n    Note all host memory allocated using :py:obj:`~.cuMemHostAlloc()` will\n    automatically be immediately accessible to all contexts on all devices\n    which support unified addressing (as may be queried using\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING`). Unless the flag\n    :py:obj:`~.CU_MEMHOSTALLOC_WRITECOMBINED` is specified, the device\n    pointer that may be used to access this host memory from those contexts\n    is always equal to the returned host pointer `*pp`. If the flag\n    :py:obj:`~.CU_MEMHOSTALLOC_WRITECOMBINED` is specified, then the\n    function :py:obj:`~.cuMemHostGetDevicePointer()` must be used to query\n    the device pointer, even if the context supports unified addressing.\n    See :py:obj:`~.Unified Addressing` for additional details.\n\n    Parameters\n    ----------\n    bytesize : size_t\n        Requested allocation size in bytes\n    Flags : unsigned int\n        Flags for allocation request\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    pp : Any\n        Returned host pointer to page-locked memory\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj"":`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaHostAlloc`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_141cuMemHostAlloc = {"cuMemHostAlloc", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_141cuMemHostAlloc, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_140cuMemHostAlloc};
static PyObject *__pyx_pw_4cuda_4cuda_141cuMemHostAlloc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_bytesize;
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemHostAlloc (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bytesize_2,&__pyx_n_s_Flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bytesize_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemHostAlloc", 1, 2, 2, 1); __PYX_ERR(0, 14683, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemHostAlloc") < 0)) __PYX_ERR(0, 14683, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_bytesize = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_bytesize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 14683, __pyx_L3_error)
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 14683, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemHostAlloc", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 14683, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemHostAlloc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_140cuMemHostAlloc(__pyx_self, __pyx_v_bytesize, __pyx_v_Flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_140cuMemHostAlloc(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_pp;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__680)
  __Pyx_RefNannySetupContext("cuMemHostAlloc", 0);
  __Pyx_TraceCall("cuMemHostAlloc", __pyx_f[0], 14683, 0, __PYX_ERR(0, 14683, __pyx_L1_error));

  /* "cuda/cuda.pyx":14759
 *     :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaHostAlloc`
 *     """
 *     cdef void_ptr pp = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemHostAlloc(<void**>&pp, bytesize, Flags)
 *     return (CUresult(err), pp)
 */
  __pyx_v_pp = 0;

  /* "cuda/cuda.pyx":14760
 *     """
 *     cdef void_ptr pp = 0
 *     err = ccuda.cuMemHostAlloc(<void**>&pp, bytesize, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pp)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuMemHostAlloc(((void **)(&__pyx_v_pp)), __pyx_v_bytesize, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14760, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":14761
 *     cdef void_ptr pp = 0
 *     err = ccuda.cuMemHostAlloc(<void**>&pp, bytesize, Flags)
 *     return (CUresult(err), pp)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_pp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14683
 * 
 * @cython.embedsignature(True)
 * def cuMemHostAlloc(size_t bytesize, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Allocates page-locked host memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuMemHostAlloc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14764
 * 
 * @cython.embedsignature(True)
 * def cuMemHostGetDevicePointer(p, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Passes back device pointer of mapped pinned memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_143cuMemHostGetDevicePointer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_142cuMemHostGetDevicePointer[] = "cuMemHostGetDevicePointer(p, unsigned int Flags)\n Passes back device pointer of mapped pinned memory.\n\n    Passes back the device pointer `pdptr` corresponding to the mapped,\n    pinned host buffer `p` allocated by :py:obj:`~.cuMemHostAlloc`.\n\n    :py:obj:`~.cuMemHostGetDevicePointer()` will fail if the\n    :py:obj:`~.CU_MEMHOSTALLOC_DEVICEMAP` flag was not specified at the\n    time the memory was allocated, or if the function is called on a GPU\n    that does not support mapped pinned memory.\n\n    For devices that have a non-zero value for the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM`,\n    the memory can also be accessed from the device using the host pointer\n    `p`. The device pointer returned by\n    :py:obj:`~.cuMemHostGetDevicePointer()` may or may not match the\n    original host pointer `p` and depends on the devices visible to the\n    application. If all devices visible to the application have a non-zero\n    value for the device attribute, the device pointer returned by\n    :py:obj:`~.cuMemHostGetDevicePointer()` will match the original pointer\n    `p`. If any device visible to the application has a zero value for the\n    device attribute, the device pointer returned by\n    :py:obj:`~.cuMemHostGetDevicePointer()` will not match the original\n    host pointer `p`, but it will be suitable for use on all devices\n    provided Unified Virtual Addressing is enabled. In such systems, it is\n    valid to access the memory using either pointer on devices that have a\n    non-zero value for the device attribute. Note however that such devices\n    should access the memory using only one of the two pointers and not\n    both.\n\n    `Flags` provides for future releases. For now, it must be set to 0.\n\n    Parameters\n    ----------\n    p : Any\n        Host pointer\n    Flags : unsigned int\n        Options (must be 0)\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :""py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pdptr : :py:obj:`~.CUdeviceptr`\n        Returned device pointer\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaHostGetDevicePointer`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_143cuMemHostGetDevicePointer = {"cuMemHostGetDevicePointer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_143cuMemHostGetDevicePointer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_142cuMemHostGetDevicePointer};
static PyObject *__pyx_pw_4cuda_4cuda_143cuMemHostGetDevicePointer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemHostGetDevicePointer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_Flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemHostGetDevicePointer", 1, 2, 2, 1); __PYX_ERR(0, 14764, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemHostGetDevicePointer") < 0)) __PYX_ERR(0, 14764, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_p = values[0];
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 14764, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemHostGetDevicePointer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 14764, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemHostGetDevicePointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_142cuMemHostGetDevicePointer(__pyx_self, __pyx_v_p, __pyx_v_Flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_142cuMemHostGetDevicePointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, unsigned int __pyx_v_Flags) {
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_pdptr = 0;
  PyObject *__pyx_v_cp = NULL;
  void *__pyx_v_cp_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__681)
  __Pyx_RefNannySetupContext("cuMemHostGetDevicePointer", 0);
  __Pyx_TraceCall("cuMemHostGetDevicePointer", __pyx_f[0], 14764, 0, __PYX_ERR(0, 14764, __pyx_L1_error));

  /* "cuda/cuda.pyx":14814
 *     :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaHostGetDevicePointer`
 *     """
 *     cdef CUdeviceptr pdptr = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     cp = utils.HelperInputVoidPtr(p)
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pdptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14815
 *     """
 *     cdef CUdeviceptr pdptr = CUdeviceptr()
 *     cp = utils.HelperInputVoidPtr(p)             # <<<<<<<<<<<<<<
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemHostGetDevicePointer(pdptr._ptr, cp_ptr, Flags)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14816
 *     cdef CUdeviceptr pdptr = CUdeviceptr()
 *     cp = utils.HelperInputVoidPtr(p)
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemHostGetDevicePointer(pdptr._ptr, cp_ptr, Flags)
 *     return (CUresult(err), pdptr)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cp, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14816, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cp_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":14817
 *     cp = utils.HelperInputVoidPtr(p)
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemHostGetDevicePointer(pdptr._ptr, cp_ptr, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pdptr)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuMemHostGetDevicePointer(__pyx_v_pdptr->_ptr, __pyx_v_cp_ptr, __pyx_v_Flags); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14817, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":14818
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemHostGetDevicePointer(pdptr._ptr, cp_ptr, Flags)
 *     return (CUresult(err), pdptr)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pdptr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pdptr));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_pdptr));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14764
 * 
 * @cython.embedsignature(True)
 * def cuMemHostGetDevicePointer(p, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Passes back device pointer of mapped pinned memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuMemHostGetDevicePointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pdptr);
  __Pyx_XDECREF(__pyx_v_cp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14821
 * 
 * @cython.embedsignature(True)
 * def cuMemHostGetFlags(p):             # <<<<<<<<<<<<<<
 *     """ Passes back flags that were used for a pinned allocation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_145cuMemHostGetFlags(PyObject *__pyx_self, PyObject *__pyx_v_p); /*proto*/
static char __pyx_doc_4cuda_4cuda_144cuMemHostGetFlags[] = "cuMemHostGetFlags(p)\n Passes back flags that were used for a pinned allocation.\n\n    Passes back the flags `pFlags` that were specified when allocating the\n    pinned host buffer `p` allocated by :py:obj:`~.cuMemHostAlloc`.\n\n    :py:obj:`~.cuMemHostGetFlags()` will fail if the pointer does not\n    reside in an allocation performed by :py:obj:`~.cuMemAllocHost()` or\n    :py:obj:`~.cuMemHostAlloc()`.\n\n    Parameters\n    ----------\n    p : Any\n        Host pointer\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pFlags : unsigned int\n        Returned flags word\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cudaHostGetFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_145cuMemHostGetFlags = {"cuMemHostGetFlags", (PyCFunction)__pyx_pw_4cuda_4cuda_145cuMemHostGetFlags, METH_O, __pyx_doc_4cuda_4cuda_144cuMemHostGetFlags};
static PyObject *__pyx_pw_4cuda_4cuda_145cuMemHostGetFlags(PyObject *__pyx_self, PyObject *__pyx_v_p) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemHostGetFlags (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_144cuMemHostGetFlags(__pyx_self, ((PyObject *)__pyx_v_p));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_144cuMemHostGetFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p) {
  unsigned int __pyx_v_pFlags;
  PyObject *__pyx_v_cp = NULL;
  void *__pyx_v_cp_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__682)
  __Pyx_RefNannySetupContext("cuMemHostGetFlags", 0);
  __Pyx_TraceCall("cuMemHostGetFlags", __pyx_f[0], 14821, 0, __PYX_ERR(0, 14821, __pyx_L1_error));

  /* "cuda/cuda.pyx":14847
 *     :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cudaHostGetFlags`
 *     """
 *     cdef unsigned int pFlags = 0             # <<<<<<<<<<<<<<
 *     cp = utils.HelperInputVoidPtr(p)
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 */
  __pyx_v_pFlags = 0;

  /* "cuda/cuda.pyx":14848
 *     """
 *     cdef unsigned int pFlags = 0
 *     cp = utils.HelperInputVoidPtr(p)             # <<<<<<<<<<<<<<
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemHostGetFlags(&pFlags, cp_ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14849
 *     cdef unsigned int pFlags = 0
 *     cp = utils.HelperInputVoidPtr(p)
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemHostGetFlags(&pFlags, cp_ptr)
 *     return (CUresult(err), pFlags)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cp, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 14849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cp_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":14850
 *     cp = utils.HelperInputVoidPtr(p)
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemHostGetFlags(&pFlags, cp_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pFlags)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuMemHostGetFlags((&__pyx_v_pFlags), __pyx_v_cp_ptr); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14850, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":14851
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemHostGetFlags(&pFlags, cp_ptr)
 *     return (CUresult(err), pFlags)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_pFlags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14821
 * 
 * @cython.embedsignature(True)
 * def cuMemHostGetFlags(p):             # <<<<<<<<<<<<<<
 *     """ Passes back flags that were used for a pinned allocation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuMemHostGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14854
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocManaged(size_t bytesize, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Allocates memory that will be automatically managed by the Unified Memory system.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_147cuMemAllocManaged(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_146cuMemAllocManaged[] = "cuMemAllocManaged(size_t bytesize, unsigned int flags)\n Allocates memory that will be automatically managed by the Unified Memory system.\n\n    Allocates `bytesize` bytes of managed memory on the device and returns\n    in `*dptr` a pointer to the allocated memory. If the device doesn't\n    support allocating managed memory, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n    is returned. Support for managed memory can be queried using the device\n    attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY`. The allocated\n    memory is suitably aligned for any kind of variable. The memory is not\n    cleared. If `bytesize` is 0, :py:obj:`~.cuMemAllocManaged` returns\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. The pointer is valid on the CPU\n    and on all GPUs in the system that support managed memory. All accesses\n    to this pointer must obey the Unified Memory programming model.\n\n    `flags` specifies the default stream association for this allocation.\n    `flags` must be one of :py:obj:`~.CU_MEM_ATTACH_GLOBAL` or\n    :py:obj:`~.CU_MEM_ATTACH_HOST`. If :py:obj:`~.CU_MEM_ATTACH_GLOBAL` is\n    specified, then this memory is accessible from any stream on any\n    device. If :py:obj:`~.CU_MEM_ATTACH_HOST` is specified, then the\n    allocation should not be accessed from devices that have a zero value\n    for the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`; an explicit\n    call to :py:obj:`~.cuStreamAttachMemAsync` will be required to enable\n    access on such devices.\n\n    If the association is later changed via\n    :py:obj:`~.cuStreamAttachMemAsync` to a single stream, the default\n    association as specifed during :py:obj:`~.cuMemAllocManaged` is\n    restored when that stream is destroyed. For managed variables, the\n    default association is always :py:obj:`~.CU_MEM_ATTACH_GLOBAL`. Note\n    that destroying a stream is an asynchronous operation, and as a result,\n    the change to default association won't happen until"" all work in the\n    stream has completed.\n\n    Memory allocated with :py:obj:`~.cuMemAllocManaged` should be released\n    with :py:obj:`~.cuMemFree`.\n\n    Device memory oversubscription is possible for GPUs that have a non-\n    zero value for the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. Managed\n    memory on such GPUs may be evicted from device memory to host memory at\n    any time by the Unified Memory driver in order to make room for other\n    allocations.\n\n    In a multi-GPU system where all GPUs have a non-zero value for the\n    device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`, managed\n    memory may not be populated when this API returns and instead may be\n    populated on access. In such systems, managed memory can migrate to any\n    processor's memory at any time. The Unified Memory driver will employ\n    heuristics to maintain data locality and prevent excessive page faults\n    to the extent possible. The application can also guide the driver about\n    memory usage patterns via :py:obj:`~.cuMemAdvise`. The application can\n    also explicitly migrate memory to a desired processor's memory via\n    :py:obj:`~.cuMemPrefetchAsync`.\n\n    In a multi-GPU system where all of the GPUs have a zero value for the\n    device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` and all the\n    GPUs have peer-to-peer support with each other, the physical storage\n    for managed memory is created on the GPU which is active at the time\n    :py:obj:`~.cuMemAllocManaged` is called. All other GPUs will reference\n    the data at reduced bandwidth via peer mappings over the PCIe bus. The\n    Unified Memory driver does not migrate memory among such GPUs.\n\n    In a multi-GPU system where not all GPUs have peer-to-peer support with\n    each other and where the value of the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` is zero fo""r\n    at least one of those GPUs, the location chosen for physical storage of\n    managed memory is system-dependent.\n\n    - On Linux, the location chosen will be device memory as long as the\n      current set of active contexts are on devices that either have peer-\n      to-peer support with each other or have a non-zero value for the\n      device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. If there\n      is an active context on a GPU that does not have a non-zero value for\n      that device attribute and it does not have peer-to-peer support with\n      the other devices that have active contexts on them, then the\n      location for physical storage will be 'zero-copy' or host memory.\n      Note that this means that managed memory that is located in device\n      memory is migrated to host memory if a new context is created on a\n      GPU that doesn't have a non-zero value for the device attribute and\n      does not support peer-to-peer with at least one of the other devices\n      that has an active context. This in turn implies that context\n      creation may fail if there is insufficient host memory to migrate all\n      managed allocations.\n\n    - On Windows, the physical storage is always created in 'zero-copy' or\n      host memory. All GPUs will reference the data at reduced bandwidth\n      over the PCIe bus. In these circumstances, use of the environment\n      variable CUDA_VISIBLE_DEVICES is recommended to restrict CUDA to only\n      use those GPUs that have peer-to-peer support. Alternatively, users\n      can also set CUDA_MANAGED_FORCE_DEVICE_ALLOC to a non-zero value to\n      force the driver to always use device memory for physical storage.\n      When this environment variable is set to a non-zero value, all\n      contexts created in that process on devices that support managed\n      memory have to be peer-to-peer compatible with each other. Context\n      creation will fail if a context is creat""ed on a device that supports\n      managed memory and is not peer-to-peer compatible with any of the\n      other managed memory supporting devices on which contexts were\n      previously created, even if those contexts have been destroyed. These\n      environment variables are described in the CUDA programming guide\n      under the \"CUDA environment variables\" section.\n\n    - On ARM, managed memory is not available on discrete gpu with Drive\n      PX-2.\n\n    Parameters\n    ----------\n    bytesize : size_t\n        Requested allocation size in bytes\n    flags : unsigned int\n        Must be one of :py:obj:`~.CU_MEM_ATTACH_GLOBAL` or\n        :py:obj:`~.CU_MEM_ATTACH_HOST`\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    dptr : :py:obj:`~.CUdeviceptr`\n        Returned device pointer\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py"":obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuStreamAttachMemAsync`, :py:obj:`~.cudaMallocManaged`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_147cuMemAllocManaged = {"cuMemAllocManaged", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_147cuMemAllocManaged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_146cuMemAllocManaged};
static PyObject *__pyx_pw_4cuda_4cuda_147cuMemAllocManaged(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_bytesize;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemAllocManaged (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bytesize_2,&__pyx_n_s_flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bytesize_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAllocManaged", 1, 2, 2, 1); __PYX_ERR(0, 14854, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemAllocManaged") < 0)) __PYX_ERR(0, 14854, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_bytesize = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_bytesize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 14854, __pyx_L3_error)
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 14854, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemAllocManaged", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 14854, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemAllocManaged", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_146cuMemAllocManaged(__pyx_self, __pyx_v_bytesize, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_146cuMemAllocManaged(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_bytesize, unsigned int __pyx_v_flags) {
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_dptr = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__683)
  __Pyx_RefNannySetupContext("cuMemAllocManaged", 0);
  __Pyx_TraceCall("cuMemAllocManaged", __pyx_f[0], 14854, 0, __PYX_ERR(0, 14854, __pyx_L1_error));

  /* "cuda/cuda.pyx":14981
 *     :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuStreamAttachMemAsync`, :py:obj:`~.cudaMallocManaged`
 *     """
 *     cdef CUdeviceptr dptr = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemAllocManaged(dptr._ptr, bytesize, flags)
 *     return (CUresult(err), dptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14982
 *     """
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 *     err = ccuda.cuMemAllocManaged(dptr._ptr, bytesize, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), dptr)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuMemAllocManaged(__pyx_v_dptr->_ptr, __pyx_v_bytesize, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 14982, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":14983
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 *     err = ccuda.cuMemAllocManaged(dptr._ptr, bytesize, flags)
 *     return (CUresult(err), dptr)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_dptr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dptr));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_dptr));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14854
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocManaged(size_t bytesize, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Allocates memory that will be automatically managed by the Unified Memory system.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuMemAllocManaged", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":14986
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetByPCIBusId(char* pciBusId):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a compute device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_149cuDeviceGetByPCIBusId(PyObject *__pyx_self, PyObject *__pyx_arg_pciBusId); /*proto*/
static char __pyx_doc_4cuda_4cuda_148cuDeviceGetByPCIBusId[] = "cuDeviceGetByPCIBusId(char *pciBusId)\n Returns a handle to a compute device.\n\n    Returns in `*device` a device handle given a PCI bus ID string.\n\n    where `domain`, `bus`, `device`, and `function` are all hexadecimal\n    values\n\n    Parameters\n    ----------\n    pciBusId : bytes\n        String in one of the following forms:\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    dev : :py:obj:`~.CUdevice`\n        Returned device handle\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetPCIBusId`, :py:obj:`~.cudaDeviceGetByPCIBusId`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_149cuDeviceGetByPCIBusId = {"cuDeviceGetByPCIBusId", (PyCFunction)__pyx_pw_4cuda_4cuda_149cuDeviceGetByPCIBusId, METH_O, __pyx_doc_4cuda_4cuda_148cuDeviceGetByPCIBusId};
static PyObject *__pyx_pw_4cuda_4cuda_149cuDeviceGetByPCIBusId(PyObject *__pyx_self, PyObject *__pyx_arg_pciBusId) {
  char *__pyx_v_pciBusId;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetByPCIBusId (wrapper)", 0);
  assert(__pyx_arg_pciBusId); {
    __pyx_v_pciBusId = __Pyx_PyObject_AsWritableString(__pyx_arg_pciBusId); if (unlikely((!__pyx_v_pciBusId) && PyErr_Occurred())) __PYX_ERR(0, 14986, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetByPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_148cuDeviceGetByPCIBusId(__pyx_self, ((char *)__pyx_v_pciBusId));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_148cuDeviceGetByPCIBusId(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_pciBusId) {
  struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_dev = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__684)
  __Pyx_RefNannySetupContext("cuDeviceGetByPCIBusId", 0);
  __Pyx_TraceCall("cuDeviceGetByPCIBusId", __pyx_f[0], 14986, 0, __PYX_ERR(0, 14986, __pyx_L1_error));

  /* "cuda/cuda.pyx":15010
 *     :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetPCIBusId`, :py:obj:`~.cudaDeviceGetByPCIBusId`
 *     """
 *     cdef CUdevice dev = CUdevice()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetByPCIBusId(dev._ptr, pciBusId)
 *     return (CUresult(err), dev)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dev = ((struct __pyx_obj_4cuda_4cuda_CUdevice *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15011
 *     """
 *     cdef CUdevice dev = CUdevice()
 *     err = ccuda.cuDeviceGetByPCIBusId(dev._ptr, pciBusId)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), dev)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuDeviceGetByPCIBusId(__pyx_v_dev->_ptr, __pyx_v_pciBusId); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15011, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":15012
 *     cdef CUdevice dev = CUdevice()
 *     err = ccuda.cuDeviceGetByPCIBusId(dev._ptr, pciBusId)
 *     return (CUresult(err), dev)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_dev));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dev));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_dev));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":14986
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetByPCIBusId(char* pciBusId):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a compute device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetByPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15015
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetPCIBusId(int length, dev):             # <<<<<<<<<<<<<<
 *     """ Returns a PCI Bus Id string for the device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_151cuDeviceGetPCIBusId(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_150cuDeviceGetPCIBusId[] = "cuDeviceGetPCIBusId(int length, dev)\n Returns a PCI Bus Id string for the device.\n\n    Returns an ASCII string identifying the device `dev` in the NULL-\n    terminated string pointed to by `pciBusId`. `length` specifies the\n    maximum length of the string that may be returned.\n\n    where `domain`, `bus`, `device`, and `function` are all hexadecimal\n    values. pciBusId should be large enough to store 13 characters\n    including the NULL-terminator.\n\n    Parameters\n    ----------\n    length : int\n        Maximum length of string to store in `name`\n    dev : :py:obj:`~.CUdevice`\n        Device to get identifier string for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    pciBusId : bytes\n        Returned identifier string for the device in the following format\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetByPCIBusId`, :py:obj:`~.cudaDeviceGetPCIBusId`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_151cuDeviceGetPCIBusId = {"cuDeviceGetPCIBusId", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_151cuDeviceGetPCIBusId, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_150cuDeviceGetPCIBusId};
static PyObject *__pyx_pw_4cuda_4cuda_151cuDeviceGetPCIBusId(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_length;
  PyObject *__pyx_v_dev = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetPCIBusId (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_length,&__pyx_n_s_dev,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dev)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceGetPCIBusId", 1, 2, 2, 1); __PYX_ERR(0, 15015, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuDeviceGetPCIBusId") < 0)) __PYX_ERR(0, 15015, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_length = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_length == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 15015, __pyx_L3_error)
    __pyx_v_dev = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuDeviceGetPCIBusId", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15015, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_150cuDeviceGetPCIBusId(__pyx_self, __pyx_v_length, __pyx_v_dev);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_150cuDeviceGetPCIBusId(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_length, PyObject *__pyx_v_dev) {
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  PyObject *__pyx_v_pypciBusId = NULL;
  char *__pyx_v_pciBusId;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__685)
  __Pyx_RefNannySetupContext("cuDeviceGetPCIBusId", 0);
  __Pyx_TraceCall("cuDeviceGetPCIBusId", __pyx_f[0], 15015, 0, __PYX_ERR(0, 15015, __pyx_L1_error));

  /* "cuda/cuda.pyx":15045
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15046
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":15045
 *     """
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15047
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15048
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15049
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 15049, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":15047
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15051
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15052
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     pypciBusId = b" " * length
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 15052, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15054
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     pypciBusId = b" " * length             # <<<<<<<<<<<<<<
 *     cdef char* pciBusId = pypciBusId
 *     err = ccuda.cuDeviceGetPCIBusId(pciBusId, length, cdev)
 */
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyNumber_Multiply(__pyx_kp_b__613, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 15054, __pyx_L1_error)
  __pyx_v_pypciBusId = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":15055
 * 
 *     pypciBusId = b" " * length
 *     cdef char* pciBusId = pypciBusId             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetPCIBusId(pciBusId, length, cdev)
 *     return (CUresult(err), pypciBusId)
 */
  if (unlikely(__pyx_v_pypciBusId == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 15055, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_pypciBusId); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 15055, __pyx_L1_error)
  __pyx_v_pciBusId = __pyx_t_6;

  /* "cuda/cuda.pyx":15056
 *     pypciBusId = b" " * length
 *     cdef char* pciBusId = pypciBusId
 *     err = ccuda.cuDeviceGetPCIBusId(pciBusId, length, cdev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pypciBusId)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuDeviceGetPCIBusId(__pyx_v_pciBusId, __pyx_v_length, __pyx_v_cdev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15056, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":15057
 *     cdef char* pciBusId = pypciBusId
 *     err = ccuda.cuDeviceGetPCIBusId(pciBusId, length, cdev)
 *     return (CUresult(err), pypciBusId)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 15057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_pypciBusId);
  __Pyx_GIVEREF(__pyx_v_pypciBusId);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_pypciBusId);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15015
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetPCIBusId(int length, dev):             # <<<<<<<<<<<<<<
 *     """ Returns a PCI Bus Id string for the device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XDECREF(__pyx_v_pypciBusId);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15060
 * 
 * @cython.embedsignature(True)
 * def cuIpcGetEventHandle(event):             # <<<<<<<<<<<<<<
 *     """ Gets an interprocess handle for a previously allocated event.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_153cuIpcGetEventHandle(PyObject *__pyx_self, PyObject *__pyx_v_event); /*proto*/
static char __pyx_doc_4cuda_4cuda_152cuIpcGetEventHandle[] = "cuIpcGetEventHandle(event)\n Gets an interprocess handle for a previously allocated event.\n\n    Takes as input a previously allocated event. This event must have been\n    created with the :py:obj:`~.CU_EVENT_INTERPROCESS` and\n    :py:obj:`~.CU_EVENT_DISABLE_TIMING` flags set. This opaque handle may\n    be copied into other processes and opened with\n    :py:obj:`~.cuIpcOpenEventHandle` to allow efficient hardware\n    synchronization between GPU work in different processes.\n\n    After the event has been opened in the importing process,\n    :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventSynchronize`,\n    :py:obj:`~.cuStreamWaitEvent` and :py:obj:`~.cuEventQuery` may be used\n    in either process. Performing operations on the imported event after\n    the exported event has been freed with :py:obj:`~.cuEventDestroy` will\n    result in undefined behavior.\n\n    IPC functionality is restricted to devices with support for unified\n    addressing on Linux and Windows operating systems. IPC functionality on\n    Windows is restricted to GPUs in TCC mode\n\n    Parameters\n    ----------\n    event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Event allocated with :py:obj:`~.CU_EVENT_INTERPROCESS` and\n        :py:obj:`~.CU_EVENT_DISABLE_TIMING` flags.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_MAP_FAILED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pHandle : :py:obj:`~.CUipcEventHandle`\n        Pointer to a user allocated CUipcEventHandle in which to return the\n        opaque event handle\n\n    See Also\n    --------\n    :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuIpcOpenEventHandle`, :py:obj:`~.cuIpcGetMemHandle`, :py:obj:`~.cuIpcOpenMemHandle`, :py:obj:`~.cuIpcCloseMemHandle`, :py:obj:`~.cudaIpcGetEventHa""ndle`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_153cuIpcGetEventHandle = {"cuIpcGetEventHandle", (PyCFunction)__pyx_pw_4cuda_4cuda_153cuIpcGetEventHandle, METH_O, __pyx_doc_4cuda_4cuda_152cuIpcGetEventHandle};
static PyObject *__pyx_pw_4cuda_4cuda_153cuIpcGetEventHandle(PyObject *__pyx_self, PyObject *__pyx_v_event) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuIpcGetEventHandle (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_152cuIpcGetEventHandle(__pyx_self, ((PyObject *)__pyx_v_event));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_152cuIpcGetEventHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event) {
  CUevent __pyx_v_cevent;
  PyObject *__pyx_v_pevent = NULL;
  struct __pyx_obj_4cuda_4cuda_CUipcEventHandle *__pyx_v_pHandle = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__686)
  __Pyx_RefNannySetupContext("cuIpcGetEventHandle", 0);
  __Pyx_TraceCall("cuIpcGetEventHandle", __pyx_f[0], 15060, 0, __PYX_ERR(0, 15060, __pyx_L1_error));

  /* "cuda/cuda.pyx":15100
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_event == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15101
 *     cdef ccuda.CUevent cevent
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 */
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15100
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15102
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_event, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15103
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pevent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15104
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 *     else:
 *         pevent = int(CUevent(event))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15104, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15102
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15106
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 *         pevent = int(CUevent(event))             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pevent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15107
 *     else:
 *         pevent = int(CUevent(event))
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 * 
 *     cdef CUipcEventHandle pHandle = CUipcEventHandle()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15107, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15109
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 * 
 *     cdef CUipcEventHandle pHandle = CUipcEventHandle()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuIpcGetEventHandle(pHandle._ptr, cevent)
 *     return (CUresult(err), pHandle)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUipcEventHandle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pHandle = ((struct __pyx_obj_4cuda_4cuda_CUipcEventHandle *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":15110
 * 
 *     cdef CUipcEventHandle pHandle = CUipcEventHandle()
 *     err = ccuda.cuIpcGetEventHandle(pHandle._ptr, cevent)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pHandle)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuIpcGetEventHandle(__pyx_v_pHandle->__pyx_base._ptr, __pyx_v_cevent); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15110, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15111
 *     cdef CUipcEventHandle pHandle = CUipcEventHandle()
 *     err = ccuda.cuIpcGetEventHandle(pHandle._ptr, cevent)
 *     return (CUresult(err), pHandle)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pHandle));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pHandle));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pHandle));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15060
 * 
 * @cython.embedsignature(True)
 * def cuIpcGetEventHandle(event):             # <<<<<<<<<<<<<<
 *     """ Gets an interprocess handle for a previously allocated event.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuIpcGetEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pevent);
  __Pyx_XDECREF((PyObject *)__pyx_v_pHandle);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15114
 * 
 * @cython.embedsignature(True)
 * def cuIpcOpenEventHandle(handle not None : CUipcEventHandle):             # <<<<<<<<<<<<<<
 *     """ Opens an interprocess event handle for use in the current process.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_155cuIpcOpenEventHandle(PyObject *__pyx_self, PyObject *__pyx_v_handle); /*proto*/
static char __pyx_doc_4cuda_4cuda_154cuIpcOpenEventHandle[] = "cuIpcOpenEventHandle(CUipcEventHandle handle: CUipcEventHandle)\n Opens an interprocess event handle for use in the current process.\n\n    Opens an interprocess event handle exported from another process with\n    :py:obj:`~.cuIpcGetEventHandle`. This function returns a\n    :py:obj:`~.CUevent` that behaves like a locally created event with the\n    :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag specified. This event must be\n    freed with :py:obj:`~.cuEventDestroy`.\n\n    Performing operations on the imported event after the exported event\n    has been freed with :py:obj:`~.cuEventDestroy` will result in undefined\n    behavior.\n\n    IPC functionality is restricted to devices with support for unified\n    addressing on Linux and Windows operating systems. IPC functionality on\n    Windows is restricted to GPUs in TCC mode\n\n    Parameters\n    ----------\n    handle : :py:obj:`~.CUipcEventHandle`\n        Interprocess handle to open\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_MAP_FAILED`, :py:obj:`~.CUDA_ERROR_PEER_ACCESS_UNSUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phEvent : :py:obj:`~.CUevent`\n        Returns the imported event\n\n    See Also\n    --------\n    :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuIpcGetEventHandle`, :py:obj:`~.cuIpcGetMemHandle`, :py:obj:`~.cuIpcOpenMemHandle`, :py:obj:`~.cuIpcCloseMemHandle`, :py:obj:`~.cudaIpcOpenEventHandle`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_155cuIpcOpenEventHandle = {"cuIpcOpenEventHandle", (PyCFunction)__pyx_pw_4cuda_4cuda_155cuIpcOpenEventHandle, METH_O, __pyx_doc_4cuda_4cuda_154cuIpcOpenEventHandle};
static PyObject *__pyx_pw_4cuda_4cuda_155cuIpcOpenEventHandle(PyObject *__pyx_self, PyObject *__pyx_v_handle) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuIpcOpenEventHandle (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handle), __pyx_ptype_4cuda_4cuda_CUipcEventHandle, 0, "handle", 0))) __PYX_ERR(0, 15114, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_154cuIpcOpenEventHandle(__pyx_self, ((struct __pyx_obj_4cuda_4cuda_CUipcEventHandle *)__pyx_v_handle));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_154cuIpcOpenEventHandle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUipcEventHandle *__pyx_v_handle) {
  struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_phEvent = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__687)
  __Pyx_RefNannySetupContext("cuIpcOpenEventHandle", 0);
  __Pyx_TraceCall("cuIpcOpenEventHandle", __pyx_f[0], 15114, 0, __PYX_ERR(0, 15114, __pyx_L1_error));

  /* "cuda/cuda.pyx":15147
 *     :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuIpcGetEventHandle`, :py:obj:`~.cuIpcGetMemHandle`, :py:obj:`~.cuIpcOpenMemHandle`, :py:obj:`~.cuIpcCloseMemHandle`, :py:obj:`~.cudaIpcOpenEventHandle`
 *     """
 *     cdef CUevent phEvent = CUevent()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuIpcOpenEventHandle(phEvent._ptr, handle._ptr[0])
 *     return (CUresult(err), phEvent)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_phEvent = ((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15148
 *     """
 *     cdef CUevent phEvent = CUevent()
 *     err = ccuda.cuIpcOpenEventHandle(phEvent._ptr, handle._ptr[0])             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phEvent)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuIpcOpenEventHandle(__pyx_v_phEvent->_ptr, (__pyx_v_handle->__pyx_base._ptr[0])); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15148, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":15149
 *     cdef CUevent phEvent = CUevent()
 *     err = ccuda.cuIpcOpenEventHandle(phEvent._ptr, handle._ptr[0])
 *     return (CUresult(err), phEvent)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_phEvent));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phEvent));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phEvent));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15114
 * 
 * @cython.embedsignature(True)
 * def cuIpcOpenEventHandle(handle not None : CUipcEventHandle):             # <<<<<<<<<<<<<<
 *     """ Opens an interprocess event handle for use in the current process.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuIpcOpenEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_phEvent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15152
 * 
 * @cython.embedsignature(True)
 * def cuIpcGetMemHandle(dptr):             # <<<<<<<<<<<<<<
 *     """ Gets an interprocess memory handle for an existing device memory allocation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_157cuIpcGetMemHandle(PyObject *__pyx_self, PyObject *__pyx_v_dptr); /*proto*/
static char __pyx_doc_4cuda_4cuda_156cuIpcGetMemHandle[] = "cuIpcGetMemHandle(dptr)\n Gets an interprocess memory handle for an existing device memory allocation.\n\n    Takes a pointer to the base of an existing device memory allocation\n    created with :py:obj:`~.cuMemAlloc` and exports it for use in another\n    process. This is a lightweight operation and may be called multiple\n    times on an allocation without adverse effects.\n\n    If a region of memory is freed with :py:obj:`~.cuMemFree` and a\n    subsequent call to :py:obj:`~.cuMemAlloc` returns memory with the same\n    device address, :py:obj:`~.cuIpcGetMemHandle` will return a unique\n    handle for the new memory.\n\n    IPC functionality is restricted to devices with support for unified\n    addressing on Linux and Windows operating systems. IPC functionality on\n    Windows is restricted to GPUs in TCC mode\n\n    Parameters\n    ----------\n    dptr : :py:obj:`~.CUdeviceptr`\n        Base pointer to previously allocated device memory\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_MAP_FAILED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pHandle : :py:obj:`~.CUipcMemHandle`\n        Pointer to user allocated :py:obj:`~.CUipcMemHandle` to return the\n        handle in.\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuIpcGetEventHandle`, :py:obj:`~.cuIpcOpenEventHandle`, :py:obj:`~.cuIpcOpenMemHandle`, :py:obj:`~.cuIpcCloseMemHandle`, :py:obj:`~.cudaIpcGetMemHandle`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_157cuIpcGetMemHandle = {"cuIpcGetMemHandle", (PyCFunction)__pyx_pw_4cuda_4cuda_157cuIpcGetMemHandle, METH_O, __pyx_doc_4cuda_4cuda_156cuIpcGetMemHandle};
static PyObject *__pyx_pw_4cuda_4cuda_157cuIpcGetMemHandle(PyObject *__pyx_self, PyObject *__pyx_v_dptr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuIpcGetMemHandle (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_156cuIpcGetMemHandle(__pyx_self, ((PyObject *)__pyx_v_dptr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_156cuIpcGetMemHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dptr) {
  CUdeviceptr __pyx_v_cdptr;
  PyObject *__pyx_v_pdptr = NULL;
  struct __pyx_obj_4cuda_4cuda_CUipcMemHandle *__pyx_v_pHandle = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__688)
  __Pyx_RefNannySetupContext("cuIpcGetMemHandle", 0);
  __Pyx_TraceCall("cuIpcGetMemHandle", __pyx_f[0], 15152, 0, __PYX_ERR(0, 15152, __pyx_L1_error));

  /* "cuda/cuda.pyx":15187
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15188
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 */
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15187
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15189
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15190
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15191
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15191, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15189
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15193
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15194
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 * 
 *     cdef CUipcMemHandle pHandle = CUipcMemHandle()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15194, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15196
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 *     cdef CUipcMemHandle pHandle = CUipcMemHandle()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuIpcGetMemHandle(pHandle._ptr, cdptr)
 *     return (CUresult(err), pHandle)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUipcMemHandle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pHandle = ((struct __pyx_obj_4cuda_4cuda_CUipcMemHandle *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":15197
 * 
 *     cdef CUipcMemHandle pHandle = CUipcMemHandle()
 *     err = ccuda.cuIpcGetMemHandle(pHandle._ptr, cdptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pHandle)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuIpcGetMemHandle(__pyx_v_pHandle->__pyx_base._ptr, __pyx_v_cdptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15197, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15198
 *     cdef CUipcMemHandle pHandle = CUipcMemHandle()
 *     err = ccuda.cuIpcGetMemHandle(pHandle._ptr, cdptr)
 *     return (CUresult(err), pHandle)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pHandle));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pHandle));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pHandle));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15152
 * 
 * @cython.embedsignature(True)
 * def cuIpcGetMemHandle(dptr):             # <<<<<<<<<<<<<<
 *     """ Gets an interprocess memory handle for an existing device memory allocation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuIpcGetMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdptr);
  __Pyx_XDECREF((PyObject *)__pyx_v_pHandle);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15201
 * 
 * @cython.embedsignature(True)
 * def cuIpcOpenMemHandle(handle not None : CUipcMemHandle, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_159cuIpcOpenMemHandle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_158cuIpcOpenMemHandle[] = "cuIpcOpenMemHandle(CUipcMemHandle handle: CUipcMemHandle, unsigned int Flags)\n Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process.\n\n    Maps memory exported from another process with\n    :py:obj:`~.cuIpcGetMemHandle` into the current device address space.\n    For contexts on different devices :py:obj:`~.cuIpcOpenMemHandle` can\n    attempt to enable peer access between the devices as if the user called\n    :py:obj:`~.cuCtxEnablePeerAccess`. This behavior is controlled by the\n    :py:obj:`~.CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS` flag.\n    :py:obj:`~.cuDeviceCanAccessPeer` can determine if a mapping is\n    possible.\n\n    Contexts that may open :py:obj:`~.CUipcMemHandles` are restricted in\n    the following way. :py:obj:`~.CUipcMemHandles` from each\n    :py:obj:`~.CUdevice` in a given process may only be opened by one\n    :py:obj:`~.CUcontext` per :py:obj:`~.CUdevice` per other process.\n\n    If the memory handle has already been opened by the current context,\n    the reference count on the handle is incremented by 1 and the existing\n    device pointer is returned.\n\n    Memory returned from :py:obj:`~.cuIpcOpenMemHandle` must be freed with\n    :py:obj:`~.cuIpcCloseMemHandle`.\n\n    Calling :py:obj:`~.cuMemFree` on an exported memory region before\n    calling :py:obj:`~.cuIpcCloseMemHandle` in the importing context will\n    result in undefined behavior.\n\n    IPC functionality is restricted to devices with support for unified\n    addressing on Linux and Windows operating systems. IPC functionality on\n    Windows is restricted to GPUs in TCC mode\n\n    Parameters\n    ----------\n    handle : :py:obj:`~.CUipcMemHandle`\n        :py:obj:`~.CUipcMemHandle` to open\n    Flags : unsigned int\n        Flags for this operation. Must be specified as\n        :py:obj:`~.CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS`\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py"":obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_MAP_FAILED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_TOO_MANY_PEERS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pdptr : :py:obj:`~.CUdeviceptr`\n        Returned device pointer\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuIpcGetEventHandle`, :py:obj:`~.cuIpcOpenEventHandle`, :py:obj:`~.cuIpcGetMemHandle`, :py:obj:`~.cuIpcCloseMemHandle`, :py:obj:`~.cuCtxEnablePeerAccess`, :py:obj:`~.cuDeviceCanAccessPeer`, :py:obj:`~.cudaIpcOpenMemHandle`\n\n    Notes\n    -----\n    No guarantees are made about the address returned in `*pdptr`. In particular, multiple processes may not receive the same address for the same `handle`.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_159cuIpcOpenMemHandle = {"cuIpcOpenMemHandle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_159cuIpcOpenMemHandle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_158cuIpcOpenMemHandle};
static PyObject *__pyx_pw_4cuda_4cuda_159cuIpcOpenMemHandle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_4cuda_4cuda_CUipcMemHandle *__pyx_v_handle = 0;
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuIpcOpenMemHandle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handle_2,&__pyx_n_s_Flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuIpcOpenMemHandle", 1, 2, 2, 1); __PYX_ERR(0, 15201, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuIpcOpenMemHandle") < 0)) __PYX_ERR(0, 15201, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_handle = ((struct __pyx_obj_4cuda_4cuda_CUipcMemHandle *)values[0]);
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 15201, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuIpcOpenMemHandle", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15201, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuIpcOpenMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handle), __pyx_ptype_4cuda_4cuda_CUipcMemHandle, 0, "handle", 0))) __PYX_ERR(0, 15201, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_158cuIpcOpenMemHandle(__pyx_self, __pyx_v_handle, __pyx_v_Flags);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_158cuIpcOpenMemHandle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUipcMemHandle *__pyx_v_handle, unsigned int __pyx_v_Flags) {
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_pdptr = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__689)
  __Pyx_RefNannySetupContext("cuIpcOpenMemHandle", 0);
  __Pyx_TraceCall("cuIpcOpenMemHandle", __pyx_f[0], 15201, 0, __PYX_ERR(0, 15201, __pyx_L1_error));

  /* "cuda/cuda.pyx":15256
 *     No guarantees are made about the address returned in `*pdptr`. In particular, multiple processes may not receive the same address for the same `handle`.
 *     """
 *     cdef CUdeviceptr pdptr = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuIpcOpenMemHandle(pdptr._ptr, handle._ptr[0], Flags)
 *     return (CUresult(err), pdptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pdptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15257
 *     """
 *     cdef CUdeviceptr pdptr = CUdeviceptr()
 *     err = ccuda.cuIpcOpenMemHandle(pdptr._ptr, handle._ptr[0], Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pdptr)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuIpcOpenMemHandle(__pyx_v_pdptr->_ptr, (__pyx_v_handle->__pyx_base._ptr[0]), __pyx_v_Flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15257, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":15258
 *     cdef CUdeviceptr pdptr = CUdeviceptr()
 *     err = ccuda.cuIpcOpenMemHandle(pdptr._ptr, handle._ptr[0], Flags)
 *     return (CUresult(err), pdptr)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pdptr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pdptr));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pdptr));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15201
 * 
 * @cython.embedsignature(True)
 * def cuIpcOpenMemHandle(handle not None : CUipcMemHandle, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuIpcOpenMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pdptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15261
 * 
 * @cython.embedsignature(True)
 * def cuIpcCloseMemHandle(dptr):             # <<<<<<<<<<<<<<
 *     """ Attempts to close memory mapped with :py:obj:`~.cuIpcOpenMemHandle`.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_161cuIpcCloseMemHandle(PyObject *__pyx_self, PyObject *__pyx_v_dptr); /*proto*/
static char __pyx_doc_4cuda_4cuda_160cuIpcCloseMemHandle[] = "cuIpcCloseMemHandle(dptr)\n Attempts to close memory mapped with :py:obj:`~.cuIpcOpenMemHandle`.\n\n    Decrements the reference count of the memory returned by\n    :py:obj:`~.cuIpcOpenMemHandle` by 1. When the reference count reaches\n    0, this API unmaps the memory. The original allocation in the exporting\n    process as well as imported mappings in other processes will be\n    unaffected.\n\n    Any resources used to enable peer access will be freed if this is the\n    last mapping using them.\n\n    IPC functionality is restricted to devices with support for unified\n    addressing on Linux and Windows operating systems. IPC functionality on\n    Windows is restricted to GPUs in TCC mode\n\n    Parameters\n    ----------\n    dptr : :py:obj:`~.CUdeviceptr`\n        Device pointer returned by :py:obj:`~.cuIpcOpenMemHandle`\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_MAP_FAILED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuIpcGetEventHandle`, :py:obj:`~.cuIpcOpenEventHandle`, :py:obj:`~.cuIpcGetMemHandle`, :py:obj:`~.cuIpcOpenMemHandle`, :py:obj:`~.cudaIpcCloseMemHandle`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_161cuIpcCloseMemHandle = {"cuIpcCloseMemHandle", (PyCFunction)__pyx_pw_4cuda_4cuda_161cuIpcCloseMemHandle, METH_O, __pyx_doc_4cuda_4cuda_160cuIpcCloseMemHandle};
static PyObject *__pyx_pw_4cuda_4cuda_161cuIpcCloseMemHandle(PyObject *__pyx_self, PyObject *__pyx_v_dptr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuIpcCloseMemHandle (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_160cuIpcCloseMemHandle(__pyx_self, ((PyObject *)__pyx_v_dptr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_160cuIpcCloseMemHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dptr) {
  CUdeviceptr __pyx_v_cdptr;
  PyObject *__pyx_v_pdptr = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__690)
  __Pyx_RefNannySetupContext("cuIpcCloseMemHandle", 0);
  __Pyx_TraceCall("cuIpcCloseMemHandle", __pyx_f[0], 15261, 0, __PYX_ERR(0, 15261, __pyx_L1_error));

  /* "cuda/cuda.pyx":15292
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15293
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 */
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15292
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15294
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15295
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15296
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15296, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15294
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15298
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15299
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuIpcCloseMemHandle(cdptr)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15299, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15301
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 *     err = ccuda.cuIpcCloseMemHandle(cdptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuIpcCloseMemHandle(__pyx_v_cdptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15301, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15302
 * 
 *     err = ccuda.cuIpcCloseMemHandle(cdptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15261
 * 
 * @cython.embedsignature(True)
 * def cuIpcCloseMemHandle(dptr):             # <<<<<<<<<<<<<<
 *     """ Attempts to close memory mapped with :py:obj:`~.cuIpcOpenMemHandle`.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuIpcCloseMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15305
 * 
 * @cython.embedsignature(True)
 * def cuMemHostRegister(p, size_t bytesize, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Registers an existing host memory range for use by CUDA.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_163cuMemHostRegister(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_162cuMemHostRegister[] = "cuMemHostRegister(p, size_t bytesize, unsigned int Flags)\n Registers an existing host memory range for use by CUDA.\n\n    Page-locks the memory range specified by `p` and `bytesize` and maps it\n    for the device(s) as specified by `Flags`. This memory range also is\n    added to the same tracking mechanism as :py:obj:`~.cuMemHostAlloc` to\n    automatically accelerate calls to functions such as\n    :py:obj:`~.cuMemcpyHtoD()`. Since the memory can be accessed directly\n    by the device, it can be read or written with much higher bandwidth\n    than pageable memory that has not been registered. Page-locking\n    excessive amounts of memory may degrade system performance, since it\n    reduces the amount of memory available to the system for paging. As a\n    result, this function is best used sparingly to register staging areas\n    for data exchange between host and device.\n\n    The `Flags` parameter enables different options to be specified that\n    affect the allocation, as follows.\n\n    - :py:obj:`~.CU_MEMHOSTREGISTER_PORTABLE`: The memory returned by this\n      call will be considered as pinned memory by all CUDA contexts, not\n      just the one that performed the allocation.\n\n    - :py:obj:`~.CU_MEMHOSTREGISTER_DEVICEMAP`: Maps the allocation into\n      the CUDA address space. The device pointer to the memory may be\n      obtained by calling :py:obj:`~.cuMemHostGetDevicePointer()`.\n\n    - :py:obj:`~.CU_MEMHOSTREGISTER_IOMEMORY`: The pointer is treated as\n      pointing to some I/O memory space, e.g. the PCI Express resource of a\n      3rd party device.\n\n    - :py:obj:`~.CU_MEMHOSTREGISTER_READ_ONLY`: The pointer is treated as\n      pointing to memory that is considered read-only by the device. On\n      platforms without\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`,\n      this flag is required in order to register memory mapped to the CPU\n      as read-only. Support for the use of this flag can be ""queried from\n      the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED`.\n      Using this flag with a current context associated with a device that\n      does not have this attribute set will cause\n      :py:obj:`~.cuMemHostRegister` to error with CUDA_ERROR_NOT_SUPPORTED.\n\n    All of these flags are orthogonal to one another: a developer may page-\n    lock memory that is portable or mapped with no restrictions.\n\n    The :py:obj:`~.CU_MEMHOSTREGISTER_DEVICEMAP` flag may be specified on\n    CUDA contexts for devices that do not support mapped pinned memory. The\n    failure is deferred to :py:obj:`~.cuMemHostGetDevicePointer()` because\n    the memory may be mapped into other CUDA contexts via the\n    :py:obj:`~.CU_MEMHOSTREGISTER_PORTABLE` flag.\n\n    For devices that have a non-zero value for the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM`,\n    the memory can also be accessed from the device using the host pointer\n    `p`. The device pointer returned by\n    :py:obj:`~.cuMemHostGetDevicePointer()` may or may not match the\n    original host pointer `ptr` and depends on the devices visible to the\n    application. If all devices visible to the application have a non-zero\n    value for the device attribute, the device pointer returned by\n    :py:obj:`~.cuMemHostGetDevicePointer()` will match the original pointer\n    `ptr`. If any device visible to the application has a zero value for\n    the device attribute, the device pointer returned by\n    :py:obj:`~.cuMemHostGetDevicePointer()` will not match the original\n    host pointer `ptr`, but it will be suitable for use on all devices\n    provided Unified Virtual Addressing is enabled. In such systems, it is\n    valid to access the memory using either pointer on devices that have a\n    non-zero value for the device attribute. Note however that such devices\n    should access the memory using only of the two po""inters and not both.\n\n    The memory page-locked by this function must be unregistered with\n    :py:obj:`~.cuMemHostUnregister()`.\n\n    Parameters\n    ----------\n    p : Any\n        Host pointer to memory to page-lock\n    bytesize : size_t\n        Size in bytes of the address range to page-lock\n    Flags : unsigned int\n        Flags for allocation request\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemHostUnregister`, :py:obj:`~.cuMemHostGetFlags`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cudaHostRegister`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_163cuMemHostRegister = {"cuMemHostRegister", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_163cuMemHostRegister, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_162cuMemHostRegister};
static PyObject *__pyx_pw_4cuda_4cuda_163cuMemHostRegister(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_p = 0;
  size_t __pyx_v_bytesize;
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemHostRegister (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_bytesize_2,&__pyx_n_s_Flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bytesize_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemHostRegister", 1, 3, 3, 1); __PYX_ERR(0, 15305, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemHostRegister", 1, 3, 3, 2); __PYX_ERR(0, 15305, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemHostRegister") < 0)) __PYX_ERR(0, 15305, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_p = values[0];
    __pyx_v_bytesize = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_bytesize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15305, __pyx_L3_error)
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 15305, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemHostRegister", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15305, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemHostRegister", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_162cuMemHostRegister(__pyx_self, __pyx_v_p, __pyx_v_bytesize, __pyx_v_Flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_162cuMemHostRegister(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags) {
  PyObject *__pyx_v_cp = NULL;
  void *__pyx_v_cp_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__691)
  __Pyx_RefNannySetupContext("cuMemHostRegister", 0);
  __Pyx_TraceCall("cuMemHostRegister", __pyx_f[0], 15305, 0, __PYX_ERR(0, 15305, __pyx_L1_error));

  /* "cuda/cuda.pyx":15395
 *     :py:obj:`~.cuMemHostUnregister`, :py:obj:`~.cuMemHostGetFlags`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cudaHostRegister`
 *     """
 *     cp = utils.HelperInputVoidPtr(p)             # <<<<<<<<<<<<<<
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemHostRegister(cp_ptr, bytesize, Flags)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15396
 *     """
 *     cp = utils.HelperInputVoidPtr(p)
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemHostRegister(cp_ptr, bytesize, Flags)
 *     return (CUresult(err),)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cp, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cp_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":15397
 *     cp = utils.HelperInputVoidPtr(p)
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemHostRegister(cp_ptr, bytesize, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuMemHostRegister(__pyx_v_cp_ptr, __pyx_v_bytesize, __pyx_v_Flags); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15397, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":15398
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemHostRegister(cp_ptr, bytesize, Flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15305
 * 
 * @cython.embedsignature(True)
 * def cuMemHostRegister(p, size_t bytesize, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Registers an existing host memory range for use by CUDA.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuMemHostRegister", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15401
 * 
 * @cython.embedsignature(True)
 * def cuMemHostUnregister(p):             # <<<<<<<<<<<<<<
 *     """ Unregisters a memory range that was registered with cuMemHostRegister.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_165cuMemHostUnregister(PyObject *__pyx_self, PyObject *__pyx_v_p); /*proto*/
static char __pyx_doc_4cuda_4cuda_164cuMemHostUnregister[] = "cuMemHostUnregister(p)\n Unregisters a memory range that was registered with cuMemHostRegister.\n\n    Unmaps the memory range whose base address is specified by `p`, and\n    makes it pageable again.\n\n    The base address must be the same one specified to\n    :py:obj:`~.cuMemHostRegister()`.\n\n    Parameters\n    ----------\n    p : Any\n        Host pointer to memory to unregister\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED`,\n\n    See Also\n    --------\n    :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cudaHostUnregister`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_165cuMemHostUnregister = {"cuMemHostUnregister", (PyCFunction)__pyx_pw_4cuda_4cuda_165cuMemHostUnregister, METH_O, __pyx_doc_4cuda_4cuda_164cuMemHostUnregister};
static PyObject *__pyx_pw_4cuda_4cuda_165cuMemHostUnregister(PyObject *__pyx_self, PyObject *__pyx_v_p) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemHostUnregister (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_164cuMemHostUnregister(__pyx_self, ((PyObject *)__pyx_v_p));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_164cuMemHostUnregister(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p) {
  PyObject *__pyx_v_cp = NULL;
  void *__pyx_v_cp_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__692)
  __Pyx_RefNannySetupContext("cuMemHostUnregister", 0);
  __Pyx_TraceCall("cuMemHostUnregister", __pyx_f[0], 15401, 0, __PYX_ERR(0, 15401, __pyx_L1_error));

  /* "cuda/cuda.pyx":15424
 *     :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cudaHostUnregister`
 *     """
 *     cp = utils.HelperInputVoidPtr(p)             # <<<<<<<<<<<<<<
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemHostUnregister(cp_ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15425
 *     """
 *     cp = utils.HelperInputVoidPtr(p)
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemHostUnregister(cp_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cp, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cp_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":15426
 *     cp = utils.HelperInputVoidPtr(p)
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemHostUnregister(cp_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuMemHostUnregister(__pyx_v_cp_ptr); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15426, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":15427
 *     cdef void* cp_ptr = <void*><void_ptr>cp.cptr
 *     err = ccuda.cuMemHostUnregister(cp_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15401
 * 
 * @cython.embedsignature(True)
 * def cuMemHostUnregister(p):             # <<<<<<<<<<<<<<
 *     """ Unregisters a memory range that was registered with cuMemHostRegister.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuMemHostUnregister", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15430
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy(dst, src, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_167cuMemcpy(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_166cuMemcpy[] = "cuMemcpy(dst, src, size_t ByteCount)\n Copies memory.\n\n    Copies data between two pointers. `dst` and `src` are base pointers of\n    the destination and source, respectively. `ByteCount` specifies the\n    number of bytes to copy. Note that this function infers the type of the\n    transfer (host to host, host to device, device to device, or device to\n    host) from the pointer values. This function is only allowed in\n    contexts which support unified addressing.\n\n    Parameters\n    ----------\n    dst : :py:obj:`~.CUdeviceptr`\n        Destination unified virtual address space pointer\n    src : :py:obj:`~.CUdeviceptr`\n        Source unified virtual address space pointer\n    ByteCount : size_t\n        Size of memory copy in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemse""tD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_167cuMemcpy = {"cuMemcpy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_167cuMemcpy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_166cuMemcpy};
static PyObject *__pyx_pw_4cuda_4cuda_167cuMemcpy(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dst = 0;
  PyObject *__pyx_v_src = 0;
  size_t __pyx_v_ByteCount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpy (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dst_2,&__pyx_n_s_src,&__pyx_n_s_ByteCount,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dst_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_src)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpy", 1, 3, 3, 1); __PYX_ERR(0, 15430, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpy", 1, 3, 3, 2); __PYX_ERR(0, 15430, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpy") < 0)) __PYX_ERR(0, 15430, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_dst = values[0];
    __pyx_v_src = values[1];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15430, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpy", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15430, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_166cuMemcpy(__pyx_self, __pyx_v_dst, __pyx_v_src, __pyx_v_ByteCount);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_166cuMemcpy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src, size_t __pyx_v_ByteCount) {
  CUdeviceptr __pyx_v_csrc;
  PyObject *__pyx_v_psrc = NULL;
  CUdeviceptr __pyx_v_cdst;
  PyObject *__pyx_v_pdst = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__693)
  __Pyx_RefNannySetupContext("cuMemcpy", 0);
  __Pyx_TraceCall("cuMemcpy", __pyx_f[0], 15430, 0, __PYX_ERR(0, 15430, __pyx_L1_error));

  /* "cuda/cuda.pyx":15459
 *     """
 *     cdef ccuda.CUdeviceptr csrc
 *     if src is None:             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(src, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_src == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15460
 *     cdef ccuda.CUdeviceptr csrc
 *     if src is None:
 *         csrc = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(src, (CUdeviceptr)):
 *         psrc = int(src)
 */
    __pyx_v_csrc = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15459
 *     """
 *     cdef ccuda.CUdeviceptr csrc
 *     if src is None:             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(src, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15461
 *     if src is None:
 *         csrc = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(src, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrc = int(src)
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_src, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15462
 *         csrc = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(src, (CUdeviceptr)):
 *         psrc = int(src)             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_src); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15463
 *     elif isinstance(src, (CUdeviceptr)):
 *         psrc = int(src)
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc             # <<<<<<<<<<<<<<
 *     else:
 *         psrc = int(CUdeviceptr(src))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15463, __pyx_L1_error)
    __pyx_v_csrc = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15461
 *     if src is None:
 *         csrc = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(src, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrc = int(src)
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15465
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc
 *     else:
 *         psrc = int(CUdeviceptr(src))             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_src); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15466
 *     else:
 *         psrc = int(CUdeviceptr(src))
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdst
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15466, __pyx_L1_error)
    __pyx_v_csrc = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15469
 * 
 *     cdef ccuda.CUdeviceptr cdst
 *     if dst is None:             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dst, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dst == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15470
 *     cdef ccuda.CUdeviceptr cdst
 *     if dst is None:
 *         cdst = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dst, (CUdeviceptr)):
 *         pdst = int(dst)
 */
    __pyx_v_cdst = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15469
 * 
 *     cdef ccuda.CUdeviceptr cdst
 *     if dst is None:             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dst, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":15471
 *     if dst is None:
 *         cdst = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dst, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdst = int(dst)
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dst, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15472
 *         cdst = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dst, (CUdeviceptr)):
 *         pdst = int(dst)             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdst = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15473
 *     elif isinstance(dst, (CUdeviceptr)):
 *         pdst = int(dst)
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst             # <<<<<<<<<<<<<<
 *     else:
 *         pdst = int(CUdeviceptr(dst))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdst); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15473, __pyx_L1_error)
    __pyx_v_cdst = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15471
 *     if dst is None:
 *         cdst = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dst, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdst = int(dst)
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":15475
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 *     else:
 *         pdst = int(CUdeviceptr(dst))             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdst = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15476
 *     else:
 *         pdst = int(CUdeviceptr(dst))
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemcpy(cdst, csrc, ByteCount)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdst); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15476, __pyx_L1_error)
    __pyx_v_cdst = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":15478
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 * 
 *     err = ccuda.cuMemcpy(cdst, csrc, ByteCount)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpy(__pyx_v_cdst, __pyx_v_csrc, __pyx_v_ByteCount); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15478, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15479
 * 
 *     err = ccuda.cuMemcpy(cdst, csrc, ByteCount)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15430
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy(dst, src, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrc);
  __Pyx_XDECREF(__pyx_v_pdst);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15482
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies device memory between two contexts.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_169cuMemcpyPeer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_168cuMemcpyPeer[] = "cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount)\n Copies device memory between two contexts.\n\n    Copies from device memory in one context to device memory in another\n    context. `dstDevice` is the base device pointer of the destination\n    memory and `dstContext` is the destination context. `srcDevice` is the\n    base device pointer of the source memory and `srcContext` is the source\n    pointer. `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    dstContext : :py:obj:`~.CUcontext`\n        Destination context\n    srcDevice : :py:obj:`~.CUdeviceptr`\n        Source device pointer\n    srcContext : :py:obj:`~.CUcontext`\n        Source context\n    ByteCount : size_t\n        Size of memory copy in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpy3DPeer`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyPeerAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cudaMemcpyPeer`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_169cuMemcpyPeer = {"cuMemcpyPeer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_169cuMemcpyPeer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_168cuMemcpyPeer};
static PyObject *__pyx_pw_4cuda_4cuda_169cuMemcpyPeer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  PyObject *__pyx_v_dstContext = 0;
  PyObject *__pyx_v_srcDevice = 0;
  PyObject *__pyx_v_srcContext = 0;
  size_t __pyx_v_ByteCount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyPeer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_dstContext_2,&__pyx_n_s_srcDevice_2,&__pyx_n_s_srcContext_2,&__pyx_n_s_ByteCount,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstContext_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyPeer", 1, 5, 5, 1); __PYX_ERR(0, 15482, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcDevice_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyPeer", 1, 5, 5, 2); __PYX_ERR(0, 15482, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcContext_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyPeer", 1, 5, 5, 3); __PYX_ERR(0, 15482, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyPeer", 1, 5, 5, 4); __PYX_ERR(0, 15482, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyPeer") < 0)) __PYX_ERR(0, 15482, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_dstContext = values[1];
    __pyx_v_srcDevice = values[2];
    __pyx_v_srcContext = values[3];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[4]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15482, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyPeer", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15482, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_168cuMemcpyPeer(__pyx_self, __pyx_v_dstDevice, __pyx_v_dstContext, __pyx_v_srcDevice, __pyx_v_srcContext, __pyx_v_ByteCount);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_168cuMemcpyPeer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_dstContext, PyObject *__pyx_v_srcDevice, PyObject *__pyx_v_srcContext, size_t __pyx_v_ByteCount) {
  CUcontext __pyx_v_csrcContext;
  PyObject *__pyx_v_psrcContext = NULL;
  CUdeviceptr __pyx_v_csrcDevice;
  PyObject *__pyx_v_psrcDevice = NULL;
  CUcontext __pyx_v_cdstContext;
  PyObject *__pyx_v_pdstContext = NULL;
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__694)
  __Pyx_RefNannySetupContext("cuMemcpyPeer", 0);
  __Pyx_TraceCall("cuMemcpyPeer", __pyx_f[0], 15482, 0, __PYX_ERR(0, 15482, __pyx_L1_error));

  /* "cuda/cuda.pyx":15514
 *     """
 *     cdef ccuda.CUcontext csrcContext
 *     if srcContext is None:             # <<<<<<<<<<<<<<
 *         csrcContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(srcContext, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_srcContext == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15515
 *     cdef ccuda.CUcontext csrcContext
 *     if srcContext is None:
 *         csrcContext = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcContext, (CUcontext)):
 *         psrcContext = int(srcContext)
 */
    __pyx_v_csrcContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15514
 *     """
 *     cdef ccuda.CUcontext csrcContext
 *     if srcContext is None:             # <<<<<<<<<<<<<<
 *         csrcContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(srcContext, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15516
 *     if srcContext is None:
 *         csrcContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(srcContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *         psrcContext = int(srcContext)
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcContext, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15517
 *         csrcContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(srcContext, (CUcontext)):
 *         psrcContext = int(srcContext)             # <<<<<<<<<<<<<<
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcContext = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15518
 *     elif isinstance(srcContext, (CUcontext)):
 *         psrcContext = int(srcContext)
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext             # <<<<<<<<<<<<<<
 *     else:
 *         psrcContext = int(CUcontext(srcContext))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15518, __pyx_L1_error)
    __pyx_v_csrcContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15516
 *     if srcContext is None:
 *         csrcContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(srcContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *         psrcContext = int(srcContext)
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15520
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 *     else:
 *         psrcContext = int(CUcontext(srcContext))             # <<<<<<<<<<<<<<
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_srcContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcContext = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15521
 *     else:
 *         psrcContext = int(CUcontext(srcContext))
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr csrcDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15521, __pyx_L1_error)
    __pyx_v_csrcContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15524
 * 
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_srcDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15525
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 */
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15524
 * 
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":15526
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15527
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_srcDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_psrcDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15528
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15528, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15526
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":15530
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_srcDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_psrcDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15531
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUcontext cdstContext
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15531, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":15534
 * 
 *     cdef ccuda.CUcontext cdstContext
 *     if dstContext is None:             # <<<<<<<<<<<<<<
 *         cdstContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(dstContext, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_dstContext == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15535
 *     cdef ccuda.CUcontext cdstContext
 *     if dstContext is None:
 *         cdstContext = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstContext, (CUcontext)):
 *         pdstContext = int(dstContext)
 */
    __pyx_v_cdstContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15534
 * 
 *     cdef ccuda.CUcontext cdstContext
 *     if dstContext is None:             # <<<<<<<<<<<<<<
 *         cdstContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(dstContext, (CUcontext)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":15536
 *     if dstContext is None:
 *         cdstContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(dstContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pdstContext = int(dstContext)
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstContext, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15537
 *         cdstContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(dstContext, (CUcontext)):
 *         pdstContext = int(dstContext)             # <<<<<<<<<<<<<<
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstContext = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15538
 *     elif isinstance(dstContext, (CUcontext)):
 *         pdstContext = int(dstContext)
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext             # <<<<<<<<<<<<<<
 *     else:
 *         pdstContext = int(CUcontext(dstContext))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15538, __pyx_L1_error)
    __pyx_v_cdstContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15536
 *     if dstContext is None:
 *         cdstContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(dstContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pdstContext = int(dstContext)
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":15540
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 *     else:
 *         pdstContext = int(CUcontext(dstContext))             # <<<<<<<<<<<<<<
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_dstContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstContext = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15541
 *     else:
 *         pdstContext = int(CUcontext(dstContext))
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15541, __pyx_L1_error)
    __pyx_v_cdstContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":15544
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15545
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15544
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L6;
  }

  /* "cuda/cuda.pyx":15546
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15547
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15548
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15548, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15546
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L6;
  }

  /* "cuda/cuda.pyx":15550
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15551
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemcpyPeer(cdstDevice, cdstContext, csrcDevice, csrcContext, ByteCount)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15551, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L6:;

  /* "cuda/cuda.pyx":15553
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemcpyPeer(cdstDevice, cdstContext, csrcDevice, csrcContext, ByteCount)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyPeer(__pyx_v_cdstDevice, __pyx_v_cdstContext, __pyx_v_csrcDevice, __pyx_v_csrcContext, __pyx_v_ByteCount); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15553, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15554
 * 
 *     err = ccuda.cuMemcpyPeer(cdstDevice, cdstContext, csrcDevice, csrcContext, ByteCount)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15482
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies device memory between two contexts.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcContext);
  __Pyx_XDECREF(__pyx_v_psrcDevice);
  __Pyx_XDECREF(__pyx_v_pdstContext);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15557
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoD(dstDevice, srcHost, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_171cuMemcpyHtoD(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_170cuMemcpyHtoD[] = "cuMemcpyHtoD(dstDevice, srcHost, size_t ByteCount)\n Copies memory from Host to Device.\n\n    Copies from host memory to device memory. `dstDevice` and `srcHost` are\n    the base addresses of the destination and source, respectively.\n    `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    srcHost : Any\n        Source host pointer\n    ByteCount : size_t\n        Size of memory copy in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyToSymbol`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_171cuMemcpyHtoD = {"cuMemcpyHtoD", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_171cuMemcpyHtoD, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_170cuMemcpyHtoD};
static PyObject *__pyx_pw_4cuda_4cuda_171cuMemcpyHtoD(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  PyObject *__pyx_v_srcHost = 0;
  size_t __pyx_v_ByteCount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyHtoD (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_srcHost_2,&__pyx_n_s_ByteCount,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcHost_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoD", 1, 3, 3, 1); __PYX_ERR(0, 15557, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoD", 1, 3, 3, 2); __PYX_ERR(0, 15557, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyHtoD") < 0)) __PYX_ERR(0, 15557, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_srcHost = values[1];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15557, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoD", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15557, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyHtoD", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_170cuMemcpyHtoD(__pyx_self, __pyx_v_dstDevice, __pyx_v_srcHost, __pyx_v_ByteCount);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_170cuMemcpyHtoD(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_srcHost, size_t __pyx_v_ByteCount) {
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  PyObject *__pyx_v_csrcHost = NULL;
  void *__pyx_v_csrcHost_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__695)
  __Pyx_RefNannySetupContext("cuMemcpyHtoD", 0);
  __Pyx_TraceCall("cuMemcpyHtoD", __pyx_f[0], 15557, 0, __PYX_ERR(0, 15557, __pyx_L1_error));

  /* "cuda/cuda.pyx":15583
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15584
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15583
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15585
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15586
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15587
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15587, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15585
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15589
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15590
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15590, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15592
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)             # <<<<<<<<<<<<<<
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr
 *     err = ccuda.cuMemcpyHtoD(cdstDevice, csrcHost_ptr, ByteCount)
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_srcHost); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_csrcHost = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":15593
 * 
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpyHtoD(cdstDevice, csrcHost_ptr, ByteCount)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_csrcHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_csrcHost_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":15594
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr
 *     err = ccuda.cuMemcpyHtoD(cdstDevice, csrcHost_ptr, ByteCount)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyHtoD(__pyx_v_cdstDevice, __pyx_v_csrcHost_ptr, __pyx_v_ByteCount); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15594, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15595
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr
 *     err = ccuda.cuMemcpyHtoD(cdstDevice, csrcHost_ptr, ByteCount)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15557
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoD(dstDevice, srcHost, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyHtoD", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XDECREF(__pyx_v_csrcHost);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15598
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoH(dstHost, srcDevice, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Host.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_173cuMemcpyDtoH(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_172cuMemcpyDtoH[] = "cuMemcpyDtoH(dstHost, srcDevice, size_t ByteCount)\n Copies memory from Device to Host.\n\n    Copies from device to host memory. `dstHost` and `srcDevice` specify\n    the base pointers of the destination and source, respectively.\n    `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstHost : Any\n        Destination host pointer\n    srcDevice : :py:obj:`~.CUdeviceptr`\n        Source device pointer\n    ByteCount : size_t\n        Size of memory copy in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyFromSymbol`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_173cuMemcpyDtoH = {"cuMemcpyDtoH", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_173cuMemcpyDtoH, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_172cuMemcpyDtoH};
static PyObject *__pyx_pw_4cuda_4cuda_173cuMemcpyDtoH(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstHost = 0;
  PyObject *__pyx_v_srcDevice = 0;
  size_t __pyx_v_ByteCount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyDtoH (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstHost_2,&__pyx_n_s_srcDevice_2,&__pyx_n_s_ByteCount,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstHost_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcDevice_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoH", 1, 3, 3, 1); __PYX_ERR(0, 15598, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoH", 1, 3, 3, 2); __PYX_ERR(0, 15598, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyDtoH") < 0)) __PYX_ERR(0, 15598, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_dstHost = values[0];
    __pyx_v_srcDevice = values[1];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15598, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoH", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15598, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyDtoH", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_172cuMemcpyDtoH(__pyx_self, __pyx_v_dstHost, __pyx_v_srcDevice, __pyx_v_ByteCount);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_172cuMemcpyDtoH(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstHost, PyObject *__pyx_v_srcDevice, size_t __pyx_v_ByteCount) {
  CUdeviceptr __pyx_v_csrcDevice;
  PyObject *__pyx_v_psrcDevice = NULL;
  PyObject *__pyx_v_cdstHost = NULL;
  void *__pyx_v_cdstHost_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__696)
  __Pyx_RefNannySetupContext("cuMemcpyDtoH", 0);
  __Pyx_TraceCall("cuMemcpyDtoH", __pyx_f[0], 15598, 0, __PYX_ERR(0, 15598, __pyx_L1_error));

  /* "cuda/cuda.pyx":15624
 *     """
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_srcDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15625
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 */
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15624
 *     """
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15626
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15627
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15628
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15628, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15626
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15630
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15631
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 * 
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15631, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15633
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 * 
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)             # <<<<<<<<<<<<<<
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr
 *     err = ccuda.cuMemcpyDtoH(cdstHost_ptr, csrcDevice, ByteCount)
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_dstHost); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_cdstHost = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":15634
 * 
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpyDtoH(cdstHost_ptr, csrcDevice, ByteCount)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdstHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cdstHost_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":15635
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr
 *     err = ccuda.cuMemcpyDtoH(cdstHost_ptr, csrcDevice, ByteCount)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyDtoH(__pyx_v_cdstHost_ptr, __pyx_v_csrcDevice, __pyx_v_ByteCount); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15635, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15636
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr
 *     err = ccuda.cuMemcpyDtoH(cdstHost_ptr, csrcDevice, ByteCount)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15598
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoH(dstHost, srcDevice, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Host.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyDtoH", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcDevice);
  __Pyx_XDECREF(__pyx_v_cdstHost);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15639
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoD(dstDevice, srcDevice, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_175cuMemcpyDtoD(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_174cuMemcpyDtoD[] = "cuMemcpyDtoD(dstDevice, srcDevice, size_t ByteCount)\n Copies memory from Device to Device.\n\n    Copies from device memory to device memory. `dstDevice` and `srcDevice`\n    are the base pointers of the destination and source, respectively.\n    `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    srcDevice : :py:obj:`~.CUdeviceptr`\n        Source device pointer\n    ByteCount : size_t\n        Size of memory copy in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_175cuMemcpyDtoD = {"cuMemcpyDtoD", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_175cuMemcpyDtoD, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_174cuMemcpyDtoD};
static PyObject *__pyx_pw_4cuda_4cuda_175cuMemcpyDtoD(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  PyObject *__pyx_v_srcDevice = 0;
  size_t __pyx_v_ByteCount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyDtoD (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_srcDevice_2,&__pyx_n_s_ByteCount,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcDevice_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoD", 1, 3, 3, 1); __PYX_ERR(0, 15639, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoD", 1, 3, 3, 2); __PYX_ERR(0, 15639, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyDtoD") < 0)) __PYX_ERR(0, 15639, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_srcDevice = values[1];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15639, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoD", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15639, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyDtoD", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_174cuMemcpyDtoD(__pyx_self, __pyx_v_dstDevice, __pyx_v_srcDevice, __pyx_v_ByteCount);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_174cuMemcpyDtoD(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_srcDevice, size_t __pyx_v_ByteCount) {
  CUdeviceptr __pyx_v_csrcDevice;
  PyObject *__pyx_v_psrcDevice = NULL;
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__697)
  __Pyx_RefNannySetupContext("cuMemcpyDtoD", 0);
  __Pyx_TraceCall("cuMemcpyDtoD", __pyx_f[0], 15639, 0, __PYX_ERR(0, 15639, __pyx_L1_error));

  /* "cuda/cuda.pyx":15665
 *     """
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_srcDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15666
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 */
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15665
 *     """
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15667
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15668
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15669
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15669, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15667
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15671
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15672
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15672, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15675
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15676
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15675
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":15677
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15678
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15679
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15679, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15677
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":15681
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15682
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemcpyDtoD(cdstDevice, csrcDevice, ByteCount)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15682, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":15684
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemcpyDtoD(cdstDevice, csrcDevice, ByteCount)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyDtoD(__pyx_v_cdstDevice, __pyx_v_csrcDevice, __pyx_v_ByteCount); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15684, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15685
 * 
 *     err = ccuda.cuMemcpyDtoD(cdstDevice, csrcDevice, ByteCount)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15639
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoD(dstDevice, srcDevice, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyDtoD", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcDevice);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15688
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoA(dstArray, size_t dstOffset, srcDevice, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_177cuMemcpyDtoA(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_176cuMemcpyDtoA[] = "cuMemcpyDtoA(dstArray, size_t dstOffset, srcDevice, size_t ByteCount)\n Copies memory from Device to Array.\n\n    Copies from device memory to a 1D CUDA array. `dstArray` and\n    `dstOffset` specify the CUDA array handle and starting index of the\n    destination data. `srcDevice` specifies the base pointer of the source.\n    `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstArray : :py:obj:`~.CUarray`\n        Destination array\n    dstOffset : size_t\n        Offset in bytes of destination array\n    srcDevice : :py:obj:`~.CUdeviceptr`\n        Source device pointer\n    ByteCount : size_t\n        Size of memory copy in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:""`~.cudaMemcpyToArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_177cuMemcpyDtoA = {"cuMemcpyDtoA", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_177cuMemcpyDtoA, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_176cuMemcpyDtoA};
static PyObject *__pyx_pw_4cuda_4cuda_177cuMemcpyDtoA(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstArray = 0;
  size_t __pyx_v_dstOffset;
  PyObject *__pyx_v_srcDevice = 0;
  size_t __pyx_v_ByteCount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyDtoA (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstArray_2,&__pyx_n_s_dstOffset,&__pyx_n_s_srcDevice_2,&__pyx_n_s_ByteCount,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstArray_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstOffset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoA", 1, 4, 4, 1); __PYX_ERR(0, 15688, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcDevice_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoA", 1, 4, 4, 2); __PYX_ERR(0, 15688, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoA", 1, 4, 4, 3); __PYX_ERR(0, 15688, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyDtoA") < 0)) __PYX_ERR(0, 15688, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dstArray = values[0];
    __pyx_v_dstOffset = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_dstOffset == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15688, __pyx_L3_error)
    __pyx_v_srcDevice = values[2];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15688, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoA", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15688, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyDtoA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_176cuMemcpyDtoA(__pyx_self, __pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcDevice, __pyx_v_ByteCount);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_176cuMemcpyDtoA(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstArray, size_t __pyx_v_dstOffset, PyObject *__pyx_v_srcDevice, size_t __pyx_v_ByteCount) {
  CUdeviceptr __pyx_v_csrcDevice;
  PyObject *__pyx_v_psrcDevice = NULL;
  CUarray __pyx_v_cdstArray;
  PyObject *__pyx_v_pdstArray = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__698)
  __Pyx_RefNannySetupContext("cuMemcpyDtoA", 0);
  __Pyx_TraceCall("cuMemcpyDtoA", __pyx_f[0], 15688, 0, __PYX_ERR(0, 15688, __pyx_L1_error));

  /* "cuda/cuda.pyx":15717
 *     """
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_srcDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15718
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 */
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15717
 *     """
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15719
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15720
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15721
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15721, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15719
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15723
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15724
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUarray cdstArray
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15724, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15727
 * 
 *     cdef ccuda.CUarray cdstArray
 *     if dstArray is None:             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_dstArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15728
 *     cdef ccuda.CUarray cdstArray
 *     if dstArray is None:
 *         cdstArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstArray, (CUarray)):
 *         pdstArray = int(dstArray)
 */
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15727
 * 
 *     cdef ccuda.CUarray cdstArray
 *     if dstArray is None:             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":15729
 *     if dstArray is None:
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         pdstArray = int(dstArray)
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15730
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):
 *         pdstArray = int(dstArray)             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15730, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15731
 *     elif isinstance(dstArray, (CUarray)):
 *         pdstArray = int(dstArray)
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 *     else:
 *         pdstArray = int(CUarray(dstArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15731, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15729
 *     if dstArray is None:
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         pdstArray = int(dstArray)
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":15733
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *     else:
 *         pdstArray = int(CUarray(dstArray))             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_dstArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15734
 *     else:
 *         pdstArray = int(CUarray(dstArray))
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemcpyDtoA(cdstArray, dstOffset, csrcDevice, ByteCount)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15734, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":15736
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 * 
 *     err = ccuda.cuMemcpyDtoA(cdstArray, dstOffset, csrcDevice, ByteCount)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyDtoA(__pyx_v_cdstArray, __pyx_v_dstOffset, __pyx_v_csrcDevice, __pyx_v_ByteCount); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15736, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15737
 * 
 *     err = ccuda.cuMemcpyDtoA(cdstArray, dstOffset, csrcDevice, ByteCount)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15688
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoA(dstArray, size_t dstOffset, srcDevice, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyDtoA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcDevice);
  __Pyx_XDECREF(__pyx_v_pdstArray);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15740
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoD(dstDevice, srcArray, size_t srcOffset, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_179cuMemcpyAtoD(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_178cuMemcpyAtoD[] = "cuMemcpyAtoD(dstDevice, srcArray, size_t srcOffset, size_t ByteCount)\n Copies memory from Array to Device.\n\n    Copies from one 1D CUDA array to device memory. `dstDevice` specifies\n    the base pointer of the destination and must be naturally aligned with\n    the CUDA array elements. `srcArray` and `srcOffset` specify the CUDA\n    array handle and the offset in bytes into the array where the copy is\n    to begin. `ByteCount` specifies the number of bytes to copy and must be\n    evenly divisible by the array element size.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    srcArray : :py:obj:`~.CUarray`\n        Source array\n    srcOffset : size_t\n        Offset in bytes of source array\n    ByteCount : size_t\n        Size of memory copy in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cu""MemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpyFromArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_179cuMemcpyAtoD = {"cuMemcpyAtoD", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_179cuMemcpyAtoD, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_178cuMemcpyAtoD};
static PyObject *__pyx_pw_4cuda_4cuda_179cuMemcpyAtoD(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  PyObject *__pyx_v_srcArray = 0;
  size_t __pyx_v_srcOffset;
  size_t __pyx_v_ByteCount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyAtoD (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_srcArray_2,&__pyx_n_s_srcOffset,&__pyx_n_s_ByteCount,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcArray_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoD", 1, 4, 4, 1); __PYX_ERR(0, 15740, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcOffset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoD", 1, 4, 4, 2); __PYX_ERR(0, 15740, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoD", 1, 4, 4, 3); __PYX_ERR(0, 15740, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyAtoD") < 0)) __PYX_ERR(0, 15740, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_srcArray = values[1];
    __pyx_v_srcOffset = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_srcOffset == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15740, __pyx_L3_error)
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15740, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoD", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15740, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyAtoD", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_178cuMemcpyAtoD(__pyx_self, __pyx_v_dstDevice, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_178cuMemcpyAtoD(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) {
  CUarray __pyx_v_csrcArray;
  PyObject *__pyx_v_psrcArray = NULL;
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__699)
  __Pyx_RefNannySetupContext("cuMemcpyAtoD", 0);
  __Pyx_TraceCall("cuMemcpyAtoD", __pyx_f[0], 15740, 0, __PYX_ERR(0, 15740, __pyx_L1_error));

  /* "cuda/cuda.pyx":15771
 *     """
 *     cdef ccuda.CUarray csrcArray
 *     if srcArray is None:             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_srcArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15772
 *     cdef ccuda.CUarray csrcArray
 *     if srcArray is None:
 *         csrcArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcArray, (CUarray)):
 *         psrcArray = int(srcArray)
 */
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15771
 *     """
 *     cdef ccuda.CUarray csrcArray
 *     if srcArray is None:             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15773
 *     if srcArray is None:
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         psrcArray = int(srcArray)
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15774
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):
 *         psrcArray = int(srcArray)             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15775
 *     elif isinstance(srcArray, (CUarray)):
 *         psrcArray = int(srcArray)
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 *     else:
 *         psrcArray = int(CUarray(srcArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15775, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15773
 *     if srcArray is None:
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         psrcArray = int(srcArray)
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15777
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *     else:
 *         psrcArray = int(CUarray(srcArray))             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_srcArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15778
 *     else:
 *         psrcArray = int(CUarray(srcArray))
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15778, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15781
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15782
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15781
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":15783
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15784
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15785
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15785, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15783
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":15787
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15788
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemcpyAtoD(cdstDevice, csrcArray, srcOffset, ByteCount)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15788, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":15790
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemcpyAtoD(cdstDevice, csrcArray, srcOffset, ByteCount)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyAtoD(__pyx_v_cdstDevice, __pyx_v_csrcArray, __pyx_v_srcOffset, __pyx_v_ByteCount); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15790, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15791
 * 
 *     err = ccuda.cuMemcpyAtoD(cdstDevice, csrcArray, srcOffset, ByteCount)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15740
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoD(dstDevice, srcArray, size_t srcOffset, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyAtoD", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcArray);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15794
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoA(dstArray, size_t dstOffset, srcHost, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_181cuMemcpyHtoA(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_180cuMemcpyHtoA[] = "cuMemcpyHtoA(dstArray, size_t dstOffset, srcHost, size_t ByteCount)\n Copies memory from Host to Array.\n\n    Copies from host memory to a 1D CUDA array. `dstArray` and `dstOffset`\n    specify the CUDA array handle and starting offset in bytes of the\n    destination data. `pSrc` specifies the base address of the source.\n    `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstArray : :py:obj:`~.CUarray`\n        Destination array\n    dstOffset : size_t\n        Offset in bytes of destination array\n    srcHost : Any\n        Source host pointer\n    ByteCount : size_t\n        Size of memory copy in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpyToArray`""\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_181cuMemcpyHtoA = {"cuMemcpyHtoA", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_181cuMemcpyHtoA, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_180cuMemcpyHtoA};
static PyObject *__pyx_pw_4cuda_4cuda_181cuMemcpyHtoA(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstArray = 0;
  size_t __pyx_v_dstOffset;
  PyObject *__pyx_v_srcHost = 0;
  size_t __pyx_v_ByteCount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyHtoA (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstArray_2,&__pyx_n_s_dstOffset,&__pyx_n_s_srcHost_2,&__pyx_n_s_ByteCount,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstArray_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstOffset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoA", 1, 4, 4, 1); __PYX_ERR(0, 15794, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcHost_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoA", 1, 4, 4, 2); __PYX_ERR(0, 15794, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoA", 1, 4, 4, 3); __PYX_ERR(0, 15794, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyHtoA") < 0)) __PYX_ERR(0, 15794, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dstArray = values[0];
    __pyx_v_dstOffset = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_dstOffset == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15794, __pyx_L3_error)
    __pyx_v_srcHost = values[2];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15794, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoA", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15794, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyHtoA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_180cuMemcpyHtoA(__pyx_self, __pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcHost, __pyx_v_ByteCount);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_180cuMemcpyHtoA(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstArray, size_t __pyx_v_dstOffset, PyObject *__pyx_v_srcHost, size_t __pyx_v_ByteCount) {
  CUarray __pyx_v_cdstArray;
  PyObject *__pyx_v_pdstArray = NULL;
  PyObject *__pyx_v_csrcHost = NULL;
  void *__pyx_v_csrcHost_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__700)
  __Pyx_RefNannySetupContext("cuMemcpyHtoA", 0);
  __Pyx_TraceCall("cuMemcpyHtoA", __pyx_f[0], 15794, 0, __PYX_ERR(0, 15794, __pyx_L1_error));

  /* "cuda/cuda.pyx":15823
 *     """
 *     cdef ccuda.CUarray cdstArray
 *     if dstArray is None:             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_dstArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15824
 *     cdef ccuda.CUarray cdstArray
 *     if dstArray is None:
 *         cdstArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstArray, (CUarray)):
 *         pdstArray = int(dstArray)
 */
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15823
 *     """
 *     cdef ccuda.CUarray cdstArray
 *     if dstArray is None:             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15825
 *     if dstArray is None:
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         pdstArray = int(dstArray)
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15826
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):
 *         pdstArray = int(dstArray)             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15827
 *     elif isinstance(dstArray, (CUarray)):
 *         pdstArray = int(dstArray)
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 *     else:
 *         pdstArray = int(CUarray(dstArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15827, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15825
 *     if dstArray is None:
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         pdstArray = int(dstArray)
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15829
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *     else:
 *         pdstArray = int(CUarray(dstArray))             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_dstArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15830
 *     else:
 *         pdstArray = int(CUarray(dstArray))
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 * 
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15830, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15832
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 * 
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)             # <<<<<<<<<<<<<<
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr
 *     err = ccuda.cuMemcpyHtoA(cdstArray, dstOffset, csrcHost_ptr, ByteCount)
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_srcHost); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_csrcHost = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":15833
 * 
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpyHtoA(cdstArray, dstOffset, csrcHost_ptr, ByteCount)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_csrcHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15833, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_csrcHost_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":15834
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr
 *     err = ccuda.cuMemcpyHtoA(cdstArray, dstOffset, csrcHost_ptr, ByteCount)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyHtoA(__pyx_v_cdstArray, __pyx_v_dstOffset, __pyx_v_csrcHost_ptr, __pyx_v_ByteCount); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15834, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15835
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr
 *     err = ccuda.cuMemcpyHtoA(cdstArray, dstOffset, csrcHost_ptr, ByteCount)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15794
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoA(dstArray, size_t dstOffset, srcHost, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyHtoA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstArray);
  __Pyx_XDECREF(__pyx_v_csrcHost);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15838
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoH(dstHost, srcArray, size_t srcOffset, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Host.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_183cuMemcpyAtoH(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_182cuMemcpyAtoH[] = "cuMemcpyAtoH(dstHost, srcArray, size_t srcOffset, size_t ByteCount)\n Copies memory from Array to Host.\n\n    Copies from one 1D CUDA array to host memory. `dstHost` specifies the\n    base pointer of the destination. `srcArray` and `srcOffset` specify the\n    CUDA array handle and starting offset in bytes of the source data.\n    `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstHost : Any\n        Destination device pointer\n    srcArray : :py:obj:`~.CUarray`\n        Source array\n    srcOffset : size_t\n        Offset in bytes of source array\n    ByteCount : size_t\n        Size of memory copy in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpyFromArray`""\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_183cuMemcpyAtoH = {"cuMemcpyAtoH", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_183cuMemcpyAtoH, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_182cuMemcpyAtoH};
static PyObject *__pyx_pw_4cuda_4cuda_183cuMemcpyAtoH(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstHost = 0;
  PyObject *__pyx_v_srcArray = 0;
  size_t __pyx_v_srcOffset;
  size_t __pyx_v_ByteCount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyAtoH (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstHost_2,&__pyx_n_s_srcArray_2,&__pyx_n_s_srcOffset,&__pyx_n_s_ByteCount,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstHost_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcArray_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoH", 1, 4, 4, 1); __PYX_ERR(0, 15838, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcOffset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoH", 1, 4, 4, 2); __PYX_ERR(0, 15838, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoH", 1, 4, 4, 3); __PYX_ERR(0, 15838, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyAtoH") < 0)) __PYX_ERR(0, 15838, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dstHost = values[0];
    __pyx_v_srcArray = values[1];
    __pyx_v_srcOffset = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_srcOffset == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15838, __pyx_L3_error)
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15838, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoH", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15838, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyAtoH", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_182cuMemcpyAtoH(__pyx_self, __pyx_v_dstHost, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_182cuMemcpyAtoH(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstHost, PyObject *__pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) {
  CUarray __pyx_v_csrcArray;
  PyObject *__pyx_v_psrcArray = NULL;
  PyObject *__pyx_v_cdstHost = NULL;
  void *__pyx_v_cdstHost_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__701)
  __Pyx_RefNannySetupContext("cuMemcpyAtoH", 0);
  __Pyx_TraceCall("cuMemcpyAtoH", __pyx_f[0], 15838, 0, __PYX_ERR(0, 15838, __pyx_L1_error));

  /* "cuda/cuda.pyx":15867
 *     """
 *     cdef ccuda.CUarray csrcArray
 *     if srcArray is None:             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_srcArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15868
 *     cdef ccuda.CUarray csrcArray
 *     if srcArray is None:
 *         csrcArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcArray, (CUarray)):
 *         psrcArray = int(srcArray)
 */
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15867
 *     """
 *     cdef ccuda.CUarray csrcArray
 *     if srcArray is None:             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15869
 *     if srcArray is None:
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         psrcArray = int(srcArray)
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15870
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):
 *         psrcArray = int(srcArray)             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15871
 *     elif isinstance(srcArray, (CUarray)):
 *         psrcArray = int(srcArray)
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 *     else:
 *         psrcArray = int(CUarray(srcArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15871, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15869
 *     if srcArray is None:
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         psrcArray = int(srcArray)
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15873
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *     else:
 *         psrcArray = int(CUarray(srcArray))             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_srcArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15874
 *     else:
 *         psrcArray = int(CUarray(srcArray))
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 * 
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15874, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15876
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 * 
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)             # <<<<<<<<<<<<<<
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr
 *     err = ccuda.cuMemcpyAtoH(cdstHost_ptr, csrcArray, srcOffset, ByteCount)
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_dstHost); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_cdstHost = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":15877
 * 
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpyAtoH(cdstHost_ptr, csrcArray, srcOffset, ByteCount)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdstHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15877, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cdstHost_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":15878
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr
 *     err = ccuda.cuMemcpyAtoH(cdstHost_ptr, csrcArray, srcOffset, ByteCount)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyAtoH(__pyx_v_cdstHost_ptr, __pyx_v_csrcArray, __pyx_v_srcOffset, __pyx_v_ByteCount); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15878, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15879
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr
 *     err = ccuda.cuMemcpyAtoH(cdstHost_ptr, csrcArray, srcOffset, ByteCount)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15838
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoH(dstHost, srcArray, size_t srcOffset, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Host.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyAtoH", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcArray);
  __Pyx_XDECREF(__pyx_v_cdstHost);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15882
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoA(dstArray, size_t dstOffset, srcArray, size_t srcOffset, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_185cuMemcpyAtoA(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_184cuMemcpyAtoA[] = "cuMemcpyAtoA(dstArray, size_t dstOffset, srcArray, size_t srcOffset, size_t ByteCount)\n Copies memory from Array to Array.\n\n    Copies from one 1D CUDA array to another. `dstArray` and `srcArray`\n    specify the handles of the destination and source CUDA arrays for the\n    copy, respectively. `dstOffset` and `srcOffset` specify the destination\n    and source offsets in bytes into the CUDA arrays. `ByteCount` is the\n    number of bytes to be copied. The size of the elements in the CUDA\n    arrays need not be the same format, but the elements must be the same\n    size; and count must be evenly divisible by that size.\n\n    Parameters\n    ----------\n    dstArray : :py:obj:`~.CUarray`\n        Destination array\n    dstOffset : size_t\n        Offset in bytes of destination array\n    srcArray : :py:obj:`~.CUarray`\n        Source array\n    srcOffset : size_t\n        Offset in bytes of source array\n    ByteCount : size_t\n        Size of memory copy in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMe""mFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpyArrayToArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_185cuMemcpyAtoA = {"cuMemcpyAtoA", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_185cuMemcpyAtoA, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_184cuMemcpyAtoA};
static PyObject *__pyx_pw_4cuda_4cuda_185cuMemcpyAtoA(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstArray = 0;
  size_t __pyx_v_dstOffset;
  PyObject *__pyx_v_srcArray = 0;
  size_t __pyx_v_srcOffset;
  size_t __pyx_v_ByteCount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyAtoA (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstArray_2,&__pyx_n_s_dstOffset,&__pyx_n_s_srcArray_2,&__pyx_n_s_srcOffset,&__pyx_n_s_ByteCount,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstArray_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstOffset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoA", 1, 5, 5, 1); __PYX_ERR(0, 15882, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcArray_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoA", 1, 5, 5, 2); __PYX_ERR(0, 15882, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcOffset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoA", 1, 5, 5, 3); __PYX_ERR(0, 15882, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoA", 1, 5, 5, 4); __PYX_ERR(0, 15882, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyAtoA") < 0)) __PYX_ERR(0, 15882, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_dstArray = values[0];
    __pyx_v_dstOffset = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_dstOffset == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15882, __pyx_L3_error)
    __pyx_v_srcArray = values[2];
    __pyx_v_srcOffset = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_srcOffset == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15882, __pyx_L3_error)
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[4]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 15882, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoA", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15882, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyAtoA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_184cuMemcpyAtoA(__pyx_self, __pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_184cuMemcpyAtoA(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstArray, size_t __pyx_v_dstOffset, PyObject *__pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) {
  CUarray __pyx_v_csrcArray;
  PyObject *__pyx_v_psrcArray = NULL;
  CUarray __pyx_v_cdstArray;
  PyObject *__pyx_v_pdstArray = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__702)
  __Pyx_RefNannySetupContext("cuMemcpyAtoA", 0);
  __Pyx_TraceCall("cuMemcpyAtoA", __pyx_f[0], 15882, 0, __PYX_ERR(0, 15882, __pyx_L1_error));

  /* "cuda/cuda.pyx":15916
 *     """
 *     cdef ccuda.CUarray csrcArray
 *     if srcArray is None:             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_srcArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15917
 *     cdef ccuda.CUarray csrcArray
 *     if srcArray is None:
 *         csrcArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcArray, (CUarray)):
 *         psrcArray = int(srcArray)
 */
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15916
 *     """
 *     cdef ccuda.CUarray csrcArray
 *     if srcArray is None:             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15918
 *     if srcArray is None:
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         psrcArray = int(srcArray)
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15919
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):
 *         psrcArray = int(srcArray)             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15920
 *     elif isinstance(srcArray, (CUarray)):
 *         psrcArray = int(srcArray)
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 *     else:
 *         psrcArray = int(CUarray(srcArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15920, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15918
 *     if srcArray is None:
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         psrcArray = int(srcArray)
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":15922
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *     else:
 *         psrcArray = int(CUarray(srcArray))             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_srcArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15923
 *     else:
 *         psrcArray = int(CUarray(srcArray))
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUarray cdstArray
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15923, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":15926
 * 
 *     cdef ccuda.CUarray cdstArray
 *     if dstArray is None:             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_dstArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":15927
 *     cdef ccuda.CUarray cdstArray
 *     if dstArray is None:
 *         cdstArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstArray, (CUarray)):
 *         pdstArray = int(dstArray)
 */
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":15926
 * 
 *     cdef ccuda.CUarray cdstArray
 *     if dstArray is None:             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":15928
 *     if dstArray is None:
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         pdstArray = int(dstArray)
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":15929
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):
 *         pdstArray = int(dstArray)             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":15930
 *     elif isinstance(dstArray, (CUarray)):
 *         pdstArray = int(dstArray)
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 *     else:
 *         pdstArray = int(CUarray(dstArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15930, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":15928
 *     if dstArray is None:
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         pdstArray = int(dstArray)
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":15932
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *     else:
 *         pdstArray = int(CUarray(dstArray))             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_dstArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":15933
 *     else:
 *         pdstArray = int(CUarray(dstArray))
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemcpyAtoA(cdstArray, dstOffset, csrcArray, srcOffset, ByteCount)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 15933, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":15935
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 * 
 *     err = ccuda.cuMemcpyAtoA(cdstArray, dstOffset, csrcArray, srcOffset, ByteCount)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyAtoA(__pyx_v_cdstArray, __pyx_v_dstOffset, __pyx_v_csrcArray, __pyx_v_srcOffset, __pyx_v_ByteCount); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 15935, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":15936
 * 
 *     err = ccuda.cuMemcpyAtoA(cdstArray, dstOffset, csrcArray, srcOffset, ByteCount)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15882
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoA(dstArray, size_t dstOffset, srcArray, size_t srcOffset, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyAtoA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrcArray);
  __Pyx_XDECREF(__pyx_v_pdstArray);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":15939
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy2D(pCopy : CUDA_MEMCPY2D):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 2D arrays.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_187cuMemcpy2D(PyObject *__pyx_self, PyObject *__pyx_v_pCopy); /*proto*/
static char __pyx_doc_4cuda_4cuda_186cuMemcpy2D[] = "cuMemcpy2D(CUDA_MEMCPY2D pCopy: CUDA_MEMCPY2D)\n Copies memory for 2D arrays.\n\n    Perform a 2D memory copy according to the parameters specified in\n    `pCopy`. The :py:obj:`~.CUDA_MEMCPY2D` structure is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - :py:obj:`~.srcMemoryType` and :py:obj:`~.dstMemoryType` specify the\n      type of memory of the source and destination, respectively;\n      :py:obj:`~.CUmemorytype_enum` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`,\n    :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (unified\n    virtual address space) base address of the source data and the bytes\n    per row to apply. :py:obj:`~.srcArray` is ignored. This value may be\n    used only if unified addressing is supported in the calling context.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`,\n    :py:obj:`~.srcHost` and :py:obj:`~.srcPitch` specify the (host) base\n    address of the source data and the bytes per row to apply.\n    :py:obj:`~.srcArray` is ignored.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`,\n    :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (device)\n    base address of the source data and the bytes per row to apply.\n    :py:obj:`~.srcArray` is ignored.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`,\n    :py:obj:`~.srcArray` specifies the handle of the source data.\n    :py:obj:`~.srcHost`, :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` are\n    ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`,\n    :py:obj:`~.dstHost` and :py:obj:`~.dstPitch` specify the (host) base\n    address of the destination data and the bytes per row to apply.\n    :py:obj:`~.dstArray` is ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`,\n    :py:obj:""`~.dstDevice` and :py:obj:`~.dstPitch` specify the (unified\n    virtual address space) base address of the source data and the bytes\n    per row to apply. :py:obj:`~.dstArray` is ignored. This value may be\n    used only if unified addressing is supported in the calling context.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`,\n    :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (device)\n    base address of the destination data and the bytes per row to apply.\n    :py:obj:`~.dstArray` is ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`,\n    :py:obj:`~.dstArray` specifies the handle of the destination data.\n    :py:obj:`~.dstHost`, :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` are\n    ignored.\n\n    - :py:obj:`~.srcXInBytes` and :py:obj:`~.srcY` specify the base address\n      of the source data for the copy.\n\n    For host pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For device pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For CUDA arrays, :py:obj:`~.srcXInBytes` must be evenly divisible by\n    the array element size.\n\n    - :py:obj:`~.dstXInBytes` and :py:obj:`~.dstY` specify the base address\n      of the destination data for the copy.\n\n    For host pointers, the base address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For device pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For CUDA arrays, :py:obj:`~.dstXInBytes` must be evenly divisible by\n    the array element size.\n\n    - :py:obj:`~.WidthInBytes` and :py:obj:`~.Height` specify the width (in\n      bytes) and height of the 2D copy being performed.\n\n    - If specified, :py:obj:`~.srcPitch` must be greater than or equal to\n      :py:obj:`~.WidthInBytes` + :py:obj:`~.srcXInBytes`, and\n      :py:obj:`~.dstPitch` must"" be greater than or equal to\n      :py:obj:`~.WidthInBytes` + dstXInBytes.\n\n    :py:obj:`~.cuMemcpy2D()` returns an error if any pitch is greater than\n    the maximum allowed (:py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PITCH`).\n    :py:obj:`~.cuMemAllocPitch()` passes back pitches that always work with\n    :py:obj:`~.cuMemcpy2D()`. On intra-device memory copies (device to\n    device, CUDA array to device, CUDA array to CUDA array),\n    :py:obj:`~.cuMemcpy2D()` may fail for pitches not computed by\n    :py:obj:`~.cuMemAllocPitch()`. :py:obj:`~.cuMemcpy2DUnaligned()` does\n    not have this restriction, but may run significantly slower in the\n    cases where :py:obj:`~.cuMemcpy2D()` would have returned an error code.\n\n    Parameters\n    ----------\n    pCopy : :py:obj:`~.CUDA_MEMCPY2D`\n        Parameters for the memory copy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:""obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_187cuMemcpy2D = {"cuMemcpy2D", (PyCFunction)__pyx_pw_4cuda_4cuda_187cuMemcpy2D, METH_O, __pyx_doc_4cuda_4cuda_186cuMemcpy2D};
static PyObject *__pyx_pw_4cuda_4cuda_187cuMemcpy2D(PyObject *__pyx_self, PyObject *__pyx_v_pCopy) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpy2D (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pCopy), __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D, 1, "pCopy", 0))) __PYX_ERR(0, 15939, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_186cuMemcpy2D(__pyx_self, ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D *)__pyx_v_pCopy));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_186cuMemcpy2D(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D *__pyx_v_pCopy) {
  CUDA_MEMCPY2D *__pyx_v_cpCopy_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  struct CUDA_MEMCPY2D_st *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__703)
  __Pyx_RefNannySetupContext("cuMemcpy2D", 0);
  __Pyx_TraceCall("cuMemcpy2D", __pyx_f[0], 15939, 0, __PYX_ERR(0, 15939, __pyx_L1_error));

  /* "cuda/cuda.pyx":16057
 *     :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`
 *     """
 *     cdef ccuda.CUDA_MEMCPY2D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpy2D(cpCopy_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_pCopy), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16057, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 16057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __pyx_t_1 = __pyx_v_pCopy->__pyx_base._ptr;
  } else {
    __pyx_t_1 = NULL;
  }
  __pyx_v_cpCopy_ptr = __pyx_t_1;

  /* "cuda/cuda.pyx":16058
 *     """
 *     cdef ccuda.CUDA_MEMCPY2D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy2D(cpCopy_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuMemcpy2D(__pyx_v_cpCopy_ptr); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 16058, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":16059
 *     cdef ccuda.CUDA_MEMCPY2D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy2D(cpCopy_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 16059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":15939
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy2D(pCopy : CUDA_MEMCPY2D):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 2D arrays.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpy2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":16062
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy2DUnaligned(pCopy : CUDA_MEMCPY2D):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 2D arrays.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_189cuMemcpy2DUnaligned(PyObject *__pyx_self, PyObject *__pyx_v_pCopy); /*proto*/
static char __pyx_doc_4cuda_4cuda_188cuMemcpy2DUnaligned[] = "cuMemcpy2DUnaligned(CUDA_MEMCPY2D pCopy: CUDA_MEMCPY2D)\n Copies memory for 2D arrays.\n\n    Perform a 2D memory copy according to the parameters specified in\n    `pCopy`. The :py:obj:`~.CUDA_MEMCPY2D` structure is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - :py:obj:`~.srcMemoryType` and :py:obj:`~.dstMemoryType` specify the\n      type of memory of the source and destination, respectively;\n      :py:obj:`~.CUmemorytype_enum` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`,\n    :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (unified\n    virtual address space) base address of the source data and the bytes\n    per row to apply. :py:obj:`~.srcArray` is ignored. This value may be\n    used only if unified addressing is supported in the calling context.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`,\n    :py:obj:`~.srcHost` and :py:obj:`~.srcPitch` specify the (host) base\n    address of the source data and the bytes per row to apply.\n    :py:obj:`~.srcArray` is ignored.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`,\n    :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (device)\n    base address of the source data and the bytes per row to apply.\n    :py:obj:`~.srcArray` is ignored.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`,\n    :py:obj:`~.srcArray` specifies the handle of the source data.\n    :py:obj:`~.srcHost`, :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` are\n    ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`,\n    :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (unified\n    virtual address space) base address of the source data and the bytes\n    per row to apply. :py:obj:`~.dstArray` is ignored. This value may be\n    used only if unified addressin""g is supported in the calling context.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`,\n    :py:obj:`~.dstHost` and :py:obj:`~.dstPitch` specify the (host) base\n    address of the destination data and the bytes per row to apply.\n    :py:obj:`~.dstArray` is ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`,\n    :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (device)\n    base address of the destination data and the bytes per row to apply.\n    :py:obj:`~.dstArray` is ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`,\n    :py:obj:`~.dstArray` specifies the handle of the destination data.\n    :py:obj:`~.dstHost`, :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` are\n    ignored.\n\n    - :py:obj:`~.srcXInBytes` and :py:obj:`~.srcY` specify the base address\n      of the source data for the copy.\n\n    For host pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For device pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For CUDA arrays, :py:obj:`~.srcXInBytes` must be evenly divisible by\n    the array element size.\n\n    - :py:obj:`~.dstXInBytes` and :py:obj:`~.dstY` specify the base address\n      of the destination data for the copy.\n\n    For host pointers, the base address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For device pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For CUDA arrays, :py:obj:`~.dstXInBytes` must be evenly divisible by\n    the array element size.\n\n    - :py:obj:`~.WidthInBytes` and :py:obj:`~.Height` specify the width (in\n      bytes) and height of the 2D copy being performed.\n\n    - If specified, :py:obj:`~.srcPitch` must be greater than or equal to\n      :py:obj:`~.WidthInBytes` + :py:obj:`~.srcXInBytes`, and\n      :py:obj:`~.dstPi""tch` must be greater than or equal to\n      :py:obj:`~.WidthInBytes` + dstXInBytes.\n\n    :py:obj:`~.cuMemcpy2D()` returns an error if any pitch is greater than\n    the maximum allowed (:py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PITCH`).\n    :py:obj:`~.cuMemAllocPitch()` passes back pitches that always work with\n    :py:obj:`~.cuMemcpy2D()`. On intra-device memory copies (device to\n    device, CUDA array to device, CUDA array to CUDA array),\n    :py:obj:`~.cuMemcpy2D()` may fail for pitches not computed by\n    :py:obj:`~.cuMemAllocPitch()`. :py:obj:`~.cuMemcpy2DUnaligned()` does\n    not have this restriction, but may run significantly slower in the\n    cases where :py:obj:`~.cuMemcpy2D()` would have returned an error code.\n\n    Parameters\n    ----------\n    pCopy : :py:obj:`~.CUDA_MEMCPY2D`\n        Parameters for the memory copy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:""obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_189cuMemcpy2DUnaligned = {"cuMemcpy2DUnaligned", (PyCFunction)__pyx_pw_4cuda_4cuda_189cuMemcpy2DUnaligned, METH_O, __pyx_doc_4cuda_4cuda_188cuMemcpy2DUnaligned};
static PyObject *__pyx_pw_4cuda_4cuda_189cuMemcpy2DUnaligned(PyObject *__pyx_self, PyObject *__pyx_v_pCopy) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpy2DUnaligned (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pCopy), __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D, 1, "pCopy", 0))) __PYX_ERR(0, 16062, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_188cuMemcpy2DUnaligned(__pyx_self, ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D *)__pyx_v_pCopy));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_188cuMemcpy2DUnaligned(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D *__pyx_v_pCopy) {
  CUDA_MEMCPY2D *__pyx_v_cpCopy_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  struct CUDA_MEMCPY2D_st *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__704)
  __Pyx_RefNannySetupContext("cuMemcpy2DUnaligned", 0);
  __Pyx_TraceCall("cuMemcpy2DUnaligned", __pyx_f[0], 16062, 0, __PYX_ERR(0, 16062, __pyx_L1_error));

  /* "cuda/cuda.pyx":16180
 *     :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`
 *     """
 *     cdef ccuda.CUDA_MEMCPY2D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpy2DUnaligned(cpCopy_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_pCopy), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16180, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 16180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __pyx_t_1 = __pyx_v_pCopy->__pyx_base._ptr;
  } else {
    __pyx_t_1 = NULL;
  }
  __pyx_v_cpCopy_ptr = __pyx_t_1;

  /* "cuda/cuda.pyx":16181
 *     """
 *     cdef ccuda.CUDA_MEMCPY2D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy2DUnaligned(cpCopy_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuMemcpy2DUnaligned(__pyx_v_cpCopy_ptr); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 16181, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":16182
 *     cdef ccuda.CUDA_MEMCPY2D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy2DUnaligned(cpCopy_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 16182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":16062
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy2DUnaligned(pCopy : CUDA_MEMCPY2D):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 2D arrays.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpy2DUnaligned", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":16185
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3D(pCopy : CUDA_MEMCPY3D):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 3D arrays.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_191cuMemcpy3D(PyObject *__pyx_self, PyObject *__pyx_v_pCopy); /*proto*/
static char __pyx_doc_4cuda_4cuda_190cuMemcpy3D[] = "cuMemcpy3D(CUDA_MEMCPY3D pCopy: CUDA_MEMCPY3D)\n Copies memory for 3D arrays.\n\n    Perform a 3D memory copy according to the parameters specified in\n    `pCopy`. The :py:obj:`~.CUDA_MEMCPY3D` structure is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - :py:obj:`~.srcMemoryType` and :py:obj:`~.dstMemoryType` specify the\n      type of memory of the source and destination, respectively;\n      :py:obj:`~.CUmemorytype_enum` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`,\n    :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (unified\n    virtual address space) base address of the source data and the bytes\n    per row to apply. :py:obj:`~.srcArray` is ignored. This value may be\n    used only if unified addressing is supported in the calling context.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`,\n    :py:obj:`~.srcHost`, :py:obj:`~.srcPitch` and :py:obj:`~.srcHeight`\n    specify the (host) base address of the source data, the bytes per row,\n    and the height of each 2D slice of the 3D array. :py:obj:`~.srcArray`\n    is ignored.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`,\n    :py:obj:`~.srcDevice`, :py:obj:`~.srcPitch` and :py:obj:`~.srcHeight`\n    specify the (device) base address of the source data, the bytes per\n    row, and the height of each 2D slice of the 3D array.\n    :py:obj:`~.srcArray` is ignored.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`,\n    :py:obj:`~.srcArray` specifies the handle of the source data.\n    :py:obj:`~.srcHost`, :py:obj:`~.srcDevice`, :py:obj:`~.srcPitch` and\n    :py:obj:`~.srcHeight` are ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`,\n    :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (unified\n    virtual address space) base addres""s of the source data and the bytes\n    per row to apply. :py:obj:`~.dstArray` is ignored. This value may be\n    used only if unified addressing is supported in the calling context.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`,\n    :py:obj:`~.dstHost` and :py:obj:`~.dstPitch` specify the (host) base\n    address of the destination data, the bytes per row, and the height of\n    each 2D slice of the 3D array. :py:obj:`~.dstArray` is ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`,\n    :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (device)\n    base address of the destination data, the bytes per row, and the height\n    of each 2D slice of the 3D array. :py:obj:`~.dstArray` is ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`,\n    :py:obj:`~.dstArray` specifies the handle of the destination data.\n    :py:obj:`~.dstHost`, :py:obj:`~.dstDevice`, :py:obj:`~.dstPitch` and\n    :py:obj:`~.dstHeight` are ignored.\n\n    - :py:obj:`~.srcXInBytes`, :py:obj:`~.srcY` and :py:obj:`~.srcZ`\n      specify the base address of the source data for the copy.\n\n    For host pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For device pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For CUDA arrays, :py:obj:`~.srcXInBytes` must be evenly divisible by\n    the array element size.\n\n    - dstXInBytes, :py:obj:`~.dstY` and :py:obj:`~.dstZ` specify the base\n      address of the destination data for the copy.\n\n    For host pointers, the base address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For device pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For CUDA arrays, :py:obj:`~.dstXInBytes` must be evenly divisible by\n    the array element size.\n\n    - :py:obj:`~.WidthInBytes`,"" :py:obj:`~.Height` and :py:obj:`~.Depth`\n      specify the width (in bytes), height and depth of the 3D copy being\n      performed.\n\n    - If specified, :py:obj:`~.srcPitch` must be greater than or equal to\n      :py:obj:`~.WidthInBytes` + :py:obj:`~.srcXInBytes`, and\n      :py:obj:`~.dstPitch` must be greater than or equal to\n      :py:obj:`~.WidthInBytes` + dstXInBytes.\n\n    - If specified, :py:obj:`~.srcHeight` must be greater than or equal to\n      :py:obj:`~.Height` + :py:obj:`~.srcY`, and :py:obj:`~.dstHeight` must\n      be greater than or equal to :py:obj:`~.Height` + :py:obj:`~.dstY`.\n\n    :py:obj:`~.cuMemcpy3D()` returns an error if any pitch is greater than\n    the maximum allowed (:py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PITCH`).\n\n    The :py:obj:`~.srcLOD` and :py:obj:`~.dstLOD` members of the\n    :py:obj:`~.CUDA_MEMCPY3D` structure must be set to 0.\n\n    Parameters\n    ----------\n    pCopy : :py:obj:`~.CUDA_MEMCPY3D`\n        Parameters for the memory copy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree""`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy3D`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_191cuMemcpy3D = {"cuMemcpy3D", (PyCFunction)__pyx_pw_4cuda_4cuda_191cuMemcpy3D, METH_O, __pyx_doc_4cuda_4cuda_190cuMemcpy3D};
static PyObject *__pyx_pw_4cuda_4cuda_191cuMemcpy3D(PyObject *__pyx_self, PyObject *__pyx_v_pCopy) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpy3D (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pCopy), __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D, 1, "pCopy", 0))) __PYX_ERR(0, 16185, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_190cuMemcpy3D(__pyx_self, ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *)__pyx_v_pCopy));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_190cuMemcpy3D(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_pCopy) {
  CUDA_MEMCPY3D *__pyx_v_cpCopy_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  struct CUDA_MEMCPY3D_st *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__705)
  __Pyx_RefNannySetupContext("cuMemcpy3D", 0);
  __Pyx_TraceCall("cuMemcpy3D", __pyx_f[0], 16185, 0, __PYX_ERR(0, 16185, __pyx_L1_error));

  /* "cuda/cuda.pyx":16306
 *     :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy3D`
 *     """
 *     cdef ccuda.CUDA_MEMCPY3D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpy3D(cpCopy_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_pCopy), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16306, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 16306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __pyx_t_1 = __pyx_v_pCopy->__pyx_base._ptr;
  } else {
    __pyx_t_1 = NULL;
  }
  __pyx_v_cpCopy_ptr = __pyx_t_1;

  /* "cuda/cuda.pyx":16307
 *     """
 *     cdef ccuda.CUDA_MEMCPY3D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy3D(cpCopy_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuMemcpy3D(__pyx_v_cpCopy_ptr); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 16307, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":16308
 *     cdef ccuda.CUDA_MEMCPY3D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy3D(cpCopy_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 16308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":16185
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3D(pCopy : CUDA_MEMCPY3D):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 3D arrays.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpy3D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":16311
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3DPeer(pCopy : CUDA_MEMCPY3D_PEER):             # <<<<<<<<<<<<<<
 *     """ Copies memory between contexts.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_193cuMemcpy3DPeer(PyObject *__pyx_self, PyObject *__pyx_v_pCopy); /*proto*/
static char __pyx_doc_4cuda_4cuda_192cuMemcpy3DPeer[] = "cuMemcpy3DPeer(CUDA_MEMCPY3D_PEER pCopy: CUDA_MEMCPY3D_PEER)\n Copies memory between contexts.\n\n    Perform a 3D memory copy according to the parameters specified in\n    `pCopy`. See the definition of the :py:obj:`~.CUDA_MEMCPY3D_PEER`\n    structure for documentation of its parameters.\n\n    Parameters\n    ----------\n    pCopy : :py:obj:`~.CUDA_MEMCPY3D_PEER`\n        Parameters for the memory copy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyPeerAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cudaMemcpy3DPeer`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_193cuMemcpy3DPeer = {"cuMemcpy3DPeer", (PyCFunction)__pyx_pw_4cuda_4cuda_193cuMemcpy3DPeer, METH_O, __pyx_doc_4cuda_4cuda_192cuMemcpy3DPeer};
static PyObject *__pyx_pw_4cuda_4cuda_193cuMemcpy3DPeer(PyObject *__pyx_self, PyObject *__pyx_v_pCopy) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpy3DPeer (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pCopy), __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER, 1, "pCopy", 0))) __PYX_ERR(0, 16311, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_192cuMemcpy3DPeer(__pyx_self, ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER *)__pyx_v_pCopy));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_192cuMemcpy3DPeer(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER *__pyx_v_pCopy) {
  CUDA_MEMCPY3D_PEER *__pyx_v_cpCopy_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  struct CUDA_MEMCPY3D_PEER_st *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__706)
  __Pyx_RefNannySetupContext("cuMemcpy3DPeer", 0);
  __Pyx_TraceCall("cuMemcpy3DPeer", __pyx_f[0], 16311, 0, __PYX_ERR(0, 16311, __pyx_L1_error));

  /* "cuda/cuda.pyx":16332
 *     :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyPeerAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cudaMemcpy3DPeer`
 *     """
 *     cdef ccuda.CUDA_MEMCPY3D_PEER* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpy3DPeer(cpCopy_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_pCopy), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16332, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 16332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __pyx_t_1 = __pyx_v_pCopy->__pyx_base._ptr;
  } else {
    __pyx_t_1 = NULL;
  }
  __pyx_v_cpCopy_ptr = __pyx_t_1;

  /* "cuda/cuda.pyx":16333
 *     """
 *     cdef ccuda.CUDA_MEMCPY3D_PEER* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy3DPeer(cpCopy_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuMemcpy3DPeer(__pyx_v_cpCopy_ptr); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 16333, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":16334
 *     cdef ccuda.CUDA_MEMCPY3D_PEER* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy3DPeer(cpCopy_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 16334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":16311
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3DPeer(pCopy : CUDA_MEMCPY3D_PEER):             # <<<<<<<<<<<<<<
 *     """ Copies memory between contexts.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpy3DPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":16337
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAsync(dst, src, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory asynchronously.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_195cuMemcpyAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_194cuMemcpyAsync[] = "cuMemcpyAsync(dst, src, size_t ByteCount, hStream)\n Copies memory asynchronously.\n\n    Copies data between two pointers. `dst` and `src` are base pointers of\n    the destination and source, respectively. `ByteCount` specifies the\n    number of bytes to copy. Note that this function infers the type of the\n    transfer (host to host, host to device, device to device, or device to\n    host) from the pointer values. This function is only allowed in\n    contexts which support unified addressing.\n\n    Parameters\n    ----------\n    dst : :py:obj:`~.CUdeviceptr`\n        Destination unified virtual address space pointer\n    src : :py:obj:`~.CUdeviceptr`\n        Source unified virtual address space pointer\n    ByteCount : size_t\n        Size of memory copy in bytes\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:""obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_195cuMemcpyAsync = {"cuMemcpyAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_195cuMemcpyAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_194cuMemcpyAsync};
static PyObject *__pyx_pw_4cuda_4cuda_195cuMemcpyAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dst = 0;
  PyObject *__pyx_v_src = 0;
  size_t __pyx_v_ByteCount;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dst_2,&__pyx_n_s_src,&__pyx_n_s_ByteCount,&__pyx_n_s_hStream_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dst_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_src)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAsync", 1, 4, 4, 1); __PYX_ERR(0, 16337, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAsync", 1, 4, 4, 2); __PYX_ERR(0, 16337, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAsync", 1, 4, 4, 3); __PYX_ERR(0, 16337, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyAsync") < 0)) __PYX_ERR(0, 16337, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dst = values[0];
    __pyx_v_src = values[1];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 16337, __pyx_L3_error)
    __pyx_v_hStream = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyAsync", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 16337, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_194cuMemcpyAsync(__pyx_self, __pyx_v_dst, __pyx_v_src, __pyx_v_ByteCount, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_194cuMemcpyAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUdeviceptr __pyx_v_csrc;
  PyObject *__pyx_v_psrc = NULL;
  CUdeviceptr __pyx_v_cdst;
  PyObject *__pyx_v_pdst = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__707)
  __Pyx_RefNannySetupContext("cuMemcpyAsync", 0);
  __Pyx_TraceCall("cuMemcpyAsync", __pyx_f[0], 16337, 0, __PYX_ERR(0, 16337, __pyx_L1_error));

  /* "cuda/cuda.pyx":16368
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16369
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16368
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16370
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16371
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16372
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16372, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16370
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16374
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16375
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr csrc
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16375, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":16378
 * 
 *     cdef ccuda.CUdeviceptr csrc
 *     if src is None:             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(src, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_src == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16379
 *     cdef ccuda.CUdeviceptr csrc
 *     if src is None:
 *         csrc = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(src, (CUdeviceptr)):
 *         psrc = int(src)
 */
    __pyx_v_csrc = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16378
 * 
 *     cdef ccuda.CUdeviceptr csrc
 *     if src is None:             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(src, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16380
 *     if src is None:
 *         csrc = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(src, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrc = int(src)
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_src, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16381
 *         csrc = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(src, (CUdeviceptr)):
 *         psrc = int(src)             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_src); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_psrc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16382
 *     elif isinstance(src, (CUdeviceptr)):
 *         psrc = int(src)
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc             # <<<<<<<<<<<<<<
 *     else:
 *         psrc = int(CUdeviceptr(src))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16382, __pyx_L1_error)
    __pyx_v_csrc = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16380
 *     if src is None:
 *         csrc = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(src, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrc = int(src)
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16384
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc
 *     else:
 *         psrc = int(CUdeviceptr(src))             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_src); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_psrc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16385
 *     else:
 *         psrc = int(CUdeviceptr(src))
 *         csrc = <ccuda.CUdeviceptr><void_ptr>psrc             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdst
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16385, __pyx_L1_error)
    __pyx_v_csrc = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":16388
 * 
 *     cdef ccuda.CUdeviceptr cdst
 *     if dst is None:             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dst, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dst == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16389
 *     cdef ccuda.CUdeviceptr cdst
 *     if dst is None:
 *         cdst = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dst, (CUdeviceptr)):
 *         pdst = int(dst)
 */
    __pyx_v_cdst = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16388
 * 
 *     cdef ccuda.CUdeviceptr cdst
 *     if dst is None:             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dst, (CUdeviceptr)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":16390
 *     if dst is None:
 *         cdst = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dst, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdst = int(dst)
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dst, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16391
 *         cdst = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dst, (CUdeviceptr)):
 *         pdst = int(dst)             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdst = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16392
 *     elif isinstance(dst, (CUdeviceptr)):
 *         pdst = int(dst)
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst             # <<<<<<<<<<<<<<
 *     else:
 *         pdst = int(CUdeviceptr(dst))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdst); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16392, __pyx_L1_error)
    __pyx_v_cdst = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16390
 *     if dst is None:
 *         cdst = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dst, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdst = int(dst)
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":16394
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 *     else:
 *         pdst = int(CUdeviceptr(dst))             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdst = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16395
 *     else:
 *         pdst = int(CUdeviceptr(dst))
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemcpyAsync(cdst, csrc, ByteCount, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdst); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16395, __pyx_L1_error)
    __pyx_v_cdst = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":16397
 *         cdst = <ccuda.CUdeviceptr><void_ptr>pdst
 * 
 *     err = ccuda.cuMemcpyAsync(cdst, csrc, ByteCount, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyAsync(__pyx_v_cdst, __pyx_v_csrc, __pyx_v_ByteCount, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 16397, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":16398
 * 
 *     err = ccuda.cuMemcpyAsync(cdst, csrc, ByteCount, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 16398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":16337
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAsync(dst, src, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory asynchronously.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_psrc);
  __Pyx_XDECREF(__pyx_v_pdst);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":16401
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies device memory between two contexts asynchronously.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_197cuMemcpyPeerAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_196cuMemcpyPeerAsync[] = "cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount, hStream)\n Copies device memory between two contexts asynchronously.\n\n    Copies from device memory in one context to device memory in another\n    context. `dstDevice` is the base device pointer of the destination\n    memory and `dstContext` is the destination context. `srcDevice` is the\n    base device pointer of the source memory and `srcContext` is the source\n    pointer. `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    dstContext : :py:obj:`~.CUcontext`\n        Destination context\n    srcDevice : :py:obj:`~.CUdeviceptr`\n        Source device pointer\n    srcContext : :py:obj:`~.CUcontext`\n        Source context\n    ByteCount : size_t\n        Size of memory copy in bytes\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpy3DPeer`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cudaMemcpyPeerAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_197cuMemcpyPeerAsync = {"cuMemcpyPeerAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_197cuMemcpyPeerAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_196cuMemcpyPeerAsync};
static PyObject *__pyx_pw_4cuda_4cuda_197cuMemcpyPeerAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  PyObject *__pyx_v_dstContext = 0;
  PyObject *__pyx_v_srcDevice = 0;
  PyObject *__pyx_v_srcContext = 0;
  size_t __pyx_v_ByteCount;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyPeerAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_dstContext_2,&__pyx_n_s_srcDevice_2,&__pyx_n_s_srcContext_2,&__pyx_n_s_ByteCount,&__pyx_n_s_hStream_2,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstContext_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyPeerAsync", 1, 6, 6, 1); __PYX_ERR(0, 16401, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcDevice_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyPeerAsync", 1, 6, 6, 2); __PYX_ERR(0, 16401, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcContext_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyPeerAsync", 1, 6, 6, 3); __PYX_ERR(0, 16401, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyPeerAsync", 1, 6, 6, 4); __PYX_ERR(0, 16401, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyPeerAsync", 1, 6, 6, 5); __PYX_ERR(0, 16401, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyPeerAsync") < 0)) __PYX_ERR(0, 16401, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_dstContext = values[1];
    __pyx_v_srcDevice = values[2];
    __pyx_v_srcContext = values[3];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[4]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 16401, __pyx_L3_error)
    __pyx_v_hStream = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyPeerAsync", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 16401, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_196cuMemcpyPeerAsync(__pyx_self, __pyx_v_dstDevice, __pyx_v_dstContext, __pyx_v_srcDevice, __pyx_v_srcContext, __pyx_v_ByteCount, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_196cuMemcpyPeerAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_dstContext, PyObject *__pyx_v_srcDevice, PyObject *__pyx_v_srcContext, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUcontext __pyx_v_csrcContext;
  PyObject *__pyx_v_psrcContext = NULL;
  CUdeviceptr __pyx_v_csrcDevice;
  PyObject *__pyx_v_psrcDevice = NULL;
  CUcontext __pyx_v_cdstContext;
  PyObject *__pyx_v_pdstContext = NULL;
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__708)
  __Pyx_RefNannySetupContext("cuMemcpyPeerAsync", 0);
  __Pyx_TraceCall("cuMemcpyPeerAsync", __pyx_f[0], 16401, 0, __PYX_ERR(0, 16401, __pyx_L1_error));

  /* "cuda/cuda.pyx":16435
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16436
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16435
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16437
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16438
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16439
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16439, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16437
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16441
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16442
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUcontext csrcContext
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16442, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":16445
 * 
 *     cdef ccuda.CUcontext csrcContext
 *     if srcContext is None:             # <<<<<<<<<<<<<<
 *         csrcContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(srcContext, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_srcContext == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16446
 *     cdef ccuda.CUcontext csrcContext
 *     if srcContext is None:
 *         csrcContext = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcContext, (CUcontext)):
 *         psrcContext = int(srcContext)
 */
    __pyx_v_csrcContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16445
 * 
 *     cdef ccuda.CUcontext csrcContext
 *     if srcContext is None:             # <<<<<<<<<<<<<<
 *         csrcContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(srcContext, (CUcontext)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16447
 *     if srcContext is None:
 *         csrcContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(srcContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *         psrcContext = int(srcContext)
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcContext, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16448
 *         csrcContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(srcContext, (CUcontext)):
 *         psrcContext = int(srcContext)             # <<<<<<<<<<<<<<
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_srcContext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_psrcContext = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16449
 *     elif isinstance(srcContext, (CUcontext)):
 *         psrcContext = int(srcContext)
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext             # <<<<<<<<<<<<<<
 *     else:
 *         psrcContext = int(CUcontext(srcContext))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16449, __pyx_L1_error)
    __pyx_v_csrcContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16447
 *     if srcContext is None:
 *         csrcContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(srcContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *         psrcContext = int(srcContext)
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16451
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 *     else:
 *         psrcContext = int(CUcontext(srcContext))             # <<<<<<<<<<<<<<
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_srcContext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_psrcContext = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16452
 *     else:
 *         psrcContext = int(CUcontext(srcContext))
 *         csrcContext = <ccuda.CUcontext><void_ptr>psrcContext             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr csrcDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16452, __pyx_L1_error)
    __pyx_v_csrcContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":16455
 * 
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_srcDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16456
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 */
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16455
 * 
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":16457
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16458
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrcDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16459
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16459, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16457
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":16461
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_srcDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrcDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16462
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUcontext cdstContext
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16462, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":16465
 * 
 *     cdef ccuda.CUcontext cdstContext
 *     if dstContext is None:             # <<<<<<<<<<<<<<
 *         cdstContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(dstContext, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_dstContext == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16466
 *     cdef ccuda.CUcontext cdstContext
 *     if dstContext is None:
 *         cdstContext = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstContext, (CUcontext)):
 *         pdstContext = int(dstContext)
 */
    __pyx_v_cdstContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16465
 * 
 *     cdef ccuda.CUcontext cdstContext
 *     if dstContext is None:             # <<<<<<<<<<<<<<
 *         cdstContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(dstContext, (CUcontext)):
 */
    goto __pyx_L6;
  }

  /* "cuda/cuda.pyx":16467
 *     if dstContext is None:
 *         cdstContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(dstContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pdstContext = int(dstContext)
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstContext, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16468
 *         cdstContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(dstContext, (CUcontext)):
 *         pdstContext = int(dstContext)             # <<<<<<<<<<<<<<
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstContext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstContext = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16469
 *     elif isinstance(dstContext, (CUcontext)):
 *         pdstContext = int(dstContext)
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext             # <<<<<<<<<<<<<<
 *     else:
 *         pdstContext = int(CUcontext(dstContext))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16469, __pyx_L1_error)
    __pyx_v_cdstContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16467
 *     if dstContext is None:
 *         cdstContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(dstContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pdstContext = int(dstContext)
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 */
    goto __pyx_L6;
  }

  /* "cuda/cuda.pyx":16471
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 *     else:
 *         pdstContext = int(CUcontext(dstContext))             # <<<<<<<<<<<<<<
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_dstContext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstContext = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16472
 *     else:
 *         pdstContext = int(CUcontext(dstContext))
 *         cdstContext = <ccuda.CUcontext><void_ptr>pdstContext             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16472, __pyx_L1_error)
    __pyx_v_cdstContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L6:;

  /* "cuda/cuda.pyx":16475
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16476
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16475
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L7;
  }

  /* "cuda/cuda.pyx":16477
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16478
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16479
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16479, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16477
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L7;
  }

  /* "cuda/cuda.pyx":16481
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16482
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemcpyPeerAsync(cdstDevice, cdstContext, csrcDevice, csrcContext, ByteCount, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16482, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L7:;

  /* "cuda/cuda.pyx":16484
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemcpyPeerAsync(cdstDevice, cdstContext, csrcDevice, csrcContext, ByteCount, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyPeerAsync(__pyx_v_cdstDevice, __pyx_v_cdstContext, __pyx_v_csrcDevice, __pyx_v_csrcContext, __pyx_v_ByteCount, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 16484, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":16485
 * 
 *     err = ccuda.cuMemcpyPeerAsync(cdstDevice, cdstContext, csrcDevice, csrcContext, ByteCount, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 16485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":16401
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies device memory between two contexts asynchronously.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_psrcContext);
  __Pyx_XDECREF(__pyx_v_psrcDevice);
  __Pyx_XDECREF(__pyx_v_pdstContext);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":16488
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoDAsync(dstDevice, srcHost, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_199cuMemcpyHtoDAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_198cuMemcpyHtoDAsync[] = "cuMemcpyHtoDAsync(dstDevice, srcHost, size_t ByteCount, hStream)\n Copies memory from Host to Device.\n\n    Copies from host memory to device memory. `dstDevice` and `srcHost` are\n    the base addresses of the destination and source, respectively.\n    `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    srcHost : Any\n        Source host pointer\n    ByteCount : size_t\n        Size of memory copy in bytes\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemse""tD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_199cuMemcpyHtoDAsync = {"cuMemcpyHtoDAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_199cuMemcpyHtoDAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_198cuMemcpyHtoDAsync};
static PyObject *__pyx_pw_4cuda_4cuda_199cuMemcpyHtoDAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  PyObject *__pyx_v_srcHost = 0;
  size_t __pyx_v_ByteCount;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyHtoDAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_srcHost_2,&__pyx_n_s_ByteCount,&__pyx_n_s_hStream_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcHost_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoDAsync", 1, 4, 4, 1); __PYX_ERR(0, 16488, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoDAsync", 1, 4, 4, 2); __PYX_ERR(0, 16488, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoDAsync", 1, 4, 4, 3); __PYX_ERR(0, 16488, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyHtoDAsync") < 0)) __PYX_ERR(0, 16488, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_srcHost = values[1];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 16488, __pyx_L3_error)
    __pyx_v_hStream = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoDAsync", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 16488, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyHtoDAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_198cuMemcpyHtoDAsync(__pyx_self, __pyx_v_dstDevice, __pyx_v_srcHost, __pyx_v_ByteCount, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_198cuMemcpyHtoDAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_srcHost, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  PyObject *__pyx_v_csrcHost = NULL;
  void *__pyx_v_csrcHost_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__709)
  __Pyx_RefNannySetupContext("cuMemcpyHtoDAsync", 0);
  __Pyx_TraceCall("cuMemcpyHtoDAsync", __pyx_f[0], 16488, 0, __PYX_ERR(0, 16488, __pyx_L1_error));

  /* "cuda/cuda.pyx":16516
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16517
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16516
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16518
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16519
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16520
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16520, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16518
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16522
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16523
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16523, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":16526
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16527
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16526
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16528
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16529
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16530
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16530, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16528
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16532
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16532, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16532, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16533
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16533, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":16535
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)             # <<<<<<<<<<<<<<
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr
 *     err = ccuda.cuMemcpyHtoDAsync(cdstDevice, csrcHost_ptr, ByteCount, chStream)
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_srcHost); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_csrcHost = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":16536
 * 
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpyHtoDAsync(cdstDevice, csrcHost_ptr, ByteCount, chStream)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_csrcHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_csrcHost_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":16537
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr
 *     err = ccuda.cuMemcpyHtoDAsync(cdstDevice, csrcHost_ptr, ByteCount, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyHtoDAsync(__pyx_v_cdstDevice, __pyx_v_csrcHost_ptr, __pyx_v_ByteCount, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 16537, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":16538
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr
 *     err = ccuda.cuMemcpyHtoDAsync(cdstDevice, csrcHost_ptr, ByteCount, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 16538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":16488
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoDAsync(dstDevice, srcHost, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyHtoDAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XDECREF(__pyx_v_csrcHost);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":16541
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoHAsync(dstHost, srcDevice, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Host.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_201cuMemcpyDtoHAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_200cuMemcpyDtoHAsync[] = "cuMemcpyDtoHAsync(dstHost, srcDevice, size_t ByteCount, hStream)\n Copies memory from Device to Host.\n\n    Copies from device to host memory. `dstHost` and `srcDevice` specify\n    the base pointers of the destination and source, respectively.\n    `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstHost : Any\n        Destination host pointer\n    srcDevice : :py:obj:`~.CUdeviceptr`\n        Source device pointer\n    ByteCount : size_t\n        Size of memory copy in bytes\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`"", :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_201cuMemcpyDtoHAsync = {"cuMemcpyDtoHAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_201cuMemcpyDtoHAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_200cuMemcpyDtoHAsync};
static PyObject *__pyx_pw_4cuda_4cuda_201cuMemcpyDtoHAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstHost = 0;
  PyObject *__pyx_v_srcDevice = 0;
  size_t __pyx_v_ByteCount;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyDtoHAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstHost_2,&__pyx_n_s_srcDevice_2,&__pyx_n_s_ByteCount,&__pyx_n_s_hStream_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstHost_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcDevice_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoHAsync", 1, 4, 4, 1); __PYX_ERR(0, 16541, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoHAsync", 1, 4, 4, 2); __PYX_ERR(0, 16541, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoHAsync", 1, 4, 4, 3); __PYX_ERR(0, 16541, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyDtoHAsync") < 0)) __PYX_ERR(0, 16541, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dstHost = values[0];
    __pyx_v_srcDevice = values[1];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 16541, __pyx_L3_error)
    __pyx_v_hStream = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoHAsync", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 16541, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyDtoHAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_200cuMemcpyDtoHAsync(__pyx_self, __pyx_v_dstHost, __pyx_v_srcDevice, __pyx_v_ByteCount, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_200cuMemcpyDtoHAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstHost, PyObject *__pyx_v_srcDevice, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUdeviceptr __pyx_v_csrcDevice;
  PyObject *__pyx_v_psrcDevice = NULL;
  PyObject *__pyx_v_cdstHost = NULL;
  void *__pyx_v_cdstHost_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__710)
  __Pyx_RefNannySetupContext("cuMemcpyDtoHAsync", 0);
  __Pyx_TraceCall("cuMemcpyDtoHAsync", __pyx_f[0], 16541, 0, __PYX_ERR(0, 16541, __pyx_L1_error));

  /* "cuda/cuda.pyx":16569
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16570
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16569
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16571
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16572
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16573
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16573, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16571
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16575
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16576
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr csrcDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16576, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":16579
 * 
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_srcDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16580
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 */
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16579
 * 
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16581
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16582
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_srcDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_psrcDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16583
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16583, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16581
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16585
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_srcDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_psrcDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16586
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 * 
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16586, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":16588
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 * 
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)             # <<<<<<<<<<<<<<
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr
 *     err = ccuda.cuMemcpyDtoHAsync(cdstHost_ptr, csrcDevice, ByteCount, chStream)
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_dstHost); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_cdstHost = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":16589
 * 
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpyDtoHAsync(cdstHost_ptr, csrcDevice, ByteCount, chStream)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdstHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cdstHost_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":16590
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr
 *     err = ccuda.cuMemcpyDtoHAsync(cdstHost_ptr, csrcDevice, ByteCount, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyDtoHAsync(__pyx_v_cdstHost_ptr, __pyx_v_csrcDevice, __pyx_v_ByteCount, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 16590, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":16591
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr
 *     err = ccuda.cuMemcpyDtoHAsync(cdstHost_ptr, csrcDevice, ByteCount, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 16591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":16541
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoHAsync(dstHost, srcDevice, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Host.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyDtoHAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_psrcDevice);
  __Pyx_XDECREF(__pyx_v_cdstHost);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":16594
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoDAsync(dstDevice, srcDevice, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_203cuMemcpyDtoDAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_202cuMemcpyDtoDAsync[] = "cuMemcpyDtoDAsync(dstDevice, srcDevice, size_t ByteCount, hStream)\n Copies memory from Device to Device.\n\n    Copies from device memory to device memory. `dstDevice` and `srcDevice`\n    are the base pointers of the destination and source, respectively.\n    `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    srcDevice : :py:obj:`~.CUdeviceptr`\n        Source device pointer\n    ByteCount : size_t\n        Size of memory copy in bytes\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemset""D2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_203cuMemcpyDtoDAsync = {"cuMemcpyDtoDAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_203cuMemcpyDtoDAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_202cuMemcpyDtoDAsync};
static PyObject *__pyx_pw_4cuda_4cuda_203cuMemcpyDtoDAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  PyObject *__pyx_v_srcDevice = 0;
  size_t __pyx_v_ByteCount;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyDtoDAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_srcDevice_2,&__pyx_n_s_ByteCount,&__pyx_n_s_hStream_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcDevice_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoDAsync", 1, 4, 4, 1); __PYX_ERR(0, 16594, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoDAsync", 1, 4, 4, 2); __PYX_ERR(0, 16594, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoDAsync", 1, 4, 4, 3); __PYX_ERR(0, 16594, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyDtoDAsync") < 0)) __PYX_ERR(0, 16594, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_srcDevice = values[1];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 16594, __pyx_L3_error)
    __pyx_v_hStream = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyDtoDAsync", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 16594, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyDtoDAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_202cuMemcpyDtoDAsync(__pyx_self, __pyx_v_dstDevice, __pyx_v_srcDevice, __pyx_v_ByteCount, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_202cuMemcpyDtoDAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_srcDevice, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUdeviceptr __pyx_v_csrcDevice;
  PyObject *__pyx_v_psrcDevice = NULL;
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__711)
  __Pyx_RefNannySetupContext("cuMemcpyDtoDAsync", 0);
  __Pyx_TraceCall("cuMemcpyDtoDAsync", __pyx_f[0], 16594, 0, __PYX_ERR(0, 16594, __pyx_L1_error));

  /* "cuda/cuda.pyx":16622
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16623
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16622
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16624
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16625
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16626
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16626, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16624
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16628
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16629
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr csrcDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16629, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":16632
 * 
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_srcDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16633
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 */
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16632
 * 
 *     cdef ccuda.CUdeviceptr csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16634
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16635
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_srcDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_psrcDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16636
 *     elif isinstance(srcDevice, (CUdeviceptr)):
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16636, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16634
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(srcDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16638
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_srcDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_psrcDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16639
 *     else:
 *         psrcDevice = int(CUdeviceptr(srcDevice))
 *         csrcDevice = <ccuda.CUdeviceptr><void_ptr>psrcDevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16639, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":16642
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16643
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16642
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":16644
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16645
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16646
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16646, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16644
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":16648
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16649
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemcpyDtoDAsync(cdstDevice, csrcDevice, ByteCount, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16649, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":16651
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemcpyDtoDAsync(cdstDevice, csrcDevice, ByteCount, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyDtoDAsync(__pyx_v_cdstDevice, __pyx_v_csrcDevice, __pyx_v_ByteCount, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 16651, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":16652
 * 
 *     err = ccuda.cuMemcpyDtoDAsync(cdstDevice, csrcDevice, ByteCount, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 16652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":16594
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoDAsync(dstDevice, srcDevice, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyDtoDAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_psrcDevice);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":16655
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoAAsync(dstArray, size_t dstOffset, srcHost, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_205cuMemcpyHtoAAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_204cuMemcpyHtoAAsync[] = "cuMemcpyHtoAAsync(dstArray, size_t dstOffset, srcHost, size_t ByteCount, hStream)\n Copies memory from Host to Array.\n\n    Copies from host memory to a 1D CUDA array. `dstArray` and `dstOffset`\n    specify the CUDA array handle and starting offset in bytes of the\n    destination data. `srcHost` specifies the base address of the source.\n    `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstArray : :py:obj:`~.CUarray`\n        Destination array\n    dstOffset : size_t\n        Offset in bytes of destination array\n    srcHost : Any\n        Source host pointer\n    ByteCount : size_t\n        Size of memory copy in bytes\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemset""D2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpyToArrayAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_205cuMemcpyHtoAAsync = {"cuMemcpyHtoAAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_205cuMemcpyHtoAAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_204cuMemcpyHtoAAsync};
static PyObject *__pyx_pw_4cuda_4cuda_205cuMemcpyHtoAAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstArray = 0;
  size_t __pyx_v_dstOffset;
  PyObject *__pyx_v_srcHost = 0;
  size_t __pyx_v_ByteCount;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyHtoAAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstArray_2,&__pyx_n_s_dstOffset,&__pyx_n_s_srcHost_2,&__pyx_n_s_ByteCount,&__pyx_n_s_hStream_2,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstArray_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstOffset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoAAsync", 1, 5, 5, 1); __PYX_ERR(0, 16655, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcHost_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoAAsync", 1, 5, 5, 2); __PYX_ERR(0, 16655, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoAAsync", 1, 5, 5, 3); __PYX_ERR(0, 16655, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoAAsync", 1, 5, 5, 4); __PYX_ERR(0, 16655, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyHtoAAsync") < 0)) __PYX_ERR(0, 16655, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_dstArray = values[0];
    __pyx_v_dstOffset = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_dstOffset == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 16655, __pyx_L3_error)
    __pyx_v_srcHost = values[2];
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 16655, __pyx_L3_error)
    __pyx_v_hStream = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyHtoAAsync", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 16655, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyHtoAAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_204cuMemcpyHtoAAsync(__pyx_self, __pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcHost, __pyx_v_ByteCount, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_204cuMemcpyHtoAAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstArray, size_t __pyx_v_dstOffset, PyObject *__pyx_v_srcHost, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUarray __pyx_v_cdstArray;
  PyObject *__pyx_v_pdstArray = NULL;
  PyObject *__pyx_v_csrcHost = NULL;
  void *__pyx_v_csrcHost_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__712)
  __Pyx_RefNannySetupContext("cuMemcpyHtoAAsync", 0);
  __Pyx_TraceCall("cuMemcpyHtoAAsync", __pyx_f[0], 16655, 0, __PYX_ERR(0, 16655, __pyx_L1_error));

  /* "cuda/cuda.pyx":16686
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16687
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16686
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16688
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16689
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16690
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16690, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16688
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16692
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16693
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUarray cdstArray
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16693, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":16696
 * 
 *     cdef ccuda.CUarray cdstArray
 *     if dstArray is None:             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_dstArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16697
 *     cdef ccuda.CUarray cdstArray
 *     if dstArray is None:
 *         cdstArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstArray, (CUarray)):
 *         pdstArray = int(dstArray)
 */
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16696
 * 
 *     cdef ccuda.CUarray cdstArray
 *     if dstArray is None:             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16698
 *     if dstArray is None:
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         pdstArray = int(dstArray)
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16699
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):
 *         pdstArray = int(dstArray)             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16700
 *     elif isinstance(dstArray, (CUarray)):
 *         pdstArray = int(dstArray)
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 *     else:
 *         pdstArray = int(CUarray(dstArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16700, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16698
 *     if dstArray is None:
 *         cdstArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(dstArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         pdstArray = int(dstArray)
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16702
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 *     else:
 *         pdstArray = int(CUarray(dstArray))             # <<<<<<<<<<<<<<
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_dstArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16703
 *     else:
 *         pdstArray = int(CUarray(dstArray))
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray             # <<<<<<<<<<<<<<
 * 
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16703, __pyx_L1_error)
    __pyx_v_cdstArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":16705
 *         cdstArray = <ccuda.CUarray><void_ptr>pdstArray
 * 
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)             # <<<<<<<<<<<<<<
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr
 *     err = ccuda.cuMemcpyHtoAAsync(cdstArray, dstOffset, csrcHost_ptr, ByteCount, chStream)
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_srcHost); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_csrcHost = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":16706
 * 
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpyHtoAAsync(cdstArray, dstOffset, csrcHost_ptr, ByteCount, chStream)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_csrcHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_csrcHost_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":16707
 *     csrcHost = utils.HelperInputVoidPtr(srcHost)
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr
 *     err = ccuda.cuMemcpyHtoAAsync(cdstArray, dstOffset, csrcHost_ptr, ByteCount, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyHtoAAsync(__pyx_v_cdstArray, __pyx_v_dstOffset, __pyx_v_csrcHost_ptr, __pyx_v_ByteCount, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 16707, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":16708
 *     cdef void* csrcHost_ptr = <void*><void_ptr>csrcHost.cptr
 *     err = ccuda.cuMemcpyHtoAAsync(cdstArray, dstOffset, csrcHost_ptr, ByteCount, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 16708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":16655
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoAAsync(dstArray, size_t dstOffset, srcHost, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyHtoAAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pdstArray);
  __Pyx_XDECREF(__pyx_v_csrcHost);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":16711
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoHAsync(dstHost, srcArray, size_t srcOffset, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Host.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_207cuMemcpyAtoHAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_206cuMemcpyAtoHAsync[] = "cuMemcpyAtoHAsync(dstHost, srcArray, size_t srcOffset, size_t ByteCount, hStream)\n Copies memory from Array to Host.\n\n    Copies from one 1D CUDA array to host memory. `dstHost` specifies the\n    base pointer of the destination. `srcArray` and `srcOffset` specify the\n    CUDA array handle and starting offset in bytes of the source data.\n    `ByteCount` specifies the number of bytes to copy.\n\n    Parameters\n    ----------\n    dstHost : Any\n        Destination pointer\n    srcArray : :py:obj:`~.CUarray`\n        Source array\n    srcOffset : size_t\n        Offset in bytes of source array\n    ByteCount : size_t\n        Size of memory copy in bytes\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Asyn""c`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpyFromArrayAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_207cuMemcpyAtoHAsync = {"cuMemcpyAtoHAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_207cuMemcpyAtoHAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_206cuMemcpyAtoHAsync};
static PyObject *__pyx_pw_4cuda_4cuda_207cuMemcpyAtoHAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstHost = 0;
  PyObject *__pyx_v_srcArray = 0;
  size_t __pyx_v_srcOffset;
  size_t __pyx_v_ByteCount;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpyAtoHAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstHost_2,&__pyx_n_s_srcArray_2,&__pyx_n_s_srcOffset,&__pyx_n_s_ByteCount,&__pyx_n_s_hStream_2,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstHost_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcArray_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoHAsync", 1, 5, 5, 1); __PYX_ERR(0, 16711, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcOffset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoHAsync", 1, 5, 5, 2); __PYX_ERR(0, 16711, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ByteCount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoHAsync", 1, 5, 5, 3); __PYX_ERR(0, 16711, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoHAsync", 1, 5, 5, 4); __PYX_ERR(0, 16711, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpyAtoHAsync") < 0)) __PYX_ERR(0, 16711, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_dstHost = values[0];
    __pyx_v_srcArray = values[1];
    __pyx_v_srcOffset = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_srcOffset == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 16711, __pyx_L3_error)
    __pyx_v_ByteCount = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_ByteCount == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 16711, __pyx_L3_error)
    __pyx_v_hStream = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpyAtoHAsync", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 16711, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyAtoHAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_206cuMemcpyAtoHAsync(__pyx_self, __pyx_v_dstHost, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_206cuMemcpyAtoHAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstHost, PyObject *__pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUarray __pyx_v_csrcArray;
  PyObject *__pyx_v_psrcArray = NULL;
  PyObject *__pyx_v_cdstHost = NULL;
  void *__pyx_v_cdstHost_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__713)
  __Pyx_RefNannySetupContext("cuMemcpyAtoHAsync", 0);
  __Pyx_TraceCall("cuMemcpyAtoHAsync", __pyx_f[0], 16711, 0, __PYX_ERR(0, 16711, __pyx_L1_error));

  /* "cuda/cuda.pyx":16742
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16743
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16742
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16744
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16745
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16746
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16746, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16744
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16748
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16749
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUarray csrcArray
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16749, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":16752
 * 
 *     cdef ccuda.CUarray csrcArray
 *     if srcArray is None:             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_srcArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16753
 *     cdef ccuda.CUarray csrcArray
 *     if srcArray is None:
 *         csrcArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcArray, (CUarray)):
 *         psrcArray = int(srcArray)
 */
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16752
 * 
 *     cdef ccuda.CUarray csrcArray
 *     if srcArray is None:             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16754
 *     if srcArray is None:
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         psrcArray = int(srcArray)
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16755
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):
 *         psrcArray = int(srcArray)             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_srcArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_psrcArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16756
 *     elif isinstance(srcArray, (CUarray)):
 *         psrcArray = int(srcArray)
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 *     else:
 *         psrcArray = int(CUarray(srcArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16756, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16754
 *     if srcArray is None:
 *         csrcArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(srcArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         psrcArray = int(srcArray)
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":16758
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 *     else:
 *         psrcArray = int(CUarray(srcArray))             # <<<<<<<<<<<<<<
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_srcArray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_psrcArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16759
 *     else:
 *         psrcArray = int(CUarray(srcArray))
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray             # <<<<<<<<<<<<<<
 * 
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrcArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16759, __pyx_L1_error)
    __pyx_v_csrcArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":16761
 *         csrcArray = <ccuda.CUarray><void_ptr>psrcArray
 * 
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)             # <<<<<<<<<<<<<<
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr
 *     err = ccuda.cuMemcpyAtoHAsync(cdstHost_ptr, csrcArray, srcOffset, ByteCount, chStream)
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_dstHost); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_cdstHost = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":16762
 * 
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpyAtoHAsync(cdstHost_ptr, csrcArray, srcOffset, ByteCount, chStream)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdstHost, __pyx_n_s_cptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cdstHost_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":16763
 *     cdstHost = utils.HelperInputVoidPtr(dstHost)
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr
 *     err = ccuda.cuMemcpyAtoHAsync(cdstHost_ptr, csrcArray, srcOffset, ByteCount, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemcpyAtoHAsync(__pyx_v_cdstHost_ptr, __pyx_v_csrcArray, __pyx_v_srcOffset, __pyx_v_ByteCount, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 16763, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":16764
 *     cdef void* cdstHost_ptr = <void*><void_ptr>cdstHost.cptr
 *     err = ccuda.cuMemcpyAtoHAsync(cdstHost_ptr, csrcArray, srcOffset, ByteCount, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 16764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":16711
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoHAsync(dstHost, srcArray, size_t srcOffset, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Host.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpyAtoHAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_psrcArray);
  __Pyx_XDECREF(__pyx_v_cdstHost);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":16767
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy2DAsync(pCopy : CUDA_MEMCPY2D, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 2D arrays.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_209cuMemcpy2DAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_208cuMemcpy2DAsync[] = "cuMemcpy2DAsync(CUDA_MEMCPY2D pCopy: CUDA_MEMCPY2D, hStream)\n Copies memory for 2D arrays.\n\n    Perform a 2D memory copy according to the parameters specified in\n    `pCopy`. The :py:obj:`~.CUDA_MEMCPY2D` structure is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - :py:obj:`~.srcMemoryType` and :py:obj:`~.dstMemoryType` specify the\n      type of memory of the source and destination, respectively;\n      :py:obj:`~.CUmemorytype_enum` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`,\n    :py:obj:`~.srcHost` and :py:obj:`~.srcPitch` specify the (host) base\n    address of the source data and the bytes per row to apply.\n    :py:obj:`~.srcArray` is ignored.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`,\n    :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (unified\n    virtual address space) base address of the source data and the bytes\n    per row to apply. :py:obj:`~.srcArray` is ignored. This value may be\n    used only if unified addressing is supported in the calling context.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`,\n    :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (device)\n    base address of the source data and the bytes per row to apply.\n    :py:obj:`~.srcArray` is ignored.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`,\n    :py:obj:`~.srcArray` specifies the handle of the source data.\n    :py:obj:`~.srcHost`, :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` are\n    ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`,\n    :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (unified\n    virtual address space) base address of the source data and the bytes\n    per row to apply. :py:obj:`~.dstArray` is ignored. This value may be\n    used only if unified addr""essing is supported in the calling context.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`,\n    :py:obj:`~.dstHost` and :py:obj:`~.dstPitch` specify the (host) base\n    address of the destination data and the bytes per row to apply.\n    :py:obj:`~.dstArray` is ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`,\n    :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (device)\n    base address of the destination data and the bytes per row to apply.\n    :py:obj:`~.dstArray` is ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`,\n    :py:obj:`~.dstArray` specifies the handle of the destination data.\n    :py:obj:`~.dstHost`, :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` are\n    ignored.\n\n    - :py:obj:`~.srcXInBytes` and :py:obj:`~.srcY` specify the base address\n      of the source data for the copy.\n\n    For host pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For device pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For CUDA arrays, :py:obj:`~.srcXInBytes` must be evenly divisible by\n    the array element size.\n\n    - :py:obj:`~.dstXInBytes` and :py:obj:`~.dstY` specify the base address\n      of the destination data for the copy.\n\n    For host pointers, the base address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For device pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For CUDA arrays, :py:obj:`~.dstXInBytes` must be evenly divisible by\n    the array element size.\n\n    - :py:obj:`~.WidthInBytes` and :py:obj:`~.Height` specify the width (in\n      bytes) and height of the 2D copy being performed.\n\n    - If specified, :py:obj:`~.srcPitch` must be greater than or equal to\n      :py:obj:`~.WidthInBytes` + :py:obj:`~.srcXInBytes`, and\n      :py:obj:`~.""dstPitch` must be greater than or equal to\n      :py:obj:`~.WidthInBytes` + dstXInBytes.\n\n    - If specified, :py:obj:`~.srcPitch` must be greater than or equal to\n      :py:obj:`~.WidthInBytes` + :py:obj:`~.srcXInBytes`, and\n      :py:obj:`~.dstPitch` must be greater than or equal to\n      :py:obj:`~.WidthInBytes` + dstXInBytes.\n\n    - If specified, :py:obj:`~.srcHeight` must be greater than or equal to\n      :py:obj:`~.Height` + :py:obj:`~.srcY`, and :py:obj:`~.dstHeight` must\n      be greater than or equal to :py:obj:`~.Height` + :py:obj:`~.dstY`.\n\n    :py:obj:`~.cuMemcpy2DAsync()` returns an error if any pitch is greater\n    than the maximum allowed (:py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PITCH`).\n    :py:obj:`~.cuMemAllocPitch()` passes back pitches that always work with\n    :py:obj:`~.cuMemcpy2D()`. On intra-device memory copies (device to\n    device, CUDA array to device, CUDA array to CUDA array),\n    :py:obj:`~.cuMemcpy2DAsync()` may fail for pitches not computed by\n    :py:obj:`~.cuMemAllocPitch()`.\n\n    Parameters\n    ----------\n    pCopy : :py:obj:`~.CUDA_MEMCPY2D`\n        Parameters for the memory copy\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync""`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_209cuMemcpy2DAsync = {"cuMemcpy2DAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_209cuMemcpy2DAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_208cuMemcpy2DAsync};
static PyObject *__pyx_pw_4cuda_4cuda_209cuMemcpy2DAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D *__pyx_v_pCopy = 0;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpy2DAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pCopy,&__pyx_n_s_hStream_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pCopy)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpy2DAsync", 1, 2, 2, 1); __PYX_ERR(0, 16767, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpy2DAsync") < 0)) __PYX_ERR(0, 16767, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_pCopy = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D *)values[0]);
    __pyx_v_hStream = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpy2DAsync", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 16767, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpy2DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pCopy), __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D, 1, "pCopy", 0))) __PYX_ERR(0, 16767, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_208cuMemcpy2DAsync(__pyx_self, __pyx_v_pCopy, __pyx_v_hStream);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_208cuMemcpy2DAsync(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D *__pyx_v_pCopy, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUDA_MEMCPY2D *__pyx_v_cpCopy_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_MEMCPY2D_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__714)
  __Pyx_RefNannySetupContext("cuMemcpy2DAsync", 0);
  __Pyx_TraceCall("cuMemcpy2DAsync", __pyx_f[0], 16767, 0, __PYX_ERR(0, 16767, __pyx_L1_error));

  /* "cuda/cuda.pyx":16895
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":16896
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":16895
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16897
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":16898
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":16899
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16899, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":16897
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":16901
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":16902
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_MEMCPY2D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 16902, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":16904
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cdef ccuda.CUDA_MEMCPY2D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpy2DAsync(cpCopy_ptr, chStream)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_pCopy), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16904, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 16904, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_pCopy->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cpCopy_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":16905
 * 
 *     cdef ccuda.CUDA_MEMCPY2D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy2DAsync(cpCopy_ptr, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuMemcpy2DAsync(__pyx_v_cpCopy_ptr, __pyx_v_chStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 16905, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":16906
 *     cdef ccuda.CUDA_MEMCPY2D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy2DAsync(cpCopy_ptr, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 16906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":16767
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy2DAsync(pCopy : CUDA_MEMCPY2D, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 2D arrays.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpy2DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":16909
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3DAsync(pCopy : CUDA_MEMCPY3D, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 3D arrays.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_211cuMemcpy3DAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_210cuMemcpy3DAsync[] = "cuMemcpy3DAsync(CUDA_MEMCPY3D pCopy: CUDA_MEMCPY3D, hStream)\n Copies memory for 3D arrays.\n\n    Perform a 3D memory copy according to the parameters specified in\n    `pCopy`. The :py:obj:`~.CUDA_MEMCPY3D` structure is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - :py:obj:`~.srcMemoryType` and :py:obj:`~.dstMemoryType` specify the\n      type of memory of the source and destination, respectively;\n      :py:obj:`~.CUmemorytype_enum` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`,\n    :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (unified\n    virtual address space) base address of the source data and the bytes\n    per row to apply. :py:obj:`~.srcArray` is ignored. This value may be\n    used only if unified addressing is supported in the calling context.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`,\n    :py:obj:`~.srcHost`, :py:obj:`~.srcPitch` and :py:obj:`~.srcHeight`\n    specify the (host) base address of the source data, the bytes per row,\n    and the height of each 2D slice of the 3D array. :py:obj:`~.srcArray`\n    is ignored.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`,\n    :py:obj:`~.srcDevice`, :py:obj:`~.srcPitch` and :py:obj:`~.srcHeight`\n    specify the (device) base address of the source data, the bytes per\n    row, and the height of each 2D slice of the 3D array.\n    :py:obj:`~.srcArray` is ignored.\n\n    If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`,\n    :py:obj:`~.srcArray` specifies the handle of the source data.\n    :py:obj:`~.srcHost`, :py:obj:`~.srcDevice`, :py:obj:`~.srcPitch` and\n    :py:obj:`~.srcHeight` are ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`,\n    :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (unified\n    virtual address spac""e) base address of the source data and the bytes\n    per row to apply. :py:obj:`~.dstArray` is ignored. This value may be\n    used only if unified addressing is supported in the calling context.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`,\n    :py:obj:`~.dstHost` and :py:obj:`~.dstPitch` specify the (host) base\n    address of the destination data, the bytes per row, and the height of\n    each 2D slice of the 3D array. :py:obj:`~.dstArray` is ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`,\n    :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (device)\n    base address of the destination data, the bytes per row, and the height\n    of each 2D slice of the 3D array. :py:obj:`~.dstArray` is ignored.\n\n    If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`,\n    :py:obj:`~.dstArray` specifies the handle of the destination data.\n    :py:obj:`~.dstHost`, :py:obj:`~.dstDevice`, :py:obj:`~.dstPitch` and\n    :py:obj:`~.dstHeight` are ignored.\n\n    - :py:obj:`~.srcXInBytes`, :py:obj:`~.srcY` and :py:obj:`~.srcZ`\n      specify the base address of the source data for the copy.\n\n    For host pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For device pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For CUDA arrays, :py:obj:`~.srcXInBytes` must be evenly divisible by\n    the array element size.\n\n    - dstXInBytes, :py:obj:`~.dstY` and :py:obj:`~.dstZ` specify the base\n      address of the destination data for the copy.\n\n    For host pointers, the base address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For device pointers, the starting address is\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For CUDA arrays, :py:obj:`~.dstXInBytes` must be evenly divisible by\n    the array element size.\n\n    - :py:obj:`~.""WidthInBytes`, :py:obj:`~.Height` and :py:obj:`~.Depth`\n      specify the width (in bytes), height and depth of the 3D copy being\n      performed.\n\n    - If specified, :py:obj:`~.srcPitch` must be greater than or equal to\n      :py:obj:`~.WidthInBytes` + :py:obj:`~.srcXInBytes`, and\n      :py:obj:`~.dstPitch` must be greater than or equal to\n      :py:obj:`~.WidthInBytes` + dstXInBytes.\n\n    - If specified, :py:obj:`~.srcHeight` must be greater than or equal to\n      :py:obj:`~.Height` + :py:obj:`~.srcY`, and :py:obj:`~.dstHeight` must\n      be greater than or equal to :py:obj:`~.Height` + :py:obj:`~.dstY`.\n\n    :py:obj:`~.cuMemcpy3DAsync()` returns an error if any pitch is greater\n    than the maximum allowed (:py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PITCH`).\n\n    The :py:obj:`~.srcLOD` and :py:obj:`~.dstLOD` members of the\n    :py:obj:`~.CUDA_MEMCPY3D` structure must be set to 0.\n\n    Parameters\n    ----------\n    pCopy : :py:obj:`~.CUDA_MEMCPY3D`\n        Parameters for the memory copy\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDt""oHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpy3DAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_211cuMemcpy3DAsync = {"cuMemcpy3DAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_211cuMemcpy3DAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_210cuMemcpy3DAsync};
static PyObject *__pyx_pw_4cuda_4cuda_211cuMemcpy3DAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_pCopy = 0;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpy3DAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pCopy,&__pyx_n_s_hStream_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pCopy)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpy3DAsync", 1, 2, 2, 1); __PYX_ERR(0, 16909, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpy3DAsync") < 0)) __PYX_ERR(0, 16909, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_pCopy = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *)values[0]);
    __pyx_v_hStream = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpy3DAsync", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 16909, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpy3DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pCopy), __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D, 1, "pCopy", 0))) __PYX_ERR(0, 16909, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_210cuMemcpy3DAsync(__pyx_self, __pyx_v_pCopy, __pyx_v_hStream);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_210cuMemcpy3DAsync(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_pCopy, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUDA_MEMCPY3D *__pyx_v_cpCopy_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_MEMCPY3D_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__715)
  __Pyx_RefNannySetupContext("cuMemcpy3DAsync", 0);
  __Pyx_TraceCall("cuMemcpy3DAsync", __pyx_f[0], 16909, 0, __PYX_ERR(0, 16909, __pyx_L1_error));

  /* "cuda/cuda.pyx":17033
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17034
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17033
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17035
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17036
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17037
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17037, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17035
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17039
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17040
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_MEMCPY3D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17040, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17042
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cdef ccuda.CUDA_MEMCPY3D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpy3DAsync(cpCopy_ptr, chStream)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_pCopy), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17042, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 17042, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_pCopy->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cpCopy_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":17043
 * 
 *     cdef ccuda.CUDA_MEMCPY3D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy3DAsync(cpCopy_ptr, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuMemcpy3DAsync(__pyx_v_cpCopy_ptr, __pyx_v_chStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17043, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":17044
 *     cdef ccuda.CUDA_MEMCPY3D* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy3DAsync(cpCopy_ptr, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 17044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":16909
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3DAsync(pCopy : CUDA_MEMCPY3D, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 3D arrays.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpy3DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17047
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3DPeerAsync(pCopy : CUDA_MEMCPY3D_PEER, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory between contexts asynchronously.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_213cuMemcpy3DPeerAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_212cuMemcpy3DPeerAsync[] = "cuMemcpy3DPeerAsync(CUDA_MEMCPY3D_PEER pCopy: CUDA_MEMCPY3D_PEER, hStream)\n Copies memory between contexts asynchronously.\n\n    Perform a 3D memory copy according to the parameters specified in\n    `pCopy`. See the definition of the :py:obj:`~.CUDA_MEMCPY3D_PEER`\n    structure for documentation of its parameters.\n\n    Parameters\n    ----------\n    pCopy : :py:obj:`~.CUDA_MEMCPY3D_PEER`\n        Parameters for the memory copy\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyPeerAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cudaMemcpy3DPeerAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_213cuMemcpy3DPeerAsync = {"cuMemcpy3DPeerAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_213cuMemcpy3DPeerAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_212cuMemcpy3DPeerAsync};
static PyObject *__pyx_pw_4cuda_4cuda_213cuMemcpy3DPeerAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER *__pyx_v_pCopy = 0;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemcpy3DPeerAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pCopy,&__pyx_n_s_hStream_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pCopy)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemcpy3DPeerAsync", 1, 2, 2, 1); __PYX_ERR(0, 17047, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemcpy3DPeerAsync") < 0)) __PYX_ERR(0, 17047, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_pCopy = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER *)values[0]);
    __pyx_v_hStream = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemcpy3DPeerAsync", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17047, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemcpy3DPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pCopy), __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER, 1, "pCopy", 0))) __PYX_ERR(0, 17047, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_212cuMemcpy3DPeerAsync(__pyx_self, __pyx_v_pCopy, __pyx_v_hStream);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_212cuMemcpy3DPeerAsync(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER *__pyx_v_pCopy, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUDA_MEMCPY3D_PEER *__pyx_v_cpCopy_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_MEMCPY3D_PEER_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__716)
  __Pyx_RefNannySetupContext("cuMemcpy3DPeerAsync", 0);
  __Pyx_TraceCall("cuMemcpy3DPeerAsync", __pyx_f[0], 17047, 0, __PYX_ERR(0, 17047, __pyx_L1_error));

  /* "cuda/cuda.pyx":17071
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17072
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17071
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17073
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17074
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17075
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17075, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17073
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17077
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17078
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_MEMCPY3D_PEER* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17078, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17080
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cdef ccuda.CUDA_MEMCPY3D_PEER* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemcpy3DPeerAsync(cpCopy_ptr, chStream)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_pCopy), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17080, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 17080, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_pCopy->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cpCopy_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":17081
 * 
 *     cdef ccuda.CUDA_MEMCPY3D_PEER* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy3DPeerAsync(cpCopy_ptr, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuMemcpy3DPeerAsync(__pyx_v_cpCopy_ptr, __pyx_v_chStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17081, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":17082
 *     cdef ccuda.CUDA_MEMCPY3D_PEER* cpCopy_ptr = pCopy._ptr if pCopy != None else NULL
 *     err = ccuda.cuMemcpy3DPeerAsync(cpCopy_ptr, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 17082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17047
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3DPeerAsync(pCopy : CUDA_MEMCPY3D_PEER, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory between contexts asynchronously.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMemcpy3DPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17085
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD8(dstDevice, unsigned char uc, size_t N):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_215cuMemsetD8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_214cuMemsetD8[] = "cuMemsetD8(dstDevice, unsigned char uc, size_t N)\n Initializes device memory.\n\n    Sets the memory range of `N` 8-bit values to the specified value `uc`.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    uc : unsigned char\n        Value to set\n    N : size_t\n        Number of elements\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_215cuMemsetD8 = {"cuMemsetD8", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_215cuMemsetD8, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_214cuMemsetD8};
static PyObject *__pyx_pw_4cuda_4cuda_215cuMemsetD8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  unsigned char __pyx_v_uc;
  size_t __pyx_v_N;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemsetD8 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_uc,&__pyx_n_s_N,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD8", 1, 3, 3, 1); __PYX_ERR(0, 17085, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_N)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD8", 1, 3, 3, 2); __PYX_ERR(0, 17085, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemsetD8") < 0)) __PYX_ERR(0, 17085, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_uc = __Pyx_PyInt_As_unsigned_char(values[1]); if (unlikely((__pyx_v_uc == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 17085, __pyx_L3_error)
    __pyx_v_N = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_N == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17085, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemsetD8", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17085, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_214cuMemsetD8(__pyx_self, __pyx_v_dstDevice, __pyx_v_uc, __pyx_v_N);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_214cuMemsetD8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N) {
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__717)
  __Pyx_RefNannySetupContext("cuMemsetD8", 0);
  __Pyx_TraceCall("cuMemsetD8", __pyx_f[0], 17085, 0, __PYX_ERR(0, 17085, __pyx_L1_error));

  /* "cuda/cuda.pyx":17109
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17110
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17109
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17111
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17112
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17113
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17113, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17111
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17115
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17116
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemsetD8(cdstDevice, uc, N)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17116, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17118
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemsetD8(cdstDevice, uc, N)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemsetD8(__pyx_v_cdstDevice, __pyx_v_uc, __pyx_v_N); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17118, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17119
 * 
 *     err = ccuda.cuMemsetD8(cdstDevice, uc, N)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17085
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD8(dstDevice, unsigned char uc, size_t N):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17122
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD16(dstDevice, unsigned short us, size_t N):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_217cuMemsetD16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_216cuMemsetD16[] = "cuMemsetD16(dstDevice, unsigned short us, size_t N)\n Initializes device memory.\n\n    Sets the memory range of `N` 16-bit values to the specified value `us`.\n    The `dstDevice` pointer must be two byte aligned.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    us : unsigned short\n        Value to set\n    N : size_t\n        Number of elements\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_217cuMemsetD16 = {"cuMemsetD16", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_217cuMemsetD16, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_216cuMemsetD16};
static PyObject *__pyx_pw_4cuda_4cuda_217cuMemsetD16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  unsigned short __pyx_v_us;
  size_t __pyx_v_N;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemsetD16 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_us,&__pyx_n_s_N,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_us)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD16", 1, 3, 3, 1); __PYX_ERR(0, 17122, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_N)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD16", 1, 3, 3, 2); __PYX_ERR(0, 17122, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemsetD16") < 0)) __PYX_ERR(0, 17122, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_us = __Pyx_PyInt_As_unsigned_short(values[1]); if (unlikely((__pyx_v_us == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 17122, __pyx_L3_error)
    __pyx_v_N = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_N == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17122, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemsetD16", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17122, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD16", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_216cuMemsetD16(__pyx_self, __pyx_v_dstDevice, __pyx_v_us, __pyx_v_N);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_216cuMemsetD16(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N) {
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__718)
  __Pyx_RefNannySetupContext("cuMemsetD16", 0);
  __Pyx_TraceCall("cuMemsetD16", __pyx_f[0], 17122, 0, __PYX_ERR(0, 17122, __pyx_L1_error));

  /* "cuda/cuda.pyx":17147
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17148
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17147
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17149
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17150
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17151
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17151, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17149
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17153
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17154
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemsetD16(cdstDevice, us, N)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17154, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17156
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemsetD16(cdstDevice, us, N)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemsetD16(__pyx_v_cdstDevice, __pyx_v_us, __pyx_v_N); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17156, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17157
 * 
 *     err = ccuda.cuMemsetD16(cdstDevice, us, N)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17122
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD16(dstDevice, unsigned short us, size_t N):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD16", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17160
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD32(dstDevice, unsigned int ui, size_t N):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_219cuMemsetD32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_218cuMemsetD32[] = "cuMemsetD32(dstDevice, unsigned int ui, size_t N)\n Initializes device memory.\n\n    Sets the memory range of `N` 32-bit values to the specified value `ui`.\n    The `dstDevice` pointer must be four byte aligned.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    ui : unsigned int\n        Value to set\n    N : size_t\n        Number of elements\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_219cuMemsetD32 = {"cuMemsetD32", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_219cuMemsetD32, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_218cuMemsetD32};
static PyObject *__pyx_pw_4cuda_4cuda_219cuMemsetD32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  unsigned int __pyx_v_ui;
  size_t __pyx_v_N;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemsetD32 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_ui,&__pyx_n_s_N,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ui)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD32", 1, 3, 3, 1); __PYX_ERR(0, 17160, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_N)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD32", 1, 3, 3, 2); __PYX_ERR(0, 17160, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemsetD32") < 0)) __PYX_ERR(0, 17160, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_ui = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_ui == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 17160, __pyx_L3_error)
    __pyx_v_N = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_N == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17160, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemsetD32", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17160, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_218cuMemsetD32(__pyx_self, __pyx_v_dstDevice, __pyx_v_ui, __pyx_v_N);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_218cuMemsetD32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N) {
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__719)
  __Pyx_RefNannySetupContext("cuMemsetD32", 0);
  __Pyx_TraceCall("cuMemsetD32", __pyx_f[0], 17160, 0, __PYX_ERR(0, 17160, __pyx_L1_error));

  /* "cuda/cuda.pyx":17185
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17186
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17185
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17187
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17188
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17189
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17189, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17187
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17191
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17192
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemsetD32(cdstDevice, ui, N)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17192, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17194
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemsetD32(cdstDevice, ui, N)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemsetD32(__pyx_v_cdstDevice, __pyx_v_ui, __pyx_v_N); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17194, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17195
 * 
 *     err = ccuda.cuMemsetD32(cdstDevice, ui, N)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17160
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD32(dstDevice, unsigned int ui, size_t N):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17198
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D8(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_221cuMemsetD2D8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_220cuMemsetD2D8[] = "cuMemsetD2D8(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height)\n Initializes device memory.\n\n    Sets the 2D memory range of `Width` 8-bit values to the specified value\n    `uc`. `Height` specifies the number of rows to set, and `dstPitch`\n    specifies the number of bytes between each row. This function performs\n    fastest when the pitch is one that has been passed back by\n    :py:obj:`~.cuMemAllocPitch()`.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    dstPitch : size_t\n        Pitch of destination device pointer(Unused if `Height` is 1)\n    uc : unsigned char\n        Value to set\n    Width : size_t\n        Width of row\n    Height : size_t\n        Number of rows\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj"":`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset2D`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_221cuMemsetD2D8 = {"cuMemsetD2D8", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_221cuMemsetD2D8, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_220cuMemsetD2D8};
static PyObject *__pyx_pw_4cuda_4cuda_221cuMemsetD2D8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  size_t __pyx_v_dstPitch;
  unsigned char __pyx_v_uc;
  size_t __pyx_v_Width;
  size_t __pyx_v_Height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemsetD2D8 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_dstPitch_2,&__pyx_n_s_uc,&__pyx_n_s_Width_2,&__pyx_n_s_Height_2,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstPitch_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D8", 1, 5, 5, 1); __PYX_ERR(0, 17198, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D8", 1, 5, 5, 2); __PYX_ERR(0, 17198, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Width_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D8", 1, 5, 5, 3); __PYX_ERR(0, 17198, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Height_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D8", 1, 5, 5, 4); __PYX_ERR(0, 17198, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemsetD2D8") < 0)) __PYX_ERR(0, 17198, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_dstPitch = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_dstPitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17198, __pyx_L3_error)
    __pyx_v_uc = __Pyx_PyInt_As_unsigned_char(values[2]); if (unlikely((__pyx_v_uc == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 17198, __pyx_L3_error)
    __pyx_v_Width = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_Width == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17198, __pyx_L3_error)
    __pyx_v_Height = __Pyx_PyInt_As_size_t(values[4]); if (unlikely((__pyx_v_Height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17198, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemsetD2D8", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17198, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD2D8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_220cuMemsetD2D8(__pyx_self, __pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_uc, __pyx_v_Width, __pyx_v_Height);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_220cuMemsetD2D8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height) {
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__720)
  __Pyx_RefNannySetupContext("cuMemsetD2D8", 0);
  __Pyx_TraceCall("cuMemsetD2D8", __pyx_f[0], 17198, 0, __PYX_ERR(0, 17198, __pyx_L1_error));

  /* "cuda/cuda.pyx":17230
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17231
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17230
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17232
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17233
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17234
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17234, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17232
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17236
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17237
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemsetD2D8(cdstDevice, dstPitch, uc, Width, Height)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17237, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17239
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemsetD2D8(cdstDevice, dstPitch, uc, Width, Height)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemsetD2D8(__pyx_v_cdstDevice, __pyx_v_dstPitch, __pyx_v_uc, __pyx_v_Width, __pyx_v_Height); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17239, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17240
 * 
 *     err = ccuda.cuMemsetD2D8(cdstDevice, dstPitch, uc, Width, Height)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17198
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D8(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD2D8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17243
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D16(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_223cuMemsetD2D16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_222cuMemsetD2D16[] = "cuMemsetD2D16(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height)\n Initializes device memory.\n\n    Sets the 2D memory range of `Width` 16-bit values to the specified\n    value `us`. `Height` specifies the number of rows to set, and\n    `dstPitch` specifies the number of bytes between each row. The\n    `dstDevice` pointer and `dstPitch` offset must be two byte aligned.\n    This function performs fastest when the pitch is one that has been\n    passed back by :py:obj:`~.cuMemAllocPitch()`.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    dstPitch : size_t\n        Pitch of destination device pointer(Unused if `Height` is 1)\n    us : unsigned short\n        Value to set\n    Width : size_t\n        Width of row\n    Height : size_t\n        Number of rows\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAllo""c`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset2D`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_223cuMemsetD2D16 = {"cuMemsetD2D16", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_223cuMemsetD2D16, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_222cuMemsetD2D16};
static PyObject *__pyx_pw_4cuda_4cuda_223cuMemsetD2D16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  size_t __pyx_v_dstPitch;
  unsigned short __pyx_v_us;
  size_t __pyx_v_Width;
  size_t __pyx_v_Height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemsetD2D16 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_dstPitch_2,&__pyx_n_s_us,&__pyx_n_s_Width_2,&__pyx_n_s_Height_2,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstPitch_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D16", 1, 5, 5, 1); __PYX_ERR(0, 17243, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_us)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D16", 1, 5, 5, 2); __PYX_ERR(0, 17243, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Width_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D16", 1, 5, 5, 3); __PYX_ERR(0, 17243, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Height_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D16", 1, 5, 5, 4); __PYX_ERR(0, 17243, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemsetD2D16") < 0)) __PYX_ERR(0, 17243, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_dstPitch = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_dstPitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17243, __pyx_L3_error)
    __pyx_v_us = __Pyx_PyInt_As_unsigned_short(values[2]); if (unlikely((__pyx_v_us == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 17243, __pyx_L3_error)
    __pyx_v_Width = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_Width == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17243, __pyx_L3_error)
    __pyx_v_Height = __Pyx_PyInt_As_size_t(values[4]); if (unlikely((__pyx_v_Height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17243, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemsetD2D16", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17243, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD2D16", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_222cuMemsetD2D16(__pyx_self, __pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_us, __pyx_v_Width, __pyx_v_Height);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_222cuMemsetD2D16(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height) {
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__721)
  __Pyx_RefNannySetupContext("cuMemsetD2D16", 0);
  __Pyx_TraceCall("cuMemsetD2D16", __pyx_f[0], 17243, 0, __PYX_ERR(0, 17243, __pyx_L1_error));

  /* "cuda/cuda.pyx":17276
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17277
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17276
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17278
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17279
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17280
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17280, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17278
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17282
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17283
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemsetD2D16(cdstDevice, dstPitch, us, Width, Height)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17283, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17285
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemsetD2D16(cdstDevice, dstPitch, us, Width, Height)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemsetD2D16(__pyx_v_cdstDevice, __pyx_v_dstPitch, __pyx_v_us, __pyx_v_Width, __pyx_v_Height); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17285, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17286
 * 
 *     err = ccuda.cuMemsetD2D16(cdstDevice, dstPitch, us, Width, Height)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17243
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D16(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD2D16", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17289
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D32(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_225cuMemsetD2D32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_224cuMemsetD2D32[] = "cuMemsetD2D32(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height)\n Initializes device memory.\n\n    Sets the 2D memory range of `Width` 32-bit values to the specified\n    value `ui`. `Height` specifies the number of rows to set, and\n    `dstPitch` specifies the number of bytes between each row. The\n    `dstDevice` pointer and `dstPitch` offset must be four byte aligned.\n    This function performs fastest when the pitch is one that has been\n    passed back by :py:obj:`~.cuMemAllocPitch()`.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    dstPitch : size_t\n        Pitch of destination device pointer(Unused if `Height` is 1)\n    ui : unsigned int\n        Value to set\n    Width : size_t\n        Width of row\n    Height : size_t\n        Number of rows\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`,"" :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset2D`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_225cuMemsetD2D32 = {"cuMemsetD2D32", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_225cuMemsetD2D32, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_224cuMemsetD2D32};
static PyObject *__pyx_pw_4cuda_4cuda_225cuMemsetD2D32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  size_t __pyx_v_dstPitch;
  unsigned int __pyx_v_ui;
  size_t __pyx_v_Width;
  size_t __pyx_v_Height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemsetD2D32 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_dstPitch_2,&__pyx_n_s_ui,&__pyx_n_s_Width_2,&__pyx_n_s_Height_2,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstPitch_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D32", 1, 5, 5, 1); __PYX_ERR(0, 17289, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ui)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D32", 1, 5, 5, 2); __PYX_ERR(0, 17289, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Width_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D32", 1, 5, 5, 3); __PYX_ERR(0, 17289, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Height_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D32", 1, 5, 5, 4); __PYX_ERR(0, 17289, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemsetD2D32") < 0)) __PYX_ERR(0, 17289, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_dstPitch = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_dstPitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17289, __pyx_L3_error)
    __pyx_v_ui = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_ui == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 17289, __pyx_L3_error)
    __pyx_v_Width = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_Width == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17289, __pyx_L3_error)
    __pyx_v_Height = __Pyx_PyInt_As_size_t(values[4]); if (unlikely((__pyx_v_Height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17289, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemsetD2D32", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17289, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD2D32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_224cuMemsetD2D32(__pyx_self, __pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_ui, __pyx_v_Width, __pyx_v_Height);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_224cuMemsetD2D32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height) {
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__722)
  __Pyx_RefNannySetupContext("cuMemsetD2D32", 0);
  __Pyx_TraceCall("cuMemsetD2D32", __pyx_f[0], 17289, 0, __PYX_ERR(0, 17289, __pyx_L1_error));

  /* "cuda/cuda.pyx":17322
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17323
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17322
 *     """
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17324
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17325
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17326
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17326, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17324
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17328
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17329
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemsetD2D32(cdstDevice, dstPitch, ui, Width, Height)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17329, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17331
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemsetD2D32(cdstDevice, dstPitch, ui, Width, Height)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemsetD2D32(__pyx_v_cdstDevice, __pyx_v_dstPitch, __pyx_v_ui, __pyx_v_Width, __pyx_v_Height); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17331, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17332
 * 
 *     err = ccuda.cuMemsetD2D32(cdstDevice, dstPitch, ui, Width, Height)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17289
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D32(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD2D32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17335
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD8Async(dstDevice, unsigned char uc, size_t N, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_227cuMemsetD8Async(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_226cuMemsetD8Async[] = "cuMemsetD8Async(dstDevice, unsigned char uc, size_t N, hStream)\n Sets device memory.\n\n    Sets the memory range of `N` 8-bit values to the specified value `uc`.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    uc : unsigned char\n        Value to set\n    N : size_t\n        Number of elements\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemsetAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_227cuMemsetD8Async = {"cuMemsetD8Async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_227cuMemsetD8Async, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_226cuMemsetD8Async};
static PyObject *__pyx_pw_4cuda_4cuda_227cuMemsetD8Async(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  unsigned char __pyx_v_uc;
  size_t __pyx_v_N;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemsetD8Async (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_uc,&__pyx_n_s_N,&__pyx_n_s_hStream_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD8Async", 1, 4, 4, 1); __PYX_ERR(0, 17335, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_N)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD8Async", 1, 4, 4, 2); __PYX_ERR(0, 17335, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD8Async", 1, 4, 4, 3); __PYX_ERR(0, 17335, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemsetD8Async") < 0)) __PYX_ERR(0, 17335, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_uc = __Pyx_PyInt_As_unsigned_char(values[1]); if (unlikely((__pyx_v_uc == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 17335, __pyx_L3_error)
    __pyx_v_N = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_N == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17335, __pyx_L3_error)
    __pyx_v_hStream = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemsetD8Async", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17335, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD8Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_226cuMemsetD8Async(__pyx_self, __pyx_v_dstDevice, __pyx_v_uc, __pyx_v_N, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_226cuMemsetD8Async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__723)
  __Pyx_RefNannySetupContext("cuMemsetD8Async", 0);
  __Pyx_TraceCall("cuMemsetD8Async", __pyx_f[0], 17335, 0, __PYX_ERR(0, 17335, __pyx_L1_error));

  /* "cuda/cuda.pyx":17361
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17362
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17361
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17363
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17364
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17365
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17365, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17363
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17367
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17368
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17368, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17371
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17372
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17371
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17373
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17374
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17375
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17375, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17373
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17377
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17378
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemsetD8Async(cdstDevice, uc, N, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17378, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":17380
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemsetD8Async(cdstDevice, uc, N, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemsetD8Async(__pyx_v_cdstDevice, __pyx_v_uc, __pyx_v_N, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17380, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17381
 * 
 *     err = ccuda.cuMemsetD8Async(cdstDevice, uc, N, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17335
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD8Async(dstDevice, unsigned char uc, size_t N, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD8Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17384
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD16Async(dstDevice, unsigned short us, size_t N, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_229cuMemsetD16Async(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_228cuMemsetD16Async[] = "cuMemsetD16Async(dstDevice, unsigned short us, size_t N, hStream)\n Sets device memory.\n\n    Sets the memory range of `N` 16-bit values to the specified value `us`.\n    The `dstDevice` pointer must be two byte aligned.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    us : unsigned short\n        Value to set\n    N : size_t\n        Number of elements\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Asyn""c`, :py:obj:`~.cudaMemsetAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_229cuMemsetD16Async = {"cuMemsetD16Async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_229cuMemsetD16Async, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_228cuMemsetD16Async};
static PyObject *__pyx_pw_4cuda_4cuda_229cuMemsetD16Async(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  unsigned short __pyx_v_us;
  size_t __pyx_v_N;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemsetD16Async (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_us,&__pyx_n_s_N,&__pyx_n_s_hStream_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_us)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD16Async", 1, 4, 4, 1); __PYX_ERR(0, 17384, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_N)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD16Async", 1, 4, 4, 2); __PYX_ERR(0, 17384, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD16Async", 1, 4, 4, 3); __PYX_ERR(0, 17384, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemsetD16Async") < 0)) __PYX_ERR(0, 17384, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_us = __Pyx_PyInt_As_unsigned_short(values[1]); if (unlikely((__pyx_v_us == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 17384, __pyx_L3_error)
    __pyx_v_N = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_N == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17384, __pyx_L3_error)
    __pyx_v_hStream = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemsetD16Async", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17384, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD16Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_228cuMemsetD16Async(__pyx_self, __pyx_v_dstDevice, __pyx_v_us, __pyx_v_N, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_228cuMemsetD16Async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__724)
  __Pyx_RefNannySetupContext("cuMemsetD16Async", 0);
  __Pyx_TraceCall("cuMemsetD16Async", __pyx_f[0], 17384, 0, __PYX_ERR(0, 17384, __pyx_L1_error));

  /* "cuda/cuda.pyx":17411
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17412
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17411
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17413
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17414
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17415
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17415, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17413
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17417
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17418
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17418, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17421
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17422
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17421
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17423
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17424
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17425
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17425, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17423
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17427
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17428
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemsetD16Async(cdstDevice, us, N, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17428, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":17430
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemsetD16Async(cdstDevice, us, N, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemsetD16Async(__pyx_v_cdstDevice, __pyx_v_us, __pyx_v_N, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17430, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17431
 * 
 *     err = ccuda.cuMemsetD16Async(cdstDevice, us, N, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17384
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD16Async(dstDevice, unsigned short us, size_t N, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD16Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17434
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD32Async(dstDevice, unsigned int ui, size_t N, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_231cuMemsetD32Async(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_230cuMemsetD32Async[] = "cuMemsetD32Async(dstDevice, unsigned int ui, size_t N, hStream)\n Sets device memory.\n\n    Sets the memory range of `N` 32-bit values to the specified value `ui`.\n    The `dstDevice` pointer must be four byte aligned.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    ui : unsigned int\n        Value to set\n    N : size_t\n        Number of elements\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`,"" :py:obj:`~.cudaMemsetAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_231cuMemsetD32Async = {"cuMemsetD32Async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_231cuMemsetD32Async, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_230cuMemsetD32Async};
static PyObject *__pyx_pw_4cuda_4cuda_231cuMemsetD32Async(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  unsigned int __pyx_v_ui;
  size_t __pyx_v_N;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemsetD32Async (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_ui,&__pyx_n_s_N,&__pyx_n_s_hStream_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ui)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD32Async", 1, 4, 4, 1); __PYX_ERR(0, 17434, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_N)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD32Async", 1, 4, 4, 2); __PYX_ERR(0, 17434, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD32Async", 1, 4, 4, 3); __PYX_ERR(0, 17434, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemsetD32Async") < 0)) __PYX_ERR(0, 17434, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_ui = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_ui == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 17434, __pyx_L3_error)
    __pyx_v_N = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_N == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17434, __pyx_L3_error)
    __pyx_v_hStream = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemsetD32Async", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17434, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD32Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_230cuMemsetD32Async(__pyx_self, __pyx_v_dstDevice, __pyx_v_ui, __pyx_v_N, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_230cuMemsetD32Async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__725)
  __Pyx_RefNannySetupContext("cuMemsetD32Async", 0);
  __Pyx_TraceCall("cuMemsetD32Async", __pyx_f[0], 17434, 0, __PYX_ERR(0, 17434, __pyx_L1_error));

  /* "cuda/cuda.pyx":17461
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17462
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17461
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17463
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17464
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17465
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17465, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17463
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17467
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17468
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17468, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17471
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17472
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17471
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17473
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17474
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17475
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17475, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17473
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17477
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17478
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemsetD32Async(cdstDevice, ui, N, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17478, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":17480
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemsetD32Async(cdstDevice, ui, N, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemsetD32Async(__pyx_v_cdstDevice, __pyx_v_ui, __pyx_v_N, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17480, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17481
 * 
 *     err = ccuda.cuMemsetD32Async(cdstDevice, ui, N, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17434
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD32Async(dstDevice, unsigned int ui, size_t N, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD32Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17484
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D8Async(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_233cuMemsetD2D8Async(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_232cuMemsetD2D8Async[] = "cuMemsetD2D8Async(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, hStream)\n Sets device memory.\n\n    Sets the 2D memory range of `Width` 8-bit values to the specified value\n    `uc`. `Height` specifies the number of rows to set, and `dstPitch`\n    specifies the number of bytes between each row. This function performs\n    fastest when the pitch is one that has been passed back by\n    :py:obj:`~.cuMemAllocPitch()`.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    dstPitch : size_t\n        Pitch of destination device pointer(Unused if `Height` is 1)\n    uc : unsigned char\n        Value to set\n    Width : size_t\n        Width of row\n    Height : size_t\n        Number of rows\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj"":`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset2DAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_233cuMemsetD2D8Async = {"cuMemsetD2D8Async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_233cuMemsetD2D8Async, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_232cuMemsetD2D8Async};
static PyObject *__pyx_pw_4cuda_4cuda_233cuMemsetD2D8Async(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  size_t __pyx_v_dstPitch;
  unsigned char __pyx_v_uc;
  size_t __pyx_v_Width;
  size_t __pyx_v_Height;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemsetD2D8Async (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_dstPitch_2,&__pyx_n_s_uc,&__pyx_n_s_Width_2,&__pyx_n_s_Height_2,&__pyx_n_s_hStream_2,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstPitch_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D8Async", 1, 6, 6, 1); __PYX_ERR(0, 17484, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D8Async", 1, 6, 6, 2); __PYX_ERR(0, 17484, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Width_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D8Async", 1, 6, 6, 3); __PYX_ERR(0, 17484, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Height_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D8Async", 1, 6, 6, 4); __PYX_ERR(0, 17484, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D8Async", 1, 6, 6, 5); __PYX_ERR(0, 17484, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemsetD2D8Async") < 0)) __PYX_ERR(0, 17484, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_dstPitch = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_dstPitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17484, __pyx_L3_error)
    __pyx_v_uc = __Pyx_PyInt_As_unsigned_char(values[2]); if (unlikely((__pyx_v_uc == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 17484, __pyx_L3_error)
    __pyx_v_Width = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_Width == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17484, __pyx_L3_error)
    __pyx_v_Height = __Pyx_PyInt_As_size_t(values[4]); if (unlikely((__pyx_v_Height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17484, __pyx_L3_error)
    __pyx_v_hStream = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemsetD2D8Async", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17484, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD2D8Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_232cuMemsetD2D8Async(__pyx_self, __pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_uc, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_232cuMemsetD2D8Async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__726)
  __Pyx_RefNannySetupContext("cuMemsetD2D8Async", 0);
  __Pyx_TraceCall("cuMemsetD2D8Async", __pyx_f[0], 17484, 0, __PYX_ERR(0, 17484, __pyx_L1_error));

  /* "cuda/cuda.pyx":17518
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17519
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17518
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17520
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17521
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17522
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17522, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17520
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17524
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17525
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17525, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17528
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17529
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17528
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17530
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17531
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17532
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17532, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17530
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17534
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17535
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemsetD2D8Async(cdstDevice, dstPitch, uc, Width, Height, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17535, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":17537
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemsetD2D8Async(cdstDevice, dstPitch, uc, Width, Height, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemsetD2D8Async(__pyx_v_cdstDevice, __pyx_v_dstPitch, __pyx_v_uc, __pyx_v_Width, __pyx_v_Height, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17537, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17538
 * 
 *     err = ccuda.cuMemsetD2D8Async(cdstDevice, dstPitch, uc, Width, Height, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17484
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D8Async(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD2D8Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17541
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D16Async(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_235cuMemsetD2D16Async(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_234cuMemsetD2D16Async[] = "cuMemsetD2D16Async(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, hStream)\n Sets device memory.\n\n    Sets the 2D memory range of `Width` 16-bit values to the specified\n    value `us`. `Height` specifies the number of rows to set, and\n    `dstPitch` specifies the number of bytes between each row. The\n    `dstDevice` pointer and `dstPitch` offset must be two byte aligned.\n    This function performs fastest when the pitch is one that has been\n    passed back by :py:obj:`~.cuMemAllocPitch()`.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    dstPitch : size_t\n        Pitch of destination device pointer(Unused if `Height` is 1)\n    us : unsigned short\n        Value to set\n    Width : size_t\n        Width of row\n    Height : size_t\n        Number of rows\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cu""MemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset2DAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_235cuMemsetD2D16Async = {"cuMemsetD2D16Async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_235cuMemsetD2D16Async, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_234cuMemsetD2D16Async};
static PyObject *__pyx_pw_4cuda_4cuda_235cuMemsetD2D16Async(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  size_t __pyx_v_dstPitch;
  unsigned short __pyx_v_us;
  size_t __pyx_v_Width;
  size_t __pyx_v_Height;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemsetD2D16Async (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_dstPitch_2,&__pyx_n_s_us,&__pyx_n_s_Width_2,&__pyx_n_s_Height_2,&__pyx_n_s_hStream_2,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstPitch_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D16Async", 1, 6, 6, 1); __PYX_ERR(0, 17541, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_us)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D16Async", 1, 6, 6, 2); __PYX_ERR(0, 17541, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Width_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D16Async", 1, 6, 6, 3); __PYX_ERR(0, 17541, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Height_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D16Async", 1, 6, 6, 4); __PYX_ERR(0, 17541, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D16Async", 1, 6, 6, 5); __PYX_ERR(0, 17541, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemsetD2D16Async") < 0)) __PYX_ERR(0, 17541, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_dstPitch = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_dstPitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17541, __pyx_L3_error)
    __pyx_v_us = __Pyx_PyInt_As_unsigned_short(values[2]); if (unlikely((__pyx_v_us == (unsigned short)-1) && PyErr_Occurred())) __PYX_ERR(0, 17541, __pyx_L3_error)
    __pyx_v_Width = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_Width == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17541, __pyx_L3_error)
    __pyx_v_Height = __Pyx_PyInt_As_size_t(values[4]); if (unlikely((__pyx_v_Height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17541, __pyx_L3_error)
    __pyx_v_hStream = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemsetD2D16Async", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17541, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD2D16Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_234cuMemsetD2D16Async(__pyx_self, __pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_us, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_234cuMemsetD2D16Async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__727)
  __Pyx_RefNannySetupContext("cuMemsetD2D16Async", 0);
  __Pyx_TraceCall("cuMemsetD2D16Async", __pyx_f[0], 17541, 0, __PYX_ERR(0, 17541, __pyx_L1_error));

  /* "cuda/cuda.pyx":17576
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17577
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17576
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17578
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17579
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17580
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17580, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17578
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17582
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17583
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17583, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17586
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17587
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17586
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17588
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17589
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17590
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17590, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17588
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17592
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17593
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemsetD2D16Async(cdstDevice, dstPitch, us, Width, Height, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17593, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":17595
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemsetD2D16Async(cdstDevice, dstPitch, us, Width, Height, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemsetD2D16Async(__pyx_v_cdstDevice, __pyx_v_dstPitch, __pyx_v_us, __pyx_v_Width, __pyx_v_Height, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17595, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17596
 * 
 *     err = ccuda.cuMemsetD2D16Async(cdstDevice, dstPitch, us, Width, Height, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17541
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D16Async(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD2D16Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17599
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D32Async(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_237cuMemsetD2D32Async(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_236cuMemsetD2D32Async[] = "cuMemsetD2D32Async(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, hStream)\n Sets device memory.\n\n    Sets the 2D memory range of `Width` 32-bit values to the specified\n    value `ui`. `Height` specifies the number of rows to set, and\n    `dstPitch` specifies the number of bytes between each row. The\n    `dstDevice` pointer and `dstPitch` offset must be four byte aligned.\n    This function performs fastest when the pitch is one that has been\n    passed back by :py:obj:`~.cuMemAllocPitch()`.\n\n    Parameters\n    ----------\n    dstDevice : :py:obj:`~.CUdeviceptr`\n        Destination device pointer\n    dstPitch : size_t\n        Pitch of destination device pointer(Unused if `Height` is 1)\n    ui : unsigned int\n        Value to set\n    Width : size_t\n        Width of row\n    Height : size_t\n        Number of rows\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMem""FreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset2DAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_237cuMemsetD2D32Async = {"cuMemsetD2D32Async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_237cuMemsetD2D32Async, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_236cuMemsetD2D32Async};
static PyObject *__pyx_pw_4cuda_4cuda_237cuMemsetD2D32Async(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dstDevice = 0;
  size_t __pyx_v_dstPitch;
  unsigned int __pyx_v_ui;
  size_t __pyx_v_Width;
  size_t __pyx_v_Height;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemsetD2D32Async (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dstDevice_2,&__pyx_n_s_dstPitch_2,&__pyx_n_s_ui,&__pyx_n_s_Width_2,&__pyx_n_s_Height_2,&__pyx_n_s_hStream_2,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstPitch_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D32Async", 1, 6, 6, 1); __PYX_ERR(0, 17599, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ui)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D32Async", 1, 6, 6, 2); __PYX_ERR(0, 17599, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Width_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D32Async", 1, 6, 6, 3); __PYX_ERR(0, 17599, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Height_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D32Async", 1, 6, 6, 4); __PYX_ERR(0, 17599, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemsetD2D32Async", 1, 6, 6, 5); __PYX_ERR(0, 17599, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemsetD2D32Async") < 0)) __PYX_ERR(0, 17599, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_dstDevice = values[0];
    __pyx_v_dstPitch = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_dstPitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17599, __pyx_L3_error)
    __pyx_v_ui = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_ui == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 17599, __pyx_L3_error)
    __pyx_v_Width = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_Width == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17599, __pyx_L3_error)
    __pyx_v_Height = __Pyx_PyInt_As_size_t(values[4]); if (unlikely((__pyx_v_Height == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 17599, __pyx_L3_error)
    __pyx_v_hStream = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemsetD2D32Async", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17599, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD2D32Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_236cuMemsetD2D32Async(__pyx_self, __pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_ui, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_236cuMemsetD2D32Async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUdeviceptr __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__728)
  __Pyx_RefNannySetupContext("cuMemsetD2D32Async", 0);
  __Pyx_TraceCall("cuMemsetD2D32Async", __pyx_f[0], 17599, 0, __PYX_ERR(0, 17599, __pyx_L1_error));

  /* "cuda/cuda.pyx":17634
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17635
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17634
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17636
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17637
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17638
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17638, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17636
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17640
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17641
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17641, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17644
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17645
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17644
 * 
 *     cdef ccuda.CUdeviceptr cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17646
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17647
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17648
 *     elif isinstance(dstDevice, (CUdeviceptr)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17648, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17646
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dstDevice, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17650
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17651
 *     else:
 *         pdstDevice = int(CUdeviceptr(dstDevice))
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemsetD2D32Async(cdstDevice, dstPitch, ui, Width, Height, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17651, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":17653
 *         cdstDevice = <ccuda.CUdeviceptr><void_ptr>pdstDevice
 * 
 *     err = ccuda.cuMemsetD2D32Async(cdstDevice, dstPitch, ui, Width, Height, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemsetD2D32Async(__pyx_v_cdstDevice, __pyx_v_dstPitch, __pyx_v_ui, __pyx_v_Width, __pyx_v_Height, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17653, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17654
 * 
 *     err = ccuda.cuMemsetD2D32Async(cdstDevice, dstPitch, ui, Width, Height, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17599
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D32Async(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemsetD2D32Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17657
 * 
 * @cython.embedsignature(True)
 * def cuArrayCreate(pAllocateArray : CUDA_ARRAY_DESCRIPTOR):             # <<<<<<<<<<<<<<
 *     """ Creates a 1D or 2D CUDA array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_239cuArrayCreate(PyObject *__pyx_self, PyObject *__pyx_v_pAllocateArray); /*proto*/
static char __pyx_doc_4cuda_4cuda_238cuArrayCreate[] = "cuArrayCreate(CUDA_ARRAY_DESCRIPTOR pAllocateArray: CUDA_ARRAY_DESCRIPTOR)\n Creates a 1D or 2D CUDA array.\n\n    Creates a CUDA array according to the :py:obj:`~.CUDA_ARRAY_DESCRIPTOR`\n    structure `pAllocateArray` and returns a handle to the new CUDA array\n    in `*pHandle`. The :py:obj:`~.CUDA_ARRAY_DESCRIPTOR` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - `Width`, and `Height` are the width, and height of the CUDA array (in\n      elements); the CUDA array is one-dimensional if height is 0, two-\n      dimensional otherwise;\n\n    - :py:obj:`~.Format` specifies the format of the elements;\n      :py:obj:`~.CUarray_format` is defined as:\n\n    - **View CUDA Toolkit Documentation for a C++ code example**\n\n    - `NumChannels` specifies the number of packed components per CUDA\n      array element; it may be 1, 2, or 4;\n\n    Here are examples of CUDA array descriptions:\n\n    Description for a CUDA array of 2048 floats:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    Description for a 64 x 64 CUDA array of floats:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    Description for a `width` x `height` CUDA array of 64-bit, 4x16-bit\n    float16's:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    Description for a `width` x `height` CUDA array of 16-bit elements,\n    each of which is two 8-bit unsigned chars:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    Parameters\n    ----------\n    pAllocateArray : :py:obj:`~.CUDA_ARRAY_DESCRIPTOR`\n        Array descriptor\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    pHandle : :py:obj:`~.CUarray`\n        Re""turned array\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMallocArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_239cuArrayCreate = {"cuArrayCreate", (PyCFunction)__pyx_pw_4cuda_4cuda_239cuArrayCreate, METH_O, __pyx_doc_4cuda_4cuda_238cuArrayCreate};
static PyObject *__pyx_pw_4cuda_4cuda_239cuArrayCreate(PyObject *__pyx_self, PyObject *__pyx_v_pAllocateArray) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuArrayCreate (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pAllocateArray), __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR, 1, "pAllocateArray", 0))) __PYX_ERR(0, 17657, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_238cuArrayCreate(__pyx_self, ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR *)__pyx_v_pAllocateArray));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_238cuArrayCreate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR *__pyx_v_pAllocateArray) {
  struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_pHandle = 0;
  CUDA_ARRAY_DESCRIPTOR *__pyx_v_cpAllocateArray_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct CUDA_ARRAY_DESCRIPTOR_st *__pyx_t_2;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__729)
  __Pyx_RefNannySetupContext("cuArrayCreate", 0);
  __Pyx_TraceCall("cuArrayCreate", __pyx_f[0], 17657, 0, __PYX_ERR(0, 17657, __pyx_L1_error));

  /* "cuda/cuda.pyx":17716
 *     :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMallocArray`
 *     """
 *     cdef CUarray pHandle = CUarray()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_ARRAY_DESCRIPTOR* cpAllocateArray_ptr = pAllocateArray._ptr if pAllocateArray != None else NULL
 *     err = ccuda.cuArrayCreate(pHandle._ptr, cpAllocateArray_ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pHandle = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":17717
 *     """
 *     cdef CUarray pHandle = CUarray()
 *     cdef ccuda.CUDA_ARRAY_DESCRIPTOR* cpAllocateArray_ptr = pAllocateArray._ptr if pAllocateArray != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuArrayCreate(pHandle._ptr, cpAllocateArray_ptr)
 *     return (CUresult(err), pHandle)
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_pAllocateArray), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17717, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 17717, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_2 = __pyx_v_pAllocateArray->__pyx_base._ptr;
  } else {
    __pyx_t_2 = NULL;
  }
  __pyx_v_cpAllocateArray_ptr = __pyx_t_2;

  /* "cuda/cuda.pyx":17718
 *     cdef CUarray pHandle = CUarray()
 *     cdef ccuda.CUDA_ARRAY_DESCRIPTOR* cpAllocateArray_ptr = pAllocateArray._ptr if pAllocateArray != None else NULL
 *     err = ccuda.cuArrayCreate(pHandle._ptr, cpAllocateArray_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pHandle)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuArrayCreate(__pyx_v_pHandle->_ptr, __pyx_v_cpAllocateArray_ptr); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17718, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":17719
 *     cdef ccuda.CUDA_ARRAY_DESCRIPTOR* cpAllocateArray_ptr = pAllocateArray._ptr if pAllocateArray != None else NULL
 *     err = ccuda.cuArrayCreate(pHandle._ptr, cpAllocateArray_ptr)
 *     return (CUresult(err), pHandle)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 17719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pHandle));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pHandle));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_pHandle));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17657
 * 
 * @cython.embedsignature(True)
 * def cuArrayCreate(pAllocateArray : CUDA_ARRAY_DESCRIPTOR):             # <<<<<<<<<<<<<<
 *     """ Creates a 1D or 2D CUDA array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuArrayCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pHandle);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17722
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetDescriptor(hArray):             # <<<<<<<<<<<<<<
 *     """ Get a 1D or 2D CUDA array descriptor.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_241cuArrayGetDescriptor(PyObject *__pyx_self, PyObject *__pyx_v_hArray); /*proto*/
static char __pyx_doc_4cuda_4cuda_240cuArrayGetDescriptor[] = "cuArrayGetDescriptor(hArray)\n Get a 1D or 2D CUDA array descriptor.\n\n    Returns in `*pArrayDescriptor` a descriptor containing information on\n    the format and dimensions of the CUDA array `hArray`. It is useful for\n    subroutines that have been passed a CUDA array, but need to know the\n    CUDA array parameters for validation or other purposes.\n\n    Parameters\n    ----------\n    hArray : :py:obj:`~.CUarray`\n        Array to get descriptor of\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n    pArrayDescriptor : :py:obj:`~.CUDA_ARRAY_DESCRIPTOR`\n        Returned array descriptor\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaArrayGetInfo`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_241cuArrayGetDescriptor = {"cuArrayGetDescriptor", (PyCFunction)__pyx_pw_4cuda_4cuda_241cuArrayGetDescriptor, METH_O, __pyx_doc_4cuda_4cuda_240cuArrayGetDescriptor};
static PyObject *__pyx_pw_4cuda_4cuda_241cuArrayGetDescriptor(PyObject *__pyx_self, PyObject *__pyx_v_hArray) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuArrayGetDescriptor (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_240cuArrayGetDescriptor(__pyx_self, ((PyObject *)__pyx_v_hArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_240cuArrayGetDescriptor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hArray) {
  CUarray __pyx_v_chArray;
  PyObject *__pyx_v_phArray = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR *__pyx_v_pArrayDescriptor = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__730)
  __Pyx_RefNannySetupContext("cuArrayGetDescriptor", 0);
  __Pyx_TraceCall("cuArrayGetDescriptor", __pyx_f[0], 17722, 0, __PYX_ERR(0, 17722, __pyx_L1_error));

  /* "cuda/cuda.pyx":17747
 *     """
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_hArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17748
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)
 */
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17747
 *     """
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17749
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17750
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17751
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 *     else:
 *         phArray = int(CUarray(hArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17751, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17749
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17753
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 *     else:
 *         phArray = int(CUarray(hArray))             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17754
 *     else:
 *         phArray = int(CUarray(hArray))
 *         chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_ARRAY_DESCRIPTOR pArrayDescriptor = CUDA_ARRAY_DESCRIPTOR()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17754, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17756
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 * 
 *     cdef CUDA_ARRAY_DESCRIPTOR pArrayDescriptor = CUDA_ARRAY_DESCRIPTOR()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuArrayGetDescriptor(pArrayDescriptor._ptr, chArray)
 *     return (CUresult(err), pArrayDescriptor)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pArrayDescriptor = ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":17757
 * 
 *     cdef CUDA_ARRAY_DESCRIPTOR pArrayDescriptor = CUDA_ARRAY_DESCRIPTOR()
 *     err = ccuda.cuArrayGetDescriptor(pArrayDescriptor._ptr, chArray)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pArrayDescriptor)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuArrayGetDescriptor(__pyx_v_pArrayDescriptor->__pyx_base._ptr, __pyx_v_chArray); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17757, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17758
 *     cdef CUDA_ARRAY_DESCRIPTOR pArrayDescriptor = CUDA_ARRAY_DESCRIPTOR()
 *     err = ccuda.cuArrayGetDescriptor(pArrayDescriptor._ptr, chArray)
 *     return (CUresult(err), pArrayDescriptor)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pArrayDescriptor));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pArrayDescriptor));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pArrayDescriptor));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17722
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetDescriptor(hArray):             # <<<<<<<<<<<<<<
 *     """ Get a 1D or 2D CUDA array descriptor.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuArrayGetDescriptor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phArray);
  __Pyx_XDECREF((PyObject *)__pyx_v_pArrayDescriptor);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17761
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetSparseProperties(array):             # <<<<<<<<<<<<<<
 *     """ Returns the layout properties of a sparse CUDA array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_243cuArrayGetSparseProperties(PyObject *__pyx_self, PyObject *__pyx_v_array); /*proto*/
static char __pyx_doc_4cuda_4cuda_242cuArrayGetSparseProperties[] = "cuArrayGetSparseProperties(array)\n Returns the layout properties of a sparse CUDA array.\n\n    Returns the layout properties of a sparse CUDA array in\n    `sparseProperties` If the CUDA array is not allocated with flag\n    :py:obj:`~.CUDA_ARRAY3D_SPARSE` :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    will be returned.\n\n    If the returned value in :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.flags`\n    contains :py:obj:`~.CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL`, then\n    :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailSize` represents the\n    total size of the array. Otherwise, it will be zero. Also, the returned\n    value in :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailFirstLevel` is\n    always zero. Note that the `array` must have been allocated using\n    :py:obj:`~.cuArrayCreate` or :py:obj:`~.cuArray3DCreate`. For CUDA\n    arrays obtained using :py:obj:`~.cuMipmappedArrayGetLevel`,\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned. Instead,\n    :py:obj:`~.cuMipmappedArrayGetSparseProperties` must be used to obtain\n    the sparse properties of the entire CUDA mipmapped array to which\n    `array` belongs to.\n\n    Parameters\n    ----------\n    array : :py:obj:`~.CUarray`\n        CUDA array to get the sparse properties of\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    sparseProperties : :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES`\n        Pointer to :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES`\n\n    See Also\n    --------\n    :py:obj:`~.cuMipmappedArrayGetSparseProperties`, :py:obj:`~.cuMemMapArrayAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_243cuArrayGetSparseProperties = {"cuArrayGetSparseProperties", (PyCFunction)__pyx_pw_4cuda_4cuda_243cuArrayGetSparseProperties, METH_O, __pyx_doc_4cuda_4cuda_242cuArrayGetSparseProperties};
static PyObject *__pyx_pw_4cuda_4cuda_243cuArrayGetSparseProperties(PyObject *__pyx_self, PyObject *__pyx_v_array) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuArrayGetSparseProperties (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_242cuArrayGetSparseProperties(__pyx_self, ((PyObject *)__pyx_v_array));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_242cuArrayGetSparseProperties(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_array) {
  CUarray __pyx_v_carray;
  PyObject *__pyx_v_parray = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES *__pyx_v_sparseProperties = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__731)
  __Pyx_RefNannySetupContext("cuArrayGetSparseProperties", 0);
  __Pyx_TraceCall("cuArrayGetSparseProperties", __pyx_f[0], 17761, 0, __PYX_ERR(0, 17761, __pyx_L1_error));

  /* "cuda/cuda.pyx":17799
 *     """
 *     cdef ccuda.CUarray carray
 *     if array is None:             # <<<<<<<<<<<<<<
 *         carray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(array, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_array == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17800
 *     cdef ccuda.CUarray carray
 *     if array is None:
 *         carray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(array, (CUarray)):
 *         parray = int(array)
 */
    __pyx_v_carray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17799
 *     """
 *     cdef ccuda.CUarray carray
 *     if array is None:             # <<<<<<<<<<<<<<
 *         carray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(array, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17801
 *     if array is None:
 *         carray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(array, (CUarray)):             # <<<<<<<<<<<<<<
 *         parray = int(array)
 *         carray = <ccuda.CUarray><void_ptr>parray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_array, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17802
 *         carray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(array, (CUarray)):
 *         parray = int(array)             # <<<<<<<<<<<<<<
 *         carray = <ccuda.CUarray><void_ptr>parray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_parray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17803
 *     elif isinstance(array, (CUarray)):
 *         parray = int(array)
 *         carray = <ccuda.CUarray><void_ptr>parray             # <<<<<<<<<<<<<<
 *     else:
 *         parray = int(CUarray(array))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_parray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17803, __pyx_L1_error)
    __pyx_v_carray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17801
 *     if array is None:
 *         carray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(array, (CUarray)):             # <<<<<<<<<<<<<<
 *         parray = int(array)
 *         carray = <ccuda.CUarray><void_ptr>parray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17805
 *         carray = <ccuda.CUarray><void_ptr>parray
 *     else:
 *         parray = int(CUarray(array))             # <<<<<<<<<<<<<<
 *         carray = <ccuda.CUarray><void_ptr>parray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_parray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17806
 *     else:
 *         parray = int(CUarray(array))
 *         carray = <ccuda.CUarray><void_ptr>parray             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_ARRAY_SPARSE_PROPERTIES sparseProperties = CUDA_ARRAY_SPARSE_PROPERTIES()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_parray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17806, __pyx_L1_error)
    __pyx_v_carray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17808
 *         carray = <ccuda.CUarray><void_ptr>parray
 * 
 *     cdef CUDA_ARRAY_SPARSE_PROPERTIES sparseProperties = CUDA_ARRAY_SPARSE_PROPERTIES()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuArrayGetSparseProperties(sparseProperties._ptr, carray)
 *     return (CUresult(err), sparseProperties)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_sparseProperties = ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":17809
 * 
 *     cdef CUDA_ARRAY_SPARSE_PROPERTIES sparseProperties = CUDA_ARRAY_SPARSE_PROPERTIES()
 *     err = ccuda.cuArrayGetSparseProperties(sparseProperties._ptr, carray)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), sparseProperties)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuArrayGetSparseProperties(__pyx_v_sparseProperties->__pyx_base._ptr, __pyx_v_carray); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17809, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17810
 *     cdef CUDA_ARRAY_SPARSE_PROPERTIES sparseProperties = CUDA_ARRAY_SPARSE_PROPERTIES()
 *     err = ccuda.cuArrayGetSparseProperties(sparseProperties._ptr, carray)
 *     return (CUresult(err), sparseProperties)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_sparseProperties));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_sparseProperties));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_sparseProperties));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17761
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetSparseProperties(array):             # <<<<<<<<<<<<<<
 *     """ Returns the layout properties of a sparse CUDA array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parray);
  __Pyx_XDECREF((PyObject *)__pyx_v_sparseProperties);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17813
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayGetSparseProperties(mipmap):             # <<<<<<<<<<<<<<
 *     """ Returns the layout properties of a sparse CUDA mipmapped array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_245cuMipmappedArrayGetSparseProperties(PyObject *__pyx_self, PyObject *__pyx_v_mipmap); /*proto*/
static char __pyx_doc_4cuda_4cuda_244cuMipmappedArrayGetSparseProperties[] = "cuMipmappedArrayGetSparseProperties(mipmap)\n Returns the layout properties of a sparse CUDA mipmapped array.\n\n    Returns the sparse array layout properties in `sparseProperties` If the\n    CUDA mipmapped array is not allocated with flag\n    :py:obj:`~.CUDA_ARRAY3D_SPARSE` :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    will be returned.\n\n    For non-layered CUDA mipmapped arrays,\n    :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailSize` returns the size\n    of the mip tail region. The mip tail region includes all mip levels\n    whose width, height or depth is less than that of the tile. For layered\n    CUDA mipmapped arrays, if\n    :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.flags` contains\n    :py:obj:`~.CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL`, then\n    :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailSize` specifies the size\n    of the mip tail of all layers combined. Otherwise,\n    :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailSize` specifies mip tail\n    size per layer. The returned value of\n    :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailFirstLevel` is valid\n    only if :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailSize` is non-\n    zero.\n\n    Parameters\n    ----------\n    mipmap : :py:obj:`~.CUmipmappedArray`\n        CUDA mipmapped array to get the sparse properties of\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    sparseProperties : :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES`\n        Pointer to :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES`\n\n    See Also\n    --------\n    :py:obj:`~.cuArrayGetSparseProperties`, :py:obj:`~.cuMemMapArrayAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_245cuMipmappedArrayGetSparseProperties = {"cuMipmappedArrayGetSparseProperties", (PyCFunction)__pyx_pw_4cuda_4cuda_245cuMipmappedArrayGetSparseProperties, METH_O, __pyx_doc_4cuda_4cuda_244cuMipmappedArrayGetSparseProperties};
static PyObject *__pyx_pw_4cuda_4cuda_245cuMipmappedArrayGetSparseProperties(PyObject *__pyx_self, PyObject *__pyx_v_mipmap) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMipmappedArrayGetSparseProperties (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_244cuMipmappedArrayGetSparseProperties(__pyx_self, ((PyObject *)__pyx_v_mipmap));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_244cuMipmappedArrayGetSparseProperties(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mipmap) {
  CUmipmappedArray __pyx_v_cmipmap;
  PyObject *__pyx_v_pmipmap = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES *__pyx_v_sparseProperties = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__732)
  __Pyx_RefNannySetupContext("cuMipmappedArrayGetSparseProperties", 0);
  __Pyx_TraceCall("cuMipmappedArrayGetSparseProperties", __pyx_f[0], 17813, 0, __PYX_ERR(0, 17813, __pyx_L1_error));

  /* "cuda/cuda.pyx":17853
 *     """
 *     cdef ccuda.CUmipmappedArray cmipmap
 *     if mipmap is None:             # <<<<<<<<<<<<<<
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(mipmap, (CUmipmappedArray)):
 */
  __pyx_t_1 = (__pyx_v_mipmap == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17854
 *     cdef ccuda.CUmipmappedArray cmipmap
 *     if mipmap is None:
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(mipmap, (CUmipmappedArray)):
 *         pmipmap = int(mipmap)
 */
    __pyx_v_cmipmap = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17853
 *     """
 *     cdef ccuda.CUmipmappedArray cmipmap
 *     if mipmap is None:             # <<<<<<<<<<<<<<
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(mipmap, (CUmipmappedArray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17855
 *     if mipmap is None:
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(mipmap, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *         pmipmap = int(mipmap)
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_mipmap, __pyx_ptype_4cuda_4cuda_CUmipmappedArray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17856
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(mipmap, (CUmipmappedArray)):
 *         pmipmap = int(mipmap)             # <<<<<<<<<<<<<<
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_mipmap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pmipmap = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17857
 *     elif isinstance(mipmap, (CUmipmappedArray)):
 *         pmipmap = int(mipmap)
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap             # <<<<<<<<<<<<<<
 *     else:
 *         pmipmap = int(CUmipmappedArray(mipmap))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pmipmap); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17857, __pyx_L1_error)
    __pyx_v_cmipmap = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":17855
 *     if mipmap is None:
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(mipmap, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *         pmipmap = int(mipmap)
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17859
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 *     else:
 *         pmipmap = int(CUmipmappedArray(mipmap))             # <<<<<<<<<<<<<<
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray), __pyx_v_mipmap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pmipmap = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17860
 *     else:
 *         pmipmap = int(CUmipmappedArray(mipmap))
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_ARRAY_SPARSE_PROPERTIES sparseProperties = CUDA_ARRAY_SPARSE_PROPERTIES()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pmipmap); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17860, __pyx_L1_error)
    __pyx_v_cmipmap = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17862
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 * 
 *     cdef CUDA_ARRAY_SPARSE_PROPERTIES sparseProperties = CUDA_ARRAY_SPARSE_PROPERTIES()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMipmappedArrayGetSparseProperties(sparseProperties._ptr, cmipmap)
 *     return (CUresult(err), sparseProperties)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_sparseProperties = ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":17863
 * 
 *     cdef CUDA_ARRAY_SPARSE_PROPERTIES sparseProperties = CUDA_ARRAY_SPARSE_PROPERTIES()
 *     err = ccuda.cuMipmappedArrayGetSparseProperties(sparseProperties._ptr, cmipmap)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), sparseProperties)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMipmappedArrayGetSparseProperties(__pyx_v_sparseProperties->__pyx_base._ptr, __pyx_v_cmipmap); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17863, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":17864
 *     cdef CUDA_ARRAY_SPARSE_PROPERTIES sparseProperties = CUDA_ARRAY_SPARSE_PROPERTIES()
 *     err = ccuda.cuMipmappedArrayGetSparseProperties(sparseProperties._ptr, cmipmap)
 *     return (CUresult(err), sparseProperties)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 17864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_sparseProperties));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_sparseProperties));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_sparseProperties));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17813
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayGetSparseProperties(mipmap):             # <<<<<<<<<<<<<<
 *     """ Returns the layout properties of a sparse CUDA mipmapped array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMipmappedArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pmipmap);
  __Pyx_XDECREF((PyObject *)__pyx_v_sparseProperties);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17867
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetMemoryRequirements(array, device):             # <<<<<<<<<<<<<<
 *     """ Returns the memory requirements of a CUDA array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_247cuArrayGetMemoryRequirements(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_246cuArrayGetMemoryRequirements[] = "cuArrayGetMemoryRequirements(array, device)\n Returns the memory requirements of a CUDA array.\n\n    Returns the memory requirements of a CUDA array in `memoryRequirements`\n    If the CUDA array is not allocated with flag\n    :py:obj:`~.CUDA_ARRAY3D_DEFERRED_MAPPING`\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned.\n\n    The returned value in :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS.size`\n    represents the total size of the CUDA array. The returned value in\n    :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS.alignment` represents the\n    alignment necessary for mapping the CUDA array.\n\n    Parameters\n    ----------\n    array : :py:obj:`~.CUarray`\n        CUDA array to get the memory requirements of\n    device : :py:obj:`~.CUdevice`\n        Device to get the memory requirements for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    memoryRequirements : :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS`\n        Pointer to :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS`\n\n    See Also\n    --------\n    :py:obj:`~.cuMipmappedArrayGetMemoryRequirements`, :py:obj:`~.cuMemMapArrayAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_247cuArrayGetMemoryRequirements = {"cuArrayGetMemoryRequirements", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_247cuArrayGetMemoryRequirements, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_246cuArrayGetMemoryRequirements};
static PyObject *__pyx_pw_4cuda_4cuda_247cuArrayGetMemoryRequirements(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_array = 0;
  PyObject *__pyx_v_device = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuArrayGetMemoryRequirements (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_array_2,&__pyx_n_s_device,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_array_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_device)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuArrayGetMemoryRequirements", 1, 2, 2, 1); __PYX_ERR(0, 17867, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuArrayGetMemoryRequirements") < 0)) __PYX_ERR(0, 17867, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_array = values[0];
    __pyx_v_device = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuArrayGetMemoryRequirements", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17867, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_246cuArrayGetMemoryRequirements(__pyx_self, __pyx_v_array, __pyx_v_device);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_246cuArrayGetMemoryRequirements(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_array, PyObject *__pyx_v_device) {
  CUdevice __pyx_v_cdevice;
  PyObject *__pyx_v_pdevice = NULL;
  CUarray __pyx_v_carray;
  PyObject *__pyx_v_parray = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS *__pyx_v_memoryRequirements = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__733)
  __Pyx_RefNannySetupContext("cuArrayGetMemoryRequirements", 0);
  __Pyx_TraceCall("cuArrayGetMemoryRequirements", __pyx_f[0], 17867, 0, __PYX_ERR(0, 17867, __pyx_L1_error));

  /* "cuda/cuda.pyx":17899
 *     """
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_device == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17900
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 */
    __pyx_v_cdevice = ((CUdevice)0);

    /* "cuda/cuda.pyx":17899
 *     """
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17901
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_device, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17902
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17903
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdevice = int(CUdevice(device))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 17903, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":17901
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17905
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 *         pdevice = int(CUdevice(device))             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17906
 *     else:
 *         pdevice = int(CUdevice(device))
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUarray carray
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 17906, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17909
 * 
 *     cdef ccuda.CUarray carray
 *     if array is None:             # <<<<<<<<<<<<<<
 *         carray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(array, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_array == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17910
 *     cdef ccuda.CUarray carray
 *     if array is None:
 *         carray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(array, (CUarray)):
 *         parray = int(array)
 */
    __pyx_v_carray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17909
 * 
 *     cdef ccuda.CUarray carray
 *     if array is None:             # <<<<<<<<<<<<<<
 *         carray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(array, (CUarray)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17911
 *     if array is None:
 *         carray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(array, (CUarray)):             # <<<<<<<<<<<<<<
 *         parray = int(array)
 *         carray = <ccuda.CUarray><void_ptr>parray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_array, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17912
 *         carray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(array, (CUarray)):
 *         parray = int(array)             # <<<<<<<<<<<<<<
 *         carray = <ccuda.CUarray><void_ptr>parray
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_parray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17913
 *     elif isinstance(array, (CUarray)):
 *         parray = int(array)
 *         carray = <ccuda.CUarray><void_ptr>parray             # <<<<<<<<<<<<<<
 *     else:
 *         parray = int(CUarray(array))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_parray); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17913, __pyx_L1_error)
    __pyx_v_carray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":17911
 *     if array is None:
 *         carray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(array, (CUarray)):             # <<<<<<<<<<<<<<
 *         parray = int(array)
 *         carray = <ccuda.CUarray><void_ptr>parray
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17915
 *         carray = <ccuda.CUarray><void_ptr>parray
 *     else:
 *         parray = int(CUarray(array))             # <<<<<<<<<<<<<<
 *         carray = <ccuda.CUarray><void_ptr>parray
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_parray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17916
 *     else:
 *         parray = int(CUarray(array))
 *         carray = <ccuda.CUarray><void_ptr>parray             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_ARRAY_MEMORY_REQUIREMENTS memoryRequirements = CUDA_ARRAY_MEMORY_REQUIREMENTS()
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_parray); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17916, __pyx_L1_error)
    __pyx_v_carray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":17918
 *         carray = <ccuda.CUarray><void_ptr>parray
 * 
 *     cdef CUDA_ARRAY_MEMORY_REQUIREMENTS memoryRequirements = CUDA_ARRAY_MEMORY_REQUIREMENTS()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuArrayGetMemoryRequirements(memoryRequirements._ptr, carray, cdevice)
 *     return (CUresult(err), memoryRequirements)
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_memoryRequirements = ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17919
 * 
 *     cdef CUDA_ARRAY_MEMORY_REQUIREMENTS memoryRequirements = CUDA_ARRAY_MEMORY_REQUIREMENTS()
 *     err = ccuda.cuArrayGetMemoryRequirements(memoryRequirements._ptr, carray, cdevice)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), memoryRequirements)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuArrayGetMemoryRequirements(__pyx_v_memoryRequirements->__pyx_base._ptr, __pyx_v_carray, __pyx_v_cdevice); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17919, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":17920
 *     cdef CUDA_ARRAY_MEMORY_REQUIREMENTS memoryRequirements = CUDA_ARRAY_MEMORY_REQUIREMENTS()
 *     err = ccuda.cuArrayGetMemoryRequirements(memoryRequirements._ptr, carray, cdevice)
 *     return (CUresult(err), memoryRequirements)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 17920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_memoryRequirements));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_memoryRequirements));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_memoryRequirements));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17867
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetMemoryRequirements(array, device):             # <<<<<<<<<<<<<<
 *     """ Returns the memory requirements of a CUDA array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdevice);
  __Pyx_XDECREF(__pyx_v_parray);
  __Pyx_XDECREF((PyObject *)__pyx_v_memoryRequirements);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17923
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayGetMemoryRequirements(mipmap, device):             # <<<<<<<<<<<<<<
 *     """ Returns the memory requirements of a CUDA mipmapped array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_249cuMipmappedArrayGetMemoryRequirements(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_248cuMipmappedArrayGetMemoryRequirements[] = "cuMipmappedArrayGetMemoryRequirements(mipmap, device)\n Returns the memory requirements of a CUDA mipmapped array.\n\n    Returns the memory requirements of a CUDA mipmapped array in\n    `memoryRequirements` If the CUDA mipmapped array is not allocated with\n    flag :py:obj:`~.CUDA_ARRAY3D_DEFERRED_MAPPING`\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned.\n\n    The returned value in :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS.size`\n    represents the total size of the CUDA mipmapped array. The returned\n    value in :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS.alignment`\n    represents the alignment necessary for mapping the CUDA mipmapped\n    array.\n\n    Parameters\n    ----------\n    mipmap : :py:obj:`~.CUmipmappedArray`\n        CUDA mipmapped array to get the memory requirements of\n    device : :py:obj:`~.CUdevice`\n        Device to get the memory requirements for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    memoryRequirements : :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS`\n        Pointer to :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS`\n\n    See Also\n    --------\n    :py:obj:`~.cuArrayGetMemoryRequirements`, :py:obj:`~.cuMemMapArrayAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_249cuMipmappedArrayGetMemoryRequirements = {"cuMipmappedArrayGetMemoryRequirements", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_249cuMipmappedArrayGetMemoryRequirements, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_248cuMipmappedArrayGetMemoryRequirements};
static PyObject *__pyx_pw_4cuda_4cuda_249cuMipmappedArrayGetMemoryRequirements(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_mipmap = 0;
  PyObject *__pyx_v_device = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMipmappedArrayGetMemoryRequirements (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mipmap_2,&__pyx_n_s_device,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mipmap_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_device)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMipmappedArrayGetMemoryRequirements", 1, 2, 2, 1); __PYX_ERR(0, 17923, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMipmappedArrayGetMemoryRequirements") < 0)) __PYX_ERR(0, 17923, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_mipmap = values[0];
    __pyx_v_device = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMipmappedArrayGetMemoryRequirements", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17923, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMipmappedArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_248cuMipmappedArrayGetMemoryRequirements(__pyx_self, __pyx_v_mipmap, __pyx_v_device);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_248cuMipmappedArrayGetMemoryRequirements(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mipmap, PyObject *__pyx_v_device) {
  CUdevice __pyx_v_cdevice;
  PyObject *__pyx_v_pdevice = NULL;
  CUmipmappedArray __pyx_v_cmipmap;
  PyObject *__pyx_v_pmipmap = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS *__pyx_v_memoryRequirements = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__734)
  __Pyx_RefNannySetupContext("cuMipmappedArrayGetMemoryRequirements", 0);
  __Pyx_TraceCall("cuMipmappedArrayGetMemoryRequirements", __pyx_f[0], 17923, 0, __PYX_ERR(0, 17923, __pyx_L1_error));

  /* "cuda/cuda.pyx":17956
 *     """
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_device == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17957
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 */
    __pyx_v_cdevice = ((CUdevice)0);

    /* "cuda/cuda.pyx":17956
 *     """
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17958
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_device, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17959
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17960
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdevice = int(CUdevice(device))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 17960, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":17958
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":17962
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 *         pdevice = int(CUdevice(device))             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17963
 *     else:
 *         pdevice = int(CUdevice(device))
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUmipmappedArray cmipmap
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 17963, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":17966
 * 
 *     cdef ccuda.CUmipmappedArray cmipmap
 *     if mipmap is None:             # <<<<<<<<<<<<<<
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(mipmap, (CUmipmappedArray)):
 */
  __pyx_t_1 = (__pyx_v_mipmap == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":17967
 *     cdef ccuda.CUmipmappedArray cmipmap
 *     if mipmap is None:
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(mipmap, (CUmipmappedArray)):
 *         pmipmap = int(mipmap)
 */
    __pyx_v_cmipmap = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":17966
 * 
 *     cdef ccuda.CUmipmappedArray cmipmap
 *     if mipmap is None:             # <<<<<<<<<<<<<<
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(mipmap, (CUmipmappedArray)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17968
 *     if mipmap is None:
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(mipmap, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *         pmipmap = int(mipmap)
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_mipmap, __pyx_ptype_4cuda_4cuda_CUmipmappedArray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":17969
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(mipmap, (CUmipmappedArray)):
 *         pmipmap = int(mipmap)             # <<<<<<<<<<<<<<
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_mipmap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17969, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pmipmap = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":17970
 *     elif isinstance(mipmap, (CUmipmappedArray)):
 *         pmipmap = int(mipmap)
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap             # <<<<<<<<<<<<<<
 *     else:
 *         pmipmap = int(CUmipmappedArray(mipmap))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pmipmap); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17970, __pyx_L1_error)
    __pyx_v_cmipmap = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":17968
 *     if mipmap is None:
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(mipmap, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *         pmipmap = int(mipmap)
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":17972
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 *     else:
 *         pmipmap = int(CUmipmappedArray(mipmap))             # <<<<<<<<<<<<<<
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray), __pyx_v_mipmap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pmipmap = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":17973
 *     else:
 *         pmipmap = int(CUmipmappedArray(mipmap))
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_ARRAY_MEMORY_REQUIREMENTS memoryRequirements = CUDA_ARRAY_MEMORY_REQUIREMENTS()
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pmipmap); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 17973, __pyx_L1_error)
    __pyx_v_cmipmap = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":17975
 *         cmipmap = <ccuda.CUmipmappedArray><void_ptr>pmipmap
 * 
 *     cdef CUDA_ARRAY_MEMORY_REQUIREMENTS memoryRequirements = CUDA_ARRAY_MEMORY_REQUIREMENTS()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMipmappedArrayGetMemoryRequirements(memoryRequirements._ptr, cmipmap, cdevice)
 *     return (CUresult(err), memoryRequirements)
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_memoryRequirements = ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17976
 * 
 *     cdef CUDA_ARRAY_MEMORY_REQUIREMENTS memoryRequirements = CUDA_ARRAY_MEMORY_REQUIREMENTS()
 *     err = ccuda.cuMipmappedArrayGetMemoryRequirements(memoryRequirements._ptr, cmipmap, cdevice)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), memoryRequirements)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuMipmappedArrayGetMemoryRequirements(__pyx_v_memoryRequirements->__pyx_base._ptr, __pyx_v_cmipmap, __pyx_v_cdevice); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 17976, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":17977
 *     cdef CUDA_ARRAY_MEMORY_REQUIREMENTS memoryRequirements = CUDA_ARRAY_MEMORY_REQUIREMENTS()
 *     err = ccuda.cuMipmappedArrayGetMemoryRequirements(memoryRequirements._ptr, cmipmap, cdevice)
 *     return (CUresult(err), memoryRequirements)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 17977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_memoryRequirements));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_memoryRequirements));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_memoryRequirements));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17923
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayGetMemoryRequirements(mipmap, device):             # <<<<<<<<<<<<<<
 *     """ Returns the memory requirements of a CUDA mipmapped array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMipmappedArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdevice);
  __Pyx_XDECREF(__pyx_v_pmipmap);
  __Pyx_XDECREF((PyObject *)__pyx_v_memoryRequirements);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":17980
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetPlane(hArray, unsigned int planeIdx):             # <<<<<<<<<<<<<<
 *     """ Gets a CUDA array plane from a CUDA array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_251cuArrayGetPlane(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_250cuArrayGetPlane[] = "cuArrayGetPlane(hArray, unsigned int planeIdx)\n Gets a CUDA array plane from a CUDA array.\n\n    Returns in `pPlaneArray` a CUDA array that represents a single format\n    plane of the CUDA array `hArray`.\n\n    If `planeIdx` is greater than the maximum number of planes in this\n    array or if the array does not have a multi-planar format e.g:\n    :py:obj:`~.CU_AD_FORMAT_NV12`, then\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned.\n\n    Note that if the `hArray` has format :py:obj:`~.CU_AD_FORMAT_NV12`,\n    then passing in 0 for `planeIdx` returns a CUDA array of the same size\n    as `hArray` but with one channel and\n    :py:obj:`~.CU_AD_FORMAT_UNSIGNED_INT8` as its format. If 1 is passed\n    for `planeIdx`, then the returned CUDA array has half the height and\n    width of `hArray` with two channels and\n    :py:obj:`~.CU_AD_FORMAT_UNSIGNED_INT8` as its format.\n\n    Parameters\n    ----------\n    hArray : :py:obj:`~.CUarray`\n        Multiplanar CUDA array\n    planeIdx : unsigned int\n        Plane index\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n    pPlaneArray : :py:obj:`~.CUarray`\n        Returned CUDA array referenced by the `planeIdx`\n\n    See Also\n    --------\n    :py:obj:`~.cuArrayCreate`, :py:obj:`~.cudaGetArrayPlane`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_251cuArrayGetPlane = {"cuArrayGetPlane", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_251cuArrayGetPlane, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_250cuArrayGetPlane};
static PyObject *__pyx_pw_4cuda_4cuda_251cuArrayGetPlane(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hArray = 0;
  unsigned int __pyx_v_planeIdx;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuArrayGetPlane (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hArray_2,&__pyx_n_s_planeIdx,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hArray_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_planeIdx)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuArrayGetPlane", 1, 2, 2, 1); __PYX_ERR(0, 17980, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuArrayGetPlane") < 0)) __PYX_ERR(0, 17980, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hArray = values[0];
    __pyx_v_planeIdx = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_planeIdx == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 17980, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuArrayGetPlane", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 17980, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuArrayGetPlane", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_250cuArrayGetPlane(__pyx_self, __pyx_v_hArray, __pyx_v_planeIdx);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_250cuArrayGetPlane(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hArray, unsigned int __pyx_v_planeIdx) {
  CUarray __pyx_v_chArray;
  PyObject *__pyx_v_phArray = NULL;
  struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_pPlaneArray = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__735)
  __Pyx_RefNannySetupContext("cuArrayGetPlane", 0);
  __Pyx_TraceCall("cuArrayGetPlane", __pyx_f[0], 17980, 0, __PYX_ERR(0, 17980, __pyx_L1_error));

  /* "cuda/cuda.pyx":18018
 *     """
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_hArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18019
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)
 */
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18018
 *     """
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18020
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18021
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18022
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 *     else:
 *         phArray = int(CUarray(hArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18022, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18020
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18024
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 *     else:
 *         phArray = int(CUarray(hArray))             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18025
 *     else:
 *         phArray = int(CUarray(hArray))
 *         chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 * 
 *     cdef CUarray pPlaneArray = CUarray()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18025, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":18027
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 * 
 *     cdef CUarray pPlaneArray = CUarray()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuArrayGetPlane(pPlaneArray._ptr, chArray, planeIdx)
 *     return (CUresult(err), pPlaneArray)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pPlaneArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":18028
 * 
 *     cdef CUarray pPlaneArray = CUarray()
 *     err = ccuda.cuArrayGetPlane(pPlaneArray._ptr, chArray, planeIdx)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pPlaneArray)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuArrayGetPlane(__pyx_v_pPlaneArray->_ptr, __pyx_v_chArray, __pyx_v_planeIdx); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18028, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":18029
 *     cdef CUarray pPlaneArray = CUarray()
 *     err = ccuda.cuArrayGetPlane(pPlaneArray._ptr, chArray, planeIdx)
 *     return (CUresult(err), pPlaneArray)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pPlaneArray));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pPlaneArray));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pPlaneArray));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":17980
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetPlane(hArray, unsigned int planeIdx):             # <<<<<<<<<<<<<<
 *     """ Gets a CUDA array plane from a CUDA array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuArrayGetPlane", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phArray);
  __Pyx_XDECREF((PyObject *)__pyx_v_pPlaneArray);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18032
 * 
 * @cython.embedsignature(True)
 * def cuArrayDestroy(hArray):             # <<<<<<<<<<<<<<
 *     """ Destroys a CUDA array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_253cuArrayDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hArray); /*proto*/
static char __pyx_doc_4cuda_4cuda_252cuArrayDestroy[] = "cuArrayDestroy(hArray)\n Destroys a CUDA array.\n\n    Destroys the CUDA array `hArray`.\n\n    Parameters\n    ----------\n    hArray : :py:obj:`~.CUarray`\n        Array to destroy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ARRAY_IS_MAPPED`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED`\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaFreeArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_253cuArrayDestroy = {"cuArrayDestroy", (PyCFunction)__pyx_pw_4cuda_4cuda_253cuArrayDestroy, METH_O, __pyx_doc_4cuda_4cuda_252cuArrayDestroy};
static PyObject *__pyx_pw_4cuda_4cuda_253cuArrayDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hArray) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuArrayDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_252cuArrayDestroy(__pyx_self, ((PyObject *)__pyx_v_hArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_252cuArrayDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hArray) {
  CUarray __pyx_v_chArray;
  PyObject *__pyx_v_phArray = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__736)
  __Pyx_RefNannySetupContext("cuArrayDestroy", 0);
  __Pyx_TraceCall("cuArrayDestroy", __pyx_f[0], 18032, 0, __PYX_ERR(0, 18032, __pyx_L1_error));

  /* "cuda/cuda.pyx":18052
 *     """
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_hArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18053
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)
 */
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18052
 *     """
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18054
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18055
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18056
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 *     else:
 *         phArray = int(CUarray(hArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18056, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18054
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18058
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 *     else:
 *         phArray = int(CUarray(hArray))             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18059
 *     else:
 *         phArray = int(CUarray(hArray))
 *         chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuArrayDestroy(chArray)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18059, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":18061
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 * 
 *     err = ccuda.cuArrayDestroy(chArray)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuArrayDestroy(__pyx_v_chArray); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18061, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":18062
 * 
 *     err = ccuda.cuArrayDestroy(chArray)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18032
 * 
 * @cython.embedsignature(True)
 * def cuArrayDestroy(hArray):             # <<<<<<<<<<<<<<
 *     """ Destroys a CUDA array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuArrayDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phArray);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18065
 * 
 * @cython.embedsignature(True)
 * def cuArray3DCreate(pAllocateArray : CUDA_ARRAY3D_DESCRIPTOR):             # <<<<<<<<<<<<<<
 *     """ Creates a 3D CUDA array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_255cuArray3DCreate(PyObject *__pyx_self, PyObject *__pyx_v_pAllocateArray); /*proto*/
static char __pyx_doc_4cuda_4cuda_254cuArray3DCreate[] = "cuArray3DCreate(CUDA_ARRAY3D_DESCRIPTOR pAllocateArray: CUDA_ARRAY3D_DESCRIPTOR)\n Creates a 3D CUDA array.\n\n    Creates a CUDA array according to the\n    :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR` structure `pAllocateArray` and\n    returns a handle to the new CUDA array in `*pHandle`. The\n    :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - `Width`, `Height`, and `Depth` are the width, height, and depth of\n      the CUDA array (in elements); the following types of CUDA arrays can\n      be allocated:\n\n      - A 1D array is allocated if `Height` and `Depth` extents are both\n        zero.\n\n      - A 2D array is allocated if only `Depth` extent is zero.\n\n      - A 3D array is allocated if all three extents are non-zero.\n\n      - A 1D layered CUDA array is allocated if only `Height` is zero and\n        the :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag is set. Each layer is a\n        1D array. The number of layers is determined by the depth extent.\n\n      - A 2D layered CUDA array is allocated if all three extents are non-\n        zero and the :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag is set. Each\n        layer is a 2D array. The number of layers is determined by the\n        depth extent.\n\n      - A cubemap CUDA array is allocated if all three extents are non-zero\n        and the :py:obj:`~.CUDA_ARRAY3D_CUBEMAP` flag is set. `Width` must\n        be equal to `Height`, and `Depth` must be six. A cubemap is a\n        special type of 2D layered CUDA array, where the six layers\n        represent the six faces of a cube. The order of the six layers in\n        memory is the same as that listed in\n        :py:obj:`~.CUarray_cubemap_face`.\n\n      - A cubemap layered CUDA array is allocated if all three extents are\n        non-zero, and both, :py:obj:`~.CUDA_ARRAY3D_CUBEMAP` and\n        :py:obj:`~.CUDA_ARRAY3D_LAYERED` flags are set. `Width` must be\n        equal to `Height`"", and `Depth` must be a multiple of six. A cubemap\n        layered CUDA array is a special type of 2D layered CUDA array that\n        consists of a collection of cubemaps. The first six layers\n        represent the first cubemap, the next six layers form the second\n        cubemap, and so on.\n\n    - :py:obj:`~.Format` specifies the format of the elements;\n      :py:obj:`~.CUarray_format` is defined as:\n\n    - **View CUDA Toolkit Documentation for a C++ code example**\n\n    - `NumChannels` specifies the number of packed components per CUDA\n      array element; it may be 1, 2, or 4;\n\n    - :py:obj:`~.Flags` may be set to\n\n      - :py:obj:`~.CUDA_ARRAY3D_LAYERED` to enable creation of layered CUDA\n        arrays. If this flag is set, `Depth` specifies the number of\n        layers, not the depth of a 3D array.\n\n      - :py:obj:`~.CUDA_ARRAY3D_SURFACE_LDST` to enable surface references\n        to be bound to the CUDA array. If this flag is not set,\n        :py:obj:`~.cuSurfRefSetArray` will fail when attempting to bind the\n        CUDA array to a surface reference.\n\n      - :py:obj:`~.CUDA_ARRAY3D_CUBEMAP` to enable creation of cubemaps. If\n        this flag is set, `Width` must be equal to `Height`, and `Depth`\n        must be six. If the :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag is also\n        set, then `Depth` must be a multiple of six.\n\n      - :py:obj:`~.CUDA_ARRAY3D_TEXTURE_GATHER` to indicate that the CUDA\n        array will be used for texture gather. Texture gather can only be\n        performed on 2D CUDA arrays.\n\n    `Width`, `Height` and `Depth` must meet certain size requirements as\n    listed in the following table. All values are specified in elements.\n    Note that for brevity's sake, the full name of the device attribute is\n    not specified. For ex., TEXTURE1D_WIDTH refers to the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH`.\n\n    Note that 2D CUDA arrays have different size requirements ""if the\n    :py:obj:`~.CUDA_ARRAY3D_TEXTURE_GATHER` flag is set. `Width` and\n    `Height` must not be greater than\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH` and\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT`\n    respectively, in that case.\n\n    **View CUDA Toolkit Documentation for a table example**\n\n    Here are examples of CUDA array descriptions:\n\n    Description for a CUDA array of 2048 floats:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    Description for a 64 x 64 CUDA array of floats:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    Description for a `width` x `height` x `depth` CUDA array of 64-bit,\n    4x16-bit float16's:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    Parameters\n    ----------\n    pAllocateArray : :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR`\n        3D array descriptor\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    pHandle : :py:obj:`~.CUarray`\n        Returned array\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyH""toD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMalloc3DArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_255cuArray3DCreate = {"cuArray3DCreate", (PyCFunction)__pyx_pw_4cuda_4cuda_255cuArray3DCreate, METH_O, __pyx_doc_4cuda_4cuda_254cuArray3DCreate};
static PyObject *__pyx_pw_4cuda_4cuda_255cuArray3DCreate(PyObject *__pyx_self, PyObject *__pyx_v_pAllocateArray) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuArray3DCreate (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pAllocateArray), __pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR, 1, "pAllocateArray", 0))) __PYX_ERR(0, 18065, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_254cuArray3DCreate(__pyx_self, ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *)__pyx_v_pAllocateArray));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_254cuArray3DCreate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_pAllocateArray) {
  struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_pHandle = 0;
  CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_cpAllocateArray_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_t_2;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__737)
  __Pyx_RefNannySetupContext("cuArray3DCreate", 0);
  __Pyx_TraceCall("cuArray3DCreate", __pyx_f[0], 18065, 0, __PYX_ERR(0, 18065, __pyx_L1_error));

  /* "cuda/cuda.pyx":18188
 *     :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMalloc3DArray`
 *     """
 *     cdef CUarray pHandle = CUarray()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR* cpAllocateArray_ptr = pAllocateArray._ptr if pAllocateArray != None else NULL
 *     err = ccuda.cuArray3DCreate(pHandle._ptr, cpAllocateArray_ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pHandle = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":18189
 *     """
 *     cdef CUarray pHandle = CUarray()
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR* cpAllocateArray_ptr = pAllocateArray._ptr if pAllocateArray != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuArray3DCreate(pHandle._ptr, cpAllocateArray_ptr)
 *     return (CUresult(err), pHandle)
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_pAllocateArray), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18189, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 18189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_2 = __pyx_v_pAllocateArray->__pyx_base._ptr;
  } else {
    __pyx_t_2 = NULL;
  }
  __pyx_v_cpAllocateArray_ptr = __pyx_t_2;

  /* "cuda/cuda.pyx":18190
 *     cdef CUarray pHandle = CUarray()
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR* cpAllocateArray_ptr = pAllocateArray._ptr if pAllocateArray != None else NULL
 *     err = ccuda.cuArray3DCreate(pHandle._ptr, cpAllocateArray_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pHandle)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuArray3DCreate(__pyx_v_pHandle->_ptr, __pyx_v_cpAllocateArray_ptr); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18190, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":18191
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR* cpAllocateArray_ptr = pAllocateArray._ptr if pAllocateArray != None else NULL
 *     err = ccuda.cuArray3DCreate(pHandle._ptr, cpAllocateArray_ptr)
 *     return (CUresult(err), pHandle)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 18191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pHandle));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pHandle));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_pHandle));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18065
 * 
 * @cython.embedsignature(True)
 * def cuArray3DCreate(pAllocateArray : CUDA_ARRAY3D_DESCRIPTOR):             # <<<<<<<<<<<<<<
 *     """ Creates a 3D CUDA array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuArray3DCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pHandle);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18194
 * 
 * @cython.embedsignature(True)
 * def cuArray3DGetDescriptor(hArray):             # <<<<<<<<<<<<<<
 *     """ Get a 3D CUDA array descriptor.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_257cuArray3DGetDescriptor(PyObject *__pyx_self, PyObject *__pyx_v_hArray); /*proto*/
static char __pyx_doc_4cuda_4cuda_256cuArray3DGetDescriptor[] = "cuArray3DGetDescriptor(hArray)\n Get a 3D CUDA array descriptor.\n\n    Returns in `*pArrayDescriptor` a descriptor containing information on\n    the format and dimensions of the CUDA array `hArray`. It is useful for\n    subroutines that have been passed a CUDA array, but need to know the\n    CUDA array parameters for validation or other purposes.\n\n    This function may be called on 1D and 2D arrays, in which case the\n    `Height` and/or `Depth` members of the descriptor struct will be set to\n    0.\n\n    Parameters\n    ----------\n    hArray : :py:obj:`~.CUarray`\n        3D array to get descriptor of\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED`\n    pArrayDescriptor : :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR`\n        Returned 3D array descriptor\n\n    See Also\n    --------\n    :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :""py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaArrayGetInfo`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_257cuArray3DGetDescriptor = {"cuArray3DGetDescriptor", (PyCFunction)__pyx_pw_4cuda_4cuda_257cuArray3DGetDescriptor, METH_O, __pyx_doc_4cuda_4cuda_256cuArray3DGetDescriptor};
static PyObject *__pyx_pw_4cuda_4cuda_257cuArray3DGetDescriptor(PyObject *__pyx_self, PyObject *__pyx_v_hArray) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuArray3DGetDescriptor (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_256cuArray3DGetDescriptor(__pyx_self, ((PyObject *)__pyx_v_hArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_256cuArray3DGetDescriptor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hArray) {
  CUarray __pyx_v_chArray;
  PyObject *__pyx_v_phArray = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_pArrayDescriptor = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__738)
  __Pyx_RefNannySetupContext("cuArray3DGetDescriptor", 0);
  __Pyx_TraceCall("cuArray3DGetDescriptor", __pyx_f[0], 18194, 0, __PYX_ERR(0, 18194, __pyx_L1_error));

  /* "cuda/cuda.pyx":18223
 *     """
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_hArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18224
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)
 */
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18223
 *     """
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18225
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18226
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18227
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 *     else:
 *         phArray = int(CUarray(hArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18227, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18225
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18229
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 *     else:
 *         phArray = int(CUarray(hArray))             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18230
 *     else:
 *         phArray = int(CUarray(hArray))
 *         chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_ARRAY3D_DESCRIPTOR pArrayDescriptor = CUDA_ARRAY3D_DESCRIPTOR()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18230, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":18232
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 * 
 *     cdef CUDA_ARRAY3D_DESCRIPTOR pArrayDescriptor = CUDA_ARRAY3D_DESCRIPTOR()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuArray3DGetDescriptor(pArrayDescriptor._ptr, chArray)
 *     return (CUresult(err), pArrayDescriptor)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pArrayDescriptor = ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":18233
 * 
 *     cdef CUDA_ARRAY3D_DESCRIPTOR pArrayDescriptor = CUDA_ARRAY3D_DESCRIPTOR()
 *     err = ccuda.cuArray3DGetDescriptor(pArrayDescriptor._ptr, chArray)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pArrayDescriptor)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuArray3DGetDescriptor(__pyx_v_pArrayDescriptor->__pyx_base._ptr, __pyx_v_chArray); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18233, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":18234
 *     cdef CUDA_ARRAY3D_DESCRIPTOR pArrayDescriptor = CUDA_ARRAY3D_DESCRIPTOR()
 *     err = ccuda.cuArray3DGetDescriptor(pArrayDescriptor._ptr, chArray)
 *     return (CUresult(err), pArrayDescriptor)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pArrayDescriptor));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pArrayDescriptor));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pArrayDescriptor));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18194
 * 
 * @cython.embedsignature(True)
 * def cuArray3DGetDescriptor(hArray):             # <<<<<<<<<<<<<<
 *     """ Get a 3D CUDA array descriptor.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuArray3DGetDescriptor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phArray);
  __Pyx_XDECREF((PyObject *)__pyx_v_pArrayDescriptor);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18237
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayCreate(pMipmappedArrayDesc : CUDA_ARRAY3D_DESCRIPTOR, unsigned int numMipmapLevels):             # <<<<<<<<<<<<<<
 *     """ Creates a CUDA mipmapped array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_259cuMipmappedArrayCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_258cuMipmappedArrayCreate[] = "cuMipmappedArrayCreate(CUDA_ARRAY3D_DESCRIPTOR pMipmappedArrayDesc: CUDA_ARRAY3D_DESCRIPTOR, unsigned int numMipmapLevels)\n Creates a CUDA mipmapped array.\n\n    Creates a CUDA mipmapped array according to the\n    :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR` structure `pMipmappedArrayDesc` and\n    returns a handle to the new CUDA mipmapped array in `*pHandle`.\n    `numMipmapLevels` specifies the number of mipmap levels to be\n    allocated. This value is clamped to the range [1, 1 +\n    floor(log2(max(width, height, depth)))].\n\n    The :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - `Width`, `Height`, and `Depth` are the width, height, and depth of\n      the CUDA array (in elements); the following types of CUDA arrays can\n      be allocated:\n\n      - A 1D mipmapped array is allocated if `Height` and `Depth` extents\n        are both zero.\n\n      - A 2D mipmapped array is allocated if only `Depth` extent is zero.\n\n      - A 3D mipmapped array is allocated if all three extents are non-\n        zero.\n\n      - A 1D layered CUDA mipmapped array is allocated if only `Height` is\n        zero and the :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag is set. Each\n        layer is a 1D array. The number of layers is determined by the\n        depth extent.\n\n      - A 2D layered CUDA mipmapped array is allocated if all three extents\n        are non-zero and the :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag is set.\n        Each layer is a 2D array. The number of layers is determined by the\n        depth extent.\n\n      - A cubemap CUDA mipmapped array is allocated if all three extents\n        are non-zero and the :py:obj:`~.CUDA_ARRAY3D_CUBEMAP` flag is set.\n        `Width` must be equal to `Height`, and `Depth` must be six. A\n        cubemap is a special type of 2D layered CUDA array, where the six\n        layers represent the six faces of a cube. The order of the six\n        layers ""in memory is the same as that listed in\n        :py:obj:`~.CUarray_cubemap_face`.\n\n      - A cubemap layered CUDA mipmapped array is allocated if all three\n        extents are non-zero, and both, :py:obj:`~.CUDA_ARRAY3D_CUBEMAP`\n        and :py:obj:`~.CUDA_ARRAY3D_LAYERED` flags are set. `Width` must be\n        equal to `Height`, and `Depth` must be a multiple of six. A cubemap\n        layered CUDA array is a special type of 2D layered CUDA array that\n        consists of a collection of cubemaps. The first six layers\n        represent the first cubemap, the next six layers form the second\n        cubemap, and so on.\n\n    - :py:obj:`~.Format` specifies the format of the elements;\n      :py:obj:`~.CUarray_format` is defined as:\n\n    - **View CUDA Toolkit Documentation for a C++ code example**\n\n    - `NumChannels` specifies the number of packed components per CUDA\n      array element; it may be 1, 2, or 4;\n\n    - :py:obj:`~.Flags` may be set to\n\n      - :py:obj:`~.CUDA_ARRAY3D_LAYERED` to enable creation of layered CUDA\n        mipmapped arrays. If this flag is set, `Depth` specifies the number\n        of layers, not the depth of a 3D array.\n\n      - :py:obj:`~.CUDA_ARRAY3D_SURFACE_LDST` to enable surface references\n        to be bound to individual mipmap levels of the CUDA mipmapped\n        array. If this flag is not set, :py:obj:`~.cuSurfRefSetArray` will\n        fail when attempting to bind a mipmap level of the CUDA mipmapped\n        array to a surface reference.\n\n    - :py:obj:`~.CUDA_ARRAY3D_CUBEMAP` to enable creation of mipmapped\n    cubemaps. If this flag is set, `Width` must be equal to `Height`, and\n    `Depth` must be six. If the :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag is\n    also set, then `Depth` must be a multiple of six.\n\n      - :py:obj:`~.CUDA_ARRAY3D_TEXTURE_GATHER` to indicate that the CUDA\n        mipmapped array will be used for texture gather. Texture gather can\n        only be performed on 2D CUDA mipmapped ""arrays.\n\n    `Width`, `Height` and `Depth` must meet certain size requirements as\n    listed in the following table. All values are specified in elements.\n    Note that for brevity's sake, the full name of the device attribute is\n    not specified. For ex., TEXTURE1D_MIPMAPPED_WIDTH refers to the device\n    attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH`.\n\n    **View CUDA Toolkit Documentation for a table example**\n\n    Parameters\n    ----------\n    pMipmappedArrayDesc : :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR`\n        mipmapped array descriptor\n    numMipmapLevels : unsigned int\n        Number of mipmap levels\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    pHandle : :py:obj:`~.CUmipmappedArray`\n        Returned mipmapped array\n\n    See Also\n    --------\n    :py:obj:`~.cuMipmappedArrayDestroy`, :py:obj:`~.cuMipmappedArrayGetLevel`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cudaMallocMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_259cuMipmappedArrayCreate = {"cuMipmappedArrayCreate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_259cuMipmappedArrayCreate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_258cuMipmappedArrayCreate};
static PyObject *__pyx_pw_4cuda_4cuda_259cuMipmappedArrayCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_pMipmappedArrayDesc = 0;
  unsigned int __pyx_v_numMipmapLevels;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMipmappedArrayCreate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pMipmappedArrayDesc,&__pyx_n_s_numMipmapLevels,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pMipmappedArrayDesc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numMipmapLevels)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMipmappedArrayCreate", 1, 2, 2, 1); __PYX_ERR(0, 18237, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMipmappedArrayCreate") < 0)) __PYX_ERR(0, 18237, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_pMipmappedArrayDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *)values[0]);
    __pyx_v_numMipmapLevels = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_numMipmapLevels == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 18237, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMipmappedArrayCreate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 18237, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMipmappedArrayCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pMipmappedArrayDesc), __pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR, 1, "pMipmappedArrayDesc", 0))) __PYX_ERR(0, 18237, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_258cuMipmappedArrayCreate(__pyx_self, __pyx_v_pMipmappedArrayDesc, __pyx_v_numMipmapLevels);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_258cuMipmappedArrayCreate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_pMipmappedArrayDesc, unsigned int __pyx_v_numMipmapLevels) {
  struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_pHandle = 0;
  CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_cpMipmappedArrayDesc_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct CUDA_ARRAY3D_DESCRIPTOR_st *__pyx_t_2;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__739)
  __Pyx_RefNannySetupContext("cuMipmappedArrayCreate", 0);
  __Pyx_TraceCall("cuMipmappedArrayCreate", __pyx_f[0], 18237, 0, __PYX_ERR(0, 18237, __pyx_L1_error));

  /* "cuda/cuda.pyx":18348
 *     :py:obj:`~.cuMipmappedArrayDestroy`, :py:obj:`~.cuMipmappedArrayGetLevel`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cudaMallocMipmappedArray`
 *     """
 *     cdef CUmipmappedArray pHandle = CUmipmappedArray()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR* cpMipmappedArrayDesc_ptr = pMipmappedArrayDesc._ptr if pMipmappedArrayDesc != None else NULL
 *     err = ccuda.cuMipmappedArrayCreate(pHandle._ptr, cpMipmappedArrayDesc_ptr, numMipmapLevels)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pHandle = ((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":18349
 *     """
 *     cdef CUmipmappedArray pHandle = CUmipmappedArray()
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR* cpMipmappedArrayDesc_ptr = pMipmappedArrayDesc._ptr if pMipmappedArrayDesc != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMipmappedArrayCreate(pHandle._ptr, cpMipmappedArrayDesc_ptr, numMipmapLevels)
 *     return (CUresult(err), pHandle)
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_pMipmappedArrayDesc), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18349, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 18349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_2 = __pyx_v_pMipmappedArrayDesc->__pyx_base._ptr;
  } else {
    __pyx_t_2 = NULL;
  }
  __pyx_v_cpMipmappedArrayDesc_ptr = __pyx_t_2;

  /* "cuda/cuda.pyx":18350
 *     cdef CUmipmappedArray pHandle = CUmipmappedArray()
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR* cpMipmappedArrayDesc_ptr = pMipmappedArrayDesc._ptr if pMipmappedArrayDesc != None else NULL
 *     err = ccuda.cuMipmappedArrayCreate(pHandle._ptr, cpMipmappedArrayDesc_ptr, numMipmapLevels)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pHandle)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuMipmappedArrayCreate(__pyx_v_pHandle->_ptr, __pyx_v_cpMipmappedArrayDesc_ptr, __pyx_v_numMipmapLevels); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18350, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":18351
 *     cdef ccuda.CUDA_ARRAY3D_DESCRIPTOR* cpMipmappedArrayDesc_ptr = pMipmappedArrayDesc._ptr if pMipmappedArrayDesc != None else NULL
 *     err = ccuda.cuMipmappedArrayCreate(pHandle._ptr, cpMipmappedArrayDesc_ptr, numMipmapLevels)
 *     return (CUresult(err), pHandle)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 18351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pHandle));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pHandle));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_pHandle));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18237
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayCreate(pMipmappedArrayDesc : CUDA_ARRAY3D_DESCRIPTOR, unsigned int numMipmapLevels):             # <<<<<<<<<<<<<<
 *     """ Creates a CUDA mipmapped array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuMipmappedArrayCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pHandle);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18354
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayGetLevel(hMipmappedArray, unsigned int level):             # <<<<<<<<<<<<<<
 *     """ Gets a mipmap level of a CUDA mipmapped array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_261cuMipmappedArrayGetLevel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_260cuMipmappedArrayGetLevel[] = "cuMipmappedArrayGetLevel(hMipmappedArray, unsigned int level)\n Gets a mipmap level of a CUDA mipmapped array.\n\n    Returns in `*pLevelArray` a CUDA array that represents a single mipmap\n    level of the CUDA mipmapped array `hMipmappedArray`.\n\n    If `level` is greater than the maximum number of levels in this\n    mipmapped array, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned.\n\n    Parameters\n    ----------\n    hMipmappedArray : :py:obj:`~.CUmipmappedArray`\n        CUDA mipmapped array\n    level : unsigned int\n        Mipmap level\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n    pLevelArray : :py:obj:`~.CUarray`\n        Returned mipmap level CUDA array\n\n    See Also\n    --------\n    :py:obj:`~.cuMipmappedArrayCreate`, :py:obj:`~.cuMipmappedArrayDestroy`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cudaGetMipmappedArrayLevel`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_261cuMipmappedArrayGetLevel = {"cuMipmappedArrayGetLevel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_261cuMipmappedArrayGetLevel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_260cuMipmappedArrayGetLevel};
static PyObject *__pyx_pw_4cuda_4cuda_261cuMipmappedArrayGetLevel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hMipmappedArray = 0;
  unsigned int __pyx_v_level;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMipmappedArrayGetLevel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hMipmappedArray_2,&__pyx_n_s_level_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hMipmappedArray_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMipmappedArrayGetLevel", 1, 2, 2, 1); __PYX_ERR(0, 18354, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMipmappedArrayGetLevel") < 0)) __PYX_ERR(0, 18354, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hMipmappedArray = values[0];
    __pyx_v_level = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_level == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 18354, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMipmappedArrayGetLevel", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 18354, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMipmappedArrayGetLevel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_260cuMipmappedArrayGetLevel(__pyx_self, __pyx_v_hMipmappedArray, __pyx_v_level);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_260cuMipmappedArrayGetLevel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hMipmappedArray, unsigned int __pyx_v_level) {
  CUmipmappedArray __pyx_v_chMipmappedArray;
  PyObject *__pyx_v_phMipmappedArray = NULL;
  struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_pLevelArray = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__740)
  __Pyx_RefNannySetupContext("cuMipmappedArrayGetLevel", 0);
  __Pyx_TraceCall("cuMipmappedArrayGetLevel", __pyx_f[0], 18354, 0, __PYX_ERR(0, 18354, __pyx_L1_error));

  /* "cuda/cuda.pyx":18382
 *     """
 *     cdef ccuda.CUmipmappedArray chMipmappedArray
 *     if hMipmappedArray is None:             # <<<<<<<<<<<<<<
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 */
  __pyx_t_1 = (__pyx_v_hMipmappedArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18383
 *     cdef ccuda.CUmipmappedArray chMipmappedArray
 *     if hMipmappedArray is None:
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 *         phMipmappedArray = int(hMipmappedArray)
 */
    __pyx_v_chMipmappedArray = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18382
 *     """
 *     cdef ccuda.CUmipmappedArray chMipmappedArray
 *     if hMipmappedArray is None:             # <<<<<<<<<<<<<<
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18384
 *     if hMipmappedArray is None:
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *         phMipmappedArray = int(hMipmappedArray)
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hMipmappedArray, __pyx_ptype_4cuda_4cuda_CUmipmappedArray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18385
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 *         phMipmappedArray = int(hMipmappedArray)             # <<<<<<<<<<<<<<
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hMipmappedArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phMipmappedArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18386
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 *         phMipmappedArray = int(hMipmappedArray)
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray             # <<<<<<<<<<<<<<
 *     else:
 *         phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phMipmappedArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18386, __pyx_L1_error)
    __pyx_v_chMipmappedArray = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18384
 *     if hMipmappedArray is None:
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *         phMipmappedArray = int(hMipmappedArray)
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18388
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 *     else:
 *         phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))             # <<<<<<<<<<<<<<
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray), __pyx_v_hMipmappedArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phMipmappedArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18389
 *     else:
 *         phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray             # <<<<<<<<<<<<<<
 * 
 *     cdef CUarray pLevelArray = CUarray()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phMipmappedArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18389, __pyx_L1_error)
    __pyx_v_chMipmappedArray = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":18391
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 * 
 *     cdef CUarray pLevelArray = CUarray()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMipmappedArrayGetLevel(pLevelArray._ptr, chMipmappedArray, level)
 *     return (CUresult(err), pLevelArray)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pLevelArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":18392
 * 
 *     cdef CUarray pLevelArray = CUarray()
 *     err = ccuda.cuMipmappedArrayGetLevel(pLevelArray._ptr, chMipmappedArray, level)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pLevelArray)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMipmappedArrayGetLevel(__pyx_v_pLevelArray->_ptr, __pyx_v_chMipmappedArray, __pyx_v_level); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18392, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":18393
 *     cdef CUarray pLevelArray = CUarray()
 *     err = ccuda.cuMipmappedArrayGetLevel(pLevelArray._ptr, chMipmappedArray, level)
 *     return (CUresult(err), pLevelArray)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pLevelArray));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pLevelArray));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pLevelArray));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18354
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayGetLevel(hMipmappedArray, unsigned int level):             # <<<<<<<<<<<<<<
 *     """ Gets a mipmap level of a CUDA mipmapped array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMipmappedArrayGetLevel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phMipmappedArray);
  __Pyx_XDECREF((PyObject *)__pyx_v_pLevelArray);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18396
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayDestroy(hMipmappedArray):             # <<<<<<<<<<<<<<
 *     """ Destroys a CUDA mipmapped array.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_263cuMipmappedArrayDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hMipmappedArray); /*proto*/
static char __pyx_doc_4cuda_4cuda_262cuMipmappedArrayDestroy[] = "cuMipmappedArrayDestroy(hMipmappedArray)\n Destroys a CUDA mipmapped array.\n\n    Destroys the CUDA mipmapped array `hMipmappedArray`.\n\n    Parameters\n    ----------\n    hMipmappedArray : :py:obj:`~.CUmipmappedArray`\n        Mipmapped array to destroy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ARRAY_IS_MAPPED`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED`\n\n    See Also\n    --------\n    :py:obj:`~.cuMipmappedArrayCreate`, :py:obj:`~.cuMipmappedArrayGetLevel`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cudaFreeMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_263cuMipmappedArrayDestroy = {"cuMipmappedArrayDestroy", (PyCFunction)__pyx_pw_4cuda_4cuda_263cuMipmappedArrayDestroy, METH_O, __pyx_doc_4cuda_4cuda_262cuMipmappedArrayDestroy};
static PyObject *__pyx_pw_4cuda_4cuda_263cuMipmappedArrayDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hMipmappedArray) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMipmappedArrayDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_262cuMipmappedArrayDestroy(__pyx_self, ((PyObject *)__pyx_v_hMipmappedArray));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_262cuMipmappedArrayDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hMipmappedArray) {
  CUmipmappedArray __pyx_v_chMipmappedArray;
  PyObject *__pyx_v_phMipmappedArray = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__741)
  __Pyx_RefNannySetupContext("cuMipmappedArrayDestroy", 0);
  __Pyx_TraceCall("cuMipmappedArrayDestroy", __pyx_f[0], 18396, 0, __PYX_ERR(0, 18396, __pyx_L1_error));

  /* "cuda/cuda.pyx":18416
 *     """
 *     cdef ccuda.CUmipmappedArray chMipmappedArray
 *     if hMipmappedArray is None:             # <<<<<<<<<<<<<<
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 */
  __pyx_t_1 = (__pyx_v_hMipmappedArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18417
 *     cdef ccuda.CUmipmappedArray chMipmappedArray
 *     if hMipmappedArray is None:
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 *         phMipmappedArray = int(hMipmappedArray)
 */
    __pyx_v_chMipmappedArray = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18416
 *     """
 *     cdef ccuda.CUmipmappedArray chMipmappedArray
 *     if hMipmappedArray is None:             # <<<<<<<<<<<<<<
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18418
 *     if hMipmappedArray is None:
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *         phMipmappedArray = int(hMipmappedArray)
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hMipmappedArray, __pyx_ptype_4cuda_4cuda_CUmipmappedArray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18419
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 *         phMipmappedArray = int(hMipmappedArray)             # <<<<<<<<<<<<<<
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hMipmappedArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phMipmappedArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18420
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 *         phMipmappedArray = int(hMipmappedArray)
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray             # <<<<<<<<<<<<<<
 *     else:
 *         phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phMipmappedArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18420, __pyx_L1_error)
    __pyx_v_chMipmappedArray = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18418
 *     if hMipmappedArray is None:
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *         phMipmappedArray = int(hMipmappedArray)
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18422
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 *     else:
 *         phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))             # <<<<<<<<<<<<<<
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray), __pyx_v_hMipmappedArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phMipmappedArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18423
 *     else:
 *         phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMipmappedArrayDestroy(chMipmappedArray)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phMipmappedArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18423, __pyx_L1_error)
    __pyx_v_chMipmappedArray = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":18425
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 * 
 *     err = ccuda.cuMipmappedArrayDestroy(chMipmappedArray)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMipmappedArrayDestroy(__pyx_v_chMipmappedArray); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18425, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":18426
 * 
 *     err = ccuda.cuMipmappedArrayDestroy(chMipmappedArray)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18396
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayDestroy(hMipmappedArray):             # <<<<<<<<<<<<<<
 *     """ Destroys a CUDA mipmapped array.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMipmappedArrayDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phMipmappedArray);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18429
 * 
 * @cython.embedsignature(True)
 * def cuMemGetHandleForAddressRange(dptr, size_t size, handleType not None : CUmemRangeHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Retrieve handle for an address range.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_265cuMemGetHandleForAddressRange(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_264cuMemGetHandleForAddressRange[] = "cuMemGetHandleForAddressRange(dptr, size_t size, handleType: CUmemRangeHandleType, unsigned long long flags)\n Retrieve handle for an address range.\n\n    Get a handle of the specified type to an address range. The address\n    range must have been obtained by a prior call to either\n    :py:obj:`~.cuMemAlloc` or :py:obj:`~.cuMemAddressReserve`. If the\n    address range was obtained via :py:obj:`~.cuMemAddressReserve`, it must\n    also be fully mapped via :py:obj:`~.cuMemMap`.\n\n    Users must ensure the `dptr` and `size` are aligned to the host page\n    size.\n\n    When requesting\n    CUmemRangeHandleType::CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD, users are\n    expected to query for dma_buf support for the platform by using\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED` device attribute\n    before calling this API. The `handle` will be interpreted as a pointer\n    to an integer to store the dma_buf file descriptor. Users must ensure\n    the entire address range is backed and mapped when the address range is\n    allocated by :py:obj:`~.cuMemAddressReserve`. All the physical\n    allocations backing the address range must be resident on the same\n    device and have identical allocation properties. Users are also\n    expected to retrieve a new handle every time the underlying physical\n    allocation(s) corresponding to a previously queried VA range are\n    changed.\n\n    Parameters\n    ----------\n    dptr : :py:obj:`~.CUdeviceptr`\n        Pointer to a valid CUDA device allocation. Must be aligned to host\n        page size.\n    size : size_t\n        Length of the address range. Must be aligned to host page size.\n    handleType : :py:obj:`~.CUmemRangeHandleType`\n        Type of handle requested (defines type and size of the `handle`\n        output parameter)\n    flags : unsigned long long\n        Reserved, must be zero\n\n    Returns\n    -------\n    CUresult\n        CUDA_SUCCESS CUDA_ERROR_INVALID_VALUE CUDA_ERROR_NOT_SUPPORTED\n    han""dle : Any\n        Pointer to the location where the returned handle will be stored.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_265cuMemGetHandleForAddressRange = {"cuMemGetHandleForAddressRange", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_265cuMemGetHandleForAddressRange, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_264cuMemGetHandleForAddressRange};
static PyObject *__pyx_pw_4cuda_4cuda_265cuMemGetHandleForAddressRange(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dptr = 0;
  size_t __pyx_v_size;
  PyObject *__pyx_v_handleType = 0;
  unsigned PY_LONG_LONG __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemGetHandleForAddressRange (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dptr_2,&__pyx_n_s_size_2,&__pyx_n_s_handleType,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dptr_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemGetHandleForAddressRange", 1, 4, 4, 1); __PYX_ERR(0, 18429, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleType)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemGetHandleForAddressRange", 1, 4, 4, 2); __PYX_ERR(0, 18429, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemGetHandleForAddressRange", 1, 4, 4, 3); __PYX_ERR(0, 18429, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemGetHandleForAddressRange") < 0)) __PYX_ERR(0, 18429, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dptr = values[0];
    __pyx_v_size = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 18429, __pyx_L3_error)
    __pyx_v_handleType = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[3]); if (unlikely((__pyx_v_flags == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18429, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemGetHandleForAddressRange", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 18429, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemGetHandleForAddressRange", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_handleType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "handleType"); __PYX_ERR(0, 18429, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_264cuMemGetHandleForAddressRange(__pyx_self, __pyx_v_dptr, __pyx_v_size, __pyx_v_handleType, __pyx_v_flags);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_264cuMemGetHandleForAddressRange(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dptr, size_t __pyx_v_size, PyObject *__pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUdeviceptr __pyx_v_cdptr;
  PyObject *__pyx_v_pdptr = NULL;
  int __pyx_v_handle;
  void *__pyx_v_chandle_ptr;
  CUmemRangeHandleType __pyx_v_chandleType;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUmemRangeHandleType __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__742)
  __Pyx_RefNannySetupContext("cuMemGetHandleForAddressRange", 0);
  __Pyx_TraceCall("cuMemGetHandleForAddressRange", __pyx_f[0], 18429, 0, __PYX_ERR(0, 18429, __pyx_L1_error));

  /* "cuda/cuda.pyx":18476
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18477
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 */
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18476
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18478
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18479
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18480
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18480, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18478
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18482
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18483
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 * 
 *     cdef int handle = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18483, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":18485
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 *     cdef int handle = 0             # <<<<<<<<<<<<<<
 *     cdef void* chandle_ptr = <void*>&handle
 *     cdef ccuda.CUmemRangeHandleType chandleType = handleType.value
 */
  __pyx_v_handle = 0;

  /* "cuda/cuda.pyx":18486
 * 
 *     cdef int handle = 0
 *     cdef void* chandle_ptr = <void*>&handle             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUmemRangeHandleType chandleType = handleType.value
 *     err = ccuda.cuMemGetHandleForAddressRange(chandle_ptr, cdptr, size, chandleType, flags)
 */
  __pyx_v_chandle_ptr = ((void *)(&__pyx_v_handle));

  /* "cuda/cuda.pyx":18487
 *     cdef int handle = 0
 *     cdef void* chandle_ptr = <void*>&handle
 *     cdef ccuda.CUmemRangeHandleType chandleType = handleType.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemGetHandleForAddressRange(chandle_ptr, cdptr, size, chandleType, flags)
 *     return (CUresult(err), handle)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_handleType, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUmemRangeHandleType_enum)__Pyx_PyInt_As_enum__CUmemRangeHandleType_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 18487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_chandleType = __pyx_t_6;

  /* "cuda/cuda.pyx":18488
 *     cdef void* chandle_ptr = <void*>&handle
 *     cdef ccuda.CUmemRangeHandleType chandleType = handleType.value
 *     err = ccuda.cuMemGetHandleForAddressRange(chandle_ptr, cdptr, size, chandleType, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), handle)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuMemGetHandleForAddressRange(__pyx_v_chandle_ptr, __pyx_v_cdptr, __pyx_v_size, __pyx_v_chandleType, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18488, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":18489
 *     cdef ccuda.CUmemRangeHandleType chandleType = handleType.value
 *     err = ccuda.cuMemGetHandleForAddressRange(chandle_ptr, cdptr, size, chandleType, flags)
 *     return (CUresult(err), handle)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 18489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 18489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18429
 * 
 * @cython.embedsignature(True)
 * def cuMemGetHandleForAddressRange(dptr, size_t size, handleType not None : CUmemRangeHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Retrieve handle for an address range.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMemGetHandleForAddressRange", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18492
 * 
 * @cython.embedsignature(True)
 * def cuMemAddressReserve(size_t size, size_t alignment, addr, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Allocate an address range reservation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_267cuMemAddressReserve(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_266cuMemAddressReserve[] = "cuMemAddressReserve(size_t size, size_t alignment, addr, unsigned long long flags)\n Allocate an address range reservation.\n\n    Reserves a virtual address range based on the given parameters, giving\n    the starting address of the range in `ptr`. This API requires a system\n    that supports UVA. The size and address parameters must be a multiple\n    of the host page size and the alignment must be a power of two or zero\n    for default alignment.\n\n    Parameters\n    ----------\n    size : size_t\n        Size of the reserved virtual address range requested\n    alignment : size_t\n        Alignment of the reserved virtual address range requested\n    addr : :py:obj:`~.CUdeviceptr`\n        Fixed starting address range requested\n    flags : unsigned long long\n        Currently unused, must be zero\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n    ptr : :py:obj:`~.CUdeviceptr`\n        Resulting pointer to start of virtual address range allocated\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAddressFree`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_267cuMemAddressReserve = {"cuMemAddressReserve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_267cuMemAddressReserve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_266cuMemAddressReserve};
static PyObject *__pyx_pw_4cuda_4cuda_267cuMemAddressReserve(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_size;
  size_t __pyx_v_alignment;
  PyObject *__pyx_v_addr = 0;
  unsigned PY_LONG_LONG __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemAddressReserve (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size_2,&__pyx_n_s_alignment_2,&__pyx_n_s_addr,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_alignment_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAddressReserve", 1, 4, 4, 1); __PYX_ERR(0, 18492, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_addr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAddressReserve", 1, 4, 4, 2); __PYX_ERR(0, 18492, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAddressReserve", 1, 4, 4, 3); __PYX_ERR(0, 18492, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemAddressReserve") < 0)) __PYX_ERR(0, 18492, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_size = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 18492, __pyx_L3_error)
    __pyx_v_alignment = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_alignment == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 18492, __pyx_L3_error)
    __pyx_v_addr = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[3]); if (unlikely((__pyx_v_flags == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18492, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemAddressReserve", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 18492, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemAddressReserve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_266cuMemAddressReserve(__pyx_self, __pyx_v_size, __pyx_v_alignment, __pyx_v_addr, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_266cuMemAddressReserve(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_size, size_t __pyx_v_alignment, PyObject *__pyx_v_addr, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUdeviceptr __pyx_v_caddr;
  PyObject *__pyx_v_paddr = NULL;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_ptr = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__743)
  __Pyx_RefNannySetupContext("cuMemAddressReserve", 0);
  __Pyx_TraceCall("cuMemAddressReserve", __pyx_f[0], 18492, 0, __PYX_ERR(0, 18492, __pyx_L1_error));

  /* "cuda/cuda.pyx":18524
 *     """
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_addr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18525
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 */
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18524
 *     """
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18526
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_addr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18527
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_addr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_paddr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18528
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18528, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18526
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18530
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 *         paddr = int(CUdeviceptr(addr))             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_addr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_paddr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18531
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 * 
 *     cdef CUdeviceptr ptr = CUdeviceptr()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18531, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":18533
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 * 
 *     cdef CUdeviceptr ptr = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemAddressReserve(ptr._ptr, size, alignment, caddr, flags)
 *     return (CUresult(err), ptr)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_ptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":18534
 * 
 *     cdef CUdeviceptr ptr = CUdeviceptr()
 *     err = ccuda.cuMemAddressReserve(ptr._ptr, size, alignment, caddr, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), ptr)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemAddressReserve(__pyx_v_ptr->_ptr, __pyx_v_size, __pyx_v_alignment, __pyx_v_caddr, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18534, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":18535
 *     cdef CUdeviceptr ptr = CUdeviceptr()
 *     err = ccuda.cuMemAddressReserve(ptr._ptr, size, alignment, caddr, flags)
 *     return (CUresult(err), ptr)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_ptr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_ptr));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_ptr));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18492
 * 
 * @cython.embedsignature(True)
 * def cuMemAddressReserve(size_t size, size_t alignment, addr, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Allocate an address range reservation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemAddressReserve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_paddr);
  __Pyx_XDECREF((PyObject *)__pyx_v_ptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18538
 * 
 * @cython.embedsignature(True)
 * def cuMemAddressFree(ptr, size_t size):             # <<<<<<<<<<<<<<
 *     """ Free an address range reservation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_269cuMemAddressFree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_268cuMemAddressFree[] = "cuMemAddressFree(ptr, size_t size)\n Free an address range reservation.\n\n    Frees a virtual address range reserved by cuMemAddressReserve. The size\n    must match what was given to memAddressReserve and the ptr given must\n    match what was returned from memAddressReserve.\n\n    Parameters\n    ----------\n    ptr : :py:obj:`~.CUdeviceptr`\n        Starting address of the virtual address range to free\n    size : size_t\n        Size of the virtual address region to free\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAddressReserve`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_269cuMemAddressFree = {"cuMemAddressFree", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_269cuMemAddressFree, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_268cuMemAddressFree};
static PyObject *__pyx_pw_4cuda_4cuda_269cuMemAddressFree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ptr = 0;
  size_t __pyx_v_size;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemAddressFree (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr_2,&__pyx_n_s_size_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAddressFree", 1, 2, 2, 1); __PYX_ERR(0, 18538, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemAddressFree") < 0)) __PYX_ERR(0, 18538, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_ptr = values[0];
    __pyx_v_size = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 18538, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemAddressFree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 18538, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemAddressFree", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_268cuMemAddressFree(__pyx_self, __pyx_v_ptr, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_268cuMemAddressFree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr, size_t __pyx_v_size) {
  CUdeviceptr __pyx_v_cptr;
  PyObject *__pyx_v_pptr = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__744)
  __Pyx_RefNannySetupContext("cuMemAddressFree", 0);
  __Pyx_TraceCall("cuMemAddressFree", __pyx_f[0], 18538, 0, __PYX_ERR(0, 18538, __pyx_L1_error));

  /* "cuda/cuda.pyx":18562
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_ptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18563
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 */
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18562
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18564
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18565
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18566
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18566, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18564
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18568
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 *         pptr = int(CUdeviceptr(ptr))             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18569
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemAddressFree(cptr, size)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18569, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":18571
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 *     err = ccuda.cuMemAddressFree(cptr, size)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemAddressFree(__pyx_v_cptr, __pyx_v_size); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18571, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":18572
 * 
 *     err = ccuda.cuMemAddressFree(cptr, size)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18538
 * 
 * @cython.embedsignature(True)
 * def cuMemAddressFree(ptr, size_t size):             # <<<<<<<<<<<<<<
 *     """ Free an address range reservation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemAddressFree", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18575
 * 
 * @cython.embedsignature(True)
 * def cuMemCreate(size_t size, prop : CUmemAllocationProp, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA memory handle representing a memory allocation of a given size described by the given properties.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_271cuMemCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_270cuMemCreate[] = "cuMemCreate(size_t size, CUmemAllocationProp prop: CUmemAllocationProp, unsigned long long flags)\n Create a CUDA memory handle representing a memory allocation of a given size described by the given properties.\n\n    This creates a memory allocation on the target device specified through\n    the `prop` strcuture. The created allocation will not have any device\n    or host mappings. The generic memory `handle` for the allocation can be\n    mapped to the address space of calling process via\n    :py:obj:`~.cuMemMap`. This handle cannot be transmitted directly to\n    other processes (see :py:obj:`~.cuMemExportToShareableHandle`). On\n    Windows, the caller must also pass an LPSECURITYATTRIBUTE in `prop` to\n    be associated with this handle which limits or allows access to this\n    handle for a recepient process (see\n    :py:obj:`~.CUmemAllocationProp.win32HandleMetaData` for more). The\n    `size` of this allocation must be a multiple of the the value given via\n    :py:obj:`~.cuMemGetAllocationGranularity` with the\n    :py:obj:`~.CU_MEM_ALLOC_GRANULARITY_MINIMUM` flag. If\n    :py:obj:`~.CUmemAllocationProp`::allocFlags::usage contains\n    :py:obj:`~.CU_MEM_CREATE_USAGE_TILE_POOL` flag then the memory\n    allocation is intended only to be used as backing tile pool for sparse\n    CUDA arrays and sparse CUDA mipmapped arrays. (see\n    :py:obj:`~.cuMemMapArrayAsync`).\n\n    Parameters\n    ----------\n    size : size_t\n        Size of the allocation requested\n    prop : :py:obj:`~.CUmemAllocationProp`\n        Properties of the allocation to create.\n    flags : unsigned long long\n        flags for future use, must be zero now.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR""_NOT_SUPPORTED`\n    handle : :py:obj:`~.CUmemGenericAllocationHandle`\n        Value of handle returned. All operations on this allocation are to\n        be performed using this handle.\n\n    See Also\n    --------\n    :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemImportFromShareableHandle`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_271cuMemCreate = {"cuMemCreate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_271cuMemCreate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_270cuMemCreate};
static PyObject *__pyx_pw_4cuda_4cuda_271cuMemCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_size;
  struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp *__pyx_v_prop = 0;
  unsigned PY_LONG_LONG __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemCreate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size_2,&__pyx_n_s_prop,&__pyx_n_s_flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemCreate", 1, 3, 3, 1); __PYX_ERR(0, 18575, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemCreate", 1, 3, 3, 2); __PYX_ERR(0, 18575, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemCreate") < 0)) __PYX_ERR(0, 18575, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_size = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 18575, __pyx_L3_error)
    __pyx_v_prop = ((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp *)values[1]);
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[2]); if (unlikely((__pyx_v_flags == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18575, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemCreate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 18575, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_prop), __pyx_ptype_4cuda_4cuda_CUmemAllocationProp, 1, "prop", 0))) __PYX_ERR(0, 18575, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_270cuMemCreate(__pyx_self, __pyx_v_size, __pyx_v_prop, __pyx_v_flags);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_270cuMemCreate(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_size, struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp *__pyx_v_prop, unsigned PY_LONG_LONG __pyx_v_flags) {
  struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_handle = 0;
  CUmemAllocationProp *__pyx_v_cprop_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct CUmemAllocationProp_st *__pyx_t_2;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__745)
  __Pyx_RefNannySetupContext("cuMemCreate", 0);
  __Pyx_TraceCall("cuMemCreate", __pyx_f[0], 18575, 0, __PYX_ERR(0, 18575, __pyx_L1_error));

  /* "cuda/cuda.pyx":18618
 *     :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemImportFromShareableHandle`
 *     """
 *     cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUmemAllocationProp* cprop_ptr = prop._ptr if prop != None else NULL
 *     err = ccuda.cuMemCreate(handle._ptr, size, cprop_ptr, flags)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_handle = ((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":18619
 *     """
 *     cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle()
 *     cdef ccuda.CUmemAllocationProp* cprop_ptr = prop._ptr if prop != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemCreate(handle._ptr, size, cprop_ptr, flags)
 *     return (CUresult(err), handle)
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_prop), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18619, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 18619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_2 = __pyx_v_prop->__pyx_base._ptr;
  } else {
    __pyx_t_2 = NULL;
  }
  __pyx_v_cprop_ptr = __pyx_t_2;

  /* "cuda/cuda.pyx":18620
 *     cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle()
 *     cdef ccuda.CUmemAllocationProp* cprop_ptr = prop._ptr if prop != None else NULL
 *     err = ccuda.cuMemCreate(handle._ptr, size, cprop_ptr, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), handle)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuMemCreate(__pyx_v_handle->_ptr, __pyx_v_size, __pyx_v_cprop_ptr, __pyx_v_flags); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18620, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":18621
 *     cdef ccuda.CUmemAllocationProp* cprop_ptr = prop._ptr if prop != None else NULL
 *     err = ccuda.cuMemCreate(handle._ptr, size, cprop_ptr, flags)
 *     return (CUresult(err), handle)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 18621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_handle));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_handle));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18575
 * 
 * @cython.embedsignature(True)
 * def cuMemCreate(size_t size, prop : CUmemAllocationProp, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA memory handle representing a memory allocation of a given size described by the given properties.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuMemCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18624
 * 
 * @cython.embedsignature(True)
 * def cuMemRelease(handle):             # <<<<<<<<<<<<<<
 *     """ Release a memory handle representing a memory allocation which was previously allocated through cuMemCreate.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_273cuMemRelease(PyObject *__pyx_self, PyObject *__pyx_v_handle); /*proto*/
static char __pyx_doc_4cuda_4cuda_272cuMemRelease[] = "cuMemRelease(handle)\n Release a memory handle representing a memory allocation which was previously allocated through cuMemCreate.\n\n    Frees the memory that was allocated on a device through cuMemCreate.\n\n    The memory allocation will be freed when all outstanding mappings to\n    the memory are unmapped and when all outstanding references to the\n    handle (including it's shareable counterparts) are also released. The\n    generic memory handle can be freed when there are still outstanding\n    mappings made with this handle. Each time a recepient process imports a\n    shareable handle, it needs to pair it with :py:obj:`~.cuMemRelease` for\n    the handle to be freed. If `handle` is not a valid handle the behavior\n    is undefined.\n\n    Parameters\n    ----------\n    handle : :py:obj:`~.CUmemGenericAllocationHandle`\n        Value of handle which was returned previously by cuMemCreate.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_273cuMemRelease = {"cuMemRelease", (PyCFunction)__pyx_pw_4cuda_4cuda_273cuMemRelease, METH_O, __pyx_doc_4cuda_4cuda_272cuMemRelease};
static PyObject *__pyx_pw_4cuda_4cuda_273cuMemRelease(PyObject *__pyx_self, PyObject *__pyx_v_handle) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemRelease (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_272cuMemRelease(__pyx_self, ((PyObject *)__pyx_v_handle));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_272cuMemRelease(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_handle) {
  CUmemGenericAllocationHandle __pyx_v_chandle;
  PyObject *__pyx_v_phandle = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__746)
  __Pyx_RefNannySetupContext("cuMemRelease", 0);
  __Pyx_TraceCall("cuMemRelease", __pyx_f[0], 18624, 0, __PYX_ERR(0, 18624, __pyx_L1_error));

  /* "cuda/cuda.pyx":18653
 *     """
 *     cdef ccuda.CUmemGenericAllocationHandle chandle
 *     if handle is None:             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 */
  __pyx_t_1 = (__pyx_v_handle == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18654
 *     cdef ccuda.CUmemGenericAllocationHandle chandle
 *     if handle is None:
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 *         phandle = int(handle)
 */
    __pyx_v_chandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18653
 *     """
 *     cdef ccuda.CUmemGenericAllocationHandle chandle
 *     if handle is None:             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18655
 *     if handle is None:
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):             # <<<<<<<<<<<<<<
 *         phandle = int(handle)
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_handle, __pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18656
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 *         phandle = int(handle)             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phandle = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18657
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 *         phandle = int(handle)
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle             # <<<<<<<<<<<<<<
 *     else:
 *         phandle = int(CUmemGenericAllocationHandle(handle))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phandle); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18657, __pyx_L1_error)
    __pyx_v_chandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18655
 *     if handle is None:
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):             # <<<<<<<<<<<<<<
 *         phandle = int(handle)
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18659
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 *     else:
 *         phandle = int(CUmemGenericAllocationHandle(handle))             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle), __pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phandle = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18660
 *     else:
 *         phandle = int(CUmemGenericAllocationHandle(handle))
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemRelease(chandle)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phandle); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18660, __pyx_L1_error)
    __pyx_v_chandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":18662
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 * 
 *     err = ccuda.cuMemRelease(chandle)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemRelease(__pyx_v_chandle); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18662, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":18663
 * 
 *     err = ccuda.cuMemRelease(chandle)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18624
 * 
 * @cython.embedsignature(True)
 * def cuMemRelease(handle):             # <<<<<<<<<<<<<<
 *     """ Release a memory handle representing a memory allocation which was previously allocated through cuMemCreate.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemRelease", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phandle);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18666
 * 
 * @cython.embedsignature(True)
 * def cuMemMap(ptr, size_t size, size_t offset, handle, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Maps an allocation handle to a reserved virtual address range.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_275cuMemMap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_274cuMemMap[] = "cuMemMap(ptr, size_t size, size_t offset, handle, unsigned long long flags)\n Maps an allocation handle to a reserved virtual address range.\n\n    Maps bytes of memory represented by `handle` starting from byte\n    `offset` to `size` to address range [`addr`, `addr` + `size`]. This\n    range must be an address reservation previously reserved with\n    :py:obj:`~.cuMemAddressReserve`, and `offset` + `size` must be less\n    than the size of the memory allocation. Both `ptr`, `size`, and\n    `offset` must be a multiple of the value given via\n    :py:obj:`~.cuMemGetAllocationGranularity` with the\n    :py:obj:`~.CU_MEM_ALLOC_GRANULARITY_MINIMUM` flag.\n\n    Please note calling :py:obj:`~.cuMemMap` does not make the address\n    accessible, the caller needs to update accessibility of a contiguous\n    mapped VA range by calling :py:obj:`~.cuMemSetAccess`.\n\n    Once a recipient process obtains a shareable memory handle from\n    :py:obj:`~.cuMemImportFromShareableHandle`, the process must use\n    :py:obj:`~.cuMemMap` to map the memory into its address ranges before\n    setting accessibility with :py:obj:`~.cuMemSetAccess`.\n\n    :py:obj:`~.cuMemMap` can only create mappings on VA range reservations\n    that are not currently mapped.\n\n    Parameters\n    ----------\n    ptr : :py:obj:`~.CUdeviceptr`\n        Address where memory will be mapped.\n    size : size_t\n        Size of the memory mapping.\n    offset : size_t\n        Offset into the memory represented by\n    handle : :py:obj:`~.CUmemGenericAllocationHandle`\n        Handle to a shareable memory\n    flags : unsigned long long\n        flags for future use, must be zero now.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERR""OR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemUnmap`, :py:obj:`~.cuMemSetAccess`, :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemAddressReserve`, :py:obj:`~.cuMemImportFromShareableHandle`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_275cuMemMap = {"cuMemMap", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_275cuMemMap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_274cuMemMap};
static PyObject *__pyx_pw_4cuda_4cuda_275cuMemMap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ptr = 0;
  size_t __pyx_v_size;
  size_t __pyx_v_offset;
  PyObject *__pyx_v_handle = 0;
  unsigned PY_LONG_LONG __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemMap (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr_2,&__pyx_n_s_size_2,&__pyx_n_s_offset_2,&__pyx_n_s_handle_2,&__pyx_n_s_flags_2,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemMap", 1, 5, 5, 1); __PYX_ERR(0, 18666, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemMap", 1, 5, 5, 2); __PYX_ERR(0, 18666, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemMap", 1, 5, 5, 3); __PYX_ERR(0, 18666, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemMap", 1, 5, 5, 4); __PYX_ERR(0, 18666, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemMap") < 0)) __PYX_ERR(0, 18666, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_ptr = values[0];
    __pyx_v_size = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 18666, __pyx_L3_error)
    __pyx_v_offset = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_offset == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 18666, __pyx_L3_error)
    __pyx_v_handle = values[3];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[4]); if (unlikely((__pyx_v_flags == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18666, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemMap", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 18666, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemMap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_274cuMemMap(__pyx_self, __pyx_v_ptr, __pyx_v_size, __pyx_v_offset, __pyx_v_handle, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_274cuMemMap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_offset, PyObject *__pyx_v_handle, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUmemGenericAllocationHandle __pyx_v_chandle;
  PyObject *__pyx_v_phandle = NULL;
  CUdeviceptr __pyx_v_cptr;
  PyObject *__pyx_v_pptr = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__747)
  __Pyx_RefNannySetupContext("cuMemMap", 0);
  __Pyx_TraceCall("cuMemMap", __pyx_f[0], 18666, 0, __PYX_ERR(0, 18666, __pyx_L1_error));

  /* "cuda/cuda.pyx":18713
 *     """
 *     cdef ccuda.CUmemGenericAllocationHandle chandle
 *     if handle is None:             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 */
  __pyx_t_1 = (__pyx_v_handle == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18714
 *     cdef ccuda.CUmemGenericAllocationHandle chandle
 *     if handle is None:
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 *         phandle = int(handle)
 */
    __pyx_v_chandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18713
 *     """
 *     cdef ccuda.CUmemGenericAllocationHandle chandle
 *     if handle is None:             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18715
 *     if handle is None:
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):             # <<<<<<<<<<<<<<
 *         phandle = int(handle)
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_handle, __pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18716
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 *         phandle = int(handle)             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phandle = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18717
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 *         phandle = int(handle)
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle             # <<<<<<<<<<<<<<
 *     else:
 *         phandle = int(CUmemGenericAllocationHandle(handle))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phandle); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18717, __pyx_L1_error)
    __pyx_v_chandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18715
 *     if handle is None:
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):             # <<<<<<<<<<<<<<
 *         phandle = int(handle)
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18719
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 *     else:
 *         phandle = int(CUmemGenericAllocationHandle(handle))             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle), __pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phandle = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18720
 *     else:
 *         phandle = int(CUmemGenericAllocationHandle(handle))
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cptr
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phandle); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18720, __pyx_L1_error)
    __pyx_v_chandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":18723
 * 
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_ptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18724
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 */
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18723
 * 
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":18725
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18726
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_ptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18727
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18727, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18725
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":18729
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 *         pptr = int(CUdeviceptr(ptr))             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_ptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18730
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemMap(cptr, size, offset, chandle, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18730, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":18732
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 *     err = ccuda.cuMemMap(cptr, size, offset, chandle, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemMap(__pyx_v_cptr, __pyx_v_size, __pyx_v_offset, __pyx_v_chandle, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18732, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":18733
 * 
 *     err = ccuda.cuMemMap(cptr, size, offset, chandle, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18666
 * 
 * @cython.embedsignature(True)
 * def cuMemMap(ptr, size_t size, size_t offset, handle, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Maps an allocation handle to a reserved virtual address range.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemMap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phandle);
  __Pyx_XDECREF(__pyx_v_pptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18736
 * 
 * @cython.embedsignature(True)
 * def cuMemMapArrayAsync(mapInfoList : List[CUarrayMapInfo], unsigned int count, hStream):             # <<<<<<<<<<<<<<
 *     """ Maps or unmaps subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_277cuMemMapArrayAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_276cuMemMapArrayAsync[] = "cuMemMapArrayAsync(mapInfoList: List[CUarrayMapInfo], unsigned int count, hStream)\n Maps or unmaps subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays.\n\n    Performs map or unmap operations on subregions of sparse CUDA arrays\n    and sparse CUDA mipmapped arrays. Each operation is specified by a\n    :py:obj:`~.CUarrayMapInfo` entry in the `mapInfoList` array of size\n    `count`. The structure :py:obj:`~.CUarrayMapInfo` is defined as follow:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where :py:obj:`~.CUarrayMapInfo.resourceType` specifies the type of\n    resource to be operated on. If :py:obj:`~.CUarrayMapInfo.resourceType`\n    is set to :py:obj:`~.CUresourcetype`::CU_RESOURCE_TYPE_ARRAY then\n    :py:obj:`~.CUarrayMapInfo`::resource::array must be set to a valid\n    sparse CUDA array handle. The CUDA array must be either a 2D, 2D\n    layered or 3D CUDA array and must have been allocated using\n    :py:obj:`~.cuArrayCreate` or :py:obj:`~.cuArray3DCreate` with the flag\n    :py:obj:`~.CUDA_ARRAY3D_SPARSE` or\n    :py:obj:`~.CUDA_ARRAY3D_DEFERRED_MAPPING`. For CUDA arrays obtained\n    using :py:obj:`~.cuMipmappedArrayGetLevel`,\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned. If\n    :py:obj:`~.CUarrayMapInfo.resourceType` is set to\n    :py:obj:`~.CUresourcetype`::CU_RESOURCE_TYPE_MIPMAPPED_ARRAY then\n    :py:obj:`~.CUarrayMapInfo`::resource::mipmap must be set to a valid\n    sparse CUDA mipmapped array handle. The CUDA mipmapped array must be\n    either a 2D, 2D layered or 3D CUDA mipmapped array and must have been\n    allocated using :py:obj:`~.cuMipmappedArrayCreate` with the flag\n    :py:obj:`~.CUDA_ARRAY3D_SPARSE` or\n    :py:obj:`~.CUDA_ARRAY3D_DEFERRED_MAPPING`.\n\n    :py:obj:`~.CUarrayMapInfo.subresourceType` specifies the type of\n    subresource within the resource.\n    :py:obj:`~.CUarraySparseSubresourceType_enum` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code e""xample**\n\n    where\n    :py:obj:`~.CUarraySparseSubresourceType`::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL\n    indicates a sparse-miplevel which spans at least one tile in every\n    dimension. The remaining miplevels which are too small to span at least\n    one tile in any dimension constitute the mip tail region as indicated\n    by\n    :py:obj:`~.CUarraySparseSubresourceType`::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL\n    subresource type.\n\n    If :py:obj:`~.CUarrayMapInfo.subresourceType` is set to\n    :py:obj:`~.CUarraySparseSubresourceType`::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL\n    then :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel struct must\n    contain valid array subregion offsets and extents. The\n    :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::offsetX,\n    :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::offsetY and\n    :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::offsetZ must\n    specify valid X, Y and Z offsets respectively. The\n    :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::extentWidth,\n    :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::extentHeight and\n    :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::extentDepth must\n    specify valid width, height and depth extents respectively. These\n    offsets and extents must be aligned to the corresponding tile\n    dimension. For CUDA mipmapped arrays\n    :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::level must\n    specify a valid mip level index. Otherwise, must be zero. For layered\n    CUDA arrays and layered CUDA mipmapped arrays\n    :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::layer must\n    specify a valid layer index. Otherwise, must be zero.\n    :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::offsetZ must be\n    zero and\n    :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::extentDepth must\n    be set to 1 for 2D and 2D layered CUDA arrays and CUDA mipmapped\n    arrays. Tile ex""tents can be obtained by calling\n    :py:obj:`~.cuArrayGetSparseProperties` and\n    :py:obj:`~.cuMipmappedArrayGetSparseProperties`\n\n    If :py:obj:`~.CUarrayMapInfo.subresourceType` is set to\n    :py:obj:`~.CUarraySparseSubresourceType`::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL\n    then :py:obj:`~.CUarrayMapInfo`::subresource::miptail struct must\n    contain valid mip tail offset in\n    :py:obj:`~.CUarrayMapInfo`::subresource::miptail::offset and size in\n    :py:obj:`~.CUarrayMapInfo`::subresource::miptail::size. Both, mip tail\n    offset and mip tail size must be aligned to the tile size. For layered\n    CUDA mipmapped arrays which don't have the flag\n    :py:obj:`~.CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL` set in\n    :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.flags` as returned by\n    :py:obj:`~.cuMipmappedArrayGetSparseProperties`,\n    :py:obj:`~.CUarrayMapInfo`::subresource::miptail::layer must specify a\n    valid layer index. Otherwise, must be zero.\n\n    If :py:obj:`~.CUarrayMapInfo`::resource::array or\n    :py:obj:`~.CUarrayMapInfo`::resource::mipmap was created with\n    :py:obj:`~.CUDA_ARRAY3D_DEFERRED_MAPPING` flag set the\n    :py:obj:`~.CUarrayMapInfo.subresourceType` and the contents of\n    :py:obj:`~.CUarrayMapInfo`::subresource will be ignored.\n\n    :py:obj:`~.CUarrayMapInfo.memOperationType` specifies the type of\n    operation. :py:obj:`~.CUmemOperationType` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    If :py:obj:`~.CUarrayMapInfo.memOperationType` is set to\n    :py:obj:`~.CUmemOperationType`::CU_MEM_OPERATION_TYPE_MAP then the\n    subresource will be mapped onto the tile pool memory specified by\n    :py:obj:`~.CUarrayMapInfo`::memHandle at offset\n    :py:obj:`~.CUarrayMapInfo.offset`. The tile pool allocation has to be\n    created by specifying the :py:obj:`~.CU_MEM_CREATE_USAGE_TILE_POOL`\n    flag when calling :py:obj:`~.cuMemCreate`. Also,\n    :py:obj:`~.CUarrayMapInfo.memHand""leType` must be set to\n    :py:obj:`~.CUmemHandleType`::CU_MEM_HANDLE_TYPE_GENERIC.\n\n    If :py:obj:`~.CUarrayMapInfo.memOperationType` is set to\n    :py:obj:`~.CUmemOperationType`::CU_MEM_OPERATION_TYPE_UNMAP then an\n    unmapping operation is performed. :py:obj:`~.CUarrayMapInfo`::memHandle\n    must be NULL.\n\n    :py:obj:`~.CUarrayMapInfo.deviceBitMask` specifies the list of devices\n    that must map or unmap physical memory. Currently, this mask must have\n    exactly one bit set, and the corresponding device must match the device\n    associated with the stream. If\n    :py:obj:`~.CUarrayMapInfo.memOperationType` is set to\n    :py:obj:`~.CUmemOperationType`::CU_MEM_OPERATION_TYPE_MAP, the device\n    must also match the device associated with the tile pool memory\n    allocation as specified by :py:obj:`~.CUarrayMapInfo`::memHandle.\n\n    :py:obj:`~.CUarrayMapInfo.flags` and\n    :py:obj:`~.CUarrayMapInfo.reserved`[] are unused and must be set to\n    zero.\n\n    Parameters\n    ----------\n    mapInfoList : List[:py:obj:`~.CUarrayMapInfo`]\n        List of :py:obj:`~.CUarrayMapInfo`\n    count : unsigned int\n        Count of :py:obj:`~.CUarrayMapInfo` in `mapInfoList`\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier for the stream to use for map or unmap operations\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMipmappedArrayCreate`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuMemCreate`, :py:obj:`~.cuArrayGetSparseProperties`, :py:obj:`~.cuMipmappedArrayGetSparseProperties`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_277cuMemMapArrayAsync = {"cuMemMapArrayAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_277cuMemMapArrayAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_276cuMemMapArrayAsync};
static PyObject *__pyx_pw_4cuda_4cuda_277cuMemMapArrayAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_mapInfoList = 0;
  unsigned int __pyx_v_count;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemMapArrayAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mapInfoList,&__pyx_n_s_count_2,&__pyx_n_s_hStream_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mapInfoList)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemMapArrayAsync", 1, 3, 3, 1); __PYX_ERR(0, 18736, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemMapArrayAsync", 1, 3, 3, 2); __PYX_ERR(0, 18736, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemMapArrayAsync") < 0)) __PYX_ERR(0, 18736, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_mapInfoList = values[0];
    __pyx_v_count = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_count == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 18736, __pyx_L3_error)
    __pyx_v_hStream = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemMapArrayAsync", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 18736, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemMapArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_276cuMemMapArrayAsync(__pyx_self, __pyx_v_mapInfoList, __pyx_v_count, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_18cuMemMapArrayAsync_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":18890
 * 
 *     mapInfoList = [] if mapInfoList is None else mapInfoList
 *     if not all(isinstance(_x, (CUarrayMapInfo)) for _x in mapInfoList):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'mapInfoList' is not instance of type (expected List[ccuda.CUarrayMapInfo]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_18cuMemMapArrayAsync_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_11_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_11_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 18890, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_18cuMemMapArrayAsync_2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuMemMapArrayAsync_locals_genexp, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 18890, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemMapArrayAsync.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_18cuMemMapArrayAsync_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 18890, 0, __PYX_ERR(0, 18890, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 18890, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_mapInfoList)) { __Pyx_RaiseClosureNameError("mapInfoList"); __PYX_ERR(0, 18890, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_mapInfoList)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_mapInfoList)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_mapInfoList; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_mapInfoList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18890, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 18890, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 18890, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 18890, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 18890, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 18890, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUarrayMapInfo); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18736
 * 
 * @cython.embedsignature(True)
 * def cuMemMapArrayAsync(mapInfoList : List[CUarrayMapInfo], unsigned int count, hStream):             # <<<<<<<<<<<<<<
 *     """ Maps or unmaps subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_276cuMemMapArrayAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mapInfoList, unsigned int __pyx_v_count, PyObject *__pyx_v_hStream) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *__pyx_cur_scope;
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUarrayMapInfo *__pyx_v_cmapInfoList;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_18cuMemMapArrayAsync_2generator5 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct CUarrayMapInfo_st *__pyx_t_10;
  CUresult __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__748)
  __Pyx_RefNannySetupContext("cuMemMapArrayAsync", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 18736, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuMemMapArrayAsync", __pyx_f[0], 18736, 0, __PYX_ERR(0, 18736, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_mapInfoList = __pyx_v_mapInfoList;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_mapInfoList);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_mapInfoList);

  /* "cuda/cuda.pyx":18880
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18881
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18880
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18882
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18883
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18884
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18884, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18882
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18886
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18887
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     mapInfoList = [] if mapInfoList is None else mapInfoList
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18887, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":18889
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     mapInfoList = [] if mapInfoList is None else mapInfoList             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUarrayMapInfo)) for _x in mapInfoList):
 *         raise TypeError("Argument 'mapInfoList' is not instance of type (expected List[ccuda.CUarrayMapInfo]")
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_mapInfoList == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_mapInfoList);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_mapInfoList;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_mapInfoList);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_mapInfoList, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":18890
 * 
 *     mapInfoList = [] if mapInfoList is None else mapInfoList
 *     if not all(isinstance(_x, (CUarrayMapInfo)) for _x in mapInfoList):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'mapInfoList' is not instance of type (expected List[ccuda.CUarrayMapInfo]")
 * 
 */
  __pyx_t_5 = __pyx_pf_4cuda_4cuda_18cuMemMapArrayAsync_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 18890, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":18891
 *     mapInfoList = [] if mapInfoList is None else mapInfoList
 *     if not all(isinstance(_x, (CUarrayMapInfo)) for _x in mapInfoList):
 *         raise TypeError("Argument 'mapInfoList' is not instance of type (expected List[ccuda.CUarrayMapInfo]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUarrayMapInfo* cmapInfoList = NULL
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__749, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 18891, __pyx_L1_error)

    /* "cuda/cuda.pyx":18890
 * 
 *     mapInfoList = [] if mapInfoList is None else mapInfoList
 *     if not all(isinstance(_x, (CUarrayMapInfo)) for _x in mapInfoList):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'mapInfoList' is not instance of type (expected List[ccuda.CUarrayMapInfo]")
 * 
 */
  }

  /* "cuda/cuda.pyx":18893
 *         raise TypeError("Argument 'mapInfoList' is not instance of type (expected List[ccuda.CUarrayMapInfo]")
 * 
 *     cdef ccuda.CUarrayMapInfo* cmapInfoList = NULL             # <<<<<<<<<<<<<<
 *     if len(mapInfoList) > 0:
 *         cmapInfoList = <ccuda.CUarrayMapInfo*> calloc(len(mapInfoList), sizeof(ccuda.CUarrayMapInfo))
 */
  __pyx_v_cmapInfoList = NULL;

  /* "cuda/cuda.pyx":18894
 * 
 *     cdef ccuda.CUarrayMapInfo* cmapInfoList = NULL
 *     if len(mapInfoList) > 0:             # <<<<<<<<<<<<<<
 *         cmapInfoList = <ccuda.CUarrayMapInfo*> calloc(len(mapInfoList), sizeof(ccuda.CUarrayMapInfo))
 *         if cmapInfoList is NULL:
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_mapInfoList;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 18894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18895
 *     cdef ccuda.CUarrayMapInfo* cmapInfoList = NULL
 *     if len(mapInfoList) > 0:
 *         cmapInfoList = <ccuda.CUarrayMapInfo*> calloc(len(mapInfoList), sizeof(ccuda.CUarrayMapInfo))             # <<<<<<<<<<<<<<
 *         if cmapInfoList is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(mapInfoList)) + 'x' + str(sizeof(ccuda.CUarrayMapInfo)))
 */
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_mapInfoList;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 18895, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_cmapInfoList = ((CUarrayMapInfo *)calloc(__pyx_t_6, (sizeof(CUarrayMapInfo))));

    /* "cuda/cuda.pyx":18896
 *     if len(mapInfoList) > 0:
 *         cmapInfoList = <ccuda.CUarrayMapInfo*> calloc(len(mapInfoList), sizeof(ccuda.CUarrayMapInfo))
 *         if cmapInfoList is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(mapInfoList)) + 'x' + str(sizeof(ccuda.CUarrayMapInfo)))
 *         for idx in range(len(mapInfoList)):
 */
    __pyx_t_2 = ((__pyx_v_cmapInfoList == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":18897
 *         cmapInfoList = <ccuda.CUarrayMapInfo*> calloc(len(mapInfoList), sizeof(ccuda.CUarrayMapInfo))
 *         if cmapInfoList is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(mapInfoList)) + 'x' + str(sizeof(ccuda.CUarrayMapInfo)))             # <<<<<<<<<<<<<<
 *         for idx in range(len(mapInfoList)):
 *             memcpy(&cmapInfoList[idx], (<CUarrayMapInfo>mapInfoList[idx])._ptr, sizeof(ccuda.CUarrayMapInfo))
 */
      __pyx_t_3 = __pyx_cur_scope->__pyx_v_mapInfoList;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 18897, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(CUarrayMapInfo))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 18897, __pyx_L1_error)

      /* "cuda/cuda.pyx":18896
 *     if len(mapInfoList) > 0:
 *         cmapInfoList = <ccuda.CUarrayMapInfo*> calloc(len(mapInfoList), sizeof(ccuda.CUarrayMapInfo))
 *         if cmapInfoList is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(mapInfoList)) + 'x' + str(sizeof(ccuda.CUarrayMapInfo)))
 *         for idx in range(len(mapInfoList)):
 */
    }

    /* "cuda/cuda.pyx":18898
 *         if cmapInfoList is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(mapInfoList)) + 'x' + str(sizeof(ccuda.CUarrayMapInfo)))
 *         for idx in range(len(mapInfoList)):             # <<<<<<<<<<<<<<
 *             memcpy(&cmapInfoList[idx], (<CUarrayMapInfo>mapInfoList[idx])._ptr, sizeof(ccuda.CUarrayMapInfo))
 * 
 */
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_mapInfoList;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 18898, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = __pyx_t_6;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_idx = __pyx_t_9;

      /* "cuda/cuda.pyx":18899
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(mapInfoList)) + 'x' + str(sizeof(ccuda.CUarrayMapInfo)))
 *         for idx in range(len(mapInfoList)):
 *             memcpy(&cmapInfoList[idx], (<CUarrayMapInfo>mapInfoList[idx])._ptr, sizeof(ccuda.CUarrayMapInfo))             # <<<<<<<<<<<<<<
 * 
 *     if count > len(mapInfoList): raise RuntimeError("List is too small: " + str(len(mapInfoList)) + " < " + str(count))
 */
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_mapInfoList, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18899, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      (void)(memcpy((&(__pyx_v_cmapInfoList[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo *)__pyx_t_7)->__pyx_base._ptr, (sizeof(CUarrayMapInfo))));
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }

    /* "cuda/cuda.pyx":18894
 * 
 *     cdef ccuda.CUarrayMapInfo* cmapInfoList = NULL
 *     if len(mapInfoList) > 0:             # <<<<<<<<<<<<<<
 *         cmapInfoList = <ccuda.CUarrayMapInfo*> calloc(len(mapInfoList), sizeof(ccuda.CUarrayMapInfo))
 *         if cmapInfoList is NULL:
 */
  }

  /* "cuda/cuda.pyx":18901
 *             memcpy(&cmapInfoList[idx], (<CUarrayMapInfo>mapInfoList[idx])._ptr, sizeof(ccuda.CUarrayMapInfo))
 * 
 *     if count > len(mapInfoList): raise RuntimeError("List is too small: " + str(len(mapInfoList)) + " < " + str(count))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemMapArrayAsync((<CUarrayMapInfo>mapInfoList[0])._ptr if len(mapInfoList) == 1 else cmapInfoList, count, chStream)
 *     if cmapInfoList is not NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_mapInfoList;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 18901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = ((__pyx_v_count > __pyx_t_6) != 0);
  if (unlikely(__pyx_t_2)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_mapInfoList;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 18901, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 18901, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":18902
 * 
 *     if count > len(mapInfoList): raise RuntimeError("List is too small: " + str(len(mapInfoList)) + " < " + str(count))
 *     err = ccuda.cuMemMapArrayAsync((<CUarrayMapInfo>mapInfoList[0])._ptr if len(mapInfoList) == 1 else cmapInfoList, count, chStream)             # <<<<<<<<<<<<<<
 *     if cmapInfoList is not NULL:
 *         free(cmapInfoList)
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_mapInfoList;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 18902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_mapInfoList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo *)__pyx_t_5)->__pyx_base._ptr;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cmapInfoList;
  }
  __pyx_t_11 = __pyx_f_4cuda_5ccuda_cuMemMapArrayAsync(__pyx_t_10, __pyx_v_count, __pyx_v_chStream); if (unlikely(__pyx_t_11 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18902, __pyx_L1_error)
  __pyx_v_err = __pyx_t_11;

  /* "cuda/cuda.pyx":18903
 *     if count > len(mapInfoList): raise RuntimeError("List is too small: " + str(len(mapInfoList)) + " < " + str(count))
 *     err = ccuda.cuMemMapArrayAsync((<CUarrayMapInfo>mapInfoList[0])._ptr if len(mapInfoList) == 1 else cmapInfoList, count, chStream)
 *     if cmapInfoList is not NULL:             # <<<<<<<<<<<<<<
 *         free(cmapInfoList)
 *     return (CUresult(err),)
 */
  __pyx_t_2 = ((__pyx_v_cmapInfoList != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18904
 *     err = ccuda.cuMemMapArrayAsync((<CUarrayMapInfo>mapInfoList[0])._ptr if len(mapInfoList) == 1 else cmapInfoList, count, chStream)
 *     if cmapInfoList is not NULL:
 *         free(cmapInfoList)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
    free(__pyx_v_cmapInfoList);

    /* "cuda/cuda.pyx":18903
 *     if count > len(mapInfoList): raise RuntimeError("List is too small: " + str(len(mapInfoList)) + " < " + str(count))
 *     err = ccuda.cuMemMapArrayAsync((<CUarrayMapInfo>mapInfoList[0])._ptr if len(mapInfoList) == 1 else cmapInfoList, count, chStream)
 *     if cmapInfoList is not NULL:             # <<<<<<<<<<<<<<
 *         free(cmapInfoList)
 *     return (CUresult(err),)
 */
  }

  /* "cuda/cuda.pyx":18905
 *     if cmapInfoList is not NULL:
 *         free(cmapInfoList)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_5 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18736
 * 
 * @cython.embedsignature(True)
 * def cuMemMapArrayAsync(mapInfoList : List[CUarrayMapInfo], unsigned int count, hStream):             # <<<<<<<<<<<<<<
 *     """ Maps or unmaps subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuMemMapArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_18cuMemMapArrayAsync_2generator5);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18908
 * 
 * @cython.embedsignature(True)
 * def cuMemUnmap(ptr, size_t size):             # <<<<<<<<<<<<<<
 *     """ Unmap the backing memory of a given address range.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_279cuMemUnmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_278cuMemUnmap[] = "cuMemUnmap(ptr, size_t size)\n Unmap the backing memory of a given address range.\n\n    The range must be the entire contiguous address range that was mapped\n    to. In other words, :py:obj:`~.cuMemUnmap` cannot unmap a sub-range of\n    an address range mapped by :py:obj:`~.cuMemCreate` /\n    :py:obj:`~.cuMemMap`. Any backing memory allocations will be freed if\n    there are no existing mappings and there are no unreleased memory\n    handles.\n\n    When :py:obj:`~.cuMemUnmap` returns successfully the address range is\n    converted to an address reservation and can be used for a future calls\n    to :py:obj:`~.cuMemMap`. Any new mapping to this virtual address will\n    need to have access granted through :py:obj:`~.cuMemSetAccess`, as all\n    mappings start with no accessibility setup.\n\n    Parameters\n    ----------\n    ptr : :py:obj:`~.CUdeviceptr`\n        Starting address for the virtual address range to unmap\n    size : size_t\n        Size of the virtual address range to unmap\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemAddressReserve`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_279cuMemUnmap = {"cuMemUnmap", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_279cuMemUnmap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_278cuMemUnmap};
static PyObject *__pyx_pw_4cuda_4cuda_279cuMemUnmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ptr = 0;
  size_t __pyx_v_size;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemUnmap (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr_2,&__pyx_n_s_size_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemUnmap", 1, 2, 2, 1); __PYX_ERR(0, 18908, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemUnmap") < 0)) __PYX_ERR(0, 18908, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_ptr = values[0];
    __pyx_v_size = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 18908, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemUnmap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 18908, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemUnmap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_278cuMemUnmap(__pyx_self, __pyx_v_ptr, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_278cuMemUnmap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr, size_t __pyx_v_size) {
  CUdeviceptr __pyx_v_cptr;
  PyObject *__pyx_v_pptr = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__750)
  __Pyx_RefNannySetupContext("cuMemUnmap", 0);
  __Pyx_TraceCall("cuMemUnmap", __pyx_f[0], 18908, 0, __PYX_ERR(0, 18908, __pyx_L1_error));

  /* "cuda/cuda.pyx":18941
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_ptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18942
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 */
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18941
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18943
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":18944
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18945
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18945, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":18943
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":18947
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 *         pptr = int(CUdeviceptr(ptr))             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":18948
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemUnmap(cptr, size)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18948, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":18950
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 *     err = ccuda.cuMemUnmap(cptr, size)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemUnmap(__pyx_v_cptr, __pyx_v_size); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 18950, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":18951
 * 
 *     err = ccuda.cuMemUnmap(cptr, size)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 18951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18908
 * 
 * @cython.embedsignature(True)
 * def cuMemUnmap(ptr, size_t size):             # <<<<<<<<<<<<<<
 *     """ Unmap the backing memory of a given address range.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemUnmap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18954
 * 
 * @cython.embedsignature(True)
 * def cuMemSetAccess(ptr, size_t size, desc : List[CUmemAccessDesc], size_t count):             # <<<<<<<<<<<<<<
 *     """ Set the access flags for each location specified in `desc` for the given virtual address range.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_281cuMemSetAccess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_280cuMemSetAccess[] = "cuMemSetAccess(ptr, size_t size, desc: List[CUmemAccessDesc], size_t count)\n Set the access flags for each location specified in `desc` for the given virtual address range.\n\n    Given the virtual address range via `ptr` and `size`, and the locations\n    in the array given by `desc` and `count`, set the access flags for the\n    target locations. The range must be a fully mapped address range\n    containing all allocations created by :py:obj:`~.cuMemMap` /\n    :py:obj:`~.cuMemCreate`.\n\n    Parameters\n    ----------\n    ptr : :py:obj:`~.CUdeviceptr`\n        Starting address for the virtual address range\n    size : size_t\n        Length of the virtual address range\n    desc : List[:py:obj:`~.CUmemAccessDesc`]\n        Array of :py:obj:`~.CUmemAccessDesc` that describe how to change\n        the\n    count : size_t\n        Number of :py:obj:`~.CUmemAccessDesc` in `desc`\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemSetAccess`, :py:obj:`~.cuMemCreate`, :py:obj:`~.py`:obj:`~.cuMemMap`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_281cuMemSetAccess = {"cuMemSetAccess", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_281cuMemSetAccess, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_280cuMemSetAccess};
static PyObject *__pyx_pw_4cuda_4cuda_281cuMemSetAccess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ptr = 0;
  size_t __pyx_v_size;
  PyObject *__pyx_v_desc = 0;
  size_t __pyx_v_count;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemSetAccess (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr_2,&__pyx_n_s_size_2,&__pyx_n_s_desc,&__pyx_n_s_count_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemSetAccess", 1, 4, 4, 1); __PYX_ERR(0, 18954, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemSetAccess", 1, 4, 4, 2); __PYX_ERR(0, 18954, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemSetAccess", 1, 4, 4, 3); __PYX_ERR(0, 18954, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemSetAccess") < 0)) __PYX_ERR(0, 18954, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_ptr = values[0];
    __pyx_v_size = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 18954, __pyx_L3_error)
    __pyx_v_desc = values[2];
    __pyx_v_count = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_count == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 18954, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemSetAccess", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 18954, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_280cuMemSetAccess(__pyx_self, __pyx_v_ptr, __pyx_v_size, __pyx_v_desc, __pyx_v_count);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_14cuMemSetAccess_2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":18985
 *     """
 *     desc = [] if desc is None else desc
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in desc):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'desc' is not instance of type (expected List[ccuda.CUmemAccessDesc]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_14cuMemSetAccess_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_13_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_13_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 18985, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_14cuMemSetAccess_2generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuMemSetAccess_locals_genexpr, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 18985, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemSetAccess.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_14cuMemSetAccess_2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 18985, 0, __PYX_ERR(0, 18985, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 18985, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_desc)) { __Pyx_RaiseClosureNameError("desc"); __PYX_ERR(0, 18985, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_desc)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_desc)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_desc; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_desc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18985, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 18985, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 18985, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 18985, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 18985, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 18985, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUmemAccessDesc); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":18954
 * 
 * @cython.embedsignature(True)
 * def cuMemSetAccess(ptr, size_t size, desc : List[CUmemAccessDesc], size_t count):             # <<<<<<<<<<<<<<
 *     """ Set the access flags for each location specified in `desc` for the given virtual address range.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_280cuMemSetAccess(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr, size_t __pyx_v_size, PyObject *__pyx_v_desc, size_t __pyx_v_count) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *__pyx_cur_scope;
  CUdeviceptr __pyx_v_cptr;
  PyObject *__pyx_v_pptr = NULL;
  CUmemAccessDesc *__pyx_v_cdesc;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_14cuMemSetAccess_2generator6 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct CUmemAccessDesc_st *__pyx_t_10;
  CUresult __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__751)
  __Pyx_RefNannySetupContext("cuMemSetAccess", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 18954, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuMemSetAccess", __pyx_f[0], 18954, 0, __PYX_ERR(0, 18954, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_desc = __pyx_v_desc;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_desc);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_desc);

  /* "cuda/cuda.pyx":18984
 *     :py:obj:`~.cuMemSetAccess`, :py:obj:`~.cuMemCreate`, :py:obj:`~.py`:obj:`~.cuMemMap`
 *     """
 *     desc = [] if desc is None else desc             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in desc):
 *         raise TypeError("Argument 'desc' is not instance of type (expected List[ccuda.CUmemAccessDesc]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_desc == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_desc);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_desc;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_desc);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_desc, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":18985
 *     """
 *     desc = [] if desc is None else desc
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in desc):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'desc' is not instance of type (expected List[ccuda.CUmemAccessDesc]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_14cuMemSetAccess_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 18985, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":18986
 *     desc = [] if desc is None else desc
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in desc):
 *         raise TypeError("Argument 'desc' is not instance of type (expected List[ccuda.CUmemAccessDesc]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cptr
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__752, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 18986, __pyx_L1_error)

    /* "cuda/cuda.pyx":18985
 *     """
 *     desc = [] if desc is None else desc
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in desc):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'desc' is not instance of type (expected List[ccuda.CUmemAccessDesc]")
 * 
 */
  }

  /* "cuda/cuda.pyx":18989
 * 
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
  __pyx_t_4 = (__pyx_v_ptr == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":18990
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 */
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":18989
 * 
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":18991
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":18992
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":18993
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18993, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":18991
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":18995
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 *         pptr = int(CUdeviceptr(ptr))             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pptr = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":18996
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUmemAccessDesc* cdesc = NULL
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 18996, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":18998
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 *     cdef ccuda.CUmemAccessDesc* cdesc = NULL             # <<<<<<<<<<<<<<
 *     if len(desc) > 0:
 *         cdesc = <ccuda.CUmemAccessDesc*> calloc(len(desc), sizeof(ccuda.CUmemAccessDesc))
 */
  __pyx_v_cdesc = NULL;

  /* "cuda/cuda.pyx":18999
 * 
 *     cdef ccuda.CUmemAccessDesc* cdesc = NULL
 *     if len(desc) > 0:             # <<<<<<<<<<<<<<
 *         cdesc = <ccuda.CUmemAccessDesc*> calloc(len(desc), sizeof(ccuda.CUmemAccessDesc))
 *         if cdesc is NULL:
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_desc;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 18999, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":19000
 *     cdef ccuda.CUmemAccessDesc* cdesc = NULL
 *     if len(desc) > 0:
 *         cdesc = <ccuda.CUmemAccessDesc*> calloc(len(desc), sizeof(ccuda.CUmemAccessDesc))             # <<<<<<<<<<<<<<
 *         if cdesc is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(desc)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 */
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_desc;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19000, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cdesc = ((CUmemAccessDesc *)calloc(__pyx_t_6, (sizeof(CUmemAccessDesc))));

    /* "cuda/cuda.pyx":19001
 *     if len(desc) > 0:
 *         cdesc = <ccuda.CUmemAccessDesc*> calloc(len(desc), sizeof(ccuda.CUmemAccessDesc))
 *         if cdesc is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(desc)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 *         for idx in range(len(desc)):
 */
    __pyx_t_4 = ((__pyx_v_cdesc == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":19002
 *         cdesc = <ccuda.CUmemAccessDesc*> calloc(len(desc), sizeof(ccuda.CUmemAccessDesc))
 *         if cdesc is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(desc)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))             # <<<<<<<<<<<<<<
 *         for idx in range(len(desc)):
 *             memcpy(&cdesc[idx], (<CUmemAccessDesc>desc[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))
 */
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_desc;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19002, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemAccessDesc))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 19002, __pyx_L1_error)

      /* "cuda/cuda.pyx":19001
 *     if len(desc) > 0:
 *         cdesc = <ccuda.CUmemAccessDesc*> calloc(len(desc), sizeof(ccuda.CUmemAccessDesc))
 *         if cdesc is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(desc)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 *         for idx in range(len(desc)):
 */
    }

    /* "cuda/cuda.pyx":19003
 *         if cdesc is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(desc)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 *         for idx in range(len(desc)):             # <<<<<<<<<<<<<<
 *             memcpy(&cdesc[idx], (<CUmemAccessDesc>desc[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))
 * 
 */
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_desc;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19003, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = __pyx_t_6;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_idx = __pyx_t_9;

      /* "cuda/cuda.pyx":19004
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(desc)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 *         for idx in range(len(desc)):
 *             memcpy(&cdesc[idx], (<CUmemAccessDesc>desc[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))             # <<<<<<<<<<<<<<
 * 
 *     if count > <size_t>len(desc): raise RuntimeError("List is too small: " + str(len(desc)) + " < " + str(count))
 */
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_desc, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19004, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      (void)(memcpy((&(__pyx_v_cdesc[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc *)__pyx_t_7)->__pyx_base._ptr, (sizeof(CUmemAccessDesc))));
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }

    /* "cuda/cuda.pyx":18999
 * 
 *     cdef ccuda.CUmemAccessDesc* cdesc = NULL
 *     if len(desc) > 0:             # <<<<<<<<<<<<<<
 *         cdesc = <ccuda.CUmemAccessDesc*> calloc(len(desc), sizeof(ccuda.CUmemAccessDesc))
 *         if cdesc is NULL:
 */
  }

  /* "cuda/cuda.pyx":19006
 *             memcpy(&cdesc[idx], (<CUmemAccessDesc>desc[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))
 * 
 *     if count > <size_t>len(desc): raise RuntimeError("List is too small: " + str(len(desc)) + " < " + str(count))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemSetAccess(cptr, size, (<CUmemAccessDesc>desc[0])._ptr if len(desc) == 1 else cdesc, count)
 *     if cdesc is not NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_desc;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = ((__pyx_v_count > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_desc;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19006, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 19006, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":19007
 * 
 *     if count > <size_t>len(desc): raise RuntimeError("List is too small: " + str(len(desc)) + " < " + str(count))
 *     err = ccuda.cuMemSetAccess(cptr, size, (<CUmemAccessDesc>desc[0])._ptr if len(desc) == 1 else cdesc, count)             # <<<<<<<<<<<<<<
 *     if cdesc is not NULL:
 *         free(cdesc)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_desc;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19007, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_desc, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc *)__pyx_t_3)->__pyx_base._ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cdesc;
  }
  __pyx_t_11 = __pyx_f_4cuda_5ccuda_cuMemSetAccess(__pyx_v_cptr, __pyx_v_size, __pyx_t_10, __pyx_v_count); if (unlikely(__pyx_t_11 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19007, __pyx_L1_error)
  __pyx_v_err = __pyx_t_11;

  /* "cuda/cuda.pyx":19008
 *     if count > <size_t>len(desc): raise RuntimeError("List is too small: " + str(len(desc)) + " < " + str(count))
 *     err = ccuda.cuMemSetAccess(cptr, size, (<CUmemAccessDesc>desc[0])._ptr if len(desc) == 1 else cdesc, count)
 *     if cdesc is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdesc)
 *     return (CUresult(err),)
 */
  __pyx_t_4 = ((__pyx_v_cdesc != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":19009
 *     err = ccuda.cuMemSetAccess(cptr, size, (<CUmemAccessDesc>desc[0])._ptr if len(desc) == 1 else cdesc, count)
 *     if cdesc is not NULL:
 *         free(cdesc)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
    free(__pyx_v_cdesc);

    /* "cuda/cuda.pyx":19008
 *     if count > <size_t>len(desc): raise RuntimeError("List is too small: " + str(len(desc)) + " < " + str(count))
 *     err = ccuda.cuMemSetAccess(cptr, size, (<CUmemAccessDesc>desc[0])._ptr if len(desc) == 1 else cdesc, count)
 *     if cdesc is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdesc)
 *     return (CUresult(err),)
 */
  }

  /* "cuda/cuda.pyx":19010
 *     if cdesc is not NULL:
 *         free(cdesc)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":18954
 * 
 * @cython.embedsignature(True)
 * def cuMemSetAccess(ptr, size_t size, desc : List[CUmemAccessDesc], size_t count):             # <<<<<<<<<<<<<<
 *     """ Set the access flags for each location specified in `desc` for the given virtual address range.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuMemSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pptr);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_14cuMemSetAccess_2generator6);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19013
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAccess(location : CUmemLocation, ptr):             # <<<<<<<<<<<<<<
 *     """ Get the access `flags` set for the given `location` and `ptr`.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_283cuMemGetAccess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_282cuMemGetAccess[] = "cuMemGetAccess(CUmemLocation location: CUmemLocation, ptr)\n Get the access `flags` set for the given `location` and `ptr`.\n\n    Parameters\n    ----------\n    location : :py:obj:`~.CUmemLocation`\n        Location in which to check the flags for\n    ptr : :py:obj:`~.CUdeviceptr`\n        Address in which to check the access flags for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n    flags : unsigned long long\n        Flags set for this location\n\n    See Also\n    --------\n    :py:obj:`~.cuMemSetAccess`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_283cuMemGetAccess = {"cuMemGetAccess", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_283cuMemGetAccess, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_282cuMemGetAccess};
static PyObject *__pyx_pw_4cuda_4cuda_283cuMemGetAccess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_4cuda_4cuda_CUmemLocation *__pyx_v_location = 0;
  PyObject *__pyx_v_ptr = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemGetAccess (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_location_2,&__pyx_n_s_ptr_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_location_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemGetAccess", 1, 2, 2, 1); __PYX_ERR(0, 19013, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemGetAccess") < 0)) __PYX_ERR(0, 19013, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_location = ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)values[0]);
    __pyx_v_ptr = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemGetAccess", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19013, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_location), __pyx_ptype_4cuda_4cuda_CUmemLocation, 1, "location", 0))) __PYX_ERR(0, 19013, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_282cuMemGetAccess(__pyx_self, __pyx_v_location, __pyx_v_ptr);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_282cuMemGetAccess(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUmemLocation *__pyx_v_location, PyObject *__pyx_v_ptr) {
  CUdeviceptr __pyx_v_cptr;
  PyObject *__pyx_v_pptr = NULL;
  unsigned PY_LONG_LONG __pyx_v_flags;
  CUmemLocation *__pyx_v_clocation_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUmemLocation_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__753)
  __Pyx_RefNannySetupContext("cuMemGetAccess", 0);
  __Pyx_TraceCall("cuMemGetAccess", __pyx_f[0], 19013, 0, __PYX_ERR(0, 19013, __pyx_L1_error));

  /* "cuda/cuda.pyx":19035
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_ptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19036
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 */
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19035
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19037
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19038
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19039
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19039, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19037
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19041
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 *         pptr = int(CUdeviceptr(ptr))             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19042
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 * 
 *     cdef unsigned long long flags = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19042, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19044
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 *     cdef unsigned long long flags = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUmemLocation* clocation_ptr = location._ptr if location != None else NULL
 *     err = ccuda.cuMemGetAccess(&flags, clocation_ptr, cptr)
 */
  __pyx_v_flags = 0;

  /* "cuda/cuda.pyx":19045
 * 
 *     cdef unsigned long long flags = 0
 *     cdef ccuda.CUmemLocation* clocation_ptr = location._ptr if location != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemGetAccess(&flags, clocation_ptr, cptr)
 *     return (CUresult(err), flags)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_location), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19045, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 19045, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_location->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_clocation_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":19046
 *     cdef unsigned long long flags = 0
 *     cdef ccuda.CUmemLocation* clocation_ptr = location._ptr if location != None else NULL
 *     err = ccuda.cuMemGetAccess(&flags, clocation_ptr, cptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), flags)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuMemGetAccess((&__pyx_v_flags), __pyx_v_clocation_ptr, __pyx_v_cptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19046, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":19047
 *     cdef ccuda.CUmemLocation* clocation_ptr = location._ptr if location != None else NULL
 *     err = ccuda.cuMemGetAccess(&flags, clocation_ptr, cptr)
 *     return (CUresult(err), flags)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 19047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 19047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19013
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAccess(location : CUmemLocation, ptr):             # <<<<<<<<<<<<<<
 *     """ Get the access `flags` set for the given `location` and `ptr`.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMemGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19050
 * 
 * @cython.embedsignature(True)
 * def cuMemExportToShareableHandle(handle, handleType not None : CUmemAllocationHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Exports an allocation to a requested shareable handle type.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_285cuMemExportToShareableHandle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_284cuMemExportToShareableHandle[] = "cuMemExportToShareableHandle(handle, handleType: CUmemAllocationHandleType, unsigned long long flags)\n Exports an allocation to a requested shareable handle type.\n\n    Given a CUDA memory handle, create a shareable memory allocation handle\n    that can be used to share the memory with other processes. The\n    recipient process can convert the shareable handle back into a CUDA\n    memory handle using :py:obj:`~.cuMemImportFromShareableHandle` and map\n    it with :py:obj:`~.cuMemMap`. The implementation of what this handle is\n    and how it can be transferred is defined by the requested handle type\n    in `handleType`\n\n    Once all shareable handles are closed and the allocation is released,\n    the allocated memory referenced will be released back to the OS and\n    uses of the CUDA handle afterward will lead to undefined behavior.\n\n    This API can also be used in conjunction with other APIs (e.g. Vulkan,\n    OpenGL) that support importing memory from the shareable type\n\n    Parameters\n    ----------\n    handle : :py:obj:`~.CUmemGenericAllocationHandle`\n        CUDA handle for the memory allocation\n    handleType : :py:obj:`~.CUmemAllocationHandleType`\n        Type of shareable handle requested (defines type and size of the\n        `shareableHandle` output parameter)\n    flags : unsigned long long\n        Reserved, must be zero\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n    shareableHandle : Any\n        Pointer to the location in which to store the requested handle type\n\n    See Also\n    --------\n    :py:obj:`~.cuMemImportFromShareableHandle`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_285cuMemExportToShareableHandle = {"cuMemExportToShareableHandle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_285cuMemExportToShareableHandle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_284cuMemExportToShareableHandle};
static PyObject *__pyx_pw_4cuda_4cuda_285cuMemExportToShareableHandle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_handle = 0;
  PyObject *__pyx_v_handleType = 0;
  unsigned PY_LONG_LONG __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemExportToShareableHandle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handle_2,&__pyx_n_s_handleType,&__pyx_n_s_flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleType)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemExportToShareableHandle", 1, 3, 3, 1); __PYX_ERR(0, 19050, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemExportToShareableHandle", 1, 3, 3, 2); __PYX_ERR(0, 19050, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemExportToShareableHandle") < 0)) __PYX_ERR(0, 19050, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_handle = values[0];
    __pyx_v_handleType = values[1];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[2]); if (unlikely((__pyx_v_flags == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19050, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemExportToShareableHandle", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19050, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_handleType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "handleType"); __PYX_ERR(0, 19050, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_284cuMemExportToShareableHandle(__pyx_self, __pyx_v_handle, __pyx_v_handleType, __pyx_v_flags);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_284cuMemExportToShareableHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_handle, PyObject *__pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUmemGenericAllocationHandle __pyx_v_chandle;
  PyObject *__pyx_v_phandle = NULL;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType *__pyx_v_cshareableHandle = 0;
  void *__pyx_v_cshareableHandle_ptr;
  CUmemAllocationHandleType __pyx_v_chandleType;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUmemAllocationHandleType __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__754)
  __Pyx_RefNannySetupContext("cuMemExportToShareableHandle", 0);
  __Pyx_TraceCall("cuMemExportToShareableHandle", __pyx_f[0], 19050, 0, __PYX_ERR(0, 19050, __pyx_L1_error));

  /* "cuda/cuda.pyx":19090
 *     """
 *     cdef ccuda.CUmemGenericAllocationHandle chandle
 *     if handle is None:             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 */
  __pyx_t_1 = (__pyx_v_handle == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19091
 *     cdef ccuda.CUmemGenericAllocationHandle chandle
 *     if handle is None:
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 *         phandle = int(handle)
 */
    __pyx_v_chandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19090
 *     """
 *     cdef ccuda.CUmemGenericAllocationHandle chandle
 *     if handle is None:             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19092
 *     if handle is None:
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):             # <<<<<<<<<<<<<<
 *         phandle = int(handle)
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_handle, __pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19093
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 *         phandle = int(handle)             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phandle = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19094
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 *         phandle = int(handle)
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle             # <<<<<<<<<<<<<<
 *     else:
 *         phandle = int(CUmemGenericAllocationHandle(handle))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phandle); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19094, __pyx_L1_error)
    __pyx_v_chandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19092
 *     if handle is None:
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):             # <<<<<<<<<<<<<<
 *         phandle = int(handle)
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19096
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 *     else:
 *         phandle = int(CUmemGenericAllocationHandle(handle))             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle), __pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phandle = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19097
 *     else:
 *         phandle = int(CUmemGenericAllocationHandle(handle))
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle             # <<<<<<<<<<<<<<
 * 
 *     cdef utils.HelperCUmemAllocationHandleType cshareableHandle = utils.HelperCUmemAllocationHandleType(handleType)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phandle); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19097, __pyx_L1_error)
    __pyx_v_chandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19099
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 * 
 *     cdef utils.HelperCUmemAllocationHandleType cshareableHandle = utils.HelperCUmemAllocationHandleType(handleType)             # <<<<<<<<<<<<<<
 *     cdef void* cshareableHandle_ptr = <void*><void_ptr>cshareableHandle.cptr
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType), __pyx_v_handleType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_cshareableHandle = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":19100
 * 
 *     cdef utils.HelperCUmemAllocationHandleType cshareableHandle = utils.HelperCUmemAllocationHandleType(handleType)
 *     cdef void* cshareableHandle_ptr = <void*><void_ptr>cshareableHandle.cptr             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value
 *     err = ccuda.cuMemExportToShareableHandle(cshareableHandle_ptr, chandle, chandleType, flags)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cshareableHandle), __pyx_n_s_cptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cshareableHandle_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":19101
 *     cdef utils.HelperCUmemAllocationHandleType cshareableHandle = utils.HelperCUmemAllocationHandleType(handleType)
 *     cdef void* cshareableHandle_ptr = <void*><void_ptr>cshareableHandle.cptr
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemExportToShareableHandle(cshareableHandle_ptr, chandle, chandleType, flags)
 *     return (CUresult(err), cshareableHandle.pyObj())
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_handleType, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUmemAllocationHandleType_enum)__Pyx_PyInt_As_enum__CUmemAllocationHandleType_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 19101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_chandleType = __pyx_t_6;

  /* "cuda/cuda.pyx":19102
 *     cdef void* cshareableHandle_ptr = <void*><void_ptr>cshareableHandle.cptr
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value
 *     err = ccuda.cuMemExportToShareableHandle(cshareableHandle_ptr, chandle, chandleType, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), cshareableHandle.pyObj())
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuMemExportToShareableHandle(__pyx_v_cshareableHandle_ptr, __pyx_v_chandle, __pyx_v_chandleType, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19102, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":19103
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value
 *     err = ccuda.cuMemExportToShareableHandle(cshareableHandle_ptr, chandle, chandleType, flags)
 *     return (CUresult(err), cshareableHandle.pyObj())             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 19103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cshareableHandle), __pyx_n_s_pyObj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 19103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 19103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19050
 * 
 * @cython.embedsignature(True)
 * def cuMemExportToShareableHandle(handle, handleType not None : CUmemAllocationHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Exports an allocation to a requested shareable handle type.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMemExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phandle);
  __Pyx_XDECREF((PyObject *)__pyx_v_cshareableHandle);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19106
 * 
 * @cython.embedsignature(True)
 * def cuMemImportFromShareableHandle(osHandle, shHandleType not None : CUmemAllocationHandleType):             # <<<<<<<<<<<<<<
 *     """ Imports an allocation from a requested shareable handle type.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_287cuMemImportFromShareableHandle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_286cuMemImportFromShareableHandle[] = "cuMemImportFromShareableHandle(osHandle, shHandleType: CUmemAllocationHandleType)\n Imports an allocation from a requested shareable handle type.\n\n    If the current process cannot support the memory described by this\n    shareable handle, this API will error as CUDA_ERROR_NOT_SUPPORTED.\n\n    Parameters\n    ----------\n    osHandle : Any\n        Shareable Handle representing the memory allocation that is to be\n        imported.\n    shHandleType : :py:obj:`~.CUmemAllocationHandleType`\n        handle type of the exported handle\n        :py:obj:`~.CUmemAllocationHandleType`.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n    handle : :py:obj:`~.CUmemGenericAllocationHandle`\n        CUDA Memory handle for the memory allocation.\n\n    See Also\n    --------\n    :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemMap`, :py:obj:`~.cuMemRelease`\n\n    Notes\n    -----\n    Importing shareable handles exported from some graphics APIs(VUlkan, OpenGL, etc) created on devices under an SLI group may not be supported, and thus this API will return CUDA_ERROR_NOT_SUPPORTED. There is no guarantee that the contents of `handle` will be the same CUDA memory handle for the same given OS shareable handle, or the same underlying allocation.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_287cuMemImportFromShareableHandle = {"cuMemImportFromShareableHandle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_287cuMemImportFromShareableHandle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_286cuMemImportFromShareableHandle};
static PyObject *__pyx_pw_4cuda_4cuda_287cuMemImportFromShareableHandle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_osHandle = 0;
  PyObject *__pyx_v_shHandleType = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemImportFromShareableHandle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_osHandle,&__pyx_n_s_shHandleType,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_osHandle)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shHandleType)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemImportFromShareableHandle", 1, 2, 2, 1); __PYX_ERR(0, 19106, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemImportFromShareableHandle") < 0)) __PYX_ERR(0, 19106, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_osHandle = values[0];
    __pyx_v_shHandleType = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemImportFromShareableHandle", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19106, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_shHandleType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "shHandleType"); __PYX_ERR(0, 19106, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_286cuMemImportFromShareableHandle(__pyx_self, __pyx_v_osHandle, __pyx_v_shHandleType);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_286cuMemImportFromShareableHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_osHandle, PyObject *__pyx_v_shHandleType) {
  struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_handle = 0;
  PyObject *__pyx_v_cosHandle = NULL;
  void *__pyx_v_cosHandle_ptr;
  CUmemAllocationHandleType __pyx_v_cshHandleType;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  CUmemAllocationHandleType __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__755)
  __Pyx_RefNannySetupContext("cuMemImportFromShareableHandle", 0);
  __Pyx_TraceCall("cuMemImportFromShareableHandle", __pyx_f[0], 19106, 0, __PYX_ERR(0, 19106, __pyx_L1_error));

  /* "cuda/cuda.pyx":19136
 *     Importing shareable handles exported from some graphics APIs(VUlkan, OpenGL, etc) created on devices under an SLI group may not be supported, and thus this API will return CUDA_ERROR_NOT_SUPPORTED. There is no guarantee that the contents of `handle` will be the same CUDA memory handle for the same given OS shareable handle, or the same underlying allocation.
 *     """
 *     cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle()             # <<<<<<<<<<<<<<
 *     cosHandle = utils.HelperInputVoidPtr(osHandle)
 *     cdef void* cosHandle_ptr = <void*><void_ptr>cosHandle.cptr
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_handle = ((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19137
 *     """
 *     cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle()
 *     cosHandle = utils.HelperInputVoidPtr(osHandle)             # <<<<<<<<<<<<<<
 *     cdef void* cosHandle_ptr = <void*><void_ptr>cosHandle.cptr
 *     cdef ccuda.CUmemAllocationHandleType cshHandleType = shHandleType.value
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_osHandle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cosHandle = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19138
 *     cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle()
 *     cosHandle = utils.HelperInputVoidPtr(osHandle)
 *     cdef void* cosHandle_ptr = <void*><void_ptr>cosHandle.cptr             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUmemAllocationHandleType cshHandleType = shHandleType.value
 *     err = ccuda.cuMemImportFromShareableHandle(handle._ptr, cosHandle_ptr, cshHandleType)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cosHandle, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cosHandle_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":19139
 *     cosHandle = utils.HelperInputVoidPtr(osHandle)
 *     cdef void* cosHandle_ptr = <void*><void_ptr>cosHandle.cptr
 *     cdef ccuda.CUmemAllocationHandleType cshHandleType = shHandleType.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemImportFromShareableHandle(handle._ptr, cosHandle_ptr, cshHandleType)
 *     return (CUresult(err), handle)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_shHandleType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = ((enum CUmemAllocationHandleType_enum)__Pyx_PyInt_As_enum__CUmemAllocationHandleType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 19139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cshHandleType = __pyx_t_3;

  /* "cuda/cuda.pyx":19140
 *     cdef void* cosHandle_ptr = <void*><void_ptr>cosHandle.cptr
 *     cdef ccuda.CUmemAllocationHandleType cshHandleType = shHandleType.value
 *     err = ccuda.cuMemImportFromShareableHandle(handle._ptr, cosHandle_ptr, cshHandleType)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), handle)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuMemImportFromShareableHandle(__pyx_v_handle->_ptr, __pyx_v_cosHandle_ptr, __pyx_v_cshHandleType); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19140, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":19141
 *     cdef ccuda.CUmemAllocationHandleType cshHandleType = shHandleType.value
 *     err = ccuda.cuMemImportFromShareableHandle(handle._ptr, cosHandle_ptr, cshHandleType)
 *     return (CUresult(err), handle)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 19141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_handle));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_handle));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19106
 * 
 * @cython.embedsignature(True)
 * def cuMemImportFromShareableHandle(osHandle, shHandleType not None : CUmemAllocationHandleType):             # <<<<<<<<<<<<<<
 *     """ Imports an allocation from a requested shareable handle type.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuMemImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  __Pyx_XDECREF(__pyx_v_cosHandle);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19144
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAllocationGranularity(prop : CUmemAllocationProp, option not None : CUmemAllocationGranularity_flags):             # <<<<<<<<<<<<<<
 *     """ Calculates either the minimal or recommended granularity.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_289cuMemGetAllocationGranularity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_288cuMemGetAllocationGranularity[] = "cuMemGetAllocationGranularity(CUmemAllocationProp prop: CUmemAllocationProp, option: CUmemAllocationGranularity_flags)\n Calculates either the minimal or recommended granularity.\n\n    Calculates either the minimal or recommended granularity for a given\n    allocation specification and returns it in granularity. This\n    granularity can be used as a multiple for alignment, size, or address\n    mapping.\n\n    Parameters\n    ----------\n    prop : :py:obj:`~.CUmemAllocationProp`\n        Property for which to determine the granularity for\n    option : :py:obj:`~.CUmemAllocationGranularity_flags`\n        Determines which granularity to return\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n    granularity : int\n        Returned granularity.\n\n    See Also\n    --------\n    :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemMap`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_289cuMemGetAllocationGranularity = {"cuMemGetAllocationGranularity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_289cuMemGetAllocationGranularity, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_288cuMemGetAllocationGranularity};
static PyObject *__pyx_pw_4cuda_4cuda_289cuMemGetAllocationGranularity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp *__pyx_v_prop = 0;
  PyObject *__pyx_v_option = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemGetAllocationGranularity (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_option,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_option)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemGetAllocationGranularity", 1, 2, 2, 1); __PYX_ERR(0, 19144, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemGetAllocationGranularity") < 0)) __PYX_ERR(0, 19144, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_prop = ((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp *)values[0]);
    __pyx_v_option = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemGetAllocationGranularity", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19144, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemGetAllocationGranularity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_prop), __pyx_ptype_4cuda_4cuda_CUmemAllocationProp, 1, "prop", 0))) __PYX_ERR(0, 19144, __pyx_L1_error)
  if (unlikely(((PyObject *)__pyx_v_option) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "option"); __PYX_ERR(0, 19144, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_288cuMemGetAllocationGranularity(__pyx_self, __pyx_v_prop, __pyx_v_option);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_288cuMemGetAllocationGranularity(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp *__pyx_v_prop, PyObject *__pyx_v_option) {
  size_t __pyx_v_granularity;
  CUmemAllocationProp *__pyx_v_cprop_ptr;
  CUmemAllocationGranularity_flags __pyx_v_coption;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  struct CUmemAllocationProp_st *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  CUmemAllocationGranularity_flags __pyx_t_4;
  CUresult __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__756)
  __Pyx_RefNannySetupContext("cuMemGetAllocationGranularity", 0);
  __Pyx_TraceCall("cuMemGetAllocationGranularity", __pyx_f[0], 19144, 0, __PYX_ERR(0, 19144, __pyx_L1_error));

  /* "cuda/cuda.pyx":19170
 *     :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemMap`
 *     """
 *     cdef size_t granularity = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUmemAllocationProp* cprop_ptr = prop._ptr if prop != None else NULL
 *     cdef ccuda.CUmemAllocationGranularity_flags coption = option.value
 */
  __pyx_v_granularity = 0;

  /* "cuda/cuda.pyx":19171
 *     """
 *     cdef size_t granularity = 0
 *     cdef ccuda.CUmemAllocationProp* cprop_ptr = prop._ptr if prop != None else NULL             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUmemAllocationGranularity_flags coption = option.value
 *     err = ccuda.cuMemGetAllocationGranularity(&granularity, cprop_ptr, coption)
 */
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_prop), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19171, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 19171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __pyx_t_1 = __pyx_v_prop->__pyx_base._ptr;
  } else {
    __pyx_t_1 = NULL;
  }
  __pyx_v_cprop_ptr = __pyx_t_1;

  /* "cuda/cuda.pyx":19172
 *     cdef size_t granularity = 0
 *     cdef ccuda.CUmemAllocationProp* cprop_ptr = prop._ptr if prop != None else NULL
 *     cdef ccuda.CUmemAllocationGranularity_flags coption = option.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemGetAllocationGranularity(&granularity, cprop_ptr, coption)
 *     return (CUresult(err), granularity)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_option, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = ((enum CUmemAllocationGranularity_flags_enum)__Pyx_PyInt_As_enum__CUmemAllocationGranularity_flags_enum(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 19172, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_coption = __pyx_t_4;

  /* "cuda/cuda.pyx":19173
 *     cdef ccuda.CUmemAllocationProp* cprop_ptr = prop._ptr if prop != None else NULL
 *     cdef ccuda.CUmemAllocationGranularity_flags coption = option.value
 *     err = ccuda.cuMemGetAllocationGranularity(&granularity, cprop_ptr, coption)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), granularity)
 * 
 */
  __pyx_t_5 = __pyx_f_4cuda_5ccuda_cuMemGetAllocationGranularity((&__pyx_v_granularity), __pyx_v_cprop_ptr, __pyx_v_coption); if (unlikely(__pyx_t_5 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19173, __pyx_L1_error)
  __pyx_v_err = __pyx_t_5;

  /* "cuda/cuda.pyx":19174
 *     cdef ccuda.CUmemAllocationGranularity_flags coption = option.value
 *     err = ccuda.cuMemGetAllocationGranularity(&granularity, cprop_ptr, coption)
 *     return (CUresult(err), granularity)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 19174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_granularity); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 19174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19144
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAllocationGranularity(prop : CUmemAllocationProp, option not None : CUmemAllocationGranularity_flags):             # <<<<<<<<<<<<<<
 *     """ Calculates either the minimal or recommended granularity.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemGetAllocationGranularity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19177
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAllocationPropertiesFromHandle(handle):             # <<<<<<<<<<<<<<
 *     """ Retrieve the contents of the property structure defining properties for this handle.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_291cuMemGetAllocationPropertiesFromHandle(PyObject *__pyx_self, PyObject *__pyx_v_handle); /*proto*/
static char __pyx_doc_4cuda_4cuda_290cuMemGetAllocationPropertiesFromHandle[] = "cuMemGetAllocationPropertiesFromHandle(handle)\n Retrieve the contents of the property structure defining properties for this handle.\n\n    Parameters\n    ----------\n    handle : :py:obj:`~.CUmemGenericAllocationHandle`\n        Handle which to perform the query on\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n    prop : :py:obj:`~.CUmemAllocationProp`\n        Pointer to a properties structure which will hold the information\n        about this handle\n\n    See Also\n    --------\n    :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemImportFromShareableHandle`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_291cuMemGetAllocationPropertiesFromHandle = {"cuMemGetAllocationPropertiesFromHandle", (PyCFunction)__pyx_pw_4cuda_4cuda_291cuMemGetAllocationPropertiesFromHandle, METH_O, __pyx_doc_4cuda_4cuda_290cuMemGetAllocationPropertiesFromHandle};
static PyObject *__pyx_pw_4cuda_4cuda_291cuMemGetAllocationPropertiesFromHandle(PyObject *__pyx_self, PyObject *__pyx_v_handle) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemGetAllocationPropertiesFromHandle (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_290cuMemGetAllocationPropertiesFromHandle(__pyx_self, ((PyObject *)__pyx_v_handle));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_290cuMemGetAllocationPropertiesFromHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_handle) {
  CUmemGenericAllocationHandle __pyx_v_chandle;
  PyObject *__pyx_v_phandle = NULL;
  struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp *__pyx_v_prop = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__757)
  __Pyx_RefNannySetupContext("cuMemGetAllocationPropertiesFromHandle", 0);
  __Pyx_TraceCall("cuMemGetAllocationPropertiesFromHandle", __pyx_f[0], 19177, 0, __PYX_ERR(0, 19177, __pyx_L1_error));

  /* "cuda/cuda.pyx":19198
 *     """
 *     cdef ccuda.CUmemGenericAllocationHandle chandle
 *     if handle is None:             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 */
  __pyx_t_1 = (__pyx_v_handle == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19199
 *     cdef ccuda.CUmemGenericAllocationHandle chandle
 *     if handle is None:
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 *         phandle = int(handle)
 */
    __pyx_v_chandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19198
 *     """
 *     cdef ccuda.CUmemGenericAllocationHandle chandle
 *     if handle is None:             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19200
 *     if handle is None:
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):             # <<<<<<<<<<<<<<
 *         phandle = int(handle)
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_handle, __pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19201
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 *         phandle = int(handle)             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phandle = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19202
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):
 *         phandle = int(handle)
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle             # <<<<<<<<<<<<<<
 *     else:
 *         phandle = int(CUmemGenericAllocationHandle(handle))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phandle); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19202, __pyx_L1_error)
    __pyx_v_chandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19200
 *     if handle is None:
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>0
 *     elif isinstance(handle, (CUmemGenericAllocationHandle)):             # <<<<<<<<<<<<<<
 *         phandle = int(handle)
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19204
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 *     else:
 *         phandle = int(CUmemGenericAllocationHandle(handle))             # <<<<<<<<<<<<<<
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle), __pyx_v_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phandle = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19205
 *     else:
 *         phandle = int(CUmemGenericAllocationHandle(handle))
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle             # <<<<<<<<<<<<<<
 * 
 *     cdef CUmemAllocationProp prop = CUmemAllocationProp()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phandle); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19205, __pyx_L1_error)
    __pyx_v_chandle = ((CUmemGenericAllocationHandle)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19207
 *         chandle = <ccuda.CUmemGenericAllocationHandle><void_ptr>phandle
 * 
 *     cdef CUmemAllocationProp prop = CUmemAllocationProp()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemGetAllocationPropertiesFromHandle(prop._ptr, chandle)
 *     return (CUresult(err), prop)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemAllocationProp)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_prop = ((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":19208
 * 
 *     cdef CUmemAllocationProp prop = CUmemAllocationProp()
 *     err = ccuda.cuMemGetAllocationPropertiesFromHandle(prop._ptr, chandle)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), prop)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemGetAllocationPropertiesFromHandle(__pyx_v_prop->__pyx_base._ptr, __pyx_v_chandle); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19208, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":19209
 *     cdef CUmemAllocationProp prop = CUmemAllocationProp()
 *     err = ccuda.cuMemGetAllocationPropertiesFromHandle(prop._ptr, chandle)
 *     return (CUresult(err), prop)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_prop));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_prop));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_prop));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19177
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAllocationPropertiesFromHandle(handle):             # <<<<<<<<<<<<<<
 *     """ Retrieve the contents of the property structure defining properties for this handle.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemGetAllocationPropertiesFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phandle);
  __Pyx_XDECREF((PyObject *)__pyx_v_prop);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19212
 * 
 * @cython.embedsignature(True)
 * def cuMemRetainAllocationHandle(addr):             # <<<<<<<<<<<<<<
 *     """ Given an address `addr`, returns the allocation handle of the backing memory allocation.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_293cuMemRetainAllocationHandle(PyObject *__pyx_self, PyObject *__pyx_v_addr); /*proto*/
static char __pyx_doc_4cuda_4cuda_292cuMemRetainAllocationHandle[] = "cuMemRetainAllocationHandle(addr)\n Given an address `addr`, returns the allocation handle of the backing memory allocation.\n\n    The handle is guaranteed to be the same handle value used to map the\n    memory. If the address requested is not mapped, the function will fail.\n    The returned handle must be released with corresponding number of calls\n    to :py:obj:`~.cuMemRelease`.\n\n    Parameters\n    ----------\n    addr : Any\n        Memory address to query, that has been mapped previously.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n    handle : :py:obj:`~.CUmemGenericAllocationHandle`\n        CUDA Memory handle for the backing memory allocation.\n\n    See Also\n    --------\n    :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemMap`\n\n    Notes\n    -----\n    The address `addr`, can be any address in a range previously mapped by :py:obj:`~.cuMemMap`, and not necessarily the start address.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_293cuMemRetainAllocationHandle = {"cuMemRetainAllocationHandle", (PyCFunction)__pyx_pw_4cuda_4cuda_293cuMemRetainAllocationHandle, METH_O, __pyx_doc_4cuda_4cuda_292cuMemRetainAllocationHandle};
static PyObject *__pyx_pw_4cuda_4cuda_293cuMemRetainAllocationHandle(PyObject *__pyx_self, PyObject *__pyx_v_addr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemRetainAllocationHandle (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_292cuMemRetainAllocationHandle(__pyx_self, ((PyObject *)__pyx_v_addr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_292cuMemRetainAllocationHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_addr) {
  struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *__pyx_v_handle = 0;
  PyObject *__pyx_v_caddr = NULL;
  void *__pyx_v_caddr_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__758)
  __Pyx_RefNannySetupContext("cuMemRetainAllocationHandle", 0);
  __Pyx_TraceCall("cuMemRetainAllocationHandle", __pyx_f[0], 19212, 0, __PYX_ERR(0, 19212, __pyx_L1_error));

  /* "cuda/cuda.pyx":19240
 *     The address `addr`, can be any address in a range previously mapped by :py:obj:`~.cuMemMap`, and not necessarily the start address.
 *     """
 *     cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle()             # <<<<<<<<<<<<<<
 *     caddr = utils.HelperInputVoidPtr(addr)
 *     cdef void* caddr_ptr = <void*><void_ptr>caddr.cptr
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_handle = ((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19241
 *     """
 *     cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle()
 *     caddr = utils.HelperInputVoidPtr(addr)             # <<<<<<<<<<<<<<
 *     cdef void* caddr_ptr = <void*><void_ptr>caddr.cptr
 *     err = ccuda.cuMemRetainAllocationHandle(handle._ptr, caddr_ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_addr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_caddr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19242
 *     cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle()
 *     caddr = utils.HelperInputVoidPtr(addr)
 *     cdef void* caddr_ptr = <void*><void_ptr>caddr.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemRetainAllocationHandle(handle._ptr, caddr_ptr)
 *     return (CUresult(err), handle)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_caddr, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19242, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_caddr_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":19243
 *     caddr = utils.HelperInputVoidPtr(addr)
 *     cdef void* caddr_ptr = <void*><void_ptr>caddr.cptr
 *     err = ccuda.cuMemRetainAllocationHandle(handle._ptr, caddr_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), handle)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuMemRetainAllocationHandle(__pyx_v_handle->_ptr, __pyx_v_caddr_ptr); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19243, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":19244
 *     cdef void* caddr_ptr = <void*><void_ptr>caddr.cptr
 *     err = ccuda.cuMemRetainAllocationHandle(handle._ptr, caddr_ptr)
 *     return (CUresult(err), handle)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_handle));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_handle));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_handle));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19212
 * 
 * @cython.embedsignature(True)
 * def cuMemRetainAllocationHandle(addr):             # <<<<<<<<<<<<<<
 *     """ Given an address `addr`, returns the allocation handle of the backing memory allocation.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuMemRetainAllocationHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_handle);
  __Pyx_XDECREF(__pyx_v_caddr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19247
 * 
 * @cython.embedsignature(True)
 * def cuMemFreeAsync(dptr, hStream):             # <<<<<<<<<<<<<<
 *     """ Frees memory with stream ordered semantics.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_295cuMemFreeAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_294cuMemFreeAsync[] = "cuMemFreeAsync(dptr, hStream)\n Frees memory with stream ordered semantics.\n\n    Inserts a free operation into `hStream`. The allocation must not be\n    accessed after stream execution reaches the free. After this API\n    returns, accessing the memory from any subsequent work launched on the\n    GPU or querying its pointer attributes results in undefined behavior.\n\n    Parameters\n    ----------\n    dptr : :py:obj:`~.CUdeviceptr`\n        memory to free\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream establishing the stream ordering contract.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` (default stream specified with no current context), :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    Notes\n    -----\n    During stream capture, this function results in the creation of a free node and must therefore be passed the address of a graph allocation.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_295cuMemFreeAsync = {"cuMemFreeAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_295cuMemFreeAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_294cuMemFreeAsync};
static PyObject *__pyx_pw_4cuda_4cuda_295cuMemFreeAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dptr = 0;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemFreeAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dptr_2,&__pyx_n_s_hStream_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dptr_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemFreeAsync", 1, 2, 2, 1); __PYX_ERR(0, 19247, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemFreeAsync") < 0)) __PYX_ERR(0, 19247, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_dptr = values[0];
    __pyx_v_hStream = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemFreeAsync", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19247, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemFreeAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_294cuMemFreeAsync(__pyx_self, __pyx_v_dptr, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_294cuMemFreeAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dptr, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUdeviceptr __pyx_v_cdptr;
  PyObject *__pyx_v_pdptr = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__759)
  __Pyx_RefNannySetupContext("cuMemFreeAsync", 0);
  __Pyx_TraceCall("cuMemFreeAsync", __pyx_f[0], 19247, 0, __PYX_ERR(0, 19247, __pyx_L1_error));

  /* "cuda/cuda.pyx":19272
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19273
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19272
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19274
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19275
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19276
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19276, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19274
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19278
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19279
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdptr
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19279, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19282
 * 
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19283
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 */
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19282
 * 
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":19284
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19285
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19286
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19286, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19284
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":19288
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19289
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemFreeAsync(cdptr, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19289, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":19291
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 *     err = ccuda.cuMemFreeAsync(cdptr, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemFreeAsync(__pyx_v_cdptr, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19291, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":19292
 * 
 *     err = ccuda.cuMemFreeAsync(cdptr, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19247
 * 
 * @cython.embedsignature(True)
 * def cuMemFreeAsync(dptr, hStream):             # <<<<<<<<<<<<<<
 *     """ Frees memory with stream ordered semantics.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemFreeAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pdptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19295
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocAsync(size_t bytesize, hStream):             # <<<<<<<<<<<<<<
 *     """ Allocates memory with stream ordered semantics.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_297cuMemAllocAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_296cuMemAllocAsync[] = "cuMemAllocAsync(size_t bytesize, hStream)\n Allocates memory with stream ordered semantics.\n\n    Inserts an allocation operation into `hStream`. A pointer to the\n    allocated memory is returned immediately in *dptr. The allocation must\n    not be accessed until the the allocation operation completes. The\n    allocation comes from the memory pool current to the stream's device.\n\n    Parameters\n    ----------\n    bytesize : size_t\n        Number of bytes to allocate\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream establishing the stream ordering contract and the memory\n        pool to allocate from\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` (default stream specified with no current context), :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    dptr : :py:obj:`~.CUdeviceptr`\n        Returned device pointer\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAllocFromPoolAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceSetMemPool`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cuMemPoolSetAccess`, :py:obj:`~.cuMemPoolSetAttribute`\n\n    Notes\n    -----\n    The default memory pool of a device contains device memory from that device.\n\n    Basic stream ordering allows future work submitted into the same stream to use the allocation. Stream query, stream synchronize, and CUDA events can be used to guarantee that the allocation operation completes before work submitted in a separate stream runs.\n\n    During stream capture, this function results in the creation of an allocation node. In this case, the allocation is owned by the graph instead of the memory pool. The memory pool's properties are used to set the node's creation parameters.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_297cuMemAllocAsync = {"cuMemAllocAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_297cuMemAllocAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_296cuMemAllocAsync};
static PyObject *__pyx_pw_4cuda_4cuda_297cuMemAllocAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_bytesize;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemAllocAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bytesize_2,&__pyx_n_s_hStream_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bytesize_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAllocAsync", 1, 2, 2, 1); __PYX_ERR(0, 19295, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemAllocAsync") < 0)) __PYX_ERR(0, 19295, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_bytesize = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_bytesize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 19295, __pyx_L3_error)
    __pyx_v_hStream = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemAllocAsync", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19295, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemAllocAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_296cuMemAllocAsync(__pyx_self, __pyx_v_bytesize, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_296cuMemAllocAsync(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_bytesize, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_dptr = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__760)
  __Pyx_RefNannySetupContext("cuMemAllocAsync", 0);
  __Pyx_TraceCall("cuMemAllocAsync", __pyx_f[0], 19295, 0, __PYX_ERR(0, 19295, __pyx_L1_error));

  /* "cuda/cuda.pyx":19331
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19332
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19331
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19333
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19334
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19335
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19335, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19333
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19337
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19338
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19338, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19340
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cdef CUdeviceptr dptr = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemAllocAsync(dptr._ptr, bytesize, chStream)
 *     return (CUresult(err), dptr)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_dptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":19341
 * 
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 *     err = ccuda.cuMemAllocAsync(dptr._ptr, bytesize, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), dptr)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemAllocAsync(__pyx_v_dptr->_ptr, __pyx_v_bytesize, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19341, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":19342
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 *     err = ccuda.cuMemAllocAsync(dptr._ptr, bytesize, chStream)
 *     return (CUresult(err), dptr)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_dptr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dptr));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_dptr));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19295
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocAsync(size_t bytesize, hStream):             # <<<<<<<<<<<<<<
 *     """ Allocates memory with stream ordered semantics.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemAllocAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF((PyObject *)__pyx_v_dptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19345
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolTrimTo(pool, size_t minBytesToKeep):             # <<<<<<<<<<<<<<
 *     """ Tries to release memory back to the OS.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_299cuMemPoolTrimTo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_298cuMemPoolTrimTo[] = "cuMemPoolTrimTo(pool, size_t minBytesToKeep)\n Tries to release memory back to the OS.\n\n    Releases memory back to the OS until the pool contains fewer than\n    minBytesToKeep reserved bytes, or there is no more memory that the\n    allocator can safely release. The allocator cannot release OS\n    allocations that back outstanding asynchronous allocations. The OS\n    allocations may happen at different granularity from the user\n    allocations.\n\n    Parameters\n    ----------\n    pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t`\n        The memory pool to trim\n    minBytesToKeep : size_t\n        If the pool has less than minBytesToKeep reserved, the TrimTo\n        operation is a no-op. Otherwise the pool will be guaranteed to have\n        at least minBytesToKeep bytes reserved after the operation.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`\n\n    Notes\n    -----\n    : Allocations that have not been freed count as outstanding.\n\n    : Allocations that have been asynchronously freed but whose completion has not been observed on the host (eg. by a synchronize) can count as outstanding.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_299cuMemPoolTrimTo = {"cuMemPoolTrimTo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_299cuMemPoolTrimTo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_298cuMemPoolTrimTo};
static PyObject *__pyx_pw_4cuda_4cuda_299cuMemPoolTrimTo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_pool = 0;
  size_t __pyx_v_minBytesToKeep;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemPoolTrimTo (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pool,&__pyx_n_s_minBytesToKeep,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pool)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_minBytesToKeep)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPoolTrimTo", 1, 2, 2, 1); __PYX_ERR(0, 19345, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemPoolTrimTo") < 0)) __PYX_ERR(0, 19345, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_pool = values[0];
    __pyx_v_minBytesToKeep = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_minBytesToKeep == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 19345, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemPoolTrimTo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19345, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolTrimTo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_298cuMemPoolTrimTo(__pyx_self, __pyx_v_pool, __pyx_v_minBytesToKeep);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_298cuMemPoolTrimTo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool, size_t __pyx_v_minBytesToKeep) {
  CUmemoryPool __pyx_v_cpool;
  PyObject *__pyx_v_ppool = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__761)
  __Pyx_RefNannySetupContext("cuMemPoolTrimTo", 0);
  __Pyx_TraceCall("cuMemPoolTrimTo", __pyx_f[0], 19345, 0, __PYX_ERR(0, 19345, __pyx_L1_error));

  /* "cuda/cuda.pyx":19380
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
  __pyx_t_1 = (__pyx_v_pool == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19381
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 */
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19380
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19382
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pool, __pyx_ptype_4cuda_4cuda_CUmemoryPool); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19383
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ppool = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19384
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19384, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19382
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19386
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 *         ppool = int(CUmemoryPool(pool))             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool), __pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ppool = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19387
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemPoolTrimTo(cpool, minBytesToKeep)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19387, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19389
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 *     err = ccuda.cuMemPoolTrimTo(cpool, minBytesToKeep)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemPoolTrimTo(__pyx_v_cpool, __pyx_v_minBytesToKeep); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19389, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":19390
 * 
 *     err = ccuda.cuMemPoolTrimTo(cpool, minBytesToKeep)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19345
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolTrimTo(pool, size_t minBytesToKeep):             # <<<<<<<<<<<<<<
 *     """ Tries to release memory back to the OS.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolTrimTo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppool);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19393
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolSetAttribute(pool, attr not None : CUmemPool_attribute, value):             # <<<<<<<<<<<<<<
 *     """ Sets attributes of a memory pool.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_301cuMemPoolSetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_300cuMemPoolSetAttribute[] = "cuMemPoolSetAttribute(pool, attr: CUmemPool_attribute, value)\n Sets attributes of a memory pool.\n\n    Supported attributes are:\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD`: (value type =\n      cuuint64_t) Amount of reserved memory in bytes to hold onto before\n      trying to release memory back to the OS. When more than the release\n      threshold bytes of memory are held by the memory pool, the allocator\n      will try to release memory back to the OS on the next call to stream,\n      event or context synchronize. (default 0)\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES`: (value\n      type = int) Allow :py:obj:`~.cuMemAllocAsync` to use memory\n      asynchronously freed in another stream as long as a stream ordering\n      dependency of the allocating stream on the free action exists. Cuda\n      events and null stream interactions can create the required stream\n      ordered dependencies. (default enabled)\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC`: (value type =\n      int) Allow reuse of already completed frees when there is no\n      dependency between the free and allocation. (default enabled)\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES`: (value\n      type = int) Allow :py:obj:`~.cuMemAllocAsync` to insert new stream\n      dependencies in order to establish the stream ordering required to\n      reuse a piece of memory released by :py:obj:`~.cuMemFreeAsync`\n      (default enabled).\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH`: (value type =\n      cuuint64_t) Reset the high watermark that tracks the amount of\n      backing memory that was allocated for the memory pool. It is illegal\n      to set this attribute to a non-zero value.\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_USED_MEM_HIGH`: (value type = cuuint64_t)\n      Reset the high watermark that tracks the amount of used memory that\n      was allocated for the memory pool.\n\n    Parameters\n    ----------""\n    pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t`\n        The memory pool to modify\n    attr : :py:obj:`~.CUmemPool_attribute`\n        The attribute to modify\n    value : Any\n        Pointer to the value to assign\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_301cuMemPoolSetAttribute = {"cuMemPoolSetAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_301cuMemPoolSetAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_300cuMemPoolSetAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_301cuMemPoolSetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_pool = 0;
  PyObject *__pyx_v_attr = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemPoolSetAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pool,&__pyx_n_s_attr,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pool)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPoolSetAttribute", 1, 3, 3, 1); __PYX_ERR(0, 19393, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPoolSetAttribute", 1, 3, 3, 2); __PYX_ERR(0, 19393, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemPoolSetAttribute") < 0)) __PYX_ERR(0, 19393, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_pool = values[0];
    __pyx_v_attr = values[1];
    __pyx_v_value = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemPoolSetAttribute", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19393, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attr) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attr"); __PYX_ERR(0, 19393, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_300cuMemPoolSetAttribute(__pyx_self, __pyx_v_pool, __pyx_v_attr, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_300cuMemPoolSetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool, PyObject *__pyx_v_attr, PyObject *__pyx_v_value) {
  CUmemoryPool __pyx_v_cpool;
  PyObject *__pyx_v_ppool = NULL;
  CUmemPool_attribute __pyx_v_cattr;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemPool_attribute *__pyx_v_cvalue = 0;
  void *__pyx_v_cvalue_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUmemPool_attribute __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  CUresult __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__762)
  __Pyx_RefNannySetupContext("cuMemPoolSetAttribute", 0);
  __Pyx_TraceCall("cuMemPoolSetAttribute", __pyx_f[0], 19393, 0, __PYX_ERR(0, 19393, __pyx_L1_error));

  /* "cuda/cuda.pyx":19450
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
  __pyx_t_1 = (__pyx_v_pool == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19451
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 */
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19450
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19452
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pool, __pyx_ptype_4cuda_4cuda_CUmemoryPool); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19453
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ppool = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19454
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19454, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19452
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19456
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 *         ppool = int(CUmemoryPool(pool))             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool), __pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ppool = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19457
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUmemPool_attribute cattr = attr.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19457, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19459
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 *     cdef ccuda.CUmemPool_attribute cattr = attr.value             # <<<<<<<<<<<<<<
 *     cdef utils.HelperCUmemPool_attribute cvalue = utils.HelperCUmemPool_attribute(attr, value, is_getter=False)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUmemPool_attribute_enum)__Pyx_PyInt_As_enum__CUmemPool_attribute_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 19459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattr = __pyx_t_6;

  /* "cuda/cuda.pyx":19460
 * 
 *     cdef ccuda.CUmemPool_attribute cattr = attr.value
 *     cdef utils.HelperCUmemPool_attribute cvalue = utils.HelperCUmemPool_attribute(attr, value, is_getter=False)             # <<<<<<<<<<<<<<
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     err = ccuda.cuMemPoolSetAttribute(cpool, cattr, cvalue_ptr)
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_attr);
  __Pyx_GIVEREF(__pyx_v_attr);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_attr);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_value);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_getter, Py_False) < 0) __PYX_ERR(0, 19460, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUmemPool_attribute), __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cvalue = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemPool_attribute *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cuda/cuda.pyx":19461
 *     cdef ccuda.CUmemPool_attribute cattr = attr.value
 *     cdef utils.HelperCUmemPool_attribute cvalue = utils.HelperCUmemPool_attribute(attr, value, is_getter=False)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemPoolSetAttribute(cpool, cattr, cvalue_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cvalue), __pyx_n_s_cptr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_7); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_cvalue_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":19462
 *     cdef utils.HelperCUmemPool_attribute cvalue = utils.HelperCUmemPool_attribute(attr, value, is_getter=False)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     err = ccuda.cuMemPoolSetAttribute(cpool, cattr, cvalue_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuMemPoolSetAttribute(__pyx_v_cpool, __pyx_v_cattr, __pyx_v_cvalue_ptr); if (unlikely(__pyx_t_8 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19462, __pyx_L1_error)
  __pyx_v_err = __pyx_t_8;

  /* "cuda/cuda.pyx":19463
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     err = ccuda.cuMemPoolSetAttribute(cpool, cattr, cvalue_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19393
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolSetAttribute(pool, attr not None : CUmemPool_attribute, value):             # <<<<<<<<<<<<<<
 *     """ Sets attributes of a memory pool.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppool);
  __Pyx_XDECREF((PyObject *)__pyx_v_cvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19466
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolGetAttribute(pool, attr not None : CUmemPool_attribute):             # <<<<<<<<<<<<<<
 *     """ Gets attributes of a memory pool.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_303cuMemPoolGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_302cuMemPoolGetAttribute[] = "cuMemPoolGetAttribute(pool, attr: CUmemPool_attribute)\n Gets attributes of a memory pool.\n\n    Supported attributes are:\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD`: (value type =\n      cuuint64_t) Amount of reserved memory in bytes to hold onto before\n      trying to release memory back to the OS. When more than the release\n      threshold bytes of memory are held by the memory pool, the allocator\n      will try to release memory back to the OS on the next call to stream,\n      event or context synchronize. (default 0)\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES`: (value\n      type = int) Allow :py:obj:`~.cuMemAllocAsync` to use memory\n      asynchronously freed in another stream as long as a stream ordering\n      dependency of the allocating stream on the free action exists. Cuda\n      events and null stream interactions can create the required stream\n      ordered dependencies. (default enabled)\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC`: (value type =\n      int) Allow reuse of already completed frees when there is no\n      dependency between the free and allocation. (default enabled)\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES`: (value\n      type = int) Allow :py:obj:`~.cuMemAllocAsync` to insert new stream\n      dependencies in order to establish the stream ordering required to\n      reuse a piece of memory released by :py:obj:`~.cuMemFreeAsync`\n      (default enabled).\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT`: (value type =\n      cuuint64_t) Amount of backing memory currently allocated for the\n      mempool\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH`: (value type =\n      cuuint64_t) High watermark of backing memory allocated for the\n      mempool since the last time it was reset.\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_USED_MEM_CURRENT`: (value type =\n      cuuint64_t) Amount of memory from the pool that is currently in use\n      by"" the application.\n\n    - :py:obj:`~.CU_MEMPOOL_ATTR_USED_MEM_HIGH`: (value type = cuuint64_t)\n      High watermark of the amount of memory from the pool that was in use\n      by the application.\n\n    Parameters\n    ----------\n    pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t`\n        The memory pool to get attributes of\n    attr : :py:obj:`~.CUmemPool_attribute`\n        The attribute to get\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    value : Any\n        Retrieved value\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_303cuMemPoolGetAttribute = {"cuMemPoolGetAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_303cuMemPoolGetAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_302cuMemPoolGetAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_303cuMemPoolGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_pool = 0;
  PyObject *__pyx_v_attr = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemPoolGetAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pool,&__pyx_n_s_attr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pool)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPoolGetAttribute", 1, 2, 2, 1); __PYX_ERR(0, 19466, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemPoolGetAttribute") < 0)) __PYX_ERR(0, 19466, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_pool = values[0];
    __pyx_v_attr = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemPoolGetAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19466, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attr) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attr"); __PYX_ERR(0, 19466, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_302cuMemPoolGetAttribute(__pyx_self, __pyx_v_pool, __pyx_v_attr);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_302cuMemPoolGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool, PyObject *__pyx_v_attr) {
  CUmemoryPool __pyx_v_cpool;
  PyObject *__pyx_v_ppool = NULL;
  CUmemPool_attribute __pyx_v_cattr;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemPool_attribute *__pyx_v_cvalue = 0;
  void *__pyx_v_cvalue_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUmemPool_attribute __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  CUresult __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__763)
  __Pyx_RefNannySetupContext("cuMemPoolGetAttribute", 0);
  __Pyx_TraceCall("cuMemPoolGetAttribute", __pyx_f[0], 19466, 0, __PYX_ERR(0, 19466, __pyx_L1_error));

  /* "cuda/cuda.pyx":19530
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
  __pyx_t_1 = (__pyx_v_pool == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19531
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 */
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19530
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19532
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pool, __pyx_ptype_4cuda_4cuda_CUmemoryPool); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19533
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ppool = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19534
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19534, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19532
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19536
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 *         ppool = int(CUmemoryPool(pool))             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool), __pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ppool = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19537
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUmemPool_attribute cattr = attr.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19537, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19539
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 *     cdef ccuda.CUmemPool_attribute cattr = attr.value             # <<<<<<<<<<<<<<
 *     cdef utils.HelperCUmemPool_attribute cvalue = utils.HelperCUmemPool_attribute(attr, 0, is_getter=True)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUmemPool_attribute_enum)__Pyx_PyInt_As_enum__CUmemPool_attribute_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 19539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattr = __pyx_t_6;

  /* "cuda/cuda.pyx":19540
 * 
 *     cdef ccuda.CUmemPool_attribute cattr = attr.value
 *     cdef utils.HelperCUmemPool_attribute cvalue = utils.HelperCUmemPool_attribute(attr, 0, is_getter=True)             # <<<<<<<<<<<<<<
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     err = ccuda.cuMemPoolGetAttribute(cpool, cattr, cvalue_ptr)
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_attr);
  __Pyx_GIVEREF(__pyx_v_attr);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_attr);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_0);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_getter, Py_True) < 0) __PYX_ERR(0, 19540, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUmemPool_attribute), __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cvalue = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemPool_attribute *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cuda/cuda.pyx":19541
 *     cdef ccuda.CUmemPool_attribute cattr = attr.value
 *     cdef utils.HelperCUmemPool_attribute cvalue = utils.HelperCUmemPool_attribute(attr, 0, is_getter=True)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemPoolGetAttribute(cpool, cattr, cvalue_ptr)
 *     return (CUresult(err), cvalue.pyObj())
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cvalue), __pyx_n_s_cptr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_7); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_cvalue_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":19542
 *     cdef utils.HelperCUmemPool_attribute cvalue = utils.HelperCUmemPool_attribute(attr, 0, is_getter=True)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     err = ccuda.cuMemPoolGetAttribute(cpool, cattr, cvalue_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), cvalue.pyObj())
 * 
 */
  __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuMemPoolGetAttribute(__pyx_v_cpool, __pyx_v_cattr, __pyx_v_cvalue_ptr); if (unlikely(__pyx_t_8 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19542, __pyx_L1_error)
  __pyx_v_err = __pyx_t_8;

  /* "cuda/cuda.pyx":19543
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     err = ccuda.cuMemPoolGetAttribute(cpool, cattr, cvalue_ptr)
 *     return (CUresult(err), cvalue.pyObj())             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cvalue), __pyx_n_s_pyObj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __pyx_t_7 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19466
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolGetAttribute(pool, attr not None : CUmemPool_attribute):             # <<<<<<<<<<<<<<
 *     """ Gets attributes of a memory pool.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppool);
  __Pyx_XDECREF((PyObject *)__pyx_v_cvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19546
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolSetAccess(pool, map : List[CUmemAccessDesc], size_t count):             # <<<<<<<<<<<<<<
 *     """ Controls visibility of pools between devices.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_305cuMemPoolSetAccess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_304cuMemPoolSetAccess[] = "cuMemPoolSetAccess(pool, map: List[CUmemAccessDesc], size_t count)\n Controls visibility of pools between devices.\n\n    Parameters\n    ----------\n    pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t`\n        The pool being modified\n    map : List[:py:obj:`~.CUmemAccessDesc`]\n        Array of access descriptors. Each descriptor instructs the access\n        to enable for a single gpu.\n    count : size_t\n        Number of descriptors in the map array.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_305cuMemPoolSetAccess = {"cuMemPoolSetAccess", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_305cuMemPoolSetAccess, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_304cuMemPoolSetAccess};
static PyObject *__pyx_pw_4cuda_4cuda_305cuMemPoolSetAccess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_pool = 0;
  PyObject *__pyx_v_map = 0;
  size_t __pyx_v_count;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemPoolSetAccess (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pool,&__pyx_n_s_map,&__pyx_n_s_count_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pool)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_map)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPoolSetAccess", 1, 3, 3, 1); __PYX_ERR(0, 19546, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPoolSetAccess", 1, 3, 3, 2); __PYX_ERR(0, 19546, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemPoolSetAccess") < 0)) __PYX_ERR(0, 19546, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_pool = values[0];
    __pyx_v_map = values[1];
    __pyx_v_count = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_count == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 19546, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemPoolSetAccess", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19546, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_304cuMemPoolSetAccess(__pyx_self, __pyx_v_pool, __pyx_v_map, __pyx_v_count);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_18cuMemPoolSetAccess_2generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":19569
 *     """
 *     map = [] if map is None else map
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in map):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'map' is not instance of type (expected List[ccuda.CUmemAccessDesc]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_18cuMemPoolSetAccess_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_15_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_15_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 19569, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_18cuMemPoolSetAccess_2generator7, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuMemPoolSetAccess_locals_genexp, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 19569, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolSetAccess.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_18cuMemPoolSetAccess_2generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 19569, 0, __PYX_ERR(0, 19569, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 19569, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_map)) { __Pyx_RaiseClosureNameError("map"); __PYX_ERR(0, 19569, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_map)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_map)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_map; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_map); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19569, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 19569, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19569, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 19569, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19569, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 19569, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUmemAccessDesc); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19546
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolSetAccess(pool, map : List[CUmemAccessDesc], size_t count):             # <<<<<<<<<<<<<<
 *     """ Controls visibility of pools between devices.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_304cuMemPoolSetAccess(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool, PyObject *__pyx_v_map, size_t __pyx_v_count) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *__pyx_cur_scope;
  CUmemoryPool __pyx_v_cpool;
  PyObject *__pyx_v_ppool = NULL;
  CUmemAccessDesc *__pyx_v_cmap;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_18cuMemPoolSetAccess_2generator7 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct CUmemAccessDesc_st *__pyx_t_10;
  CUresult __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__764)
  __Pyx_RefNannySetupContext("cuMemPoolSetAccess", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 19546, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuMemPoolSetAccess", __pyx_f[0], 19546, 0, __PYX_ERR(0, 19546, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_map = __pyx_v_map;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_map);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_map);

  /* "cuda/cuda.pyx":19568
 *     :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`
 *     """
 *     map = [] if map is None else map             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in map):
 *         raise TypeError("Argument 'map' is not instance of type (expected List[ccuda.CUmemAccessDesc]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_map == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_map);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_map;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_map);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_map, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19569
 *     """
 *     map = [] if map is None else map
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in map):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'map' is not instance of type (expected List[ccuda.CUmemAccessDesc]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_18cuMemPoolSetAccess_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 19569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":19570
 *     map = [] if map is None else map
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in map):
 *         raise TypeError("Argument 'map' is not instance of type (expected List[ccuda.CUmemAccessDesc]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUmemoryPool cpool
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__765, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 19570, __pyx_L1_error)

    /* "cuda/cuda.pyx":19569
 *     """
 *     map = [] if map is None else map
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in map):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'map' is not instance of type (expected List[ccuda.CUmemAccessDesc]")
 * 
 */
  }

  /* "cuda/cuda.pyx":19573
 * 
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
  __pyx_t_4 = (__pyx_v_pool == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19574
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 */
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19573
 * 
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":19575
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pool, __pyx_ptype_4cuda_4cuda_CUmemoryPool); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":19576
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ppool = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19577
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19577, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":19575
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":19579
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 *         ppool = int(CUmemoryPool(pool))             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool), __pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ppool = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":19580
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUmemAccessDesc* cmap = NULL
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19580, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":19582
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 *     cdef ccuda.CUmemAccessDesc* cmap = NULL             # <<<<<<<<<<<<<<
 *     if len(map) > 0:
 *         cmap = <ccuda.CUmemAccessDesc*> calloc(len(map), sizeof(ccuda.CUmemAccessDesc))
 */
  __pyx_v_cmap = NULL;

  /* "cuda/cuda.pyx":19583
 * 
 *     cdef ccuda.CUmemAccessDesc* cmap = NULL
 *     if len(map) > 0:             # <<<<<<<<<<<<<<
 *         cmap = <ccuda.CUmemAccessDesc*> calloc(len(map), sizeof(ccuda.CUmemAccessDesc))
 *         if cmap is NULL:
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_map;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":19584
 *     cdef ccuda.CUmemAccessDesc* cmap = NULL
 *     if len(map) > 0:
 *         cmap = <ccuda.CUmemAccessDesc*> calloc(len(map), sizeof(ccuda.CUmemAccessDesc))             # <<<<<<<<<<<<<<
 *         if cmap is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(map)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 */
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_map;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19584, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cmap = ((CUmemAccessDesc *)calloc(__pyx_t_6, (sizeof(CUmemAccessDesc))));

    /* "cuda/cuda.pyx":19585
 *     if len(map) > 0:
 *         cmap = <ccuda.CUmemAccessDesc*> calloc(len(map), sizeof(ccuda.CUmemAccessDesc))
 *         if cmap is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(map)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 *         for idx in range(len(map)):
 */
    __pyx_t_4 = ((__pyx_v_cmap == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":19586
 *         cmap = <ccuda.CUmemAccessDesc*> calloc(len(map), sizeof(ccuda.CUmemAccessDesc))
 *         if cmap is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(map)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))             # <<<<<<<<<<<<<<
 *         for idx in range(len(map)):
 *             memcpy(&cmap[idx], (<CUmemAccessDesc>map[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))
 */
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_map;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19586, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemAccessDesc))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 19586, __pyx_L1_error)

      /* "cuda/cuda.pyx":19585
 *     if len(map) > 0:
 *         cmap = <ccuda.CUmemAccessDesc*> calloc(len(map), sizeof(ccuda.CUmemAccessDesc))
 *         if cmap is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(map)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 *         for idx in range(len(map)):
 */
    }

    /* "cuda/cuda.pyx":19587
 *         if cmap is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(map)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 *         for idx in range(len(map)):             # <<<<<<<<<<<<<<
 *             memcpy(&cmap[idx], (<CUmemAccessDesc>map[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))
 * 
 */
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_map;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19587, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = __pyx_t_6;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_idx = __pyx_t_9;

      /* "cuda/cuda.pyx":19588
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(map)) + 'x' + str(sizeof(ccuda.CUmemAccessDesc)))
 *         for idx in range(len(map)):
 *             memcpy(&cmap[idx], (<CUmemAccessDesc>map[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))             # <<<<<<<<<<<<<<
 * 
 *     if count > <size_t>len(map): raise RuntimeError("List is too small: " + str(len(map)) + " < " + str(count))
 */
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_map, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19588, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      (void)(memcpy((&(__pyx_v_cmap[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc *)__pyx_t_7)->__pyx_base._ptr, (sizeof(CUmemAccessDesc))));
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }

    /* "cuda/cuda.pyx":19583
 * 
 *     cdef ccuda.CUmemAccessDesc* cmap = NULL
 *     if len(map) > 0:             # <<<<<<<<<<<<<<
 *         cmap = <ccuda.CUmemAccessDesc*> calloc(len(map), sizeof(ccuda.CUmemAccessDesc))
 *         if cmap is NULL:
 */
  }

  /* "cuda/cuda.pyx":19590
 *             memcpy(&cmap[idx], (<CUmemAccessDesc>map[idx])._ptr, sizeof(ccuda.CUmemAccessDesc))
 * 
 *     if count > <size_t>len(map): raise RuntimeError("List is too small: " + str(len(map)) + " < " + str(count))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemPoolSetAccess(cpool, (<CUmemAccessDesc>map[0])._ptr if len(map) == 1 else cmap, count)
 *     if cmap is not NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_map;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = ((__pyx_v_count > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_map;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19590, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 19590, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":19591
 * 
 *     if count > <size_t>len(map): raise RuntimeError("List is too small: " + str(len(map)) + " < " + str(count))
 *     err = ccuda.cuMemPoolSetAccess(cpool, (<CUmemAccessDesc>map[0])._ptr if len(map) == 1 else cmap, count)             # <<<<<<<<<<<<<<
 *     if cmap is not NULL:
 *         free(cmap)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_map;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 19591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_map, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc *)__pyx_t_3)->__pyx_base._ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cmap;
  }
  __pyx_t_11 = __pyx_f_4cuda_5ccuda_cuMemPoolSetAccess(__pyx_v_cpool, __pyx_t_10, __pyx_v_count); if (unlikely(__pyx_t_11 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19591, __pyx_L1_error)
  __pyx_v_err = __pyx_t_11;

  /* "cuda/cuda.pyx":19592
 *     if count > <size_t>len(map): raise RuntimeError("List is too small: " + str(len(map)) + " < " + str(count))
 *     err = ccuda.cuMemPoolSetAccess(cpool, (<CUmemAccessDesc>map[0])._ptr if len(map) == 1 else cmap, count)
 *     if cmap is not NULL:             # <<<<<<<<<<<<<<
 *         free(cmap)
 *     return (CUresult(err),)
 */
  __pyx_t_4 = ((__pyx_v_cmap != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":19593
 *     err = ccuda.cuMemPoolSetAccess(cpool, (<CUmemAccessDesc>map[0])._ptr if len(map) == 1 else cmap, count)
 *     if cmap is not NULL:
 *         free(cmap)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
    free(__pyx_v_cmap);

    /* "cuda/cuda.pyx":19592
 *     if count > <size_t>len(map): raise RuntimeError("List is too small: " + str(len(map)) + " < " + str(count))
 *     err = ccuda.cuMemPoolSetAccess(cpool, (<CUmemAccessDesc>map[0])._ptr if len(map) == 1 else cmap, count)
 *     if cmap is not NULL:             # <<<<<<<<<<<<<<
 *         free(cmap)
 *     return (CUresult(err),)
 */
  }

  /* "cuda/cuda.pyx":19594
 *     if cmap is not NULL:
 *         free(cmap)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19546
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolSetAccess(pool, map : List[CUmemAccessDesc], size_t count):             # <<<<<<<<<<<<<<
 *     """ Controls visibility of pools between devices.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppool);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_18cuMemPoolSetAccess_2generator7);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19597
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolGetAccess(memPool, location : CUmemLocation):             # <<<<<<<<<<<<<<
 *     """ Returns the accessibility of a pool from a device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_307cuMemPoolGetAccess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_306cuMemPoolGetAccess[] = "cuMemPoolGetAccess(memPool, CUmemLocation location: CUmemLocation)\n Returns the accessibility of a pool from a device.\n\n    Returns the accessibility of the pool's memory from the specified\n    location.\n\n    Parameters\n    ----------\n    memPool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t`\n        the pool being queried\n    location : :py:obj:`~.CUmemLocation`\n        the location accessing the pool\n\n    Returns\n    -------\n    CUresult\n\n    flags : :py:obj:`~.CUmemAccess_flags`\n        the accessibility of the pool from the specified location\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_307cuMemPoolGetAccess = {"cuMemPoolGetAccess", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_307cuMemPoolGetAccess, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_306cuMemPoolGetAccess};
static PyObject *__pyx_pw_4cuda_4cuda_307cuMemPoolGetAccess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_memPool = 0;
  struct __pyx_obj_4cuda_4cuda_CUmemLocation *__pyx_v_location = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemPoolGetAccess (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_memPool,&__pyx_n_s_location_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memPool)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_location_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPoolGetAccess", 1, 2, 2, 1); __PYX_ERR(0, 19597, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemPoolGetAccess") < 0)) __PYX_ERR(0, 19597, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_memPool = values[0];
    __pyx_v_location = ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemPoolGetAccess", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19597, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_location), __pyx_ptype_4cuda_4cuda_CUmemLocation, 1, "location", 0))) __PYX_ERR(0, 19597, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_306cuMemPoolGetAccess(__pyx_self, __pyx_v_memPool, __pyx_v_location);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_306cuMemPoolGetAccess(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_memPool, struct __pyx_obj_4cuda_4cuda_CUmemLocation *__pyx_v_location) {
  CUmemoryPool __pyx_v_cmemPool;
  PyObject *__pyx_v_pmemPool = NULL;
  CUmemAccess_flags __pyx_v_flags;
  CUmemLocation *__pyx_v_clocation_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUmemLocation_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__766)
  __Pyx_RefNannySetupContext("cuMemPoolGetAccess", 0);
  __Pyx_TraceCall("cuMemPoolGetAccess", __pyx_f[0], 19597, 0, __PYX_ERR(0, 19597, __pyx_L1_error));

  /* "cuda/cuda.pyx":19622
 *     """
 *     cdef ccuda.CUmemoryPool cmemPool
 *     if memPool is None:             # <<<<<<<<<<<<<<
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(memPool, (CUmemoryPool)):
 */
  __pyx_t_1 = (__pyx_v_memPool == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19623
 *     cdef ccuda.CUmemoryPool cmemPool
 *     if memPool is None:
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(memPool, (CUmemoryPool)):
 *         pmemPool = int(memPool)
 */
    __pyx_v_cmemPool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19622
 *     """
 *     cdef ccuda.CUmemoryPool cmemPool
 *     if memPool is None:             # <<<<<<<<<<<<<<
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(memPool, (CUmemoryPool)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19624
 *     if memPool is None:
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(memPool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         pmemPool = int(memPool)
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>pmemPool
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_memPool, __pyx_ptype_4cuda_4cuda_CUmemoryPool); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19625
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(memPool, (CUmemoryPool)):
 *         pmemPool = int(memPool)             # <<<<<<<<<<<<<<
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>pmemPool
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_memPool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pmemPool = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19626
 *     elif isinstance(memPool, (CUmemoryPool)):
 *         pmemPool = int(memPool)
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>pmemPool             # <<<<<<<<<<<<<<
 *     else:
 *         pmemPool = int(CUmemoryPool(memPool))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pmemPool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19626, __pyx_L1_error)
    __pyx_v_cmemPool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19624
 *     if memPool is None:
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(memPool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         pmemPool = int(memPool)
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>pmemPool
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19628
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>pmemPool
 *     else:
 *         pmemPool = int(CUmemoryPool(memPool))             # <<<<<<<<<<<<<<
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>pmemPool
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool), __pyx_v_memPool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pmemPool = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19629
 *     else:
 *         pmemPool = int(CUmemoryPool(memPool))
 *         cmemPool = <ccuda.CUmemoryPool><void_ptr>pmemPool             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUmemAccess_flags flags
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pmemPool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19629, __pyx_L1_error)
    __pyx_v_cmemPool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19632
 * 
 *     cdef ccuda.CUmemAccess_flags flags
 *     cdef ccuda.CUmemLocation* clocation_ptr = location._ptr if location != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemPoolGetAccess(&flags, cmemPool, clocation_ptr)
 *     return (CUresult(err), CUmemAccess_flags(flags))
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_location), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19632, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 19632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_location->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_clocation_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":19633
 *     cdef ccuda.CUmemAccess_flags flags
 *     cdef ccuda.CUmemLocation* clocation_ptr = location._ptr if location != None else NULL
 *     err = ccuda.cuMemPoolGetAccess(&flags, cmemPool, clocation_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUmemAccess_flags(flags))
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuMemPoolGetAccess((&__pyx_v_flags), __pyx_v_cmemPool, __pyx_v_clocation_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19633, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":19634
 *     cdef ccuda.CUmemLocation* clocation_ptr = location._ptr if location != None else NULL
 *     err = ccuda.cuMemPoolGetAccess(&flags, cmemPool, clocation_ptr)
 *     return (CUresult(err), CUmemAccess_flags(flags))             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 19634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CUmemAccess_flags); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 19634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyInt_From_enum__CUmemAccess_flags_enum(__pyx_v_flags); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 19634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 19634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19597
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolGetAccess(memPool, location : CUmemLocation):             # <<<<<<<<<<<<<<
 *     """ Returns the accessibility of a pool from a device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pmemPool);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19637
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolCreate(poolProps : CUmemPoolProps):             # <<<<<<<<<<<<<<
 *     """ Creates a memory pool.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_309cuMemPoolCreate(PyObject *__pyx_self, PyObject *__pyx_v_poolProps); /*proto*/
static char __pyx_doc_4cuda_4cuda_308cuMemPoolCreate[] = "cuMemPoolCreate(CUmemPoolProps poolProps: CUmemPoolProps)\n Creates a memory pool.\n\n    Creates a CUDA memory pool and returns the handle in `pool`. The\n    `poolProps` determines the properties of the pool such as the backing\n    device and IPC capabilities.\n\n    By default, the pool's memory will be accessible from the device it is\n    allocated on.\n\n    Parameters\n    ----------\n    poolProps : :py:obj:`~.CUmemPoolProps`\n        None\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n    pool : :py:obj:`~.CUmemoryPool`\n        None\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceSetMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuMemAllocFromPoolAsync`, :py:obj:`~.cuMemPoolExportToShareableHandle`\n\n    Notes\n    -----\n    Specifying CU_MEM_HANDLE_TYPE_NONE creates a memory pool that will not support IPC.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_309cuMemPoolCreate = {"cuMemPoolCreate", (PyCFunction)__pyx_pw_4cuda_4cuda_309cuMemPoolCreate, METH_O, __pyx_doc_4cuda_4cuda_308cuMemPoolCreate};
static PyObject *__pyx_pw_4cuda_4cuda_309cuMemPoolCreate(PyObject *__pyx_self, PyObject *__pyx_v_poolProps) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemPoolCreate (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_poolProps), __pyx_ptype_4cuda_4cuda_CUmemPoolProps, 1, "poolProps", 0))) __PYX_ERR(0, 19637, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_308cuMemPoolCreate(__pyx_self, ((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps *)__pyx_v_poolProps));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_308cuMemPoolCreate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUmemPoolProps *__pyx_v_poolProps) {
  struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_pool = 0;
  CUmemPoolProps *__pyx_v_cpoolProps_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct CUmemPoolProps_st *__pyx_t_2;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__767)
  __Pyx_RefNannySetupContext("cuMemPoolCreate", 0);
  __Pyx_TraceCall("cuMemPoolCreate", __pyx_f[0], 19637, 0, __PYX_ERR(0, 19637, __pyx_L1_error));

  /* "cuda/cuda.pyx":19667
 *     Specifying CU_MEM_HANDLE_TYPE_NONE creates a memory pool that will not support IPC.
 *     """
 *     cdef CUmemoryPool pool = CUmemoryPool()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUmemPoolProps* cpoolProps_ptr = poolProps._ptr if poolProps != None else NULL
 *     err = ccuda.cuMemPoolCreate(pool._ptr, cpoolProps_ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pool = ((struct __pyx_obj_4cuda_4cuda_CUmemoryPool *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19668
 *     """
 *     cdef CUmemoryPool pool = CUmemoryPool()
 *     cdef ccuda.CUmemPoolProps* cpoolProps_ptr = poolProps._ptr if poolProps != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemPoolCreate(pool._ptr, cpoolProps_ptr)
 *     return (CUresult(err), pool)
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_poolProps), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19668, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 19668, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_2 = __pyx_v_poolProps->__pyx_base._ptr;
  } else {
    __pyx_t_2 = NULL;
  }
  __pyx_v_cpoolProps_ptr = __pyx_t_2;

  /* "cuda/cuda.pyx":19669
 *     cdef CUmemoryPool pool = CUmemoryPool()
 *     cdef ccuda.CUmemPoolProps* cpoolProps_ptr = poolProps._ptr if poolProps != None else NULL
 *     err = ccuda.cuMemPoolCreate(pool._ptr, cpoolProps_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pool)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuMemPoolCreate(__pyx_v_pool->_ptr, __pyx_v_cpoolProps_ptr); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19669, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":19670
 *     cdef ccuda.CUmemPoolProps* cpoolProps_ptr = poolProps._ptr if poolProps != None else NULL
 *     err = ccuda.cuMemPoolCreate(pool._ptr, cpoolProps_ptr)
 *     return (CUresult(err), pool)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 19670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pool));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pool));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_pool));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19637
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolCreate(poolProps : CUmemPoolProps):             # <<<<<<<<<<<<<<
 *     """ Creates a memory pool.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pool);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19673
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolDestroy(pool):             # <<<<<<<<<<<<<<
 *     """ Destroys the specified memory pool.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_311cuMemPoolDestroy(PyObject *__pyx_self, PyObject *__pyx_v_pool); /*proto*/
static char __pyx_doc_4cuda_4cuda_310cuMemPoolDestroy[] = "cuMemPoolDestroy(pool)\n Destroys the specified memory pool.\n\n    If any pointers obtained from this pool haven't been freed or the pool\n    has free operations that haven't completed when\n    :py:obj:`~.cuMemPoolDestroy` is invoked, the function will return\n    immediately and the resources associated with the pool will be released\n    automatically once there are no more outstanding allocations.\n\n    Destroying the current mempool of a device sets the default mempool of\n    that device as the current mempool for that device.\n\n    Parameters\n    ----------\n    pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t`\n        None\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceSetMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuMemPoolCreate`\n\n    Notes\n    -----\n    A device's default memory pool cannot be destroyed.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_311cuMemPoolDestroy = {"cuMemPoolDestroy", (PyCFunction)__pyx_pw_4cuda_4cuda_311cuMemPoolDestroy, METH_O, __pyx_doc_4cuda_4cuda_310cuMemPoolDestroy};
static PyObject *__pyx_pw_4cuda_4cuda_311cuMemPoolDestroy(PyObject *__pyx_self, PyObject *__pyx_v_pool) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemPoolDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_310cuMemPoolDestroy(__pyx_self, ((PyObject *)__pyx_v_pool));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_310cuMemPoolDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool) {
  CUmemoryPool __pyx_v_cpool;
  PyObject *__pyx_v_ppool = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__768)
  __Pyx_RefNannySetupContext("cuMemPoolDestroy", 0);
  __Pyx_TraceCall("cuMemPoolDestroy", __pyx_f[0], 19673, 0, __PYX_ERR(0, 19673, __pyx_L1_error));

  /* "cuda/cuda.pyx":19704
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
  __pyx_t_1 = (__pyx_v_pool == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19705
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 */
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19704
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19706
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pool, __pyx_ptype_4cuda_4cuda_CUmemoryPool); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19707
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ppool = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19708
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19708, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19706
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19710
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 *         ppool = int(CUmemoryPool(pool))             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool), __pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ppool = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19711
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemPoolDestroy(cpool)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19711, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19713
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 *     err = ccuda.cuMemPoolDestroy(cpool)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemPoolDestroy(__pyx_v_cpool); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19713, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":19714
 * 
 *     err = ccuda.cuMemPoolDestroy(cpool)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19673
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolDestroy(pool):             # <<<<<<<<<<<<<<
 *     """ Destroys the specified memory pool.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppool);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19717
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocFromPoolAsync(size_t bytesize, pool, hStream):             # <<<<<<<<<<<<<<
 *     """ Allocates memory from a specified pool with stream ordered semantics.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_313cuMemAllocFromPoolAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_312cuMemAllocFromPoolAsync[] = "cuMemAllocFromPoolAsync(size_t bytesize, pool, hStream)\n Allocates memory from a specified pool with stream ordered semantics.\n\n    Inserts an allocation operation into `hStream`. A pointer to the\n    allocated memory is returned immediately in *dptr. The allocation must\n    not be accessed until the the allocation operation completes. The\n    allocation comes from the specified memory pool.\n\n    Parameters\n    ----------\n    bytesize : size_t\n        Number of bytes to allocate\n    pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t`\n        The pool to allocate from\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream establishing the stream ordering semantic\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` (default stream specified with no current context), :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    dptr : :py:obj:`~.CUdeviceptr`\n        Returned device pointer\n\n    See Also\n    --------\n    :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cuMemPoolSetAccess`, :py:obj:`~.cuMemPoolSetAttribute`\n\n    Notes\n    -----\n    During stream capture, this function results in the creation of an allocation node. In this case, the allocation is owned by the graph instead of the memory pool. The memory pool's properties are used to set the node's creation parameters.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_313cuMemAllocFromPoolAsync = {"cuMemAllocFromPoolAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_313cuMemAllocFromPoolAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_312cuMemAllocFromPoolAsync};
static PyObject *__pyx_pw_4cuda_4cuda_313cuMemAllocFromPoolAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_bytesize;
  PyObject *__pyx_v_pool = 0;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemAllocFromPoolAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bytesize_2,&__pyx_n_s_pool,&__pyx_n_s_hStream_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bytesize_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pool)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAllocFromPoolAsync", 1, 3, 3, 1); __PYX_ERR(0, 19717, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAllocFromPoolAsync", 1, 3, 3, 2); __PYX_ERR(0, 19717, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemAllocFromPoolAsync") < 0)) __PYX_ERR(0, 19717, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_bytesize = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_bytesize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 19717, __pyx_L3_error)
    __pyx_v_pool = values[1];
    __pyx_v_hStream = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemAllocFromPoolAsync", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19717, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemAllocFromPoolAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_312cuMemAllocFromPoolAsync(__pyx_self, __pyx_v_bytesize, __pyx_v_pool, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_312cuMemAllocFromPoolAsync(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_bytesize, PyObject *__pyx_v_pool, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUmemoryPool __pyx_v_cpool;
  PyObject *__pyx_v_ppool = NULL;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_dptr = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__769)
  __Pyx_RefNannySetupContext("cuMemAllocFromPoolAsync", 0);
  __Pyx_TraceCall("cuMemAllocFromPoolAsync", __pyx_f[0], 19717, 0, __PYX_ERR(0, 19717, __pyx_L1_error));

  /* "cuda/cuda.pyx":19750
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19751
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19750
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19752
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19753
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19754
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19754, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19752
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19756
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19757
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUmemoryPool cpool
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19757, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19760
 * 
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
  __pyx_t_1 = (__pyx_v_pool == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19761
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 */
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19760
 * 
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":19762
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pool, __pyx_ptype_4cuda_4cuda_CUmemoryPool); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19763
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_pool); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_ppool = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19764
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19764, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19762
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":19766
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 *         ppool = int(CUmemoryPool(pool))             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool), __pyx_v_pool); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_ppool = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19767
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 * 
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19767, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":19769
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 *     cdef CUdeviceptr dptr = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemAllocFromPoolAsync(dptr._ptr, bytesize, cpool, chStream)
 *     return (CUresult(err), dptr)
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_dptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19770
 * 
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 *     err = ccuda.cuMemAllocFromPoolAsync(dptr._ptr, bytesize, cpool, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), dptr)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemAllocFromPoolAsync(__pyx_v_dptr->_ptr, __pyx_v_bytesize, __pyx_v_cpool, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19770, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":19771
 *     cdef CUdeviceptr dptr = CUdeviceptr()
 *     err = ccuda.cuMemAllocFromPoolAsync(dptr._ptr, bytesize, cpool, chStream)
 *     return (CUresult(err), dptr)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_dptr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dptr));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_dptr));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19717
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocFromPoolAsync(size_t bytesize, pool, hStream):             # <<<<<<<<<<<<<<
 *     """ Allocates memory from a specified pool with stream ordered semantics.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemAllocFromPoolAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_ppool);
  __Pyx_XDECREF((PyObject *)__pyx_v_dptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19774
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolExportToShareableHandle(pool, handleType not None : CUmemAllocationHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Exports a memory pool to the requested handle type.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_315cuMemPoolExportToShareableHandle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_314cuMemPoolExportToShareableHandle[] = "cuMemPoolExportToShareableHandle(pool, handleType: CUmemAllocationHandleType, unsigned long long flags)\n Exports a memory pool to the requested handle type.\n\n    Given an IPC capable mempool, create an OS handle to share the pool\n    with another process. A recipient process can convert the shareable\n    handle into a mempool with\n    :py:obj:`~.cuMemPoolImportFromShareableHandle`. Individual pointers can\n    then be shared with the :py:obj:`~.cuMemPoolExportPointer` and\n    :py:obj:`~.cuMemPoolImportPointer` APIs. The implementation of what the\n    shareable handle is and how it can be transferred is defined by the\n    requested handle type.\n\n    Parameters\n    ----------\n    pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t`\n        pool to export\n    handleType : :py:obj:`~.CUmemAllocationHandleType`\n        the type of handle to create\n    flags : unsigned long long\n        must be 0\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    handle_out : Any\n        Returned OS handle\n\n    See Also\n    --------\n    :py:obj:`~.cuMemPoolImportFromShareableHandle`, :py:obj:`~.cuMemPoolExportPointer`, :py:obj:`~.cuMemPoolImportPointer`, :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cuMemPoolSetAccess`, :py:obj:`~.cuMemPoolSetAttribute`\n\n    Notes\n    -----\n    : To create an IPC capable mempool, create a mempool with a CUmemAllocationHandleType other than CU_MEM_HANDLE_TYPE_NONE.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_315cuMemPoolExportToShareableHandle = {"cuMemPoolExportToShareableHandle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_315cuMemPoolExportToShareableHandle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_314cuMemPoolExportToShareableHandle};
static PyObject *__pyx_pw_4cuda_4cuda_315cuMemPoolExportToShareableHandle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_pool = 0;
  PyObject *__pyx_v_handleType = 0;
  unsigned PY_LONG_LONG __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemPoolExportToShareableHandle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pool,&__pyx_n_s_handleType,&__pyx_n_s_flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pool)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleType)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPoolExportToShareableHandle", 1, 3, 3, 1); __PYX_ERR(0, 19774, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPoolExportToShareableHandle", 1, 3, 3, 2); __PYX_ERR(0, 19774, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemPoolExportToShareableHandle") < 0)) __PYX_ERR(0, 19774, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_pool = values[0];
    __pyx_v_handleType = values[1];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[2]); if (unlikely((__pyx_v_flags == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19774, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemPoolExportToShareableHandle", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19774, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_handleType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "handleType"); __PYX_ERR(0, 19774, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_314cuMemPoolExportToShareableHandle(__pyx_self, __pyx_v_pool, __pyx_v_handleType, __pyx_v_flags);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_314cuMemPoolExportToShareableHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool, PyObject *__pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUmemoryPool __pyx_v_cpool;
  PyObject *__pyx_v_ppool = NULL;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType *__pyx_v_chandle_out = 0;
  void *__pyx_v_chandle_out_ptr;
  CUmemAllocationHandleType __pyx_v_chandleType;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUmemAllocationHandleType __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__770)
  __Pyx_RefNannySetupContext("cuMemPoolExportToShareableHandle", 0);
  __Pyx_TraceCall("cuMemPoolExportToShareableHandle", __pyx_f[0], 19774, 0, __PYX_ERR(0, 19774, __pyx_L1_error));

  /* "cuda/cuda.pyx":19811
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
  __pyx_t_1 = (__pyx_v_pool == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19812
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 */
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19811
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19813
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pool, __pyx_ptype_4cuda_4cuda_CUmemoryPool); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19814
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ppool = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19815
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19815, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19813
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19817
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 *         ppool = int(CUmemoryPool(pool))             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool), __pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ppool = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19818
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 * 
 *     cdef utils.HelperCUmemAllocationHandleType chandle_out = utils.HelperCUmemAllocationHandleType(handleType)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19818, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19820
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 *     cdef utils.HelperCUmemAllocationHandleType chandle_out = utils.HelperCUmemAllocationHandleType(handleType)             # <<<<<<<<<<<<<<
 *     cdef void* chandle_out_ptr = <void*><void_ptr>chandle_out.cptr
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType), __pyx_v_handleType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_chandle_out = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":19821
 * 
 *     cdef utils.HelperCUmemAllocationHandleType chandle_out = utils.HelperCUmemAllocationHandleType(handleType)
 *     cdef void* chandle_out_ptr = <void*><void_ptr>chandle_out.cptr             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value
 *     err = ccuda.cuMemPoolExportToShareableHandle(chandle_out_ptr, cpool, chandleType, flags)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_chandle_out), __pyx_n_s_cptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_chandle_out_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":19822
 *     cdef utils.HelperCUmemAllocationHandleType chandle_out = utils.HelperCUmemAllocationHandleType(handleType)
 *     cdef void* chandle_out_ptr = <void*><void_ptr>chandle_out.cptr
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemPoolExportToShareableHandle(chandle_out_ptr, cpool, chandleType, flags)
 *     return (CUresult(err), chandle_out.pyObj())
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_handleType, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUmemAllocationHandleType_enum)__Pyx_PyInt_As_enum__CUmemAllocationHandleType_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 19822, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_chandleType = __pyx_t_6;

  /* "cuda/cuda.pyx":19823
 *     cdef void* chandle_out_ptr = <void*><void_ptr>chandle_out.cptr
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value
 *     err = ccuda.cuMemPoolExportToShareableHandle(chandle_out_ptr, cpool, chandleType, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), chandle_out.pyObj())
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuMemPoolExportToShareableHandle(__pyx_v_chandle_out_ptr, __pyx_v_cpool, __pyx_v_chandleType, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19823, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":19824
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value
 *     err = ccuda.cuMemPoolExportToShareableHandle(chandle_out_ptr, cpool, chandleType, flags)
 *     return (CUresult(err), chandle_out.pyObj())             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 19824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_chandle_out), __pyx_n_s_pyObj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 19824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 19824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19774
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolExportToShareableHandle(pool, handleType not None : CUmemAllocationHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Exports a memory pool to the requested handle type.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppool);
  __Pyx_XDECREF((PyObject *)__pyx_v_chandle_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19827
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolImportFromShareableHandle(handle, handleType not None : CUmemAllocationHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ imports a memory pool from a shared handle.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_317cuMemPoolImportFromShareableHandle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_316cuMemPoolImportFromShareableHandle[] = "cuMemPoolImportFromShareableHandle(handle, handleType: CUmemAllocationHandleType, unsigned long long flags)\n imports a memory pool from a shared handle.\n\n    Specific allocations can be imported from the imported pool with\n    cuMemPoolImportPointer.\n\n    Parameters\n    ----------\n    handle : Any\n        OS handle of the pool to open\n    handleType : :py:obj:`~.CUmemAllocationHandleType`\n        The type of handle being imported\n    flags : unsigned long long\n        must be 0\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    pool_out : :py:obj:`~.CUmemoryPool`\n        Returned memory pool\n\n    See Also\n    --------\n    :py:obj:`~.cuMemPoolExportToShareableHandle`, :py:obj:`~.cuMemPoolExportPointer`, :py:obj:`~.cuMemPoolImportPointer`\n\n    Notes\n    -----\n    Imported memory pools do not support creating new allocations. As such imported memory pools may not be used in cuDeviceSetMemPool or :py:obj:`~.cuMemAllocFromPoolAsync` calls.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_317cuMemPoolImportFromShareableHandle = {"cuMemPoolImportFromShareableHandle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_317cuMemPoolImportFromShareableHandle, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_316cuMemPoolImportFromShareableHandle};
static PyObject *__pyx_pw_4cuda_4cuda_317cuMemPoolImportFromShareableHandle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_handle = 0;
  PyObject *__pyx_v_handleType = 0;
  unsigned PY_LONG_LONG __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemPoolImportFromShareableHandle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handle_2,&__pyx_n_s_handleType,&__pyx_n_s_flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handle_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handleType)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPoolImportFromShareableHandle", 1, 3, 3, 1); __PYX_ERR(0, 19827, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPoolImportFromShareableHandle", 1, 3, 3, 2); __PYX_ERR(0, 19827, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemPoolImportFromShareableHandle") < 0)) __PYX_ERR(0, 19827, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_handle = values[0];
    __pyx_v_handleType = values[1];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[2]); if (unlikely((__pyx_v_flags == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19827, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemPoolImportFromShareableHandle", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19827, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_handleType) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "handleType"); __PYX_ERR(0, 19827, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_316cuMemPoolImportFromShareableHandle(__pyx_self, __pyx_v_handle, __pyx_v_handleType, __pyx_v_flags);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_316cuMemPoolImportFromShareableHandle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_handle, PyObject *__pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  struct __pyx_obj_4cuda_4cuda_CUmemoryPool *__pyx_v_pool_out = 0;
  PyObject *__pyx_v_chandle = NULL;
  void *__pyx_v_chandle_ptr;
  CUmemAllocationHandleType __pyx_v_chandleType;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_2;
  CUmemAllocationHandleType __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__771)
  __Pyx_RefNannySetupContext("cuMemPoolImportFromShareableHandle", 0);
  __Pyx_TraceCall("cuMemPoolImportFromShareableHandle", __pyx_f[0], 19827, 0, __PYX_ERR(0, 19827, __pyx_L1_error));

  /* "cuda/cuda.pyx":19857
 *     Imported memory pools do not support creating new allocations. As such imported memory pools may not be used in cuDeviceSetMemPool or :py:obj:`~.cuMemAllocFromPoolAsync` calls.
 *     """
 *     cdef CUmemoryPool pool_out = CUmemoryPool()             # <<<<<<<<<<<<<<
 *     chandle = utils.HelperInputVoidPtr(handle)
 *     cdef void* chandle_ptr = <void*><void_ptr>chandle.cptr
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pool_out = ((struct __pyx_obj_4cuda_4cuda_CUmemoryPool *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19858
 *     """
 *     cdef CUmemoryPool pool_out = CUmemoryPool()
 *     chandle = utils.HelperInputVoidPtr(handle)             # <<<<<<<<<<<<<<
 *     cdef void* chandle_ptr = <void*><void_ptr>chandle.cptr
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_chandle = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19859
 *     cdef CUmemoryPool pool_out = CUmemoryPool()
 *     chandle = utils.HelperInputVoidPtr(handle)
 *     cdef void* chandle_ptr = <void*><void_ptr>chandle.cptr             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value
 *     err = ccuda.cuMemPoolImportFromShareableHandle(pool_out._ptr, chandle_ptr, chandleType, flags)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_chandle, __pyx_n_s_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_chandle_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_2));

  /* "cuda/cuda.pyx":19860
 *     chandle = utils.HelperInputVoidPtr(handle)
 *     cdef void* chandle_ptr = <void*><void_ptr>chandle.cptr
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemPoolImportFromShareableHandle(pool_out._ptr, chandle_ptr, chandleType, flags)
 *     return (CUresult(err), pool_out)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_handleType, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = ((enum CUmemAllocationHandleType_enum)__Pyx_PyInt_As_enum__CUmemAllocationHandleType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 19860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_chandleType = __pyx_t_3;

  /* "cuda/cuda.pyx":19861
 *     cdef void* chandle_ptr = <void*><void_ptr>chandle.cptr
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value
 *     err = ccuda.cuMemPoolImportFromShareableHandle(pool_out._ptr, chandle_ptr, chandleType, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pool_out)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuMemPoolImportFromShareableHandle(__pyx_v_pool_out->_ptr, __pyx_v_chandle_ptr, __pyx_v_chandleType, __pyx_v_flags); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19861, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":19862
 *     cdef ccuda.CUmemAllocationHandleType chandleType = handleType.value
 *     err = ccuda.cuMemPoolImportFromShareableHandle(pool_out._ptr, chandle_ptr, chandleType, flags)
 *     return (CUresult(err), pool_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 19862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pool_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pool_out));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_pool_out));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19827
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolImportFromShareableHandle(handle, handleType not None : CUmemAllocationHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ imports a memory pool from a shared handle.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pool_out);
  __Pyx_XDECREF(__pyx_v_chandle);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19865
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolExportPointer(ptr):             # <<<<<<<<<<<<<<
 *     """ Export data to share a memory pool allocation between processes.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_319cuMemPoolExportPointer(PyObject *__pyx_self, PyObject *__pyx_v_ptr); /*proto*/
static char __pyx_doc_4cuda_4cuda_318cuMemPoolExportPointer[] = "cuMemPoolExportPointer(ptr)\n Export data to share a memory pool allocation between processes.\n\n    Constructs `shareData_out` for sharing a specific allocation from an\n    already shared memory pool. The recipient process can import the\n    allocation with the :py:obj:`~.cuMemPoolImportPointer` api. The data is\n    not a handle and may be shared through any IPC mechanism.\n\n    Parameters\n    ----------\n    ptr : :py:obj:`~.CUdeviceptr`\n        pointer to memory being exported\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    shareData_out : :py:obj:`~.CUmemPoolPtrExportData`\n        Returned export data\n\n    See Also\n    --------\n    :py:obj:`~.cuMemPoolExportToShareableHandle`, :py:obj:`~.cuMemPoolImportFromShareableHandle`, :py:obj:`~.cuMemPoolImportPointer`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_319cuMemPoolExportPointer = {"cuMemPoolExportPointer", (PyCFunction)__pyx_pw_4cuda_4cuda_319cuMemPoolExportPointer, METH_O, __pyx_doc_4cuda_4cuda_318cuMemPoolExportPointer};
static PyObject *__pyx_pw_4cuda_4cuda_319cuMemPoolExportPointer(PyObject *__pyx_self, PyObject *__pyx_v_ptr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemPoolExportPointer (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_318cuMemPoolExportPointer(__pyx_self, ((PyObject *)__pyx_v_ptr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_318cuMemPoolExportPointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr) {
  CUdeviceptr __pyx_v_cptr;
  PyObject *__pyx_v_pptr = NULL;
  struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData *__pyx_v_shareData_out = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__772)
  __Pyx_RefNannySetupContext("cuMemPoolExportPointer", 0);
  __Pyx_TraceCall("cuMemPoolExportPointer", __pyx_f[0], 19865, 0, __PYX_ERR(0, 19865, __pyx_L1_error));

  /* "cuda/cuda.pyx":19890
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_ptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19891
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 */
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19890
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19892
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19893
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19894
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19894, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19892
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19896
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 *         pptr = int(CUdeviceptr(ptr))             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19897
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 * 
 *     cdef CUmemPoolPtrExportData shareData_out = CUmemPoolPtrExportData()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19897, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19899
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 *     cdef CUmemPoolPtrExportData shareData_out = CUmemPoolPtrExportData()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemPoolExportPointer(shareData_out._ptr, cptr)
 *     return (CUresult(err), shareData_out)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_shareData_out = ((struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":19900
 * 
 *     cdef CUmemPoolPtrExportData shareData_out = CUmemPoolPtrExportData()
 *     err = ccuda.cuMemPoolExportPointer(shareData_out._ptr, cptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), shareData_out)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuMemPoolExportPointer(__pyx_v_shareData_out->__pyx_base._ptr, __pyx_v_cptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19900, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":19901
 *     cdef CUmemPoolPtrExportData shareData_out = CUmemPoolPtrExportData()
 *     err = ccuda.cuMemPoolExportPointer(shareData_out._ptr, cptr)
 *     return (CUresult(err), shareData_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 19901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_shareData_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_shareData_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_shareData_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19865
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolExportPointer(ptr):             # <<<<<<<<<<<<<<
 *     """ Export data to share a memory pool allocation between processes.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolExportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pptr);
  __Pyx_XDECREF((PyObject *)__pyx_v_shareData_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19904
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolImportPointer(pool, shareData : CUmemPoolPtrExportData):             # <<<<<<<<<<<<<<
 *     """ Import a memory pool allocation from another process.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_321cuMemPoolImportPointer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_320cuMemPoolImportPointer[] = "cuMemPoolImportPointer(pool, CUmemPoolPtrExportData shareData: CUmemPoolPtrExportData)\n Import a memory pool allocation from another process.\n\n    Returns in `ptr_out` a pointer to the imported memory. The imported\n    memory must not be accessed before the allocation operation completes\n    in the exporting process. The imported memory must be freed from all\n    importing processes before being freed in the exporting process. The\n    pointer may be freed with cuMemFree or cuMemFreeAsync. If\n    cuMemFreeAsync is used, the free must be completed on the importing\n    process before the free operation on the exporting process.\n\n    Parameters\n    ----------\n    pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t`\n        pool from which to import\n    shareData : :py:obj:`~.CUmemPoolPtrExportData`\n        data specifying the memory to import\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    ptr_out : :py:obj:`~.CUdeviceptr`\n        pointer to imported memory\n\n    See Also\n    --------\n    :py:obj:`~.cuMemPoolExportToShareableHandle`, :py:obj:`~.cuMemPoolImportFromShareableHandle`, :py:obj:`~.cuMemPoolExportPointer`\n\n    Notes\n    -----\n    The cuMemFreeAsync api may be used in the exporting process before the cuMemFreeAsync operation completes in its stream as long as the cuMemFreeAsync in the exporting process specifies a stream with a stream dependency on the importing process's cuMemFreeAsync.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_321cuMemPoolImportPointer = {"cuMemPoolImportPointer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_321cuMemPoolImportPointer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_320cuMemPoolImportPointer};
static PyObject *__pyx_pw_4cuda_4cuda_321cuMemPoolImportPointer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_pool = 0;
  struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData *__pyx_v_shareData = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemPoolImportPointer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pool,&__pyx_n_s_shareData,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pool)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shareData)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPoolImportPointer", 1, 2, 2, 1); __PYX_ERR(0, 19904, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemPoolImportPointer") < 0)) __PYX_ERR(0, 19904, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_pool = values[0];
    __pyx_v_shareData = ((struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemPoolImportPointer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19904, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolImportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shareData), __pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData, 1, "shareData", 0))) __PYX_ERR(0, 19904, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_320cuMemPoolImportPointer(__pyx_self, __pyx_v_pool, __pyx_v_shareData);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_320cuMemPoolImportPointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pool, struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData *__pyx_v_shareData) {
  CUmemoryPool __pyx_v_cpool;
  PyObject *__pyx_v_ppool = NULL;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_ptr_out = 0;
  CUmemPoolPtrExportData *__pyx_v_cshareData_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUmemPoolPtrExportData_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__773)
  __Pyx_RefNannySetupContext("cuMemPoolImportPointer", 0);
  __Pyx_TraceCall("cuMemPoolImportPointer", __pyx_f[0], 19904, 0, __PYX_ERR(0, 19904, __pyx_L1_error));

  /* "cuda/cuda.pyx":19938
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
  __pyx_t_1 = (__pyx_v_pool == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":19939
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 */
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":19938
 *     """
 *     cdef ccuda.CUmemoryPool cpool
 *     if pool is None:             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19940
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pool, __pyx_ptype_4cuda_4cuda_CUmemoryPool); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":19941
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ppool = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":19942
 *     elif isinstance(pool, (CUmemoryPool)):
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19942, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":19940
 *     if pool is None:
 *         cpool = <ccuda.CUmemoryPool><void_ptr>0
 *     elif isinstance(pool, (CUmemoryPool)):             # <<<<<<<<<<<<<<
 *         ppool = int(pool)
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":19944
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 *     else:
 *         ppool = int(CUmemoryPool(pool))             # <<<<<<<<<<<<<<
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool), __pyx_v_pool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ppool = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":19945
 *     else:
 *         ppool = int(CUmemoryPool(pool))
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool             # <<<<<<<<<<<<<<
 * 
 *     cdef CUdeviceptr ptr_out = CUdeviceptr()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppool); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 19945, __pyx_L1_error)
    __pyx_v_cpool = ((CUmemoryPool)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":19947
 *         cpool = <ccuda.CUmemoryPool><void_ptr>ppool
 * 
 *     cdef CUdeviceptr ptr_out = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUmemPoolPtrExportData* cshareData_ptr = shareData._ptr if shareData != None else NULL
 *     err = ccuda.cuMemPoolImportPointer(ptr_out._ptr, cpool, cshareData_ptr)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_ptr_out = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":19948
 * 
 *     cdef CUdeviceptr ptr_out = CUdeviceptr()
 *     cdef ccuda.CUmemPoolPtrExportData* cshareData_ptr = shareData._ptr if shareData != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemPoolImportPointer(ptr_out._ptr, cpool, cshareData_ptr)
 *     return (CUresult(err), ptr_out)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_shareData), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19948, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 19948, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_shareData->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cshareData_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":19949
 *     cdef CUdeviceptr ptr_out = CUdeviceptr()
 *     cdef ccuda.CUmemPoolPtrExportData* cshareData_ptr = shareData._ptr if shareData != None else NULL
 *     err = ccuda.cuMemPoolImportPointer(ptr_out._ptr, cpool, cshareData_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), ptr_out)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuMemPoolImportPointer(__pyx_v_ptr_out->_ptr, __pyx_v_cpool, __pyx_v_cshareData_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 19949, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":19950
 *     cdef ccuda.CUmemPoolPtrExportData* cshareData_ptr = shareData._ptr if shareData != None else NULL
 *     err = ccuda.cuMemPoolImportPointer(ptr_out._ptr, cpool, cshareData_ptr)
 *     return (CUresult(err), ptr_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 19950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_ptr_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_ptr_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_ptr_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19904
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolImportPointer(pool, shareData : CUmemPoolPtrExportData):             # <<<<<<<<<<<<<<
 *     """ Import a memory pool allocation from another process.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMemPoolImportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppool);
  __Pyx_XDECREF((PyObject *)__pyx_v_ptr_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":19953
 * 
 * @cython.embedsignature(True)
 * def cuPointerGetAttribute(attribute not None : CUpointer_attribute, ptr):             # <<<<<<<<<<<<<<
 *     """ Returns information about a pointer.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_323cuPointerGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_322cuPointerGetAttribute[] = "cuPointerGetAttribute(attribute: CUpointer_attribute, ptr)\n Returns information about a pointer.\n\n    The supported attributes are:\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_CONTEXT`:\n\n    - Returns in `*data` the :py:obj:`~.CUcontext` in which `ptr` was\n      allocated or registered. The type of `data` must be\n      :py:obj:`~.CUcontext` *.\n\n    - If `ptr` was not allocated by, mapped by, or registered with a\n      :py:obj:`~.CUcontext` which uses unified virtual addressing then\n      :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned.\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_MEMORY_TYPE`:\n\n    - Returns in `*data` the physical memory type of the memory that `ptr`\n      addresses as a :py:obj:`~.CUmemorytype` enumerated value. The type of\n      `data` must be unsigned int.\n\n    - If `ptr` addresses device memory then `*data` is set to\n      :py:obj:`~.CU_MEMORYTYPE_DEVICE`. The particular :py:obj:`~.CUdevice`\n      on which the memory resides is the :py:obj:`~.CUdevice` of the\n      :py:obj:`~.CUcontext` returned by the\n      :py:obj:`~.CU_POINTER_ATTRIBUTE_CONTEXT` attribute of `ptr`.\n\n    - If `ptr` addresses host memory then `*data` is set to\n      :py:obj:`~.CU_MEMORYTYPE_HOST`.\n\n    - If `ptr` was not allocated by, mapped by, or registered with a\n      :py:obj:`~.CUcontext` which uses unified virtual addressing then\n      :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned.\n\n    - If the current :py:obj:`~.CUcontext` does not support unified virtual\n      addressing then :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` is returned.\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_DEVICE_POINTER`:\n\n    - Returns in `*data` the device pointer value through which `ptr` may\n      be accessed by kernels running in the current :py:obj:`~.CUcontext`.\n      The type of `data` must be CUdeviceptr *.\n\n    - If there exists no device pointer value through which kernels running\n      in the current :py:obj:`~.CUcontext` may access `ptr` then\n      :py:obj:`""~.CUDA_ERROR_INVALID_VALUE` is returned.\n\n    - If there is no current :py:obj:`~.CUcontext` then\n      :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` is returned.\n\n    - Except in the exceptional disjoint addressing cases discussed below,\n      the value returned in `*data` will equal the input value `ptr`.\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_HOST_POINTER`:\n\n    - Returns in `*data` the host pointer value through which `ptr` may be\n      accessed by by the host program. The type of `data` must be void **.\n      If there exists no host pointer value through which the host program\n      may directly access `ptr` then :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n      is returned.\n\n    - Except in the exceptional disjoint addressing cases discussed below,\n      the value returned in `*data` will equal the input value `ptr`.\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_P2P_TOKENS`:\n\n    - Returns in `*data` two tokens for use with the nv-p2p.h Linux kernel\n      interface. `data` must be a struct of type\n      CUDA_POINTER_ATTRIBUTE_P2P_TOKENS.\n\n    - `ptr` must be a pointer to memory obtained from\n      :py:obj:`~.py`:obj:`~.cuMemAlloc()`. Note that p2pToken and\n      vaSpaceToken are only valid for the lifetime of the source\n      allocation. A subsequent allocation at the same address may return\n      completely different tokens. Querying this attribute has a side\n      effect of setting the attribute\n      :py:obj:`~.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS` for the region of memory\n      that `ptr` points to.\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS`:\n\n    - A boolean attribute which when set, ensures that synchronous memory\n      operations initiated on the region of memory that `ptr` points to\n      will always synchronize. See further documentation in the section\n      titled \"API synchronization behavior\" to learn more about cases when\n      synchronous memory operations can exhibit asynchronous behavior.\n\n    - :py:obj:`~.CU_POINTER""_ATTRIBUTE_BUFFER_ID`:\n\n    - Returns in `*data` a buffer ID which is guaranteed to be unique\n      within the process. `data` must point to an unsigned long long.\n\n    - `ptr` must be a pointer to memory obtained from a CUDA memory\n      allocation API. Every memory allocation from any of the CUDA memory\n      allocation APIs will have a unique ID over a process lifetime.\n      Subsequent allocations do not reuse IDs from previous freed\n      allocations. IDs are only unique within a single process.\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_MANAGED`:\n\n    - Returns in `*data` a boolean that indicates whether the pointer\n      points to managed memory or not.\n\n    - If `ptr` is not a valid CUDA pointer then\n      :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned.\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL`:\n\n    - Returns in `*data` an integer representing a device ordinal of a\n      device against which the memory was allocated or registered.\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE`:\n\n    - Returns in `*data` a boolean that indicates if this pointer maps to\n      an allocation that is suitable for :py:obj:`~.cudaIpcGetMemHandle`.\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR`:\n\n    - Returns in `*data` the starting address for the allocation referenced\n      by the device pointer `ptr`. Note that this is not necessarily the\n      address of the mapped region, but the address of the mappable address\n      range `ptr` references (e.g. from :py:obj:`~.cuMemAddressReserve`).\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_RANGE_SIZE`:\n\n    - Returns in `*data` the size for the allocation referenced by the\n      device pointer `ptr`. Note that this is not necessarily the size of\n      the mapped region, but the size of the mappable address range `ptr`\n      references (e.g. from :py:obj:`~.cuMemAddressReserve`). To retrieve\n      the size of the mapped region, see :py:obj:`~.cuMemGetAddressRa""nge`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_MAPPED`:\n\n    - Returns in `*data` a boolean that indicates if this pointer is in a\n      valid address range that is mapped to a backing allocation.\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES`:\n\n    - Returns a bitmask of the allowed handle types for an allocation that\n      may be passed to :py:obj:`~.cuMemExportToShareableHandle`.\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE`:\n\n    - Returns in `*data` the handle to the mempool that the allocation was\n      obtained from.\n\n    Note that for most allocations in the unified virtual address space the\n    host and device pointer for accessing the allocation will be the same.\n    The exceptions to this are\n\n    - user memory registered using :py:obj:`~.cuMemHostRegister`\n\n    - host memory allocated using :py:obj:`~.cuMemHostAlloc` with the\n      :py:obj:`~.CU_MEMHOSTALLOC_WRITECOMBINED` flag For these types of\n      allocation there will exist separate, disjoint host and device\n      addresses for accessing the allocation. In particular\n\n    - The host address will correspond to an invalid unmapped device\n      address (which will result in an exception if accessed from the\n      device)\n\n    - The device address will correspond to an invalid unmapped host\n      address (which will result in an exception if accessed from the\n      host). For these types of allocations, querying\n      :py:obj:`~.CU_POINTER_ATTRIBUTE_HOST_POINTER` and\n      :py:obj:`~.CU_POINTER_ATTRIBUTE_DEVICE_POINTER` may be used to\n      retrieve the host and device addresses from either address.\n\n    Parameters\n    ----------\n    attribute : :py:obj:`~.CUpointer_attribute`\n        Pointer attribute to query\n    ptr : :py:obj:`~.CUdeviceptr`\n        Pointer\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVAL""ID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    data : Any\n        Returned pointer attribute value\n\n    See Also\n    --------\n    :py:obj:`~.cuPointerSetAttribute`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuMemHostUnregister`, :py:obj:`~.cudaPointerGetAttributes`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_323cuPointerGetAttribute = {"cuPointerGetAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_323cuPointerGetAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_322cuPointerGetAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_323cuPointerGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attribute = 0;
  PyObject *__pyx_v_ptr = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuPointerGetAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute,&__pyx_n_s_ptr_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attribute)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuPointerGetAttribute", 1, 2, 2, 1); __PYX_ERR(0, 19953, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuPointerGetAttribute") < 0)) __PYX_ERR(0, 19953, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_attribute = values[0];
    __pyx_v_ptr = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuPointerGetAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 19953, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuPointerGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attribute) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attribute"); __PYX_ERR(0, 19953, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_322cuPointerGetAttribute(__pyx_self, __pyx_v_attribute, __pyx_v_ptr);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_322cuPointerGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attribute, PyObject *__pyx_v_ptr) {
  CUdeviceptr __pyx_v_cptr;
  PyObject *__pyx_v_pptr = NULL;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperCUpointer_attribute *__pyx_v_cdata = 0;
  void *__pyx_v_cdata_ptr;
  CUpointer_attribute __pyx_v_cattribute;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  CUpointer_attribute __pyx_t_7;
  CUresult __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__774)
  __Pyx_RefNannySetupContext("cuPointerGetAttribute", 0);
  __Pyx_TraceCall("cuPointerGetAttribute", __pyx_f[0], 19953, 0, __PYX_ERR(0, 19953, __pyx_L1_error));

  /* "cuda/cuda.pyx":20140
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_ptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20141
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 */
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":20140
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20142
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20143
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20144
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20144, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":20142
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20146
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 *         pptr = int(CUdeviceptr(ptr))             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20147
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 * 
 *     cdef utils.HelperCUpointer_attribute cdata = utils.HelperCUpointer_attribute(attribute, 0, is_getter=True)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20147, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":20149
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 *     cdef utils.HelperCUpointer_attribute cdata = utils.HelperCUpointer_attribute(attribute, 0, is_getter=True)             # <<<<<<<<<<<<<<
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr
 *     cdef ccuda.CUpointer_attribute cattribute = attribute.value
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_attribute);
  __Pyx_GIVEREF(__pyx_v_attribute);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_attribute);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_0);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_getter, Py_True) < 0) __PYX_ERR(0, 20149, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUpointer_attribute), __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cdata = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperCUpointer_attribute *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "cuda/cuda.pyx":20150
 * 
 *     cdef utils.HelperCUpointer_attribute cdata = utils.HelperCUpointer_attribute(attribute, 0, is_getter=True)
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUpointer_attribute cattribute = attribute.value
 *     err = ccuda.cuPointerGetAttribute(cdata_ptr, cattribute, cptr)
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cdata), __pyx_n_s_cptr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_6); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20150, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_cdata_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":20151
 *     cdef utils.HelperCUpointer_attribute cdata = utils.HelperCUpointer_attribute(attribute, 0, is_getter=True)
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr
 *     cdef ccuda.CUpointer_attribute cattribute = attribute.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuPointerGetAttribute(cdata_ptr, cattribute, cptr)
 *     return (CUresult(err), cdata.pyObj())
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_attribute, __pyx_n_s_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = ((enum CUpointer_attribute_enum)__Pyx_PyInt_As_enum__CUpointer_attribute_enum(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 20151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_cattribute = __pyx_t_7;

  /* "cuda/cuda.pyx":20152
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr
 *     cdef ccuda.CUpointer_attribute cattribute = attribute.value
 *     err = ccuda.cuPointerGetAttribute(cdata_ptr, cattribute, cptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), cdata.pyObj())
 * 
 */
  __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuPointerGetAttribute(__pyx_v_cdata_ptr, __pyx_v_cattribute, __pyx_v_cptr); if (unlikely(__pyx_t_8 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 20152, __pyx_L1_error)
  __pyx_v_err = __pyx_t_8;

  /* "cuda/cuda.pyx":20153
 *     cdef ccuda.CUpointer_attribute cattribute = attribute.value
 *     err = ccuda.cuPointerGetAttribute(cdata_ptr, cattribute, cptr)
 *     return (CUresult(err), cdata.pyObj())             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cdata), __pyx_n_s_pyObj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __pyx_t_6 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":19953
 * 
 * @cython.embedsignature(True)
 * def cuPointerGetAttribute(attribute not None : CUpointer_attribute, ptr):             # <<<<<<<<<<<<<<
 *     """ Returns information about a pointer.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuPointerGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pptr);
  __Pyx_XDECREF((PyObject *)__pyx_v_cdata);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20156
 * 
 * @cython.embedsignature(True)
 * def cuMemPrefetchAsync(devPtr, size_t count, dstDevice, hStream):             # <<<<<<<<<<<<<<
 *     """ Prefetches memory to the specified destination device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_325cuMemPrefetchAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_324cuMemPrefetchAsync[] = "cuMemPrefetchAsync(devPtr, size_t count, dstDevice, hStream)\n Prefetches memory to the specified destination device.\n\n    Prefetches memory to the specified destination device. `devPtr` is the\n    base device pointer of the memory to be prefetched and `dstDevice` is\n    the destination device. `count` specifies the number of bytes to copy.\n    `hStream` is the stream in which the operation is enqueued. The memory\n    range must refer to managed memory allocated via\n    :py:obj:`~.cuMemAllocManaged` or declared via managed variables.\n\n    Passing in CU_DEVICE_CPU for `dstDevice` will prefetch the data to host\n    memory. If `dstDevice` is a GPU, then the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` must be non-\n    zero. Additionally, `hStream` must be associated with a device that has\n    a non-zero value for the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`.\n\n    The start address and end address of the memory range will be rounded\n    down and rounded up respectively to be aligned to CPU page size before\n    the prefetch operation is enqueued in the stream.\n\n    If no physical memory has been allocated for this region, then this\n    memory region will be populated and mapped on the destination device.\n    If there's insufficient memory to prefetch the desired region, the\n    Unified Memory driver may evict pages from other\n    :py:obj:`~.cuMemAllocManaged` allocations to host memory in order to\n    make room. Device memory allocated using :py:obj:`~.cuMemAlloc` or\n    :py:obj:`~.cuArrayCreate` will not be evicted.\n\n    By default, any mappings to the previous location of the migrated pages\n    are removed and mappings for the new location are only setup on\n    `dstDevice`. The exact behavior however also depends on the settings\n    applied to this memory range via :py:obj:`~.cuMemAdvise` as described\n    below:\n\n    If :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` was"" set on any subset of\n    this memory range, then that subset will create a read-only copy of the\n    pages on `dstDevice`.\n\n    If :py:obj:`~.CU_MEM_ADVISE_SET_PREFERRED_LOCATION` was called on any\n    subset of this memory range, then the pages will be migrated to\n    `dstDevice` even if `dstDevice` is not the preferred location of any\n    pages in the memory range.\n\n    If :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` was called on any subset\n    of this memory range, then mappings to those pages from all the\n    appropriate processors are updated to refer to the new location if\n    establishing such a mapping is possible. Otherwise, those mappings are\n    cleared.\n\n    Note that this API is not required for functionality and only serves to\n    improve performance by allowing the application to migrate data to a\n    suitable location before it is accessed. Memory accesses to this range\n    are always coherent and are allowed even when the data is actively\n    being migrated.\n\n    Note that this function is asynchronous with respect to the host and\n    all work on other devices.\n\n    Parameters\n    ----------\n    devPtr : :py:obj:`~.CUdeviceptr`\n        Pointer to be prefetched\n    count : size_t\n        Size in bytes\n    dstDevice : :py:obj:`~.CUdevice`\n        Destination device to prefetch to\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to enqueue prefetch operation\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemcpy`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cuMemAdvise`, :py:obj:`~.cudaMemPrefetchAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_325cuMemPrefetchAsync = {"cuMemPrefetchAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_325cuMemPrefetchAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_324cuMemPrefetchAsync};
static PyObject *__pyx_pw_4cuda_4cuda_325cuMemPrefetchAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_devPtr = 0;
  size_t __pyx_v_count;
  PyObject *__pyx_v_dstDevice = 0;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemPrefetchAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_devPtr_2,&__pyx_n_s_count_2,&__pyx_n_s_dstDevice_2,&__pyx_n_s_hStream_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_devPtr_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPrefetchAsync", 1, 4, 4, 1); __PYX_ERR(0, 20156, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPrefetchAsync", 1, 4, 4, 2); __PYX_ERR(0, 20156, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemPrefetchAsync", 1, 4, 4, 3); __PYX_ERR(0, 20156, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemPrefetchAsync") < 0)) __PYX_ERR(0, 20156, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_devPtr = values[0];
    __pyx_v_count = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_count == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 20156, __pyx_L3_error)
    __pyx_v_dstDevice = values[2];
    __pyx_v_hStream = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemPrefetchAsync", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 20156, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemPrefetchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_324cuMemPrefetchAsync(__pyx_self, __pyx_v_devPtr, __pyx_v_count, __pyx_v_dstDevice, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_324cuMemPrefetchAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_devPtr, size_t __pyx_v_count, PyObject *__pyx_v_dstDevice, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUdevice __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUdeviceptr __pyx_v_cdevPtr;
  PyObject *__pyx_v_pdevPtr = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUdevice __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__775)
  __Pyx_RefNannySetupContext("cuMemPrefetchAsync", 0);
  __Pyx_TraceCall("cuMemPrefetchAsync", __pyx_f[0], 20156, 0, __PYX_ERR(0, 20156, __pyx_L1_error));

  /* "cuda/cuda.pyx":20236
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20237
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":20236
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20238
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20239
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20240
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20240, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":20238
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20242
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20243
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdevice cdstDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20243, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":20246
 * 
 *     cdef ccuda.CUdevice cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdevice>0
 *     elif isinstance(dstDevice, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20247
 *     cdef ccuda.CUdevice cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdevice)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdevice)0);

    /* "cuda/cuda.pyx":20246
 * 
 *     cdef ccuda.CUdevice cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdevice>0
 *     elif isinstance(dstDevice, (CUdevice)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":20248
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdevice>0
 *     elif isinstance(dstDevice, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdevice>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20249
 *         cdstDevice = <ccuda.CUdevice>0
 *     elif isinstance(dstDevice, (CUdevice)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdevice>pdstDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20250
 *     elif isinstance(dstDevice, (CUdevice)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdevice>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdevice(dstDevice))
 */
    __pyx_t_6 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdstDevice); if (unlikely((__pyx_t_6 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 20250, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdevice)__pyx_t_6);

    /* "cuda/cuda.pyx":20248
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdevice>0
 *     elif isinstance(dstDevice, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdevice>pdstDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":20252
 *         cdstDevice = <ccuda.CUdevice>pdstDevice
 *     else:
 *         pdstDevice = int(CUdevice(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdevice>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dstDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20253
 *     else:
 *         pdstDevice = int(CUdevice(dstDevice))
 *         cdstDevice = <ccuda.CUdevice>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdevPtr
 */
    __pyx_t_6 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdstDevice); if (unlikely((__pyx_t_6 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 20253, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdevice)__pyx_t_6);
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":20256
 * 
 *     cdef ccuda.CUdeviceptr cdevPtr
 *     if devPtr is None:             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_devPtr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20257
 *     cdef ccuda.CUdeviceptr cdevPtr
 *     if devPtr is None:
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(devPtr, (CUdeviceptr)):
 *         pdevPtr = int(devPtr)
 */
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":20256
 * 
 *     cdef ccuda.CUdeviceptr cdevPtr
 *     if devPtr is None:             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":20258
 *     if devPtr is None:
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdevPtr = int(devPtr)
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_devPtr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20259
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):
 *         pdevPtr = int(devPtr)             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_devPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdevPtr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20260
 *     elif isinstance(devPtr, (CUdeviceptr)):
 *         pdevPtr = int(devPtr)
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr             # <<<<<<<<<<<<<<
 *     else:
 *         pdevPtr = int(CUdeviceptr(devPtr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdevPtr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20260, __pyx_L1_error)
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":20258
 *     if devPtr is None:
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdevPtr = int(devPtr)
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":20262
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *     else:
 *         pdevPtr = int(CUdeviceptr(devPtr))             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_devPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdevPtr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20263
 *     else:
 *         pdevPtr = int(CUdeviceptr(devPtr))
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuMemPrefetchAsync(cdevPtr, count, cdstDevice, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdevPtr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20263, __pyx_L1_error)
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":20265
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 * 
 *     err = ccuda.cuMemPrefetchAsync(cdevPtr, count, cdstDevice, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuMemPrefetchAsync(__pyx_v_cdevPtr, __pyx_v_count, __pyx_v_cdstDevice, __pyx_v_chStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 20265, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":20266
 * 
 *     err = ccuda.cuMemPrefetchAsync(cdevPtr, count, cdstDevice, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 20266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":20156
 * 
 * @cython.embedsignature(True)
 * def cuMemPrefetchAsync(devPtr, size_t count, dstDevice, hStream):             # <<<<<<<<<<<<<<
 *     """ Prefetches memory to the specified destination device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMemPrefetchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XDECREF(__pyx_v_pdevPtr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20269
 * 
 * @cython.embedsignature(True)
 * def cuMemAdvise(devPtr, size_t count, advice not None : CUmem_advise, device):             # <<<<<<<<<<<<<<
 *     """ Advise about the usage of a given memory range.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_327cuMemAdvise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_326cuMemAdvise[] = "cuMemAdvise(devPtr, size_t count, advice: CUmem_advise, device)\n Advise about the usage of a given memory range.\n\n    Advise the Unified Memory subsystem about the usage pattern for the\n    memory range starting at `devPtr` with a size of `count` bytes. The\n    start address and end address of the memory range will be rounded down\n    and rounded up respectively to be aligned to CPU page size before the\n    advice is applied. The memory range must refer to managed memory\n    allocated via :py:obj:`~.cuMemAllocManaged` or declared via managed\n    variables. The memory range could also refer to system-allocated\n    pageable memory provided it represents a valid, host-accessible region\n    of memory and all additional constraints imposed by `advice` as\n    outlined below are also satisfied. Specifying an invalid system-\n    allocated pageable memory range results in an error being returned.\n\n    The `advice` parameter can take the following values:\n\n    - :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY`: This implies that the data\n      is mostly going to be read from and only occasionally written to. Any\n      read accesses from any processor to this region will create a read-\n      only copy of at least the accessed pages in that processor's memory.\n      Additionally, if :py:obj:`~.cuMemPrefetchAsync` is called on this\n      region, it will create a read-only copy of the data on the\n      destination processor. If any processor writes to this region, all\n      copies of the corresponding page will be invalidated except for the\n      one where the write occurred. The `device` argument is ignored for\n      this advice. Note that for a page to be read-duplicated, the\n      accessing processor must either be the CPU or a GPU that has a non-\n      zero value for the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. Also, if a\n      context is created on a device that does not have the device\n      attribute :py:obj:""`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`\n      set, then read-duplication will not occur until all such contexts are\n      destroyed. If the memory region refers to valid system-allocated\n      pageable memory, then the accessing device must have a non-zero value\n      for the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS` for a read-\n      only copy to be created on that device. Note however that if the\n      accessing device also has a non-zero value for the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`,\n      then setting this advice will not create a read-only copy when that\n      device accesses this memory region.\n\n    - :py:obj:`~.CU_MEM_ADVISE_UNSET_READ_MOSTLY`: Undoes the effect of\n      :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` and also prevents the\n      Unified Memory driver from attempting heuristic read-duplication on\n      the memory range. Any read-duplicated copies of the data will be\n      collapsed into a single copy. The location for the collapsed copy\n      will be the preferred location if the page has a preferred location\n      and one of the read-duplicated copies was resident at that location.\n      Otherwise, the location chosen is arbitrary.\n\n    - :py:obj:`~.CU_MEM_ADVISE_SET_PREFERRED_LOCATION`: This advice sets\n      the preferred location for the data to be the memory belonging to\n      `device`. Passing in CU_DEVICE_CPU for `device` sets the preferred\n      location as host memory. If `device` is a GPU, then it must have a\n      non-zero value for the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. Setting\n      the preferred location does not cause data to migrate to that\n      location immediately. Instead, it guides the migration policy when a\n      fault occurs on that memory region. If the data is already in its\n      preferred location and the faulting processor can establ""ish a mapping\n      without requiring the data to be migrated, then data migration will\n      be avoided. On the other hand, if the data is not in its preferred\n      location or if a direct mapping cannot be established, then it will\n      be migrated to the processor accessing it. It is important to note\n      that setting the preferred location does not prevent data prefetching\n      done using :py:obj:`~.cuMemPrefetchAsync`. Having a preferred\n      location can override the page thrash detection and resolution logic\n      in the Unified Memory driver. Normally, if a page is detected to be\n      constantly thrashing between for example host and device memory, the\n      page may eventually be pinned to host memory by the Unified Memory\n      driver. But if the preferred location is set as device memory, then\n      the page will continue to thrash indefinitely. If\n      :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` is also set on this memory\n      region or any subset of it, then the policies associated with that\n      advice will override the policies of this advice, unless read\n      accesses from `device` will not result in a read-only copy being\n      created on that device as outlined in description for the advice\n      :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY`. If the memory region\n      refers to valid system-allocated pageable memory, then `device` must\n      have a non-zero value for the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`. Additionally,\n      if `device` has a non-zero value for the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`,\n      then this call has no effect. Note however that this behavior may\n      change in the future.\n\n    - :py:obj:`~.CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION`: Undoes the effect\n      of :py:obj:`~.CU_MEM_ADVISE_SET_PREFERRED_LOCATION` and changes the\n      preferred location to none.\n\n    - :py:obj:`~.CU_MEM_""ADVISE_SET_ACCESSED_BY`: This advice implies that\n      the data will be accessed by `device`. Passing in\n      :py:obj:`~.CU_DEVICE_CPU` for `device` will set the advice for the\n      CPU. If `device` is a GPU, then the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` must be\n      non-zero. This advice does not cause data migration and has no impact\n      on the location of the data per se. Instead, it causes the data to\n      always be mapped in the specified processor's page tables, as long as\n      the location of the data permits a mapping to be established. If the\n      data gets migrated for any reason, the mappings are updated\n      accordingly. This advice is recommended in scenarios where data\n      locality is not important, but avoiding faults is. Consider for\n      example a system containing multiple GPUs with peer-to-peer access\n      enabled, where the data located on one GPU is occasionally accessed\n      by peer GPUs. In such scenarios, migrating data over to the other\n      GPUs is not as important because the accesses are infrequent and the\n      overhead of migration may be too high. But preventing faults can\n      still help improve performance, and so having a mapping set up in\n      advance is useful. Note that on CPU access of this data, the data may\n      be migrated to host memory because the CPU typically cannot access\n      device memory directly. Any GPU that had the\n      :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` flag set for this data will\n      now have its mapping updated to point to the page in host memory. If\n      :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` is also set on this memory\n      region or any subset of it, then the policies associated with that\n      advice will override the policies of this advice. Additionally, if\n      the preferred location of this memory region or any subset of it is\n      also `device`, then the policies associated with\n      :py:obj:`~.C""U_MEM_ADVISE_SET_PREFERRED_LOCATION` will override the\n      policies of this advice. If the memory region refers to valid system-\n      allocated pageable memory, then `device` must have a non-zero value\n      for the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`. Additionally,\n      if `device` has a non-zero value for the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`,\n      then this call has no effect.\n\n    - :py:obj:`~.CU_MEM_ADVISE_UNSET_ACCESSED_BY`: Undoes the effect of\n      :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY`. Any mappings to the data\n      from `device` may be removed at any time causing accesses to result\n      in non-fatal page faults. If the memory region refers to valid\n      system-allocated pageable memory, then `device` must have a non-zero\n      value for the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`. Additionally,\n      if `device` has a non-zero value for the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`,\n      then this call has no effect.\n\n    Parameters\n    ----------\n    devPtr : :py:obj:`~.CUdeviceptr`\n        Pointer to memory to set the advice for\n    count : size_t\n        Size in bytes of the memory range\n    advice : :py:obj:`~.CUmem_advise`\n        Advice to be applied for the specified memory range\n    device : :py:obj:`~.CUdevice`\n        Device to apply the advice for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemcpy`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cuMemPrefetchAsync`, :py:obj:`~.cudaMemAdvise`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_327cuMemAdvise = {"cuMemAdvise", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_327cuMemAdvise, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_326cuMemAdvise};
static PyObject *__pyx_pw_4cuda_4cuda_327cuMemAdvise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_devPtr = 0;
  size_t __pyx_v_count;
  PyObject *__pyx_v_advice = 0;
  PyObject *__pyx_v_device = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemAdvise (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_devPtr_2,&__pyx_n_s_count_2,&__pyx_n_s_advice,&__pyx_n_s_device,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_devPtr_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAdvise", 1, 4, 4, 1); __PYX_ERR(0, 20269, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advice)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAdvise", 1, 4, 4, 2); __PYX_ERR(0, 20269, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_device)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemAdvise", 1, 4, 4, 3); __PYX_ERR(0, 20269, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemAdvise") < 0)) __PYX_ERR(0, 20269, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_devPtr = values[0];
    __pyx_v_count = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_count == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 20269, __pyx_L3_error)
    __pyx_v_advice = values[2];
    __pyx_v_device = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemAdvise", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 20269, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemAdvise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_advice) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "advice"); __PYX_ERR(0, 20269, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_326cuMemAdvise(__pyx_self, __pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_device);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_326cuMemAdvise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_devPtr, size_t __pyx_v_count, PyObject *__pyx_v_advice, PyObject *__pyx_v_device) {
  CUdevice __pyx_v_cdevice;
  PyObject *__pyx_v_pdevice = NULL;
  CUdeviceptr __pyx_v_cdevPtr;
  PyObject *__pyx_v_pdevPtr = NULL;
  CUmem_advise __pyx_v_cadvice;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_6;
  CUmem_advise __pyx_t_7;
  CUresult __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__776)
  __Pyx_RefNannySetupContext("cuMemAdvise", 0);
  __Pyx_TraceCall("cuMemAdvise", __pyx_f[0], 20269, 0, __PYX_ERR(0, 20269, __pyx_L1_error));

  /* "cuda/cuda.pyx":20430
 *     """
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_device == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20431
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 */
    __pyx_v_cdevice = ((CUdevice)0);

    /* "cuda/cuda.pyx":20430
 *     """
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20432
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_device, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20433
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20434
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdevice = int(CUdevice(device))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 20434, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":20432
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20436
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 *         pdevice = int(CUdevice(device))             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20437
 *     else:
 *         pdevice = int(CUdevice(device))
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cdevPtr
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 20437, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":20440
 * 
 *     cdef ccuda.CUdeviceptr cdevPtr
 *     if devPtr is None:             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_devPtr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20441
 *     cdef ccuda.CUdeviceptr cdevPtr
 *     if devPtr is None:
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(devPtr, (CUdeviceptr)):
 *         pdevPtr = int(devPtr)
 */
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":20440
 * 
 *     cdef ccuda.CUdeviceptr cdevPtr
 *     if devPtr is None:             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":20442
 *     if devPtr is None:
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdevPtr = int(devPtr)
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_devPtr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20443
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):
 *         pdevPtr = int(devPtr)             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_devPtr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdevPtr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20444
 *     elif isinstance(devPtr, (CUdeviceptr)):
 *         pdevPtr = int(devPtr)
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr             # <<<<<<<<<<<<<<
 *     else:
 *         pdevPtr = int(CUdeviceptr(devPtr))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdevPtr); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20444, __pyx_L1_error)
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":20442
 *     if devPtr is None:
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdevPtr = int(devPtr)
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":20446
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *     else:
 *         pdevPtr = int(CUdeviceptr(devPtr))             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_devPtr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdevPtr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20447
 *     else:
 *         pdevPtr = int(CUdeviceptr(devPtr))
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUmem_advise cadvice = advice.value
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdevPtr); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20447, __pyx_L1_error)
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":20449
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 * 
 *     cdef ccuda.CUmem_advise cadvice = advice.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemAdvise(cdevPtr, count, cadvice, cdevice)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_advice, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = ((enum CUmem_advise_enum)__Pyx_PyInt_As_enum__CUmem_advise_enum(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 20449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cadvice = __pyx_t_7;

  /* "cuda/cuda.pyx":20450
 * 
 *     cdef ccuda.CUmem_advise cadvice = advice.value
 *     err = ccuda.cuMemAdvise(cdevPtr, count, cadvice, cdevice)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuMemAdvise(__pyx_v_cdevPtr, __pyx_v_count, __pyx_v_cadvice, __pyx_v_cdevice); if (unlikely(__pyx_t_8 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 20450, __pyx_L1_error)
  __pyx_v_err = __pyx_t_8;

  /* "cuda/cuda.pyx":20451
 *     cdef ccuda.CUmem_advise cadvice = advice.value
 *     err = ccuda.cuMemAdvise(cdevPtr, count, cadvice, cdevice)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 20451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":20269
 * 
 * @cython.embedsignature(True)
 * def cuMemAdvise(devPtr, size_t count, advice not None : CUmem_advise, device):             # <<<<<<<<<<<<<<
 *     """ Advise about the usage of a given memory range.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cuda.cuda.cuMemAdvise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdevice);
  __Pyx_XDECREF(__pyx_v_pdevPtr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20454
 * 
 * @cython.embedsignature(True)
 * def cuMemRangeGetAttribute(size_t dataSize, attribute not None : CUmem_range_attribute, devPtr, size_t count):             # <<<<<<<<<<<<<<
 *     """ Query an attribute of a given memory range.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_329cuMemRangeGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_328cuMemRangeGetAttribute[] = "cuMemRangeGetAttribute(size_t dataSize, attribute: CUmem_range_attribute, devPtr, size_t count)\n Query an attribute of a given memory range.\n\n    Query an attribute about the memory range starting at `devPtr` with a\n    size of `count` bytes. The memory range must refer to managed memory\n    allocated via :py:obj:`~.cuMemAllocManaged` or declared via managed\n    variables.\n\n    The `attribute` parameter can take the following values:\n\n    - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY`: If this attribute is\n      specified, `data` will be interpreted as a 32-bit integer, and\n      `dataSize` must be 4. The result returned will be 1 if all pages in\n      the given memory range have read-duplication enabled, or 0 otherwise.\n\n    - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION`: If this\n      attribute is specified, `data` will be interpreted as a 32-bit\n      integer, and `dataSize` must be 4. The result returned will be a GPU\n      device id if all pages in the memory range have that GPU as their\n      preferred location, or it will be CU_DEVICE_CPU if all pages in the\n      memory range have the CPU as their preferred location, or it will be\n      CU_DEVICE_INVALID if either all the pages don't have the same\n      preferred location or some of the pages don't have a preferred\n      location at all. Note that the actual location of the pages in the\n      memory range at the time of the query may be different from the\n      preferred location.\n\n    - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY`: If this attribute is\n      specified, `data` will be interpreted as an array of 32-bit integers,\n      and `dataSize` must be a non-zero multiple of 4. The result returned\n      will be a list of device ids that had\n      :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` set for that entire memory\n      range. If any device does not have that advice set for the entire\n      memory range, that device will not be included. If `data` is larger""\n      than the number of devices that have that advice set for that memory\n      range, CU_DEVICE_INVALID will be returned in all the extra space\n      provided. For ex., if `dataSize` is 12 (i.e. `data` has 3 elements)\n      and only device 0 has the advice set, then the result returned will\n      be { 0, CU_DEVICE_INVALID, CU_DEVICE_INVALID }. If `data` is smaller\n      than the number of devices that have that advice set, then only as\n      many devices will be returned as can fit in the array. There is no\n      guarantee on which specific devices will be returned, however.\n\n    - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION`: If this\n      attribute is specified, `data` will be interpreted as a 32-bit\n      integer, and `dataSize` must be 4. The result returned will be the\n      last location to which all pages in the memory range were prefetched\n      explicitly via :py:obj:`~.cuMemPrefetchAsync`. This will either be a\n      GPU id or CU_DEVICE_CPU depending on whether the last location for\n      prefetch was a GPU or the CPU respectively. If any page in the memory\n      range was never explicitly prefetched or if all pages were not\n      prefetched to the same location, CU_DEVICE_INVALID will be returned.\n      Note that this simply returns the last location that the applicaton\n      requested to prefetch the memory range to. It gives no indication as\n      to whether the prefetch operation to that location has completed or\n      even begun.\n\n    Parameters\n    ----------\n    dataSize : size_t\n        Array containing the size of data\n    attribute : :py:obj:`~.CUmem_range_attribute`\n        The attribute to query\n    devPtr : :py:obj:`~.CUdeviceptr`\n        Start of the range to query\n    count : size_t\n        Size of the range to query\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    data : Any\n        A"" pointers to a memory location where the result of each attribute\n        query will be written to.\n\n    See Also\n    --------\n    :py:obj:`~.cuMemRangeGetAttributes`, :py:obj:`~.cuMemPrefetchAsync`, :py:obj:`~.cuMemAdvise`, :py:obj:`~.cudaMemRangeGetAttribute`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_329cuMemRangeGetAttribute = {"cuMemRangeGetAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_329cuMemRangeGetAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_328cuMemRangeGetAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_329cuMemRangeGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_dataSize;
  PyObject *__pyx_v_attribute = 0;
  PyObject *__pyx_v_devPtr = 0;
  size_t __pyx_v_count;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemRangeGetAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dataSize,&__pyx_n_s_attribute,&__pyx_n_s_devPtr_2,&__pyx_n_s_count_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dataSize)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attribute)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemRangeGetAttribute", 1, 4, 4, 1); __PYX_ERR(0, 20454, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_devPtr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemRangeGetAttribute", 1, 4, 4, 2); __PYX_ERR(0, 20454, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemRangeGetAttribute", 1, 4, 4, 3); __PYX_ERR(0, 20454, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemRangeGetAttribute") < 0)) __PYX_ERR(0, 20454, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_dataSize = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_dataSize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 20454, __pyx_L3_error)
    __pyx_v_attribute = values[1];
    __pyx_v_devPtr = values[2];
    __pyx_v_count = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_count == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 20454, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemRangeGetAttribute", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 20454, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemRangeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attribute) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attribute"); __PYX_ERR(0, 20454, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_328cuMemRangeGetAttribute(__pyx_self, __pyx_v_dataSize, __pyx_v_attribute, __pyx_v_devPtr, __pyx_v_count);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_328cuMemRangeGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_dataSize, PyObject *__pyx_v_attribute, PyObject *__pyx_v_devPtr, size_t __pyx_v_count) {
  CUdeviceptr __pyx_v_cdevPtr;
  PyObject *__pyx_v_pdevPtr = NULL;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmem_range_attribute *__pyx_v_cdata = 0;
  void *__pyx_v_cdata_ptr;
  CUmem_range_attribute __pyx_v_cattribute;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUmem_range_attribute __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__777)
  __Pyx_RefNannySetupContext("cuMemRangeGetAttribute", 0);
  __Pyx_TraceCall("cuMemRangeGetAttribute", __pyx_f[0], 20454, 0, __PYX_ERR(0, 20454, __pyx_L1_error));

  /* "cuda/cuda.pyx":20535
 *     """
 *     cdef ccuda.CUdeviceptr cdevPtr
 *     if devPtr is None:             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_devPtr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20536
 *     cdef ccuda.CUdeviceptr cdevPtr
 *     if devPtr is None:
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(devPtr, (CUdeviceptr)):
 *         pdevPtr = int(devPtr)
 */
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":20535
 *     """
 *     cdef ccuda.CUdeviceptr cdevPtr
 *     if devPtr is None:             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20537
 *     if devPtr is None:
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdevPtr = int(devPtr)
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_devPtr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20538
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):
 *         pdevPtr = int(devPtr)             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_devPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdevPtr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20539
 *     elif isinstance(devPtr, (CUdeviceptr)):
 *         pdevPtr = int(devPtr)
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr             # <<<<<<<<<<<<<<
 *     else:
 *         pdevPtr = int(CUdeviceptr(devPtr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdevPtr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20539, __pyx_L1_error)
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":20537
 *     if devPtr is None:
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdevPtr = int(devPtr)
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20541
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *     else:
 *         pdevPtr = int(CUdeviceptr(devPtr))             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_devPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdevPtr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20542
 *     else:
 *         pdevPtr = int(CUdeviceptr(devPtr))
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr             # <<<<<<<<<<<<<<
 * 
 *     cdef utils.HelperCUmem_range_attribute cdata = utils.HelperCUmem_range_attribute(attribute, dataSize)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdevPtr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20542, __pyx_L1_error)
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":20544
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 * 
 *     cdef utils.HelperCUmem_range_attribute cdata = utils.HelperCUmem_range_attribute(attribute, dataSize)             # <<<<<<<<<<<<<<
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr
 *     cdef ccuda.CUmem_range_attribute cattribute = attribute.value
 */
  __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_dataSize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_attribute);
  __Pyx_GIVEREF(__pyx_v_attribute);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_attribute);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUmem_range_attribute), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cdata = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmem_range_attribute *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":20545
 * 
 *     cdef utils.HelperCUmem_range_attribute cdata = utils.HelperCUmem_range_attribute(attribute, dataSize)
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUmem_range_attribute cattribute = attribute.value
 *     err = ccuda.cuMemRangeGetAttribute(cdata_ptr, dataSize, cattribute, cdevPtr, count)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cdata), __pyx_n_s_cptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20545, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cdata_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":20546
 *     cdef utils.HelperCUmem_range_attribute cdata = utils.HelperCUmem_range_attribute(attribute, dataSize)
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr
 *     cdef ccuda.CUmem_range_attribute cattribute = attribute.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemRangeGetAttribute(cdata_ptr, dataSize, cattribute, cdevPtr, count)
 *     return (CUresult(err), cdata.pyObj())
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attribute, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUmem_range_attribute_enum)__Pyx_PyInt_As_enum__CUmem_range_attribute_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 20546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattribute = __pyx_t_6;

  /* "cuda/cuda.pyx":20547
 *     cdef void* cdata_ptr = <void*><void_ptr>cdata.cptr
 *     cdef ccuda.CUmem_range_attribute cattribute = attribute.value
 *     err = ccuda.cuMemRangeGetAttribute(cdata_ptr, dataSize, cattribute, cdevPtr, count)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), cdata.pyObj())
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuMemRangeGetAttribute(__pyx_v_cdata_ptr, __pyx_v_dataSize, __pyx_v_cattribute, __pyx_v_cdevPtr, __pyx_v_count); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 20547, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":20548
 *     cdef ccuda.CUmem_range_attribute cattribute = attribute.value
 *     err = ccuda.cuMemRangeGetAttribute(cdata_ptr, dataSize, cattribute, cdevPtr, count)
 *     return (CUresult(err), cdata.pyObj())             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 20548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cdata), __pyx_n_s_pyObj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 20548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 20548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":20454
 * 
 * @cython.embedsignature(True)
 * def cuMemRangeGetAttribute(size_t dataSize, attribute not None : CUmem_range_attribute, devPtr, size_t count):             # <<<<<<<<<<<<<<
 *     """ Query an attribute of a given memory range.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuMemRangeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdevPtr);
  __Pyx_XDECREF((PyObject *)__pyx_v_cdata);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20551
 * 
 * @cython.embedsignature(True)
 * def cuMemRangeGetAttributes(dataSizes : List[int], attributes : List[CUmem_range_attribute], size_t numAttributes, devPtr, size_t count):             # <<<<<<<<<<<<<<
 *     """ Query attributes of a given memory range.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_331cuMemRangeGetAttributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_330cuMemRangeGetAttributes[] = "cuMemRangeGetAttributes(dataSizes: List[int], attributes: List[CUmem_range_attribute], size_t numAttributes, devPtr, size_t count)\n Query attributes of a given memory range.\n\n    Query attributes of the memory range starting at `devPtr` with a size\n    of `count` bytes. The memory range must refer to managed memory\n    allocated via :py:obj:`~.cuMemAllocManaged` or declared via managed\n    variables. The `attributes` array will be interpreted to have\n    `numAttributes` entries. The `dataSizes` array will also be interpreted\n    to have `numAttributes` entries. The results of the query will be\n    stored in `data`.\n\n    The list of supported attributes are given below. Please refer to\n    :py:obj:`~.cuMemRangeGetAttribute` for attribute descriptions and\n    restrictions.\n\n    - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY`\n\n    - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION`\n\n    - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY`\n\n    - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION`\n\n    Parameters\n    ----------\n    dataSizes : List[int]\n        Array containing the sizes of each result\n    attributes : List[:py:obj:`~.CUmem_range_attribute`]\n        An array of attributes to query (numAttributes and the number of\n        attributes in this array should match)\n    numAttributes : size_t\n        Number of attributes to query\n    devPtr : :py:obj:`~.CUdeviceptr`\n        Start of the range to query\n    count : size_t\n        Size of the range to query\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    data : List[Any]\n        A two-dimensional array containing pointers to memory locations\n        where the result of each attribute query will be written to.\n\n    See Also\n    --------\n    :py:obj:`~.cuMemRangeGetAttribute`, :py:ob""j:`~.cuMemAdvise`, :py:obj:`~.cuMemPrefetchAsync`, :py:obj:`~.cudaMemRangeGetAttributes`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_331cuMemRangeGetAttributes = {"cuMemRangeGetAttributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_331cuMemRangeGetAttributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_330cuMemRangeGetAttributes};
static PyObject *__pyx_pw_4cuda_4cuda_331cuMemRangeGetAttributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dataSizes = 0;
  PyObject *__pyx_v_attributes = 0;
  size_t __pyx_v_numAttributes;
  PyObject *__pyx_v_devPtr = 0;
  size_t __pyx_v_count;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuMemRangeGetAttributes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dataSizes,&__pyx_n_s_attributes,&__pyx_n_s_numAttributes,&__pyx_n_s_devPtr_2,&__pyx_n_s_count_2,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dataSizes)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attributes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemRangeGetAttributes", 1, 5, 5, 1); __PYX_ERR(0, 20551, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numAttributes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemRangeGetAttributes", 1, 5, 5, 2); __PYX_ERR(0, 20551, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_devPtr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemRangeGetAttributes", 1, 5, 5, 3); __PYX_ERR(0, 20551, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuMemRangeGetAttributes", 1, 5, 5, 4); __PYX_ERR(0, 20551, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuMemRangeGetAttributes") < 0)) __PYX_ERR(0, 20551, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_dataSizes = values[0];
    __pyx_v_attributes = values[1];
    __pyx_v_numAttributes = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numAttributes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 20551, __pyx_L3_error)
    __pyx_v_devPtr = values[3];
    __pyx_v_count = __Pyx_PyInt_As_size_t(values[4]); if (unlikely((__pyx_v_count == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 20551, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuMemRangeGetAttributes", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 20551, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemRangeGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_330cuMemRangeGetAttributes(__pyx_self, __pyx_v_dataSizes, __pyx_v_attributes, __pyx_v_numAttributes, __pyx_v_devPtr, __pyx_v_count);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_23cuMemRangeGetAttributes_2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":20611
 * 
 *     attributes = [] if attributes is None else attributes
 *     if not all(isinstance(_x, (CUmem_range_attribute)) for _x in attributes):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUmem_range_attribute]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_23cuMemRangeGetAttributes_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_17_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_17_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 20611, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_23cuMemRangeGetAttributes_2generator8, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuMemRangeGetAttributes_locals_g, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 20611, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemRangeGetAttributes.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_23cuMemRangeGetAttributes_2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 20611, 0, __PYX_ERR(0, 20611, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 20611, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_attributes)) { __Pyx_RaiseClosureNameError("attributes"); __PYX_ERR(0, 20611, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_attributes)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_attributes)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_attributes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20611, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 20611, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 20611, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 20611, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUmem_range_attribute); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v__x, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 20611, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_23cuMemRangeGetAttributes_5generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":20614
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUmem_range_attribute]")
 * 
 *     if not all(isinstance(_x, (int)) for _x in dataSizes):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dataSizes' is not instance of type (expected List[int]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_23cuMemRangeGetAttributes_3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_18_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_18_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 20614, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_23cuMemRangeGetAttributes_5generator9, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuMemRangeGetAttributes_locals_g, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 20614, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuMemRangeGetAttributes.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_23cuMemRangeGetAttributes_5generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 20614, 0, __PYX_ERR(0, 20614, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 20614, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dataSizes)) { __Pyx_RaiseClosureNameError("dataSizes"); __PYX_ERR(0, 20614, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dataSizes)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dataSizes)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dataSizes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dataSizes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20614, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 20614, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20614, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 20614, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20614, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 20614, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = PyInt_Check(__pyx_cur_scope->__pyx_v__x); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20551
 * 
 * @cython.embedsignature(True)
 * def cuMemRangeGetAttributes(dataSizes : List[int], attributes : List[CUmem_range_attribute], size_t numAttributes, devPtr, size_t count):             # <<<<<<<<<<<<<<
 *     """ Query attributes of a given memory range.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_330cuMemRangeGetAttributes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dataSizes, PyObject *__pyx_v_attributes, size_t __pyx_v_numAttributes, PyObject *__pyx_v_devPtr, size_t __pyx_v_count) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *__pyx_cur_scope;
  CUdeviceptr __pyx_v_cdevPtr;
  PyObject *__pyx_v_pdevPtr = NULL;
  PyObject *__pyx_v_pylist = NULL;
  struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *__pyx_v_voidStarHelper = 0;
  void **__pyx_v_cvoidStarHelper_ptr;
  std::vector<size_t>  __pyx_v_cdataSizes;
  std::vector<CUmem_range_attribute>  __pyx_v_cattributes;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_23cuMemRangeGetAttributes_2generator8 = 0;
  PyObject *__pyx_gb_4cuda_4cuda_23cuMemRangeGetAttributes_5generator9 = 0;
  PyObject *__pyx_9genexpr80__pyx_v_pyattributes = NULL;
  PyObject *__pyx_9genexpr80__pyx_v_pydataSizes = NULL;
  PyObject *__pyx_9genexpr81__pyx_v_pyattributes = NULL;
  PyObject *__pyx_9genexpr82__pyx_v_obj = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  std::vector<size_t>  __pyx_t_13;
  std::vector<CUmem_range_attribute>  __pyx_t_14;
  CUresult __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__778)
  __Pyx_RefNannySetupContext("cuMemRangeGetAttributes", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 20551, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuMemRangeGetAttributes", __pyx_f[0], 20551, 0, __PYX_ERR(0, 20551, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dataSizes = __pyx_v_dataSizes;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dataSizes);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dataSizes);
  __pyx_cur_scope->__pyx_v_attributes = __pyx_v_attributes;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_attributes);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_attributes);

  /* "cuda/cuda.pyx":20601
 *     """
 *     cdef ccuda.CUdeviceptr cdevPtr
 *     if devPtr is None:             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_devPtr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20602
 *     cdef ccuda.CUdeviceptr cdevPtr
 *     if devPtr is None:
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(devPtr, (CUdeviceptr)):
 *         pdevPtr = int(devPtr)
 */
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":20601
 *     """
 *     cdef ccuda.CUdeviceptr cdevPtr
 *     if devPtr is None:             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20603
 *     if devPtr is None:
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdevPtr = int(devPtr)
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_devPtr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20604
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):
 *         pdevPtr = int(devPtr)             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_devPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdevPtr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20605
 *     elif isinstance(devPtr, (CUdeviceptr)):
 *         pdevPtr = int(devPtr)
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr             # <<<<<<<<<<<<<<
 *     else:
 *         pdevPtr = int(CUdeviceptr(devPtr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdevPtr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20605, __pyx_L1_error)
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":20603
 *     if devPtr is None:
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(devPtr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdevPtr = int(devPtr)
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20607
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 *     else:
 *         pdevPtr = int(CUdeviceptr(devPtr))             # <<<<<<<<<<<<<<
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_devPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdevPtr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20608
 *     else:
 *         pdevPtr = int(CUdeviceptr(devPtr))
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr             # <<<<<<<<<<<<<<
 * 
 *     attributes = [] if attributes is None else attributes
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdevPtr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20608, __pyx_L1_error)
    __pyx_v_cdevPtr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":20610
 *         cdevPtr = <ccuda.CUdeviceptr><void_ptr>pdevPtr
 * 
 *     attributes = [] if attributes is None else attributes             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUmem_range_attribute)) for _x in attributes):
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUmem_range_attribute]")
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_attributes == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_attributes);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_attributes;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_attributes);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_attributes, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":20611
 * 
 *     attributes = [] if attributes is None else attributes
 *     if not all(isinstance(_x, (CUmem_range_attribute)) for _x in attributes):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUmem_range_attribute]")
 * 
 */
  __pyx_t_5 = __pyx_pf_4cuda_4cuda_23cuMemRangeGetAttributes_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 20611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":20612
 *     attributes = [] if attributes is None else attributes
 *     if not all(isinstance(_x, (CUmem_range_attribute)) for _x in attributes):
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUmem_range_attribute]")             # <<<<<<<<<<<<<<
 * 
 *     if not all(isinstance(_x, (int)) for _x in dataSizes):
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__779, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 20612, __pyx_L1_error)

    /* "cuda/cuda.pyx":20611
 * 
 *     attributes = [] if attributes is None else attributes
 *     if not all(isinstance(_x, (CUmem_range_attribute)) for _x in attributes):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUmem_range_attribute]")
 * 
 */
  }

  /* "cuda/cuda.pyx":20614
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUmem_range_attribute]")
 * 
 *     if not all(isinstance(_x, (int)) for _x in dataSizes):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dataSizes' is not instance of type (expected List[int]")
 * 
 */
  __pyx_t_3 = __pyx_pf_4cuda_4cuda_23cuMemRangeGetAttributes_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 20614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cuda/cuda.pyx":20615
 * 
 *     if not all(isinstance(_x, (int)) for _x in dataSizes):
 *         raise TypeError("Argument 'dataSizes' is not instance of type (expected List[int]")             # <<<<<<<<<<<<<<
 * 
 *     pylist = [utils.HelperCUmem_range_attribute(pyattributes, pydataSizes) for (pyattributes, pydataSizes) in zip(attributes, dataSizes)]
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__780, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 20615, __pyx_L1_error)

    /* "cuda/cuda.pyx":20614
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUmem_range_attribute]")
 * 
 *     if not all(isinstance(_x, (int)) for _x in dataSizes):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dataSizes' is not instance of type (expected List[int]")
 * 
 */
  }

  /* "cuda/cuda.pyx":20617
 *         raise TypeError("Argument 'dataSizes' is not instance of type (expected List[int]")
 * 
 *     pylist = [utils.HelperCUmem_range_attribute(pyattributes, pydataSizes) for (pyattributes, pydataSizes) in zip(attributes, dataSizes)]             # <<<<<<<<<<<<<<
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     cdef void** cvoidStarHelper_ptr = <void**><void_ptr>voidStarHelper.cptr
 */
  { /* enter inner scope */
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20617, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20617, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_attributes);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_attributes);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_attributes);
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dataSizes);
    __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dataSizes);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_dataSizes);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20617, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20617, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 20617, __pyx_L8_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 20617, __pyx_L8_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20617, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 20617, __pyx_L8_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20617, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_8(__pyx_t_3);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 20617, __pyx_L8_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
        PyObject* sequence = __pyx_t_6;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 20617, __pyx_L8_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        #else
        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 20617, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20617, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_10);
        #endif
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 20617, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
        index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_10);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 20617, __pyx_L8_error)
        __pyx_t_12 = NULL;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L12_unpacking_done;
        __pyx_L11_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_12 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 20617, __pyx_L8_error)
        __pyx_L12_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr80__pyx_v_pyattributes, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_9genexpr80__pyx_v_pydataSizes, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20617, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_9genexpr80__pyx_v_pyattributes);
      __Pyx_GIVEREF(__pyx_9genexpr80__pyx_v_pyattributes);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_9genexpr80__pyx_v_pyattributes);
      __Pyx_INCREF(__pyx_9genexpr80__pyx_v_pydataSizes);
      __Pyx_GIVEREF(__pyx_9genexpr80__pyx_v_pydataSizes);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_9genexpr80__pyx_v_pydataSizes);
      __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUmem_range_attribute), __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20617, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 20617, __pyx_L8_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr80__pyx_v_pyattributes); __pyx_9genexpr80__pyx_v_pyattributes = 0;
    __Pyx_XDECREF(__pyx_9genexpr80__pyx_v_pydataSizes); __pyx_9genexpr80__pyx_v_pydataSizes = 0;
    goto __pyx_L13_exit_scope;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_9genexpr80__pyx_v_pyattributes); __pyx_9genexpr80__pyx_v_pyattributes = 0;
    __Pyx_XDECREF(__pyx_9genexpr80__pyx_v_pydataSizes); __pyx_9genexpr80__pyx_v_pydataSizes = 0;
    goto __pyx_L1_error;
    __pyx_L13_exit_scope:;
  } /* exit inner scope */
  __pyx_v_pylist = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":20618
 * 
 *     pylist = [utils.HelperCUmem_range_attribute(pyattributes, pydataSizes) for (pyattributes, pydataSizes) in zip(attributes, dataSizes)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)             # <<<<<<<<<<<<<<
 *     cdef void** cvoidStarHelper_ptr = <void**><void_ptr>voidStarHelper.cptr
 *     cdef vector[size_t] cdataSizes = dataSizes
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_InputVoidPtrPtrHelper), __pyx_v_pylist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_voidStarHelper = ((struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":20619
 *     pylist = [utils.HelperCUmem_range_attribute(pyattributes, pydataSizes) for (pyattributes, pydataSizes) in zip(attributes, dataSizes)]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     cdef void** cvoidStarHelper_ptr = <void**><void_ptr>voidStarHelper.cptr             # <<<<<<<<<<<<<<
 *     cdef vector[size_t] cdataSizes = dataSizes
 *     cdef vector[ccuda.CUmem_range_attribute] cattributes = [pyattributes.value for pyattributes in (attributes)]
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_voidStarHelper), __pyx_n_s_cptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cvoidStarHelper_ptr = ((void **)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":20620
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     cdef void** cvoidStarHelper_ptr = <void**><void_ptr>voidStarHelper.cptr
 *     cdef vector[size_t] cdataSizes = dataSizes             # <<<<<<<<<<<<<<
 *     cdef vector[ccuda.CUmem_range_attribute] cattributes = [pyattributes.value for pyattributes in (attributes)]
 *     if numAttributes > <size_t>len(dataSizes): raise RuntimeError("List is too small: " + str(len(dataSizes)) + " < " + str(numAttributes))
 */
  __pyx_t_13 = __pyx_convert_vector_from_py_size_t(__pyx_cur_scope->__pyx_v_dataSizes); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 20620, __pyx_L1_error)
  __pyx_v_cdataSizes = __pyx_t_13;

  /* "cuda/cuda.pyx":20621
 *     cdef void** cvoidStarHelper_ptr = <void**><void_ptr>voidStarHelper.cptr
 *     cdef vector[size_t] cdataSizes = dataSizes
 *     cdef vector[ccuda.CUmem_range_attribute] cattributes = [pyattributes.value for pyattributes in (attributes)]             # <<<<<<<<<<<<<<
 *     if numAttributes > <size_t>len(dataSizes): raise RuntimeError("List is too small: " + str(len(dataSizes)) + " < " + str(numAttributes))
 *     if numAttributes > <size_t>len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes))
 */
  { /* enter inner scope */
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20621, __pyx_L16_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_attributes)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_attributes)) {
      __pyx_t_3 = __pyx_cur_scope->__pyx_v_attributes; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20621, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 20621, __pyx_L16_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_10); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 20621, __pyx_L16_error)
          #else
          __pyx_t_10 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20621, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_10); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 20621, __pyx_L16_error)
          #else
          __pyx_t_10 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20621, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        }
      } else {
        __pyx_t_10 = __pyx_t_8(__pyx_t_3);
        if (unlikely(!__pyx_t_10)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 20621, __pyx_L16_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr81__pyx_v_pyattributes, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr81__pyx_v_pyattributes, __pyx_n_s_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20621, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 20621, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr81__pyx_v_pyattributes); __pyx_9genexpr81__pyx_v_pyattributes = 0;
    goto __pyx_L19_exit_scope;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_9genexpr81__pyx_v_pyattributes); __pyx_9genexpr81__pyx_v_pyattributes = 0;
    goto __pyx_L1_error;
    __pyx_L19_exit_scope:;
  } /* exit inner scope */
  __pyx_t_14 = __pyx_convert_vector_from_py_CUmem_range_attribute(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 20621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattributes = __pyx_t_14;

  /* "cuda/cuda.pyx":20622
 *     cdef vector[size_t] cdataSizes = dataSizes
 *     cdef vector[ccuda.CUmem_range_attribute] cattributes = [pyattributes.value for pyattributes in (attributes)]
 *     if numAttributes > <size_t>len(dataSizes): raise RuntimeError("List is too small: " + str(len(dataSizes)) + " < " + str(numAttributes))             # <<<<<<<<<<<<<<
 *     if numAttributes > <size_t>len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes))
 *     err = ccuda.cuMemRangeGetAttributes(cvoidStarHelper_ptr, cdataSizes.data(), cattributes.data(), numAttributes, cdevPtr, count)
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_dataSizes;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_7 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 20622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = ((__pyx_v_numAttributes > ((size_t)__pyx_t_7)) != 0);
  if (unlikely(__pyx_t_1)) {
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dataSizes;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 20622, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u__660); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_numAttributes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_10, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __PYX_ERR(0, 20622, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":20623
 *     cdef vector[ccuda.CUmem_range_attribute] cattributes = [pyattributes.value for pyattributes in (attributes)]
 *     if numAttributes > <size_t>len(dataSizes): raise RuntimeError("List is too small: " + str(len(dataSizes)) + " < " + str(numAttributes))
 *     if numAttributes > <size_t>len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuMemRangeGetAttributes(cvoidStarHelper_ptr, cdataSizes.data(), cattributes.data(), numAttributes, cdevPtr, count)
 *     return (CUresult(err), [obj.pyObj() for obj in pylist])
 */
  __pyx_t_10 = __pyx_cur_scope->__pyx_v_attributes;
  __Pyx_INCREF(__pyx_t_10);
  __pyx_t_7 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 20623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_1 = ((__pyx_v_numAttributes > ((size_t)__pyx_t_7)) != 0);
  if (unlikely(__pyx_t_1)) {
    __pyx_t_10 = __pyx_cur_scope->__pyx_v_attributes;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_7 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 20623, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_10, __pyx_kp_u__660); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyInt_FromSize_t(__pyx_v_numAttributes); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 20623, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":20624
 *     if numAttributes > <size_t>len(dataSizes): raise RuntimeError("List is too small: " + str(len(dataSizes)) + " < " + str(numAttributes))
 *     if numAttributes > <size_t>len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes))
 *     err = ccuda.cuMemRangeGetAttributes(cvoidStarHelper_ptr, cdataSizes.data(), cattributes.data(), numAttributes, cdevPtr, count)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), [obj.pyObj() for obj in pylist])
 * 
 */
  __pyx_t_15 = __pyx_f_4cuda_5ccuda_cuMemRangeGetAttributes(__pyx_v_cvoidStarHelper_ptr, __pyx_v_cdataSizes.data(), __pyx_v_cattributes.data(), __pyx_v_numAttributes, __pyx_v_cdevPtr, __pyx_v_count); if (unlikely(__pyx_t_15 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 20624, __pyx_L1_error)
  __pyx_v_err = __pyx_t_15;

  /* "cuda/cuda.pyx":20625
 *     if numAttributes > <size_t>len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes))
 *     err = ccuda.cuMemRangeGetAttributes(cvoidStarHelper_ptr, cdataSizes.data(), cattributes.data(), numAttributes, cdevPtr, count)
 *     return (CUresult(err), [obj.pyObj() for obj in pylist])             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  { /* enter inner scope */
    __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20625, __pyx_L24_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = __pyx_v_pylist; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
    for (;;) {
      if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 20625, __pyx_L24_error)
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20625, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr82__pyx_v_obj, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr82__pyx_v_obj, __pyx_n_s_pyObj); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 20625, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20625, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 20625, __pyx_L24_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_9genexpr82__pyx_v_obj); __pyx_9genexpr82__pyx_v_obj = 0;
    goto __pyx_L27_exit_scope;
    __pyx_L24_error:;
    __Pyx_XDECREF(__pyx_9genexpr82__pyx_v_obj); __pyx_9genexpr82__pyx_v_obj = 0;
    goto __pyx_L1_error;
    __pyx_L27_exit_scope:;
  } /* exit inner scope */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_10);
  __pyx_t_3 = 0;
  __pyx_t_10 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":20551
 * 
 * @cython.embedsignature(True)
 * def cuMemRangeGetAttributes(dataSizes : List[int], attributes : List[CUmem_range_attribute], size_t numAttributes, devPtr, size_t count):             # <<<<<<<<<<<<<<
 *     """ Query attributes of a given memory range.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cuda.cuda.cuMemRangeGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdevPtr);
  __Pyx_XDECREF(__pyx_v_pylist);
  __Pyx_XDECREF((PyObject *)__pyx_v_voidStarHelper);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_23cuMemRangeGetAttributes_2generator8);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_23cuMemRangeGetAttributes_5generator9);
  __Pyx_XDECREF(__pyx_9genexpr80__pyx_v_pyattributes);
  __Pyx_XDECREF(__pyx_9genexpr80__pyx_v_pydataSizes);
  __Pyx_XDECREF(__pyx_9genexpr81__pyx_v_pyattributes);
  __Pyx_XDECREF(__pyx_9genexpr82__pyx_v_obj);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20628
 * 
 * @cython.embedsignature(True)
 * def cuPointerSetAttribute(value, attribute not None : CUpointer_attribute, ptr):             # <<<<<<<<<<<<<<
 *     """ Set attributes on a previously allocated memory region.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_333cuPointerSetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_332cuPointerSetAttribute[] = "cuPointerSetAttribute(value, attribute: CUpointer_attribute, ptr)\n Set attributes on a previously allocated memory region.\n\n    The supported attributes are:\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS`:\n\n    - A boolean attribute that can either be set (1) or unset (0). When\n      set, the region of memory that `ptr` points to is guaranteed to\n      always synchronize memory operations that are synchronous. If there\n      are some previously initiated synchronous memory operations that are\n      pending when this attribute is set, the function does not return\n      until those memory operations are complete. See further documentation\n      in the section titled \"API synchronization behavior\" to learn more\n      about cases when synchronous memory operations can exhibit\n      asynchronous behavior. `value` will be considered as a pointer to an\n      unsigned integer to which this attribute is to be set.\n\n    Parameters\n    ----------\n    value : Any\n        Pointer to memory containing the value to be set\n    attribute : :py:obj:`~.CUpointer_attribute`\n        Pointer attribute to set\n    ptr : :py:obj:`~.CUdeviceptr`\n        Pointer to a memory region allocated using CUDA memory allocation\n        APIs\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n\n    See Also\n    --------\n    :py:obj:`~.cuPointerGetAttribute`, :py:obj:`~.cuPointerGetAttributes`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuMemHostUnregister`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_333cuPointerSetAttribute = {"cuPointerSetAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_333cuPointerSetAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_332cuPointerSetAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_333cuPointerSetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_attribute = 0;
  PyObject *__pyx_v_ptr = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuPointerSetAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_attribute,&__pyx_n_s_ptr_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attribute)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuPointerSetAttribute", 1, 3, 3, 1); __PYX_ERR(0, 20628, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuPointerSetAttribute", 1, 3, 3, 2); __PYX_ERR(0, 20628, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuPointerSetAttribute") < 0)) __PYX_ERR(0, 20628, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_value = values[0];
    __pyx_v_attribute = values[1];
    __pyx_v_ptr = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuPointerSetAttribute", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 20628, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuPointerSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attribute) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attribute"); __PYX_ERR(0, 20628, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_332cuPointerSetAttribute(__pyx_self, __pyx_v_value, __pyx_v_attribute, __pyx_v_ptr);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_332cuPointerSetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_attribute, PyObject *__pyx_v_ptr) {
  CUdeviceptr __pyx_v_cptr;
  PyObject *__pyx_v_pptr = NULL;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperCUpointer_attribute *__pyx_v_cvalue = 0;
  void *__pyx_v_cvalue_ptr;
  CUpointer_attribute __pyx_v_cattribute;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  CUpointer_attribute __pyx_t_7;
  CUresult __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__781)
  __Pyx_RefNannySetupContext("cuPointerSetAttribute", 0);
  __Pyx_TraceCall("cuPointerSetAttribute", __pyx_f[0], 20628, 0, __PYX_ERR(0, 20628, __pyx_L1_error));

  /* "cuda/cuda.pyx":20666
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_ptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20667
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 */
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":20666
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20668
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20669
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20670
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20670, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":20668
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20672
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 *         pptr = int(CUdeviceptr(ptr))             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20673
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 * 
 *     cdef utils.HelperCUpointer_attribute cvalue = utils.HelperCUpointer_attribute(attribute, value, is_getter=False)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20673, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":20675
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 *     cdef utils.HelperCUpointer_attribute cvalue = utils.HelperCUpointer_attribute(attribute, value, is_getter=False)             # <<<<<<<<<<<<<<
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     cdef ccuda.CUpointer_attribute cattribute = attribute.value
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_attribute);
  __Pyx_GIVEREF(__pyx_v_attribute);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_attribute);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_value);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_getter, Py_False) < 0) __PYX_ERR(0, 20675, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUpointer_attribute), __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cvalue = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperCUpointer_attribute *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "cuda/cuda.pyx":20676
 * 
 *     cdef utils.HelperCUpointer_attribute cvalue = utils.HelperCUpointer_attribute(attribute, value, is_getter=False)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUpointer_attribute cattribute = attribute.value
 *     err = ccuda.cuPointerSetAttribute(cvalue_ptr, cattribute, cptr)
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cvalue), __pyx_n_s_cptr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_6); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_cvalue_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":20677
 *     cdef utils.HelperCUpointer_attribute cvalue = utils.HelperCUpointer_attribute(attribute, value, is_getter=False)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     cdef ccuda.CUpointer_attribute cattribute = attribute.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuPointerSetAttribute(cvalue_ptr, cattribute, cptr)
 *     return (CUresult(err),)
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_attribute, __pyx_n_s_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = ((enum CUpointer_attribute_enum)__Pyx_PyInt_As_enum__CUpointer_attribute_enum(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 20677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_cattribute = __pyx_t_7;

  /* "cuda/cuda.pyx":20678
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     cdef ccuda.CUpointer_attribute cattribute = attribute.value
 *     err = ccuda.cuPointerSetAttribute(cvalue_ptr, cattribute, cptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuPointerSetAttribute(__pyx_v_cvalue_ptr, __pyx_v_cattribute, __pyx_v_cptr); if (unlikely(__pyx_t_8 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 20678, __pyx_L1_error)
  __pyx_v_err = __pyx_t_8;

  /* "cuda/cuda.pyx":20679
 *     cdef ccuda.CUpointer_attribute cattribute = attribute.value
 *     err = ccuda.cuPointerSetAttribute(cvalue_ptr, cattribute, cptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 20679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":20628
 * 
 * @cython.embedsignature(True)
 * def cuPointerSetAttribute(value, attribute not None : CUpointer_attribute, ptr):             # <<<<<<<<<<<<<<
 *     """ Set attributes on a previously allocated memory region.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuPointerSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pptr);
  __Pyx_XDECREF((PyObject *)__pyx_v_cvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20682
 * 
 * @cython.embedsignature(True)
 * def cuPointerGetAttributes(unsigned int numAttributes, attributes : List[CUpointer_attribute], ptr):             # <<<<<<<<<<<<<<
 *     """ Returns information about a pointer.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_335cuPointerGetAttributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_334cuPointerGetAttributes[] = "cuPointerGetAttributes(unsigned int numAttributes, attributes: List[CUpointer_attribute], ptr)\n Returns information about a pointer.\n\n    The supported attributes are (refer to\n    :py:obj:`~.cuPointerGetAttribute` for attribute descriptions and\n    restrictions):\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_CONTEXT`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_MEMORY_TYPE`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_DEVICE_POINTER`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_HOST_POINTER`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_BUFFER_ID`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_MANAGED`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_RANGE_SIZE`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_MAPPED`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES`\n\n    - :py:obj:`~.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE`\n\n    Unlike :py:obj:`~.cuPointerGetAttribute`, this function will not return\n    an error when the `ptr` encountered is not a valid CUDA pointer.\n    Instead, the attributes are assigned default NULL values and\n    CUDA_SUCCESS is returned.\n\n    If `ptr` was not allocated by, mapped by, or registered with a\n    :py:obj:`~.CUcontext` which uses UVA (Unified Virtual Addressing),\n    :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` is returned.\n\n    Parameters\n    ----------\n    numAttributes : unsigned int\n        Number of attributes to query\n    attributes : List[:py:obj:`~.CUpointer_attribute`]\n        An array of attributes to query (numAttributes and the number of\n        attributes in this array should match)\n    ptr : :py:obj:`~.CUdeviceptr`\n        Pointer to query\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :p""y:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    data : List[Any]\n        A two-dimensional array containing pointers to memory locations\n        where the result of each attribute query will be written to.\n\n    See Also\n    --------\n    :py:obj:`~.cuPointerGetAttribute`, :py:obj:`~.cuPointerSetAttribute`, :py:obj:`~.cudaPointerGetAttributes`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_335cuPointerGetAttributes = {"cuPointerGetAttributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_335cuPointerGetAttributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_334cuPointerGetAttributes};
static PyObject *__pyx_pw_4cuda_4cuda_335cuPointerGetAttributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_numAttributes;
  PyObject *__pyx_v_attributes = 0;
  PyObject *__pyx_v_ptr = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuPointerGetAttributes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_numAttributes,&__pyx_n_s_attributes,&__pyx_n_s_ptr_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numAttributes)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attributes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuPointerGetAttributes", 1, 3, 3, 1); __PYX_ERR(0, 20682, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuPointerGetAttributes", 1, 3, 3, 2); __PYX_ERR(0, 20682, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuPointerGetAttributes") < 0)) __PYX_ERR(0, 20682, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_numAttributes = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_numAttributes == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 20682, __pyx_L3_error)
    __pyx_v_attributes = values[1];
    __pyx_v_ptr = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuPointerGetAttributes", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 20682, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuPointerGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_334cuPointerGetAttributes(__pyx_self, __pyx_v_numAttributes, __pyx_v_attributes, __pyx_v_ptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_22cuPointerGetAttributes_2generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":20759
 * 
 *     attributes = [] if attributes is None else attributes
 *     if not all(isinstance(_x, (CUpointer_attribute)) for _x in attributes):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUpointer_attribute]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_22cuPointerGetAttributes_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_20_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_20_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 20759, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_22cuPointerGetAttributes_2generator10, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuPointerGetAttributes_locals_ge, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 20759, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuPointerGetAttributes.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_22cuPointerGetAttributes_2generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 20759, 0, __PYX_ERR(0, 20759, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 20759, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_attributes)) { __Pyx_RaiseClosureNameError("attributes"); __PYX_ERR(0, 20759, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_attributes)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_attributes)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_attributes; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20759, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 20759, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20759, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 20759, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20759, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 20759, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUpointer_attribute); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v__x, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 20759, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20682
 * 
 * @cython.embedsignature(True)
 * def cuPointerGetAttributes(unsigned int numAttributes, attributes : List[CUpointer_attribute], ptr):             # <<<<<<<<<<<<<<
 *     """ Returns information about a pointer.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_334cuPointerGetAttributes(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_numAttributes, PyObject *__pyx_v_attributes, PyObject *__pyx_v_ptr) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *__pyx_cur_scope;
  CUdeviceptr __pyx_v_cptr;
  PyObject *__pyx_v_pptr = NULL;
  std::vector<CUpointer_attribute>  __pyx_v_cattributes;
  PyObject *__pyx_v_pylist = NULL;
  struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *__pyx_v_voidStarHelper = 0;
  void **__pyx_v_cvoidStarHelper_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_22cuPointerGetAttributes_2generator10 = 0;
  PyObject *__pyx_9genexpr84__pyx_v_pyattributes = NULL;
  PyObject *__pyx_9genexpr85__pyx_v_pyattributes = NULL;
  PyObject *__pyx_9genexpr86__pyx_v_obj = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  std::vector<CUpointer_attribute>  __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__782)
  __Pyx_RefNannySetupContext("cuPointerGetAttributes", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 20682, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuPointerGetAttributes", __pyx_f[0], 20682, 0, __PYX_ERR(0, 20682, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_attributes = __pyx_v_attributes;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_attributes);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_attributes);

  /* "cuda/cuda.pyx":20749
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_ptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20750
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 */
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":20749
 *     """
 *     cdef ccuda.CUdeviceptr cptr
 *     if ptr is None:             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20751
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20752
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20753
 *     elif isinstance(ptr, (CUdeviceptr)):
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20753, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":20751
 *     if ptr is None:
 *         cptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(ptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pptr = int(ptr)
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20755
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 *     else:
 *         pptr = int(CUdeviceptr(ptr))             # <<<<<<<<<<<<<<
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20756
 *     else:
 *         pptr = int(CUdeviceptr(ptr))
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr             # <<<<<<<<<<<<<<
 * 
 *     attributes = [] if attributes is None else attributes
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20756, __pyx_L1_error)
    __pyx_v_cptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":20758
 *         cptr = <ccuda.CUdeviceptr><void_ptr>pptr
 * 
 *     attributes = [] if attributes is None else attributes             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUpointer_attribute)) for _x in attributes):
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUpointer_attribute]")
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_attributes == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_attributes);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_attributes;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_attributes);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_attributes, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":20759
 * 
 *     attributes = [] if attributes is None else attributes
 *     if not all(isinstance(_x, (CUpointer_attribute)) for _x in attributes):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUpointer_attribute]")
 * 
 */
  __pyx_t_5 = __pyx_pf_4cuda_4cuda_22cuPointerGetAttributes_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 20759, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":20760
 *     attributes = [] if attributes is None else attributes
 *     if not all(isinstance(_x, (CUpointer_attribute)) for _x in attributes):
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUpointer_attribute]")             # <<<<<<<<<<<<<<
 * 
 *     if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes))
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__783, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 20760, __pyx_L1_error)

    /* "cuda/cuda.pyx":20759
 * 
 *     attributes = [] if attributes is None else attributes
 *     if not all(isinstance(_x, (CUpointer_attribute)) for _x in attributes):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUpointer_attribute]")
 * 
 */
  }

  /* "cuda/cuda.pyx":20762
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUpointer_attribute]")
 * 
 *     if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes))             # <<<<<<<<<<<<<<
 *     cdef vector[ccuda.CUpointer_attribute] cattributes = [pyattributes.value for pyattributes in (attributes)]
 *     pylist = [utils.HelperCUpointer_attribute(pyattributes, 0, is_getter=True) for pyattributes in attributes]
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_attributes;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 20762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((__pyx_v_numAttributes > __pyx_t_6) != 0);
  if (unlikely(__pyx_t_2)) {
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_attributes;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 20762, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_kp_u__660); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numAttributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 20762, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":20763
 * 
 *     if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes))
 *     cdef vector[ccuda.CUpointer_attribute] cattributes = [pyattributes.value for pyattributes in (attributes)]             # <<<<<<<<<<<<<<
 *     pylist = [utils.HelperCUpointer_attribute(pyattributes, 0, is_getter=True) for pyattributes in attributes]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 */
  { /* enter inner scope */
    __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20763, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_attributes)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_attributes)) {
      __pyx_t_3 = __pyx_cur_scope->__pyx_v_attributes; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20763, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 20763, __pyx_L8_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 20763, __pyx_L8_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20763, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 20763, __pyx_L8_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20763, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_8(__pyx_t_3);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 20763, __pyx_L8_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr84__pyx_v_pyattributes, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr84__pyx_v_pyattributes, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20763, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 20763, __pyx_L8_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr84__pyx_v_pyattributes); __pyx_9genexpr84__pyx_v_pyattributes = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_9genexpr84__pyx_v_pyattributes); __pyx_9genexpr84__pyx_v_pyattributes = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __pyx_t_9 = __pyx_convert_vector_from_py_CUpointer_attribute(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 20763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_cattributes = __pyx_t_9;

  /* "cuda/cuda.pyx":20764
 *     if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes))
 *     cdef vector[ccuda.CUpointer_attribute] cattributes = [pyattributes.value for pyattributes in (attributes)]
 *     pylist = [utils.HelperCUpointer_attribute(pyattributes, 0, is_getter=True) for pyattributes in attributes]             # <<<<<<<<<<<<<<
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     cdef void** cvoidStarHelper_ptr = <void**><void_ptr>voidStarHelper.cptr
 */
  { /* enter inner scope */
    __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20764, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_attributes)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_attributes)) {
      __pyx_t_3 = __pyx_cur_scope->__pyx_v_attributes; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20764, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 20764, __pyx_L14_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 20764, __pyx_L14_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20764, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 20764, __pyx_L14_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20764, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_8(__pyx_t_3);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 20764, __pyx_L14_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr85__pyx_v_pyattributes, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20764, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_9genexpr85__pyx_v_pyattributes);
      __Pyx_GIVEREF(__pyx_9genexpr85__pyx_v_pyattributes);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_9genexpr85__pyx_v_pyattributes);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_0);
      __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20764, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_is_getter, Py_True) < 0) __PYX_ERR(0, 20764, __pyx_L14_error)
      __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUpointer_attribute), __pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 20764, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 20764, __pyx_L14_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr85__pyx_v_pyattributes); __pyx_9genexpr85__pyx_v_pyattributes = 0;
    goto __pyx_L17_exit_scope;
    __pyx_L14_error:;
    __Pyx_XDECREF(__pyx_9genexpr85__pyx_v_pyattributes); __pyx_9genexpr85__pyx_v_pyattributes = 0;
    goto __pyx_L1_error;
    __pyx_L17_exit_scope:;
  } /* exit inner scope */
  __pyx_v_pylist = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cuda/cuda.pyx":20765
 *     cdef vector[ccuda.CUpointer_attribute] cattributes = [pyattributes.value for pyattributes in (attributes)]
 *     pylist = [utils.HelperCUpointer_attribute(pyattributes, 0, is_getter=True) for pyattributes in attributes]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)             # <<<<<<<<<<<<<<
 *     cdef void** cvoidStarHelper_ptr = <void**><void_ptr>voidStarHelper.cptr
 *     err = ccuda.cuPointerGetAttributes(numAttributes, cattributes.data(), cvoidStarHelper_ptr, cptr)
 */
  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_InputVoidPtrPtrHelper), __pyx_v_pylist); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_voidStarHelper = ((struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cuda/cuda.pyx":20766
 *     pylist = [utils.HelperCUpointer_attribute(pyattributes, 0, is_getter=True) for pyattributes in attributes]
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     cdef void** cvoidStarHelper_ptr = <void**><void_ptr>voidStarHelper.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuPointerGetAttributes(numAttributes, cattributes.data(), cvoidStarHelper_ptr, cptr)
 *     return (CUresult(err), [obj.pyObj() for obj in pylist])
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_voidStarHelper), __pyx_n_s_cptr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_7); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_cvoidStarHelper_ptr = ((void **)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":20767
 *     cdef utils.InputVoidPtrPtrHelper voidStarHelper = utils.InputVoidPtrPtrHelper(pylist)
 *     cdef void** cvoidStarHelper_ptr = <void**><void_ptr>voidStarHelper.cptr
 *     err = ccuda.cuPointerGetAttributes(numAttributes, cattributes.data(), cvoidStarHelper_ptr, cptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), [obj.pyObj() for obj in pylist])
 * 
 */
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuPointerGetAttributes(__pyx_v_numAttributes, __pyx_v_cattributes.data(), __pyx_v_cvoidStarHelper_ptr, __pyx_v_cptr); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 20767, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":20768
 *     cdef void** cvoidStarHelper_ptr = <void**><void_ptr>voidStarHelper.cptr
 *     err = ccuda.cuPointerGetAttributes(numAttributes, cattributes.data(), cvoidStarHelper_ptr, cptr)
 *     return (CUresult(err), [obj.pyObj() for obj in pylist])             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 20768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_11);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20768, __pyx_L20_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = __pyx_v_pylist; __Pyx_INCREF(__pyx_t_11); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_11)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_6); __Pyx_INCREF(__pyx_t_10); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 20768, __pyx_L20_error)
      #else
      __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20768, __pyx_L20_error)
      __Pyx_GOTREF(__pyx_t_10);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr86__pyx_v_obj, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr86__pyx_v_obj, __pyx_n_s_pyObj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20768, __pyx_L20_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_13 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_10 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 20768, __pyx_L20_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 20768, __pyx_L20_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_9genexpr86__pyx_v_obj); __pyx_9genexpr86__pyx_v_obj = 0;
    goto __pyx_L23_exit_scope;
    __pyx_L20_error:;
    __Pyx_XDECREF(__pyx_9genexpr86__pyx_v_obj); __pyx_9genexpr86__pyx_v_obj = 0;
    goto __pyx_L1_error;
    __pyx_L23_exit_scope:;
  } /* exit inner scope */
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 20768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3);
  __pyx_t_7 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":20682
 * 
 * @cython.embedsignature(True)
 * def cuPointerGetAttributes(unsigned int numAttributes, attributes : List[CUpointer_attribute], ptr):             # <<<<<<<<<<<<<<
 *     """ Returns information about a pointer.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuPointerGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pptr);
  __Pyx_XDECREF(__pyx_v_pylist);
  __Pyx_XDECREF((PyObject *)__pyx_v_voidStarHelper);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_22cuPointerGetAttributes_2generator10);
  __Pyx_XDECREF(__pyx_9genexpr84__pyx_v_pyattributes);
  __Pyx_XDECREF(__pyx_9genexpr85__pyx_v_pyattributes);
  __Pyx_XDECREF(__pyx_9genexpr86__pyx_v_obj);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20771
 * 
 * @cython.embedsignature(True)
 * def cuStreamCreate(unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Create a stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_337cuStreamCreate(PyObject *__pyx_self, PyObject *__pyx_arg_Flags); /*proto*/
static char __pyx_doc_4cuda_4cuda_336cuStreamCreate[] = "cuStreamCreate(unsigned int Flags)\n Create a stream.\n\n    Creates a stream and returns a handle in `phStream`. The `Flags`\n    argument determines behaviors of the stream.\n\n    Valid values for `Flags` are:\n\n    - :py:obj:`~.CU_STREAM_DEFAULT`: Default stream creation flag.\n\n    - :py:obj:`~.CU_STREAM_NON_BLOCKING`: Specifies that work running in\n      the created stream may run concurrently with work in stream 0 (the\n      NULL stream), and that the created stream should perform no implicit\n      synchronization with stream 0.\n\n    Parameters\n    ----------\n    Flags : unsigned int\n        Parameters for stream creation\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    phStream : :py:obj:`~.CUstream`\n        Returned newly created stream\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_337cuStreamCreate = {"cuStreamCreate", (PyCFunction)__pyx_pw_4cuda_4cuda_337cuStreamCreate, METH_O, __pyx_doc_4cuda_4cuda_336cuStreamCreate};
static PyObject *__pyx_pw_4cuda_4cuda_337cuStreamCreate(PyObject *__pyx_self, PyObject *__pyx_arg_Flags) {
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamCreate (wrapper)", 0);
  assert(__pyx_arg_Flags); {
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_Flags); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 20771, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_336cuStreamCreate(__pyx_self, ((unsigned int)__pyx_v_Flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_336cuStreamCreate(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_Flags) {
  struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_phStream = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__784)
  __Pyx_RefNannySetupContext("cuStreamCreate", 0);
  __Pyx_TraceCall("cuStreamCreate", __pyx_f[0], 20771, 0, __PYX_ERR(0, 20771, __pyx_L1_error));

  /* "cuda/cuda.pyx":20802
 *     :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`
 *     """
 *     cdef CUstream phStream = CUstream()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamCreate(phStream._ptr, Flags)
 *     return (CUresult(err), phStream)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_phStream = ((struct __pyx_obj_4cuda_4cuda_CUstream *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":20803
 *     """
 *     cdef CUstream phStream = CUstream()
 *     err = ccuda.cuStreamCreate(phStream._ptr, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phStream)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuStreamCreate(__pyx_v_phStream->_ptr, __pyx_v_Flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 20803, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":20804
 *     cdef CUstream phStream = CUstream()
 *     err = ccuda.cuStreamCreate(phStream._ptr, Flags)
 *     return (CUresult(err), phStream)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_phStream));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phStream));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phStream));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":20771
 * 
 * @cython.embedsignature(True)
 * def cuStreamCreate(unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Create a stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuStreamCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20807
 * 
 * @cython.embedsignature(True)
 * def cuStreamCreateWithPriority(unsigned int flags, int priority):             # <<<<<<<<<<<<<<
 *     """ Create a stream with the given priority.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_339cuStreamCreateWithPriority(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_338cuStreamCreateWithPriority[] = "cuStreamCreateWithPriority(unsigned int flags, int priority)\n Create a stream with the given priority.\n\n    Creates a stream with the specified priority and returns a handle in\n    `phStream`. This API alters the scheduler priority of work in the\n    stream. Work in a higher priority stream may preempt work already\n    executing in a low priority stream.\n\n    `priority` follows a convention where lower numbers represent higher\n    priorities. '0' represents default priority. The range of meaningful\n    numerical priorities can be queried using\n    :py:obj:`~.cuCtxGetStreamPriorityRange`. If the specified priority is\n    outside the numerical range returned by\n    :py:obj:`~.cuCtxGetStreamPriorityRange`, it will automatically be\n    clamped to the lowest or the highest number in the range.\n\n    Parameters\n    ----------\n    flags : unsigned int\n        Flags for stream creation. See :py:obj:`~.cuStreamCreate` for a\n        list of valid flags\n    priority : int\n        Stream priority. Lower numbers represent higher priorities. See\n        :py:obj:`~.cuCtxGetStreamPriorityRange` for more information about\n        meaningful stream priorities that can be passed.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    phStream : :py:obj:`~.CUstream`\n        Returned newly created stream\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreateWithPriority`\n\n    Notes\n    -----\n    Stream priorities are supported only on GPUs with compute cap""ability 3.5 or higher.\n\n    In the current implementation, only compute kernels launched in priority streams are affected by the stream's priority. Stream priorities have no effect on host-to-device and device-to-host memory operations.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_339cuStreamCreateWithPriority = {"cuStreamCreateWithPriority", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_339cuStreamCreateWithPriority, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_338cuStreamCreateWithPriority};
static PyObject *__pyx_pw_4cuda_4cuda_339cuStreamCreateWithPriority(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_flags;
  int __pyx_v_priority;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamCreateWithPriority (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flags_2,&__pyx_n_s_priority_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_priority_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamCreateWithPriority", 1, 2, 2, 1); __PYX_ERR(0, 20807, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamCreateWithPriority") < 0)) __PYX_ERR(0, 20807, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 20807, __pyx_L3_error)
    __pyx_v_priority = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 20807, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamCreateWithPriority", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 20807, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamCreateWithPriority", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_338cuStreamCreateWithPriority(__pyx_self, __pyx_v_flags, __pyx_v_priority);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_338cuStreamCreateWithPriority(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags, int __pyx_v_priority) {
  struct __pyx_obj_4cuda_4cuda_CUstream *__pyx_v_phStream = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__785)
  __Pyx_RefNannySetupContext("cuStreamCreateWithPriority", 0);
  __Pyx_TraceCall("cuStreamCreateWithPriority", __pyx_f[0], 20807, 0, __PYX_ERR(0, 20807, __pyx_L1_error));

  /* "cuda/cuda.pyx":20850
 *     In the current implementation, only compute kernels launched in priority streams are affected by the stream's priority. Stream priorities have no effect on host-to-device and device-to-host memory operations.
 *     """
 *     cdef CUstream phStream = CUstream()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamCreateWithPriority(phStream._ptr, flags, priority)
 *     return (CUresult(err), phStream)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_phStream = ((struct __pyx_obj_4cuda_4cuda_CUstream *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":20851
 *     """
 *     cdef CUstream phStream = CUstream()
 *     err = ccuda.cuStreamCreateWithPriority(phStream._ptr, flags, priority)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phStream)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuStreamCreateWithPriority(__pyx_v_phStream->_ptr, __pyx_v_flags, __pyx_v_priority); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 20851, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":20852
 *     cdef CUstream phStream = CUstream()
 *     err = ccuda.cuStreamCreateWithPriority(phStream._ptr, flags, priority)
 *     return (CUresult(err), phStream)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_phStream));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phStream));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phStream));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":20807
 * 
 * @cython.embedsignature(True)
 * def cuStreamCreateWithPriority(unsigned int flags, int priority):             # <<<<<<<<<<<<<<
 *     """ Create a stream with the given priority.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuStreamCreateWithPriority", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20855
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetPriority(hStream):             # <<<<<<<<<<<<<<
 *     """ Query the priority of a given stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_341cuStreamGetPriority(PyObject *__pyx_self, PyObject *__pyx_v_hStream); /*proto*/
static char __pyx_doc_4cuda_4cuda_340cuStreamGetPriority[] = "cuStreamGetPriority(hStream)\n Query the priority of a given stream.\n\n    Query the priority of a stream created using :py:obj:`~.cuStreamCreate`\n    or :py:obj:`~.cuStreamCreateWithPriority` and return the priority in\n    `priority`. Note that if the stream was created with a priority outside\n    the numerical range returned by\n    :py:obj:`~.cuCtxGetStreamPriorityRange`, this function returns the\n    clamped priority. See :py:obj:`~.cuStreamCreateWithPriority` for\n    details about priority clamping.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Handle to the stream to be queried\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    priority : int\n        Pointer to a signed integer in which the stream's priority is\n        returned\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cudaStreamGetPriority`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_341cuStreamGetPriority = {"cuStreamGetPriority", (PyCFunction)__pyx_pw_4cuda_4cuda_341cuStreamGetPriority, METH_O, __pyx_doc_4cuda_4cuda_340cuStreamGetPriority};
static PyObject *__pyx_pw_4cuda_4cuda_341cuStreamGetPriority(PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamGetPriority (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_340cuStreamGetPriority(__pyx_self, ((PyObject *)__pyx_v_hStream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_340cuStreamGetPriority(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  int __pyx_v_priority;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__786)
  __Pyx_RefNannySetupContext("cuStreamGetPriority", 0);
  __Pyx_TraceCall("cuStreamGetPriority", __pyx_f[0], 20855, 0, __PYX_ERR(0, 20855, __pyx_L1_error));

  /* "cuda/cuda.pyx":20884
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20885
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":20884
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20886
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20887
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20888
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20888, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":20886
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20890
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20891
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef int priority = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20891, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":20893
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cdef int priority = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamGetPriority(chStream, &priority)
 *     return (CUresult(err), priority)
 */
  __pyx_v_priority = 0;

  /* "cuda/cuda.pyx":20894
 * 
 *     cdef int priority = 0
 *     err = ccuda.cuStreamGetPriority(chStream, &priority)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), priority)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamGetPriority(__pyx_v_chStream, (&__pyx_v_priority)); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 20894, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":20895
 *     cdef int priority = 0
 *     err = ccuda.cuStreamGetPriority(chStream, &priority)
 *     return (CUresult(err), priority)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_priority); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":20855
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetPriority(hStream):             # <<<<<<<<<<<<<<
 *     """ Query the priority of a given stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamGetPriority", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20898
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetFlags(hStream):             # <<<<<<<<<<<<<<
 *     """ Query the flags of a given stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_343cuStreamGetFlags(PyObject *__pyx_self, PyObject *__pyx_v_hStream); /*proto*/
static char __pyx_doc_4cuda_4cuda_342cuStreamGetFlags[] = "cuStreamGetFlags(hStream)\n Query the flags of a given stream.\n\n    Query the flags of a stream created using :py:obj:`~.cuStreamCreate` or\n    :py:obj:`~.cuStreamCreateWithPriority` and return the flags in `flags`.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Handle to the stream to be queried\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    flags : unsigned int\n        Pointer to an unsigned integer in which the stream's flags are\n        returned The value returned in `flags` is a logical 'OR' of all\n        flags that were used while creating this stream. See\n        :py:obj:`~.cuStreamCreate` for the list of valid flags\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cudaStreamGetFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_343cuStreamGetFlags = {"cuStreamGetFlags", (PyCFunction)__pyx_pw_4cuda_4cuda_343cuStreamGetFlags, METH_O, __pyx_doc_4cuda_4cuda_342cuStreamGetFlags};
static PyObject *__pyx_pw_4cuda_4cuda_343cuStreamGetFlags(PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamGetFlags (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_342cuStreamGetFlags(__pyx_self, ((PyObject *)__pyx_v_hStream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_342cuStreamGetFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  unsigned int __pyx_v_flags;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__787)
  __Pyx_RefNannySetupContext("cuStreamGetFlags", 0);
  __Pyx_TraceCall("cuStreamGetFlags", __pyx_f[0], 20898, 0, __PYX_ERR(0, 20898, __pyx_L1_error));

  /* "cuda/cuda.pyx":20924
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20925
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":20924
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20926
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20927
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20928
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20928, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":20926
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20930
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20931
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef unsigned int flags = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20931, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":20933
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cdef unsigned int flags = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamGetFlags(chStream, &flags)
 *     return (CUresult(err), flags)
 */
  __pyx_v_flags = 0;

  /* "cuda/cuda.pyx":20934
 * 
 *     cdef unsigned int flags = 0
 *     err = ccuda.cuStreamGetFlags(chStream, &flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), flags)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamGetFlags(__pyx_v_chStream, (&__pyx_v_flags)); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 20934, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":20935
 *     cdef unsigned int flags = 0
 *     err = ccuda.cuStreamGetFlags(chStream, &flags)
 *     return (CUresult(err), flags)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":20898
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetFlags(hStream):             # <<<<<<<<<<<<<<
 *     """ Query the flags of a given stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20938
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetCtx(hStream):             # <<<<<<<<<<<<<<
 *     """ Query the context associated with a stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_345cuStreamGetCtx(PyObject *__pyx_self, PyObject *__pyx_v_hStream); /*proto*/
static char __pyx_doc_4cuda_4cuda_344cuStreamGetCtx[] = "cuStreamGetCtx(hStream)\n Query the context associated with a stream.\n\n    Returns the CUDA context that the stream is associated with.\n\n    The stream handle `hStream` can refer to any of the following:\n\n    - a stream created via any of the CUDA driver APIs such as\n      :py:obj:`~.cuStreamCreate` and\n      :py:obj:`~.cuStreamCreateWithPriority`, or their runtime API\n      equivalents such as :py:obj:`~.cudaStreamCreate`,\n      :py:obj:`~.cudaStreamCreateWithFlags` and\n      :py:obj:`~.cudaStreamCreateWithPriority`. The returned context is the\n      context that was active in the calling thread when the stream was\n      created. Passing an invalid handle will result in undefined behavior.\n\n    - any of the special streams such as the NULL stream,\n      :py:obj:`~.CU_STREAM_LEGACY` and :py:obj:`~.CU_STREAM_PER_THREAD`.\n      The runtime API equivalents of these are also accepted, which are\n      NULL, :py:obj:`~.cudaStreamLegacy` and\n      :py:obj:`~.cudaStreamPerThread` respectively. Specifying any of the\n      special handles will return the context current to the calling\n      thread. If no context is current to the calling thread,\n      :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` is returned.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Handle to the stream to be queried\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`,\n    pctx : :py:obj:`~.CUcontext`\n        Returned context associated with the stream\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.c""udaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_345cuStreamGetCtx = {"cuStreamGetCtx", (PyCFunction)__pyx_pw_4cuda_4cuda_345cuStreamGetCtx, METH_O, __pyx_doc_4cuda_4cuda_344cuStreamGetCtx};
static PyObject *__pyx_pw_4cuda_4cuda_345cuStreamGetCtx(PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamGetCtx (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_344cuStreamGetCtx(__pyx_self, ((PyObject *)__pyx_v_hStream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_344cuStreamGetCtx(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_pctx = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__788)
  __Pyx_RefNannySetupContext("cuStreamGetCtx", 0);
  __Pyx_TraceCall("cuStreamGetCtx", __pyx_f[0], 20938, 0, __PYX_ERR(0, 20938, __pyx_L1_error));

  /* "cuda/cuda.pyx":20980
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":20981
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":20980
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20982
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":20983
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":20984
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20984, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":20982
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":20986
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":20987
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef CUcontext pctx = CUcontext()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 20987, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":20989
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cdef CUcontext pctx = CUcontext()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamGetCtx(chStream, pctx._ptr)
 *     return (CUresult(err), pctx)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pctx = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":20990
 * 
 *     cdef CUcontext pctx = CUcontext()
 *     err = ccuda.cuStreamGetCtx(chStream, pctx._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pctx)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamGetCtx(__pyx_v_chStream, __pyx_v_pctx->_ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 20990, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":20991
 *     cdef CUcontext pctx = CUcontext()
 *     err = ccuda.cuStreamGetCtx(chStream, pctx._ptr)
 *     return (CUresult(err), pctx)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 20991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pctx));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pctx));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pctx));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":20938
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetCtx(hStream):             # <<<<<<<<<<<<<<
 *     """ Query the context associated with a stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamGetCtx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF((PyObject *)__pyx_v_pctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":20994
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitEvent(hStream, hEvent, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Make a compute stream wait on an event.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_347cuStreamWaitEvent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_346cuStreamWaitEvent[] = "cuStreamWaitEvent(hStream, hEvent, unsigned int Flags)\n Make a compute stream wait on an event.\n\n    Makes all future work submitted to `hStream` wait for all work captured\n    in `hEvent`. See :py:obj:`~.cuEventRecord()` for details on what is\n    captured by an event. The synchronization will be performed efficiently\n    on the device when applicable. `hEvent` may be from a different context\n    or device than `hStream`.\n\n    flags include:\n\n    - :py:obj:`~.CU_EVENT_WAIT_DEFAULT`: Default event creation flag.\n\n    - :py:obj:`~.CU_EVENT_WAIT_EXTERNAL`: Event is captured in the graph as\n      an external event node when performing stream capture. This flag is\n      invalid outside of stream capture.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to wait\n    hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Event to wait on (may not be NULL)\n    Flags : unsigned int\n        See :py:obj:`~.CUevent_capture_flags`\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cudaStreamWaitEvent`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_347cuStreamWaitEvent = {"cuStreamWaitEvent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_347cuStreamWaitEvent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_346cuStreamWaitEvent};
static PyObject *__pyx_pw_4cuda_4cuda_347cuStreamWaitEvent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hStream = 0;
  PyObject *__pyx_v_hEvent = 0;
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamWaitEvent (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hStream_2,&__pyx_n_s_hEvent,&__pyx_n_s_Flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hEvent)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitEvent", 1, 3, 3, 1); __PYX_ERR(0, 20994, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitEvent", 1, 3, 3, 2); __PYX_ERR(0, 20994, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamWaitEvent") < 0)) __PYX_ERR(0, 20994, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hStream = values[0];
    __pyx_v_hEvent = values[1];
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 20994, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamWaitEvent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 20994, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_346cuStreamWaitEvent(__pyx_self, __pyx_v_hStream, __pyx_v_hEvent, __pyx_v_Flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_346cuStreamWaitEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_hEvent, unsigned int __pyx_v_Flags) {
  CUevent __pyx_v_chEvent;
  PyObject *__pyx_v_phEvent = NULL;
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__789)
  __Pyx_RefNannySetupContext("cuStreamWaitEvent", 0);
  __Pyx_TraceCall("cuStreamWaitEvent", __pyx_f[0], 20994, 0, __PYX_ERR(0, 20994, __pyx_L1_error));

  /* "cuda/cuda.pyx":21030
 *     """
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_hEvent == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21031
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)
 */
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21030
 *     """
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21032
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hEvent, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21033
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21033, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phEvent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21034
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent             # <<<<<<<<<<<<<<
 *     else:
 *         phEvent = int(CUevent(hEvent))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEvent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21034, __pyx_L1_error)
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21032
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21036
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 *     else:
 *         phEvent = int(CUevent(hEvent))             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_hEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phEvent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21037
 *     else:
 *         phEvent = int(CUevent(hEvent))
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream chStream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEvent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21037, __pyx_L1_error)
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21040
 * 
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21041
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21040
 * 
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":21042
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21043
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21044
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21044, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21042
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":21046
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21047
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamWaitEvent(chStream, chEvent, Flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21047, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":21049
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     err = ccuda.cuStreamWaitEvent(chStream, chEvent, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamWaitEvent(__pyx_v_chStream, __pyx_v_chEvent, __pyx_v_Flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21049, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":21050
 * 
 *     err = ccuda.cuStreamWaitEvent(chStream, chEvent, Flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":20994
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitEvent(hStream, hEvent, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Make a compute stream wait on an event.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phEvent);
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21053
 * 
 * @cython.embedsignature(True)
 * def cuStreamAddCallback(hStream, callback, userData, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Add a callback to a compute stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_349cuStreamAddCallback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_348cuStreamAddCallback[] = "cuStreamAddCallback(hStream, callback, userData, unsigned int flags)\n Add a callback to a compute stream.\n\n    Adds a callback to be called on the host after all currently enqueued\n    items in the stream have completed. For each cuStreamAddCallback call,\n    the callback will be executed exactly once. The callback will block\n    later work in the stream until it is finished.\n\n    The callback may be passed :py:obj:`~.CUDA_SUCCESS` or an error code.\n    In the event of a device error, all subsequently executed callbacks\n    will receive an appropriate :py:obj:`~.CUresult`.\n\n    Callbacks must not make any CUDA API calls. Attempting to use a CUDA\n    API will result in :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`. Callbacks must\n    not perform any synchronization that may depend on outstanding device\n    work or other callbacks that are not mandated to run earlier. Callbacks\n    without a mandated order (in independent streams) execute in undefined\n    order and may be serialized.\n\n    For the purposes of Unified Memory, callback execution makes a number\n    of guarantees:\n\n    - The callback stream is considered idle for the duration of the\n      callback. Thus, for example, a callback may always use memory\n      attached to the callback stream.\n\n    - The start of execution of a callback has the same effect as\n      synchronizing an event recorded in the same stream immediately prior\n      to the callback. It thus synchronizes streams which have been\n      \"joined\" prior to the callback.\n\n    - Adding device work to any stream does not have the effect of making\n      the stream active until all preceding host functions and stream\n      callbacks have executed. Thus, for example, a callback might use\n      global attached memory even if work has been added to another stream,\n      if the work has been ordered behind the callback with an event.\n\n    - Completion of a callback does not cause a stream to become active\n      except as de""scribed above. The callback stream will remain idle if no\n      device work follows the callback, and will remain idle across\n      consecutive callbacks without device work in between. Thus, for\n      example, stream synchronization can be done by signaling from a\n      callback at the end of the stream.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to add callback to\n    callback : :py:obj:`~.CUstreamCallback`\n        The function to call once preceding stream operations are complete\n    userData : Any\n        User specified data to be passed to the callback function\n    flags : unsigned int\n        Reserved for future use, must be 0\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuMemAllocManaged`, :py:obj:`~.cuStreamAttachMemAsync`, :py:obj:`~.cuStreamLaunchHostFunc`, :py:obj:`~.cudaStreamAddCallback`\n\n    Notes\n    -----\n    This function is slated for eventual deprecation and removal. If you do not require the callback to execute in case of a device error, consider using :py:obj:`~.cuLaunchHostFunc`. Additionally, this function is not supported with :py:obj:`~.cuStreamBeginCapture` and :py:obj:`~.cuStreamEndCapture`, unlike :py:obj:`~.cuLaunchHostFunc`.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_349cuStreamAddCallback = {"cuStreamAddCallback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_349cuStreamAddCallback, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_348cuStreamAddCallback};
static PyObject *__pyx_pw_4cuda_4cuda_349cuStreamAddCallback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hStream = 0;
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_v_userData = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamAddCallback (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hStream_2,&__pyx_n_s_callback,&__pyx_n_s_userData_2,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamAddCallback", 1, 4, 4, 1); __PYX_ERR(0, 21053, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_userData_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamAddCallback", 1, 4, 4, 2); __PYX_ERR(0, 21053, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamAddCallback", 1, 4, 4, 3); __PYX_ERR(0, 21053, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamAddCallback") < 0)) __PYX_ERR(0, 21053, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hStream = values[0];
    __pyx_v_callback = values[1];
    __pyx_v_userData = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 21053, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamAddCallback", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 21053, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamAddCallback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_348cuStreamAddCallback(__pyx_self, __pyx_v_hStream, __pyx_v_callback, __pyx_v_userData, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_348cuStreamAddCallback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_callback, PyObject *__pyx_v_userData, unsigned int __pyx_v_flags) {
  CUstreamCallback __pyx_v_ccallback;
  PyObject *__pyx_v_pcallback = NULL;
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  PyObject *__pyx_v_cuserData = NULL;
  void *__pyx_v_cuserData_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__790)
  __Pyx_RefNannySetupContext("cuStreamAddCallback", 0);
  __Pyx_TraceCall("cuStreamAddCallback", __pyx_f[0], 21053, 0, __PYX_ERR(0, 21053, __pyx_L1_error));

  /* "cuda/cuda.pyx":21122
 *     """
 *     cdef ccuda.CUstreamCallback ccallback
 *     if callback is None:             # <<<<<<<<<<<<<<
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>0
 *     elif isinstance(callback, (CUstreamCallback)):
 */
  __pyx_t_1 = (__pyx_v_callback == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21123
 *     cdef ccuda.CUstreamCallback ccallback
 *     if callback is None:
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(callback, (CUstreamCallback)):
 *         pcallback = int(callback)
 */
    __pyx_v_ccallback = ((CUstreamCallback)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21122
 *     """
 *     cdef ccuda.CUstreamCallback ccallback
 *     if callback is None:             # <<<<<<<<<<<<<<
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>0
 *     elif isinstance(callback, (CUstreamCallback)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21124
 *     if callback is None:
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>0
 *     elif isinstance(callback, (CUstreamCallback)):             # <<<<<<<<<<<<<<
 *         pcallback = int(callback)
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>pcallback
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_callback, __pyx_ptype_4cuda_4cuda_CUstreamCallback); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21125
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>0
 *     elif isinstance(callback, (CUstreamCallback)):
 *         pcallback = int(callback)             # <<<<<<<<<<<<<<
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>pcallback
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pcallback = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21126
 *     elif isinstance(callback, (CUstreamCallback)):
 *         pcallback = int(callback)
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>pcallback             # <<<<<<<<<<<<<<
 *     else:
 *         pcallback = int(CUstreamCallback(callback))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pcallback); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21126, __pyx_L1_error)
    __pyx_v_ccallback = ((CUstreamCallback)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21124
 *     if callback is None:
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>0
 *     elif isinstance(callback, (CUstreamCallback)):             # <<<<<<<<<<<<<<
 *         pcallback = int(callback)
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>pcallback
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21128
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>pcallback
 *     else:
 *         pcallback = int(CUstreamCallback(callback))             # <<<<<<<<<<<<<<
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>pcallback
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamCallback), __pyx_v_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pcallback = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21129
 *     else:
 *         pcallback = int(CUstreamCallback(callback))
 *         ccallback = <ccuda.CUstreamCallback><void_ptr>pcallback             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream chStream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pcallback); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21129, __pyx_L1_error)
    __pyx_v_ccallback = ((CUstreamCallback)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21132
 * 
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21133
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21132
 * 
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":21134
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21135
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21136
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21136, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21134
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":21138
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21139
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cuserData = utils.HelperInputVoidPtr(userData)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21139, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":21141
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cuserData = utils.HelperInputVoidPtr(userData)             # <<<<<<<<<<<<<<
 *     cdef void* cuserData_ptr = <void*><void_ptr>cuserData.cptr
 *     err = ccuda.cuStreamAddCallback(chStream, ccallback, cuserData_ptr, flags)
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_userData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_cuserData = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":21142
 * 
 *     cuserData = utils.HelperInputVoidPtr(userData)
 *     cdef void* cuserData_ptr = <void*><void_ptr>cuserData.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamAddCallback(chStream, ccallback, cuserData_ptr, flags)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cuserData, __pyx_n_s_cptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cuserData_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":21143
 *     cuserData = utils.HelperInputVoidPtr(userData)
 *     cdef void* cuserData_ptr = <void*><void_ptr>cuserData.cptr
 *     err = ccuda.cuStreamAddCallback(chStream, ccallback, cuserData_ptr, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamAddCallback(__pyx_v_chStream, __pyx_v_ccallback, __pyx_v_cuserData_ptr, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21143, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":21144
 *     cdef void* cuserData_ptr = <void*><void_ptr>cuserData.cptr
 *     err = ccuda.cuStreamAddCallback(chStream, ccallback, cuserData_ptr, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21053
 * 
 * @cython.embedsignature(True)
 * def cuStreamAddCallback(hStream, callback, userData, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Add a callback to a compute stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamAddCallback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pcallback);
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_cuserData);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21147
 * 
 * @cython.embedsignature(True)
 * def cuStreamBeginCapture(hStream, mode not None : CUstreamCaptureMode):             # <<<<<<<<<<<<<<
 *     """ Begins graph capture on a stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_351cuStreamBeginCapture(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_350cuStreamBeginCapture[] = "cuStreamBeginCapture(hStream, mode: CUstreamCaptureMode)\n Begins graph capture on a stream.\n\n    Begin graph capture on `hStream`. When a stream is in capture mode, all\n    operations pushed into the stream will not be executed, but will\n    instead be captured into a graph, which will be returned via\n    :py:obj:`~.cuStreamEndCapture`. Capture may not be initiated if\n    `stream` is CU_STREAM_LEGACY. Capture must be ended on the same stream\n    in which it was initiated, and it may only be initiated if the stream\n    is not already in capture mode. The capture mode may be queried via\n    :py:obj:`~.cuStreamIsCapturing`. A unique id representing the capture\n    sequence may be queried via :py:obj:`~.cuStreamGetCaptureInfo`.\n\n    If `mode` is not :py:obj:`~.CU_STREAM_CAPTURE_MODE_RELAXED`,\n    :py:obj:`~.cuStreamEndCapture` must be called on this stream from the\n    same thread.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream in which to initiate capture\n    mode : :py:obj:`~.CUstreamCaptureMode`\n        Controls the interaction of this capture sequence with other API\n        calls that are potentially unsafe. For more details see\n        :py:obj:`~.cuThreadExchangeStreamCaptureMode`.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamIsCapturing`, :py:obj:`~.cuStreamEndCapture`, :py:obj:`~.cuThreadExchangeStreamCaptureMode`\n\n    Notes\n    -----\n    Kernels captured using this API must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_351cuStreamBeginCapture = {"cuStreamBeginCapture", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_351cuStreamBeginCapture, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_350cuStreamBeginCapture};
static PyObject *__pyx_pw_4cuda_4cuda_351cuStreamBeginCapture(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hStream = 0;
  PyObject *__pyx_v_mode = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamBeginCapture (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hStream_2,&__pyx_n_s_mode,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamBeginCapture", 1, 2, 2, 1); __PYX_ERR(0, 21147, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamBeginCapture") < 0)) __PYX_ERR(0, 21147, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hStream = values[0];
    __pyx_v_mode = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamBeginCapture", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 21147, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamBeginCapture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_mode) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "mode"); __PYX_ERR(0, 21147, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_350cuStreamBeginCapture(__pyx_self, __pyx_v_hStream, __pyx_v_mode);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_350cuStreamBeginCapture(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_mode) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUstreamCaptureMode __pyx_v_cmode;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUstreamCaptureMode __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__791)
  __Pyx_RefNannySetupContext("cuStreamBeginCapture", 0);
  __Pyx_TraceCall("cuStreamBeginCapture", __pyx_f[0], 21147, 0, __PYX_ERR(0, 21147, __pyx_L1_error));

  /* "cuda/cuda.pyx":21187
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21188
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21187
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21189
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21190
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21191
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21191, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21189
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21193
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21194
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstreamCaptureMode cmode = mode.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21194, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21196
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cdef ccuda.CUstreamCaptureMode cmode = mode.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamBeginCapture(chStream, cmode)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_mode, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUstreamCaptureMode_enum)__Pyx_PyInt_As_enum__CUstreamCaptureMode_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 21196, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cmode = __pyx_t_6;

  /* "cuda/cuda.pyx":21197
 * 
 *     cdef ccuda.CUstreamCaptureMode cmode = mode.value
 *     err = ccuda.cuStreamBeginCapture(chStream, cmode)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuStreamBeginCapture(__pyx_v_chStream, __pyx_v_cmode); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21197, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":21198
 *     cdef ccuda.CUstreamCaptureMode cmode = mode.value
 *     err = ccuda.cuStreamBeginCapture(chStream, cmode)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 21198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21147
 * 
 * @cython.embedsignature(True)
 * def cuStreamBeginCapture(hStream, mode not None : CUstreamCaptureMode):             # <<<<<<<<<<<<<<
 *     """ Begins graph capture on a stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuStreamBeginCapture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21201
 * 
 * @cython.embedsignature(True)
 * def cuThreadExchangeStreamCaptureMode(mode not None : CUstreamCaptureMode):             # <<<<<<<<<<<<<<
 *     """ Swaps the stream capture interaction mode for a thread.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_353cuThreadExchangeStreamCaptureMode(PyObject *__pyx_self, PyObject *__pyx_v_mode); /*proto*/
static char __pyx_doc_4cuda_4cuda_352cuThreadExchangeStreamCaptureMode[] = "cuThreadExchangeStreamCaptureMode(mode: CUstreamCaptureMode)\n Swaps the stream capture interaction mode for a thread.\n\n    Sets the calling thread's stream capture interaction mode to the value\n    contained in `*mode`, and overwrites `*mode` with the previous mode for\n    the thread. To facilitate deterministic behavior across function or\n    module boundaries, callers are encouraged to use this API in a push-pop\n    fashion:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    During stream capture (see :py:obj:`~.cuStreamBeginCapture`), some\n    actions, such as a call to :py:obj:`~.cudaMalloc`, may be unsafe. In\n    the case of :py:obj:`~.cudaMalloc`, the operation is not enqueued\n    asynchronously to a stream, and is not observed by stream capture.\n    Therefore, if the sequence of operations captured via\n    :py:obj:`~.cuStreamBeginCapture` depended on the allocation being\n    replayed whenever the graph is launched, the captured graph would be\n    invalid.\n\n    Therefore, stream capture places restrictions on API calls that can be\n    made within or concurrently to a\n    :py:obj:`~.cuStreamBeginCapture`-:py:obj:`~.cuStreamEndCapture`\n    sequence. This behavior can be controlled via this API and flags to\n    :py:obj:`~.cuStreamBeginCapture`.\n\n    A thread's mode is one of the following:\n\n    - `CU_STREAM_CAPTURE_MODE_GLOBAL:` This is the default mode. If the\n      local thread has an ongoing capture sequence that was not initiated\n      with `CU_STREAM_CAPTURE_MODE_RELAXED` at `cuStreamBeginCapture`, or\n      if any other thread has a concurrent capture sequence initiated with\n      `CU_STREAM_CAPTURE_MODE_GLOBAL`, this thread is prohibited from\n      potentially unsafe API calls.\n\n    - `CU_STREAM_CAPTURE_MODE_THREAD_LOCAL:` If the local thread has an\n      ongoing capture sequence not initiated with\n      `CU_STREAM_CAPTURE_MODE_RELAXED`, it is prohibited from potentially\n      unsafe API calls. Concurr""ent capture sequences in other threads are\n      ignored.\n\n    - `CU_STREAM_CAPTURE_MODE_RELAXED:` The local thread is not prohibited\n      from potentially unsafe API calls. Note that the thread is still\n      prohibited from API calls which necessarily conflict with stream\n      capture, for example, attempting :py:obj:`~.cuEventQuery` on an event\n      that was last recorded inside a capture sequence.\n\n    Parameters\n    ----------\n    mode : :py:obj:`~.CUstreamCaptureMode`\n        Pointer to mode value to swap with the current mode\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    mode : :py:obj:`~.CUstreamCaptureMode`\n        Pointer to mode value to swap with the current mode\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamBeginCapture`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_353cuThreadExchangeStreamCaptureMode = {"cuThreadExchangeStreamCaptureMode", (PyCFunction)__pyx_pw_4cuda_4cuda_353cuThreadExchangeStreamCaptureMode, METH_O, __pyx_doc_4cuda_4cuda_352cuThreadExchangeStreamCaptureMode};
static PyObject *__pyx_pw_4cuda_4cuda_353cuThreadExchangeStreamCaptureMode(PyObject *__pyx_self, PyObject *__pyx_v_mode) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuThreadExchangeStreamCaptureMode (wrapper)", 0);
  if (unlikely(((PyObject *)__pyx_v_mode) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "mode"); __PYX_ERR(0, 21201, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_352cuThreadExchangeStreamCaptureMode(__pyx_self, ((PyObject *)__pyx_v_mode));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_352cuThreadExchangeStreamCaptureMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mode) {
  CUstreamCaptureMode __pyx_v_cmode;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUstreamCaptureMode __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__792)
  __Pyx_RefNannySetupContext("cuThreadExchangeStreamCaptureMode", 0);
  __Pyx_TraceCall("cuThreadExchangeStreamCaptureMode", __pyx_f[0], 21201, 0, __PYX_ERR(0, 21201, __pyx_L1_error));

  /* "cuda/cuda.pyx":21264
 *     :py:obj:`~.cuStreamBeginCapture`
 *     """
 *     cdef ccuda.CUstreamCaptureMode cmode = mode.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuThreadExchangeStreamCaptureMode(&cmode)
 *     return (CUresult(err), CUstreamCaptureMode(cmode))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mode, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUstreamCaptureMode_enum)__Pyx_PyInt_As_enum__CUstreamCaptureMode_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 21264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cmode = __pyx_t_2;

  /* "cuda/cuda.pyx":21265
 *     """
 *     cdef ccuda.CUstreamCaptureMode cmode = mode.value
 *     err = ccuda.cuThreadExchangeStreamCaptureMode(&cmode)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUstreamCaptureMode(cmode))
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuThreadExchangeStreamCaptureMode((&__pyx_v_cmode)); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21265, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":21266
 *     cdef ccuda.CUstreamCaptureMode cmode = mode.value
 *     err = ccuda.cuThreadExchangeStreamCaptureMode(&cmode)
 *     return (CUresult(err), CUstreamCaptureMode(cmode))             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUstreamCaptureMode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__CUstreamCaptureMode_enum(__pyx_v_cmode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 21266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21201
 * 
 * @cython.embedsignature(True)
 * def cuThreadExchangeStreamCaptureMode(mode not None : CUstreamCaptureMode):             # <<<<<<<<<<<<<<
 *     """ Swaps the stream capture interaction mode for a thread.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuThreadExchangeStreamCaptureMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21269
 * 
 * @cython.embedsignature(True)
 * def cuStreamEndCapture(hStream):             # <<<<<<<<<<<<<<
 *     """ Ends capture on a stream, returning the captured graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_355cuStreamEndCapture(PyObject *__pyx_self, PyObject *__pyx_v_hStream); /*proto*/
static char __pyx_doc_4cuda_4cuda_354cuStreamEndCapture[] = "cuStreamEndCapture(hStream)\n Ends capture on a stream, returning the captured graph.\n\n    End capture on `hStream`, returning the captured graph via `phGraph`.\n    Capture must have been initiated on `hStream` via a call to\n    :py:obj:`~.cuStreamBeginCapture`. If capture was invalidated, due to a\n    violation of the rules of stream capture, then a NULL graph will be\n    returned.\n\n    If the `mode` argument to :py:obj:`~.cuStreamBeginCapture` was not\n    :py:obj:`~.CU_STREAM_CAPTURE_MODE_RELAXED`, this call must be from the\n    same thread as :py:obj:`~.cuStreamBeginCapture`.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to query\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD`\n    phGraph : :py:obj:`~.CUgraph`\n        The captured graph\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamIsCapturing`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_355cuStreamEndCapture = {"cuStreamEndCapture", (PyCFunction)__pyx_pw_4cuda_4cuda_355cuStreamEndCapture, METH_O, __pyx_doc_4cuda_4cuda_354cuStreamEndCapture};
static PyObject *__pyx_pw_4cuda_4cuda_355cuStreamEndCapture(PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamEndCapture (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_354cuStreamEndCapture(__pyx_self, ((PyObject *)__pyx_v_hStream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_354cuStreamEndCapture(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_phGraph = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__793)
  __Pyx_RefNannySetupContext("cuStreamEndCapture", 0);
  __Pyx_TraceCall("cuStreamEndCapture", __pyx_f[0], 21269, 0, __PYX_ERR(0, 21269, __pyx_L1_error));

  /* "cuda/cuda.pyx":21299
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21300
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21299
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21301
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21302
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21303
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21303, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21301
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21305
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21306
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraph phGraph = CUgraph()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21306, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21308
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cdef CUgraph phGraph = CUgraph()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamEndCapture(chStream, phGraph._ptr)
 *     return (CUresult(err), phGraph)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phGraph = ((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":21309
 * 
 *     cdef CUgraph phGraph = CUgraph()
 *     err = ccuda.cuStreamEndCapture(chStream, phGraph._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraph)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamEndCapture(__pyx_v_chStream, __pyx_v_phGraph->_ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21309, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":21310
 *     cdef CUgraph phGraph = CUgraph()
 *     err = ccuda.cuStreamEndCapture(chStream, phGraph._ptr)
 *     return (CUresult(err), phGraph)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraph));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraph));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phGraph));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21269
 * 
 * @cython.embedsignature(True)
 * def cuStreamEndCapture(hStream):             # <<<<<<<<<<<<<<
 *     """ Ends capture on a stream, returning the captured graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamEndCapture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraph);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21313
 * 
 * @cython.embedsignature(True)
 * def cuStreamIsCapturing(hStream):             # <<<<<<<<<<<<<<
 *     """ Returns a stream's capture status.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_357cuStreamIsCapturing(PyObject *__pyx_self, PyObject *__pyx_v_hStream); /*proto*/
static char __pyx_doc_4cuda_4cuda_356cuStreamIsCapturing[] = "cuStreamIsCapturing(hStream)\n Returns a stream's capture status.\n\n    Return the capture status of `hStream` via `captureStatus`. After a\n    successful call, `*captureStatus` will contain one of the following:\n\n    - :py:obj:`~.CU_STREAM_CAPTURE_STATUS_NONE`: The stream is not\n      capturing.\n\n    - :py:obj:`~.CU_STREAM_CAPTURE_STATUS_ACTIVE`: The stream is capturing.\n\n    - :py:obj:`~.CU_STREAM_CAPTURE_STATUS_INVALIDATED`: The stream was\n      capturing but an error has invalidated the capture sequence. The\n      capture sequence must be terminated with\n      :py:obj:`~.cuStreamEndCapture` on the stream where it was initiated\n      in order to continue using `hStream`.\n\n    Note that, if this is called on :py:obj:`~.CU_STREAM_LEGACY` (the \"null\n    stream\") while a blocking stream in the same context is capturing, it\n    will return :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT` and\n    `*captureStatus` is unspecified after the call. The blocking stream\n    capture is not invalidated.\n\n    When a blocking stream is capturing, the legacy stream is in an\n    unusable state until the blocking stream capture is terminated. The\n    legacy stream is not supported for stream capture, but attempted use\n    would have an implicit dependency on the capturing stream(s).\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to query\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT`\n    captureStatus : :py:obj:`~.CUstreamCaptureStatus`\n        Returns the stream's capture status\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamEndCapture`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_357cuStreamIsCapturing = {"cuStreamIsCapturing", (PyCFunction)__pyx_pw_4cuda_4cuda_357cuStreamIsCapturing, METH_O, __pyx_doc_4cuda_4cuda_356cuStreamIsCapturing};
static PyObject *__pyx_pw_4cuda_4cuda_357cuStreamIsCapturing(PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamIsCapturing (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_356cuStreamIsCapturing(__pyx_self, ((PyObject *)__pyx_v_hStream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_356cuStreamIsCapturing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUstreamCaptureStatus __pyx_v_captureStatus;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__794)
  __Pyx_RefNannySetupContext("cuStreamIsCapturing", 0);
  __Pyx_TraceCall("cuStreamIsCapturing", __pyx_f[0], 21313, 0, __PYX_ERR(0, 21313, __pyx_L1_error));

  /* "cuda/cuda.pyx":21358
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21359
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21358
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21360
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21361
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21362
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21362, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21360
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21364
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21365
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstreamCaptureStatus captureStatus
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21365, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21368
 * 
 *     cdef ccuda.CUstreamCaptureStatus captureStatus
 *     err = ccuda.cuStreamIsCapturing(chStream, &captureStatus)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUstreamCaptureStatus(captureStatus))
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamIsCapturing(__pyx_v_chStream, (&__pyx_v_captureStatus)); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21368, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":21369
 *     cdef ccuda.CUstreamCaptureStatus captureStatus
 *     err = ccuda.cuStreamIsCapturing(chStream, &captureStatus)
 *     return (CUresult(err), CUstreamCaptureStatus(captureStatus))             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUstreamCaptureStatus); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_enum__CUstreamCaptureStatus_enum(__pyx_v_captureStatus); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 21369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21313
 * 
 * @cython.embedsignature(True)
 * def cuStreamIsCapturing(hStream):             # <<<<<<<<<<<<<<
 *     """ Returns a stream's capture status.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuStreamIsCapturing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21372
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetCaptureInfo(hStream):             # <<<<<<<<<<<<<<
 *     """ Query capture status of a stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_359cuStreamGetCaptureInfo(PyObject *__pyx_self, PyObject *__pyx_v_hStream); /*proto*/
static char __pyx_doc_4cuda_4cuda_358cuStreamGetCaptureInfo[] = "cuStreamGetCaptureInfo(hStream)\n Query capture status of a stream.\n\n    Note there is a later version of this API,\n    :py:obj:`~.cuStreamGetCaptureInfo_v2`. It will supplant this version in\n    12.0, which is retained for minor version compatibility.\n\n    Query the capture status of a stream and and get an id for the capture\n    sequence, which is unique over the lifetime of the process.\n\n    If called on :py:obj:`~.CU_STREAM_LEGACY` (the \"null stream\") while a\n    stream not created with :py:obj:`~.CU_STREAM_NON_BLOCKING` is\n    capturing, returns :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT`.\n\n    A valid id is returned only if both of the following are true:\n\n    - the call returns CUDA_SUCCESS\n\n    - captureStatus is set to :py:obj:`~.CU_STREAM_CAPTURE_STATUS_ACTIVE`\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        None\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT`\n    captureStatus_out : :py:obj:`~.CUstreamCaptureStatus`\n        None\n    id_out : :py:obj:`~.cuuint64_t`\n        None\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamGetCaptureInfo_v2`, :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamIsCapturing`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_359cuStreamGetCaptureInfo = {"cuStreamGetCaptureInfo", (PyCFunction)__pyx_pw_4cuda_4cuda_359cuStreamGetCaptureInfo, METH_O, __pyx_doc_4cuda_4cuda_358cuStreamGetCaptureInfo};
static PyObject *__pyx_pw_4cuda_4cuda_359cuStreamGetCaptureInfo(PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamGetCaptureInfo (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_358cuStreamGetCaptureInfo(__pyx_self, ((PyObject *)__pyx_v_hStream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_358cuStreamGetCaptureInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUstreamCaptureStatus __pyx_v_captureStatus_out;
  struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_id_out = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__795)
  __Pyx_RefNannySetupContext("cuStreamGetCaptureInfo", 0);
  __Pyx_TraceCall("cuStreamGetCaptureInfo", __pyx_f[0], 21372, 0, __PYX_ERR(0, 21372, __pyx_L1_error));

  /* "cuda/cuda.pyx":21411
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21412
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21411
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21413
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21414
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21415
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21415, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21413
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21417
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21418
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstreamCaptureStatus captureStatus_out
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21418, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21421
 * 
 *     cdef ccuda.CUstreamCaptureStatus captureStatus_out
 *     cdef cuuint64_t id_out = cuuint64_t()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamGetCaptureInfo(chStream, &captureStatus_out, id_out._ptr)
 *     return (CUresult(err), CUstreamCaptureStatus(captureStatus_out), id_out)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_id_out = ((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":21422
 *     cdef ccuda.CUstreamCaptureStatus captureStatus_out
 *     cdef cuuint64_t id_out = cuuint64_t()
 *     err = ccuda.cuStreamGetCaptureInfo(chStream, &captureStatus_out, id_out._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUstreamCaptureStatus(captureStatus_out), id_out)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamGetCaptureInfo(__pyx_v_chStream, (&__pyx_v_captureStatus_out), __pyx_v_id_out->_ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21422, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":21423
 *     cdef cuuint64_t id_out = cuuint64_t()
 *     err = ccuda.cuStreamGetCaptureInfo(chStream, &captureStatus_out, id_out._ptr)
 *     return (CUresult(err), CUstreamCaptureStatus(captureStatus_out), id_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUstreamCaptureStatus); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_enum__CUstreamCaptureStatus_enum(__pyx_v_captureStatus_out); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 21423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_id_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_id_out));
  PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_v_id_out));
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21372
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetCaptureInfo(hStream):             # <<<<<<<<<<<<<<
 *     """ Query capture status of a stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuStreamGetCaptureInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF((PyObject *)__pyx_v_id_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21426
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetCaptureInfo_v2(hStream):             # <<<<<<<<<<<<<<
 *     """ Query a stream's capture state (11.3+)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_361cuStreamGetCaptureInfo_v2(PyObject *__pyx_self, PyObject *__pyx_v_hStream); /*proto*/
static char __pyx_doc_4cuda_4cuda_360cuStreamGetCaptureInfo_v2[] = "cuStreamGetCaptureInfo_v2(hStream)\n Query a stream's capture state (11.3+)\n\n    Query stream state related to stream capture.\n\n    If called on :py:obj:`~.CU_STREAM_LEGACY` (the \"null stream\") while a\n    stream not created with :py:obj:`~.CU_STREAM_NON_BLOCKING` is\n    capturing, returns :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT`.\n\n    Valid data (other than capture status) is returned only if both of the\n    following are true:\n\n    - the call returns CUDA_SUCCESS\n\n    - the returned capture status is\n      :py:obj:`~.CU_STREAM_CAPTURE_STATUS_ACTIVE`\n\n    This version of cuStreamGetCaptureInfo is introduced in CUDA 11.3 and\n    will supplant the previous version in 12.0. Developers requiring\n    compatibility across minor versions to CUDA 11.0 (driver version 445)\n    should use :py:obj:`~.cuStreamGetCaptureInfo` or include a fallback\n    path.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream to query\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT`\n    captureStatus_out : :py:obj:`~.CUstreamCaptureStatus`\n        Location to return the capture status of the stream; required\n    id_out : :py:obj:`~.cuuint64_t`\n        Optional location to return an id for the capture sequence, which\n        is unique over the lifetime of the process\n    graph_out : :py:obj:`~.CUgraph`\n        Optional location to return the graph being captured into. All\n        operations other than destroy and node removal are permitted on the\n        graph while the capture sequence is in progress. This API does not\n        transfer ownership of the graph, which is transferred or destroyed\n        at :py:obj:`~.cuStreamEndCapture`. Note that the graph handle may\n        be invalidated before end of capture for certain errors. Nodes that\n        are or become unreachable from t""he original stream at\n        :py:obj:`~.cuStreamEndCapture` due to direct actions on the graph\n        do not trigger :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNJOINED`.\n    dependencies_out : List[:py:obj:`~.CUgraphNode`]\n        Optional location to store a pointer to an array of nodes. The next\n        node to be captured in the stream will depend on this set of nodes,\n        absent operations such as event wait which modify this set. The\n        array pointer is valid until the next API call which operates on\n        the stream or until end of capture. The node handles may be copied\n        out and are valid until they or the graph is destroyed. The driver-\n        owned array may also be passed directly to APIs that operate on the\n        graph (not the stream) without copying.\n    numDependencies_out : int\n        Optional location to store the size of the array returned in\n        dependencies_out.\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamGetCaptureInfo`, :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamIsCapturing`, :py:obj:`~.cuStreamUpdateCaptureDependencies`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_361cuStreamGetCaptureInfo_v2 = {"cuStreamGetCaptureInfo_v2", (PyCFunction)__pyx_pw_4cuda_4cuda_361cuStreamGetCaptureInfo_v2, METH_O, __pyx_doc_4cuda_4cuda_360cuStreamGetCaptureInfo_v2};
static PyObject *__pyx_pw_4cuda_4cuda_361cuStreamGetCaptureInfo_v2(PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamGetCaptureInfo_v2 (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_360cuStreamGetCaptureInfo_v2(__pyx_self, ((PyObject *)__pyx_v_hStream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_360cuStreamGetCaptureInfo_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUstreamCaptureStatus __pyx_v_captureStatus_out;
  struct __pyx_obj_4cuda_4cuda_cuuint64_t *__pyx_v_id_out = 0;
  struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_graph_out = 0;
  CUgraphNode const *__pyx_v_cdependencies_out;
  PyObject *__pyx_v_pydependencies_out = NULL;
  size_t __pyx_v_numDependencies_out;
  CUresult __pyx_v_err;
  size_t __pyx_9genexpr87__pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  size_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__796)
  __Pyx_RefNannySetupContext("cuStreamGetCaptureInfo_v2", 0);
  __Pyx_TraceCall("cuStreamGetCaptureInfo_v2", __pyx_f[0], 21426, 0, __PYX_ERR(0, 21426, __pyx_L1_error));

  /* "cuda/cuda.pyx":21491
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21492
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21491
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21493
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21494
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21495
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21495, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21493
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21497
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21498
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstreamCaptureStatus captureStatus_out
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21498, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21501
 * 
 *     cdef ccuda.CUstreamCaptureStatus captureStatus_out
 *     cdef cuuint64_t id_out = cuuint64_t()             # <<<<<<<<<<<<<<
 *     cdef CUgraph graph_out = CUgraph()
 *     cdef const ccuda.CUgraphNode* cdependencies_out = NULL
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_id_out = ((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":21502
 *     cdef ccuda.CUstreamCaptureStatus captureStatus_out
 *     cdef cuuint64_t id_out = cuuint64_t()
 *     cdef CUgraph graph_out = CUgraph()             # <<<<<<<<<<<<<<
 *     cdef const ccuda.CUgraphNode* cdependencies_out = NULL
 *     pydependencies_out = []
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_graph_out = ((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":21503
 *     cdef cuuint64_t id_out = cuuint64_t()
 *     cdef CUgraph graph_out = CUgraph()
 *     cdef const ccuda.CUgraphNode* cdependencies_out = NULL             # <<<<<<<<<<<<<<
 *     pydependencies_out = []
 *     cdef size_t numDependencies_out = 0
 */
  __pyx_v_cdependencies_out = NULL;

  /* "cuda/cuda.pyx":21504
 *     cdef CUgraph graph_out = CUgraph()
 *     cdef const ccuda.CUgraphNode* cdependencies_out = NULL
 *     pydependencies_out = []             # <<<<<<<<<<<<<<
 *     cdef size_t numDependencies_out = 0
 *     err = ccuda.cuStreamGetCaptureInfo_v2(chStream, &captureStatus_out, id_out._ptr, graph_out._ptr, &cdependencies_out, &numDependencies_out)
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pydependencies_out = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":21505
 *     cdef const ccuda.CUgraphNode* cdependencies_out = NULL
 *     pydependencies_out = []
 *     cdef size_t numDependencies_out = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamGetCaptureInfo_v2(chStream, &captureStatus_out, id_out._ptr, graph_out._ptr, &cdependencies_out, &numDependencies_out)
 *     if CUresult(err) == CUresult(0):
 */
  __pyx_v_numDependencies_out = 0;

  /* "cuda/cuda.pyx":21506
 *     pydependencies_out = []
 *     cdef size_t numDependencies_out = 0
 *     err = ccuda.cuStreamGetCaptureInfo_v2(chStream, &captureStatus_out, id_out._ptr, graph_out._ptr, &cdependencies_out, &numDependencies_out)             # <<<<<<<<<<<<<<
 *     if CUresult(err) == CUresult(0):
 *         pydependencies_out = [CUgraphNode(init_value=<void_ptr>cdependencies_out[idx]) for idx in range(numDependencies_out)]
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamGetCaptureInfo_v2(__pyx_v_chStream, (&__pyx_v_captureStatus_out), __pyx_v_id_out->_ptr, __pyx_v_graph_out->_ptr, (&__pyx_v_cdependencies_out), (&__pyx_v_numDependencies_out)); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21506, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":21507
 *     cdef size_t numDependencies_out = 0
 *     err = ccuda.cuStreamGetCaptureInfo_v2(chStream, &captureStatus_out, id_out._ptr, graph_out._ptr, &cdependencies_out, &numDependencies_out)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pydependencies_out = [CUgraphNode(init_value=<void_ptr>cdependencies_out[idx]) for idx in range(numDependencies_out)]
 *     return (CUresult(err), CUstreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, numDependencies_out)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 21507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21508
 *     err = ccuda.cuStreamGetCaptureInfo_v2(chStream, &captureStatus_out, id_out._ptr, graph_out._ptr, &cdependencies_out, &numDependencies_out)
 *     if CUresult(err) == CUresult(0):
 *         pydependencies_out = [CUgraphNode(init_value=<void_ptr>cdependencies_out[idx]) for idx in range(numDependencies_out)]             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUstreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, numDependencies_out)
 * 
 */
    { /* enter inner scope */
      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21508, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __pyx_v_numDependencies_out;
      __pyx_t_10 = __pyx_t_9;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
        __pyx_9genexpr87__pyx_v_idx = __pyx_t_11;
        __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21508, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_cdependencies_out[__pyx_9genexpr87__pyx_v_idx]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21508, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_init_value, __pyx_t_5) < 0) __PYX_ERR(0, 21508, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21508, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 21508, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_pydependencies_out, ((PyObject*)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "cuda/cuda.pyx":21507
 *     cdef size_t numDependencies_out = 0
 *     err = ccuda.cuStreamGetCaptureInfo_v2(chStream, &captureStatus_out, id_out._ptr, graph_out._ptr, &cdependencies_out, &numDependencies_out)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pydependencies_out = [CUgraphNode(init_value=<void_ptr>cdependencies_out[idx]) for idx in range(numDependencies_out)]
 *     return (CUresult(err), CUstreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, numDependencies_out)
 */
  }

  /* "cuda/cuda.pyx":21509
 *     if CUresult(err) == CUresult(0):
 *         pydependencies_out = [CUgraphNode(init_value=<void_ptr>cdependencies_out[idx]) for idx in range(numDependencies_out)]
 *     return (CUresult(err), CUstreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, numDependencies_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUstreamCaptureStatus); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__CUstreamCaptureStatus_enum(__pyx_v_captureStatus_out); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 21509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies_out); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 21509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_id_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_id_out));
  PyTuple_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_v_id_out));
  __Pyx_INCREF(((PyObject *)__pyx_v_graph_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_graph_out));
  PyTuple_SET_ITEM(__pyx_t_8, 3, ((PyObject *)__pyx_v_graph_out));
  __Pyx_INCREF(__pyx_v_pydependencies_out);
  __Pyx_GIVEREF(__pyx_v_pydependencies_out);
  PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_v_pydependencies_out);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_3);
  __pyx_t_7 = 0;
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21426
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetCaptureInfo_v2(hStream):             # <<<<<<<<<<<<<<
 *     """ Query a stream's capture state (11.3+)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuStreamGetCaptureInfo_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF((PyObject *)__pyx_v_id_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_graph_out);
  __Pyx_XDECREF(__pyx_v_pydependencies_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21512
 * 
 * @cython.embedsignature(True)
 * def cuStreamUpdateCaptureDependencies(hStream, dependencies : List[CUgraphNode], size_t numDependencies, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Update the set of dependencies in a capturing stream (11.3+)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_363cuStreamUpdateCaptureDependencies(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_362cuStreamUpdateCaptureDependencies[] = "cuStreamUpdateCaptureDependencies(hStream, dependencies: List[CUgraphNode], size_t numDependencies, unsigned int flags)\n Update the set of dependencies in a capturing stream (11.3+)\n\n    Modifies the dependency set of a capturing stream. The dependency set\n    is the set of nodes that the next captured node in the stream will\n    depend on.\n\n    Valid flags are :py:obj:`~.CU_STREAM_ADD_CAPTURE_DEPENDENCIES` and\n    :py:obj:`~.CU_STREAM_SET_CAPTURE_DEPENDENCIES`. These control whether\n    the set passed to the API is added to the existing set or replaces it.\n    A flags value of 0 defaults to\n    :py:obj:`~.CU_STREAM_ADD_CAPTURE_DEPENDENCIES`.\n\n    Nodes that are removed from the dependency set via this API do not\n    result in :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNJOINED` if they are\n    unreachable from the stream at :py:obj:`~.cuStreamEndCapture`.\n\n    Returns :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` if the stream is not\n    capturing.\n\n    This API is new in CUDA 11.3. Developers requiring compatibility across\n    minor versions to CUDA 11.0 should not use this API or provide a\n    fallback.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        None\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        None\n    numDependencies : size_t\n        None\n    flags : unsigned int\n        None\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamGetCaptureInfo`, :py:obj:`~.cuStreamGetCaptureInfo_v2`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_363cuStreamUpdateCaptureDependencies = {"cuStreamUpdateCaptureDependencies", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_363cuStreamUpdateCaptureDependencies, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_362cuStreamUpdateCaptureDependencies};
static PyObject *__pyx_pw_4cuda_4cuda_363cuStreamUpdateCaptureDependencies(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hStream = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamUpdateCaptureDependencies (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hStream_2,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamUpdateCaptureDependencies", 1, 4, 4, 1); __PYX_ERR(0, 21512, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamUpdateCaptureDependencies", 1, 4, 4, 2); __PYX_ERR(0, 21512, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamUpdateCaptureDependencies", 1, 4, 4, 3); __PYX_ERR(0, 21512, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamUpdateCaptureDependencies") < 0)) __PYX_ERR(0, 21512, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hStream = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 21512, __pyx_L3_error)
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 21512, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamUpdateCaptureDependencies", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 21512, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamUpdateCaptureDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_362cuStreamUpdateCaptureDependencies(__pyx_self, __pyx_v_hStream, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_33cuStreamUpdateCaptureDependencies_2generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":21557
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_33cuStreamUpdateCaptureDependencies_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_22_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_22_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 21557, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_33cuStreamUpdateCaptureDependencies_2generator11, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuStreamUpdateCaptureDependencie, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 21557, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamUpdateCaptureDependencies.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_33cuStreamUpdateCaptureDependencies_2generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 21557, 0, __PYX_ERR(0, 21557, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 21557, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 21557, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21557, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 21557, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21557, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 21557, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21557, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 21557, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21512
 * 
 * @cython.embedsignature(True)
 * def cuStreamUpdateCaptureDependencies(hStream, dependencies : List[CUgraphNode], size_t numDependencies, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Update the set of dependencies in a capturing stream (11.3+)
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_362cuStreamUpdateCaptureDependencies(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *__pyx_cur_scope;
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_33cuStreamUpdateCaptureDependencies_2generator11 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  CUgraphNode *__pyx_t_10;
  CUresult __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__797)
  __Pyx_RefNannySetupContext("cuStreamUpdateCaptureDependencies", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 21512, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuStreamUpdateCaptureDependencies", __pyx_f[0], 21512, 0, __PYX_ERR(0, 21512, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":21556
 *     :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamGetCaptureInfo`, :py:obj:`~.cuStreamGetCaptureInfo_v2`
 *     """
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":21557
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_33cuStreamUpdateCaptureDependencies_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 21557, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":21558
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream chStream
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 21558, __pyx_L1_error)

    /* "cuda/cuda.pyx":21557
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":21561
 * 
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_4 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21562
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21561
 * 
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":21563
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":21564
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21565
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21565, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":21563
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":21567
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":21568
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21568, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":21570
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":21571
 * 
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 21571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":21572
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 21572, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":21573
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":21574
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 21574, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 21574, __pyx_L1_error)

      /* "cuda/cuda.pyx":21573
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":21576
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 21576, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":21577
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":21571
 * 
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":21579
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamUpdateCaptureDependencies(chStream, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, flags)
 *     if cdependencies is not NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 21579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 21579, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 21579, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":21580
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuStreamUpdateCaptureDependencies(chStream, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, flags)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 21580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cdependencies;
  }
  __pyx_t_11 = __pyx_f_4cuda_5ccuda_cuStreamUpdateCaptureDependencies(__pyx_v_chStream, __pyx_t_10, __pyx_v_numDependencies, __pyx_v_flags); if (unlikely(__pyx_t_11 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21580, __pyx_L1_error)
  __pyx_v_err = __pyx_t_11;

  /* "cuda/cuda.pyx":21581
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuStreamUpdateCaptureDependencies(chStream, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, flags)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err),)
 */
  __pyx_t_4 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":21582
 *     err = ccuda.cuStreamUpdateCaptureDependencies(chStream, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, flags)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":21581
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuStreamUpdateCaptureDependencies(chStream, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, flags)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err),)
 */
  }

  /* "cuda/cuda.pyx":21583
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21512
 * 
 * @cython.embedsignature(True)
 * def cuStreamUpdateCaptureDependencies(hStream, dependencies : List[CUgraphNode], size_t numDependencies, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Update the set of dependencies in a capturing stream (11.3+)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuStreamUpdateCaptureDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_33cuStreamUpdateCaptureDependencies_2generator11);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21586
 * 
 * @cython.embedsignature(True)
 * def cuStreamAttachMemAsync(hStream, dptr, size_t length, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Attach memory to a stream asynchronously.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_365cuStreamAttachMemAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_364cuStreamAttachMemAsync[] = "cuStreamAttachMemAsync(hStream, dptr, size_t length, unsigned int flags)\n Attach memory to a stream asynchronously.\n\n    Enqueues an operation in `hStream` to specify stream association of\n    `length` bytes of memory starting from `dptr`. This function is a\n    stream-ordered operation, meaning that it is dependent on, and will\n    only take effect when, previous work in stream has completed. Any\n    previous association is automatically replaced.\n\n    `dptr` must point to one of the following types of memories:\n\n    - managed memory declared using the managed keyword or allocated with\n      :py:obj:`~.cuMemAllocManaged`.\n\n    - a valid host-accessible region of system-allocated pageable memory.\n      This type of memory may only be specified if the device associated\n      with the stream reports a non-zero value for the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`.\n\n    For managed allocations, `length` must be either zero or the entire\n    allocation's size. Both indicate that the entire allocation's stream\n    association is being changed. Currently, it is not possible to change\n    stream association for a portion of a managed allocation.\n\n    For pageable host allocations, `length` must be non-zero.\n\n    The stream association is specified using `flags` which must be one of\n    :py:obj:`~.CUmemAttach_flags`. If the :py:obj:`~.CU_MEM_ATTACH_GLOBAL`\n    flag is specified, the memory can be accessed by any stream on any\n    device. If the :py:obj:`~.CU_MEM_ATTACH_HOST` flag is specified, the\n    program makes a guarantee that it won't access the memory on the device\n    from any stream on a device that has a zero value for the device\n    attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. If\n    the :py:obj:`~.CU_MEM_ATTACH_SINGLE` flag is specified and `hStream` is\n    associated with a device that has a zero value for the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONC""URRENT_MANAGED_ACCESS`, the program\n    makes a guarantee that it will only access the memory on the device\n    from `hStream`. It is illegal to attach singly to the NULL stream,\n    because the NULL stream is a virtual global stream and not a specific\n    stream. An error will be returned in this case.\n\n    When memory is associated with a single stream, the Unified Memory\n    system will allow CPU access to this memory region so long as all\n    operations in `hStream` have completed, regardless of whether other\n    streams are active. In effect, this constrains exclusive ownership of\n    the managed memory region by an active GPU to per-stream activity\n    instead of whole-GPU activity.\n\n    Accessing memory on the device from streams that are not associated\n    with it will produce undefined results. No error checking is performed\n    by the Unified Memory system to ensure that kernels launched into other\n    streams do not access this region.\n\n    It is a program's responsibility to order calls to\n    :py:obj:`~.cuStreamAttachMemAsync` via events, synchronization or other\n    means to ensure legal access to memory at all times. Data visibility\n    and coherency will be changed appropriately for all kernels which\n    follow a stream-association change.\n\n    If `hStream` is destroyed while data is associated with it, the\n    association is removed and the association reverts to the default\n    visibility of the allocation as specified at\n    :py:obj:`~.cuMemAllocManaged`. For managed variables, the default\n    association is always :py:obj:`~.CU_MEM_ATTACH_GLOBAL`. Note that\n    destroying a stream is an asynchronous operation, and as a result, the\n    change to default association won't happen until all work in the stream\n    has completed.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream in which to enqueue the attach operation\n    dptr : :py:obj:`~.CUdeviceptr`\n   ""     Pointer to memory (must be a pointer to managed memory or to a\n        valid host-accessible region of system-allocated pageable memory)\n    length : size_t\n        Length of memory\n    flags : unsigned int\n        Must be one of :py:obj:`~.CUmemAttach_flags`\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuMemAllocManaged`, :py:obj:`~.cudaStreamAttachMemAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_365cuStreamAttachMemAsync = {"cuStreamAttachMemAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_365cuStreamAttachMemAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_364cuStreamAttachMemAsync};
static PyObject *__pyx_pw_4cuda_4cuda_365cuStreamAttachMemAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hStream = 0;
  PyObject *__pyx_v_dptr = 0;
  size_t __pyx_v_length;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamAttachMemAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hStream_2,&__pyx_n_s_dptr_2,&__pyx_n_s_length,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dptr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamAttachMemAsync", 1, 4, 4, 1); __PYX_ERR(0, 21586, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamAttachMemAsync", 1, 4, 4, 2); __PYX_ERR(0, 21586, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamAttachMemAsync", 1, 4, 4, 3); __PYX_ERR(0, 21586, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamAttachMemAsync") < 0)) __PYX_ERR(0, 21586, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hStream = values[0];
    __pyx_v_dptr = values[1];
    __pyx_v_length = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_length == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 21586, __pyx_L3_error)
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 21586, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamAttachMemAsync", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 21586, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamAttachMemAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_364cuStreamAttachMemAsync(__pyx_self, __pyx_v_hStream, __pyx_v_dptr, __pyx_v_length, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_364cuStreamAttachMemAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_dptr, size_t __pyx_v_length, unsigned int __pyx_v_flags) {
  CUdeviceptr __pyx_v_cdptr;
  PyObject *__pyx_v_pdptr = NULL;
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__799)
  __Pyx_RefNannySetupContext("cuStreamAttachMemAsync", 0);
  __Pyx_TraceCall("cuStreamAttachMemAsync", __pyx_f[0], 21586, 0, __PYX_ERR(0, 21586, __pyx_L1_error));

  /* "cuda/cuda.pyx":21676
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21677
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 */
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21676
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21678
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21679
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21680
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21680, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21678
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21682
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21683
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream chStream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21683, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21686
 * 
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21687
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21686
 * 
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":21688
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21689
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21690
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21690, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21688
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":21692
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21693
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamAttachMemAsync(chStream, cdptr, length, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21693, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":21695
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     err = ccuda.cuStreamAttachMemAsync(chStream, cdptr, length, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamAttachMemAsync(__pyx_v_chStream, __pyx_v_cdptr, __pyx_v_length, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21695, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":21696
 * 
 *     err = ccuda.cuStreamAttachMemAsync(chStream, cdptr, length, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21586
 * 
 * @cython.embedsignature(True)
 * def cuStreamAttachMemAsync(hStream, dptr, size_t length, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Attach memory to a stream asynchronously.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamAttachMemAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdptr);
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21699
 * 
 * @cython.embedsignature(True)
 * def cuStreamQuery(hStream):             # <<<<<<<<<<<<<<
 *     """ Determine status of a compute stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_367cuStreamQuery(PyObject *__pyx_self, PyObject *__pyx_v_hStream); /*proto*/
static char __pyx_doc_4cuda_4cuda_366cuStreamQuery[] = "cuStreamQuery(hStream)\n Determine status of a compute stream.\n\n    Returns :py:obj:`~.CUDA_SUCCESS` if all operations in the stream\n    specified by `hStream` have completed, or\n    :py:obj:`~.CUDA_ERROR_NOT_READY` if not.\n\n    For the purposes of Unified Memory, a return value of\n    :py:obj:`~.CUDA_SUCCESS` is equivalent to having called\n    :py:obj:`~.cuStreamSynchronize()`.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to query status of\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_READY`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamQuery`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_367cuStreamQuery = {"cuStreamQuery", (PyCFunction)__pyx_pw_4cuda_4cuda_367cuStreamQuery, METH_O, __pyx_doc_4cuda_4cuda_366cuStreamQuery};
static PyObject *__pyx_pw_4cuda_4cuda_367cuStreamQuery(PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamQuery (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_366cuStreamQuery(__pyx_self, ((PyObject *)__pyx_v_hStream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_366cuStreamQuery(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__800)
  __Pyx_RefNannySetupContext("cuStreamQuery", 0);
  __Pyx_TraceCall("cuStreamQuery", __pyx_f[0], 21699, 0, __PYX_ERR(0, 21699, __pyx_L1_error));

  /* "cuda/cuda.pyx":21725
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21726
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21725
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21727
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21728
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21729
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21729, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21727
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21731
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21732
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamQuery(chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21732, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21734
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     err = ccuda.cuStreamQuery(chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamQuery(__pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21734, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":21735
 * 
 *     err = ccuda.cuStreamQuery(chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21699
 * 
 * @cython.embedsignature(True)
 * def cuStreamQuery(hStream):             # <<<<<<<<<<<<<<
 *     """ Determine status of a compute stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamQuery", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21738
 * 
 * @cython.embedsignature(True)
 * def cuStreamSynchronize(hStream):             # <<<<<<<<<<<<<<
 *     """ Wait until a stream's tasks are completed.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_369cuStreamSynchronize(PyObject *__pyx_self, PyObject *__pyx_v_hStream); /*proto*/
static char __pyx_doc_4cuda_4cuda_368cuStreamSynchronize[] = "cuStreamSynchronize(hStream)\n Wait until a stream's tasks are completed.\n\n    Waits until the device has completed all operations in the stream\n    specified by `hStream`. If the context was created with the\n    :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC` flag, the CPU thread will block\n    until the stream is finished with all of its tasks.\n\n    \note_null_stream\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to wait for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamSynchronize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_369cuStreamSynchronize = {"cuStreamSynchronize", (PyCFunction)__pyx_pw_4cuda_4cuda_369cuStreamSynchronize, METH_O, __pyx_doc_4cuda_4cuda_368cuStreamSynchronize};
static PyObject *__pyx_pw_4cuda_4cuda_369cuStreamSynchronize(PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamSynchronize (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_368cuStreamSynchronize(__pyx_self, ((PyObject *)__pyx_v_hStream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_368cuStreamSynchronize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__801)
  __Pyx_RefNannySetupContext("cuStreamSynchronize", 0);
  __Pyx_TraceCall("cuStreamSynchronize", __pyx_f[0], 21738, 0, __PYX_ERR(0, 21738, __pyx_L1_error));

  /* "cuda/cuda.pyx":21763
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21764
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21763
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21765
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21766
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21767
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21767, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21765
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21769
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21770
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamSynchronize(chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21770, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21772
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     err = ccuda.cuStreamSynchronize(chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamSynchronize(__pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21772, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":21773
 * 
 *     err = ccuda.cuStreamSynchronize(chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21738
 * 
 * @cython.embedsignature(True)
 * def cuStreamSynchronize(hStream):             # <<<<<<<<<<<<<<
 *     """ Wait until a stream's tasks are completed.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21776
 * 
 * @cython.embedsignature(True)
 * def cuStreamDestroy(hStream):             # <<<<<<<<<<<<<<
 *     """ Destroys a stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_371cuStreamDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hStream); /*proto*/
static char __pyx_doc_4cuda_4cuda_370cuStreamDestroy[] = "cuStreamDestroy(hStream)\n Destroys a stream.\n\n    Destroys the stream specified by `hStream`.\n\n    In case the device is still doing work in the stream `hStream` when\n    :py:obj:`~.cuStreamDestroy()` is called, the function will return\n    immediately and the resources associated with `hStream` will be\n    released automatically once the device has completed all work in\n    `hStream`.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to destroy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamDestroy`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_371cuStreamDestroy = {"cuStreamDestroy", (PyCFunction)__pyx_pw_4cuda_4cuda_371cuStreamDestroy, METH_O, __pyx_doc_4cuda_4cuda_370cuStreamDestroy};
static PyObject *__pyx_pw_4cuda_4cuda_371cuStreamDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_370cuStreamDestroy(__pyx_self, ((PyObject *)__pyx_v_hStream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_370cuStreamDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__802)
  __Pyx_RefNannySetupContext("cuStreamDestroy", 0);
  __Pyx_TraceCall("cuStreamDestroy", __pyx_f[0], 21776, 0, __PYX_ERR(0, 21776, __pyx_L1_error));

  /* "cuda/cuda.pyx":21802
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21803
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21802
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21804
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21805
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21806
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21806, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21804
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21808
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21809
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamDestroy(chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21809, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21811
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     err = ccuda.cuStreamDestroy(chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamDestroy(__pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21811, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":21812
 * 
 *     err = ccuda.cuStreamDestroy(chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21776
 * 
 * @cython.embedsignature(True)
 * def cuStreamDestroy(hStream):             # <<<<<<<<<<<<<<
 *     """ Destroys a stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21815
 * 
 * @cython.embedsignature(True)
 * def cuStreamCopyAttributes(dst, src):             # <<<<<<<<<<<<<<
 *     """ Copies attributes from source stream to destination stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_373cuStreamCopyAttributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_372cuStreamCopyAttributes[] = "cuStreamCopyAttributes(dst, src)\n Copies attributes from source stream to destination stream.\n\n    Copies attributes from source stream `src` to destination stream `dst`.\n    Both streams must have the same context.\n\n    Parameters\n    ----------\n    dst : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Destination stream\n    src : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Source stream For list of attributes see :py:obj:`~.CUstreamAttrID`\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.CUaccessPolicyWindow`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_373cuStreamCopyAttributes = {"cuStreamCopyAttributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_373cuStreamCopyAttributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_372cuStreamCopyAttributes};
static PyObject *__pyx_pw_4cuda_4cuda_373cuStreamCopyAttributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dst = 0;
  PyObject *__pyx_v_src = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamCopyAttributes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dst_2,&__pyx_n_s_src,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dst_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_src)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamCopyAttributes", 1, 2, 2, 1); __PYX_ERR(0, 21815, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamCopyAttributes") < 0)) __PYX_ERR(0, 21815, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_dst = values[0];
    __pyx_v_src = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamCopyAttributes", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 21815, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_372cuStreamCopyAttributes(__pyx_self, __pyx_v_dst, __pyx_v_src);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_372cuStreamCopyAttributes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
  CUstream __pyx_v_csrc;
  PyObject *__pyx_v_psrc = NULL;
  CUstream __pyx_v_cdst;
  PyObject *__pyx_v_pdst = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__803)
  __Pyx_RefNannySetupContext("cuStreamCopyAttributes", 0);
  __Pyx_TraceCall("cuStreamCopyAttributes", __pyx_f[0], 21815, 0, __PYX_ERR(0, 21815, __pyx_L1_error));

  /* "cuda/cuda.pyx":21838
 *     """
 *     cdef ccuda.CUstream csrc
 *     if src is None:             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(src, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_src == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21839
 *     cdef ccuda.CUstream csrc
 *     if src is None:
 *         csrc = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(src, (CUstream)):
 *         psrc = int(src)
 */
    __pyx_v_csrc = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21838
 *     """
 *     cdef ccuda.CUstream csrc
 *     if src is None:             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(src, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21840
 *     if src is None:
 *         csrc = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(src, (CUstream)):             # <<<<<<<<<<<<<<
 *         psrc = int(src)
 *         csrc = <ccuda.CUstream><void_ptr>psrc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_src, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21841
 *         csrc = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(src, (CUstream)):
 *         psrc = int(src)             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUstream><void_ptr>psrc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_src); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21842
 *     elif isinstance(src, (CUstream)):
 *         psrc = int(src)
 *         csrc = <ccuda.CUstream><void_ptr>psrc             # <<<<<<<<<<<<<<
 *     else:
 *         psrc = int(CUstream(src))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21842, __pyx_L1_error)
    __pyx_v_csrc = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21840
 *     if src is None:
 *         csrc = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(src, (CUstream)):             # <<<<<<<<<<<<<<
 *         psrc = int(src)
 *         csrc = <ccuda.CUstream><void_ptr>psrc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21844
 *         csrc = <ccuda.CUstream><void_ptr>psrc
 *     else:
 *         psrc = int(CUstream(src))             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUstream><void_ptr>psrc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_src); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21845
 *     else:
 *         psrc = int(CUstream(src))
 *         csrc = <ccuda.CUstream><void_ptr>psrc             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream cdst
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21845, __pyx_L1_error)
    __pyx_v_csrc = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21848
 * 
 *     cdef ccuda.CUstream cdst
 *     if dst is None:             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(dst, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_dst == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21849
 *     cdef ccuda.CUstream cdst
 *     if dst is None:
 *         cdst = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dst, (CUstream)):
 *         pdst = int(dst)
 */
    __pyx_v_cdst = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21848
 * 
 *     cdef ccuda.CUstream cdst
 *     if dst is None:             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(dst, (CUstream)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":21850
 *     if dst is None:
 *         cdst = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(dst, (CUstream)):             # <<<<<<<<<<<<<<
 *         pdst = int(dst)
 *         cdst = <ccuda.CUstream><void_ptr>pdst
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dst, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21851
 *         cdst = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(dst, (CUstream)):
 *         pdst = int(dst)             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUstream><void_ptr>pdst
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdst = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21852
 *     elif isinstance(dst, (CUstream)):
 *         pdst = int(dst)
 *         cdst = <ccuda.CUstream><void_ptr>pdst             # <<<<<<<<<<<<<<
 *     else:
 *         pdst = int(CUstream(dst))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdst); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21852, __pyx_L1_error)
    __pyx_v_cdst = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21850
 *     if dst is None:
 *         cdst = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(dst, (CUstream)):             # <<<<<<<<<<<<<<
 *         pdst = int(dst)
 *         cdst = <ccuda.CUstream><void_ptr>pdst
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":21854
 *         cdst = <ccuda.CUstream><void_ptr>pdst
 *     else:
 *         pdst = int(CUstream(dst))             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUstream><void_ptr>pdst
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_dst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdst = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21855
 *     else:
 *         pdst = int(CUstream(dst))
 *         cdst = <ccuda.CUstream><void_ptr>pdst             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamCopyAttributes(cdst, csrc)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdst); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21855, __pyx_L1_error)
    __pyx_v_cdst = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":21857
 *         cdst = <ccuda.CUstream><void_ptr>pdst
 * 
 *     err = ccuda.cuStreamCopyAttributes(cdst, csrc)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamCopyAttributes(__pyx_v_cdst, __pyx_v_csrc); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21857, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":21858
 * 
 *     err = ccuda.cuStreamCopyAttributes(cdst, csrc)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 21858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21815
 * 
 * @cython.embedsignature(True)
 * def cuStreamCopyAttributes(dst, src):             # <<<<<<<<<<<<<<
 *     """ Copies attributes from source stream to destination stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrc);
  __Pyx_XDECREF(__pyx_v_pdst);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21861
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetAttribute(hStream, attr not None : CUstreamAttrID):             # <<<<<<<<<<<<<<
 *     """ Queries stream attribute.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_375cuStreamGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_374cuStreamGetAttribute[] = "cuStreamGetAttribute(hStream, attr: CUstreamAttrID)\n Queries stream attribute.\n\n    Queries attribute `attr` from `hStream` and stores it in corresponding\n    member of `value_out`.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n\n    attr : :py:obj:`~.CUstreamAttrID`\n\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n    value_out : :py:obj:`~.CUstreamAttrValue`\n\n\n    See Also\n    --------\n    :py:obj:`~.CUaccessPolicyWindow`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_375cuStreamGetAttribute = {"cuStreamGetAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_375cuStreamGetAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_374cuStreamGetAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_375cuStreamGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hStream = 0;
  PyObject *__pyx_v_attr = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamGetAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hStream_2,&__pyx_n_s_attr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamGetAttribute", 1, 2, 2, 1); __PYX_ERR(0, 21861, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamGetAttribute") < 0)) __PYX_ERR(0, 21861, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hStream = values[0];
    __pyx_v_attr = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamGetAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 21861, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attr) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attr"); __PYX_ERR(0, 21861, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_374cuStreamGetAttribute(__pyx_self, __pyx_v_hStream, __pyx_v_attr);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_374cuStreamGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_attr) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUstreamAttrID __pyx_v_cattr;
  struct __pyx_obj_4cuda_4cuda_CUstreamAttrValue *__pyx_v_value_out = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUstreamAttrID __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__804)
  __Pyx_RefNannySetupContext("cuStreamGetAttribute", 0);
  __Pyx_TraceCall("cuStreamGetAttribute", __pyx_f[0], 21861, 0, __PYX_ERR(0, 21861, __pyx_L1_error));

  /* "cuda/cuda.pyx":21886
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21887
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21886
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21888
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21889
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21890
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21890, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21888
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21892
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21893
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstreamAttrID cattr = attr.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21893, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21895
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cdef ccuda.CUstreamAttrID cattr = attr.value             # <<<<<<<<<<<<<<
 *     cdef CUstreamAttrValue value_out = CUstreamAttrValue()
 *     err = ccuda.cuStreamGetAttribute(chStream, cattr, value_out._ptr)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUlaunchAttributeID_enum)__Pyx_PyInt_As_enum__CUlaunchAttributeID_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 21895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattr = __pyx_t_6;

  /* "cuda/cuda.pyx":21896
 * 
 *     cdef ccuda.CUstreamAttrID cattr = attr.value
 *     cdef CUstreamAttrValue value_out = CUstreamAttrValue()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamGetAttribute(chStream, cattr, value_out._ptr)
 *     return (CUresult(err), value_out)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamAttrValue)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_value_out = ((struct __pyx_obj_4cuda_4cuda_CUstreamAttrValue *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":21897
 *     cdef ccuda.CUstreamAttrID cattr = attr.value
 *     cdef CUstreamAttrValue value_out = CUstreamAttrValue()
 *     err = ccuda.cuStreamGetAttribute(chStream, cattr, value_out._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), value_out)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuStreamGetAttribute(__pyx_v_chStream, __pyx_v_cattr, __pyx_v_value_out->__pyx_base._ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21897, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":21898
 *     cdef CUstreamAttrValue value_out = CUstreamAttrValue()
 *     err = ccuda.cuStreamGetAttribute(chStream, cattr, value_out._ptr)
 *     return (CUresult(err), value_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 21898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_value_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_value_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_value_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21861
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetAttribute(hStream, attr not None : CUstreamAttrID):             # <<<<<<<<<<<<<<
 *     """ Queries stream attribute.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuStreamGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF((PyObject *)__pyx_v_value_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21901
 * 
 * @cython.embedsignature(True)
 * def cuStreamSetAttribute(hStream, attr not None : CUstreamAttrID, value : CUstreamAttrValue):             # <<<<<<<<<<<<<<
 *     """ Sets stream attribute.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_377cuStreamSetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_376cuStreamSetAttribute[] = "cuStreamSetAttribute(hStream, attr: CUstreamAttrID, CUstreamAttrValue value: CUstreamAttrValue)\n Sets stream attribute.\n\n    Sets attribute `attr` on `hStream` from corresponding attribute of\n    `value`. The updated attribute will be applied to subsequent work\n    submitted to the stream. It will not affect previously submitted work.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n\n    attr : :py:obj:`~.CUstreamAttrID`\n\n    value : :py:obj:`~.CUstreamAttrValue`\n\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.CUaccessPolicyWindow`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_377cuStreamSetAttribute = {"cuStreamSetAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_377cuStreamSetAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_376cuStreamSetAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_377cuStreamSetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hStream = 0;
  PyObject *__pyx_v_attr = 0;
  struct __pyx_obj_4cuda_4cuda_CUstreamAttrValue *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamSetAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hStream_2,&__pyx_n_s_attr,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamSetAttribute", 1, 3, 3, 1); __PYX_ERR(0, 21901, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamSetAttribute", 1, 3, 3, 2); __PYX_ERR(0, 21901, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamSetAttribute") < 0)) __PYX_ERR(0, 21901, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hStream = values[0];
    __pyx_v_attr = values[1];
    __pyx_v_value = ((struct __pyx_obj_4cuda_4cuda_CUstreamAttrValue *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamSetAttribute", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 21901, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attr) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attr"); __PYX_ERR(0, 21901, __pyx_L1_error)
  }
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_4cuda_4cuda_CUstreamAttrValue, 1, "value", 0))) __PYX_ERR(0, 21901, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_376cuStreamSetAttribute(__pyx_self, __pyx_v_hStream, __pyx_v_attr, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_376cuStreamSetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_attr, struct __pyx_obj_4cuda_4cuda_CUstreamAttrValue *__pyx_v_value) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUstreamAttrID __pyx_v_cattr;
  CUstreamAttrValue *__pyx_v_cvalue_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUstreamAttrID __pyx_t_6;
  union CUlaunchAttributeValue_union *__pyx_t_7;
  CUresult __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__805)
  __Pyx_RefNannySetupContext("cuStreamSetAttribute", 0);
  __Pyx_TraceCall("cuStreamSetAttribute", __pyx_f[0], 21901, 0, __PYX_ERR(0, 21901, __pyx_L1_error));

  /* "cuda/cuda.pyx":21927
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":21928
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":21927
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21929
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":21930
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":21931
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21931, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":21929
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":21933
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":21934
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstreamAttrID cattr = attr.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 21934, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":21936
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cdef ccuda.CUstreamAttrID cattr = attr.value             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUstreamAttrValue* cvalue_ptr = value._ptr if value != None else NULL
 *     err = ccuda.cuStreamSetAttribute(chStream, cattr, cvalue_ptr)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUlaunchAttributeID_enum)__Pyx_PyInt_As_enum__CUlaunchAttributeID_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 21936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattr = __pyx_t_6;

  /* "cuda/cuda.pyx":21937
 * 
 *     cdef ccuda.CUstreamAttrID cattr = attr.value
 *     cdef ccuda.CUstreamAttrValue* cvalue_ptr = value._ptr if value != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuStreamSetAttribute(chStream, cattr, cvalue_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_value), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21937, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 21937, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_7 = __pyx_v_value->__pyx_base._ptr;
  } else {
    __pyx_t_7 = NULL;
  }
  __pyx_v_cvalue_ptr = __pyx_t_7;

  /* "cuda/cuda.pyx":21938
 *     cdef ccuda.CUstreamAttrID cattr = attr.value
 *     cdef ccuda.CUstreamAttrValue* cvalue_ptr = value._ptr if value != None else NULL
 *     err = ccuda.cuStreamSetAttribute(chStream, cattr, cvalue_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuStreamSetAttribute(__pyx_v_chStream, __pyx_v_cattr, __pyx_v_cvalue_ptr); if (unlikely(__pyx_t_8 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21938, __pyx_L1_error)
  __pyx_v_err = __pyx_t_8;

  /* "cuda/cuda.pyx":21939
 *     cdef ccuda.CUstreamAttrValue* cvalue_ptr = value._ptr if value != None else NULL
 *     err = ccuda.cuStreamSetAttribute(chStream, cattr, cvalue_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 21939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21901
 * 
 * @cython.embedsignature(True)
 * def cuStreamSetAttribute(hStream, attr not None : CUstreamAttrID, value : CUstreamAttrValue):             # <<<<<<<<<<<<<<
 *     """ Sets stream attribute.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cuda.cuda.cuStreamSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21942
 * 
 * @cython.embedsignature(True)
 * def cuEventCreate(unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Creates an event.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_379cuEventCreate(PyObject *__pyx_self, PyObject *__pyx_arg_Flags); /*proto*/
static char __pyx_doc_4cuda_4cuda_378cuEventCreate[] = "cuEventCreate(unsigned int Flags)\n Creates an event.\n\n    Creates an event *phEvent for the current context with the flags\n    specified via `Flags`. Valid flags include:\n\n    - :py:obj:`~.CU_EVENT_DEFAULT`: Default event creation flag.\n\n    - :py:obj:`~.CU_EVENT_BLOCKING_SYNC`: Specifies that the created event\n      should use blocking synchronization. A CPU thread that uses\n      :py:obj:`~.cuEventSynchronize()` to wait on an event created with\n      this flag will block until the event has actually been recorded.\n\n    - :py:obj:`~.CU_EVENT_DISABLE_TIMING`: Specifies that the created event\n      does not need to record timing data. Events created with this flag\n      specified and the :py:obj:`~.CU_EVENT_BLOCKING_SYNC` flag not\n      specified will provide the best performance when used with\n      :py:obj:`~.cuStreamWaitEvent()` and :py:obj:`~.cuEventQuery()`.\n\n    - :py:obj:`~.CU_EVENT_INTERPROCESS`: Specifies that the created event\n      may be used as an interprocess event by\n      :py:obj:`~.cuIpcGetEventHandle()`. :py:obj:`~.CU_EVENT_INTERPROCESS`\n      must be specified along with :py:obj:`~.CU_EVENT_DISABLE_TIMING`.\n\n    Parameters\n    ----------\n    Flags : unsigned int\n        Event creation flags\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    phEvent : :py:obj:`~.CUevent`\n        Returns newly created event\n\n    See Also\n    --------\n    :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cudaEventCreate`, :py:obj:`~.cudaEventCreateWithFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_379cuEventCreate = {"cuEventCreate", (PyCFunction)__pyx_pw_4cuda_4cuda_379cuEventCreate, METH_O, __pyx_doc_4cuda_4cuda_378cuEventCreate};
static PyObject *__pyx_pw_4cuda_4cuda_379cuEventCreate(PyObject *__pyx_self, PyObject *__pyx_arg_Flags) {
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEventCreate (wrapper)", 0);
  assert(__pyx_arg_Flags); {
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_Flags); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 21942, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuEventCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_378cuEventCreate(__pyx_self, ((unsigned int)__pyx_v_Flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_378cuEventCreate(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_Flags) {
  struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_phEvent = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__806)
  __Pyx_RefNannySetupContext("cuEventCreate", 0);
  __Pyx_TraceCall("cuEventCreate", __pyx_f[0], 21942, 0, __PYX_ERR(0, 21942, __pyx_L1_error));

  /* "cuda/cuda.pyx":21982
 *     :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cudaEventCreate`, :py:obj:`~.cudaEventCreateWithFlags`
 *     """
 *     cdef CUevent phEvent = CUevent()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuEventCreate(phEvent._ptr, Flags)
 *     return (CUresult(err), phEvent)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_phEvent = ((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":21983
 *     """
 *     cdef CUevent phEvent = CUevent()
 *     err = ccuda.cuEventCreate(phEvent._ptr, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phEvent)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuEventCreate(__pyx_v_phEvent->_ptr, __pyx_v_Flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 21983, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":21984
 *     cdef CUevent phEvent = CUevent()
 *     err = ccuda.cuEventCreate(phEvent._ptr, Flags)
 *     return (CUresult(err), phEvent)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_phEvent));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phEvent));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phEvent));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21942
 * 
 * @cython.embedsignature(True)
 * def cuEventCreate(unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Creates an event.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuEventCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_phEvent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":21987
 * 
 * @cython.embedsignature(True)
 * def cuEventRecord(hEvent, hStream):             # <<<<<<<<<<<<<<
 *     """ Records an event.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_381cuEventRecord(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_380cuEventRecord[] = "cuEventRecord(hEvent, hStream)\n Records an event.\n\n    Captures in `hEvent` the contents of `hStream` at the time of this\n    call. `hEvent` and `hStream` must be from the same context. Calls such\n    as :py:obj:`~.cuEventQuery()` or :py:obj:`~.cuStreamWaitEvent()` will\n    then examine or wait for completion of the work that was captured. Uses\n    of `hStream` after this call do not modify `hEvent`. See note on\n    default stream behavior for what is captured in the default case.\n\n    :py:obj:`~.cuEventRecord()` can be called multiple times on the same\n    event and will overwrite the previously captured state. Other APIs such\n    as :py:obj:`~.cuStreamWaitEvent()` use the most recently captured state\n    at the time of the API call, and are not affected by later calls to\n    :py:obj:`~.cuEventRecord()`. Before the first call to\n    :py:obj:`~.cuEventRecord()`, an event represents an empty set of work,\n    so for example :py:obj:`~.cuEventQuery()` would return\n    :py:obj:`~.CUDA_SUCCESS`.\n\n    Parameters\n    ----------\n    hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Event to record\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to record event for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cudaEventRecord`, :py:obj:`~.cuEventRecordWithFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_381cuEventRecord = {"cuEventRecord", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_381cuEventRecord, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_380cuEventRecord};
static PyObject *__pyx_pw_4cuda_4cuda_381cuEventRecord(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hEvent = 0;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEventRecord (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hEvent,&__pyx_n_s_hStream_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hEvent)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEventRecord", 1, 2, 2, 1); __PYX_ERR(0, 21987, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuEventRecord") < 0)) __PYX_ERR(0, 21987, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hEvent = values[0];
    __pyx_v_hStream = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuEventRecord", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 21987, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuEventRecord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_380cuEventRecord(__pyx_self, __pyx_v_hEvent, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_380cuEventRecord(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hEvent, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUevent __pyx_v_chEvent;
  PyObject *__pyx_v_phEvent = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__807)
  __Pyx_RefNannySetupContext("cuEventRecord", 0);
  __Pyx_TraceCall("cuEventRecord", __pyx_f[0], 21987, 0, __PYX_ERR(0, 21987, __pyx_L1_error));

  /* "cuda/cuda.pyx":22023
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22024
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22023
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22025
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22026
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22027
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22027, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22025
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22029
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22030
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUevent chEvent
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22030, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":22033
 * 
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_hEvent == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22034
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)
 */
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22033
 * 
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":22035
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hEvent, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22036
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hEvent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phEvent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22037
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent             # <<<<<<<<<<<<<<
 *     else:
 *         phEvent = int(CUevent(hEvent))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEvent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22037, __pyx_L1_error)
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22035
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":22039
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 *     else:
 *         phEvent = int(CUevent(hEvent))             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_hEvent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phEvent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22040
 *     else:
 *         phEvent = int(CUevent(hEvent))
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuEventRecord(chEvent, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEvent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22040, __pyx_L1_error)
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":22042
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 * 
 *     err = ccuda.cuEventRecord(chEvent, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuEventRecord(__pyx_v_chEvent, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 22042, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":22043
 * 
 *     err = ccuda.cuEventRecord(chEvent, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":21987
 * 
 * @cython.embedsignature(True)
 * def cuEventRecord(hEvent, hStream):             # <<<<<<<<<<<<<<
 *     """ Records an event.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEventRecord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_phEvent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22046
 * 
 * @cython.embedsignature(True)
 * def cuEventRecordWithFlags(hEvent, hStream, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Records an event.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_383cuEventRecordWithFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_382cuEventRecordWithFlags[] = "cuEventRecordWithFlags(hEvent, hStream, unsigned int flags)\n Records an event.\n\n    Captures in `hEvent` the contents of `hStream` at the time of this\n    call. `hEvent` and `hStream` must be from the same context. Calls such\n    as :py:obj:`~.cuEventQuery()` or :py:obj:`~.cuStreamWaitEvent()` will\n    then examine or wait for completion of the work that was captured. Uses\n    of `hStream` after this call do not modify `hEvent`. See note on\n    default stream behavior for what is captured in the default case.\n\n    :py:obj:`~.cuEventRecordWithFlags()` can be called multiple times on\n    the same event and will overwrite the previously captured state. Other\n    APIs such as :py:obj:`~.cuStreamWaitEvent()` use the most recently\n    captured state at the time of the API call, and are not affected by\n    later calls to :py:obj:`~.cuEventRecordWithFlags()`. Before the first\n    call to :py:obj:`~.cuEventRecordWithFlags()`, an event represents an\n    empty set of work, so for example :py:obj:`~.cuEventQuery()` would\n    return :py:obj:`~.CUDA_SUCCESS`.\n\n    flags include:\n\n    - :py:obj:`~.CU_EVENT_RECORD_DEFAULT`: Default event creation flag.\n\n    - :py:obj:`~.CU_EVENT_RECORD_EXTERNAL`: Event is captured in the graph\n      as an external event node when performing stream capture. This flag\n      is invalid outside of stream capture.\n\n    Parameters\n    ----------\n    hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Event to record\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to record event for\n    flags : unsigned int\n        See :py:obj:`~.CUevent_capture_flags`\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuEventCreate`, "":py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cudaEventRecord`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_383cuEventRecordWithFlags = {"cuEventRecordWithFlags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_383cuEventRecordWithFlags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_382cuEventRecordWithFlags};
static PyObject *__pyx_pw_4cuda_4cuda_383cuEventRecordWithFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hEvent = 0;
  PyObject *__pyx_v_hStream = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEventRecordWithFlags (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hEvent,&__pyx_n_s_hStream_2,&__pyx_n_s_flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hEvent)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEventRecordWithFlags", 1, 3, 3, 1); __PYX_ERR(0, 22046, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEventRecordWithFlags", 1, 3, 3, 2); __PYX_ERR(0, 22046, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuEventRecordWithFlags") < 0)) __PYX_ERR(0, 22046, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hEvent = values[0];
    __pyx_v_hStream = values[1];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 22046, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuEventRecordWithFlags", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 22046, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuEventRecordWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_382cuEventRecordWithFlags(__pyx_self, __pyx_v_hEvent, __pyx_v_hStream, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_382cuEventRecordWithFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hEvent, PyObject *__pyx_v_hStream, unsigned int __pyx_v_flags) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUevent __pyx_v_chEvent;
  PyObject *__pyx_v_phEvent = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__808)
  __Pyx_RefNannySetupContext("cuEventRecordWithFlags", 0);
  __Pyx_TraceCall("cuEventRecordWithFlags", __pyx_f[0], 22046, 0, __PYX_ERR(0, 22046, __pyx_L1_error));

  /* "cuda/cuda.pyx":22092
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22093
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22092
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22094
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22095
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22096
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22096, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22094
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22098
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22099
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUevent chEvent
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22099, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":22102
 * 
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_hEvent == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22103
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)
 */
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22102
 * 
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":22104
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hEvent, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22105
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hEvent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phEvent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22106
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent             # <<<<<<<<<<<<<<
 *     else:
 *         phEvent = int(CUevent(hEvent))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEvent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22106, __pyx_L1_error)
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22104
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":22108
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 *     else:
 *         phEvent = int(CUevent(hEvent))             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_hEvent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phEvent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22109
 *     else:
 *         phEvent = int(CUevent(hEvent))
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuEventRecordWithFlags(chEvent, chStream, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEvent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22109, __pyx_L1_error)
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":22111
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 * 
 *     err = ccuda.cuEventRecordWithFlags(chEvent, chStream, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuEventRecordWithFlags(__pyx_v_chEvent, __pyx_v_chStream, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 22111, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":22112
 * 
 *     err = ccuda.cuEventRecordWithFlags(chEvent, chStream, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":22046
 * 
 * @cython.embedsignature(True)
 * def cuEventRecordWithFlags(hEvent, hStream, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Records an event.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEventRecordWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_phEvent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22115
 * 
 * @cython.embedsignature(True)
 * def cuEventQuery(hEvent):             # <<<<<<<<<<<<<<
 *     """ Queries an event's status.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_385cuEventQuery(PyObject *__pyx_self, PyObject *__pyx_v_hEvent); /*proto*/
static char __pyx_doc_4cuda_4cuda_384cuEventQuery[] = "cuEventQuery(hEvent)\n Queries an event's status.\n\n    Queries the status of all work currently captured by `hEvent`. See\n    :py:obj:`~.cuEventRecord()` for details on what is captured by an\n    event.\n\n    Returns :py:obj:`~.CUDA_SUCCESS` if all captured work has been\n    completed, or :py:obj:`~.CUDA_ERROR_NOT_READY` if any captured work is\n    incomplete.\n\n    For the purposes of Unified Memory, a return value of\n    :py:obj:`~.CUDA_SUCCESS` is equivalent to having called\n    :py:obj:`~.cuEventSynchronize()`.\n\n    Parameters\n    ----------\n    hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Event to query\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_READY`\n\n    See Also\n    --------\n    :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cudaEventQuery`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_385cuEventQuery = {"cuEventQuery", (PyCFunction)__pyx_pw_4cuda_4cuda_385cuEventQuery, METH_O, __pyx_doc_4cuda_4cuda_384cuEventQuery};
static PyObject *__pyx_pw_4cuda_4cuda_385cuEventQuery(PyObject *__pyx_self, PyObject *__pyx_v_hEvent) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEventQuery (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_384cuEventQuery(__pyx_self, ((PyObject *)__pyx_v_hEvent));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_384cuEventQuery(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hEvent) {
  CUevent __pyx_v_chEvent;
  PyObject *__pyx_v_phEvent = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__809)
  __Pyx_RefNannySetupContext("cuEventQuery", 0);
  __Pyx_TraceCall("cuEventQuery", __pyx_f[0], 22115, 0, __PYX_ERR(0, 22115, __pyx_L1_error));

  /* "cuda/cuda.pyx":22145
 *     """
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_hEvent == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22146
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)
 */
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22145
 *     """
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22147
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hEvent, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22148
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phEvent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22149
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent             # <<<<<<<<<<<<<<
 *     else:
 *         phEvent = int(CUevent(hEvent))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEvent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22149, __pyx_L1_error)
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22147
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22151
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 *     else:
 *         phEvent = int(CUevent(hEvent))             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_hEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phEvent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22152
 *     else:
 *         phEvent = int(CUevent(hEvent))
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuEventQuery(chEvent)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEvent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22152, __pyx_L1_error)
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":22154
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 * 
 *     err = ccuda.cuEventQuery(chEvent)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuEventQuery(__pyx_v_chEvent); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 22154, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":22155
 * 
 *     err = ccuda.cuEventQuery(chEvent)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":22115
 * 
 * @cython.embedsignature(True)
 * def cuEventQuery(hEvent):             # <<<<<<<<<<<<<<
 *     """ Queries an event's status.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEventQuery", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phEvent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22158
 * 
 * @cython.embedsignature(True)
 * def cuEventSynchronize(hEvent):             # <<<<<<<<<<<<<<
 *     """ Waits for an event to complete.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_387cuEventSynchronize(PyObject *__pyx_self, PyObject *__pyx_v_hEvent); /*proto*/
static char __pyx_doc_4cuda_4cuda_386cuEventSynchronize[] = "cuEventSynchronize(hEvent)\n Waits for an event to complete.\n\n    Waits until the completion of all work currently captured in `hEvent`.\n    See :py:obj:`~.cuEventRecord()` for details on what is captured by an\n    event.\n\n    Waiting for an event that was created with the\n    :py:obj:`~.CU_EVENT_BLOCKING_SYNC` flag will cause the calling CPU\n    thread to block until the event has been completed by the device. If\n    the :py:obj:`~.CU_EVENT_BLOCKING_SYNC` flag has not been set, then the\n    CPU thread will busy-wait until the event has been completed by the\n    device.\n\n    Parameters\n    ----------\n    hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Event to wait for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cudaEventSynchronize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_387cuEventSynchronize = {"cuEventSynchronize", (PyCFunction)__pyx_pw_4cuda_4cuda_387cuEventSynchronize, METH_O, __pyx_doc_4cuda_4cuda_386cuEventSynchronize};
static PyObject *__pyx_pw_4cuda_4cuda_387cuEventSynchronize(PyObject *__pyx_self, PyObject *__pyx_v_hEvent) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEventSynchronize (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_386cuEventSynchronize(__pyx_self, ((PyObject *)__pyx_v_hEvent));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_386cuEventSynchronize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hEvent) {
  CUevent __pyx_v_chEvent;
  PyObject *__pyx_v_phEvent = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__810)
  __Pyx_RefNannySetupContext("cuEventSynchronize", 0);
  __Pyx_TraceCall("cuEventSynchronize", __pyx_f[0], 22158, 0, __PYX_ERR(0, 22158, __pyx_L1_error));

  /* "cuda/cuda.pyx":22187
 *     """
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_hEvent == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22188
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)
 */
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22187
 *     """
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22189
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hEvent, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22190
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phEvent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22191
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent             # <<<<<<<<<<<<<<
 *     else:
 *         phEvent = int(CUevent(hEvent))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEvent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22191, __pyx_L1_error)
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22189
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22193
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 *     else:
 *         phEvent = int(CUevent(hEvent))             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_hEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phEvent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22194
 *     else:
 *         phEvent = int(CUevent(hEvent))
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuEventSynchronize(chEvent)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEvent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22194, __pyx_L1_error)
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":22196
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 * 
 *     err = ccuda.cuEventSynchronize(chEvent)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuEventSynchronize(__pyx_v_chEvent); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 22196, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":22197
 * 
 *     err = ccuda.cuEventSynchronize(chEvent)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":22158
 * 
 * @cython.embedsignature(True)
 * def cuEventSynchronize(hEvent):             # <<<<<<<<<<<<<<
 *     """ Waits for an event to complete.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEventSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phEvent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22200
 * 
 * @cython.embedsignature(True)
 * def cuEventDestroy(hEvent):             # <<<<<<<<<<<<<<
 *     """ Destroys an event.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_389cuEventDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hEvent); /*proto*/
static char __pyx_doc_4cuda_4cuda_388cuEventDestroy[] = "cuEventDestroy(hEvent)\n Destroys an event.\n\n    Destroys the event specified by `hEvent`.\n\n    An event may be destroyed before it is complete (i.e., while\n    :py:obj:`~.cuEventQuery()` would return\n    :py:obj:`~.CUDA_ERROR_NOT_READY`). In this case, the call does not\n    block on completion of the event, and any associated resources will\n    automatically be released asynchronously at completion.\n\n    Parameters\n    ----------\n    hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Event to destroy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cudaEventDestroy`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_389cuEventDestroy = {"cuEventDestroy", (PyCFunction)__pyx_pw_4cuda_4cuda_389cuEventDestroy, METH_O, __pyx_doc_4cuda_4cuda_388cuEventDestroy};
static PyObject *__pyx_pw_4cuda_4cuda_389cuEventDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hEvent) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEventDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_388cuEventDestroy(__pyx_self, ((PyObject *)__pyx_v_hEvent));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_388cuEventDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hEvent) {
  CUevent __pyx_v_chEvent;
  PyObject *__pyx_v_phEvent = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__811)
  __Pyx_RefNannySetupContext("cuEventDestroy", 0);
  __Pyx_TraceCall("cuEventDestroy", __pyx_f[0], 22200, 0, __PYX_ERR(0, 22200, __pyx_L1_error));

  /* "cuda/cuda.pyx":22226
 *     """
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_hEvent == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22227
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)
 */
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22226
 *     """
 *     cdef ccuda.CUevent chEvent
 *     if hEvent is None:             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22228
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hEvent, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22229
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phEvent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22230
 *     elif isinstance(hEvent, (CUevent)):
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent             # <<<<<<<<<<<<<<
 *     else:
 *         phEvent = int(CUevent(hEvent))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEvent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22230, __pyx_L1_error)
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22228
 *     if hEvent is None:
 *         chEvent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEvent, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEvent = int(hEvent)
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22232
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 *     else:
 *         phEvent = int(CUevent(hEvent))             # <<<<<<<<<<<<<<
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_hEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phEvent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22233
 *     else:
 *         phEvent = int(CUevent(hEvent))
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuEventDestroy(chEvent)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEvent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22233, __pyx_L1_error)
    __pyx_v_chEvent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":22235
 *         chEvent = <ccuda.CUevent><void_ptr>phEvent
 * 
 *     err = ccuda.cuEventDestroy(chEvent)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuEventDestroy(__pyx_v_chEvent); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 22235, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":22236
 * 
 *     err = ccuda.cuEventDestroy(chEvent)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":22200
 * 
 * @cython.embedsignature(True)
 * def cuEventDestroy(hEvent):             # <<<<<<<<<<<<<<
 *     """ Destroys an event.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEventDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phEvent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22239
 * 
 * @cython.embedsignature(True)
 * def cuEventElapsedTime(hStart, hEnd):             # <<<<<<<<<<<<<<
 *     """ Computes the elapsed time between two events.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_391cuEventElapsedTime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_390cuEventElapsedTime[] = "cuEventElapsedTime(hStart, hEnd)\n Computes the elapsed time between two events.\n\n    Computes the elapsed time between two events (in milliseconds with a\n    resolution of around 0.5 microseconds).\n\n    If either event was last recorded in a non-NULL stream, the resulting\n    time may be greater than expected (even if both used the same stream\n    handle). This happens because the :py:obj:`~.cuEventRecord()` operation\n    takes place asynchronously and there is no guarantee that the measured\n    latency is actually just between the two events. Any number of other\n    different stream operations could execute in between the two measured\n    events, thus altering the timing in a significant way.\n\n    If :py:obj:`~.cuEventRecord()` has not been called on either event then\n    :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is returned. If\n    :py:obj:`~.cuEventRecord()` has been called on both events but one or\n    both of them has not yet been completed (that is,\n    :py:obj:`~.cuEventQuery()` would return\n    :py:obj:`~.CUDA_ERROR_NOT_READY` on at least one of the events),\n    :py:obj:`~.CUDA_ERROR_NOT_READY` is returned. If either event was\n    created with the :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag, then this\n    function will return :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`.\n\n    Parameters\n    ----------\n    hStart : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Starting event\n    hEnd : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Ending event\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_READY`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    pMilliseconds : float\n        Time between `hStart` and `hEnd` in ms\n\n    See Also\n    --------\n    :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventQuery`, :py"":obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cudaEventElapsedTime`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_391cuEventElapsedTime = {"cuEventElapsedTime", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_391cuEventElapsedTime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_390cuEventElapsedTime};
static PyObject *__pyx_pw_4cuda_4cuda_391cuEventElapsedTime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hStart = 0;
  PyObject *__pyx_v_hEnd = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEventElapsedTime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hStart,&__pyx_n_s_hEnd,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStart)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hEnd)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEventElapsedTime", 1, 2, 2, 1); __PYX_ERR(0, 22239, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuEventElapsedTime") < 0)) __PYX_ERR(0, 22239, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hStart = values[0];
    __pyx_v_hEnd = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuEventElapsedTime", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 22239, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuEventElapsedTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_390cuEventElapsedTime(__pyx_self, __pyx_v_hStart, __pyx_v_hEnd);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_390cuEventElapsedTime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStart, PyObject *__pyx_v_hEnd) {
  CUevent __pyx_v_chEnd;
  PyObject *__pyx_v_phEnd = NULL;
  CUevent __pyx_v_chStart;
  PyObject *__pyx_v_phStart = NULL;
  float __pyx_v_pMilliseconds;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__812)
  __Pyx_RefNannySetupContext("cuEventElapsedTime", 0);
  __Pyx_TraceCall("cuEventElapsedTime", __pyx_f[0], 22239, 0, __PYX_ERR(0, 22239, __pyx_L1_error));

  /* "cuda/cuda.pyx":22282
 *     """
 *     cdef ccuda.CUevent chEnd
 *     if hEnd is None:             # <<<<<<<<<<<<<<
 *         chEnd = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEnd, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_hEnd == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22283
 *     cdef ccuda.CUevent chEnd
 *     if hEnd is None:
 *         chEnd = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hEnd, (CUevent)):
 *         phEnd = int(hEnd)
 */
    __pyx_v_chEnd = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22282
 *     """
 *     cdef ccuda.CUevent chEnd
 *     if hEnd is None:             # <<<<<<<<<<<<<<
 *         chEnd = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEnd, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22284
 *     if hEnd is None:
 *         chEnd = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEnd, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEnd = int(hEnd)
 *         chEnd = <ccuda.CUevent><void_ptr>phEnd
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hEnd, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22285
 *         chEnd = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEnd, (CUevent)):
 *         phEnd = int(hEnd)             # <<<<<<<<<<<<<<
 *         chEnd = <ccuda.CUevent><void_ptr>phEnd
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hEnd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phEnd = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22286
 *     elif isinstance(hEnd, (CUevent)):
 *         phEnd = int(hEnd)
 *         chEnd = <ccuda.CUevent><void_ptr>phEnd             # <<<<<<<<<<<<<<
 *     else:
 *         phEnd = int(CUevent(hEnd))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEnd); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22286, __pyx_L1_error)
    __pyx_v_chEnd = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22284
 *     if hEnd is None:
 *         chEnd = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hEnd, (CUevent)):             # <<<<<<<<<<<<<<
 *         phEnd = int(hEnd)
 *         chEnd = <ccuda.CUevent><void_ptr>phEnd
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22288
 *         chEnd = <ccuda.CUevent><void_ptr>phEnd
 *     else:
 *         phEnd = int(CUevent(hEnd))             # <<<<<<<<<<<<<<
 *         chEnd = <ccuda.CUevent><void_ptr>phEnd
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_hEnd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phEnd = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22289
 *     else:
 *         phEnd = int(CUevent(hEnd))
 *         chEnd = <ccuda.CUevent><void_ptr>phEnd             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUevent chStart
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phEnd); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22289, __pyx_L1_error)
    __pyx_v_chEnd = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":22292
 * 
 *     cdef ccuda.CUevent chStart
 *     if hStart is None:             # <<<<<<<<<<<<<<
 *         chStart = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hStart, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_hStart == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22293
 *     cdef ccuda.CUevent chStart
 *     if hStart is None:
 *         chStart = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStart, (CUevent)):
 *         phStart = int(hStart)
 */
    __pyx_v_chStart = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22292
 * 
 *     cdef ccuda.CUevent chStart
 *     if hStart is None:             # <<<<<<<<<<<<<<
 *         chStart = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hStart, (CUevent)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":22294
 *     if hStart is None:
 *         chStart = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hStart, (CUevent)):             # <<<<<<<<<<<<<<
 *         phStart = int(hStart)
 *         chStart = <ccuda.CUevent><void_ptr>phStart
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStart, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22295
 *         chStart = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hStart, (CUevent)):
 *         phStart = int(hStart)             # <<<<<<<<<<<<<<
 *         chStart = <ccuda.CUevent><void_ptr>phStart
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hStart); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phStart = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22296
 *     elif isinstance(hStart, (CUevent)):
 *         phStart = int(hStart)
 *         chStart = <ccuda.CUevent><void_ptr>phStart             # <<<<<<<<<<<<<<
 *     else:
 *         phStart = int(CUevent(hStart))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStart); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22296, __pyx_L1_error)
    __pyx_v_chStart = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22294
 *     if hStart is None:
 *         chStart = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(hStart, (CUevent)):             # <<<<<<<<<<<<<<
 *         phStart = int(hStart)
 *         chStart = <ccuda.CUevent><void_ptr>phStart
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":22298
 *         chStart = <ccuda.CUevent><void_ptr>phStart
 *     else:
 *         phStart = int(CUevent(hStart))             # <<<<<<<<<<<<<<
 *         chStart = <ccuda.CUevent><void_ptr>phStart
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_hStart); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phStart = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22299
 *     else:
 *         phStart = int(CUevent(hStart))
 *         chStart = <ccuda.CUevent><void_ptr>phStart             # <<<<<<<<<<<<<<
 * 
 *     cdef float pMilliseconds = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStart); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22299, __pyx_L1_error)
    __pyx_v_chStart = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":22301
 *         chStart = <ccuda.CUevent><void_ptr>phStart
 * 
 *     cdef float pMilliseconds = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuEventElapsedTime(&pMilliseconds, chStart, chEnd)
 *     return (CUresult(err), pMilliseconds)
 */
  __pyx_v_pMilliseconds = 0.0;

  /* "cuda/cuda.pyx":22302
 * 
 *     cdef float pMilliseconds = 0
 *     err = ccuda.cuEventElapsedTime(&pMilliseconds, chStart, chEnd)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pMilliseconds)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuEventElapsedTime((&__pyx_v_pMilliseconds), __pyx_v_chStart, __pyx_v_chEnd); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 22302, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":22303
 *     cdef float pMilliseconds = 0
 *     err = ccuda.cuEventElapsedTime(&pMilliseconds, chStart, chEnd)
 *     return (CUresult(err), pMilliseconds)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_pMilliseconds); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":22239
 * 
 * @cython.embedsignature(True)
 * def cuEventElapsedTime(hStart, hEnd):             # <<<<<<<<<<<<<<
 *     """ Computes the elapsed time between two events.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEventElapsedTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phEnd);
  __Pyx_XDECREF(__pyx_v_phStart);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22306
 * 
 * @cython.embedsignature(True)
 * def cuImportExternalMemory(memHandleDesc : CUDA_EXTERNAL_MEMORY_HANDLE_DESC):             # <<<<<<<<<<<<<<
 *     """ Imports an external memory object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_393cuImportExternalMemory(PyObject *__pyx_self, PyObject *__pyx_v_memHandleDesc); /*proto*/
static char __pyx_doc_4cuda_4cuda_392cuImportExternalMemory[] = "cuImportExternalMemory(CUDA_EXTERNAL_MEMORY_HANDLE_DESC memHandleDesc: CUDA_EXTERNAL_MEMORY_HANDLE_DESC)\n Imports an external memory object.\n\n    Imports an externally allocated memory object and returns a handle to\n    that in `extMem_out`.\n\n    The properties of the handle being imported must be described in\n    `memHandleDesc`. The :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`\n    structure is defined as follows:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` specifies the\n    type of handle being imported. :py:obj:`~.CUexternalMemoryHandleType`\n    is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD`, then\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::fd must be a\n    valid file descriptor referencing a memory object. Ownership of the\n    file descriptor is transferred to the CUDA driver when the handle is\n    imported successfully. Performing any operations on the file descriptor\n    after it is imported results in undefined behavior.\n\n    If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32`, then exactly\n    one of\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle and\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name must\n    not be NULL. If\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle is\n    not NULL, then it must represent a valid shared NT handle that\n    references a memory object. Ownership of this handle is not transferred\n    to CUDA after the import operation, so the application must release the\n    handle using the appropriate system call. If\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name is\n    not NULL, then it must point to a NULL""-terminated array of UTF-16\n    characters that refers to a memory object.\n\n    If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT`, then\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle\n    must be non-NULL and\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name must\n    be NULL. The handle specified must be a globally shared KMT handle.\n    This handle does not hold a reference to the underlying object, and\n    thus will be invalid when all references to the memory object are\n    destroyed.\n\n    If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP`, then exactly one\n    of :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle\n    and :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name\n    must not be NULL. If\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle is\n    not NULL, then it must represent a valid shared NT handle that is\n    returned by ID3D12Device::CreateSharedHandle when referring to a\n    ID3D12Heap object. This handle holds a reference to the underlying\n    object. If\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name is\n    not NULL, then it must point to a NULL-terminated array of UTF-16\n    characters that refers to a ID3D12Heap object.\n\n    If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE`, then exactly\n    one of\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle and\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name must\n    not be NULL. If\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle is\n    not NULL, then it must represent a valid shared NT handle that is\n    returned by ID3D12Device::CreateSharedHandle when referring to a\n    ID3D12Resource ""object. This handle holds a reference to the underlying\n    object. If\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name is\n    not NULL, then it must point to a NULL-terminated array of UTF-16\n    characters that refers to a ID3D12Resource object.\n\n    If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE`, then\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle\n    must represent a valid shared NT handle that is returned by\n    IDXGIResource1::CreateSharedHandle when referring to a ID3D11Resource\n    object. If\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name is\n    not NULL, then it must point to a NULL-terminated array of UTF-16\n    characters that refers to a ID3D11Resource object.\n\n    If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT`, then\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle\n    must represent a valid shared KMT handle that is returned by\n    IDXGIResource::GetSharedHandle when referring to a ID3D11Resource\n    object and\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name must\n    be NULL.\n\n    If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`, then\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::nvSciBufObject\n    must be non-NULL and reference a valid NvSciBuf object. If the NvSciBuf\n    object imported into CUDA is also mapped by other drivers, then the\n    application must use :py:obj:`~.cuWaitExternalSemaphoresAsync` or\n    :py:obj:`~.cuSignalExternalSemaphoresAsync` as appropriate barriers to\n    maintain coherence between CUDA and the other drivers. See\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC` and\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC` for\n    m""emory synchronization.\n\n    The size of the memory object must be specified in\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.size`.\n\n    Specifying the flag :py:obj:`~.CUDA_EXTERNAL_MEMORY_DEDICATED` in\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.flags` indicates that the\n    resource is a dedicated resource. The definition of what a dedicated\n    resource is outside the scope of this extension. This flag must be set\n    if :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is one of the\n    following: :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE`\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE`\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT`\n\n    Parameters\n    ----------\n    memHandleDesc : :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`\n        Memory import handle descriptor\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n    extMem_out : :py:obj:`~.CUexternalMemory`\n        Returned handle to an external memory object\n\n    See Also\n    --------\n    :py:obj:`~.cuDestroyExternalMemory`, :py:obj:`~.cuExternalMemoryGetMappedBuffer`, :py:obj:`~.cuExternalMemoryGetMappedMipmappedArray`\n\n    Notes\n    -----\n    If the Vulkan memory imported into CUDA is mapped on the CPU then the application must use vkInvalidateMappedMemoryRanges/vkFlushMappedMemoryRanges as well as appropriate Vulkan pipeline barriers to maintain coherence between CPU and GPU. For more information on these APIs, please refer to \"Synchronization\n    and Cache Control\" chapter from Vulkan specification.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_393cuImportExternalMemory = {"cuImportExternalMemory", (PyCFunction)__pyx_pw_4cuda_4cuda_393cuImportExternalMemory, METH_O, __pyx_doc_4cuda_4cuda_392cuImportExternalMemory};
static PyObject *__pyx_pw_4cuda_4cuda_393cuImportExternalMemory(PyObject *__pyx_self, PyObject *__pyx_v_memHandleDesc) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuImportExternalMemory (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memHandleDesc), __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC, 1, "memHandleDesc", 0))) __PYX_ERR(0, 22306, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_392cuImportExternalMemory(__pyx_self, ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC *)__pyx_v_memHandleDesc));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_392cuImportExternalMemory(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC *__pyx_v_memHandleDesc) {
  struct __pyx_obj_4cuda_4cuda_CUexternalMemory *__pyx_v_extMem_out = 0;
  CUDA_EXTERNAL_MEMORY_HANDLE_DESC *__pyx_v_cmemHandleDesc_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *__pyx_t_2;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__813)
  __Pyx_RefNannySetupContext("cuImportExternalMemory", 0);
  __Pyx_TraceCall("cuImportExternalMemory", __pyx_f[0], 22306, 0, __PYX_ERR(0, 22306, __pyx_L1_error));

  /* "cuda/cuda.pyx":22450
 *     and Cache Control" chapter from Vulkan specification.
 *     """
 *     cdef CUexternalMemory extMem_out = CUexternalMemory()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC* cmemHandleDesc_ptr = memHandleDesc._ptr if memHandleDesc != None else NULL
 *     err = ccuda.cuImportExternalMemory(extMem_out._ptr, cmemHandleDesc_ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalMemory)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_extMem_out = ((struct __pyx_obj_4cuda_4cuda_CUexternalMemory *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":22451
 *     """
 *     cdef CUexternalMemory extMem_out = CUexternalMemory()
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC* cmemHandleDesc_ptr = memHandleDesc._ptr if memHandleDesc != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuImportExternalMemory(extMem_out._ptr, cmemHandleDesc_ptr)
 *     return (CUresult(err), extMem_out)
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_memHandleDesc), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22451, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 22451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_2 = __pyx_v_memHandleDesc->__pyx_base._ptr;
  } else {
    __pyx_t_2 = NULL;
  }
  __pyx_v_cmemHandleDesc_ptr = __pyx_t_2;

  /* "cuda/cuda.pyx":22452
 *     cdef CUexternalMemory extMem_out = CUexternalMemory()
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC* cmemHandleDesc_ptr = memHandleDesc._ptr if memHandleDesc != None else NULL
 *     err = ccuda.cuImportExternalMemory(extMem_out._ptr, cmemHandleDesc_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), extMem_out)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuImportExternalMemory(__pyx_v_extMem_out->_ptr, __pyx_v_cmemHandleDesc_ptr); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 22452, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":22453
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC* cmemHandleDesc_ptr = memHandleDesc._ptr if memHandleDesc != None else NULL
 *     err = ccuda.cuImportExternalMemory(extMem_out._ptr, cmemHandleDesc_ptr)
 *     return (CUresult(err), extMem_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 22453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_extMem_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_extMem_out));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_extMem_out));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":22306
 * 
 * @cython.embedsignature(True)
 * def cuImportExternalMemory(memHandleDesc : CUDA_EXTERNAL_MEMORY_HANDLE_DESC):             # <<<<<<<<<<<<<<
 *     """ Imports an external memory object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuImportExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_extMem_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22456
 * 
 * @cython.embedsignature(True)
 * def cuExternalMemoryGetMappedBuffer(extMem, bufferDesc : CUDA_EXTERNAL_MEMORY_BUFFER_DESC):             # <<<<<<<<<<<<<<
 *     """ Maps a buffer onto an imported memory object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_395cuExternalMemoryGetMappedBuffer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_394cuExternalMemoryGetMappedBuffer[] = "cuExternalMemoryGetMappedBuffer(extMem, CUDA_EXTERNAL_MEMORY_BUFFER_DESC bufferDesc: CUDA_EXTERNAL_MEMORY_BUFFER_DESC)\n Maps a buffer onto an imported memory object.\n\n    Maps a buffer onto an imported memory object and returns a device\n    pointer in `devPtr`.\n\n    The properties of the buffer being mapped must be described in\n    `bufferDesc`. The :py:obj:`~.CUDA_EXTERNAL_MEMORY_BUFFER_DESC`\n    structure is defined as follows:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where :py:obj:`~.CUDA_EXTERNAL_MEMORY_BUFFER_DESC.offset` is the offset\n    in the memory object where the buffer's base address is.\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_BUFFER_DESC.size` is the size of the\n    buffer. :py:obj:`~.CUDA_EXTERNAL_MEMORY_BUFFER_DESC.flags` must be\n    zero.\n\n    The offset and size have to be suitably aligned to match the\n    requirements of the external API. Mapping two buffers whose ranges\n    overlap may or may not result in the same virtual address being\n    returned for the overlapped portion. In such cases, the application\n    must ensure that all accesses to that region from the GPU are volatile.\n    Otherwise writes made via one address are not guaranteed to be visible\n    via the other address, even if they're issued by the same thread. It is\n    recommended that applications map the combined range instead of mapping\n    separate buffers and then apply the appropriate offsets to the returned\n    pointer to derive the individual buffers.\n\n    The returned pointer `devPtr` must be freed using\n    :py:obj:`~.cuMemFree`.\n\n    Parameters\n    ----------\n    extMem : :py:obj:`~.CUexternalMemory`\n        Handle to external memory object\n    bufferDesc : :py:obj:`~.CUDA_EXTERNAL_MEMORY_BUFFER_DESC`\n        Buffer descriptor\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HA""NDLE`\n    devPtr : :py:obj:`~.CUdeviceptr`\n        Returned device pointer to buffer\n\n    See Also\n    --------\n    :py:obj:`~.cuImportExternalMemory`, :py:obj:`~.cuDestroyExternalMemory`, :py:obj:`~.cuExternalMemoryGetMappedMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_395cuExternalMemoryGetMappedBuffer = {"cuExternalMemoryGetMappedBuffer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_395cuExternalMemoryGetMappedBuffer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_394cuExternalMemoryGetMappedBuffer};
static PyObject *__pyx_pw_4cuda_4cuda_395cuExternalMemoryGetMappedBuffer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_extMem = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC *__pyx_v_bufferDesc = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuExternalMemoryGetMappedBuffer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_extMem,&__pyx_n_s_bufferDesc,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extMem)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bufferDesc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuExternalMemoryGetMappedBuffer", 1, 2, 2, 1); __PYX_ERR(0, 22456, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuExternalMemoryGetMappedBuffer") < 0)) __PYX_ERR(0, 22456, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_extMem = values[0];
    __pyx_v_bufferDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuExternalMemoryGetMappedBuffer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 22456, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuExternalMemoryGetMappedBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bufferDesc), __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC, 1, "bufferDesc", 0))) __PYX_ERR(0, 22456, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_394cuExternalMemoryGetMappedBuffer(__pyx_self, __pyx_v_extMem, __pyx_v_bufferDesc);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_394cuExternalMemoryGetMappedBuffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extMem, struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC *__pyx_v_bufferDesc) {
  CUexternalMemory __pyx_v_cextMem;
  PyObject *__pyx_v_pextMem = NULL;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_devPtr = 0;
  CUDA_EXTERNAL_MEMORY_BUFFER_DESC *__pyx_v_cbufferDesc_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__814)
  __Pyx_RefNannySetupContext("cuExternalMemoryGetMappedBuffer", 0);
  __Pyx_TraceCall("cuExternalMemoryGetMappedBuffer", __pyx_f[0], 22456, 0, __PYX_ERR(0, 22456, __pyx_L1_error));

  /* "cuda/cuda.pyx":22507
 *     """
 *     cdef ccuda.CUexternalMemory cextMem
 *     if extMem is None:             # <<<<<<<<<<<<<<
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):
 */
  __pyx_t_1 = (__pyx_v_extMem == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22508
 *     cdef ccuda.CUexternalMemory cextMem
 *     if extMem is None:
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(extMem, (CUexternalMemory)):
 *         pextMem = int(extMem)
 */
    __pyx_v_cextMem = ((CUexternalMemory)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22507
 *     """
 *     cdef ccuda.CUexternalMemory cextMem
 *     if extMem is None:             # <<<<<<<<<<<<<<
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22509
 *     if extMem is None:
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):             # <<<<<<<<<<<<<<
 *         pextMem = int(extMem)
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_extMem, __pyx_ptype_4cuda_4cuda_CUexternalMemory); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22510
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):
 *         pextMem = int(extMem)             # <<<<<<<<<<<<<<
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_extMem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pextMem = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22511
 *     elif isinstance(extMem, (CUexternalMemory)):
 *         pextMem = int(extMem)
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem             # <<<<<<<<<<<<<<
 *     else:
 *         pextMem = int(CUexternalMemory(extMem))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pextMem); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22511, __pyx_L1_error)
    __pyx_v_cextMem = ((CUexternalMemory)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22509
 *     if extMem is None:
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):             # <<<<<<<<<<<<<<
 *         pextMem = int(extMem)
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22513
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 *     else:
 *         pextMem = int(CUexternalMemory(extMem))             # <<<<<<<<<<<<<<
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalMemory), __pyx_v_extMem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pextMem = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22514
 *     else:
 *         pextMem = int(CUexternalMemory(extMem))
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem             # <<<<<<<<<<<<<<
 * 
 *     cdef CUdeviceptr devPtr = CUdeviceptr()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pextMem); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22514, __pyx_L1_error)
    __pyx_v_cextMem = ((CUexternalMemory)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":22516
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 * 
 *     cdef CUdeviceptr devPtr = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC* cbufferDesc_ptr = bufferDesc._ptr if bufferDesc != None else NULL
 *     err = ccuda.cuExternalMemoryGetMappedBuffer(devPtr._ptr, cextMem, cbufferDesc_ptr)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_devPtr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":22517
 * 
 *     cdef CUdeviceptr devPtr = CUdeviceptr()
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC* cbufferDesc_ptr = bufferDesc._ptr if bufferDesc != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuExternalMemoryGetMappedBuffer(devPtr._ptr, cextMem, cbufferDesc_ptr)
 *     return (CUresult(err), devPtr)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_bufferDesc), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22517, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 22517, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_bufferDesc->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cbufferDesc_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":22518
 *     cdef CUdeviceptr devPtr = CUdeviceptr()
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC* cbufferDesc_ptr = bufferDesc._ptr if bufferDesc != None else NULL
 *     err = ccuda.cuExternalMemoryGetMappedBuffer(devPtr._ptr, cextMem, cbufferDesc_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), devPtr)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuExternalMemoryGetMappedBuffer(__pyx_v_devPtr->_ptr, __pyx_v_cextMem, __pyx_v_cbufferDesc_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 22518, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":22519
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC* cbufferDesc_ptr = bufferDesc._ptr if bufferDesc != None else NULL
 *     err = ccuda.cuExternalMemoryGetMappedBuffer(devPtr._ptr, cextMem, cbufferDesc_ptr)
 *     return (CUresult(err), devPtr)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 22519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_devPtr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_devPtr));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_devPtr));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":22456
 * 
 * @cython.embedsignature(True)
 * def cuExternalMemoryGetMappedBuffer(extMem, bufferDesc : CUDA_EXTERNAL_MEMORY_BUFFER_DESC):             # <<<<<<<<<<<<<<
 *     """ Maps a buffer onto an imported memory object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuExternalMemoryGetMappedBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pextMem);
  __Pyx_XDECREF((PyObject *)__pyx_v_devPtr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22522
 * 
 * @cython.embedsignature(True)
 * def cuExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC):             # <<<<<<<<<<<<<<
 *     """ Maps a CUDA mipmapped array onto an external memory object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_397cuExternalMemoryGetMappedMipmappedArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_396cuExternalMemoryGetMappedMipmappedArray[] = "cuExternalMemoryGetMappedMipmappedArray(extMem, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC mipmapDesc: CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC)\n Maps a CUDA mipmapped array onto an external memory object.\n\n    Maps a CUDA mipmapped array onto an external object and returns a\n    handle to it in `mipmap`.\n\n    The properties of the CUDA mipmapped array being mapped must be\n    described in `mipmapDesc`. The structure\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC` is defined as\n    follows:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.offset` is\n    the offset in the memory object where the base level of the mipmap\n    chain is.\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.arrayDesc`\n    describes the format, dimensions and type of the base level of the\n    mipmap chain. For further details on these parameters, please refer to\n    the documentation for :py:obj:`~.cuMipmappedArrayCreate`. Note that if\n    the mipmapped array is bound as a color target in the graphics API,\n    then the flag :py:obj:`~.CUDA_ARRAY3D_COLOR_ATTACHMENT` must be\n    specified in\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC`::arrayDesc::Flags.\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.numLevels`\n    specifies the total number of levels in the mipmap chain.\n\n    If `extMem` was imported from a handle of type\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`, then\n    :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.numLevels` must be\n    equal to 1.\n\n    The returned CUDA mipmapped array must be freed using\n    :py:obj:`~.cuMipmappedArrayDestroy`.\n\n    Parameters\n    ----------\n    extMem : :py:obj:`~.CUexternalMemory`\n        Handle to external memory object\n    mipmapDesc : :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC`\n        CUDA array descriptor\n\n    Returns\n    -------\n    CUresult\n        :py:o""bj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n    mipmap : :py:obj:`~.CUmipmappedArray`\n        Returned CUDA mipmapped array\n\n    See Also\n    --------\n    :py:obj:`~.cuImportExternalMemory`, :py:obj:`~.cuDestroyExternalMemory`, :py:obj:`~.cuExternalMemoryGetMappedBuffer`\n\n    Notes\n    -----\n    On Tegra devices, this API will always attempt to do a compressed mapping when the `extMem` is imported from a handle of type :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_397cuExternalMemoryGetMappedMipmappedArray = {"cuExternalMemoryGetMappedMipmappedArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_397cuExternalMemoryGetMappedMipmappedArray, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_396cuExternalMemoryGetMappedMipmappedArray};
static PyObject *__pyx_pw_4cuda_4cuda_397cuExternalMemoryGetMappedMipmappedArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_extMem = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC *__pyx_v_mipmapDesc = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuExternalMemoryGetMappedMipmappedArray (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_extMem,&__pyx_n_s_mipmapDesc,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extMem)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mipmapDesc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuExternalMemoryGetMappedMipmappedArray", 1, 2, 2, 1); __PYX_ERR(0, 22522, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuExternalMemoryGetMappedMipmappedArray") < 0)) __PYX_ERR(0, 22522, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_extMem = values[0];
    __pyx_v_mipmapDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuExternalMemoryGetMappedMipmappedArray", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 22522, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuExternalMemoryGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mipmapDesc), __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC, 1, "mipmapDesc", 0))) __PYX_ERR(0, 22522, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_396cuExternalMemoryGetMappedMipmappedArray(__pyx_self, __pyx_v_extMem, __pyx_v_mipmapDesc);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_396cuExternalMemoryGetMappedMipmappedArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extMem, struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC *__pyx_v_mipmapDesc) {
  CUexternalMemory __pyx_v_cextMem;
  PyObject *__pyx_v_pextMem = NULL;
  struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_mipmap = 0;
  CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC *__pyx_v_cmipmapDesc_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__815)
  __Pyx_RefNannySetupContext("cuExternalMemoryGetMappedMipmappedArray", 0);
  __Pyx_TraceCall("cuExternalMemoryGetMappedMipmappedArray", __pyx_f[0], 22522, 0, __PYX_ERR(0, 22522, __pyx_L1_error));

  /* "cuda/cuda.pyx":22580
 *     """
 *     cdef ccuda.CUexternalMemory cextMem
 *     if extMem is None:             # <<<<<<<<<<<<<<
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):
 */
  __pyx_t_1 = (__pyx_v_extMem == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22581
 *     cdef ccuda.CUexternalMemory cextMem
 *     if extMem is None:
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(extMem, (CUexternalMemory)):
 *         pextMem = int(extMem)
 */
    __pyx_v_cextMem = ((CUexternalMemory)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22580
 *     """
 *     cdef ccuda.CUexternalMemory cextMem
 *     if extMem is None:             # <<<<<<<<<<<<<<
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22582
 *     if extMem is None:
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):             # <<<<<<<<<<<<<<
 *         pextMem = int(extMem)
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_extMem, __pyx_ptype_4cuda_4cuda_CUexternalMemory); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22583
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):
 *         pextMem = int(extMem)             # <<<<<<<<<<<<<<
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_extMem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pextMem = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22584
 *     elif isinstance(extMem, (CUexternalMemory)):
 *         pextMem = int(extMem)
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem             # <<<<<<<<<<<<<<
 *     else:
 *         pextMem = int(CUexternalMemory(extMem))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pextMem); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22584, __pyx_L1_error)
    __pyx_v_cextMem = ((CUexternalMemory)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22582
 *     if extMem is None:
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):             # <<<<<<<<<<<<<<
 *         pextMem = int(extMem)
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22586
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 *     else:
 *         pextMem = int(CUexternalMemory(extMem))             # <<<<<<<<<<<<<<
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalMemory), __pyx_v_extMem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pextMem = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22587
 *     else:
 *         pextMem = int(CUexternalMemory(extMem))
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem             # <<<<<<<<<<<<<<
 * 
 *     cdef CUmipmappedArray mipmap = CUmipmappedArray()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pextMem); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22587, __pyx_L1_error)
    __pyx_v_cextMem = ((CUexternalMemory)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":22589
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 * 
 *     cdef CUmipmappedArray mipmap = CUmipmappedArray()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* cmipmapDesc_ptr = mipmapDesc._ptr if mipmapDesc != None else NULL
 *     err = ccuda.cuExternalMemoryGetMappedMipmappedArray(mipmap._ptr, cextMem, cmipmapDesc_ptr)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_mipmap = ((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":22590
 * 
 *     cdef CUmipmappedArray mipmap = CUmipmappedArray()
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* cmipmapDesc_ptr = mipmapDesc._ptr if mipmapDesc != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuExternalMemoryGetMappedMipmappedArray(mipmap._ptr, cextMem, cmipmapDesc_ptr)
 *     return (CUresult(err), mipmap)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_mipmapDesc), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22590, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 22590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_mipmapDesc->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cmipmapDesc_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":22591
 *     cdef CUmipmappedArray mipmap = CUmipmappedArray()
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* cmipmapDesc_ptr = mipmapDesc._ptr if mipmapDesc != None else NULL
 *     err = ccuda.cuExternalMemoryGetMappedMipmappedArray(mipmap._ptr, cextMem, cmipmapDesc_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), mipmap)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuExternalMemoryGetMappedMipmappedArray(__pyx_v_mipmap->_ptr, __pyx_v_cextMem, __pyx_v_cmipmapDesc_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 22591, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":22592
 *     cdef ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* cmipmapDesc_ptr = mipmapDesc._ptr if mipmapDesc != None else NULL
 *     err = ccuda.cuExternalMemoryGetMappedMipmappedArray(mipmap._ptr, cextMem, cmipmapDesc_ptr)
 *     return (CUresult(err), mipmap)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 22592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_mipmap));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_mipmap));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_mipmap));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":22522
 * 
 * @cython.embedsignature(True)
 * def cuExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC):             # <<<<<<<<<<<<<<
 *     """ Maps a CUDA mipmapped array onto an external memory object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuExternalMemoryGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pextMem);
  __Pyx_XDECREF((PyObject *)__pyx_v_mipmap);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22595
 * 
 * @cython.embedsignature(True)
 * def cuDestroyExternalMemory(extMem):             # <<<<<<<<<<<<<<
 *     """ Destroys an external memory object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_399cuDestroyExternalMemory(PyObject *__pyx_self, PyObject *__pyx_v_extMem); /*proto*/
static char __pyx_doc_4cuda_4cuda_398cuDestroyExternalMemory[] = "cuDestroyExternalMemory(extMem)\n Destroys an external memory object.\n\n    Destroys the specified external memory object. Any existing buffers and\n    CUDA mipmapped arrays mapped onto this object must no longer be used\n    and must be explicitly freed using :py:obj:`~.cuMemFree` and\n    :py:obj:`~.cuMipmappedArrayDestroy` respectively.\n\n    Parameters\n    ----------\n    extMem : :py:obj:`~.CUexternalMemory`\n        External memory object to be destroyed\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuImportExternalMemory`, :py:obj:`~.cuExternalMemoryGetMappedBuffer`, :py:obj:`~.cuExternalMemoryGetMappedMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_399cuDestroyExternalMemory = {"cuDestroyExternalMemory", (PyCFunction)__pyx_pw_4cuda_4cuda_399cuDestroyExternalMemory, METH_O, __pyx_doc_4cuda_4cuda_398cuDestroyExternalMemory};
static PyObject *__pyx_pw_4cuda_4cuda_399cuDestroyExternalMemory(PyObject *__pyx_self, PyObject *__pyx_v_extMem) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDestroyExternalMemory (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_398cuDestroyExternalMemory(__pyx_self, ((PyObject *)__pyx_v_extMem));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_398cuDestroyExternalMemory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extMem) {
  CUexternalMemory __pyx_v_cextMem;
  PyObject *__pyx_v_pextMem = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__816)
  __Pyx_RefNannySetupContext("cuDestroyExternalMemory", 0);
  __Pyx_TraceCall("cuDestroyExternalMemory", __pyx_f[0], 22595, 0, __PYX_ERR(0, 22595, __pyx_L1_error));

  /* "cuda/cuda.pyx":22618
 *     """
 *     cdef ccuda.CUexternalMemory cextMem
 *     if extMem is None:             # <<<<<<<<<<<<<<
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):
 */
  __pyx_t_1 = (__pyx_v_extMem == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22619
 *     cdef ccuda.CUexternalMemory cextMem
 *     if extMem is None:
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(extMem, (CUexternalMemory)):
 *         pextMem = int(extMem)
 */
    __pyx_v_cextMem = ((CUexternalMemory)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22618
 *     """
 *     cdef ccuda.CUexternalMemory cextMem
 *     if extMem is None:             # <<<<<<<<<<<<<<
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22620
 *     if extMem is None:
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):             # <<<<<<<<<<<<<<
 *         pextMem = int(extMem)
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_extMem, __pyx_ptype_4cuda_4cuda_CUexternalMemory); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22621
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):
 *         pextMem = int(extMem)             # <<<<<<<<<<<<<<
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_extMem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pextMem = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22622
 *     elif isinstance(extMem, (CUexternalMemory)):
 *         pextMem = int(extMem)
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem             # <<<<<<<<<<<<<<
 *     else:
 *         pextMem = int(CUexternalMemory(extMem))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pextMem); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22622, __pyx_L1_error)
    __pyx_v_cextMem = ((CUexternalMemory)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22620
 *     if extMem is None:
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>0
 *     elif isinstance(extMem, (CUexternalMemory)):             # <<<<<<<<<<<<<<
 *         pextMem = int(extMem)
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22624
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 *     else:
 *         pextMem = int(CUexternalMemory(extMem))             # <<<<<<<<<<<<<<
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalMemory), __pyx_v_extMem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pextMem = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22625
 *     else:
 *         pextMem = int(CUexternalMemory(extMem))
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuDestroyExternalMemory(cextMem)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pextMem); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22625, __pyx_L1_error)
    __pyx_v_cextMem = ((CUexternalMemory)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":22627
 *         cextMem = <ccuda.CUexternalMemory><void_ptr>pextMem
 * 
 *     err = ccuda.cuDestroyExternalMemory(cextMem)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDestroyExternalMemory(__pyx_v_cextMem); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 22627, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":22628
 * 
 *     err = ccuda.cuDestroyExternalMemory(cextMem)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":22595
 * 
 * @cython.embedsignature(True)
 * def cuDestroyExternalMemory(extMem):             # <<<<<<<<<<<<<<
 *     """ Destroys an external memory object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDestroyExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pextMem);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22631
 * 
 * @cython.embedsignature(True)
 * def cuImportExternalSemaphore(semHandleDesc : CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC):             # <<<<<<<<<<<<<<
 *     """ Imports an external semaphore.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_401cuImportExternalSemaphore(PyObject *__pyx_self, PyObject *__pyx_v_semHandleDesc); /*proto*/
static char __pyx_doc_4cuda_4cuda_400cuImportExternalSemaphore[] = "cuImportExternalSemaphore(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC semHandleDesc: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC)\n Imports an external semaphore.\n\n    Imports an externally allocated synchronization object and returns a\n    handle to that in `extSem_out`.\n\n    The properties of the handle being imported must be described in\n    `semHandleDesc`. The :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC` is\n    defined as follows:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` specifies\n    the type of handle being imported.\n    :py:obj:`~.CUexternalSemaphoreHandleType` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD`, then\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::fd must be a\n    valid file descriptor referencing a synchronization object. Ownership\n    of the file descriptor is transferred to the CUDA driver when the\n    handle is imported successfully. Performing any operations on the file\n    descriptor after it is imported results in undefined behavior.\n\n    If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32`, then\n    exactly one of\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle\n    and\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name\n    must not be NULL. If\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle\n    is not NULL, then it must represent a valid shared NT handle that\n    references a synchronization object. Ownership of this handle is not\n    transferred to CUDA after the import operation, so the application must\n    release the handle using the appropriate system call. If\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::han""dle::win32::name is\n    not NULL, then it must name a valid synchronization object.\n\n    If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT`, then\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle\n    must be non-NULL and\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name\n    must be NULL. The handle specified must be a globally shared KMT\n    handle. This handle does not hold a reference to the underlying object,\n    and thus will be invalid when all references to the synchronization\n    object are destroyed.\n\n    If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE`, then exactly\n    one of\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle\n    and\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name\n    must not be NULL. If\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle\n    is not NULL, then it must represent a valid shared NT handle that is\n    returned by ID3D12Device::CreateSharedHandle when referring to a\n    ID3D12Fence object. This handle holds a reference to the underlying\n    object. If\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is\n    not NULL, then it must name a valid synchronization object that refers\n    to a valid ID3D12Fence object.\n\n    If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE`, then\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle\n    represents a valid shared NT handle that is returned by\n    ID3D11Fence::CreateSharedHandle. If\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is\n    not NULL, then it must name a valid synchronization object that refers\n    to a valid ID3D11Fence object.\n\n    If :p""y:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`, then\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::nvSciSyncObj\n    represents a valid NvSciSyncObj.\n\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX`, then\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle\n    represents a valid shared NT handle that is returned by\n    IDXGIResource1::CreateSharedHandle when referring to a IDXGIKeyedMutex\n    object. If\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is\n    not NULL, then it must name a valid synchronization object that refers\n    to a valid IDXGIKeyedMutex object.\n\n    If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT`,\n    then\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle\n    represents a valid shared KMT handle that is returned by\n    IDXGIResource::GetSharedHandle when referring to a IDXGIKeyedMutex\n    object and\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name\n    must be NULL.\n\n    If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD`,\n    then :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::fd must\n    be a valid file descriptor referencing a synchronization object.\n    Ownership of the file descriptor is transferred to the CUDA driver when\n    the handle is imported successfully. Performing any operations on the\n    file descriptor after it is imported results in undefined behavior.\n\n    If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32`,\n    then exactly one of\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle\n    and\n    :py:obj:`~.CUDA_EXTERNAL_SEMAP""HORE_HANDLE_DESC`::handle::win32::name\n    must not be NULL. If\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle\n    is not NULL, then it must represent a valid shared NT handle that\n    references a synchronization object. Ownership of this handle is not\n    transferred to CUDA after the import operation, so the application must\n    release the handle using the appropriate system call. If\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is\n    not NULL, then it must name a valid synchronization object.\n\n    Parameters\n    ----------\n    semHandleDesc : :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`\n        Semaphore import handle descriptor\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n    extSem_out : :py:obj:`~.CUexternalSemaphore`\n        Returned handle to an external semaphore\n\n    See Also\n    --------\n    :py:obj:`~.cuDestroyExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_401cuImportExternalSemaphore = {"cuImportExternalSemaphore", (PyCFunction)__pyx_pw_4cuda_4cuda_401cuImportExternalSemaphore, METH_O, __pyx_doc_4cuda_4cuda_400cuImportExternalSemaphore};
static PyObject *__pyx_pw_4cuda_4cuda_401cuImportExternalSemaphore(PyObject *__pyx_self, PyObject *__pyx_v_semHandleDesc) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuImportExternalSemaphore (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_semHandleDesc), __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC, 1, "semHandleDesc", 0))) __PYX_ERR(0, 22631, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_400cuImportExternalSemaphore(__pyx_self, ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC *)__pyx_v_semHandleDesc));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_400cuImportExternalSemaphore(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC *__pyx_v_semHandleDesc) {
  struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *__pyx_v_extSem_out = 0;
  CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC *__pyx_v_csemHandleDesc_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *__pyx_t_2;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__817)
  __Pyx_RefNannySetupContext("cuImportExternalSemaphore", 0);
  __Pyx_TraceCall("cuImportExternalSemaphore", __pyx_f[0], 22631, 0, __PYX_ERR(0, 22631, __pyx_L1_error));

  /* "cuda/cuda.pyx":22770
 *     :py:obj:`~.cuDestroyExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`
 *     """
 *     cdef CUexternalSemaphore extSem_out = CUexternalSemaphore()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* csemHandleDesc_ptr = semHandleDesc._ptr if semHandleDesc != None else NULL
 *     err = ccuda.cuImportExternalSemaphore(extSem_out._ptr, csemHandleDesc_ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalSemaphore)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_extSem_out = ((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":22771
 *     """
 *     cdef CUexternalSemaphore extSem_out = CUexternalSemaphore()
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* csemHandleDesc_ptr = semHandleDesc._ptr if semHandleDesc != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuImportExternalSemaphore(extSem_out._ptr, csemHandleDesc_ptr)
 *     return (CUresult(err), extSem_out)
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_semHandleDesc), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22771, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 22771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_2 = __pyx_v_semHandleDesc->__pyx_base._ptr;
  } else {
    __pyx_t_2 = NULL;
  }
  __pyx_v_csemHandleDesc_ptr = __pyx_t_2;

  /* "cuda/cuda.pyx":22772
 *     cdef CUexternalSemaphore extSem_out = CUexternalSemaphore()
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* csemHandleDesc_ptr = semHandleDesc._ptr if semHandleDesc != None else NULL
 *     err = ccuda.cuImportExternalSemaphore(extSem_out._ptr, csemHandleDesc_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), extSem_out)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuImportExternalSemaphore(__pyx_v_extSem_out->_ptr, __pyx_v_csemHandleDesc_ptr); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 22772, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":22773
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* csemHandleDesc_ptr = semHandleDesc._ptr if semHandleDesc != None else NULL
 *     err = ccuda.cuImportExternalSemaphore(extSem_out._ptr, csemHandleDesc_ptr)
 *     return (CUresult(err), extSem_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 22773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_extSem_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_extSem_out));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_extSem_out));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":22631
 * 
 * @cython.embedsignature(True)
 * def cuImportExternalSemaphore(semHandleDesc : CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC):             # <<<<<<<<<<<<<<
 *     """ Imports an external semaphore.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuImportExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_extSem_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22776
 * 
 * @cython.embedsignature(True)
 * def cuSignalExternalSemaphoresAsync(extSemArray : List[CUexternalSemaphore], paramsArray : List[CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS], unsigned int numExtSems, stream):             # <<<<<<<<<<<<<<
 *     """ Signals a set of external semaphore objects.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_403cuSignalExternalSemaphoresAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_402cuSignalExternalSemaphoresAsync[] = "cuSignalExternalSemaphoresAsync(extSemArray: List[CUexternalSemaphore], paramsArray: List[CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS], unsigned int numExtSems, stream)\n Signals a set of external semaphore objects.\n\n    Enqueues a signal operation on a set of externally allocated semaphore\n    object in the specified stream. The operations will be executed when\n    all prior operations in the stream complete.\n\n    The exact semantics of signaling a semaphore depends on the type of the\n    object.\n\n    If the semaphore object is any one of the following types:\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD`,\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32`,\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT` then\n    signaling the semaphore will set it to the signaled state.\n\n    If the semaphore object is any one of the following types:\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE`,\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE`,\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD`,\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32`\n    then the semaphore will be set to the value specified in\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`::params::fence::value.\n\n    If the semaphore object is of the type\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC` this API sets\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`::params::nvSciSync::fence\n    to a value that can be used by subsequent waiters of the same NvSciSync\n    object to order operations with those currently submitted in `stream`.\n    Such an update will overwrite previous contents of\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`::params::nvSciSync::fence.\n    By default, signaling such an external semaphore object causes\n    appropriate memory synchronization operations to be performed over all\n    external memory objects that are importe""d as\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`. This ensures that\n    any subsequent accesses made by other importers of the same set of\n    NvSciBuf memory object(s) are coherent. These operations can be skipped\n    by specifying the flag\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC`, which\n    can be used as a performance optimization when data coherency is not\n    required. But specifying this flag in scenarios where data coherency is\n    required results in undefined behavior. Also, for semaphore object of\n    the type :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`, if\n    the NvSciSyncAttrList used to create the NvSciSyncObj had not set the\n    flags in :py:obj:`~.cuDeviceGetNvSciSyncAttributes` to\n    CUDA_NVSCISYNC_ATTR_SIGNAL, this API will return\n    CUDA_ERROR_NOT_SUPPORTED.\n\n    If the semaphore object is any one of the following types:\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX`,\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT`\n    then the keyed mutex will be released with the key specified in\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_PARAMS`::params::keyedmutex::key.\n\n    Parameters\n    ----------\n    extSemArray : List[:py:obj:`~.CUexternalSemaphore`]\n        Set of external semaphores to be signaled\n    paramsArray : List[:py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`]\n        Array of semaphore parameters\n    numExtSems : unsigned int\n        Number of semaphores to signal\n    stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to enqueue the signal operations in\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuDestroyExternalSemaphore`, :py:obj:`~.cuWaitExternalSemaphoresAsync`""\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_403cuSignalExternalSemaphoresAsync = {"cuSignalExternalSemaphoresAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_403cuSignalExternalSemaphoresAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_402cuSignalExternalSemaphoresAsync};
static PyObject *__pyx_pw_4cuda_4cuda_403cuSignalExternalSemaphoresAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_extSemArray = 0;
  PyObject *__pyx_v_paramsArray = 0;
  unsigned int __pyx_v_numExtSems;
  PyObject *__pyx_v_stream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuSignalExternalSemaphoresAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_extSemArray_2,&__pyx_n_s_paramsArray_2,&__pyx_n_s_numExtSems_2,&__pyx_n_s_stream,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extSemArray_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paramsArray_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuSignalExternalSemaphoresAsync", 1, 4, 4, 1); __PYX_ERR(0, 22776, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numExtSems_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuSignalExternalSemaphoresAsync", 1, 4, 4, 2); __PYX_ERR(0, 22776, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuSignalExternalSemaphoresAsync", 1, 4, 4, 3); __PYX_ERR(0, 22776, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuSignalExternalSemaphoresAsync") < 0)) __PYX_ERR(0, 22776, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_extSemArray = values[0];
    __pyx_v_paramsArray = values[1];
    __pyx_v_numExtSems = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_numExtSems == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 22776, __pyx_L3_error)
    __pyx_v_stream = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuSignalExternalSemaphoresAsync", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 22776, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuSignalExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_402cuSignalExternalSemaphoresAsync(__pyx_self, __pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_2generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":22861
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) for _x in paramsArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_24_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_24_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 22861, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_2generator12, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuSignalExternalSemaphoresAsync, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 22861, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuSignalExternalSemaphoresAsync.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_2generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 22861, 0, __PYX_ERR(0, 22861, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 22861, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray)) { __Pyx_RaiseClosureNameError("paramsArray"); __PYX_ERR(0, 22861, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22861, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 22861, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 22861, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 22861, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 22861, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 22861, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_5generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":22865
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_25_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_25_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 22865, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_5generator13, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuSignalExternalSemaphoresAsync, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 22865, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuSignalExternalSemaphoresAsync.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_5generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 22865, 0, __PYX_ERR(0, 22865, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 22865, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_extSemArray)) { __Pyx_RaiseClosureNameError("extSemArray"); __PYX_ERR(0, 22865, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_extSemArray)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_extSemArray)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_extSemArray; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_extSemArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22865, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 22865, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 22865, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 22865, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 22865, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 22865, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUexternalSemaphore); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22776
 * 
 * @cython.embedsignature(True)
 * def cuSignalExternalSemaphoresAsync(extSemArray : List[CUexternalSemaphore], paramsArray : List[CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS], unsigned int numExtSems, stream):             # <<<<<<<<<<<<<<
 *     """ Signals a set of external semaphore objects.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_402cuSignalExternalSemaphoresAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extSemArray, PyObject *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, PyObject *__pyx_v_stream) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *__pyx_cur_scope;
  CUstream __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  CUexternalSemaphore *__pyx_v_cextSemArray;
  Py_ssize_t __pyx_v_idx;
  CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *__pyx_v_cparamsArray;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_2generator12 = 0;
  PyObject *__pyx_gb_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_5generator13 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  CUexternalSemaphore *__pyx_t_10;
  struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *__pyx_t_11;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__818)
  __Pyx_RefNannySetupContext("cuSignalExternalSemaphoresAsync", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 22776, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuSignalExternalSemaphoresAsync", __pyx_f[0], 22776, 0, __PYX_ERR(0, 22776, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_extSemArray = __pyx_v_extSemArray;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_extSemArray);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_extSemArray);
  __pyx_cur_scope->__pyx_v_paramsArray = __pyx_v_paramsArray;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_paramsArray);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_paramsArray);

  /* "cuda/cuda.pyx":22851
 *     """
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22852
 *     cdef ccuda.CUstream cstream
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22851
 *     """
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22853
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22854
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22855
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(CUstream(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22855, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22853
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22857
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 *         pstream = int(CUstream(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22858
 *     else:
 *         pstream = int(CUstream(stream))
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22858, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":22860
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) for _x in paramsArray):
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS]")
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_paramsArray == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_paramsArray);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_paramsArray;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_paramsArray);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_paramsArray, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":22861
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) for _x in paramsArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS]")
 * 
 */
  __pyx_t_5 = __pyx_pf_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 22861, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":22862
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) for _x in paramsArray):
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS]")             # <<<<<<<<<<<<<<
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__819, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 22862, __pyx_L1_error)

    /* "cuda/cuda.pyx":22861
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) for _x in paramsArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS]")
 * 
 */
  }

  /* "cuda/cuda.pyx":22864
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS]")
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_extSemArray == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_extSemArray);
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_extSemArray;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_extSemArray);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_extSemArray, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":22865
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")
 * 
 */
  __pyx_t_3 = __pyx_pf_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 22865, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cuda/cuda.pyx":22866
 *     extSemArray = [] if extSemArray is None else extSemArray
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUexternalSemaphore* cextSemArray = NULL
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__820, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 22866, __pyx_L1_error)

    /* "cuda/cuda.pyx":22865
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")
 * 
 */
  }

  /* "cuda/cuda.pyx":22868
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")
 * 
 *     cdef ccuda.CUexternalSemaphore* cextSemArray = NULL             # <<<<<<<<<<<<<<
 *     if len(extSemArray) > 0:
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))
 */
  __pyx_v_cextSemArray = NULL;

  /* "cuda/cuda.pyx":22869
 * 
 *     cdef ccuda.CUexternalSemaphore* cextSemArray = NULL
 *     if len(extSemArray) > 0:             # <<<<<<<<<<<<<<
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))
 *         if cextSemArray is NULL:
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_extSemArray;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22869, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22870
 *     cdef ccuda.CUexternalSemaphore* cextSemArray = NULL
 *     if len(extSemArray) > 0:
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))             # <<<<<<<<<<<<<<
 *         if cextSemArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 */
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_extSemArray;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22870, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_cextSemArray = ((CUexternalSemaphore *)calloc(__pyx_t_6, (sizeof(CUexternalSemaphore))));

    /* "cuda/cuda.pyx":22871
 *     if len(extSemArray) > 0:
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))
 *         if cextSemArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_cextSemArray == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "cuda/cuda.pyx":22872
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))
 *         if cextSemArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(extSemArray)):
 */
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_extSemArray;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22872, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUexternalSemaphore))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 22872, __pyx_L1_error)

      /* "cuda/cuda.pyx":22871
 *     if len(extSemArray) > 0:
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))
 *         if cextSemArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":22874
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *         else:
 *             for idx in range(len(extSemArray)):             # <<<<<<<<<<<<<<
 *                 cextSemArray[idx] = (<CUexternalSemaphore>extSemArray[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_extSemArray;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22874, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":22875
 *         else:
 *             for idx in range(len(extSemArray)):
 *                 cextSemArray[idx] = (<CUexternalSemaphore>extSemArray[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* cparamsArray = NULL
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_extSemArray, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22875, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cextSemArray[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":22869
 * 
 *     cdef ccuda.CUexternalSemaphore* cextSemArray = NULL
 *     if len(extSemArray) > 0:             # <<<<<<<<<<<<<<
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))
 *         if cextSemArray is NULL:
 */
  }

  /* "cuda/cuda.pyx":22877
 *                 cextSemArray[idx] = (<CUexternalSemaphore>extSemArray[idx])._ptr[0]
 * 
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* cparamsArray = NULL             # <<<<<<<<<<<<<<
 *     if len(paramsArray) > 0:
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 */
  __pyx_v_cparamsArray = NULL;

  /* "cuda/cuda.pyx":22878
 * 
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* cparamsArray = NULL
 *     if len(paramsArray) > 0:             # <<<<<<<<<<<<<<
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 *         if cparamsArray is NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramsArray;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22879
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* cparamsArray = NULL
 *     if len(paramsArray) > 0:
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))             # <<<<<<<<<<<<<<
 *         if cparamsArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)))
 */
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramsArray;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22879, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_cparamsArray = ((CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *)calloc(__pyx_t_6, (sizeof(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))));

    /* "cuda/cuda.pyx":22880
 *     if len(paramsArray) > 0:
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 *         if cparamsArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)))
 *         for idx in range(len(paramsArray)):
 */
    __pyx_t_1 = ((__pyx_v_cparamsArray == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "cuda/cuda.pyx":22881
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 *         if cparamsArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)))             # <<<<<<<<<<<<<<
 *         for idx in range(len(paramsArray)):
 *             memcpy(&cparamsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>paramsArray[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 */
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramsArray;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22881, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 22881, __pyx_L1_error)

      /* "cuda/cuda.pyx":22880
 *     if len(paramsArray) > 0:
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 *         if cparamsArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)))
 *         for idx in range(len(paramsArray)):
 */
    }

    /* "cuda/cuda.pyx":22882
 *         if cparamsArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)))
 *         for idx in range(len(paramsArray)):             # <<<<<<<<<<<<<<
 *             memcpy(&cparamsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>paramsArray[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 * 
 */
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_paramsArray;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22882, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __pyx_t_6;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_idx = __pyx_t_9;

      /* "cuda/cuda.pyx":22883
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)))
 *         for idx in range(len(paramsArray)):
 *             memcpy(&cparamsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>paramsArray[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))             # <<<<<<<<<<<<<<
 * 
 *     if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems))
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_paramsArray, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22883, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      (void)(memcpy((&(__pyx_v_cparamsArray[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *)__pyx_t_3)->__pyx_base._ptr, (sizeof(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }

    /* "cuda/cuda.pyx":22878
 * 
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* cparamsArray = NULL
 *     if len(paramsArray) > 0:             # <<<<<<<<<<<<<<
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 *         if cparamsArray is NULL:
 */
  }

  /* "cuda/cuda.pyx":22885
 *             memcpy(&cparamsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>paramsArray[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))
 * 
 *     if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems))             # <<<<<<<<<<<<<<
 *     if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems))
 *     err = ccuda.cuSignalExternalSemaphoresAsync((<CUexternalSemaphore>extSemArray[0])._ptr if len(extSemArray) == 1 else cextSemArray, (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numExtSems, cstream)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_extSemArray;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = ((__pyx_v_numExtSems > __pyx_t_6) != 0);
  if (unlikely(__pyx_t_1)) {
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_extSemArray;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22885, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_kp_u__660); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numExtSems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 22885, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":22886
 * 
 *     if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems))
 *     if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuSignalExternalSemaphoresAsync((<CUexternalSemaphore>extSemArray[0])._ptr if len(extSemArray) == 1 else cextSemArray, (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numExtSems, cstream)
 *     if cextSemArray is not NULL:
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_paramsArray;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = ((__pyx_v_numExtSems > __pyx_t_6) != 0);
  if (unlikely(__pyx_t_1)) {
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_paramsArray;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22886, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u__660); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numExtSems); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 22886, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":22887
 *     if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems))
 *     if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems))
 *     err = ccuda.cuSignalExternalSemaphoresAsync((<CUexternalSemaphore>extSemArray[0])._ptr if len(extSemArray) == 1 else cextSemArray, (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numExtSems, cstream)             # <<<<<<<<<<<<<<
 *     if cextSemArray is not NULL:
 *         free(cextSemArray)
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_extSemArray;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22887, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_extSemArray, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_t_7)->_ptr;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cextSemArray;
  }
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramsArray;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22887, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_paramsArray, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_11 = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *)__pyx_t_7)->__pyx_base._ptr;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __pyx_t_11 = __pyx_v_cparamsArray;
  }
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuSignalExternalSemaphoresAsync(__pyx_t_10, __pyx_t_11, __pyx_v_numExtSems, __pyx_v_cstream); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 22887, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":22888
 *     if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems))
 *     err = ccuda.cuSignalExternalSemaphoresAsync((<CUexternalSemaphore>extSemArray[0])._ptr if len(extSemArray) == 1 else cextSemArray, (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numExtSems, cstream)
 *     if cextSemArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cextSemArray)
 *     if cparamsArray is not NULL:
 */
  __pyx_t_1 = ((__pyx_v_cextSemArray != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22889
 *     err = ccuda.cuSignalExternalSemaphoresAsync((<CUexternalSemaphore>extSemArray[0])._ptr if len(extSemArray) == 1 else cextSemArray, (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numExtSems, cstream)
 *     if cextSemArray is not NULL:
 *         free(cextSemArray)             # <<<<<<<<<<<<<<
 *     if cparamsArray is not NULL:
 *         free(cparamsArray)
 */
    free(__pyx_v_cextSemArray);

    /* "cuda/cuda.pyx":22888
 *     if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems))
 *     err = ccuda.cuSignalExternalSemaphoresAsync((<CUexternalSemaphore>extSemArray[0])._ptr if len(extSemArray) == 1 else cextSemArray, (<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numExtSems, cstream)
 *     if cextSemArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cextSemArray)
 *     if cparamsArray is not NULL:
 */
  }

  /* "cuda/cuda.pyx":22890
 *     if cextSemArray is not NULL:
 *         free(cextSemArray)
 *     if cparamsArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cparamsArray)
 *     return (CUresult(err),)
 */
  __pyx_t_1 = ((__pyx_v_cparamsArray != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22891
 *         free(cextSemArray)
 *     if cparamsArray is not NULL:
 *         free(cparamsArray)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
    free(__pyx_v_cparamsArray);

    /* "cuda/cuda.pyx":22890
 *     if cextSemArray is not NULL:
 *         free(cextSemArray)
 *     if cparamsArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cparamsArray)
 *     return (CUresult(err),)
 */
  }

  /* "cuda/cuda.pyx":22892
 *     if cparamsArray is not NULL:
 *         free(cparamsArray)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_7 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_13, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":22776
 * 
 * @cython.embedsignature(True)
 * def cuSignalExternalSemaphoresAsync(extSemArray : List[CUexternalSemaphore], paramsArray : List[CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS], unsigned int numExtSems, stream):             # <<<<<<<<<<<<<<
 *     """ Signals a set of external semaphore objects.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuSignalExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_2generator12);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_31cuSignalExternalSemaphoresAsync_5generator13);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22895
 * 
 * @cython.embedsignature(True)
 * def cuWaitExternalSemaphoresAsync(extSemArray : List[CUexternalSemaphore], paramsArray : List[CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS], unsigned int numExtSems, stream):             # <<<<<<<<<<<<<<
 *     """ Waits on a set of external semaphore objects.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_405cuWaitExternalSemaphoresAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_404cuWaitExternalSemaphoresAsync[] = "cuWaitExternalSemaphoresAsync(extSemArray: List[CUexternalSemaphore], paramsArray: List[CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS], unsigned int numExtSems, stream)\n Waits on a set of external semaphore objects.\n\n    Enqueues a wait operation on a set of externally allocated semaphore\n    object in the specified stream. The operations will be executed when\n    all prior operations in the stream complete.\n\n    The exact semantics of waiting on a semaphore depends on the type of\n    the object.\n\n    If the semaphore object is any one of the following types:\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD`,\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32`,\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT` then\n    waiting on the semaphore will wait until the semaphore reaches the\n    signaled state. The semaphore will then be reset to the unsignaled\n    state. Therefore for every signal operation, there can only be one wait\n    operation.\n\n    If the semaphore object is any one of the following types:\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE`,\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE`,\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD`,\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32`\n    then waiting on the semaphore will wait until the value of the\n    semaphore is greater than or equal to\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS`::params::fence::value.\n\n    If the semaphore object is of the type\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC` then, waiting\n    on the semaphore will wait until the\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`::params::nvSciSync::fence\n    is signaled by the signaler of the NvSciSyncObj that was associated\n    with this semaphore object. By default, waiting on such an external\n    semaphore object causes appropriate memory synchronization operations""\n    to be performed over all external memory objects that are imported as\n    :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`. This ensures that\n    any subsequent accesses made by other importers of the same set of\n    NvSciBuf memory object(s) are coherent. These operations can be skipped\n    by specifying the flag\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC`, which\n    can be used as a performance optimization when data coherency is not\n    required. But specifying this flag in scenarios where data coherency is\n    required results in undefined behavior. Also, for semaphore object of\n    the type :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`, if\n    the NvSciSyncAttrList used to create the NvSciSyncObj had not set the\n    flags in :py:obj:`~.cuDeviceGetNvSciSyncAttributes` to\n    CUDA_NVSCISYNC_ATTR_WAIT, this API will return\n    CUDA_ERROR_NOT_SUPPORTED.\n\n    If the semaphore object is any one of the following types:\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX`,\n    :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT`\n    then the keyed mutex will be acquired when it is released with the key\n    specified in\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS`::params::keyedmutex::key\n    or until the timeout specified by\n    :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS`::params::keyedmutex::timeoutMs\n    has lapsed. The timeout interval can either be a finite value specified\n    in milliseconds or an infinite value. In case an infinite value is\n    specified the timeout never elapses. The windows INFINITE macro must be\n    used to specify infinite timeout.\n\n    Parameters\n    ----------\n    extSemArray : List[:py:obj:`~.CUexternalSemaphore`]\n        External semaphores to be waited on\n    paramsArray : List[:py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS`]\n        Array of semaphore parameters\n    numExtSems : unsigned int\n        Number of semaphores ""to wait on\n    stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to enqueue the wait operations in\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_TIMEOUT`\n\n    See Also\n    --------\n    :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuDestroyExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_405cuWaitExternalSemaphoresAsync = {"cuWaitExternalSemaphoresAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_405cuWaitExternalSemaphoresAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_404cuWaitExternalSemaphoresAsync};
static PyObject *__pyx_pw_4cuda_4cuda_405cuWaitExternalSemaphoresAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_extSemArray = 0;
  PyObject *__pyx_v_paramsArray = 0;
  unsigned int __pyx_v_numExtSems;
  PyObject *__pyx_v_stream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuWaitExternalSemaphoresAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_extSemArray_2,&__pyx_n_s_paramsArray_2,&__pyx_n_s_numExtSems_2,&__pyx_n_s_stream,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extSemArray_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paramsArray_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuWaitExternalSemaphoresAsync", 1, 4, 4, 1); __PYX_ERR(0, 22895, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numExtSems_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuWaitExternalSemaphoresAsync", 1, 4, 4, 2); __PYX_ERR(0, 22895, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuWaitExternalSemaphoresAsync", 1, 4, 4, 3); __PYX_ERR(0, 22895, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuWaitExternalSemaphoresAsync") < 0)) __PYX_ERR(0, 22895, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_extSemArray = values[0];
    __pyx_v_paramsArray = values[1];
    __pyx_v_numExtSems = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_numExtSems == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 22895, __pyx_L3_error)
    __pyx_v_stream = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuWaitExternalSemaphoresAsync", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 22895, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuWaitExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_404cuWaitExternalSemaphoresAsync(__pyx_self, __pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_2generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":22989
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) for _x in paramsArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_27_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_27_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 22989, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_2generator14, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuWaitExternalSemaphoresAsync_lo, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 22989, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuWaitExternalSemaphoresAsync.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_2generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 22989, 0, __PYX_ERR(0, 22989, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 22989, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray)) { __Pyx_RaiseClosureNameError("paramsArray"); __PYX_ERR(0, 22989, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramsArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22989, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 22989, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 22989, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 22989, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 22989, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 22989, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_5generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":22993
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_28_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_28_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 22993, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_5generator15, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuWaitExternalSemaphoresAsync_lo, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 22993, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuWaitExternalSemaphoresAsync.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_5generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 22993, 0, __PYX_ERR(0, 22993, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 22993, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_extSemArray)) { __Pyx_RaiseClosureNameError("extSemArray"); __PYX_ERR(0, 22993, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_extSemArray)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_extSemArray)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_extSemArray; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_extSemArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22993, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 22993, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 22993, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 22993, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 22993, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 22993, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUexternalSemaphore); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":22895
 * 
 * @cython.embedsignature(True)
 * def cuWaitExternalSemaphoresAsync(extSemArray : List[CUexternalSemaphore], paramsArray : List[CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS], unsigned int numExtSems, stream):             # <<<<<<<<<<<<<<
 *     """ Waits on a set of external semaphore objects.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_404cuWaitExternalSemaphoresAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extSemArray, PyObject *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, PyObject *__pyx_v_stream) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *__pyx_cur_scope;
  CUstream __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  CUexternalSemaphore *__pyx_v_cextSemArray;
  Py_ssize_t __pyx_v_idx;
  CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *__pyx_v_cparamsArray;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_2generator14 = 0;
  PyObject *__pyx_gb_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_5generator15 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  CUexternalSemaphore *__pyx_t_10;
  struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *__pyx_t_11;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__821)
  __Pyx_RefNannySetupContext("cuWaitExternalSemaphoresAsync", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 22895, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuWaitExternalSemaphoresAsync", __pyx_f[0], 22895, 0, __PYX_ERR(0, 22895, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_extSemArray = __pyx_v_extSemArray;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_extSemArray);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_extSemArray);
  __pyx_cur_scope->__pyx_v_paramsArray = __pyx_v_paramsArray;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_paramsArray);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_paramsArray);

  /* "cuda/cuda.pyx":22979
 *     """
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":22980
 *     cdef ccuda.CUstream cstream
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":22979
 *     """
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22981
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22982
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":22983
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(CUstream(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22983, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":22981
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":22985
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 *         pstream = int(CUstream(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":22986
 *     else:
 *         pstream = int(CUstream(stream))
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 22986, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":22988
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) for _x in paramsArray):
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS]")
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_paramsArray == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_paramsArray);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_paramsArray;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_paramsArray);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_paramsArray, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":22989
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) for _x in paramsArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS]")
 * 
 */
  __pyx_t_5 = __pyx_pf_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 22989, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":22990
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) for _x in paramsArray):
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS]")             # <<<<<<<<<<<<<<
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__822, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 22990, __pyx_L1_error)

    /* "cuda/cuda.pyx":22989
 * 
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) for _x in paramsArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS]")
 * 
 */
  }

  /* "cuda/cuda.pyx":22992
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS]")
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_extSemArray == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_extSemArray);
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_extSemArray;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_extSemArray);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_extSemArray, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":22993
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")
 * 
 */
  __pyx_t_3 = __pyx_pf_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 22993, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cuda/cuda.pyx":22994
 *     extSemArray = [] if extSemArray is None else extSemArray
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUexternalSemaphore* cextSemArray = NULL
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__820, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 22994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 22994, __pyx_L1_error)

    /* "cuda/cuda.pyx":22993
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")
 * 
 */
  }

  /* "cuda/cuda.pyx":22996
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")
 * 
 *     cdef ccuda.CUexternalSemaphore* cextSemArray = NULL             # <<<<<<<<<<<<<<
 *     if len(extSemArray) > 0:
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))
 */
  __pyx_v_cextSemArray = NULL;

  /* "cuda/cuda.pyx":22997
 * 
 *     cdef ccuda.CUexternalSemaphore* cextSemArray = NULL
 *     if len(extSemArray) > 0:             # <<<<<<<<<<<<<<
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))
 *         if cextSemArray is NULL:
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_extSemArray;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22997, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":22998
 *     cdef ccuda.CUexternalSemaphore* cextSemArray = NULL
 *     if len(extSemArray) > 0:
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))             # <<<<<<<<<<<<<<
 *         if cextSemArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 */
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_extSemArray;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22998, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_cextSemArray = ((CUexternalSemaphore *)calloc(__pyx_t_6, (sizeof(CUexternalSemaphore))));

    /* "cuda/cuda.pyx":22999
 *     if len(extSemArray) > 0:
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))
 *         if cextSemArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_cextSemArray == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "cuda/cuda.pyx":23000
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))
 *         if cextSemArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(extSemArray)):
 */
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_extSemArray;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23000, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUexternalSemaphore))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 23000, __pyx_L1_error)

      /* "cuda/cuda.pyx":22999
 *     if len(extSemArray) > 0:
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))
 *         if cextSemArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":23002
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(ccuda.CUexternalSemaphore)))
 *         else:
 *             for idx in range(len(extSemArray)):             # <<<<<<<<<<<<<<
 *                 cextSemArray[idx] = (<CUexternalSemaphore>extSemArray[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_extSemArray;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23002, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":23003
 *         else:
 *             for idx in range(len(extSemArray)):
 *                 cextSemArray[idx] = (<CUexternalSemaphore>extSemArray[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* cparamsArray = NULL
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_extSemArray, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23003, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cextSemArray[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":22997
 * 
 *     cdef ccuda.CUexternalSemaphore* cextSemArray = NULL
 *     if len(extSemArray) > 0:             # <<<<<<<<<<<<<<
 *         cextSemArray = <ccuda.CUexternalSemaphore*> calloc(len(extSemArray), sizeof(ccuda.CUexternalSemaphore))
 *         if cextSemArray is NULL:
 */
  }

  /* "cuda/cuda.pyx":23005
 *                 cextSemArray[idx] = (<CUexternalSemaphore>extSemArray[idx])._ptr[0]
 * 
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* cparamsArray = NULL             # <<<<<<<<<<<<<<
 *     if len(paramsArray) > 0:
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 */
  __pyx_v_cparamsArray = NULL;

  /* "cuda/cuda.pyx":23006
 * 
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* cparamsArray = NULL
 *     if len(paramsArray) > 0:             # <<<<<<<<<<<<<<
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 *         if cparamsArray is NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramsArray;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23007
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* cparamsArray = NULL
 *     if len(paramsArray) > 0:
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))             # <<<<<<<<<<<<<<
 *         if cparamsArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)))
 */
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramsArray;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23007, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_cparamsArray = ((CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *)calloc(__pyx_t_6, (sizeof(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))));

    /* "cuda/cuda.pyx":23008
 *     if len(paramsArray) > 0:
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 *         if cparamsArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)))
 *         for idx in range(len(paramsArray)):
 */
    __pyx_t_1 = ((__pyx_v_cparamsArray == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "cuda/cuda.pyx":23009
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 *         if cparamsArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)))             # <<<<<<<<<<<<<<
 *         for idx in range(len(paramsArray)):
 *             memcpy(&cparamsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>paramsArray[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 */
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramsArray;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23009, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23009, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 23009, __pyx_L1_error)

      /* "cuda/cuda.pyx":23008
 *     if len(paramsArray) > 0:
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 *         if cparamsArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)))
 *         for idx in range(len(paramsArray)):
 */
    }

    /* "cuda/cuda.pyx":23010
 *         if cparamsArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)))
 *         for idx in range(len(paramsArray)):             # <<<<<<<<<<<<<<
 *             memcpy(&cparamsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>paramsArray[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 * 
 */
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_paramsArray;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23010, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __pyx_t_6;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_idx = __pyx_t_9;

      /* "cuda/cuda.pyx":23011
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)))
 *         for idx in range(len(paramsArray)):
 *             memcpy(&cparamsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>paramsArray[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))             # <<<<<<<<<<<<<<
 * 
 *     if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems))
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_paramsArray, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23011, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      (void)(memcpy((&(__pyx_v_cparamsArray[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *)__pyx_t_3)->__pyx_base._ptr, (sizeof(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }

    /* "cuda/cuda.pyx":23006
 * 
 *     cdef ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* cparamsArray = NULL
 *     if len(paramsArray) > 0:             # <<<<<<<<<<<<<<
 *         cparamsArray = <ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*> calloc(len(paramsArray), sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 *         if cparamsArray is NULL:
 */
  }

  /* "cuda/cuda.pyx":23013
 *             memcpy(&cparamsArray[idx], (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>paramsArray[idx])._ptr, sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))
 * 
 *     if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems))             # <<<<<<<<<<<<<<
 *     if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems))
 *     err = ccuda.cuWaitExternalSemaphoresAsync((<CUexternalSemaphore>extSemArray[0])._ptr if len(extSemArray) == 1 else cextSemArray, (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numExtSems, cstream)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_extSemArray;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = ((__pyx_v_numExtSems > __pyx_t_6) != 0);
  if (unlikely(__pyx_t_1)) {
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_extSemArray;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23013, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_kp_u__660); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numExtSems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 23013, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":23014
 * 
 *     if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems))
 *     if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuWaitExternalSemaphoresAsync((<CUexternalSemaphore>extSemArray[0])._ptr if len(extSemArray) == 1 else cextSemArray, (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numExtSems, cstream)
 *     if cextSemArray is not NULL:
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_paramsArray;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = ((__pyx_v_numExtSems > __pyx_t_6) != 0);
  if (unlikely(__pyx_t_1)) {
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_paramsArray;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23014, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u__660); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numExtSems); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 23014, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":23015
 *     if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems))
 *     if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems))
 *     err = ccuda.cuWaitExternalSemaphoresAsync((<CUexternalSemaphore>extSemArray[0])._ptr if len(extSemArray) == 1 else cextSemArray, (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numExtSems, cstream)             # <<<<<<<<<<<<<<
 *     if cextSemArray is not NULL:
 *         free(cextSemArray)
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_extSemArray;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_extSemArray, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore *)__pyx_t_7)->_ptr;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cextSemArray;
  }
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramsArray;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_paramsArray, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_11 = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *)__pyx_t_7)->__pyx_base._ptr;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __pyx_t_11 = __pyx_v_cparamsArray;
  }
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuWaitExternalSemaphoresAsync(__pyx_t_10, __pyx_t_11, __pyx_v_numExtSems, __pyx_v_cstream); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23015, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":23016
 *     if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems))
 *     err = ccuda.cuWaitExternalSemaphoresAsync((<CUexternalSemaphore>extSemArray[0])._ptr if len(extSemArray) == 1 else cextSemArray, (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numExtSems, cstream)
 *     if cextSemArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cextSemArray)
 *     if cparamsArray is not NULL:
 */
  __pyx_t_1 = ((__pyx_v_cextSemArray != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23017
 *     err = ccuda.cuWaitExternalSemaphoresAsync((<CUexternalSemaphore>extSemArray[0])._ptr if len(extSemArray) == 1 else cextSemArray, (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numExtSems, cstream)
 *     if cextSemArray is not NULL:
 *         free(cextSemArray)             # <<<<<<<<<<<<<<
 *     if cparamsArray is not NULL:
 *         free(cparamsArray)
 */
    free(__pyx_v_cextSemArray);

    /* "cuda/cuda.pyx":23016
 *     if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems))
 *     err = ccuda.cuWaitExternalSemaphoresAsync((<CUexternalSemaphore>extSemArray[0])._ptr if len(extSemArray) == 1 else cextSemArray, (<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS>paramsArray[0])._ptr if len(paramsArray) == 1 else cparamsArray, numExtSems, cstream)
 *     if cextSemArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cextSemArray)
 *     if cparamsArray is not NULL:
 */
  }

  /* "cuda/cuda.pyx":23018
 *     if cextSemArray is not NULL:
 *         free(cextSemArray)
 *     if cparamsArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cparamsArray)
 *     return (CUresult(err),)
 */
  __pyx_t_1 = ((__pyx_v_cparamsArray != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23019
 *         free(cextSemArray)
 *     if cparamsArray is not NULL:
 *         free(cparamsArray)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
    free(__pyx_v_cparamsArray);

    /* "cuda/cuda.pyx":23018
 *     if cextSemArray is not NULL:
 *         free(cextSemArray)
 *     if cparamsArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cparamsArray)
 *     return (CUresult(err),)
 */
  }

  /* "cuda/cuda.pyx":23020
 *     if cparamsArray is not NULL:
 *         free(cparamsArray)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_7 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_13, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":22895
 * 
 * @cython.embedsignature(True)
 * def cuWaitExternalSemaphoresAsync(extSemArray : List[CUexternalSemaphore], paramsArray : List[CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS], unsigned int numExtSems, stream):             # <<<<<<<<<<<<<<
 *     """ Waits on a set of external semaphore objects.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuWaitExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_2generator14);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_29cuWaitExternalSemaphoresAsync_5generator15);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23023
 * 
 * @cython.embedsignature(True)
 * def cuDestroyExternalSemaphore(extSem):             # <<<<<<<<<<<<<<
 *     """ Destroys an external semaphore.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_407cuDestroyExternalSemaphore(PyObject *__pyx_self, PyObject *__pyx_v_extSem); /*proto*/
static char __pyx_doc_4cuda_4cuda_406cuDestroyExternalSemaphore[] = "cuDestroyExternalSemaphore(extSem)\n Destroys an external semaphore.\n\n    Destroys an external semaphore object and releases any references to\n    the underlying resource. Any outstanding signals or waits must have\n    completed before the semaphore is destroyed.\n\n    Parameters\n    ----------\n    extSem : :py:obj:`~.CUexternalSemaphore`\n        External semaphore to be destroyed\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_407cuDestroyExternalSemaphore = {"cuDestroyExternalSemaphore", (PyCFunction)__pyx_pw_4cuda_4cuda_407cuDestroyExternalSemaphore, METH_O, __pyx_doc_4cuda_4cuda_406cuDestroyExternalSemaphore};
static PyObject *__pyx_pw_4cuda_4cuda_407cuDestroyExternalSemaphore(PyObject *__pyx_self, PyObject *__pyx_v_extSem) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDestroyExternalSemaphore (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_406cuDestroyExternalSemaphore(__pyx_self, ((PyObject *)__pyx_v_extSem));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_406cuDestroyExternalSemaphore(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extSem) {
  CUexternalSemaphore __pyx_v_cextSem;
  PyObject *__pyx_v_pextSem = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__823)
  __Pyx_RefNannySetupContext("cuDestroyExternalSemaphore", 0);
  __Pyx_TraceCall("cuDestroyExternalSemaphore", __pyx_f[0], 23023, 0, __PYX_ERR(0, 23023, __pyx_L1_error));

  /* "cuda/cuda.pyx":23045
 *     """
 *     cdef ccuda.CUexternalSemaphore cextSem
 *     if extSem is None:             # <<<<<<<<<<<<<<
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>0
 *     elif isinstance(extSem, (CUexternalSemaphore)):
 */
  __pyx_t_1 = (__pyx_v_extSem == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23046
 *     cdef ccuda.CUexternalSemaphore cextSem
 *     if extSem is None:
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(extSem, (CUexternalSemaphore)):
 *         pextSem = int(extSem)
 */
    __pyx_v_cextSem = ((CUexternalSemaphore)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23045
 *     """
 *     cdef ccuda.CUexternalSemaphore cextSem
 *     if extSem is None:             # <<<<<<<<<<<<<<
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>0
 *     elif isinstance(extSem, (CUexternalSemaphore)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23047
 *     if extSem is None:
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>0
 *     elif isinstance(extSem, (CUexternalSemaphore)):             # <<<<<<<<<<<<<<
 *         pextSem = int(extSem)
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>pextSem
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_extSem, __pyx_ptype_4cuda_4cuda_CUexternalSemaphore); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23048
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>0
 *     elif isinstance(extSem, (CUexternalSemaphore)):
 *         pextSem = int(extSem)             # <<<<<<<<<<<<<<
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>pextSem
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_extSem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pextSem = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23049
 *     elif isinstance(extSem, (CUexternalSemaphore)):
 *         pextSem = int(extSem)
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>pextSem             # <<<<<<<<<<<<<<
 *     else:
 *         pextSem = int(CUexternalSemaphore(extSem))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pextSem); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23049, __pyx_L1_error)
    __pyx_v_cextSem = ((CUexternalSemaphore)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23047
 *     if extSem is None:
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>0
 *     elif isinstance(extSem, (CUexternalSemaphore)):             # <<<<<<<<<<<<<<
 *         pextSem = int(extSem)
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>pextSem
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23051
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>pextSem
 *     else:
 *         pextSem = int(CUexternalSemaphore(extSem))             # <<<<<<<<<<<<<<
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>pextSem
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalSemaphore), __pyx_v_extSem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pextSem = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23052
 *     else:
 *         pextSem = int(CUexternalSemaphore(extSem))
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>pextSem             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuDestroyExternalSemaphore(cextSem)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pextSem); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23052, __pyx_L1_error)
    __pyx_v_cextSem = ((CUexternalSemaphore)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":23054
 *         cextSem = <ccuda.CUexternalSemaphore><void_ptr>pextSem
 * 
 *     err = ccuda.cuDestroyExternalSemaphore(cextSem)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDestroyExternalSemaphore(__pyx_v_cextSem); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23054, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":23055
 * 
 *     err = ccuda.cuDestroyExternalSemaphore(cextSem)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23023
 * 
 * @cython.embedsignature(True)
 * def cuDestroyExternalSemaphore(extSem):             # <<<<<<<<<<<<<<
 *     """ Destroys an external semaphore.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDestroyExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pextSem);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23058
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue32(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_409cuStreamWaitValue32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_408cuStreamWaitValue32[] = "cuStreamWaitValue32(stream, addr, value, unsigned int flags)\n Wait on a memory location.\n\n    Enqueues a synchronization of the stream on the given memory location.\n    Work ordered after the operation will block until the given condition\n    on the memory is satisfied. By default, the condition is to wait for\n    (int32_t)(*addr - value) >= 0, a cyclic greater-or-equal. Other\n    condition types can be specified via `flags`.\n\n    If the memory was registered via :py:obj:`~.cuMemHostRegister()`, the\n    device pointer should be obtained with\n    :py:obj:`~.cuMemHostGetDevicePointer()`. This function cannot be used\n    with managed memory (:py:obj:`~.cuMemAllocManaged`).\n\n    Support for this can be queried with :py:obj:`~.cuDeviceGetAttribute()`\n    and :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS`.\n\n    Support for CU_STREAM_WAIT_VALUE_NOR can be queried with\n    :py:obj:`~.cuDeviceGetAttribute()` and\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR`.\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream to synchronize on the memory location.\n    addr : :py:obj:`~.CUdeviceptr`\n        The memory location to wait on.\n    value : Any\n        The value to compare with the memory location.\n    flags : unsigned int\n        See :py:obj:`~.CUstreamWaitValue_flags`.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamWaitValue64`, :py:obj:`~.cuStreamWriteValue32`, :py:obj:`~.cuStreamWriteValue64`, :py:obj:`~.cuStreamBatchMemOp`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuStreamWaitEvent`\n\n    Notes\n    -----\n    Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this A""PI should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_409cuStreamWaitValue32 = {"cuStreamWaitValue32", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_409cuStreamWaitValue32, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_408cuStreamWaitValue32};
static PyObject *__pyx_pw_4cuda_4cuda_409cuStreamWaitValue32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_v_addr = 0;
  PyObject *__pyx_v_value = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamWaitValue32 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_addr,&__pyx_n_s_value,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_addr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue32", 1, 4, 4, 1); __PYX_ERR(0, 23058, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue32", 1, 4, 4, 2); __PYX_ERR(0, 23058, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue32", 1, 4, 4, 3); __PYX_ERR(0, 23058, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamWaitValue32") < 0)) __PYX_ERR(0, 23058, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_stream = values[0];
    __pyx_v_addr = values[1];
    __pyx_v_value = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23058, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23058, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamWaitValue32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_408cuStreamWaitValue32(__pyx_self, __pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_408cuStreamWaitValue32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags) {
  cuuint32_t __pyx_v_cvalue;
  PyObject *__pyx_v_pvalue = NULL;
  CUdeviceptr __pyx_v_caddr;
  PyObject *__pyx_v_paddr = NULL;
  CUstream __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__824)
  __Pyx_RefNannySetupContext("cuStreamWaitValue32", 0);
  __Pyx_TraceCall("cuStreamWaitValue32", __pyx_f[0], 23058, 0, __PYX_ERR(0, 23058, __pyx_L1_error));

  /* "cuda/cuda.pyx":23104
 *     """
 *     cdef ccuda.cuuint32_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23105
 *     cdef ccuda.cuuint32_t cvalue
 *     if value is None:
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(value, (cuuint32_t)):
 *         pvalue = int(value)
 */
    __pyx_v_cvalue = ((cuuint32_t)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23104
 *     """
 *     cdef ccuda.cuuint32_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23106
 *     if value is None:
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4cuda_4cuda_cuuint32_t); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23107
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):
 *         pvalue = int(value)             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23108
 *     elif isinstance(value, (cuuint32_t)):
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 *     else:
 *         pvalue = int(cuuint32_t(value))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23108, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint32_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23106
 *     if value is None:
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23110
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 *     else:
 *         pvalue = int(cuuint32_t(value))             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint32_t), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvalue = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23111
 *     else:
 *         pvalue = int(cuuint32_t(value))
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr caddr
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23111, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint32_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":23114
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_addr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23115
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 */
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23114
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23116
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_addr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23117
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_paddr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23118
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23118, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23116
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23120
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 *         paddr = int(CUdeviceptr(addr))             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_paddr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23121
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream cstream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23121, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":23124
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23125
 *     cdef ccuda.CUstream cstream
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23124
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23126
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23127
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23128
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(CUstream(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23128, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23126
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23130
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 *         pstream = int(CUstream(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23131
 *     else:
 *         pstream = int(CUstream(stream))
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamWaitValue32(cstream, caddr, cvalue, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23131, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":23133
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 *     err = ccuda.cuStreamWaitValue32(cstream, caddr, cvalue, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamWaitValue32(__pyx_v_cstream, __pyx_v_caddr, __pyx_v_cvalue, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23133, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":23134
 * 
 *     err = ccuda.cuStreamWaitValue32(cstream, caddr, cvalue, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23058
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue32(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamWaitValue32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvalue);
  __Pyx_XDECREF(__pyx_v_paddr);
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23137
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue64(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_411cuStreamWaitValue64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_410cuStreamWaitValue64[] = "cuStreamWaitValue64(stream, addr, value, unsigned int flags)\n Wait on a memory location.\n\n    Enqueues a synchronization of the stream on the given memory location.\n    Work ordered after the operation will block until the given condition\n    on the memory is satisfied. By default, the condition is to wait for\n    (int64_t)(*addr - value) >= 0, a cyclic greater-or-equal. Other\n    condition types can be specified via `flags`.\n\n    If the memory was registered via :py:obj:`~.cuMemHostRegister()`, the\n    device pointer should be obtained with\n    :py:obj:`~.cuMemHostGetDevicePointer()`.\n\n    Support for this can be queried with :py:obj:`~.cuDeviceGetAttribute()`\n    and :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS`.\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream to synchronize on the memory location.\n    addr : :py:obj:`~.CUdeviceptr`\n        The memory location to wait on.\n    value : Any\n        The value to compare with the memory location.\n    flags : unsigned int\n        See :py:obj:`~.CUstreamWaitValue_flags`.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamWaitValue32`, :py:obj:`~.cuStreamWriteValue32`, :py:obj:`~.cuStreamWriteValue64`, :py:obj:`~.cuStreamBatchMemOp`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuStreamWaitEvent`\n\n    Notes\n    -----\n    Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(ht""tps://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_411cuStreamWaitValue64 = {"cuStreamWaitValue64", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_411cuStreamWaitValue64, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_410cuStreamWaitValue64};
static PyObject *__pyx_pw_4cuda_4cuda_411cuStreamWaitValue64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_v_addr = 0;
  PyObject *__pyx_v_value = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamWaitValue64 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_addr,&__pyx_n_s_value,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_addr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue64", 1, 4, 4, 1); __PYX_ERR(0, 23137, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue64", 1, 4, 4, 2); __PYX_ERR(0, 23137, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue64", 1, 4, 4, 3); __PYX_ERR(0, 23137, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamWaitValue64") < 0)) __PYX_ERR(0, 23137, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_stream = values[0];
    __pyx_v_addr = values[1];
    __pyx_v_value = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23137, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23137, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamWaitValue64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_410cuStreamWaitValue64(__pyx_self, __pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_410cuStreamWaitValue64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags) {
  cuuint64_t __pyx_v_cvalue;
  PyObject *__pyx_v_pvalue = NULL;
  CUdeviceptr __pyx_v_caddr;
  PyObject *__pyx_v_paddr = NULL;
  CUstream __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__825)
  __Pyx_RefNannySetupContext("cuStreamWaitValue64", 0);
  __Pyx_TraceCall("cuStreamWaitValue64", __pyx_f[0], 23137, 0, __PYX_ERR(0, 23137, __pyx_L1_error));

  /* "cuda/cuda.pyx":23178
 *     """
 *     cdef ccuda.cuuint64_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23179
 *     cdef ccuda.cuuint64_t cvalue
 *     if value is None:
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(value, (cuuint64_t)):
 *         pvalue = int(value)
 */
    __pyx_v_cvalue = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23178
 *     """
 *     cdef ccuda.cuuint64_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23180
 *     if value is None:
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4cuda_4cuda_cuuint64_t); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23181
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):
 *         pvalue = int(value)             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23182
 *     elif isinstance(value, (cuuint64_t)):
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 *     else:
 *         pvalue = int(cuuint64_t(value))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23182, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23180
 *     if value is None:
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23184
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 *     else:
 *         pvalue = int(cuuint64_t(value))             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvalue = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23185
 *     else:
 *         pvalue = int(cuuint64_t(value))
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr caddr
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23185, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":23188
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_addr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23189
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 */
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23188
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23190
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_addr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23191
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_paddr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23192
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23192, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23190
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23194
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 *         paddr = int(CUdeviceptr(addr))             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_paddr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23195
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream cstream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23195, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":23198
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23199
 *     cdef ccuda.CUstream cstream
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23198
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23200
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23201
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23202
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(CUstream(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23202, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23200
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23204
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 *         pstream = int(CUstream(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23205
 *     else:
 *         pstream = int(CUstream(stream))
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamWaitValue64(cstream, caddr, cvalue, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23205, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":23207
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 *     err = ccuda.cuStreamWaitValue64(cstream, caddr, cvalue, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamWaitValue64(__pyx_v_cstream, __pyx_v_caddr, __pyx_v_cvalue, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23207, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":23208
 * 
 *     err = ccuda.cuStreamWaitValue64(cstream, caddr, cvalue, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23137
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue64(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamWaitValue64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvalue);
  __Pyx_XDECREF(__pyx_v_paddr);
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23211
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue32(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_413cuStreamWriteValue32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_412cuStreamWriteValue32[] = "cuStreamWriteValue32(stream, addr, value, unsigned int flags)\n Write a value to memory.\n\n    Write a value to memory. Unless the\n    :py:obj:`~.CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER` flag is passed, the\n    write is preceded by a system-wide memory fence, equivalent to a\n    __threadfence_system() but scoped to the stream rather than a CUDA\n    thread.\n\n    If the memory was registered via :py:obj:`~.cuMemHostRegister()`, the\n    device pointer should be obtained with\n    :py:obj:`~.cuMemHostGetDevicePointer()`. This function cannot be used\n    with managed memory (:py:obj:`~.cuMemAllocManaged`).\n\n    Support for this can be queried with :py:obj:`~.cuDeviceGetAttribute()`\n    and :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS`.\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream to do the write in.\n    addr : :py:obj:`~.CUdeviceptr`\n        The device address to write to.\n    value : Any\n        The value to write.\n    flags : unsigned int\n        See :py:obj:`~.CUstreamWriteValue_flags`.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamWriteValue64`, :py:obj:`~.cuStreamWaitValue32`, :py:obj:`~.cuStreamWaitValue64`, :py:obj:`~.cuStreamBatchMemOp`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuEventRecord`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_413cuStreamWriteValue32 = {"cuStreamWriteValue32", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_413cuStreamWriteValue32, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_412cuStreamWriteValue32};
static PyObject *__pyx_pw_4cuda_4cuda_413cuStreamWriteValue32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_v_addr = 0;
  PyObject *__pyx_v_value = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamWriteValue32 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_addr,&__pyx_n_s_value,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_addr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue32", 1, 4, 4, 1); __PYX_ERR(0, 23211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue32", 1, 4, 4, 2); __PYX_ERR(0, 23211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue32", 1, 4, 4, 3); __PYX_ERR(0, 23211, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamWriteValue32") < 0)) __PYX_ERR(0, 23211, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_stream = values[0];
    __pyx_v_addr = values[1];
    __pyx_v_value = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23211, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23211, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamWriteValue32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_412cuStreamWriteValue32(__pyx_self, __pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_412cuStreamWriteValue32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags) {
  cuuint32_t __pyx_v_cvalue;
  PyObject *__pyx_v_pvalue = NULL;
  CUdeviceptr __pyx_v_caddr;
  PyObject *__pyx_v_paddr = NULL;
  CUstream __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__826)
  __Pyx_RefNannySetupContext("cuStreamWriteValue32", 0);
  __Pyx_TraceCall("cuStreamWriteValue32", __pyx_f[0], 23211, 0, __PYX_ERR(0, 23211, __pyx_L1_error));

  /* "cuda/cuda.pyx":23249
 *     """
 *     cdef ccuda.cuuint32_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23250
 *     cdef ccuda.cuuint32_t cvalue
 *     if value is None:
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(value, (cuuint32_t)):
 *         pvalue = int(value)
 */
    __pyx_v_cvalue = ((cuuint32_t)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23249
 *     """
 *     cdef ccuda.cuuint32_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23251
 *     if value is None:
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4cuda_4cuda_cuuint32_t); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23252
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):
 *         pvalue = int(value)             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23253
 *     elif isinstance(value, (cuuint32_t)):
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 *     else:
 *         pvalue = int(cuuint32_t(value))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23253, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint32_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23251
 *     if value is None:
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23255
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 *     else:
 *         pvalue = int(cuuint32_t(value))             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint32_t), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvalue = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23256
 *     else:
 *         pvalue = int(cuuint32_t(value))
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr caddr
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23256, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint32_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":23259
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_addr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23260
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 */
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23259
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23261
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_addr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23262
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_paddr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23263
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23263, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23261
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23265
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 *         paddr = int(CUdeviceptr(addr))             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_paddr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23266
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream cstream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23266, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":23269
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23270
 *     cdef ccuda.CUstream cstream
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23269
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23271
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23272
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23273
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(CUstream(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23273, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23271
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23275
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 *         pstream = int(CUstream(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23276
 *     else:
 *         pstream = int(CUstream(stream))
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamWriteValue32(cstream, caddr, cvalue, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23276, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":23278
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 *     err = ccuda.cuStreamWriteValue32(cstream, caddr, cvalue, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamWriteValue32(__pyx_v_cstream, __pyx_v_caddr, __pyx_v_cvalue, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23278, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":23279
 * 
 *     err = ccuda.cuStreamWriteValue32(cstream, caddr, cvalue, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23211
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue32(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamWriteValue32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvalue);
  __Pyx_XDECREF(__pyx_v_paddr);
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23282
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue64(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_415cuStreamWriteValue64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_414cuStreamWriteValue64[] = "cuStreamWriteValue64(stream, addr, value, unsigned int flags)\n Write a value to memory.\n\n    Write a value to memory. Unless the\n    :py:obj:`~.CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER` flag is passed, the\n    write is preceded by a system-wide memory fence, equivalent to a\n    __threadfence_system() but scoped to the stream rather than a CUDA\n    thread.\n\n    If the memory was registered via :py:obj:`~.cuMemHostRegister()`, the\n    device pointer should be obtained with\n    :py:obj:`~.cuMemHostGetDevicePointer()`.\n\n    Support for this can be queried with :py:obj:`~.cuDeviceGetAttribute()`\n    and :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS`.\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream to do the write in.\n    addr : :py:obj:`~.CUdeviceptr`\n        The device address to write to.\n    value : Any\n        The value to write.\n    flags : unsigned int\n        See :py:obj:`~.CUstreamWriteValue_flags`.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamWriteValue32`, :py:obj:`~.cuStreamWaitValue32`, :py:obj:`~.cuStreamWaitValue64`, :py:obj:`~.cuStreamBatchMemOp`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuEventRecord`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_415cuStreamWriteValue64 = {"cuStreamWriteValue64", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_415cuStreamWriteValue64, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_414cuStreamWriteValue64};
static PyObject *__pyx_pw_4cuda_4cuda_415cuStreamWriteValue64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_v_addr = 0;
  PyObject *__pyx_v_value = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamWriteValue64 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_addr,&__pyx_n_s_value,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_addr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue64", 1, 4, 4, 1); __PYX_ERR(0, 23282, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue64", 1, 4, 4, 2); __PYX_ERR(0, 23282, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue64", 1, 4, 4, 3); __PYX_ERR(0, 23282, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamWriteValue64") < 0)) __PYX_ERR(0, 23282, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_stream = values[0];
    __pyx_v_addr = values[1];
    __pyx_v_value = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23282, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23282, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamWriteValue64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_414cuStreamWriteValue64(__pyx_self, __pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_414cuStreamWriteValue64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags) {
  cuuint64_t __pyx_v_cvalue;
  PyObject *__pyx_v_pvalue = NULL;
  CUdeviceptr __pyx_v_caddr;
  PyObject *__pyx_v_paddr = NULL;
  CUstream __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__827)
  __Pyx_RefNannySetupContext("cuStreamWriteValue64", 0);
  __Pyx_TraceCall("cuStreamWriteValue64", __pyx_f[0], 23282, 0, __PYX_ERR(0, 23282, __pyx_L1_error));

  /* "cuda/cuda.pyx":23319
 *     """
 *     cdef ccuda.cuuint64_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23320
 *     cdef ccuda.cuuint64_t cvalue
 *     if value is None:
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(value, (cuuint64_t)):
 *         pvalue = int(value)
 */
    __pyx_v_cvalue = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23319
 *     """
 *     cdef ccuda.cuuint64_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23321
 *     if value is None:
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4cuda_4cuda_cuuint64_t); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23322
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):
 *         pvalue = int(value)             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23323
 *     elif isinstance(value, (cuuint64_t)):
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 *     else:
 *         pvalue = int(cuuint64_t(value))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23323, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23321
 *     if value is None:
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23325
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 *     else:
 *         pvalue = int(cuuint64_t(value))             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvalue = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23326
 *     else:
 *         pvalue = int(cuuint64_t(value))
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr caddr
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23326, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":23329
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_addr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23330
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 */
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23329
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23331
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_addr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23332
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_paddr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23333
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23333, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23331
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23335
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 *         paddr = int(CUdeviceptr(addr))             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_paddr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23336
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream cstream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23336, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":23339
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23340
 *     cdef ccuda.CUstream cstream
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23339
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23341
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23342
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23343
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(CUstream(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23343, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23341
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23345
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 *         pstream = int(CUstream(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23346
 *     else:
 *         pstream = int(CUstream(stream))
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamWriteValue64(cstream, caddr, cvalue, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23346, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":23348
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 *     err = ccuda.cuStreamWriteValue64(cstream, caddr, cvalue, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamWriteValue64(__pyx_v_cstream, __pyx_v_caddr, __pyx_v_cvalue, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23348, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":23349
 * 
 *     err = ccuda.cuStreamWriteValue64(cstream, caddr, cvalue, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23282
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue64(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamWriteValue64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvalue);
  __Pyx_XDECREF(__pyx_v_paddr);
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23352
 * 
 * @cython.embedsignature(True)
 * def cuStreamBatchMemOp(stream, unsigned int count, paramArray : List[CUstreamBatchMemOpParams], unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Batch operations to synchronize the stream via memory operations.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_417cuStreamBatchMemOp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_416cuStreamBatchMemOp[] = "cuStreamBatchMemOp(stream, unsigned int count, paramArray: List[CUstreamBatchMemOpParams], unsigned int flags)\n Batch operations to synchronize the stream via memory operations.\n\n    This is a batch version of :py:obj:`~.cuStreamWaitValue32()` and\n    :py:obj:`~.cuStreamWriteValue32()`. Batching operations may avoid some\n    performance overhead in both the API call and the device execution\n    versus adding them to the stream in separate API calls. The operations\n    are enqueued in the order they appear in the array.\n\n    See :py:obj:`~.CUstreamBatchMemOpType` for the full set of supported\n    operations, and :py:obj:`~.cuStreamWaitValue32()`,\n    :py:obj:`~.cuStreamWaitValue64()`, :py:obj:`~.cuStreamWriteValue32()`,\n    and :py:obj:`~.cuStreamWriteValue64()` for details of specific\n    operations.\n\n    Basic support for this can be queried with\n    :py:obj:`~.cuDeviceGetAttribute()` and\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS`. See related\n    APIs for details on querying support for specific operations.\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream to enqueue the operations in.\n    count : unsigned int\n        The number of operations in the array. Must be less than 256.\n    paramArray : List[:py:obj:`~.CUstreamBatchMemOpParams`]\n        The types and parameters of the individual operations.\n    flags : unsigned int\n        Reserved for future expansion; must be 0.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamWaitValue32`, :py:obj:`~.cuStreamWaitValue64`, :py:obj:`~.cuStreamWriteValue32`, :py:obj:`~.cuStreamWriteValue64`, :py:obj:`~.cuMemHostRegister`\n\n    Notes\n    -----\n    Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this A""PI is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_417cuStreamBatchMemOp = {"cuStreamBatchMemOp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_417cuStreamBatchMemOp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_416cuStreamBatchMemOp};
static PyObject *__pyx_pw_4cuda_4cuda_417cuStreamBatchMemOp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  unsigned int __pyx_v_count;
  PyObject *__pyx_v_paramArray = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamBatchMemOp (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_count_2,&__pyx_n_s_paramArray_2,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamBatchMemOp", 1, 4, 4, 1); __PYX_ERR(0, 23352, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paramArray_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamBatchMemOp", 1, 4, 4, 2); __PYX_ERR(0, 23352, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamBatchMemOp", 1, 4, 4, 3); __PYX_ERR(0, 23352, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamBatchMemOp") < 0)) __PYX_ERR(0, 23352, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_stream = values[0];
    __pyx_v_count = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_count == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23352, __pyx_L3_error)
    __pyx_v_paramArray = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23352, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamBatchMemOp", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23352, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamBatchMemOp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_416cuStreamBatchMemOp(__pyx_self, __pyx_v_stream, __pyx_v_count, __pyx_v_paramArray, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_18cuStreamBatchMemOp_2generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":23397
 *     """
 *     paramArray = [] if paramArray is None else paramArray
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_18cuStreamBatchMemOp_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_30_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_30_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 23397, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_18cuStreamBatchMemOp_2generator16, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuStreamBatchMemOp_locals_genexp, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 23397, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamBatchMemOp.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_18cuStreamBatchMemOp_2generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 23397, 0, __PYX_ERR(0, 23397, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 23397, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramArray)) { __Pyx_RaiseClosureNameError("paramArray"); __PYX_ERR(0, 23397, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramArray)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramArray)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramArray; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23397, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 23397, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 23397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 23397, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 23397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 23397, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23352
 * 
 * @cython.embedsignature(True)
 * def cuStreamBatchMemOp(stream, unsigned int count, paramArray : List[CUstreamBatchMemOpParams], unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Batch operations to synchronize the stream via memory operations.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_416cuStreamBatchMemOp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, unsigned int __pyx_v_count, PyObject *__pyx_v_paramArray, unsigned int __pyx_v_flags) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *__pyx_cur_scope;
  CUstream __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  CUstreamBatchMemOpParams *__pyx_v_cparamArray;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_18cuStreamBatchMemOp_2generator16 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  union CUstreamBatchMemOpParams_union *__pyx_t_10;
  CUresult __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__828)
  __Pyx_RefNannySetupContext("cuStreamBatchMemOp", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 23352, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuStreamBatchMemOp", __pyx_f[0], 23352, 0, __PYX_ERR(0, 23352, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_paramArray = __pyx_v_paramArray;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_paramArray);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_paramArray);

  /* "cuda/cuda.pyx":23396
 *     Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).
 *     """
 *     paramArray = [] if paramArray is None else paramArray             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_paramArray == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_paramArray);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_paramArray;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_paramArray);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_paramArray, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":23397
 *     """
 *     paramArray = [] if paramArray is None else paramArray
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_18cuStreamBatchMemOp_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 23397, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":23398
 *     paramArray = [] if paramArray is None else paramArray
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream cstream
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__829, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 23398, __pyx_L1_error)

    /* "cuda/cuda.pyx":23397
 *     """
 *     paramArray = [] if paramArray is None else paramArray
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")
 * 
 */
  }

  /* "cuda/cuda.pyx":23401
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
  __pyx_t_4 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23402
 *     cdef ccuda.CUstream cstream
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23401
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23403
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":23404
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23405
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(CUstream(stream))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23405, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":23403
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23407
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 *         pstream = int(CUstream(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":23408
 *     else:
 *         pstream = int(CUstream(stream))
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     if count > len(paramArray): raise RuntimeError("List is too small: " + str(len(paramArray)) + " < " + str(count))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23408, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":23410
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 *     if count > len(paramArray): raise RuntimeError("List is too small: " + str(len(paramArray)) + " < " + str(count))             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUstreamBatchMemOpParams* cparamArray = NULL
 *     if len(paramArray) > 0:
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_paramArray;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_v_count > __pyx_t_6) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_paramArray;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23410, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u__660); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 23410, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":23411
 * 
 *     if count > len(paramArray): raise RuntimeError("List is too small: " + str(len(paramArray)) + " < " + str(count))
 *     cdef ccuda.CUstreamBatchMemOpParams* cparamArray = NULL             # <<<<<<<<<<<<<<
 *     if len(paramArray) > 0:
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))
 */
  __pyx_v_cparamArray = NULL;

  /* "cuda/cuda.pyx":23412
 *     if count > len(paramArray): raise RuntimeError("List is too small: " + str(len(paramArray)) + " < " + str(count))
 *     cdef ccuda.CUstreamBatchMemOpParams* cparamArray = NULL
 *     if len(paramArray) > 0:             # <<<<<<<<<<<<<<
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))
 *         if cparamArray is NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramArray;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":23413
 *     cdef ccuda.CUstreamBatchMemOpParams* cparamArray = NULL
 *     if len(paramArray) > 0:
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))             # <<<<<<<<<<<<<<
 *         if cparamArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 */
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramArray;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23413, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_cparamArray = ((CUstreamBatchMemOpParams *)calloc(__pyx_t_6, (sizeof(CUstreamBatchMemOpParams))));

    /* "cuda/cuda.pyx":23414
 *     if len(paramArray) > 0:
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))
 *         if cparamArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 *         for idx in range(len(paramArray)):
 */
    __pyx_t_4 = ((__pyx_v_cparamArray == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":23415
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))
 *         if cparamArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))             # <<<<<<<<<<<<<<
 *         for idx in range(len(paramArray)):
 *             memcpy(&cparamArray[idx], (<CUstreamBatchMemOpParams>paramArray[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))
 */
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramArray;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23415, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_n_u_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyInt_FromSize_t((sizeof(CUstreamBatchMemOpParams))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 23415, __pyx_L1_error)

      /* "cuda/cuda.pyx":23414
 *     if len(paramArray) > 0:
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))
 *         if cparamArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 *         for idx in range(len(paramArray)):
 */
    }

    /* "cuda/cuda.pyx":23416
 *         if cparamArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 *         for idx in range(len(paramArray)):             # <<<<<<<<<<<<<<
 *             memcpy(&cparamArray[idx], (<CUstreamBatchMemOpParams>paramArray[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))
 * 
 */
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_paramArray;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23416, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __pyx_t_6;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_idx = __pyx_t_9;

      /* "cuda/cuda.pyx":23417
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 *         for idx in range(len(paramArray)):
 *             memcpy(&cparamArray[idx], (<CUstreamBatchMemOpParams>paramArray[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamBatchMemOp(cstream, count, (<CUstreamBatchMemOpParams>paramArray[0])._ptr if len(paramArray) == 1 else cparamArray, flags)
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_paramArray, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23417, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      (void)(memcpy((&(__pyx_v_cparamArray[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams *)__pyx_t_3)->__pyx_base._ptr, (sizeof(CUstreamBatchMemOpParams))));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }

    /* "cuda/cuda.pyx":23412
 *     if count > len(paramArray): raise RuntimeError("List is too small: " + str(len(paramArray)) + " < " + str(count))
 *     cdef ccuda.CUstreamBatchMemOpParams* cparamArray = NULL
 *     if len(paramArray) > 0:             # <<<<<<<<<<<<<<
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))
 *         if cparamArray is NULL:
 */
  }

  /* "cuda/cuda.pyx":23419
 *             memcpy(&cparamArray[idx], (<CUstreamBatchMemOpParams>paramArray[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))
 * 
 *     err = ccuda.cuStreamBatchMemOp(cstream, count, (<CUstreamBatchMemOpParams>paramArray[0])._ptr if len(paramArray) == 1 else cparamArray, flags)             # <<<<<<<<<<<<<<
 *     if cparamArray is not NULL:
 *         free(cparamArray)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_paramArray;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23419, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_paramArray, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams *)__pyx_t_3)->__pyx_base._ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cparamArray;
  }
  __pyx_t_11 = __pyx_f_4cuda_5ccuda_cuStreamBatchMemOp(__pyx_v_cstream, __pyx_v_count, __pyx_t_10, __pyx_v_flags); if (unlikely(__pyx_t_11 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23419, __pyx_L1_error)
  __pyx_v_err = __pyx_t_11;

  /* "cuda/cuda.pyx":23420
 * 
 *     err = ccuda.cuStreamBatchMemOp(cstream, count, (<CUstreamBatchMemOpParams>paramArray[0])._ptr if len(paramArray) == 1 else cparamArray, flags)
 *     if cparamArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cparamArray)
 *     return (CUresult(err),)
 */
  __pyx_t_4 = ((__pyx_v_cparamArray != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":23421
 *     err = ccuda.cuStreamBatchMemOp(cstream, count, (<CUstreamBatchMemOpParams>paramArray[0])._ptr if len(paramArray) == 1 else cparamArray, flags)
 *     if cparamArray is not NULL:
 *         free(cparamArray)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
    free(__pyx_v_cparamArray);

    /* "cuda/cuda.pyx":23420
 * 
 *     err = ccuda.cuStreamBatchMemOp(cstream, count, (<CUstreamBatchMemOpParams>paramArray[0])._ptr if len(paramArray) == 1 else cparamArray, flags)
 *     if cparamArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cparamArray)
 *     return (CUresult(err),)
 */
  }

  /* "cuda/cuda.pyx":23422
 *     if cparamArray is not NULL:
 *         free(cparamArray)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23352
 * 
 * @cython.embedsignature(True)
 * def cuStreamBatchMemOp(stream, unsigned int count, paramArray : List[CUstreamBatchMemOpParams], unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Batch operations to synchronize the stream via memory operations.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuStreamBatchMemOp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_18cuStreamBatchMemOp_2generator16);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23425
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue32_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_419cuStreamWaitValue32_v2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_418cuStreamWaitValue32_v2[] = "cuStreamWaitValue32_v2(stream, addr, value, unsigned int flags)\n Wait on a memory location.\n\n    Enqueues a synchronization of the stream on the given memory location.\n    Work ordered after the operation will block until the given condition\n    on the memory is satisfied. By default, the condition is to wait for\n    (int32_t)(*addr - value) >= 0, a cyclic greater-or-equal. Other\n    condition types can be specified via `flags`.\n\n    If the memory was registered via :py:obj:`~.cuMemHostRegister()`, the\n    device pointer should be obtained with\n    :py:obj:`~.cuMemHostGetDevicePointer()`. This function cannot be used\n    with managed memory (:py:obj:`~.cuMemAllocManaged`).\n\n    Support for CU_STREAM_WAIT_VALUE_NOR can be queried with\n    :py:obj:`~.cuDeviceGetAttribute()` and\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2`.\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream to synchronize on the memory location.\n    addr : :py:obj:`~.CUdeviceptr`\n        The memory location to wait on.\n    value : Any\n        The value to compare with the memory location.\n    flags : unsigned int\n        See :py:obj:`~.CUstreamWaitValue_flags`.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamWaitValue64_v2`, :py:obj:`~.cuStreamWriteValue32_v2`, :py:obj:`~.cuStreamWriteValue64_v2`, :py:obj:`~.cuStreamBatchMemOp_v2`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuStreamWaitEvent`\n\n    Notes\n    -----\n    Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does n""ot serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_419cuStreamWaitValue32_v2 = {"cuStreamWaitValue32_v2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_419cuStreamWaitValue32_v2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_418cuStreamWaitValue32_v2};
static PyObject *__pyx_pw_4cuda_4cuda_419cuStreamWaitValue32_v2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_v_addr = 0;
  PyObject *__pyx_v_value = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamWaitValue32_v2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_addr,&__pyx_n_s_value,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_addr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue32_v2", 1, 4, 4, 1); __PYX_ERR(0, 23425, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue32_v2", 1, 4, 4, 2); __PYX_ERR(0, 23425, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue32_v2", 1, 4, 4, 3); __PYX_ERR(0, 23425, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamWaitValue32_v2") < 0)) __PYX_ERR(0, 23425, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_stream = values[0];
    __pyx_v_addr = values[1];
    __pyx_v_value = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23425, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue32_v2", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23425, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamWaitValue32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_418cuStreamWaitValue32_v2(__pyx_self, __pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_418cuStreamWaitValue32_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags) {
  cuuint32_t __pyx_v_cvalue;
  PyObject *__pyx_v_pvalue = NULL;
  CUdeviceptr __pyx_v_caddr;
  PyObject *__pyx_v_paddr = NULL;
  CUstream __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__830)
  __Pyx_RefNannySetupContext("cuStreamWaitValue32_v2", 0);
  __Pyx_TraceCall("cuStreamWaitValue32_v2", __pyx_f[0], 23425, 0, __PYX_ERR(0, 23425, __pyx_L1_error));

  /* "cuda/cuda.pyx":23468
 *     """
 *     cdef ccuda.cuuint32_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23469
 *     cdef ccuda.cuuint32_t cvalue
 *     if value is None:
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(value, (cuuint32_t)):
 *         pvalue = int(value)
 */
    __pyx_v_cvalue = ((cuuint32_t)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23468
 *     """
 *     cdef ccuda.cuuint32_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23470
 *     if value is None:
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4cuda_4cuda_cuuint32_t); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23471
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):
 *         pvalue = int(value)             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23472
 *     elif isinstance(value, (cuuint32_t)):
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 *     else:
 *         pvalue = int(cuuint32_t(value))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23472, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint32_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23470
 *     if value is None:
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23474
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 *     else:
 *         pvalue = int(cuuint32_t(value))             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint32_t), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvalue = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23475
 *     else:
 *         pvalue = int(cuuint32_t(value))
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr caddr
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23475, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint32_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":23478
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_addr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23479
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 */
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23478
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23480
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_addr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23481
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_paddr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23482
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23482, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23480
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23484
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 *         paddr = int(CUdeviceptr(addr))             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_paddr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23485
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream cstream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23485, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":23488
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23489
 *     cdef ccuda.CUstream cstream
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23488
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23490
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23491
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23492
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(CUstream(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23492, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23490
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23494
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 *         pstream = int(CUstream(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23495
 *     else:
 *         pstream = int(CUstream(stream))
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamWaitValue32_v2(cstream, caddr, cvalue, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23495, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":23497
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 *     err = ccuda.cuStreamWaitValue32_v2(cstream, caddr, cvalue, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamWaitValue32_v2(__pyx_v_cstream, __pyx_v_caddr, __pyx_v_cvalue, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23497, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":23498
 * 
 *     err = ccuda.cuStreamWaitValue32_v2(cstream, caddr, cvalue, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23425
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue32_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamWaitValue32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvalue);
  __Pyx_XDECREF(__pyx_v_paddr);
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23501
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue64_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_421cuStreamWaitValue64_v2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_420cuStreamWaitValue64_v2[] = "cuStreamWaitValue64_v2(stream, addr, value, unsigned int flags)\n Wait on a memory location.\n\n    Enqueues a synchronization of the stream on the given memory location.\n    Work ordered after the operation will block until the given condition\n    on the memory is satisfied. By default, the condition is to wait for\n    (int64_t)(*addr - value) >= 0, a cyclic greater-or-equal. Other\n    condition types can be specified via `flags`.\n\n    If the memory was registered via :py:obj:`~.cuMemHostRegister()`, the\n    device pointer should be obtained with\n    :py:obj:`~.cuMemHostGetDevicePointer()`.\n\n    Support for this can be queried with :py:obj:`~.cuDeviceGetAttribute()`\n    and :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V2`.\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream to synchronize on the memory location.\n    addr : :py:obj:`~.CUdeviceptr`\n        The memory location to wait on.\n    value : Any\n        The value to compare with the memory location.\n    flags : unsigned int\n        See :py:obj:`~.CUstreamWaitValue_flags`.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamWaitValue32_v2`, :py:obj:`~.cuStreamWriteValue32_v2`, :py:obj:`~.cuStreamWriteValue64_v2`, :py:obj:`~.cuStreamBatchMemOp_v2`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuStreamWaitEvent`\n\n    Notes\n    -----\n    Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the pr""ogramming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_421cuStreamWaitValue64_v2 = {"cuStreamWaitValue64_v2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_421cuStreamWaitValue64_v2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_420cuStreamWaitValue64_v2};
static PyObject *__pyx_pw_4cuda_4cuda_421cuStreamWaitValue64_v2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_v_addr = 0;
  PyObject *__pyx_v_value = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamWaitValue64_v2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_addr,&__pyx_n_s_value,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_addr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue64_v2", 1, 4, 4, 1); __PYX_ERR(0, 23501, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue64_v2", 1, 4, 4, 2); __PYX_ERR(0, 23501, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue64_v2", 1, 4, 4, 3); __PYX_ERR(0, 23501, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamWaitValue64_v2") < 0)) __PYX_ERR(0, 23501, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_stream = values[0];
    __pyx_v_addr = values[1];
    __pyx_v_value = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23501, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamWaitValue64_v2", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23501, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamWaitValue64_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_420cuStreamWaitValue64_v2(__pyx_self, __pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_420cuStreamWaitValue64_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags) {
  cuuint64_t __pyx_v_cvalue;
  PyObject *__pyx_v_pvalue = NULL;
  CUdeviceptr __pyx_v_caddr;
  PyObject *__pyx_v_paddr = NULL;
  CUstream __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__831)
  __Pyx_RefNannySetupContext("cuStreamWaitValue64_v2", 0);
  __Pyx_TraceCall("cuStreamWaitValue64_v2", __pyx_f[0], 23501, 0, __PYX_ERR(0, 23501, __pyx_L1_error));

  /* "cuda/cuda.pyx":23542
 *     """
 *     cdef ccuda.cuuint64_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23543
 *     cdef ccuda.cuuint64_t cvalue
 *     if value is None:
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(value, (cuuint64_t)):
 *         pvalue = int(value)
 */
    __pyx_v_cvalue = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23542
 *     """
 *     cdef ccuda.cuuint64_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23544
 *     if value is None:
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4cuda_4cuda_cuuint64_t); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23545
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):
 *         pvalue = int(value)             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23546
 *     elif isinstance(value, (cuuint64_t)):
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 *     else:
 *         pvalue = int(cuuint64_t(value))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23546, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23544
 *     if value is None:
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23548
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 *     else:
 *         pvalue = int(cuuint64_t(value))             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvalue = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23549
 *     else:
 *         pvalue = int(cuuint64_t(value))
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr caddr
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23549, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":23552
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_addr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23553
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 */
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23552
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23554
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_addr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23555
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_paddr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23556
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23556, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23554
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23558
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 *         paddr = int(CUdeviceptr(addr))             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_paddr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23559
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream cstream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23559, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":23562
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23563
 *     cdef ccuda.CUstream cstream
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23562
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23564
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23565
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23566
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(CUstream(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23566, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23564
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23568
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 *         pstream = int(CUstream(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23569
 *     else:
 *         pstream = int(CUstream(stream))
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamWaitValue64_v2(cstream, caddr, cvalue, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23569, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":23571
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 *     err = ccuda.cuStreamWaitValue64_v2(cstream, caddr, cvalue, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamWaitValue64_v2(__pyx_v_cstream, __pyx_v_caddr, __pyx_v_cvalue, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23571, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":23572
 * 
 *     err = ccuda.cuStreamWaitValue64_v2(cstream, caddr, cvalue, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23501
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue64_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamWaitValue64_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvalue);
  __Pyx_XDECREF(__pyx_v_paddr);
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23575
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue32_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_423cuStreamWriteValue32_v2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_422cuStreamWriteValue32_v2[] = "cuStreamWriteValue32_v2(stream, addr, value, unsigned int flags)\n Write a value to memory.\n\n    Write a value to memory.\n\n    If the memory was registered via :py:obj:`~.cuMemHostRegister()`, the\n    device pointer should be obtained with\n    :py:obj:`~.cuMemHostGetDevicePointer()`. This function cannot be used\n    with managed memory (:py:obj:`~.cuMemAllocManaged`).\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream to do the write in.\n    addr : :py:obj:`~.CUdeviceptr`\n        The device address to write to.\n    value : Any\n        The value to write.\n    flags : unsigned int\n        See :py:obj:`~.CUstreamWriteValue_flags`.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamWriteValue64_v2`, :py:obj:`~.cuStreamWaitValue32_v2`, :py:obj:`~.cuStreamWaitValue64_v2`, :py:obj:`~.cuStreamBatchMemOp_v2`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuEventRecord`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_423cuStreamWriteValue32_v2 = {"cuStreamWriteValue32_v2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_423cuStreamWriteValue32_v2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_422cuStreamWriteValue32_v2};
static PyObject *__pyx_pw_4cuda_4cuda_423cuStreamWriteValue32_v2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_v_addr = 0;
  PyObject *__pyx_v_value = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamWriteValue32_v2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_addr,&__pyx_n_s_value,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_addr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue32_v2", 1, 4, 4, 1); __PYX_ERR(0, 23575, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue32_v2", 1, 4, 4, 2); __PYX_ERR(0, 23575, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue32_v2", 1, 4, 4, 3); __PYX_ERR(0, 23575, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamWriteValue32_v2") < 0)) __PYX_ERR(0, 23575, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_stream = values[0];
    __pyx_v_addr = values[1];
    __pyx_v_value = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23575, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue32_v2", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23575, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamWriteValue32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_422cuStreamWriteValue32_v2(__pyx_self, __pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_422cuStreamWriteValue32_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags) {
  cuuint32_t __pyx_v_cvalue;
  PyObject *__pyx_v_pvalue = NULL;
  CUdeviceptr __pyx_v_caddr;
  PyObject *__pyx_v_paddr = NULL;
  CUstream __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__832)
  __Pyx_RefNannySetupContext("cuStreamWriteValue32_v2", 0);
  __Pyx_TraceCall("cuStreamWriteValue32_v2", __pyx_f[0], 23575, 0, __PYX_ERR(0, 23575, __pyx_L1_error));

  /* "cuda/cuda.pyx":23606
 *     """
 *     cdef ccuda.cuuint32_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23607
 *     cdef ccuda.cuuint32_t cvalue
 *     if value is None:
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(value, (cuuint32_t)):
 *         pvalue = int(value)
 */
    __pyx_v_cvalue = ((cuuint32_t)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23606
 *     """
 *     cdef ccuda.cuuint32_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23608
 *     if value is None:
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4cuda_4cuda_cuuint32_t); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23609
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):
 *         pvalue = int(value)             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23610
 *     elif isinstance(value, (cuuint32_t)):
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 *     else:
 *         pvalue = int(cuuint32_t(value))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23610, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint32_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23608
 *     if value is None:
 *         cvalue = <ccuda.cuuint32_t><void_ptr>0
 *     elif isinstance(value, (cuuint32_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23612
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 *     else:
 *         pvalue = int(cuuint32_t(value))             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint32_t), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvalue = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23613
 *     else:
 *         pvalue = int(cuuint32_t(value))
 *         cvalue = <ccuda.cuuint32_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr caddr
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23613, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint32_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":23616
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_addr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23617
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 */
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23616
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23618
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_addr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23619
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_paddr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23620
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23620, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23618
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23622
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 *         paddr = int(CUdeviceptr(addr))             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_paddr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23623
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream cstream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23623, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":23626
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23627
 *     cdef ccuda.CUstream cstream
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23626
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23628
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23629
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23630
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(CUstream(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23630, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23628
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23632
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 *         pstream = int(CUstream(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23633
 *     else:
 *         pstream = int(CUstream(stream))
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamWriteValue32_v2(cstream, caddr, cvalue, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23633, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":23635
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 *     err = ccuda.cuStreamWriteValue32_v2(cstream, caddr, cvalue, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamWriteValue32_v2(__pyx_v_cstream, __pyx_v_caddr, __pyx_v_cvalue, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23635, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":23636
 * 
 *     err = ccuda.cuStreamWriteValue32_v2(cstream, caddr, cvalue, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23575
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue32_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamWriteValue32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvalue);
  __Pyx_XDECREF(__pyx_v_paddr);
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23639
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue64_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_425cuStreamWriteValue64_v2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_424cuStreamWriteValue64_v2[] = "cuStreamWriteValue64_v2(stream, addr, value, unsigned int flags)\n Write a value to memory.\n\n    Write a value to memory.\n\n    If the memory was registered via :py:obj:`~.cuMemHostRegister()`, the\n    device pointer should be obtained with\n    :py:obj:`~.cuMemHostGetDevicePointer()`.\n\n    Support for this can be queried with :py:obj:`~.cuDeviceGetAttribute()`\n    and :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V2`.\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream to do the write in.\n    addr : :py:obj:`~.CUdeviceptr`\n        The device address to write to.\n    value : Any\n        The value to write.\n    flags : unsigned int\n        See :py:obj:`~.CUstreamWriteValue_flags`.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamWriteValue32_v2`, :py:obj:`~.cuStreamWaitValue32_v2`, :py:obj:`~.cuStreamWaitValue64_v2`, :py:obj:`~.cuStreamBatchMemOp_v2`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuEventRecord`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_425cuStreamWriteValue64_v2 = {"cuStreamWriteValue64_v2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_425cuStreamWriteValue64_v2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_424cuStreamWriteValue64_v2};
static PyObject *__pyx_pw_4cuda_4cuda_425cuStreamWriteValue64_v2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_v_addr = 0;
  PyObject *__pyx_v_value = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamWriteValue64_v2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_addr,&__pyx_n_s_value,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_addr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue64_v2", 1, 4, 4, 1); __PYX_ERR(0, 23639, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue64_v2", 1, 4, 4, 2); __PYX_ERR(0, 23639, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue64_v2", 1, 4, 4, 3); __PYX_ERR(0, 23639, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamWriteValue64_v2") < 0)) __PYX_ERR(0, 23639, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_stream = values[0];
    __pyx_v_addr = values[1];
    __pyx_v_value = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23639, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamWriteValue64_v2", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23639, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamWriteValue64_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_424cuStreamWriteValue64_v2(__pyx_self, __pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_424cuStreamWriteValue64_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_addr, PyObject *__pyx_v_value, unsigned int __pyx_v_flags) {
  cuuint64_t __pyx_v_cvalue;
  PyObject *__pyx_v_pvalue = NULL;
  CUdeviceptr __pyx_v_caddr;
  PyObject *__pyx_v_paddr = NULL;
  CUstream __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__833)
  __Pyx_RefNannySetupContext("cuStreamWriteValue64_v2", 0);
  __Pyx_TraceCall("cuStreamWriteValue64_v2", __pyx_f[0], 23639, 0, __PYX_ERR(0, 23639, __pyx_L1_error));

  /* "cuda/cuda.pyx":23672
 *     """
 *     cdef ccuda.cuuint64_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23673
 *     cdef ccuda.cuuint64_t cvalue
 *     if value is None:
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(value, (cuuint64_t)):
 *         pvalue = int(value)
 */
    __pyx_v_cvalue = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23672
 *     """
 *     cdef ccuda.cuuint64_t cvalue
 *     if value is None:             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23674
 *     if value is None:
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4cuda_4cuda_cuuint64_t); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23675
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):
 *         pvalue = int(value)             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23676
 *     elif isinstance(value, (cuuint64_t)):
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 *     else:
 *         pvalue = int(cuuint64_t(value))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23676, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23674
 *     if value is None:
 *         cvalue = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(value, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *         pvalue = int(value)
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23678
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 *     else:
 *         pvalue = int(cuuint64_t(value))             # <<<<<<<<<<<<<<
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvalue = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23679
 *     else:
 *         pvalue = int(cuuint64_t(value))
 *         cvalue = <ccuda.cuuint64_t><void_ptr>pvalue             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr caddr
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvalue); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23679, __pyx_L1_error)
    __pyx_v_cvalue = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":23682
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_addr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23683
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 */
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23682
 * 
 *     cdef ccuda.CUdeviceptr caddr
 *     if addr is None:             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23684
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_addr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23685
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_paddr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23686
 *     elif isinstance(addr, (CUdeviceptr)):
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23686, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23684
 *     if addr is None:
 *         caddr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(addr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         paddr = int(addr)
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23688
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 *     else:
 *         paddr = int(CUdeviceptr(addr))             # <<<<<<<<<<<<<<
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_addr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_paddr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23689
 *     else:
 *         paddr = int(CUdeviceptr(addr))
 *         caddr = <ccuda.CUdeviceptr><void_ptr>paddr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream cstream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_paddr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23689, __pyx_L1_error)
    __pyx_v_caddr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":23692
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23693
 *     cdef ccuda.CUstream cstream
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23692
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23694
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23695
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23696
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(CUstream(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23696, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23694
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":23698
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 *         pstream = int(CUstream(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23699
 *     else:
 *         pstream = int(CUstream(stream))
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamWriteValue64_v2(cstream, caddr, cvalue, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23699, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":23701
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 *     err = ccuda.cuStreamWriteValue64_v2(cstream, caddr, cvalue, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuStreamWriteValue64_v2(__pyx_v_cstream, __pyx_v_caddr, __pyx_v_cvalue, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23701, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":23702
 * 
 *     err = ccuda.cuStreamWriteValue64_v2(cstream, caddr, cvalue, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23639
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue64_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuStreamWriteValue64_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvalue);
  __Pyx_XDECREF(__pyx_v_paddr);
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23705
 * 
 * @cython.embedsignature(True)
 * def cuStreamBatchMemOp_v2(stream, unsigned int count, paramArray : List[CUstreamBatchMemOpParams], unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Batch operations to synchronize the stream via memory operations.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_427cuStreamBatchMemOp_v2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_426cuStreamBatchMemOp_v2[] = "cuStreamBatchMemOp_v2(stream, unsigned int count, paramArray: List[CUstreamBatchMemOpParams], unsigned int flags)\n Batch operations to synchronize the stream via memory operations.\n\n    This is a batch version of :py:obj:`~.cuStreamWaitValue32_v2()` and\n    :py:obj:`~.cuStreamWriteValue32_v2()`. Batching operations may avoid\n    some performance overhead in both the API call and the device execution\n    versus adding them to the stream in separate API calls. The operations\n    are enqueued in the order they appear in the array.\n\n    See :py:obj:`~.CUstreamBatchMemOpType` for the full set of supported\n    operations, and :py:obj:`~.cuStreamWaitValue32_v2()`,\n    :py:obj:`~.cuStreamWaitValue64_v2()`,\n    :py:obj:`~.cuStreamWriteValue32_v2()`, and\n    :py:obj:`~.cuStreamWriteValue64_v2()` for details of specific\n    operations.\n\n    See related APIs for details on querying support for specific\n    operations.\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        The stream to enqueue the operations in.\n    count : unsigned int\n        The number of operations in the array. Must be less than 256.\n    paramArray : List[:py:obj:`~.CUstreamBatchMemOpParams`]\n        The types and parameters of the individual operations.\n    flags : unsigned int\n        Reserved for future expansion; must be 0.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamWaitValue32_v2`, :py:obj:`~.cuStreamWaitValue64_v2`, :py:obj:`~.cuStreamWriteValue32_v2`, :py:obj:`~.cuStreamWriteValue64_v2`, :py:obj:`~.cuMemHostRegister`\n\n    Notes\n    -----\n    Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that ord""er expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_427cuStreamBatchMemOp_v2 = {"cuStreamBatchMemOp_v2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_427cuStreamBatchMemOp_v2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_426cuStreamBatchMemOp_v2};
static PyObject *__pyx_pw_4cuda_4cuda_427cuStreamBatchMemOp_v2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  unsigned int __pyx_v_count;
  PyObject *__pyx_v_paramArray = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuStreamBatchMemOp_v2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_count_2,&__pyx_n_s_paramArray_2,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamBatchMemOp_v2", 1, 4, 4, 1); __PYX_ERR(0, 23705, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paramArray_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamBatchMemOp_v2", 1, 4, 4, 2); __PYX_ERR(0, 23705, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuStreamBatchMemOp_v2", 1, 4, 4, 3); __PYX_ERR(0, 23705, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuStreamBatchMemOp_v2") < 0)) __PYX_ERR(0, 23705, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_stream = values[0];
    __pyx_v_count = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_count == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23705, __pyx_L3_error)
    __pyx_v_paramArray = values[2];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23705, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuStreamBatchMemOp_v2", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23705, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamBatchMemOp_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_426cuStreamBatchMemOp_v2(__pyx_self, __pyx_v_stream, __pyx_v_count, __pyx_v_paramArray, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_21cuStreamBatchMemOp_v2_2generator17(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":23749
 *     """
 *     paramArray = [] if paramArray is None else paramArray
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_21cuStreamBatchMemOp_v2_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_32_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_32_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 23749, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_21cuStreamBatchMemOp_v2_2generator17, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuStreamBatchMemOp_v2_locals_gen, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 23749, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuStreamBatchMemOp_v2.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_21cuStreamBatchMemOp_v2_2generator17(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 23749, 0, __PYX_ERR(0, 23749, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 23749, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramArray)) { __Pyx_RaiseClosureNameError("paramArray"); __PYX_ERR(0, 23749, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramArray)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramArray)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramArray; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_paramArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23749, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 23749, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 23749, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 23749, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 23749, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 23749, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23705
 * 
 * @cython.embedsignature(True)
 * def cuStreamBatchMemOp_v2(stream, unsigned int count, paramArray : List[CUstreamBatchMemOpParams], unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Batch operations to synchronize the stream via memory operations.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_426cuStreamBatchMemOp_v2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, unsigned int __pyx_v_count, PyObject *__pyx_v_paramArray, unsigned int __pyx_v_flags) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *__pyx_cur_scope;
  CUstream __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  CUstreamBatchMemOpParams *__pyx_v_cparamArray;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_21cuStreamBatchMemOp_v2_2generator17 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  union CUstreamBatchMemOpParams_union *__pyx_t_10;
  CUresult __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__834)
  __Pyx_RefNannySetupContext("cuStreamBatchMemOp_v2", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 23705, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuStreamBatchMemOp_v2", __pyx_f[0], 23705, 0, __PYX_ERR(0, 23705, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_paramArray = __pyx_v_paramArray;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_paramArray);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_paramArray);

  /* "cuda/cuda.pyx":23748
 *     Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).
 *     """
 *     paramArray = [] if paramArray is None else paramArray             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_paramArray == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_paramArray);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_paramArray;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_paramArray);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_paramArray, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":23749
 *     """
 *     paramArray = [] if paramArray is None else paramArray
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_21cuStreamBatchMemOp_v2_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 23749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":23750
 *     paramArray = [] if paramArray is None else paramArray
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream cstream
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__829, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 23750, __pyx_L1_error)

    /* "cuda/cuda.pyx":23749
 *     """
 *     paramArray = [] if paramArray is None else paramArray
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")
 * 
 */
  }

  /* "cuda/cuda.pyx":23753
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
  __pyx_t_4 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23754
 *     cdef ccuda.CUstream cstream
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23753
 * 
 *     cdef ccuda.CUstream cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23755
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":23756
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23757
 *     elif isinstance(stream, (CUstream)):
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(CUstream(stream))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23757, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":23755
 *     if stream is None:
 *         cstream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(stream, (CUstream)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":23759
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 *     else:
 *         pstream = int(CUstream(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":23760
 *     else:
 *         pstream = int(CUstream(stream))
 *         cstream = <ccuda.CUstream><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     if count > len(paramArray): raise RuntimeError("List is too small: " + str(len(paramArray)) + " < " + str(count))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23760, __pyx_L1_error)
    __pyx_v_cstream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":23762
 *         cstream = <ccuda.CUstream><void_ptr>pstream
 * 
 *     if count > len(paramArray): raise RuntimeError("List is too small: " + str(len(paramArray)) + " < " + str(count))             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUstreamBatchMemOpParams* cparamArray = NULL
 *     if len(paramArray) > 0:
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_paramArray;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_v_count > __pyx_t_6) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_paramArray;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23762, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u__660); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 23762, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":23763
 * 
 *     if count > len(paramArray): raise RuntimeError("List is too small: " + str(len(paramArray)) + " < " + str(count))
 *     cdef ccuda.CUstreamBatchMemOpParams* cparamArray = NULL             # <<<<<<<<<<<<<<
 *     if len(paramArray) > 0:
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))
 */
  __pyx_v_cparamArray = NULL;

  /* "cuda/cuda.pyx":23764
 *     if count > len(paramArray): raise RuntimeError("List is too small: " + str(len(paramArray)) + " < " + str(count))
 *     cdef ccuda.CUstreamBatchMemOpParams* cparamArray = NULL
 *     if len(paramArray) > 0:             # <<<<<<<<<<<<<<
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))
 *         if cparamArray is NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramArray;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23764, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":23765
 *     cdef ccuda.CUstreamBatchMemOpParams* cparamArray = NULL
 *     if len(paramArray) > 0:
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))             # <<<<<<<<<<<<<<
 *         if cparamArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 */
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramArray;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23765, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_cparamArray = ((CUstreamBatchMemOpParams *)calloc(__pyx_t_6, (sizeof(CUstreamBatchMemOpParams))));

    /* "cuda/cuda.pyx":23766
 *     if len(paramArray) > 0:
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))
 *         if cparamArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 *         for idx in range(len(paramArray)):
 */
    __pyx_t_4 = ((__pyx_v_cparamArray == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":23767
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))
 *         if cparamArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))             # <<<<<<<<<<<<<<
 *         for idx in range(len(paramArray)):
 *             memcpy(&cparamArray[idx], (<CUstreamBatchMemOpParams>paramArray[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))
 */
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_paramArray;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23767, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_n_u_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyInt_FromSize_t((sizeof(CUstreamBatchMemOpParams))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 23767, __pyx_L1_error)

      /* "cuda/cuda.pyx":23766
 *     if len(paramArray) > 0:
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))
 *         if cparamArray is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 *         for idx in range(len(paramArray)):
 */
    }

    /* "cuda/cuda.pyx":23768
 *         if cparamArray is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 *         for idx in range(len(paramArray)):             # <<<<<<<<<<<<<<
 *             memcpy(&cparamArray[idx], (<CUstreamBatchMemOpParams>paramArray[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))
 * 
 */
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_paramArray;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23768, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __pyx_t_6;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_idx = __pyx_t_9;

      /* "cuda/cuda.pyx":23769
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(ccuda.CUstreamBatchMemOpParams)))
 *         for idx in range(len(paramArray)):
 *             memcpy(&cparamArray[idx], (<CUstreamBatchMemOpParams>paramArray[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuStreamBatchMemOp_v2(cstream, count, (<CUstreamBatchMemOpParams>paramArray[0])._ptr if len(paramArray) == 1 else cparamArray, flags)
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_paramArray, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      (void)(memcpy((&(__pyx_v_cparamArray[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams *)__pyx_t_3)->__pyx_base._ptr, (sizeof(CUstreamBatchMemOpParams))));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }

    /* "cuda/cuda.pyx":23764
 *     if count > len(paramArray): raise RuntimeError("List is too small: " + str(len(paramArray)) + " < " + str(count))
 *     cdef ccuda.CUstreamBatchMemOpParams* cparamArray = NULL
 *     if len(paramArray) > 0:             # <<<<<<<<<<<<<<
 *         cparamArray = <ccuda.CUstreamBatchMemOpParams*> calloc(len(paramArray), sizeof(ccuda.CUstreamBatchMemOpParams))
 *         if cparamArray is NULL:
 */
  }

  /* "cuda/cuda.pyx":23771
 *             memcpy(&cparamArray[idx], (<CUstreamBatchMemOpParams>paramArray[idx])._ptr, sizeof(ccuda.CUstreamBatchMemOpParams))
 * 
 *     err = ccuda.cuStreamBatchMemOp_v2(cstream, count, (<CUstreamBatchMemOpParams>paramArray[0])._ptr if len(paramArray) == 1 else cparamArray, flags)             # <<<<<<<<<<<<<<
 *     if cparamArray is not NULL:
 *         free(cparamArray)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_paramArray;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 23771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_paramArray, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams *)__pyx_t_3)->__pyx_base._ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cparamArray;
  }
  __pyx_t_11 = __pyx_f_4cuda_5ccuda_cuStreamBatchMemOp_v2(__pyx_v_cstream, __pyx_v_count, __pyx_t_10, __pyx_v_flags); if (unlikely(__pyx_t_11 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23771, __pyx_L1_error)
  __pyx_v_err = __pyx_t_11;

  /* "cuda/cuda.pyx":23772
 * 
 *     err = ccuda.cuStreamBatchMemOp_v2(cstream, count, (<CUstreamBatchMemOpParams>paramArray[0])._ptr if len(paramArray) == 1 else cparamArray, flags)
 *     if cparamArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cparamArray)
 *     return (CUresult(err),)
 */
  __pyx_t_4 = ((__pyx_v_cparamArray != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":23773
 *     err = ccuda.cuStreamBatchMemOp_v2(cstream, count, (<CUstreamBatchMemOpParams>paramArray[0])._ptr if len(paramArray) == 1 else cparamArray, flags)
 *     if cparamArray is not NULL:
 *         free(cparamArray)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
    free(__pyx_v_cparamArray);

    /* "cuda/cuda.pyx":23772
 * 
 *     err = ccuda.cuStreamBatchMemOp_v2(cstream, count, (<CUstreamBatchMemOpParams>paramArray[0])._ptr if len(paramArray) == 1 else cparamArray, flags)
 *     if cparamArray is not NULL:             # <<<<<<<<<<<<<<
 *         free(cparamArray)
 *     return (CUresult(err),)
 */
  }

  /* "cuda/cuda.pyx":23774
 *     if cparamArray is not NULL:
 *         free(cparamArray)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 23774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23705
 * 
 * @cython.embedsignature(True)
 * def cuStreamBatchMemOp_v2(stream, unsigned int count, paramArray : List[CUstreamBatchMemOpParams], unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Batch operations to synchronize the stream via memory operations.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuStreamBatchMemOp_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_21cuStreamBatchMemOp_v2_2generator17);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23777
 * 
 * @cython.embedsignature(True)
 * def cuFuncGetAttribute(attrib not None : CUfunction_attribute, hfunc):             # <<<<<<<<<<<<<<
 *     """ Returns information about a function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_429cuFuncGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_428cuFuncGetAttribute[] = "cuFuncGetAttribute(attrib: CUfunction_attribute, hfunc)\n Returns information about a function.\n\n    Returns in `*pi` the integer value of the attribute `attrib` on the\n    kernel given by `hfunc`. The supported attributes are:\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK`: The maximum\n      number of threads per block, beyond which a launch of the function\n      would fail. This number depends on both the function and the device\n      on which the function is currently loaded.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`: The size in bytes of\n      statically-allocated shared memory per block required by this\n      function. This does not include dynamically-allocated shared memory\n      requested by the user at runtime.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES`: The size in bytes of\n      user-allocated constant memory required by this function.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES`: The size in bytes of\n      local memory used by each thread of this function.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_NUM_REGS`: The number of registers used\n      by each thread of this function.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_PTX_VERSION`: The PTX virtual\n      architecture version for which the function was compiled. This value\n      is the major PTX version * 10\n\n      - the minor PTX version, so a PTX version 1.3 function would return\n        the value 13. Note that this may return the undefined value of 0\n        for cubins compiled prior to CUDA 3.0.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_BINARY_VERSION`: The binary architecture\n      version for which the function was compiled. This value is the major\n      binary version * 10 + the minor binary version, so a binary version\n      1.3 function would return the value 13. Note that this will return a\n      value of 10 for legacy cubins that do not have a properly-encoded\n      binary architecture version.\n\n    - :py:obj:`~.CU_FUNC_CACHE_MODE_C""A`: The attribute to indicate whether\n      the function has been compiled with user specified option \"-Xptxas\n      --dlcm=ca\" set .\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES`: The\n      maximum size in bytes of dynamically-allocated shared memory.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`:\n      Preferred shared memory-L1 cache split ratio in percent of total\n      shared memory.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET`: If this\n      attribute is set, the kernel must launch with a valid cluster size\n      specified.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH`: The required\n      cluster width in blocks.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT`: The required\n      cluster height in blocks.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH`: The required\n      cluster depth in blocks.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED`:\n      Indicates whether the function can be launched with non-portable\n      cluster size. 1 is allowed, 0 is disallowed. A non-portable cluster\n      size may only function on the specific SKUs the program is tested on.\n      The launch might fail if the program is run on a different hardware\n      platform. CUDA API provides cudaOccupancyMaxActiveClusters to assist\n      with checking whether the desired size can be launched on the current\n      device. A portable cluster size is guaranteed to be functional on all\n      compute capabilities higher than the target compute capability. The\n      portable cluster size for sm_90 is 8 blocks per cluster. This value\n      may increase for future compute capabilities. The specific hardware\n      unit may support higher cluster sizes that\342\200\231s not guaranteed to be\n      portable.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE`:\n      The block scheduling policy of a function. The v""alue type is\n      CUclusterSchedulingPolicy.\n\n    Parameters\n    ----------\n    attrib : :py:obj:`~.CUfunction_attribute`\n        Attribute requested\n    hfunc : :py:obj:`~.CUfunction`\n        Function to query attribute of\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pi : int\n        Returned attribute value\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cudaFuncGetAttributes`, :py:obj:`~.cudaFuncSetAttribute`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_429cuFuncGetAttribute = {"cuFuncGetAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_429cuFuncGetAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_428cuFuncGetAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_429cuFuncGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attrib = 0;
  PyObject *__pyx_v_hfunc = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuFuncGetAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attrib,&__pyx_n_s_hfunc,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrib)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hfunc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuFuncGetAttribute", 1, 2, 2, 1); __PYX_ERR(0, 23777, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuFuncGetAttribute") < 0)) __PYX_ERR(0, 23777, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_attrib = values[0];
    __pyx_v_hfunc = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuFuncGetAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23777, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuFuncGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attrib) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attrib"); __PYX_ERR(0, 23777, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_428cuFuncGetAttribute(__pyx_self, __pyx_v_attrib, __pyx_v_hfunc);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_428cuFuncGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attrib, PyObject *__pyx_v_hfunc) {
  CUfunction __pyx_v_chfunc;
  PyObject *__pyx_v_phfunc = NULL;
  int __pyx_v_pi;
  CUfunction_attribute __pyx_v_cattrib;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUfunction_attribute __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__835)
  __Pyx_RefNannySetupContext("cuFuncGetAttribute", 0);
  __Pyx_TraceCall("cuFuncGetAttribute", __pyx_f[0], 23777, 0, __PYX_ERR(0, 23777, __pyx_L1_error));

  /* "cuda/cuda.pyx":23878
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_hfunc == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23879
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 */
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23878
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23880
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hfunc, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23881
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23882
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23882, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23880
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23884
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 *         phfunc = int(CUfunction(hfunc))             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23885
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 * 
 *     cdef int pi = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23885, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":23887
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 *     cdef int pi = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUfunction_attribute cattrib = attrib.value
 *     err = ccuda.cuFuncGetAttribute(&pi, cattrib, chfunc)
 */
  __pyx_v_pi = 0;

  /* "cuda/cuda.pyx":23888
 * 
 *     cdef int pi = 0
 *     cdef ccuda.CUfunction_attribute cattrib = attrib.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuFuncGetAttribute(&pi, cattrib, chfunc)
 *     return (CUresult(err), pi)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUfunction_attribute_enum)__Pyx_PyInt_As_enum__CUfunction_attribute_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 23888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattrib = __pyx_t_6;

  /* "cuda/cuda.pyx":23889
 *     cdef int pi = 0
 *     cdef ccuda.CUfunction_attribute cattrib = attrib.value
 *     err = ccuda.cuFuncGetAttribute(&pi, cattrib, chfunc)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pi)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuFuncGetAttribute((&__pyx_v_pi), __pyx_v_cattrib, __pyx_v_chfunc); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23889, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":23890
 *     cdef ccuda.CUfunction_attribute cattrib = attrib.value
 *     err = ccuda.cuFuncGetAttribute(&pi, cattrib, chfunc)
 *     return (CUresult(err), pi)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 23890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 23890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23777
 * 
 * @cython.embedsignature(True)
 * def cuFuncGetAttribute(attrib not None : CUfunction_attribute, hfunc):             # <<<<<<<<<<<<<<
 *     """ Returns information about a function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuFuncGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23893
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetAttribute(hfunc, attrib not None : CUfunction_attribute, int value):             # <<<<<<<<<<<<<<
 *     """ Sets information about a function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_431cuFuncSetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_430cuFuncSetAttribute[] = "cuFuncSetAttribute(hfunc, attrib: CUfunction_attribute, int value)\n Sets information about a function.\n\n    This call sets the value of a specified attribute `attrib` on the\n    kernel given by `hfunc` to an integer value specified by `val` This\n    function returns CUDA_SUCCESS if the new value of the attribute could\n    be successfully set. If the set fails, this call will return an error.\n    Not all attributes can have values set. Attempting to set a value on a\n    read-only attribute will result in an error (CUDA_ERROR_INVALID_VALUE)\n\n    Supported attributes for the cuFuncSetAttribute call are:\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES`: This\n      maximum size in bytes of dynamically-allocated shared memory. The\n      value should contain the requested maximum size of dynamically-\n      allocated shared memory. The sum of this value and the function\n      attribute :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES` cannot\n      exceed the device attribute\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN`.\n      The maximal size of requestable dynamic shared memory may differ by\n      GPU architecture.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`: On\n      devices where the L1 cache and shared memory use the same hardware\n      resources, this sets the shared memory carveout preference, in\n      percent of the total shared memory. See\n      :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR`\n      This is only a hint, and the driver can choose a different ratio if\n      required to execute the function.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH`: The required\n      cluster width in blocks. The width, height, and depth values must\n      either all be 0 or all be positive. The validity of the cluster\n      dimensions is checked at launch time. If the value is set during\n      compile time, it cannot be set at runtime. Setting it"" at runtime will\n      return CUDA_ERROR_NOT_PERMITTED.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT`: The required\n      cluster height in blocks. The width, height, and depth values must\n      either all be 0 or all be positive. The validity of the cluster\n      dimensions is checked at launch time. If the value is set during\n      compile time, it cannot be set at runtime. Setting it at runtime will\n      return CUDA_ERROR_NOT_PERMITTED.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH`: The required\n      cluster depth in blocks. The width, height, and depth values must\n      either all be 0 or all be positive. The validity of the cluster\n      dimensions is checked at launch time. If the value is set during\n      compile time, it cannot be set at runtime. Setting it at runtime will\n      return CUDA_ERROR_NOT_PERMITTED.\n\n    - :py:obj:`~.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE`:\n      The block scheduling policy of a function. The value type is\n      CUclusterSchedulingPolicy.\n\n    Parameters\n    ----------\n    hfunc : :py:obj:`~.CUfunction`\n        Function to query attribute of\n    attrib : :py:obj:`~.CUfunction_attribute`\n        Attribute requested\n    value : int\n        The value to set\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cudaFuncGetAttributes`, :py:obj:`~.cudaFuncSetAttribute`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_431cuFuncSetAttribute = {"cuFuncSetAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_431cuFuncSetAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_430cuFuncSetAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_431cuFuncSetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hfunc = 0;
  PyObject *__pyx_v_attrib = 0;
  int __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuFuncSetAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hfunc,&__pyx_n_s_attrib,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hfunc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrib)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuFuncSetAttribute", 1, 3, 3, 1); __PYX_ERR(0, 23893, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuFuncSetAttribute", 1, 3, 3, 2); __PYX_ERR(0, 23893, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuFuncSetAttribute") < 0)) __PYX_ERR(0, 23893, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hfunc = values[0];
    __pyx_v_attrib = values[1];
    __pyx_v_value = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 23893, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuFuncSetAttribute", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23893, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuFuncSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attrib) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attrib"); __PYX_ERR(0, 23893, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_430cuFuncSetAttribute(__pyx_self, __pyx_v_hfunc, __pyx_v_attrib, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_430cuFuncSetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, PyObject *__pyx_v_attrib, int __pyx_v_value) {
  CUfunction __pyx_v_chfunc;
  PyObject *__pyx_v_phfunc = NULL;
  CUfunction_attribute __pyx_v_cattrib;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUfunction_attribute __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__836)
  __Pyx_RefNannySetupContext("cuFuncSetAttribute", 0);
  __Pyx_TraceCall("cuFuncSetAttribute", __pyx_f[0], 23893, 0, __PYX_ERR(0, 23893, __pyx_L1_error));

  /* "cuda/cuda.pyx":23967
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_hfunc == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":23968
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 */
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":23967
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23969
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hfunc, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":23970
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":23971
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23971, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":23969
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":23973
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 *         phfunc = int(CUfunction(hfunc))             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":23974
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUfunction_attribute cattrib = attrib.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 23974, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":23976
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 *     cdef ccuda.CUfunction_attribute cattrib = attrib.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuFuncSetAttribute(chfunc, cattrib, value)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUfunction_attribute_enum)__Pyx_PyInt_As_enum__CUfunction_attribute_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 23976, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattrib = __pyx_t_6;

  /* "cuda/cuda.pyx":23977
 * 
 *     cdef ccuda.CUfunction_attribute cattrib = attrib.value
 *     err = ccuda.cuFuncSetAttribute(chfunc, cattrib, value)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuFuncSetAttribute(__pyx_v_chfunc, __pyx_v_cattrib, __pyx_v_value); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 23977, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":23978
 *     cdef ccuda.CUfunction_attribute cattrib = attrib.value
 *     err = ccuda.cuFuncSetAttribute(chfunc, cattrib, value)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 23978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 23978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23893
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetAttribute(hfunc, attrib not None : CUfunction_attribute, int value):             # <<<<<<<<<<<<<<
 *     """ Sets information about a function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuFuncSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":23981
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetCacheConfig(hfunc, config not None : CUfunc_cache):             # <<<<<<<<<<<<<<
 *     """ Sets the preferred cache configuration for a device function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_433cuFuncSetCacheConfig(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_432cuFuncSetCacheConfig[] = "cuFuncSetCacheConfig(hfunc, config: CUfunc_cache)\n Sets the preferred cache configuration for a device function.\n\n    On devices where the L1 cache and shared memory use the same hardware\n    resources, this sets through `config` the preferred cache configuration\n    for the device function `hfunc`. This is only a preference. The driver\n    will use the requested configuration if possible, but it is free to\n    choose a different configuration if required to execute `hfunc`. Any\n    context-wide preference set via :py:obj:`~.cuCtxSetCacheConfig()` will\n    be overridden by this per-function setting unless the per-function\n    setting is :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE`. In that case, the\n    current context-wide setting will be used.\n\n    This setting does nothing on devices where the size of the L1 cache and\n    shared memory are fixed.\n\n    Launching a kernel with a different preference than the most recent\n    preference setting may insert a device-side synchronization point.\n\n    The supported cache configurations are:\n\n    - :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE`: no preference for shared\n      memory or L1 (default)\n\n    - :py:obj:`~.CU_FUNC_CACHE_PREFER_SHARED`: prefer larger shared memory\n      and smaller L1 cache\n\n    - :py:obj:`~.CU_FUNC_CACHE_PREFER_L1`: prefer larger L1 cache and\n      smaller shared memory\n\n    - :py:obj:`~.CU_FUNC_CACHE_PREFER_EQUAL`: prefer equal sized L1 cache\n      and shared memory\n\n    Parameters\n    ----------\n    hfunc : :py:obj:`~.CUfunction`\n        Kernel to configure cache for\n    config : :py:obj:`~.CUfunc_cache`\n        Requested cache configuration\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:""obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cudaFuncSetCacheConfig`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_433cuFuncSetCacheConfig = {"cuFuncSetCacheConfig", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_433cuFuncSetCacheConfig, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_432cuFuncSetCacheConfig};
static PyObject *__pyx_pw_4cuda_4cuda_433cuFuncSetCacheConfig(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hfunc = 0;
  PyObject *__pyx_v_config = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuFuncSetCacheConfig (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hfunc,&__pyx_n_s_config,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hfunc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuFuncSetCacheConfig", 1, 2, 2, 1); __PYX_ERR(0, 23981, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuFuncSetCacheConfig") < 0)) __PYX_ERR(0, 23981, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hfunc = values[0];
    __pyx_v_config = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuFuncSetCacheConfig", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23981, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuFuncSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_config) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "config"); __PYX_ERR(0, 23981, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_432cuFuncSetCacheConfig(__pyx_self, __pyx_v_hfunc, __pyx_v_config);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_432cuFuncSetCacheConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, PyObject *__pyx_v_config) {
  CUfunction __pyx_v_chfunc;
  PyObject *__pyx_v_phfunc = NULL;
  CUfunc_cache __pyx_v_cconfig;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUfunc_cache __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__837)
  __Pyx_RefNannySetupContext("cuFuncSetCacheConfig", 0);
  __Pyx_TraceCall("cuFuncSetCacheConfig", __pyx_f[0], 23981, 0, __PYX_ERR(0, 23981, __pyx_L1_error));

  /* "cuda/cuda.pyx":24031
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_hfunc == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24032
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 */
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24031
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24033
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hfunc, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24034
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24035
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24035, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24033
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24037
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 *         phfunc = int(CUfunction(hfunc))             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24038
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUfunc_cache cconfig = config.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24038, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":24040
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 *     cdef ccuda.CUfunc_cache cconfig = config.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuFuncSetCacheConfig(chfunc, cconfig)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUfunc_cache_enum)__Pyx_PyInt_As_enum__CUfunc_cache_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 24040, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cconfig = __pyx_t_6;

  /* "cuda/cuda.pyx":24041
 * 
 *     cdef ccuda.CUfunc_cache cconfig = config.value
 *     err = ccuda.cuFuncSetCacheConfig(chfunc, cconfig)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuFuncSetCacheConfig(__pyx_v_chfunc, __pyx_v_cconfig); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24041, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":24042
 *     cdef ccuda.CUfunc_cache cconfig = config.value
 *     err = ccuda.cuFuncSetCacheConfig(chfunc, cconfig)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 24042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":23981
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetCacheConfig(hfunc, config not None : CUfunc_cache):             # <<<<<<<<<<<<<<
 *     """ Sets the preferred cache configuration for a device function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuFuncSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24045
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetSharedMemConfig(hfunc, config not None : CUsharedconfig):             # <<<<<<<<<<<<<<
 *     """ Sets the shared memory configuration for a device function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_435cuFuncSetSharedMemConfig(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_434cuFuncSetSharedMemConfig[] = "cuFuncSetSharedMemConfig(hfunc, config: CUsharedconfig)\n Sets the shared memory configuration for a device function.\n\n    On devices with configurable shared memory banks, this function will\n    force all subsequent launches of the specified device function to have\n    the given shared memory bank size configuration. On any given launch of\n    the function, the shared memory configuration of the device will be\n    temporarily changed if needed to suit the function's preferred\n    configuration. Changes in shared memory configuration between\n    subsequent launches of functions, may introduce a device side\n    synchronization point.\n\n    Any per-function setting of shared memory bank size set via\n    :py:obj:`~.cuFuncSetSharedMemConfig` will override the context wide\n    setting set with :py:obj:`~.cuCtxSetSharedMemConfig`.\n\n    Changing the shared memory bank size will not increase shared memory\n    usage or affect occupancy of kernels, but may have major effects on\n    performance. Larger bank sizes will allow for greater potential\n    bandwidth to shared memory, but will change what kinds of accesses to\n    shared memory will result in bank conflicts.\n\n    This function will do nothing on devices with fixed shared memory bank\n    size.\n\n    The supported bank configurations are:\n\n    - :py:obj:`~.CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE`: use the context's\n      shared memory configuration when launching this function.\n\n    - :py:obj:`~.CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE`: set shared\n      memory bank width to be natively four bytes when launching this\n      function.\n\n    - :py:obj:`~.CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE`: set shared\n      memory bank width to be natively eight bytes when launching this\n      function.\n\n    Parameters\n    ----------\n    hfunc : :py:obj:`~.CUfunction`\n        kernel to be given a shared memory config\n    config : :py:obj:`~.CUsharedconfig`\n        requested shared memory configur""ation\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxGetSharedMemConfig`, :py:obj:`~.cuCtxSetSharedMemConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cudaFuncSetSharedMemConfig`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_435cuFuncSetSharedMemConfig = {"cuFuncSetSharedMemConfig", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_435cuFuncSetSharedMemConfig, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_434cuFuncSetSharedMemConfig};
static PyObject *__pyx_pw_4cuda_4cuda_435cuFuncSetSharedMemConfig(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hfunc = 0;
  PyObject *__pyx_v_config = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuFuncSetSharedMemConfig (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hfunc,&__pyx_n_s_config,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hfunc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuFuncSetSharedMemConfig", 1, 2, 2, 1); __PYX_ERR(0, 24045, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuFuncSetSharedMemConfig") < 0)) __PYX_ERR(0, 24045, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hfunc = values[0];
    __pyx_v_config = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuFuncSetSharedMemConfig", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24045, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuFuncSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_config) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "config"); __PYX_ERR(0, 24045, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_434cuFuncSetSharedMemConfig(__pyx_self, __pyx_v_hfunc, __pyx_v_config);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_434cuFuncSetSharedMemConfig(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, PyObject *__pyx_v_config) {
  CUfunction __pyx_v_chfunc;
  PyObject *__pyx_v_phfunc = NULL;
  CUsharedconfig __pyx_v_cconfig;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUsharedconfig __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__838)
  __Pyx_RefNannySetupContext("cuFuncSetSharedMemConfig", 0);
  __Pyx_TraceCall("cuFuncSetSharedMemConfig", __pyx_f[0], 24045, 0, __PYX_ERR(0, 24045, __pyx_L1_error));

  /* "cuda/cuda.pyx":24100
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_hfunc == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24101
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 */
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24100
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24102
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hfunc, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24103
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24104
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24104, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24102
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24106
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 *         phfunc = int(CUfunction(hfunc))             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24107
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUsharedconfig cconfig = config.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24107, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":24109
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 *     cdef ccuda.CUsharedconfig cconfig = config.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuFuncSetSharedMemConfig(chfunc, cconfig)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUsharedconfig_enum)__Pyx_PyInt_As_enum__CUsharedconfig_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 24109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cconfig = __pyx_t_6;

  /* "cuda/cuda.pyx":24110
 * 
 *     cdef ccuda.CUsharedconfig cconfig = config.value
 *     err = ccuda.cuFuncSetSharedMemConfig(chfunc, cconfig)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuFuncSetSharedMemConfig(__pyx_v_chfunc, __pyx_v_cconfig); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24110, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":24111
 *     cdef ccuda.CUsharedconfig cconfig = config.value
 *     err = ccuda.cuFuncSetSharedMemConfig(chfunc, cconfig)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 24111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24045
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetSharedMemConfig(hfunc, config not None : CUsharedconfig):             # <<<<<<<<<<<<<<
 *     """ Sets the shared memory configuration for a device function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuFuncSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24114
 * 
 * @cython.embedsignature(True)
 * def cuFuncGetModule(hfunc):             # <<<<<<<<<<<<<<
 *     """ Returns a module handle.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_437cuFuncGetModule(PyObject *__pyx_self, PyObject *__pyx_v_hfunc); /*proto*/
static char __pyx_doc_4cuda_4cuda_436cuFuncGetModule[] = "cuFuncGetModule(hfunc)\n Returns a module handle.\n\n    Returns in `*hmod` the handle of the module that function `hfunc` is\n    located in. The lifetime of the module corresponds to the lifetime of\n    the context it was loaded in or until the module is explicitly\n    unloaded.\n\n    The CUDA runtime manages its own modules loaded into the primary\n    context. If the handle returned by this API refers to a module loaded\n    by the CUDA runtime, calling :py:obj:`~.cuModuleUnload()` on that\n    module will result in undefined behavior.\n\n    Parameters\n    ----------\n    hfunc : :py:obj:`~.CUfunction`\n        Function to retrieve module for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`\n    hmod : :py:obj:`~.CUmodule`\n        Returned module handle\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_437cuFuncGetModule = {"cuFuncGetModule", (PyCFunction)__pyx_pw_4cuda_4cuda_437cuFuncGetModule, METH_O, __pyx_doc_4cuda_4cuda_436cuFuncGetModule};
static PyObject *__pyx_pw_4cuda_4cuda_437cuFuncGetModule(PyObject *__pyx_self, PyObject *__pyx_v_hfunc) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuFuncGetModule (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_436cuFuncGetModule(__pyx_self, ((PyObject *)__pyx_v_hfunc));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_436cuFuncGetModule(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc) {
  CUfunction __pyx_v_chfunc;
  PyObject *__pyx_v_phfunc = NULL;
  struct __pyx_obj_4cuda_4cuda_CUmodule *__pyx_v_hmod = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__839)
  __Pyx_RefNannySetupContext("cuFuncGetModule", 0);
  __Pyx_TraceCall("cuFuncGetModule", __pyx_f[0], 24114, 0, __PYX_ERR(0, 24114, __pyx_L1_error));

  /* "cuda/cuda.pyx":24140
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_hfunc == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24141
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 */
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24140
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24142
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hfunc, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24143
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24144
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24144, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24142
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24146
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 *         phfunc = int(CUfunction(hfunc))             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24147
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 * 
 *     cdef CUmodule hmod = CUmodule()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24147, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":24149
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 *     cdef CUmodule hmod = CUmodule()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuFuncGetModule(hmod._ptr, chfunc)
 *     return (CUresult(err), hmod)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmodule)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_hmod = ((struct __pyx_obj_4cuda_4cuda_CUmodule *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":24150
 * 
 *     cdef CUmodule hmod = CUmodule()
 *     err = ccuda.cuFuncGetModule(hmod._ptr, chfunc)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), hmod)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuFuncGetModule(__pyx_v_hmod->_ptr, __pyx_v_chfunc); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24150, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":24151
 *     cdef CUmodule hmod = CUmodule()
 *     err = ccuda.cuFuncGetModule(hmod._ptr, chfunc)
 *     return (CUresult(err), hmod)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_hmod));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_hmod));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_hmod));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24114
 * 
 * @cython.embedsignature(True)
 * def cuFuncGetModule(hfunc):             # <<<<<<<<<<<<<<
 *     """ Returns a module handle.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuFuncGetModule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phfunc);
  __Pyx_XDECREF((PyObject *)__pyx_v_hmod);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24154
 * 
 * @cython.embedsignature(True)
 * def cuLaunchKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams, void_ptr extra):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_439cuLaunchKernel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_438cuLaunchKernel[] = "cuLaunchKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams, void_ptr extra)\n Launches a CUDA function.\n\n    Invokes the kernel `f` on a `gridDimX` x `gridDimY` x `gridDimZ` grid\n    of blocks. Each block contains `blockDimX` x `blockDimY` x `blockDimZ`\n    threads.\n\n    `sharedMemBytes` sets the amount of dynamic shared memory that will be\n    available to each thread block.\n\n    Kernel parameters to `f` can be specified in one of two ways:\n\n    1) Kernel parameters can be specified via `kernelParams`. If `f` has N\n    parameters, then `kernelParams` needs to be an array of N pointers.\n    Each of `kernelParams`[0] through `kernelParams`[N-1] must point to a\n    region of memory from which the actual kernel parameter will be copied.\n    The number of kernel parameters and their offsets and sizes do not need\n    to be specified as that information is retrieved directly from the\n    kernel's image.\n\n    2) Kernel parameters can also be packaged by the application into a\n    single buffer that is passed in via the `extra` parameter. This places\n    the burden on the application of knowing each kernel parameter's size\n    and alignment/padding within the buffer. Here is an example of using\n    the `extra` parameter in this manner:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    The `extra` parameter exists to allow :py:obj:`~.cuLaunchKernel` to\n    take additional less commonly used arguments. `extra` specifies a list\n    of names of extra settings and their corresponding values. Each extra\n    setting name is immediately followed by the corresponding value. The\n    list must be terminated with either NULL or\n    :py:obj:`~.CU_LAUNCH_PARAM_END`.\n\n    - :py:obj:`~.CU_LAUNCH_PARAM_END`, which indicates the end of the\n      `extra` array;\n\n    - :py:obj:`~.CU_LAUNCH_""PARAM_BUFFER_POINTER`, which specifies that the\n      next value in `extra` will be a pointer to a buffer containing all\n      the kernel parameters for launching kernel `f`;\n\n    - :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_SIZE`, which specifies that the\n      next value in `extra` will be a pointer to a size_t containing the\n      size of the buffer specified with\n      :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER`;\n\n    The error :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned if\n    kernel parameters are specified with both `kernelParams` and `extra`\n    (i.e. both `kernelParams` and `extra` are non-NULL).\n\n    Calling :py:obj:`~.cuLaunchKernel()` invalidates the persistent\n    function state set through the following deprecated APIs:\n    :py:obj:`~.cuFuncSetBlockShape()`, :py:obj:`~.cuFuncSetSharedSize()`,\n    :py:obj:`~.cuParamSetSize()`, :py:obj:`~.cuParamSeti()`,\n    :py:obj:`~.cuParamSetf()`, :py:obj:`~.cuParamSetv()`.\n\n    Note that to use :py:obj:`~.cuLaunchKernel()`, the kernel `f` must\n    either have been compiled with toolchain version 3.2 or later so that\n    it will contain kernel parameter information, or have no kernel\n    parameters. If either of these conditions is not met, then\n    :py:obj:`~.cuLaunchKernel()` will return\n    :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`.\n\n    Parameters\n    ----------\n    f : :py:obj:`~.CUfunction`\n        Kernel to launch\n    gridDimX : unsigned int\n        Width of grid in blocks\n    gridDimY : unsigned int\n        Height of grid in blocks\n    gridDimZ : unsigned int\n        Depth of grid in blocks\n    blockDimX : unsigned int\n        X dimension of each thread block\n    blockDimY : unsigned int\n        Y dimension of each thread block\n    blockDimZ : unsigned int\n        Z dimension of each thread block\n    sharedMemBytes : unsigned int\n        Dynamic shared-memory size per thread block in bytes\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream ide""ntifier\n    kernelParams : Any\n        Array of pointers to kernel parameters\n    extra : List[Any]\n        Extra options\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cudaLaunchKernel`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_439cuLaunchKernel = {"cuLaunchKernel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_439cuLaunchKernel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_438cuLaunchKernel};
static PyObject *__pyx_pw_4cuda_4cuda_439cuLaunchKernel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_f = 0;
  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;
  PyObject *__pyx_v_hStream = 0;
  PyObject *__pyx_v_kernelParams = 0;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_extra;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLaunchKernel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_f,&__pyx_n_s_gridDimX_2,&__pyx_n_s_gridDimY_2,&__pyx_n_s_gridDimZ_2,&__pyx_n_s_blockDimX_2,&__pyx_n_s_blockDimY_2,&__pyx_n_s_blockDimZ_2,&__pyx_n_s_sharedMemBytes_2,&__pyx_n_s_hStream_2,&__pyx_n_s_kernelParams_2,&__pyx_n_s_extra_2,0};
    PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        CYTHON_FALLTHROUGH;
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gridDimX_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernel", 1, 11, 11, 1); __PYX_ERR(0, 24154, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gridDimY_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernel", 1, 11, 11, 2); __PYX_ERR(0, 24154, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gridDimZ_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernel", 1, 11, 11, 3); __PYX_ERR(0, 24154, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockDimX_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernel", 1, 11, 11, 4); __PYX_ERR(0, 24154, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockDimY_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernel", 1, 11, 11, 5); __PYX_ERR(0, 24154, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockDimZ_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernel", 1, 11, 11, 6); __PYX_ERR(0, 24154, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sharedMemBytes_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernel", 1, 11, 11, 7); __PYX_ERR(0, 24154, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernel", 1, 11, 11, 8); __PYX_ERR(0, 24154, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kernelParams_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernel", 1, 11, 11, 9); __PYX_ERR(0, 24154, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case 10:
        if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extra_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernel", 1, 11, 11, 10); __PYX_ERR(0, 24154, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuLaunchKernel") < 0)) __PYX_ERR(0, 24154, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 11) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
      values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
    }
    __pyx_v_f = values[0];
    __pyx_v_gridDimX = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_gridDimX == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24154, __pyx_L3_error)
    __pyx_v_gridDimY = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_gridDimY == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24154, __pyx_L3_error)
    __pyx_v_gridDimZ = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_gridDimZ == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24154, __pyx_L3_error)
    __pyx_v_blockDimX = __Pyx_PyInt_As_unsigned_int(values[4]); if (unlikely((__pyx_v_blockDimX == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24154, __pyx_L3_error)
    __pyx_v_blockDimY = __Pyx_PyInt_As_unsigned_int(values[5]); if (unlikely((__pyx_v_blockDimY == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24154, __pyx_L3_error)
    __pyx_v_blockDimZ = __Pyx_PyInt_As_unsigned_int(values[6]); if (unlikely((__pyx_v_blockDimZ == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24154, __pyx_L3_error)
    __pyx_v_sharedMemBytes = __Pyx_PyInt_As_unsigned_int(values[7]); if (unlikely((__pyx_v_sharedMemBytes == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24154, __pyx_L3_error)
    __pyx_v_hStream = values[8];
    __pyx_v_kernelParams = values[9];
    __pyx_v_extra = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[10]); if (unlikely((__pyx_v_extra == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24154, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuLaunchKernel", 1, 11, 11, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24154, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLaunchKernel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_438cuLaunchKernel(__pyx_self, __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_438cuLaunchKernel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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, PyObject *__pyx_v_hStream, PyObject *__pyx_v_kernelParams, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_extra) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUfunction __pyx_v_cf;
  PyObject *__pyx_v_pf = NULL;
  PyObject *__pyx_v_ckernelParams = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__840)
  __Pyx_RefNannySetupContext("cuLaunchKernel", 0);
  __Pyx_TraceCall("cuLaunchKernel", __pyx_f[0], 24154, 0, __PYX_ERR(0, 24154, __pyx_L1_error));

  /* "cuda/cuda.pyx":24253
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24254
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24253
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24255
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24256
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24257
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24257, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24255
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24259
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24260
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUfunction cf
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24260, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":24263
 * 
 *     cdef ccuda.CUfunction cf
 *     if f is None:             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_f == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24264
 *     cdef ccuda.CUfunction cf
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)
 */
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24263
 * 
 *     cdef ccuda.CUfunction cf
 *     if f is None:             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":24265
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_f, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24266
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>pf
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pf = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24267
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf             # <<<<<<<<<<<<<<
 *     else:
 *         pf = int(CUfunction(f))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pf); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24267, __pyx_L1_error)
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24265
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":24269
 *         cf = <ccuda.CUfunction><void_ptr>pf
 *     else:
 *         pf = int(CUfunction(f))             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>pf
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pf = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24270
 *     else:
 *         pf = int(CUfunction(f))
 *         cf = <ccuda.CUfunction><void_ptr>pf             # <<<<<<<<<<<<<<
 * 
 *     ckernelParams = utils.HelperKernelParams(kernelParams)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pf); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24270, __pyx_L1_error)
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":24272
 *         cf = <ccuda.CUfunction><void_ptr>pf
 * 
 *     ckernelParams = utils.HelperKernelParams(kernelParams)             # <<<<<<<<<<<<<<
 *     err = ccuda.cuLaunchKernel(cf, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, chStream, <void**><void_ptr>ckernelParams.ckernelParams, <void**>extra)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperKernelParams), __pyx_v_kernelParams); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_ckernelParams = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":24273
 * 
 *     ckernelParams = utils.HelperKernelParams(kernelParams)
 *     err = ccuda.cuLaunchKernel(cf, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, chStream, <void**><void_ptr>ckernelParams.ckernelParams, <void**>extra)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ckernelParams, __pyx_n_s_ckernelParams); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuLaunchKernel(__pyx_v_cf, __pyx_v_gridDimX, __pyx_v_gridDimY, __pyx_v_gridDimZ, __pyx_v_blockDimX, __pyx_v_blockDimY, __pyx_v_blockDimZ, __pyx_v_sharedMemBytes, __pyx_v_chStream, ((void **)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4)), ((void **)__pyx_v_extra)); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24273, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":24274
 *     ckernelParams = utils.HelperKernelParams(kernelParams)
 *     err = ccuda.cuLaunchKernel(cf, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, chStream, <void**><void_ptr>ckernelParams.ckernelParams, <void**>extra)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24154
 * 
 * @cython.embedsignature(True)
 * def cuLaunchKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams, void_ptr extra):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuLaunchKernel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pf);
  __Pyx_XDECREF(__pyx_v_ckernelParams);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24277
 * 
 * @cython.embedsignature(True)
 * def cuLaunchKernelEx(config : CUlaunchConfig, f, kernelParams, void_ptr extra):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function with launch-time configuration.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_441cuLaunchKernelEx(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_440cuLaunchKernelEx[] = "cuLaunchKernelEx(CUlaunchConfig config: CUlaunchConfig, f, kernelParams, void_ptr extra)\n Launches a CUDA function with launch-time configuration.\n\n    Invokes the kernel `f` with the specified launch-time configuration\n    `config`.\n\n    The :py:obj:`~.CUlaunchConfig` structure is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - :py:obj:`~.CUlaunchConfig.gridDimX` is the width of the grid in\n      blocks.\n\n    - :py:obj:`~.CUlaunchConfig.gridDimY` is the height of the grid in\n      blocks.\n\n    - :py:obj:`~.CUlaunchConfig.gridDimZ` is the depth of the grid in\n      blocks.\n\n    - :py:obj:`~.CUlaunchConfig.blockDimX` is the X dimension of each\n      thread block.\n\n    - :py:obj:`~.CUlaunchConfig.blockDimX` is the Y dimension of each\n      thread block.\n\n    - :py:obj:`~.CUlaunchConfig.blockDimZ` is the Z dimension of each\n      thread block.\n\n    - :py:obj:`~.CUlaunchConfig.sharedMemBytes` is the dynamic shared-\n      memory size per thread block in bytes.\n\n    - :py:obj:`~.CUlaunchConfig.hStream` is the handle to the stream to\n      perform the launch in. The CUDA context associated with this stream\n      must match that associated with function f.\n\n    - :py:obj:`~.CUlaunchConfig.attrs` is an array of\n      :py:obj:`~.CUlaunchConfig.numAttrs` continguous\n      :py:obj:`~.CUlaunchAttribute` elements. The value of this pointer is\n      not considered if :py:obj:`~.CUlaunchConfig.numAttrs` is zero.\n      However, in that case, it is recommended to set the pointer to NULL.\n\n    - :py:obj:`~.CUlaunchConfig.numAttrs` is the numbers of attributes\n      populating the first :py:obj:`~.CUlaunchConfig.numAttrs` positions of\n      the :py:obj:`~.CUlaunchConfig.attrs` array.\n\n    Launch-time configuration is specified by adding entries to\n    :py:obj:`~.CUlaunchConfig.attrs`. Each entry is an attribute ID and a\n    corresponding attribute value.\n\n    The :py:obj:`~.CUlaunchAttribu""te` structure is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - :py:obj:`~.CUlaunchAttribute`::id is a unique enum identifying the\n      attribute.\n\n    - :py:obj:`~.CUlaunchAttribute`::value is a union that hold the\n      attribute value.\n\n    An example of using the `config` parameter:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    The :py:obj:`~.CUlaunchAttributeID` enum is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    and the corresponding :py:obj:`~.CUlaunchAttributeValue` union as :\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    Setting :py:obj:`~.CU_LAUNCH_ATTRIBUTE_COOPERATIVE` to a non-zero value\n    causes the kernel launch to be a cooperative launch, with exactly the\n    same usage and semantics of :py:obj:`~.cuLaunchCooperativeKernel`.\n\n    Setting\n    :py:obj:`~.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION` to a\n    non-zero values causes the kernel to use programmatic means to resolve\n    its stream dependency -- enabling the CUDA runtime to opportunistically\n    allow the grid's execution to overlap with the previous kernel in the\n    stream, if that kernel requests the overlap.\n\n    :py:obj:`~.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT` records an event\n    along with the kernel launch. Event recorded through this launch\n    attribute is guaranteed to only trigger after all block in the\n    associated kernel trigger the event. A block can trigger the event\n    through PTX launchdep.release or CUDA builtin function\n    cudaTriggerProgrammaticLaunchCompletion(). A trigger can also be\n    inserted at the beginning of each block's execution if\n    triggerAtBlockStart is set to non-0. Note that dependents (including\n    the CPU thread calling :py:obj:`~.cuEventSynchronize()`) are not\n    guaranteed to observe the release precisely when it is released. For\n    example, :py:obj:`~.cu""EventSynchronize()` may only observe the event\n    trigger long after the associated kernel has completed. This recording\n    type is primarily meant for establishing programmatic dependency\n    between device tasks. The event supplied must not be an interprocess or\n    interop event. The event must disable timing (i.e. created with\n    :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set).\n\n    The effect of other attributes is consistent with their effect when set\n    via persistent APIs.\n\n    See :py:obj:`~.cuStreamSetAttribute` for\n\n    - :py:obj:`~.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW`\n\n    - :py:obj:`~.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY`\n\n    See :py:obj:`~.cuFunctionSetAttribute` for\n\n    - :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION`\n\n    - :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE`\n\n    Kernel parameters to `f` can be specified in the same ways that they\n    can be using :py:obj:`~.cuLaunchKernel`.\n\n    Parameters\n    ----------\n    config : :py:obj:`~.CUlaunchConfig`\n        Kernel to launch\n    f : :py:obj:`~.CUfunction`\n        Kernel to launch\n    kernelParams : Any\n        Array of pointers to kernel parameters\n    extra : List[Any]\n        Extra options\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncG""etAttribute`, :py:obj:`~.cudaLaunchKernel`, :py:obj:`~.cudaLaunchKernelEx`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_441cuLaunchKernelEx = {"cuLaunchKernelEx", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_441cuLaunchKernelEx, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_440cuLaunchKernelEx};
static PyObject *__pyx_pw_4cuda_4cuda_441cuLaunchKernelEx(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_4cuda_4cuda_CUlaunchConfig *__pyx_v_config = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_kernelParams = 0;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_extra;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLaunchKernelEx (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_config,&__pyx_n_s_f,&__pyx_n_s_kernelParams_2,&__pyx_n_s_extra_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernelEx", 1, 4, 4, 1); __PYX_ERR(0, 24277, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kernelParams_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernelEx", 1, 4, 4, 2); __PYX_ERR(0, 24277, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extra_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchKernelEx", 1, 4, 4, 3); __PYX_ERR(0, 24277, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuLaunchKernelEx") < 0)) __PYX_ERR(0, 24277, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_config = ((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig *)values[0]);
    __pyx_v_f = values[1];
    __pyx_v_kernelParams = values[2];
    __pyx_v_extra = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[3]); if (unlikely((__pyx_v_extra == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24277, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuLaunchKernelEx", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24277, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLaunchKernelEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_config), __pyx_ptype_4cuda_4cuda_CUlaunchConfig, 1, "config", 0))) __PYX_ERR(0, 24277, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_440cuLaunchKernelEx(__pyx_self, __pyx_v_config, __pyx_v_f, __pyx_v_kernelParams, __pyx_v_extra);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_440cuLaunchKernelEx(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUlaunchConfig *__pyx_v_config, PyObject *__pyx_v_f, PyObject *__pyx_v_kernelParams, __pyx_t_4cuda_4cuda_void_ptr __pyx_v_extra) {
  CUfunction __pyx_v_cf;
  PyObject *__pyx_v_pf = NULL;
  CUlaunchConfig *__pyx_v_cconfig_ptr;
  PyObject *__pyx_v_ckernelParams = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUlaunchConfig_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__841)
  __Pyx_RefNannySetupContext("cuLaunchKernelEx", 0);
  __Pyx_TraceCall("cuLaunchKernelEx", __pyx_f[0], 24277, 0, __PYX_ERR(0, 24277, __pyx_L1_error));

  /* "cuda/cuda.pyx":24419
 *     """
 *     cdef ccuda.CUfunction cf
 *     if f is None:             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_f == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24420
 *     cdef ccuda.CUfunction cf
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)
 */
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24419
 *     """
 *     cdef ccuda.CUfunction cf
 *     if f is None:             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24421
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_f, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24422
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>pf
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_f); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pf = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24423
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf             # <<<<<<<<<<<<<<
 *     else:
 *         pf = int(CUfunction(f))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pf); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24423, __pyx_L1_error)
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24421
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24425
 *         cf = <ccuda.CUfunction><void_ptr>pf
 *     else:
 *         pf = int(CUfunction(f))             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>pf
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_f); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pf = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24426
 *     else:
 *         pf = int(CUfunction(f))
 *         cf = <ccuda.CUfunction><void_ptr>pf             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUlaunchConfig* cconfig_ptr = config._ptr if config != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pf); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24426, __pyx_L1_error)
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":24428
 *         cf = <ccuda.CUfunction><void_ptr>pf
 * 
 *     cdef ccuda.CUlaunchConfig* cconfig_ptr = config._ptr if config != None else NULL             # <<<<<<<<<<<<<<
 *     ckernelParams = utils.HelperKernelParams(kernelParams)
 *     err = ccuda.cuLaunchKernelEx(cconfig_ptr, cf, <void**><void_ptr>ckernelParams.ckernelParams, <void**>extra)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_config), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24428, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 24428, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_config->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cconfig_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":24429
 * 
 *     cdef ccuda.CUlaunchConfig* cconfig_ptr = config._ptr if config != None else NULL
 *     ckernelParams = utils.HelperKernelParams(kernelParams)             # <<<<<<<<<<<<<<
 *     err = ccuda.cuLaunchKernelEx(cconfig_ptr, cf, <void**><void_ptr>ckernelParams.ckernelParams, <void**>extra)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperKernelParams), __pyx_v_kernelParams); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_ckernelParams = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":24430
 *     cdef ccuda.CUlaunchConfig* cconfig_ptr = config._ptr if config != None else NULL
 *     ckernelParams = utils.HelperKernelParams(kernelParams)
 *     err = ccuda.cuLaunchKernelEx(cconfig_ptr, cf, <void**><void_ptr>ckernelParams.ckernelParams, <void**>extra)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ckernelParams, __pyx_n_s_ckernelParams); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuLaunchKernelEx(__pyx_v_cconfig_ptr, __pyx_v_cf, ((void **)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4)), ((void **)__pyx_v_extra)); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24430, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":24431
 *     ckernelParams = utils.HelperKernelParams(kernelParams)
 *     err = ccuda.cuLaunchKernelEx(cconfig_ptr, cf, <void**><void_ptr>ckernelParams.ckernelParams, <void**>extra)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 24431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24277
 * 
 * @cython.embedsignature(True)
 * def cuLaunchKernelEx(config : CUlaunchConfig, f, kernelParams, void_ptr extra):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function with launch-time configuration.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuLaunchKernelEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pf);
  __Pyx_XDECREF(__pyx_v_ckernelParams);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24434
 * 
 * @cython.embedsignature(True)
 * def cuLaunchCooperativeKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function where thread blocks can cooperate and synchronize as they execute.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_443cuLaunchCooperativeKernel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_442cuLaunchCooperativeKernel[] = "cuLaunchCooperativeKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams)\n Launches a CUDA function where thread blocks can cooperate and synchronize as they execute.\n\n    Invokes the kernel `f` on a `gridDimX` x `gridDimY` x `gridDimZ` grid\n    of blocks. Each block contains `blockDimX` x `blockDimY` x `blockDimZ`\n    threads.\n\n    `sharedMemBytes` sets the amount of dynamic shared memory that will be\n    available to each thread block.\n\n    The device on which this kernel is invoked must have a non-zero value\n    for the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH`.\n\n    The total number of blocks launched cannot exceed the maximum number of\n    blocks per multiprocessor as returned by\n    :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessor` (or\n    :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags`) times\n    the number of multiprocessors as specified by the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`.\n\n    The kernel cannot make use of CUDA dynamic parallelism.\n\n    Kernel parameters must be specified via `kernelParams`. If `f` has N\n    parameters, then `kernelParams` needs to be an array of N pointers.\n    Each of `kernelParams`[0] through `kernelParams`[N-1] must point to a\n    region of memory from which the actual kernel parameter will be copied.\n    The number of kernel parameters and their offsets and sizes do not need\n    to be specified as that information is retrieved directly from the\n    kernel's image.\n\n    Calling :py:obj:`~.cuLaunchCooperativeKernel()` sets persistent\n    function state that is the same as function state set through\n    :py:obj:`~.cuLaunchKernel` API\n\n    When the kernel `f` is launched via\n    :py:obj:`~.cuLaunchCooperativeKernel()`, the previous block shape,\n    shared size ""and parameter info associated with `f` is overwritten.\n\n    Note that to use :py:obj:`~.cuLaunchCooperativeKernel()`, the kernel\n    `f` must either have been compiled with toolchain version 3.2 or later\n    so that it will contain kernel parameter information, or have no kernel\n    parameters. If either of these conditions is not met, then\n    :py:obj:`~.cuLaunchCooperativeKernel()` will return\n    :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`.\n\n    Parameters\n    ----------\n    f : :py:obj:`~.CUfunction`\n        Kernel to launch\n    gridDimX : unsigned int\n        Width of grid in blocks\n    gridDimY : unsigned int\n        Height of grid in blocks\n    gridDimZ : unsigned int\n        Depth of grid in blocks\n    blockDimX : unsigned int\n        X dimension of each thread block\n    blockDimY : unsigned int\n        Y dimension of each thread block\n    blockDimZ : unsigned int\n        Z dimension of each thread block\n    sharedMemBytes : unsigned int\n        Dynamic shared-memory size per thread block in bytes\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n    kernelParams : Any\n        Array of pointers to kernel parameters\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuLaunchCooperativeKernelMul""tiDevice`, :py:obj:`~.cudaLaunchCooperativeKernel`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_443cuLaunchCooperativeKernel = {"cuLaunchCooperativeKernel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_443cuLaunchCooperativeKernel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_442cuLaunchCooperativeKernel};
static PyObject *__pyx_pw_4cuda_4cuda_443cuLaunchCooperativeKernel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_f = 0;
  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;
  PyObject *__pyx_v_hStream = 0;
  PyObject *__pyx_v_kernelParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLaunchCooperativeKernel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_f,&__pyx_n_s_gridDimX_2,&__pyx_n_s_gridDimY_2,&__pyx_n_s_gridDimZ_2,&__pyx_n_s_blockDimX_2,&__pyx_n_s_blockDimY_2,&__pyx_n_s_blockDimZ_2,&__pyx_n_s_sharedMemBytes_2,&__pyx_n_s_hStream_2,&__pyx_n_s_kernelParams_2,0};
    PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gridDimX_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernel", 1, 10, 10, 1); __PYX_ERR(0, 24434, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gridDimY_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernel", 1, 10, 10, 2); __PYX_ERR(0, 24434, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gridDimZ_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernel", 1, 10, 10, 3); __PYX_ERR(0, 24434, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockDimX_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernel", 1, 10, 10, 4); __PYX_ERR(0, 24434, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockDimY_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernel", 1, 10, 10, 5); __PYX_ERR(0, 24434, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockDimZ_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernel", 1, 10, 10, 6); __PYX_ERR(0, 24434, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sharedMemBytes_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernel", 1, 10, 10, 7); __PYX_ERR(0, 24434, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernel", 1, 10, 10, 8); __PYX_ERR(0, 24434, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kernelParams_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernel", 1, 10, 10, 9); __PYX_ERR(0, 24434, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuLaunchCooperativeKernel") < 0)) __PYX_ERR(0, 24434, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
      values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
    }
    __pyx_v_f = values[0];
    __pyx_v_gridDimX = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_gridDimX == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24434, __pyx_L3_error)
    __pyx_v_gridDimY = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_gridDimY == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24434, __pyx_L3_error)
    __pyx_v_gridDimZ = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_gridDimZ == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24434, __pyx_L3_error)
    __pyx_v_blockDimX = __Pyx_PyInt_As_unsigned_int(values[4]); if (unlikely((__pyx_v_blockDimX == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24434, __pyx_L3_error)
    __pyx_v_blockDimY = __Pyx_PyInt_As_unsigned_int(values[5]); if (unlikely((__pyx_v_blockDimY == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24434, __pyx_L3_error)
    __pyx_v_blockDimZ = __Pyx_PyInt_As_unsigned_int(values[6]); if (unlikely((__pyx_v_blockDimZ == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24434, __pyx_L3_error)
    __pyx_v_sharedMemBytes = __Pyx_PyInt_As_unsigned_int(values[7]); if (unlikely((__pyx_v_sharedMemBytes == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24434, __pyx_L3_error)
    __pyx_v_hStream = values[8];
    __pyx_v_kernelParams = values[9];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernel", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24434, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLaunchCooperativeKernel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_442cuLaunchCooperativeKernel(__pyx_self, __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);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_442cuLaunchCooperativeKernel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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, PyObject *__pyx_v_hStream, PyObject *__pyx_v_kernelParams) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUfunction __pyx_v_cf;
  PyObject *__pyx_v_pf = NULL;
  PyObject *__pyx_v_ckernelParams = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__842)
  __Pyx_RefNannySetupContext("cuLaunchCooperativeKernel", 0);
  __Pyx_TraceCall("cuLaunchCooperativeKernel", __pyx_f[0], 24434, 0, __PYX_ERR(0, 24434, __pyx_L1_error));

  /* "cuda/cuda.pyx":24513
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24514
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24513
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24515
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24516
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24517
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24517, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24515
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24519
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24520
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUfunction cf
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24520, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":24523
 * 
 *     cdef ccuda.CUfunction cf
 *     if f is None:             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_f == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24524
 *     cdef ccuda.CUfunction cf
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)
 */
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24523
 * 
 *     cdef ccuda.CUfunction cf
 *     if f is None:             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":24525
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_f, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24526
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>pf
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pf = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24527
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf             # <<<<<<<<<<<<<<
 *     else:
 *         pf = int(CUfunction(f))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pf); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24527, __pyx_L1_error)
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24525
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":24529
 *         cf = <ccuda.CUfunction><void_ptr>pf
 *     else:
 *         pf = int(CUfunction(f))             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>pf
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pf = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24530
 *     else:
 *         pf = int(CUfunction(f))
 *         cf = <ccuda.CUfunction><void_ptr>pf             # <<<<<<<<<<<<<<
 * 
 *     ckernelParams = utils.HelperKernelParams(kernelParams)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pf); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24530, __pyx_L1_error)
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":24532
 *         cf = <ccuda.CUfunction><void_ptr>pf
 * 
 *     ckernelParams = utils.HelperKernelParams(kernelParams)             # <<<<<<<<<<<<<<
 *     err = ccuda.cuLaunchCooperativeKernel(cf, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, chStream, <void**><void_ptr>ckernelParams.ckernelParams)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperKernelParams), __pyx_v_kernelParams); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_ckernelParams = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":24533
 * 
 *     ckernelParams = utils.HelperKernelParams(kernelParams)
 *     err = ccuda.cuLaunchCooperativeKernel(cf, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, chStream, <void**><void_ptr>ckernelParams.ckernelParams)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ckernelParams, __pyx_n_s_ckernelParams); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24533, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuLaunchCooperativeKernel(__pyx_v_cf, __pyx_v_gridDimX, __pyx_v_gridDimY, __pyx_v_gridDimZ, __pyx_v_blockDimX, __pyx_v_blockDimY, __pyx_v_blockDimZ, __pyx_v_sharedMemBytes, __pyx_v_chStream, ((void **)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4))); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24533, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":24534
 *     ckernelParams = utils.HelperKernelParams(kernelParams)
 *     err = ccuda.cuLaunchCooperativeKernel(cf, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, chStream, <void**><void_ptr>ckernelParams.ckernelParams)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24434
 * 
 * @cython.embedsignature(True)
 * def cuLaunchCooperativeKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function where thread blocks can cooperate and synchronize as they execute.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuLaunchCooperativeKernel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pf);
  __Pyx_XDECREF(__pyx_v_ckernelParams);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24537
 * 
 * @cython.embedsignature(True)
 * def cuLaunchCooperativeKernelMultiDevice(launchParamsList : List[CUDA_LAUNCH_PARAMS], unsigned int numDevices, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Launches CUDA functions on multiple devices where thread blocks can cooperate and synchronize as they execute.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_445cuLaunchCooperativeKernelMultiDevice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_444cuLaunchCooperativeKernelMultiDevice[] = "cuLaunchCooperativeKernelMultiDevice(launchParamsList: List[CUDA_LAUNCH_PARAMS], unsigned int numDevices, unsigned int flags)\n Launches CUDA functions on multiple devices where thread blocks can cooperate and synchronize as they execute.\n\n    [Deprecated]\n\n    Invokes kernels as specified in the `launchParamsList` array where each\n    element of the array specifies all the parameters required to perform a\n    single kernel launch. These kernels can cooperate and synchronize as\n    they execute. The size of the array is specified by `numDevices`.\n\n    No two kernels can be launched on the same device. All the devices\n    targeted by this multi-device launch must be identical. All devices\n    must have a non-zero value for the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH`.\n\n    All kernels launched must be identical with respect to the compiled\n    code. Note that any device, constant or managed variables present in\n    the module that owns the kernel launched on each device, are\n    independently instantiated on every device. It is the application's\n    responsiblity to ensure these variables are initialized and used\n    appropriately.\n\n    The size of the grids as specified in blocks, the size of the blocks\n    themselves and the amount of shared memory used by each thread block\n    must also match across all launched kernels.\n\n    The streams used to launch these kernels must have been created via\n    either :py:obj:`~.cuStreamCreate` or\n    :py:obj:`~.cuStreamCreateWithPriority`. The NULL stream or\n    :py:obj:`~.CU_STREAM_LEGACY` or :py:obj:`~.CU_STREAM_PER_THREAD` cannot\n    be used.\n\n    The total number of blocks launched per kernel cannot exceed the\n    maximum number of blocks per multiprocessor as returned by\n    :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessor` (or\n    :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags`) times\n    the number of multiprocessors as ""specified by the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`. Since the total\n    number of blocks launched per device has to match across all devices,\n    the maximum number of blocks that can be launched per device will be\n    limited by the device with the least number of multiprocessors.\n\n    The kernels cannot make use of CUDA dynamic parallelism.\n\n    The :py:obj:`~.CUDA_LAUNCH_PARAMS` structure is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - :py:obj:`~.CUDA_LAUNCH_PARAMS.function` specifies the kernel to be\n      launched. All functions must be identical with respect to the\n      compiled code.\n\n    - :py:obj:`~.CUDA_LAUNCH_PARAMS.gridDimX` is the width of the grid in\n      blocks. This must match across all kernels launched.\n\n    - :py:obj:`~.CUDA_LAUNCH_PARAMS.gridDimY` is the height of the grid in\n      blocks. This must match across all kernels launched.\n\n    - :py:obj:`~.CUDA_LAUNCH_PARAMS.gridDimZ` is the depth of the grid in\n      blocks. This must match across all kernels launched.\n\n    - :py:obj:`~.CUDA_LAUNCH_PARAMS.blockDimX` is the X dimension of each\n      thread block. This must match across all kernels launched.\n\n    - :py:obj:`~.CUDA_LAUNCH_PARAMS.blockDimX` is the Y dimension of each\n      thread block. This must match across all kernels launched.\n\n    - :py:obj:`~.CUDA_LAUNCH_PARAMS.blockDimZ` is the Z dimension of each\n      thread block. This must match across all kernels launched.\n\n    - :py:obj:`~.CUDA_LAUNCH_PARAMS.sharedMemBytes` is the dynamic shared-\n      memory size per thread block in bytes. This must match across all\n      kernels launched.\n\n    - :py:obj:`~.CUDA_LAUNCH_PARAMS.hStream` is the handle to the stream to\n      perform the launch in. This cannot be the NULL stream or\n      :py:obj:`~.CU_STREAM_LEGACY` or :py:obj:`~.CU_STREAM_PER_THREAD`. The\n      CUDA context associated with this stream must match"" that associated\n      with :py:obj:`~.CUDA_LAUNCH_PARAMS.function`.\n\n    - :py:obj:`~.CUDA_LAUNCH_PARAMS.kernelParams` is an array of pointers\n      to kernel parameters. If :py:obj:`~.CUDA_LAUNCH_PARAMS.function` has\n      N parameters, then :py:obj:`~.CUDA_LAUNCH_PARAMS.kernelParams` needs\n      to be an array of N pointers. Each of\n      :py:obj:`~.CUDA_LAUNCH_PARAMS.kernelParams`[0] through\n      :py:obj:`~.CUDA_LAUNCH_PARAMS.kernelParams`[N-1] must point to a\n      region of memory from which the actual kernel parameter will be\n      copied. The number of kernel parameters and their offsets and sizes\n      do not need to be specified as that information is retrieved directly\n      from the kernel's image.\n\n    By default, the kernel won't begin execution on any GPU until all prior\n    work in all the specified streams has completed. This behavior can be\n    overridden by specifying the flag\n    :py:obj:`~.CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC`.\n    When this flag is specified, each kernel will only wait for prior work\n    in the stream corresponding to that GPU to complete before it begins\n    execution.\n\n    Similarly, by default, any subsequent work pushed in any of the\n    specified streams will not begin execution until the kernels on all\n    GPUs have completed. This behavior can be overridden by specifying the\n    flag\n    :py:obj:`~.CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC`.\n    When this flag is specified, any subsequent work pushed in any of the\n    specified streams will only wait for the kernel launched on the GPU\n    corresponding to that stream to complete before it begins execution.\n\n    Calling :py:obj:`~.cuLaunchCooperativeKernelMultiDevice()` sets\n    persistent function state that is the same as function state set\n    through :py:obj:`~.cuLaunchKernel` API when called individually for\n    each element in `launchParamsList`.\n\n    When kernels are launched via\n    :py:obj:`~"".cuLaunchCooperativeKernelMultiDevice()`, the previous block\n    shape, shared size and parameter info associated with each\n    :py:obj:`~.CUDA_LAUNCH_PARAMS.function` in `launchParamsList` is\n    overwritten.\n\n    Note that to use :py:obj:`~.cuLaunchCooperativeKernelMultiDevice()`,\n    the kernels must either have been compiled with toolchain version 3.2\n    or later so that it will contain kernel parameter information, or have\n    no kernel parameters. If either of these conditions is not met, then\n    :py:obj:`~.cuLaunchCooperativeKernelMultiDevice()` will return\n    :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`.\n\n    Parameters\n    ----------\n    launchParamsList : List[:py:obj:`~.CUDA_LAUNCH_PARAMS`]\n        List of launch parameters, one per device\n    numDevices : unsigned int\n        Size of the `launchParamsList` array\n    flags : unsigned int\n        Flags to control launch behavior\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuLaunchCooperativeKernel`, :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_445cuLaunchCooperativeKernelMultiDevice = {"cuLaunchCooperativeKernelMultiDevice", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_445cuLaunchCooperativeKernelMultiDevice, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_444cuLaunchCooperativeKernelMultiDevice};
static PyObject *__pyx_pw_4cuda_4cuda_445cuLaunchCooperativeKernelMultiDevice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_launchParamsList = 0;
  unsigned int __pyx_v_numDevices;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLaunchCooperativeKernelMultiDevice (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_launchParamsList,&__pyx_n_s_numDevices,&__pyx_n_s_flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_launchParamsList)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDevices)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernelMultiDevice", 1, 3, 3, 1); __PYX_ERR(0, 24537, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernelMultiDevice", 1, 3, 3, 2); __PYX_ERR(0, 24537, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuLaunchCooperativeKernelMultiDevice") < 0)) __PYX_ERR(0, 24537, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_launchParamsList = values[0];
    __pyx_v_numDevices = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_numDevices == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24537, __pyx_L3_error)
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24537, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuLaunchCooperativeKernelMultiDevice", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24537, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLaunchCooperativeKernelMultiDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_444cuLaunchCooperativeKernelMultiDevice(__pyx_self, __pyx_v_launchParamsList, __pyx_v_numDevices, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_36cuLaunchCooperativeKernelMultiDevice_2generator18(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":24684
 *     """
 *     launchParamsList = [] if launchParamsList is None else launchParamsList
 *     if not all(isinstance(_x, (CUDA_LAUNCH_PARAMS)) for _x in launchParamsList):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'launchParamsList' is not instance of type (expected List[ccuda.CUDA_LAUNCH_PARAMS]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_36cuLaunchCooperativeKernelMultiDevice_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_34_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_34_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 24684, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_36cuLaunchCooperativeKernelMultiDevice_2generator18, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuLaunchCooperativeKernelMultiDe, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 24684, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLaunchCooperativeKernelMultiDevice.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_36cuLaunchCooperativeKernelMultiDevice_2generator18(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 24684, 0, __PYX_ERR(0, 24684, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 24684, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_launchParamsList)) { __Pyx_RaiseClosureNameError("launchParamsList"); __PYX_ERR(0, 24684, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_launchParamsList)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_launchParamsList)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_launchParamsList; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_launchParamsList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24684, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 24684, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 24684, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 24684, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 24684, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 24684, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24537
 * 
 * @cython.embedsignature(True)
 * def cuLaunchCooperativeKernelMultiDevice(launchParamsList : List[CUDA_LAUNCH_PARAMS], unsigned int numDevices, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Launches CUDA functions on multiple devices where thread blocks can cooperate and synchronize as they execute.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_444cuLaunchCooperativeKernelMultiDevice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_launchParamsList, unsigned int __pyx_v_numDevices, unsigned int __pyx_v_flags) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *__pyx_cur_scope;
  CUDA_LAUNCH_PARAMS *__pyx_v_claunchParamsList;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_36cuLaunchCooperativeKernelMultiDevice_2generator18 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  struct CUDA_LAUNCH_PARAMS_st *__pyx_t_9;
  CUresult __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__843)
  __Pyx_RefNannySetupContext("cuLaunchCooperativeKernelMultiDevice", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 24537, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuLaunchCooperativeKernelMultiDevice", __pyx_f[0], 24537, 0, __PYX_ERR(0, 24537, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_launchParamsList = __pyx_v_launchParamsList;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_launchParamsList);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_launchParamsList);

  /* "cuda/cuda.pyx":24683
 *     :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuLaunchCooperativeKernel`, :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice`
 *     """
 *     launchParamsList = [] if launchParamsList is None else launchParamsList             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUDA_LAUNCH_PARAMS)) for _x in launchParamsList):
 *         raise TypeError("Argument 'launchParamsList' is not instance of type (expected List[ccuda.CUDA_LAUNCH_PARAMS]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_launchParamsList == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_launchParamsList);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_launchParamsList;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_launchParamsList);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_launchParamsList, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":24684
 *     """
 *     launchParamsList = [] if launchParamsList is None else launchParamsList
 *     if not all(isinstance(_x, (CUDA_LAUNCH_PARAMS)) for _x in launchParamsList):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'launchParamsList' is not instance of type (expected List[ccuda.CUDA_LAUNCH_PARAMS]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_36cuLaunchCooperativeKernelMultiDevice_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 24684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":24685
 *     launchParamsList = [] if launchParamsList is None else launchParamsList
 *     if not all(isinstance(_x, (CUDA_LAUNCH_PARAMS)) for _x in launchParamsList):
 *         raise TypeError("Argument 'launchParamsList' is not instance of type (expected List[ccuda.CUDA_LAUNCH_PARAMS]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_LAUNCH_PARAMS* claunchParamsList = NULL
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__844, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 24685, __pyx_L1_error)

    /* "cuda/cuda.pyx":24684
 *     """
 *     launchParamsList = [] if launchParamsList is None else launchParamsList
 *     if not all(isinstance(_x, (CUDA_LAUNCH_PARAMS)) for _x in launchParamsList):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'launchParamsList' is not instance of type (expected List[ccuda.CUDA_LAUNCH_PARAMS]")
 * 
 */
  }

  /* "cuda/cuda.pyx":24687
 *         raise TypeError("Argument 'launchParamsList' is not instance of type (expected List[ccuda.CUDA_LAUNCH_PARAMS]")
 * 
 *     cdef ccuda.CUDA_LAUNCH_PARAMS* claunchParamsList = NULL             # <<<<<<<<<<<<<<
 *     if len(launchParamsList) > 0:
 *         claunchParamsList = <ccuda.CUDA_LAUNCH_PARAMS*> calloc(len(launchParamsList), sizeof(ccuda.CUDA_LAUNCH_PARAMS))
 */
  __pyx_v_claunchParamsList = NULL;

  /* "cuda/cuda.pyx":24688
 * 
 *     cdef ccuda.CUDA_LAUNCH_PARAMS* claunchParamsList = NULL
 *     if len(launchParamsList) > 0:             # <<<<<<<<<<<<<<
 *         claunchParamsList = <ccuda.CUDA_LAUNCH_PARAMS*> calloc(len(launchParamsList), sizeof(ccuda.CUDA_LAUNCH_PARAMS))
 *         if claunchParamsList is NULL:
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_launchParamsList;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 24688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((__pyx_t_5 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":24689
 *     cdef ccuda.CUDA_LAUNCH_PARAMS* claunchParamsList = NULL
 *     if len(launchParamsList) > 0:
 *         claunchParamsList = <ccuda.CUDA_LAUNCH_PARAMS*> calloc(len(launchParamsList), sizeof(ccuda.CUDA_LAUNCH_PARAMS))             # <<<<<<<<<<<<<<
 *         if claunchParamsList is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(launchParamsList)) + 'x' + str(sizeof(ccuda.CUDA_LAUNCH_PARAMS)))
 */
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_launchParamsList;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 24689, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_claunchParamsList = ((CUDA_LAUNCH_PARAMS *)calloc(__pyx_t_5, (sizeof(CUDA_LAUNCH_PARAMS))));

    /* "cuda/cuda.pyx":24690
 *     if len(launchParamsList) > 0:
 *         claunchParamsList = <ccuda.CUDA_LAUNCH_PARAMS*> calloc(len(launchParamsList), sizeof(ccuda.CUDA_LAUNCH_PARAMS))
 *         if claunchParamsList is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(launchParamsList)) + 'x' + str(sizeof(ccuda.CUDA_LAUNCH_PARAMS)))
 *         for idx in range(len(launchParamsList)):
 */
    __pyx_t_4 = ((__pyx_v_claunchParamsList == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":24691
 *         claunchParamsList = <ccuda.CUDA_LAUNCH_PARAMS*> calloc(len(launchParamsList), sizeof(ccuda.CUDA_LAUNCH_PARAMS))
 *         if claunchParamsList is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(launchParamsList)) + 'x' + str(sizeof(ccuda.CUDA_LAUNCH_PARAMS)))             # <<<<<<<<<<<<<<
 *         for idx in range(len(launchParamsList)):
 *             memcpy(&claunchParamsList[idx], (<CUDA_LAUNCH_PARAMS>launchParamsList[idx])._ptr, sizeof(ccuda.CUDA_LAUNCH_PARAMS))
 */
      __pyx_t_3 = __pyx_cur_scope->__pyx_v_launchParamsList;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 24691, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_n_u_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_LAUNCH_PARAMS))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 24691, __pyx_L1_error)

      /* "cuda/cuda.pyx":24690
 *     if len(launchParamsList) > 0:
 *         claunchParamsList = <ccuda.CUDA_LAUNCH_PARAMS*> calloc(len(launchParamsList), sizeof(ccuda.CUDA_LAUNCH_PARAMS))
 *         if claunchParamsList is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(launchParamsList)) + 'x' + str(sizeof(ccuda.CUDA_LAUNCH_PARAMS)))
 *         for idx in range(len(launchParamsList)):
 */
    }

    /* "cuda/cuda.pyx":24692
 *         if claunchParamsList is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(launchParamsList)) + 'x' + str(sizeof(ccuda.CUDA_LAUNCH_PARAMS)))
 *         for idx in range(len(launchParamsList)):             # <<<<<<<<<<<<<<
 *             memcpy(&claunchParamsList[idx], (<CUDA_LAUNCH_PARAMS>launchParamsList[idx])._ptr, sizeof(ccuda.CUDA_LAUNCH_PARAMS))
 * 
 */
    __pyx_t_6 = __pyx_cur_scope->__pyx_v_launchParamsList;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_5 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 24692, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = __pyx_t_5;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_idx = __pyx_t_8;

      /* "cuda/cuda.pyx":24693
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(launchParamsList)) + 'x' + str(sizeof(ccuda.CUDA_LAUNCH_PARAMS)))
 *         for idx in range(len(launchParamsList)):
 *             memcpy(&claunchParamsList[idx], (<CUDA_LAUNCH_PARAMS>launchParamsList[idx])._ptr, sizeof(ccuda.CUDA_LAUNCH_PARAMS))             # <<<<<<<<<<<<<<
 * 
 *     if numDevices > len(launchParamsList): raise RuntimeError("List is too small: " + str(len(launchParamsList)) + " < " + str(numDevices))
 */
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_launchParamsList, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24693, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      (void)(memcpy((&(__pyx_v_claunchParamsList[__pyx_v_idx])), ((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS *)__pyx_t_6)->__pyx_base._ptr, (sizeof(CUDA_LAUNCH_PARAMS))));
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }

    /* "cuda/cuda.pyx":24688
 * 
 *     cdef ccuda.CUDA_LAUNCH_PARAMS* claunchParamsList = NULL
 *     if len(launchParamsList) > 0:             # <<<<<<<<<<<<<<
 *         claunchParamsList = <ccuda.CUDA_LAUNCH_PARAMS*> calloc(len(launchParamsList), sizeof(ccuda.CUDA_LAUNCH_PARAMS))
 *         if claunchParamsList is NULL:
 */
  }

  /* "cuda/cuda.pyx":24695
 *             memcpy(&claunchParamsList[idx], (<CUDA_LAUNCH_PARAMS>launchParamsList[idx])._ptr, sizeof(ccuda.CUDA_LAUNCH_PARAMS))
 * 
 *     if numDevices > len(launchParamsList): raise RuntimeError("List is too small: " + str(len(launchParamsList)) + " < " + str(numDevices))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuLaunchCooperativeKernelMultiDevice((<CUDA_LAUNCH_PARAMS>launchParamsList[0])._ptr if len(launchParamsList) == 1 else claunchParamsList, numDevices, flags)
 *     if claunchParamsList is not NULL:
 */
  __pyx_t_6 = __pyx_cur_scope->__pyx_v_launchParamsList;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 24695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_4 = ((__pyx_v_numDevices > __pyx_t_5) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_6 = __pyx_cur_scope->__pyx_v_launchParamsList;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_5 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 24695, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_kp_u__660); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_numDevices); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 24695, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":24696
 * 
 *     if numDevices > len(launchParamsList): raise RuntimeError("List is too small: " + str(len(launchParamsList)) + " < " + str(numDevices))
 *     err = ccuda.cuLaunchCooperativeKernelMultiDevice((<CUDA_LAUNCH_PARAMS>launchParamsList[0])._ptr if len(launchParamsList) == 1 else claunchParamsList, numDevices, flags)             # <<<<<<<<<<<<<<
 *     if claunchParamsList is not NULL:
 *         free(claunchParamsList)
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_launchParamsList;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 24696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (((__pyx_t_5 == 1) != 0)) {
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_launchParamsList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = ((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS *)__pyx_t_1)->__pyx_base._ptr;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __pyx_t_9 = __pyx_v_claunchParamsList;
  }
  __pyx_t_10 = __pyx_f_4cuda_5ccuda_cuLaunchCooperativeKernelMultiDevice(__pyx_t_9, __pyx_v_numDevices, __pyx_v_flags); if (unlikely(__pyx_t_10 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24696, __pyx_L1_error)
  __pyx_v_err = __pyx_t_10;

  /* "cuda/cuda.pyx":24697
 *     if numDevices > len(launchParamsList): raise RuntimeError("List is too small: " + str(len(launchParamsList)) + " < " + str(numDevices))
 *     err = ccuda.cuLaunchCooperativeKernelMultiDevice((<CUDA_LAUNCH_PARAMS>launchParamsList[0])._ptr if len(launchParamsList) == 1 else claunchParamsList, numDevices, flags)
 *     if claunchParamsList is not NULL:             # <<<<<<<<<<<<<<
 *         free(claunchParamsList)
 *     return (CUresult(err),)
 */
  __pyx_t_4 = ((__pyx_v_claunchParamsList != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":24698
 *     err = ccuda.cuLaunchCooperativeKernelMultiDevice((<CUDA_LAUNCH_PARAMS>launchParamsList[0])._ptr if len(launchParamsList) == 1 else claunchParamsList, numDevices, flags)
 *     if claunchParamsList is not NULL:
 *         free(claunchParamsList)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
    free(__pyx_v_claunchParamsList);

    /* "cuda/cuda.pyx":24697
 *     if numDevices > len(launchParamsList): raise RuntimeError("List is too small: " + str(len(launchParamsList)) + " < " + str(numDevices))
 *     err = ccuda.cuLaunchCooperativeKernelMultiDevice((<CUDA_LAUNCH_PARAMS>launchParamsList[0])._ptr if len(launchParamsList) == 1 else claunchParamsList, numDevices, flags)
 *     if claunchParamsList is not NULL:             # <<<<<<<<<<<<<<
 *         free(claunchParamsList)
 *     return (CUresult(err),)
 */
  }

  /* "cuda/cuda.pyx":24699
 *     if claunchParamsList is not NULL:
 *         free(claunchParamsList)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24537
 * 
 * @cython.embedsignature(True)
 * def cuLaunchCooperativeKernelMultiDevice(launchParamsList : List[CUDA_LAUNCH_PARAMS], unsigned int numDevices, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Launches CUDA functions on multiple devices where thread blocks can cooperate and synchronize as they execute.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cuda.cuda.cuLaunchCooperativeKernelMultiDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_36cuLaunchCooperativeKernelMultiDevice_2generator18);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24702
 * 
 * @cython.embedsignature(True)
 * def cuLaunchHostFunc(hStream, fn, userData):             # <<<<<<<<<<<<<<
 *     """ Enqueues a host function call in a stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_447cuLaunchHostFunc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_446cuLaunchHostFunc[] = "cuLaunchHostFunc(hStream, fn, userData)\n Enqueues a host function call in a stream.\n\n    Enqueues a host function to run in a stream. The function will be\n    called after currently enqueued work and will block work added after\n    it.\n\n    The host function must not make any CUDA API calls. Attempting to use a\n    CUDA API may result in :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, but this\n    is not required. The host function must not perform any synchronization\n    that may depend on outstanding CUDA work not mandated to run earlier.\n    Host functions without a mandated order (such as in independent\n    streams) execute in undefined order and may be serialized.\n\n    For the purposes of Unified Memory, execution makes a number of\n    guarantees:\n\n    - The stream is considered idle for the duration of the function's\n      execution. Thus, for example, the function may always use memory\n      attached to the stream it was enqueued in.\n\n    - The start of execution of the function has the same effect as\n      synchronizing an event recorded in the same stream immediately prior\n      to the function. It thus synchronizes streams which have been\n      \"joined\" prior to the function.\n\n    - Adding device work to any stream does not have the effect of making\n      the stream active until all preceding host functions and stream\n      callbacks have executed. Thus, for example, a function might use\n      global attached memory even if work has been added to another stream,\n      if the work has been ordered behind the function call with an event.\n\n    - Completion of the function does not cause a stream to become active\n      except as described above. The stream will remain idle if no device\n      work follows the function, and will remain idle across consecutive\n      host functions or stream callbacks without device work in between.\n      Thus, for example, stream synchronization can be done by signaling\n      from a host function at t""he end of the stream.\n\n    Note that, in contrast to :py:obj:`~.cuStreamAddCallback`, the function\n    will not be called in the event of an error in the CUDA context.\n\n    Parameters\n    ----------\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream to enqueue function call in\n    fn : :py:obj:`~.CUhostFn`\n        The function to call once preceding stream operations are complete\n    userData : Any\n        User-specified data to be passed to the function\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuMemAllocManaged`, :py:obj:`~.cuStreamAttachMemAsync`, :py:obj:`~.cuStreamAddCallback`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_447cuLaunchHostFunc = {"cuLaunchHostFunc", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_447cuLaunchHostFunc, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_446cuLaunchHostFunc};
static PyObject *__pyx_pw_4cuda_4cuda_447cuLaunchHostFunc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hStream = 0;
  PyObject *__pyx_v_fn = 0;
  PyObject *__pyx_v_userData = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLaunchHostFunc (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hStream_2,&__pyx_n_s_fn_2,&__pyx_n_s_userData_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fn_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchHostFunc", 1, 3, 3, 1); __PYX_ERR(0, 24702, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_userData_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchHostFunc", 1, 3, 3, 2); __PYX_ERR(0, 24702, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuLaunchHostFunc") < 0)) __PYX_ERR(0, 24702, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hStream = values[0];
    __pyx_v_fn = values[1];
    __pyx_v_userData = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuLaunchHostFunc", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24702, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLaunchHostFunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_446cuLaunchHostFunc(__pyx_self, __pyx_v_hStream, __pyx_v_fn, __pyx_v_userData);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_446cuLaunchHostFunc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hStream, PyObject *__pyx_v_fn, PyObject *__pyx_v_userData) {
  CUhostFn __pyx_v_cfn;
  PyObject *__pyx_v_pfn = NULL;
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  PyObject *__pyx_v_cuserData = NULL;
  void *__pyx_v_cuserData_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__845)
  __Pyx_RefNannySetupContext("cuLaunchHostFunc", 0);
  __Pyx_TraceCall("cuLaunchHostFunc", __pyx_f[0], 24702, 0, __PYX_ERR(0, 24702, __pyx_L1_error));

  /* "cuda/cuda.pyx":24763
 *     """
 *     cdef ccuda.CUhostFn cfn
 *     if fn is None:             # <<<<<<<<<<<<<<
 *         cfn = <ccuda.CUhostFn><void_ptr>0
 *     elif isinstance(fn, (CUhostFn)):
 */
  __pyx_t_1 = (__pyx_v_fn == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24764
 *     cdef ccuda.CUhostFn cfn
 *     if fn is None:
 *         cfn = <ccuda.CUhostFn><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(fn, (CUhostFn)):
 *         pfn = int(fn)
 */
    __pyx_v_cfn = ((CUhostFn)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24763
 *     """
 *     cdef ccuda.CUhostFn cfn
 *     if fn is None:             # <<<<<<<<<<<<<<
 *         cfn = <ccuda.CUhostFn><void_ptr>0
 *     elif isinstance(fn, (CUhostFn)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24765
 *     if fn is None:
 *         cfn = <ccuda.CUhostFn><void_ptr>0
 *     elif isinstance(fn, (CUhostFn)):             # <<<<<<<<<<<<<<
 *         pfn = int(fn)
 *         cfn = <ccuda.CUhostFn><void_ptr>pfn
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_fn, __pyx_ptype_4cuda_4cuda_CUhostFn); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24766
 *         cfn = <ccuda.CUhostFn><void_ptr>0
 *     elif isinstance(fn, (CUhostFn)):
 *         pfn = int(fn)             # <<<<<<<<<<<<<<
 *         cfn = <ccuda.CUhostFn><void_ptr>pfn
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pfn = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24767
 *     elif isinstance(fn, (CUhostFn)):
 *         pfn = int(fn)
 *         cfn = <ccuda.CUhostFn><void_ptr>pfn             # <<<<<<<<<<<<<<
 *     else:
 *         pfn = int(CUhostFn(fn))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfn); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24767, __pyx_L1_error)
    __pyx_v_cfn = ((CUhostFn)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24765
 *     if fn is None:
 *         cfn = <ccuda.CUhostFn><void_ptr>0
 *     elif isinstance(fn, (CUhostFn)):             # <<<<<<<<<<<<<<
 *         pfn = int(fn)
 *         cfn = <ccuda.CUhostFn><void_ptr>pfn
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24769
 *         cfn = <ccuda.CUhostFn><void_ptr>pfn
 *     else:
 *         pfn = int(CUhostFn(fn))             # <<<<<<<<<<<<<<
 *         cfn = <ccuda.CUhostFn><void_ptr>pfn
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUhostFn), __pyx_v_fn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pfn = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24770
 *     else:
 *         pfn = int(CUhostFn(fn))
 *         cfn = <ccuda.CUhostFn><void_ptr>pfn             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream chStream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfn); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24770, __pyx_L1_error)
    __pyx_v_cfn = ((CUhostFn)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":24773
 * 
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24774
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24773
 * 
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":24775
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24776
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24777
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24777, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24775
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":24779
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24780
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cuserData = utils.HelperInputVoidPtr(userData)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24780, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":24782
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 *     cuserData = utils.HelperInputVoidPtr(userData)             # <<<<<<<<<<<<<<
 *     cdef void* cuserData_ptr = <void*><void_ptr>cuserData.cptr
 *     err = ccuda.cuLaunchHostFunc(chStream, cfn, cuserData_ptr)
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_userData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_cuserData = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":24783
 * 
 *     cuserData = utils.HelperInputVoidPtr(userData)
 *     cdef void* cuserData_ptr = <void*><void_ptr>cuserData.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuLaunchHostFunc(chStream, cfn, cuserData_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cuserData, __pyx_n_s_cptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_3); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cuserData_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":24784
 *     cuserData = utils.HelperInputVoidPtr(userData)
 *     cdef void* cuserData_ptr = <void*><void_ptr>cuserData.cptr
 *     err = ccuda.cuLaunchHostFunc(chStream, cfn, cuserData_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuLaunchHostFunc(__pyx_v_chStream, __pyx_v_cfn, __pyx_v_cuserData_ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24784, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":24785
 *     cdef void* cuserData_ptr = <void*><void_ptr>cuserData.cptr
 *     err = ccuda.cuLaunchHostFunc(chStream, cfn, cuserData_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24702
 * 
 * @cython.embedsignature(True)
 * def cuLaunchHostFunc(hStream, fn, userData):             # <<<<<<<<<<<<<<
 *     """ Enqueues a host function call in a stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuLaunchHostFunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pfn);
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_cuserData);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24788
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetBlockShape(hfunc, int x, int y, int z):             # <<<<<<<<<<<<<<
 *     """ Sets the block-dimensions for the function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_449cuFuncSetBlockShape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_448cuFuncSetBlockShape[] = "cuFuncSetBlockShape(hfunc, int x, int y, int z)\n Sets the block-dimensions for the function.\n\n    [Deprecated]\n\n    Specifies the `x`, `y`, and `z` dimensions of the thread blocks that\n    are created when the kernel given by `hfunc` is launched.\n\n    Parameters\n    ----------\n    hfunc : :py:obj:`~.CUfunction`\n        Kernel to specify dimensions of\n    x : int\n        X dimension\n    y : int\n        Y dimension\n    z : int\n        Z dimension\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_449cuFuncSetBlockShape = {"cuFuncSetBlockShape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_449cuFuncSetBlockShape, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_448cuFuncSetBlockShape};
static PyObject *__pyx_pw_4cuda_4cuda_449cuFuncSetBlockShape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hfunc = 0;
  int __pyx_v_x;
  int __pyx_v_y;
  int __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuFuncSetBlockShape (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hfunc,&__pyx_n_s_x,&__pyx_n_s_y_2,&__pyx_n_s_z_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hfunc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuFuncSetBlockShape", 1, 4, 4, 1); __PYX_ERR(0, 24788, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuFuncSetBlockShape", 1, 4, 4, 2); __PYX_ERR(0, 24788, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuFuncSetBlockShape", 1, 4, 4, 3); __PYX_ERR(0, 24788, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuFuncSetBlockShape") < 0)) __PYX_ERR(0, 24788, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hfunc = values[0];
    __pyx_v_x = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_x == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24788, __pyx_L3_error)
    __pyx_v_y = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_y == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24788, __pyx_L3_error)
    __pyx_v_z = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_z == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24788, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuFuncSetBlockShape", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24788, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuFuncSetBlockShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_448cuFuncSetBlockShape(__pyx_self, __pyx_v_hfunc, __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_448cuFuncSetBlockShape(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z) {
  CUfunction __pyx_v_chfunc;
  PyObject *__pyx_v_phfunc = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__846)
  __Pyx_RefNannySetupContext("cuFuncSetBlockShape", 0);
  __Pyx_TraceCall("cuFuncSetBlockShape", __pyx_f[0], 24788, 0, __PYX_ERR(0, 24788, __pyx_L1_error));

  /* "cuda/cuda.pyx":24817
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_hfunc == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24818
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 */
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24817
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24819
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hfunc, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24820
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24821
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24821, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24819
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24823
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 *         phfunc = int(CUfunction(hfunc))             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24824
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuFuncSetBlockShape(chfunc, x, y, z)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24824, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":24826
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 *     err = ccuda.cuFuncSetBlockShape(chfunc, x, y, z)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuFuncSetBlockShape(__pyx_v_chfunc, __pyx_v_x, __pyx_v_y, __pyx_v_z); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24826, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":24827
 * 
 *     err = ccuda.cuFuncSetBlockShape(chfunc, x, y, z)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24788
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetBlockShape(hfunc, int x, int y, int z):             # <<<<<<<<<<<<<<
 *     """ Sets the block-dimensions for the function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuFuncSetBlockShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24830
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetSharedSize(hfunc, unsigned int numbytes):             # <<<<<<<<<<<<<<
 *     """ Sets the dynamic shared-memory size for the function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_451cuFuncSetSharedSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_450cuFuncSetSharedSize[] = "cuFuncSetSharedSize(hfunc, unsigned int numbytes)\n Sets the dynamic shared-memory size for the function.\n\n    [Deprecated]\n\n    Sets through `numbytes` the amount of dynamic shared memory that will\n    be available to each thread block when the kernel given by `hfunc` is\n    launched.\n\n    Parameters\n    ----------\n    hfunc : :py:obj:`~.CUfunction`\n        Kernel to specify dynamic shared-memory size for\n    numbytes : unsigned int\n        Dynamic shared-memory size per thread in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_451cuFuncSetSharedSize = {"cuFuncSetSharedSize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_451cuFuncSetSharedSize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_450cuFuncSetSharedSize};
static PyObject *__pyx_pw_4cuda_4cuda_451cuFuncSetSharedSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hfunc = 0;
  unsigned int __pyx_v_numbytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuFuncSetSharedSize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hfunc,&__pyx_n_s_numbytes,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hfunc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numbytes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuFuncSetSharedSize", 1, 2, 2, 1); __PYX_ERR(0, 24830, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuFuncSetSharedSize") < 0)) __PYX_ERR(0, 24830, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hfunc = values[0];
    __pyx_v_numbytes = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_numbytes == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24830, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuFuncSetSharedSize", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24830, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuFuncSetSharedSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_450cuFuncSetSharedSize(__pyx_self, __pyx_v_hfunc, __pyx_v_numbytes);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_450cuFuncSetSharedSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, unsigned int __pyx_v_numbytes) {
  CUfunction __pyx_v_chfunc;
  PyObject *__pyx_v_phfunc = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__847)
  __Pyx_RefNannySetupContext("cuFuncSetSharedSize", 0);
  __Pyx_TraceCall("cuFuncSetSharedSize", __pyx_f[0], 24830, 0, __PYX_ERR(0, 24830, __pyx_L1_error));

  /* "cuda/cuda.pyx":24856
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_hfunc == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24857
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 */
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24856
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24858
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hfunc, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24859
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24860
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24860, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24858
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24862
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 *         phfunc = int(CUfunction(hfunc))             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24863
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuFuncSetSharedSize(chfunc, numbytes)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24863, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":24865
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 *     err = ccuda.cuFuncSetSharedSize(chfunc, numbytes)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuFuncSetSharedSize(__pyx_v_chfunc, __pyx_v_numbytes); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24865, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":24866
 * 
 *     err = ccuda.cuFuncSetSharedSize(chfunc, numbytes)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24830
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetSharedSize(hfunc, unsigned int numbytes):             # <<<<<<<<<<<<<<
 *     """ Sets the dynamic shared-memory size for the function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuFuncSetSharedSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24869
 * 
 * @cython.embedsignature(True)
 * def cuParamSetSize(hfunc, unsigned int numbytes):             # <<<<<<<<<<<<<<
 *     """ Sets the parameter size for the function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_453cuParamSetSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_452cuParamSetSize[] = "cuParamSetSize(hfunc, unsigned int numbytes)\n Sets the parameter size for the function.\n\n    [Deprecated]\n\n    Sets through `numbytes` the total size in bytes needed by the function\n    parameters of the kernel corresponding to `hfunc`.\n\n    Parameters\n    ----------\n    hfunc : :py:obj:`~.CUfunction`\n        Kernel to set parameter size for\n    numbytes : unsigned int\n        Size of parameter list in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_453cuParamSetSize = {"cuParamSetSize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_453cuParamSetSize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_452cuParamSetSize};
static PyObject *__pyx_pw_4cuda_4cuda_453cuParamSetSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hfunc = 0;
  unsigned int __pyx_v_numbytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuParamSetSize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hfunc,&__pyx_n_s_numbytes,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hfunc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numbytes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuParamSetSize", 1, 2, 2, 1); __PYX_ERR(0, 24869, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuParamSetSize") < 0)) __PYX_ERR(0, 24869, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hfunc = values[0];
    __pyx_v_numbytes = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_numbytes == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24869, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuParamSetSize", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24869, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuParamSetSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_452cuParamSetSize(__pyx_self, __pyx_v_hfunc, __pyx_v_numbytes);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_452cuParamSetSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, unsigned int __pyx_v_numbytes) {
  CUfunction __pyx_v_chfunc;
  PyObject *__pyx_v_phfunc = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__848)
  __Pyx_RefNannySetupContext("cuParamSetSize", 0);
  __Pyx_TraceCall("cuParamSetSize", __pyx_f[0], 24869, 0, __PYX_ERR(0, 24869, __pyx_L1_error));

  /* "cuda/cuda.pyx":24894
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_hfunc == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24895
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 */
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24894
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24896
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hfunc, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24897
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24898
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24898, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24896
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24900
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 *         phfunc = int(CUfunction(hfunc))             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24901
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuParamSetSize(chfunc, numbytes)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24901, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":24903
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 *     err = ccuda.cuParamSetSize(chfunc, numbytes)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuParamSetSize(__pyx_v_chfunc, __pyx_v_numbytes); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24903, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":24904
 * 
 *     err = ccuda.cuParamSetSize(chfunc, numbytes)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24869
 * 
 * @cython.embedsignature(True)
 * def cuParamSetSize(hfunc, unsigned int numbytes):             # <<<<<<<<<<<<<<
 *     """ Sets the parameter size for the function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuParamSetSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24907
 * 
 * @cython.embedsignature(True)
 * def cuParamSeti(hfunc, int offset, unsigned int value):             # <<<<<<<<<<<<<<
 *     """ Adds an integer parameter to the function's argument list.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_455cuParamSeti(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_454cuParamSeti[] = "cuParamSeti(hfunc, int offset, unsigned int value)\n Adds an integer parameter to the function's argument list.\n\n    [Deprecated]\n\n    Sets an integer parameter that will be specified the next time the\n    kernel corresponding to `hfunc` will be invoked. `offset` is a byte\n    offset.\n\n    Parameters\n    ----------\n    hfunc : :py:obj:`~.CUfunction`\n        Kernel to add parameter to\n    offset : int\n        Offset to add parameter to argument list\n    value : unsigned int\n        Value of parameter\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_455cuParamSeti = {"cuParamSeti", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_455cuParamSeti, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_454cuParamSeti};
static PyObject *__pyx_pw_4cuda_4cuda_455cuParamSeti(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hfunc = 0;
  int __pyx_v_offset;
  unsigned int __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuParamSeti (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hfunc,&__pyx_n_s_offset_2,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hfunc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuParamSeti", 1, 3, 3, 1); __PYX_ERR(0, 24907, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuParamSeti", 1, 3, 3, 2); __PYX_ERR(0, 24907, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuParamSeti") < 0)) __PYX_ERR(0, 24907, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hfunc = values[0];
    __pyx_v_offset = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24907, __pyx_L3_error)
    __pyx_v_value = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_value == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24907, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuParamSeti", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24907, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuParamSeti", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_454cuParamSeti(__pyx_self, __pyx_v_hfunc, __pyx_v_offset, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_454cuParamSeti(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, int __pyx_v_offset, unsigned int __pyx_v_value) {
  CUfunction __pyx_v_chfunc;
  PyObject *__pyx_v_phfunc = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__849)
  __Pyx_RefNannySetupContext("cuParamSeti", 0);
  __Pyx_TraceCall("cuParamSeti", __pyx_f[0], 24907, 0, __PYX_ERR(0, 24907, __pyx_L1_error));

  /* "cuda/cuda.pyx":24935
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_hfunc == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24936
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 */
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24935
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24937
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hfunc, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24938
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24939
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24939, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24937
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24941
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 *         phfunc = int(CUfunction(hfunc))             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24942
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuParamSeti(chfunc, offset, value)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24942, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":24944
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 *     err = ccuda.cuParamSeti(chfunc, offset, value)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuParamSeti(__pyx_v_chfunc, __pyx_v_offset, __pyx_v_value); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24944, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":24945
 * 
 *     err = ccuda.cuParamSeti(chfunc, offset, value)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24907
 * 
 * @cython.embedsignature(True)
 * def cuParamSeti(hfunc, int offset, unsigned int value):             # <<<<<<<<<<<<<<
 *     """ Adds an integer parameter to the function's argument list.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuParamSeti", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24948
 * 
 * @cython.embedsignature(True)
 * def cuParamSetf(hfunc, int offset, float value):             # <<<<<<<<<<<<<<
 *     """ Adds a floating-point parameter to the function's argument list.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_457cuParamSetf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_456cuParamSetf[] = "cuParamSetf(hfunc, int offset, float value)\n Adds a floating-point parameter to the function's argument list.\n\n    [Deprecated]\n\n    Sets a floating-point parameter that will be specified the next time\n    the kernel corresponding to `hfunc` will be invoked. `offset` is a byte\n    offset.\n\n    Parameters\n    ----------\n    hfunc : :py:obj:`~.CUfunction`\n        Kernel to add parameter to\n    offset : int\n        Offset to add parameter to argument list\n    value : float\n        Value of parameter\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_457cuParamSetf = {"cuParamSetf", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_457cuParamSetf, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_456cuParamSetf};
static PyObject *__pyx_pw_4cuda_4cuda_457cuParamSetf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hfunc = 0;
  int __pyx_v_offset;
  float __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuParamSetf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hfunc,&__pyx_n_s_offset_2,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hfunc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuParamSetf", 1, 3, 3, 1); __PYX_ERR(0, 24948, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuParamSetf", 1, 3, 3, 2); __PYX_ERR(0, 24948, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuParamSetf") < 0)) __PYX_ERR(0, 24948, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hfunc = values[0];
    __pyx_v_offset = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24948, __pyx_L3_error)
    __pyx_v_value = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_value == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 24948, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuParamSetf", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24948, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuParamSetf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_456cuParamSetf(__pyx_self, __pyx_v_hfunc, __pyx_v_offset, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_456cuParamSetf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, int __pyx_v_offset, float __pyx_v_value) {
  CUfunction __pyx_v_chfunc;
  PyObject *__pyx_v_phfunc = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__850)
  __Pyx_RefNannySetupContext("cuParamSetf", 0);
  __Pyx_TraceCall("cuParamSetf", __pyx_f[0], 24948, 0, __PYX_ERR(0, 24948, __pyx_L1_error));

  /* "cuda/cuda.pyx":24976
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_hfunc == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":24977
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 */
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":24976
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24978
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hfunc, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":24979
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":24980
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24980, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":24978
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":24982
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 *         phfunc = int(CUfunction(hfunc))             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":24983
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuParamSetf(chfunc, offset, value)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 24983, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":24985
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 *     err = ccuda.cuParamSetf(chfunc, offset, value)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuParamSetf(__pyx_v_chfunc, __pyx_v_offset, __pyx_v_value); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 24985, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":24986
 * 
 *     err = ccuda.cuParamSetf(chfunc, offset, value)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 24986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24948
 * 
 * @cython.embedsignature(True)
 * def cuParamSetf(hfunc, int offset, float value):             # <<<<<<<<<<<<<<
 *     """ Adds a floating-point parameter to the function's argument list.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuParamSetf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":24989
 * 
 * @cython.embedsignature(True)
 * def cuParamSetv(hfunc, int offset, ptr, unsigned int numbytes):             # <<<<<<<<<<<<<<
 *     """ Adds arbitrary data to the function's argument list.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_459cuParamSetv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_458cuParamSetv[] = "cuParamSetv(hfunc, int offset, ptr, unsigned int numbytes)\n Adds arbitrary data to the function's argument list.\n\n    [Deprecated]\n\n    Copies an arbitrary amount of data (specified in `numbytes`) from `ptr`\n    into the parameter space of the kernel corresponding to `hfunc`.\n    `offset` is a byte offset.\n\n    Parameters\n    ----------\n    hfunc : :py:obj:`~.CUfunction`\n        Kernel to add data to\n    offset : int\n        Offset to add data to argument list\n    ptr : Any\n        Pointer to arbitrary data\n    numbytes : unsigned int\n        Size of data to copy in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_459cuParamSetv = {"cuParamSetv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_459cuParamSetv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_458cuParamSetv};
static PyObject *__pyx_pw_4cuda_4cuda_459cuParamSetv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hfunc = 0;
  int __pyx_v_offset;
  PyObject *__pyx_v_ptr = 0;
  unsigned int __pyx_v_numbytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuParamSetv (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hfunc,&__pyx_n_s_offset_2,&__pyx_n_s_ptr_2,&__pyx_n_s_numbytes,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hfunc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuParamSetv", 1, 4, 4, 1); __PYX_ERR(0, 24989, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuParamSetv", 1, 4, 4, 2); __PYX_ERR(0, 24989, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numbytes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuParamSetv", 1, 4, 4, 3); __PYX_ERR(0, 24989, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuParamSetv") < 0)) __PYX_ERR(0, 24989, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hfunc = values[0];
    __pyx_v_offset = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24989, __pyx_L3_error)
    __pyx_v_ptr = values[2];
    __pyx_v_numbytes = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_numbytes == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 24989, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuParamSetv", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 24989, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuParamSetv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_458cuParamSetv(__pyx_self, __pyx_v_hfunc, __pyx_v_offset, __pyx_v_ptr, __pyx_v_numbytes);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_458cuParamSetv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, int __pyx_v_offset, PyObject *__pyx_v_ptr, unsigned int __pyx_v_numbytes) {
  CUfunction __pyx_v_chfunc;
  PyObject *__pyx_v_phfunc = NULL;
  PyObject *__pyx_v_cptr = NULL;
  void *__pyx_v_cptr_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__851)
  __Pyx_RefNannySetupContext("cuParamSetv", 0);
  __Pyx_TraceCall("cuParamSetv", __pyx_f[0], 24989, 0, __PYX_ERR(0, 24989, __pyx_L1_error));

  /* "cuda/cuda.pyx":25019
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_hfunc == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25020
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 */
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25019
 *     """
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25021
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hfunc, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25022
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25023
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25023, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25021
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25025
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 *         phfunc = int(CUfunction(hfunc))             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_hfunc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25026
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 * 
 *     cptr = utils.HelperInputVoidPtr(ptr)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25026, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25028
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 *     cptr = utils.HelperInputVoidPtr(ptr)             # <<<<<<<<<<<<<<
 *     cdef void* cptr_ptr = <void*><void_ptr>cptr.cptr
 *     err = ccuda.cuParamSetv(chfunc, offset, cptr_ptr, numbytes)
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_ptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_cptr = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":25029
 * 
 *     cptr = utils.HelperInputVoidPtr(ptr)
 *     cdef void* cptr_ptr = <void*><void_ptr>cptr.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuParamSetv(chfunc, offset, cptr_ptr, numbytes)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cptr, __pyx_n_s_cptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cptr_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":25030
 *     cptr = utils.HelperInputVoidPtr(ptr)
 *     cdef void* cptr_ptr = <void*><void_ptr>cptr.cptr
 *     err = ccuda.cuParamSetv(chfunc, offset, cptr_ptr, numbytes)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuParamSetv(__pyx_v_chfunc, __pyx_v_offset, __pyx_v_cptr_ptr, __pyx_v_numbytes); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25030, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":25031
 *     cdef void* cptr_ptr = <void*><void_ptr>cptr.cptr
 *     err = ccuda.cuParamSetv(chfunc, offset, cptr_ptr, numbytes)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":24989
 * 
 * @cython.embedsignature(True)
 * def cuParamSetv(hfunc, int offset, ptr, unsigned int numbytes):             # <<<<<<<<<<<<<<
 *     """ Adds arbitrary data to the function's argument list.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuParamSetv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phfunc);
  __Pyx_XDECREF(__pyx_v_cptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25034
 * 
 * @cython.embedsignature(True)
 * def cuLaunch(f):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_461cuLaunch(PyObject *__pyx_self, PyObject *__pyx_v_f); /*proto*/
static char __pyx_doc_4cuda_4cuda_460cuLaunch[] = "cuLaunch(f)\n Launches a CUDA function.\n\n    [Deprecated]\n\n    Invokes the kernel `f` on a 1 x 1 x 1 grid of blocks. The block\n    contains the number of threads specified by a previous call to\n    :py:obj:`~.cuFuncSetBlockShape()`.\n\n    The block shape, dynamic shared memory size, and parameter information\n    must be set using :py:obj:`~.cuFuncSetBlockShape()`,\n    :py:obj:`~.cuFuncSetSharedSize()`, :py:obj:`~.cuParamSetSize()`,\n    :py:obj:`~.cuParamSeti()`, :py:obj:`~.cuParamSetf()`, and\n    :py:obj:`~.cuParamSetv()` prior to calling this function.\n\n    Launching a function via :py:obj:`~.cuLaunchKernel()` invalidates the\n    function's block shape, dynamic shared memory size, and parameter\n    information. After launching via cuLaunchKernel, this state must be re-\n    initialized prior to calling this function. Failure to do so results in\n    undefined behavior.\n\n    Parameters\n    ----------\n    f : :py:obj:`~.CUfunction`\n        Kernel to launch\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`\n\n    See Also\n    --------\n    :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_461cuLaunch = {"cuLaunch", (PyCFunction)__pyx_pw_4cuda_4cuda_461cuLaunch, METH_O, __pyx_doc_4cuda_4cuda_460cuLaunch};
static PyObject *__pyx_pw_4cuda_4cuda_461cuLaunch(PyObject *__pyx_self, PyObject *__pyx_v_f) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLaunch (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_460cuLaunch(__pyx_self, ((PyObject *)__pyx_v_f));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_460cuLaunch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f) {
  CUfunction __pyx_v_cf;
  PyObject *__pyx_v_pf = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__852)
  __Pyx_RefNannySetupContext("cuLaunch", 0);
  __Pyx_TraceCall("cuLaunch", __pyx_f[0], 25034, 0, __PYX_ERR(0, 25034, __pyx_L1_error));

  /* "cuda/cuda.pyx":25070
 *     """
 *     cdef ccuda.CUfunction cf
 *     if f is None:             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_f == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25071
 *     cdef ccuda.CUfunction cf
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)
 */
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25070
 *     """
 *     cdef ccuda.CUfunction cf
 *     if f is None:             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25072
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_f, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25073
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>pf
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_f); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pf = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25074
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf             # <<<<<<<<<<<<<<
 *     else:
 *         pf = int(CUfunction(f))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pf); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25074, __pyx_L1_error)
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25072
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25076
 *         cf = <ccuda.CUfunction><void_ptr>pf
 *     else:
 *         pf = int(CUfunction(f))             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>pf
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_f); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pf = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25077
 *     else:
 *         pf = int(CUfunction(f))
 *         cf = <ccuda.CUfunction><void_ptr>pf             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuLaunch(cf)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pf); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25077, __pyx_L1_error)
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25079
 *         cf = <ccuda.CUfunction><void_ptr>pf
 * 
 *     err = ccuda.cuLaunch(cf)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuLaunch(__pyx_v_cf); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25079, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":25080
 * 
 *     err = ccuda.cuLaunch(cf)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25034
 * 
 * @cython.embedsignature(True)
 * def cuLaunch(f):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25083
 * 
 * @cython.embedsignature(True)
 * def cuLaunchGrid(f, int grid_width, int grid_height):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_463cuLaunchGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_462cuLaunchGrid[] = "cuLaunchGrid(f, int grid_width, int grid_height)\n Launches a CUDA function.\n\n    [Deprecated]\n\n    Invokes the kernel `f` on a `grid_width` x `grid_height` grid of\n    blocks. Each block contains the number of threads specified by a\n    previous call to :py:obj:`~.cuFuncSetBlockShape()`.\n\n    The block shape, dynamic shared memory size, and parameter information\n    must be set using :py:obj:`~.cuFuncSetBlockShape()`,\n    :py:obj:`~.cuFuncSetSharedSize()`, :py:obj:`~.cuParamSetSize()`,\n    :py:obj:`~.cuParamSeti()`, :py:obj:`~.cuParamSetf()`, and\n    :py:obj:`~.cuParamSetv()` prior to calling this function.\n\n    Launching a function via :py:obj:`~.cuLaunchKernel()` invalidates the\n    function's block shape, dynamic shared memory size, and parameter\n    information. After launching via cuLaunchKernel, this state must be re-\n    initialized prior to calling this function. Failure to do so results in\n    undefined behavior.\n\n    Parameters\n    ----------\n    f : :py:obj:`~.CUfunction`\n        Kernel to launch\n    grid_width : int\n        Width of grid in blocks\n    grid_height : int\n        Height of grid in blocks\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`\n\n    See Also\n    --------\n    :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_463cuLaunchGrid = {"cuLaunchGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_463cuLaunchGrid, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_462cuLaunchGrid};
static PyObject *__pyx_pw_4cuda_4cuda_463cuLaunchGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_f = 0;
  int __pyx_v_grid_width;
  int __pyx_v_grid_height;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLaunchGrid (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_f,&__pyx_n_s_grid_width,&__pyx_n_s_grid_height,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grid_width)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchGrid", 1, 3, 3, 1); __PYX_ERR(0, 25083, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grid_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchGrid", 1, 3, 3, 2); __PYX_ERR(0, 25083, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuLaunchGrid") < 0)) __PYX_ERR(0, 25083, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_f = values[0];
    __pyx_v_grid_width = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_grid_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 25083, __pyx_L3_error)
    __pyx_v_grid_height = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_grid_height == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 25083, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuLaunchGrid", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25083, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLaunchGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_462cuLaunchGrid(__pyx_self, __pyx_v_f, __pyx_v_grid_width, __pyx_v_grid_height);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_462cuLaunchGrid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height) {
  CUfunction __pyx_v_cf;
  PyObject *__pyx_v_pf = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__853)
  __Pyx_RefNannySetupContext("cuLaunchGrid", 0);
  __Pyx_TraceCall("cuLaunchGrid", __pyx_f[0], 25083, 0, __PYX_ERR(0, 25083, __pyx_L1_error));

  /* "cuda/cuda.pyx":25123
 *     """
 *     cdef ccuda.CUfunction cf
 *     if f is None:             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_f == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25124
 *     cdef ccuda.CUfunction cf
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)
 */
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25123
 *     """
 *     cdef ccuda.CUfunction cf
 *     if f is None:             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25125
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_f, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25126
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>pf
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_f); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pf = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25127
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf             # <<<<<<<<<<<<<<
 *     else:
 *         pf = int(CUfunction(f))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pf); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25127, __pyx_L1_error)
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25125
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25129
 *         cf = <ccuda.CUfunction><void_ptr>pf
 *     else:
 *         pf = int(CUfunction(f))             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>pf
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_f); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pf = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25130
 *     else:
 *         pf = int(CUfunction(f))
 *         cf = <ccuda.CUfunction><void_ptr>pf             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuLaunchGrid(cf, grid_width, grid_height)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pf); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25130, __pyx_L1_error)
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25132
 *         cf = <ccuda.CUfunction><void_ptr>pf
 * 
 *     err = ccuda.cuLaunchGrid(cf, grid_width, grid_height)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuLaunchGrid(__pyx_v_cf, __pyx_v_grid_width, __pyx_v_grid_height); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25132, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":25133
 * 
 *     err = ccuda.cuLaunchGrid(cf, grid_width, grid_height)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25083
 * 
 * @cython.embedsignature(True)
 * def cuLaunchGrid(f, int grid_width, int grid_height):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuLaunchGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25136
 * 
 * @cython.embedsignature(True)
 * def cuLaunchGridAsync(f, int grid_width, int grid_height, hStream):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_465cuLaunchGridAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_464cuLaunchGridAsync[] = "cuLaunchGridAsync(f, int grid_width, int grid_height, hStream)\n Launches a CUDA function.\n\n    [Deprecated]\n\n    Invokes the kernel `f` on a `grid_width` x `grid_height` grid of\n    blocks. Each block contains the number of threads specified by a\n    previous call to :py:obj:`~.cuFuncSetBlockShape()`.\n\n    The block shape, dynamic shared memory size, and parameter information\n    must be set using :py:obj:`~.cuFuncSetBlockShape()`,\n    :py:obj:`~.cuFuncSetSharedSize()`, :py:obj:`~.cuParamSetSize()`,\n    :py:obj:`~.cuParamSeti()`, :py:obj:`~.cuParamSetf()`, and\n    :py:obj:`~.cuParamSetv()` prior to calling this function.\n\n    Launching a function via :py:obj:`~.cuLaunchKernel()` invalidates the\n    function's block shape, dynamic shared memory size, and parameter\n    information. After launching via cuLaunchKernel, this state must be re-\n    initialized prior to calling this function. Failure to do so results in\n    undefined behavior.\n\n    \note_null_stream\n\n    Parameters\n    ----------\n    f : :py:obj:`~.CUfunction`\n        Kernel to launch\n    grid_width : int\n        Width of grid in blocks\n    grid_height : int\n        Height of grid in blocks\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream identifier\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`\n\n    See Also\n    --------\n    :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSeti`, "":py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchKernel`\n\n    Notes\n    -----\n    In certain cases where cubins are created with no ABI (i.e., using `ptxas` `None` `no`), this function may serialize kernel launches. The CUDA driver retains asynchronous behavior by growing the per-thread stack as needed per launch and not shrinking it afterwards.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_465cuLaunchGridAsync = {"cuLaunchGridAsync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_465cuLaunchGridAsync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_464cuLaunchGridAsync};
static PyObject *__pyx_pw_4cuda_4cuda_465cuLaunchGridAsync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_f = 0;
  int __pyx_v_grid_width;
  int __pyx_v_grid_height;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuLaunchGridAsync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_f,&__pyx_n_s_grid_width,&__pyx_n_s_grid_height,&__pyx_n_s_hStream_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grid_width)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchGridAsync", 1, 4, 4, 1); __PYX_ERR(0, 25136, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grid_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchGridAsync", 1, 4, 4, 2); __PYX_ERR(0, 25136, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuLaunchGridAsync", 1, 4, 4, 3); __PYX_ERR(0, 25136, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuLaunchGridAsync") < 0)) __PYX_ERR(0, 25136, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_f = values[0];
    __pyx_v_grid_width = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_grid_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 25136, __pyx_L3_error)
    __pyx_v_grid_height = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_grid_height == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 25136, __pyx_L3_error)
    __pyx_v_hStream = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuLaunchGridAsync", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25136, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuLaunchGridAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_464cuLaunchGridAsync(__pyx_self, __pyx_v_f, __pyx_v_grid_width, __pyx_v_grid_height, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_464cuLaunchGridAsync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUfunction __pyx_v_cf;
  PyObject *__pyx_v_pf = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__854)
  __Pyx_RefNannySetupContext("cuLaunchGridAsync", 0);
  __Pyx_TraceCall("cuLaunchGridAsync", __pyx_f[0], 25136, 0, __PYX_ERR(0, 25136, __pyx_L1_error));

  /* "cuda/cuda.pyx":25184
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25185
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25184
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25186
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25187
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25188
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25188, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25186
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25190
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25191
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUfunction cf
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25191, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25194
 * 
 *     cdef ccuda.CUfunction cf
 *     if f is None:             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_f == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25195
 *     cdef ccuda.CUfunction cf
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)
 */
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25194
 * 
 *     cdef ccuda.CUfunction cf
 *     if f is None:             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":25196
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_f, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25197
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>pf
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pf = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25198
 *     elif isinstance(f, (CUfunction)):
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf             # <<<<<<<<<<<<<<
 *     else:
 *         pf = int(CUfunction(f))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pf); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25198, __pyx_L1_error)
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25196
 *     if f is None:
 *         cf = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(f, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pf = int(f)
 *         cf = <ccuda.CUfunction><void_ptr>pf
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":25200
 *         cf = <ccuda.CUfunction><void_ptr>pf
 *     else:
 *         pf = int(CUfunction(f))             # <<<<<<<<<<<<<<
 *         cf = <ccuda.CUfunction><void_ptr>pf
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pf = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25201
 *     else:
 *         pf = int(CUfunction(f))
 *         cf = <ccuda.CUfunction><void_ptr>pf             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuLaunchGridAsync(cf, grid_width, grid_height, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pf); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25201, __pyx_L1_error)
    __pyx_v_cf = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":25203
 *         cf = <ccuda.CUfunction><void_ptr>pf
 * 
 *     err = ccuda.cuLaunchGridAsync(cf, grid_width, grid_height, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuLaunchGridAsync(__pyx_v_cf, __pyx_v_grid_width, __pyx_v_grid_height, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25203, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":25204
 * 
 *     err = ccuda.cuLaunchGridAsync(cf, grid_width, grid_height, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25136
 * 
 * @cython.embedsignature(True)
 * def cuLaunchGridAsync(f, int grid_width, int grid_height, hStream):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuLaunchGridAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_pf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25207
 * 
 * @cython.embedsignature(True)
 * def cuParamSetTexRef(hfunc, int texunit, hTexRef):             # <<<<<<<<<<<<<<
 *     """ Adds a texture-reference to the function's argument list.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_467cuParamSetTexRef(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_466cuParamSetTexRef[] = "cuParamSetTexRef(hfunc, int texunit, hTexRef)\n Adds a texture-reference to the function's argument list.\n\n    [Deprecated]\n\n    Makes the CUDA array or linear memory bound to the texture reference\n    `hTexRef` available to a device program as a texture. In this version\n    of CUDA, the texture-reference must be obtained via\n    :py:obj:`~.cuModuleGetTexRef()` and the `texunit` parameter must be set\n    to :py:obj:`~.CU_PARAM_TR_DEFAULT`.\n\n    Parameters\n    ----------\n    hfunc : :py:obj:`~.CUfunction`\n        Kernel to add texture-reference to\n    texunit : int\n        Texture unit (must be :py:obj:`~.CU_PARAM_TR_DEFAULT`)\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture-reference to add to argument list\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_467cuParamSetTexRef = {"cuParamSetTexRef", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_467cuParamSetTexRef, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_466cuParamSetTexRef};
static PyObject *__pyx_pw_4cuda_4cuda_467cuParamSetTexRef(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hfunc = 0;
  int __pyx_v_texunit;
  PyObject *__pyx_v_hTexRef = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuParamSetTexRef (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hfunc,&__pyx_n_s_texunit,&__pyx_n_s_hTexRef,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hfunc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texunit)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuParamSetTexRef", 1, 3, 3, 1); __PYX_ERR(0, 25207, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuParamSetTexRef", 1, 3, 3, 2); __PYX_ERR(0, 25207, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuParamSetTexRef") < 0)) __PYX_ERR(0, 25207, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hfunc = values[0];
    __pyx_v_texunit = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_texunit == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 25207, __pyx_L3_error)
    __pyx_v_hTexRef = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuParamSetTexRef", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25207, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuParamSetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_466cuParamSetTexRef(__pyx_self, __pyx_v_hfunc, __pyx_v_texunit, __pyx_v_hTexRef);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_466cuParamSetTexRef(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hfunc, int __pyx_v_texunit, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUfunction __pyx_v_chfunc;
  PyObject *__pyx_v_phfunc = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__855)
  __Pyx_RefNannySetupContext("cuParamSetTexRef", 0);
  __Pyx_TraceCall("cuParamSetTexRef", __pyx_f[0], 25207, 0, __PYX_ERR(0, 25207, __pyx_L1_error));

  /* "cuda/cuda.pyx":25233
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25234
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25233
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25235
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25236
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25237
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25237, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25235
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25239
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25240
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUfunction chfunc
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25240, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25243
 * 
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_hfunc == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25244
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 */
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25243
 * 
 *     cdef ccuda.CUfunction chfunc
 *     if hfunc is None:             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":25245
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hfunc, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25246
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hfunc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25247
 *     elif isinstance(hfunc, (CUfunction)):
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25247, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25245
 *     if hfunc is None:
 *         chfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(hfunc, (CUfunction)):             # <<<<<<<<<<<<<<
 *         phfunc = int(hfunc)
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":25249
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 *     else:
 *         phfunc = int(CUfunction(hfunc))             # <<<<<<<<<<<<<<
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_hfunc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25250
 *     else:
 *         phfunc = int(CUfunction(hfunc))
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuParamSetTexRef(chfunc, texunit, chTexRef)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25250, __pyx_L1_error)
    __pyx_v_chfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":25252
 *         chfunc = <ccuda.CUfunction><void_ptr>phfunc
 * 
 *     err = ccuda.cuParamSetTexRef(chfunc, texunit, chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuParamSetTexRef(__pyx_v_chfunc, __pyx_v_texunit, __pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25252, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":25253
 * 
 *     err = ccuda.cuParamSetTexRef(chfunc, texunit, chTexRef)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25207
 * 
 * @cython.embedsignature(True)
 * def cuParamSetTexRef(hfunc, int texunit, hTexRef):             # <<<<<<<<<<<<<<
 *     """ Adds a texture-reference to the function's argument list.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuParamSetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XDECREF(__pyx_v_phfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25256
 * 
 * @cython.embedsignature(True)
 * def cuGraphCreate(unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Creates a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_469cuGraphCreate(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
static char __pyx_doc_4cuda_4cuda_468cuGraphCreate[] = "cuGraphCreate(unsigned int flags)\n Creates a graph.\n\n    Creates an empty graph, which is returned via `phGraph`.\n\n    Parameters\n    ----------\n    flags : unsigned int\n        Graph creation flags, must be 0\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    phGraph : :py:obj:`~.CUgraph`\n        Returns newly created graph\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`, :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphDestroy`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphClone`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_469cuGraphCreate = {"cuGraphCreate", (PyCFunction)__pyx_pw_4cuda_4cuda_469cuGraphCreate, METH_O, __pyx_doc_4cuda_4cuda_468cuGraphCreate};
static PyObject *__pyx_pw_4cuda_4cuda_469cuGraphCreate(PyObject *__pyx_self, PyObject *__pyx_arg_flags) {
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphCreate (wrapper)", 0);
  assert(__pyx_arg_flags); {
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 25256, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_468cuGraphCreate(__pyx_self, ((unsigned int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_468cuGraphCreate(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags) {
  struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_phGraph = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__856)
  __Pyx_RefNannySetupContext("cuGraphCreate", 0);
  __Pyx_TraceCall("cuGraphCreate", __pyx_f[0], 25256, 0, __PYX_ERR(0, 25256, __pyx_L1_error));

  /* "cuda/cuda.pyx":25277
 *     :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`, :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphDestroy`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphClone`
 *     """
 *     cdef CUgraph phGraph = CUgraph()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphCreate(phGraph._ptr, flags)
 *     return (CUresult(err), phGraph)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_phGraph = ((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":25278
 *     """
 *     cdef CUgraph phGraph = CUgraph()
 *     err = ccuda.cuGraphCreate(phGraph._ptr, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraph)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuGraphCreate(__pyx_v_phGraph->_ptr, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25278, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":25279
 *     cdef CUgraph phGraph = CUgraph()
 *     err = ccuda.cuGraphCreate(phGraph._ptr, flags)
 *     return (CUresult(err), phGraph)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraph));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraph));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phGraph));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25256
 * 
 * @cython.embedsignature(True)
 * def cuGraphCreate(unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Creates a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuGraphCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraph);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25282
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddKernelNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a kernel execution node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_471cuGraphAddKernelNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_470cuGraphAddKernelNode[] = "cuGraphAddKernelNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies, CUDA_KERNEL_NODE_PARAMS nodeParams: CUDA_KERNEL_NODE_PARAMS)\n Creates a kernel execution node and adds it to a graph.\n\n    Creates a new kernel execution node and adds it to `hGraph` with\n    `numDependencies` dependencies specified via `dependencies` and\n    arguments specified in `nodeParams`. It is possible for\n    `numDependencies` to be 0, in which case the node will be placed at the\n    root of the graph. `dependencies` may not have any duplicate entries. A\n    handle to the new node will be returned in `phGraphNode`.\n\n    The CUDA_KERNEL_NODE_PARAMS structure is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    When the graph is launched, the node will invoke kernel `func` on a\n    (`gridDimX` x `gridDimY` x `gridDimZ`) grid of blocks. Each block\n    contains (`blockDimX` x `blockDimY` x `blockDimZ`) threads.\n\n    `sharedMemBytes` sets the amount of dynamic shared memory that will be\n    available to each thread block.\n\n    Kernel parameters to `func` can be specified in one of two ways:\n\n    1) Kernel parameters can be specified via `kernelParams`. If the kernel\n    has N parameters, then `kernelParams` needs to be an array of N\n    pointers. Each pointer, from `kernelParams`[0] to `kernelParams`[N-1],\n    points to the region of memory from which the actual parameter will be\n    copied. The number of kernel parameters and their offsets and sizes do\n    not need to be specified as that information is retrieved directly from\n    the kernel's image.\n\n    2) Kernel parameters for non-cooperative kernels can also be packaged\n    by the application into a single buffer that is passed in via `extra`.\n    This places the burden on the application of knowing each kernel\n    parameter's size and alignment/padding within the buffer. The `extra`\n    parameter exists to allow this function to take additional less\n    co""mmonly used arguments. `extra` specifies a list of names of extra\n    settings and their corresponding values. Each extra setting name is\n    immediately followed by the corresponding value. The list must be\n    terminated with either NULL or CU_LAUNCH_PARAM_END.\n\n    - :py:obj:`~.CU_LAUNCH_PARAM_END`, which indicates the end of the\n      `extra` array;\n\n    - :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER`, which specifies that the\n      next value in `extra` will be a pointer to a buffer containing all\n      the kernel parameters for launching kernel `func`;\n\n    - :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_SIZE`, which specifies that the\n      next value in `extra` will be a pointer to a size_t containing the\n      size of the buffer specified with\n      :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER`;\n\n    The error :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned if\n    kernel parameters are specified with both `kernelParams` and `extra`\n    (i.e. both `kernelParams` and `extra` are non-NULL).\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned if `extra` is\n    used for a cooperative kernel.\n\n    The `kernelParams` or `extra` array, as well as the argument values it\n    points to, are copied during this call.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n    nodeParams : :py:obj:`~.CUDA_KERNEL_NODE_PARAMS`\n        Parameters for the GPU execution node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node\n\n    See Also\n    --------\n    :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cuLaunchCooperativeKer""nel`, :py:obj:`~.cuGraphKernelNodeGetParams`, :py:obj:`~.cuGraphKernelNodeSetParams`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`\n\n    Notes\n    -----\n    Kernels launched using graphs must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_471cuGraphAddKernelNode = {"cuGraphAddKernelNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_471cuGraphAddKernelNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_470cuGraphAddKernelNode};
static PyObject *__pyx_pw_4cuda_4cuda_471cuGraphAddKernelNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddKernelNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_nodeParams,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddKernelNode", 1, 4, 4, 1); __PYX_ERR(0, 25282, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddKernelNode", 1, 4, 4, 2); __PYX_ERR(0, 25282, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddKernelNode", 1, 4, 4, 3); __PYX_ERR(0, 25282, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddKernelNode") < 0)) __PYX_ERR(0, 25282, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 25282, __pyx_L3_error)
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddKernelNode", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25282, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddKernelNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 25282, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_470cuGraphAddKernelNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_20cuGraphAddKernelNode_2generator19(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":25371
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_20cuGraphAddKernelNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_36_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_36_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 25371, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_20cuGraphAddKernelNode_2generator19, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddKernelNode_locals_gene, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 25371, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddKernelNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_20cuGraphAddKernelNode_2generator19(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 25371, 0, __PYX_ERR(0, 25371, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 25371, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 25371, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25371, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 25371, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25371, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 25371, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25371, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 25371, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25282
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddKernelNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a kernel execution node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_470cuGraphAddKernelNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *__pyx_cur_scope;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUDA_KERNEL_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_20cuGraphAddKernelNode_2generator19 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct CUDA_KERNEL_NODE_PARAMS_st *__pyx_t_10;
  CUgraphNode *__pyx_t_11;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__857)
  __Pyx_RefNannySetupContext("cuGraphAddKernelNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 25282, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddKernelNode", __pyx_f[0], 25282, 0, __PYX_ERR(0, 25282, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":25370
 *     Kernels launched using graphs must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects.
 *     """
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":25371
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_20cuGraphAddKernelNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 25371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":25372
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 25372, __pyx_L1_error)

    /* "cuda/cuda.pyx":25371
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":25375
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_4 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25376
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25375
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":25377
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":25378
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25379
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25379, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":25377
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":25381
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":25382
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25382, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":25384
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":25385
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":25386
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":25387
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25387, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":25388
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":25389
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25389, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 25389, __pyx_L1_error)

      /* "cuda/cuda.pyx":25388
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":25391
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25391, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":25392
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25392, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":25386
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":25394
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddKernelNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25394, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 25394, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":25395
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddKernelNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25395, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 25395, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
    __pyx_t_10 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_10 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_10;

  /* "cuda/cuda.pyx":25396
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddKernelNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_11 = __pyx_v_cdependencies;
  }
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuGraphAddKernelNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_11, __pyx_v_numDependencies, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25396, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":25397
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddKernelNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_4 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":25398
 *     err = ccuda.cuGraphAddKernelNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":25397
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddKernelNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":25399
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_13, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25282
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddKernelNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a kernel execution node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddKernelNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_20cuGraphAddKernelNode_2generator19);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25402
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a kernel node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_473cuGraphKernelNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_472cuGraphKernelNodeGetParams[] = "cuGraphKernelNodeGetParams(hNode)\n Returns a kernel node's parameters.\n\n    Returns the parameters of kernel node `hNode` in `nodeParams`. The\n    `kernelParams` or `extra` array returned in `nodeParams`, as well as\n    the argument values it points to, are owned by the node. This memory\n    remains valid until the node is destroyed or its parameters are\n    modified, and should not be modified directly. Use\n    :py:obj:`~.cuGraphKernelNodeSetParams` to update the parameters of this\n    node.\n\n    The params will contain either `kernelParams` or `extra`, according to\n    which of these was most recently set on the node.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to get the parameters for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    nodeParams : :py:obj:`~.CUDA_KERNEL_NODE_PARAMS`\n        Pointer to return the parameters\n\n    See Also\n    --------\n    :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphKernelNodeSetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_473cuGraphKernelNodeGetParams = {"cuGraphKernelNodeGetParams", (PyCFunction)__pyx_pw_4cuda_4cuda_473cuGraphKernelNodeGetParams, METH_O, __pyx_doc_4cuda_4cuda_472cuGraphKernelNodeGetParams};
static PyObject *__pyx_pw_4cuda_4cuda_473cuGraphKernelNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphKernelNodeGetParams (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_472cuGraphKernelNodeGetParams(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_472cuGraphKernelNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__858)
  __Pyx_RefNannySetupContext("cuGraphKernelNodeGetParams", 0);
  __Pyx_TraceCall("cuGraphKernelNodeGetParams", __pyx_f[0], 25402, 0, __PYX_ERR(0, 25402, __pyx_L1_error));

  /* "cuda/cuda.pyx":25433
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25434
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25433
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25435
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25436
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25437
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25437, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25435
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25439
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25440
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_KERNEL_NODE_PARAMS nodeParams = CUDA_KERNEL_NODE_PARAMS()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25440, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25442
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef CUDA_KERNEL_NODE_PARAMS nodeParams = CUDA_KERNEL_NODE_PARAMS()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphKernelNodeGetParams(chNode, nodeParams._ptr)
 *     return (CUresult(err), nodeParams)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":25443
 * 
 *     cdef CUDA_KERNEL_NODE_PARAMS nodeParams = CUDA_KERNEL_NODE_PARAMS()
 *     err = ccuda.cuGraphKernelNodeGetParams(chNode, nodeParams._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), nodeParams)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphKernelNodeGetParams(__pyx_v_chNode, __pyx_v_nodeParams->__pyx_base._ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25443, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":25444
 *     cdef CUDA_KERNEL_NODE_PARAMS nodeParams = CUDA_KERNEL_NODE_PARAMS()
 *     err = ccuda.cuGraphKernelNodeGetParams(chNode, nodeParams._ptr)
 *     return (CUresult(err), nodeParams)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_nodeParams));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_nodeParams));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_nodeParams));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25402
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a kernel node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphKernelNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_nodeParams);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25447
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeSetParams(hNode, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a kernel node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_475cuGraphKernelNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_474cuGraphKernelNodeSetParams[] = "cuGraphKernelNodeSetParams(hNode, CUDA_KERNEL_NODE_PARAMS nodeParams: CUDA_KERNEL_NODE_PARAMS)\n Sets a kernel node's parameters.\n\n    Sets the parameters of kernel node `hNode` to `nodeParams`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to set the parameters for\n    nodeParams : :py:obj:`~.CUDA_KERNEL_NODE_PARAMS`\n        Parameters to copy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n\n    See Also\n    --------\n    :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphKernelNodeGetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_475cuGraphKernelNodeSetParams = {"cuGraphKernelNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_475cuGraphKernelNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_474cuGraphKernelNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_475cuGraphKernelNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphKernelNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_nodeParams,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphKernelNodeSetParams", 1, 2, 2, 1); __PYX_ERR(0, 25447, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphKernelNodeSetParams") < 0)) __PYX_ERR(0, 25447, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hNode = values[0];
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphKernelNodeSetParams", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25447, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 25447, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_474cuGraphKernelNodeSetParams(__pyx_self, __pyx_v_hNode, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_474cuGraphKernelNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUDA_KERNEL_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_KERNEL_NODE_PARAMS_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__859)
  __Pyx_RefNannySetupContext("cuGraphKernelNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphKernelNodeSetParams", __pyx_f[0], 25447, 0, __PYX_ERR(0, 25447, __pyx_L1_error));

  /* "cuda/cuda.pyx":25469
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25470
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25469
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25471
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25472
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25473
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25473, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25471
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25475
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25476
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25476, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25478
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphKernelNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25478, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 25478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":25479
 * 
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphKernelNodeSetParams(chNode, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphKernelNodeSetParams(__pyx_v_chNode, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25479, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":25480
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphKernelNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 25480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25447
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeSetParams(hNode, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a kernel node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25483
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemcpyNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, copyParams : CUDA_MEMCPY3D, ctx):             # <<<<<<<<<<<<<<
 *     """ Creates a memcpy node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_477cuGraphAddMemcpyNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_476cuGraphAddMemcpyNode[] = "cuGraphAddMemcpyNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies, CUDA_MEMCPY3D copyParams: CUDA_MEMCPY3D, ctx)\n Creates a memcpy node and adds it to a graph.\n\n    Creates a new memcpy node and adds it to `hGraph` with\n    `numDependencies` dependencies specified via `dependencies`. It is\n    possible for `numDependencies` to be 0, in which case the node will be\n    placed at the root of the graph. `dependencies` may not have any\n    duplicate entries. A handle to the new node will be returned in\n    `phGraphNode`.\n\n    When the graph is launched, the node will perform the memcpy described\n    by `copyParams`. See :py:obj:`~.cuMemcpy3D()` for a description of the\n    structure and its restrictions.\n\n    Memcpy nodes have some additional restrictions with regards to managed\n    memory, if the system contains at least one device which has a zero\n    value for the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. If one or\n    more of the operands refer to managed memory, then using the memory\n    type :py:obj:`~.CU_MEMORYTYPE_UNIFIED` is disallowed for those\n    operand(s). The managed memory will be treated as residing on either\n    the host or the device, depending on which memory type is specified.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n    copyParams : :py:obj:`~.CUDA_MEMCPY3D`\n        Parameters for the memory copy\n    ctx : :py:obj:`~.CUcontext`\n        Context on which to run the node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node""\n\n    See Also\n    --------\n    :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuGraphMemcpyNodeGetParams`, :py:obj:`~.cuGraphMemcpyNodeSetParams`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemsetNode`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_477cuGraphAddMemcpyNode = {"cuGraphAddMemcpyNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_477cuGraphAddMemcpyNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_476cuGraphAddMemcpyNode};
static PyObject *__pyx_pw_4cuda_4cuda_477cuGraphAddMemcpyNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_copyParams = 0;
  PyObject *__pyx_v_ctx = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddMemcpyNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_copyParams,&__pyx_n_s_ctx_2,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemcpyNode", 1, 5, 5, 1); __PYX_ERR(0, 25483, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemcpyNode", 1, 5, 5, 2); __PYX_ERR(0, 25483, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_copyParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemcpyNode", 1, 5, 5, 3); __PYX_ERR(0, 25483, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ctx_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemcpyNode", 1, 5, 5, 4); __PYX_ERR(0, 25483, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddMemcpyNode") < 0)) __PYX_ERR(0, 25483, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 25483, __pyx_L3_error)
    __pyx_v_copyParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *)values[3]);
    __pyx_v_ctx = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddMemcpyNode", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25483, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddMemcpyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_copyParams), __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D, 1, "copyParams", 0))) __PYX_ERR(0, 25483, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_476cuGraphAddMemcpyNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_copyParams, __pyx_v_ctx);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_20cuGraphAddMemcpyNode_2generator20(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":25541
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_20cuGraphAddMemcpyNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_38_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_38_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 25541, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_20cuGraphAddMemcpyNode_2generator20, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddMemcpyNode_locals_gene, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 25541, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddMemcpyNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_20cuGraphAddMemcpyNode_2generator20(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 25541, 0, __PYX_ERR(0, 25541, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 25541, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 25541, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25541, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 25541, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25541, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 25541, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25541, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 25541, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25483
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemcpyNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, copyParams : CUDA_MEMCPY3D, ctx):             # <<<<<<<<<<<<<<
 *     """ Creates a memcpy node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_476cuGraphAddMemcpyNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_copyParams, PyObject *__pyx_v_ctx) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *__pyx_cur_scope;
  CUcontext __pyx_v_cctx;
  PyObject *__pyx_v_pctx = NULL;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUDA_MEMCPY3D *__pyx_v_ccopyParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_20cuGraphAddMemcpyNode_2generator20 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct CUDA_MEMCPY3D_st *__pyx_t_10;
  CUgraphNode *__pyx_t_11;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__860)
  __Pyx_RefNannySetupContext("cuGraphAddMemcpyNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 25483, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddMemcpyNode", __pyx_f[0], 25483, 0, __PYX_ERR(0, 25483, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":25531
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_ctx == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25532
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 */
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25531
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25533
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ctx, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25534
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pctx = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25535
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 *     else:
 *         pctx = int(CUcontext(ctx))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25535, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25533
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25537
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 *         pctx = int(CUcontext(ctx))             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pctx = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25538
 *     else:
 *         pctx = int(CUcontext(ctx))
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 * 
 *     dependencies = [] if dependencies is None else dependencies
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25538, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25540
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":25541
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_5 = __pyx_pf_4cuda_4cuda_20cuGraphAddMemcpyNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 25541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":25542
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 25542, __pyx_L1_error)

    /* "cuda/cuda.pyx":25541
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":25545
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_2 = (__pyx_v_hGraph == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25546
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25545
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":25547
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25548
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25549
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25549, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25547
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":25551
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25552
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25552, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":25554
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":25555
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":25556
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25556, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25557
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25557, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":25558
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":25559
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25559, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 25559, __pyx_L1_error)

      /* "cuda/cuda.pyx":25558
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":25561
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25561, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":25562
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25562, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":25556
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":25564
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMCPY3D* ccopyParams_ptr = copyParams._ptr if copyParams != None else NULL
 *     err = ccuda.cuGraphAddMemcpyNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, ccopyParams_ptr, cctx)
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_2)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25564, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 25564, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":25565
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_MEMCPY3D* ccopyParams_ptr = copyParams._ptr if copyParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddMemcpyNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, ccopyParams_ptr, cctx)
 *     if cdependencies is not NULL:
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_copyParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25565, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 25565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {
    __pyx_t_10 = __pyx_v_copyParams->__pyx_base._ptr;
  } else {
    __pyx_t_10 = NULL;
  }
  __pyx_v_ccopyParams_ptr = __pyx_t_10;

  /* "cuda/cuda.pyx":25566
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_MEMCPY3D* ccopyParams_ptr = copyParams._ptr if copyParams != None else NULL
 *     err = ccuda.cuGraphAddMemcpyNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, ccopyParams_ptr, cctx)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_11 = __pyx_v_cdependencies;
  }
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuGraphAddMemcpyNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_11, __pyx_v_numDependencies, __pyx_v_ccopyParams_ptr, __pyx_v_cctx); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25566, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":25567
 *     cdef ccuda.CUDA_MEMCPY3D* ccopyParams_ptr = copyParams._ptr if copyParams != None else NULL
 *     err = ccuda.cuGraphAddMemcpyNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, ccopyParams_ptr, cctx)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_2 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25568
 *     err = ccuda.cuGraphAddMemcpyNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, ccopyParams_ptr, cctx)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":25567
 *     cdef ccuda.CUDA_MEMCPY3D* ccopyParams_ptr = copyParams._ptr if copyParams != None else NULL
 *     err = ccuda.cuGraphAddMemcpyNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, ccopyParams_ptr, cctx)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":25569
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_13, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25483
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemcpyNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, copyParams : CUDA_MEMCPY3D, ctx):             # <<<<<<<<<<<<<<
 *     """ Creates a memcpy node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddMemcpyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pctx);
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_20cuGraphAddMemcpyNode_2generator20);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25572
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemcpyNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memcpy node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_479cuGraphMemcpyNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_478cuGraphMemcpyNodeGetParams[] = "cuGraphMemcpyNodeGetParams(hNode)\n Returns a memcpy node's parameters.\n\n    Returns the parameters of memcpy node `hNode` in `nodeParams`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to get the parameters for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    nodeParams : :py:obj:`~.CUDA_MEMCPY3D`\n        Pointer to return the parameters\n\n    See Also\n    --------\n    :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphMemcpyNodeSetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_479cuGraphMemcpyNodeGetParams = {"cuGraphMemcpyNodeGetParams", (PyCFunction)__pyx_pw_4cuda_4cuda_479cuGraphMemcpyNodeGetParams, METH_O, __pyx_doc_4cuda_4cuda_478cuGraphMemcpyNodeGetParams};
static PyObject *__pyx_pw_4cuda_4cuda_479cuGraphMemcpyNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphMemcpyNodeGetParams (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_478cuGraphMemcpyNodeGetParams(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_478cuGraphMemcpyNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_nodeParams = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__861)
  __Pyx_RefNannySetupContext("cuGraphMemcpyNodeGetParams", 0);
  __Pyx_TraceCall("cuGraphMemcpyNodeGetParams", __pyx_f[0], 25572, 0, __PYX_ERR(0, 25572, __pyx_L1_error));

  /* "cuda/cuda.pyx":25594
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25595
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25594
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25596
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25597
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25598
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25598, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25596
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25600
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25601
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_MEMCPY3D nodeParams = CUDA_MEMCPY3D()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25601, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25603
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef CUDA_MEMCPY3D nodeParams = CUDA_MEMCPY3D()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphMemcpyNodeGetParams(chNode, nodeParams._ptr)
 *     return (CUresult(err), nodeParams)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":25604
 * 
 *     cdef CUDA_MEMCPY3D nodeParams = CUDA_MEMCPY3D()
 *     err = ccuda.cuGraphMemcpyNodeGetParams(chNode, nodeParams._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), nodeParams)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphMemcpyNodeGetParams(__pyx_v_chNode, __pyx_v_nodeParams->__pyx_base._ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25604, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":25605
 *     cdef CUDA_MEMCPY3D nodeParams = CUDA_MEMCPY3D()
 *     err = ccuda.cuGraphMemcpyNodeGetParams(chNode, nodeParams._ptr)
 *     return (CUresult(err), nodeParams)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_nodeParams));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_nodeParams));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_nodeParams));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25572
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemcpyNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memcpy node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphMemcpyNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_nodeParams);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25608
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemcpyNodeSetParams(hNode, nodeParams : CUDA_MEMCPY3D):             # <<<<<<<<<<<<<<
 *     """ Sets a memcpy node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_481cuGraphMemcpyNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_480cuGraphMemcpyNodeSetParams[] = "cuGraphMemcpyNodeSetParams(hNode, CUDA_MEMCPY3D nodeParams: CUDA_MEMCPY3D)\n Sets a memcpy node's parameters.\n\n    Sets the parameters of memcpy node `hNode` to `nodeParams`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to set the parameters for\n    nodeParams : :py:obj:`~.CUDA_MEMCPY3D`\n        Parameters to copy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphMemcpyNodeGetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_481cuGraphMemcpyNodeSetParams = {"cuGraphMemcpyNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_481cuGraphMemcpyNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_480cuGraphMemcpyNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_481cuGraphMemcpyNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphMemcpyNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_nodeParams,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphMemcpyNodeSetParams", 1, 2, 2, 1); __PYX_ERR(0, 25608, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphMemcpyNodeSetParams") < 0)) __PYX_ERR(0, 25608, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hNode = values[0];
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphMemcpyNodeSetParams", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25608, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D, 1, "nodeParams", 0))) __PYX_ERR(0, 25608, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_480cuGraphMemcpyNodeSetParams(__pyx_self, __pyx_v_hNode, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_480cuGraphMemcpyNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_nodeParams) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUDA_MEMCPY3D *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_MEMCPY3D_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__862)
  __Pyx_RefNannySetupContext("cuGraphMemcpyNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphMemcpyNodeSetParams", __pyx_f[0], 25608, 0, __PYX_ERR(0, 25608, __pyx_L1_error));

  /* "cuda/cuda.pyx":25630
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25631
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25630
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25632
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25633
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25634
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25634, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25632
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25636
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25637
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_MEMCPY3D* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25637, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25639
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef ccuda.CUDA_MEMCPY3D* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphMemcpyNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25639, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 25639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":25640
 * 
 *     cdef ccuda.CUDA_MEMCPY3D* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphMemcpyNodeSetParams(chNode, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphMemcpyNodeSetParams(__pyx_v_chNode, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25640, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":25641
 *     cdef ccuda.CUDA_MEMCPY3D* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphMemcpyNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 25641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25608
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemcpyNodeSetParams(hNode, nodeParams : CUDA_MEMCPY3D):             # <<<<<<<<<<<<<<
 *     """ Sets a memcpy node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25644
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemsetNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, memsetParams : CUDA_MEMSET_NODE_PARAMS, ctx):             # <<<<<<<<<<<<<<
 *     """ Creates a memset node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_483cuGraphAddMemsetNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_482cuGraphAddMemsetNode[] = "cuGraphAddMemsetNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies, CUDA_MEMSET_NODE_PARAMS memsetParams: CUDA_MEMSET_NODE_PARAMS, ctx)\n Creates a memset node and adds it to a graph.\n\n    Creates a new memset node and adds it to `hGraph` with\n    `numDependencies` dependencies specified via `dependencies`. It is\n    possible for `numDependencies` to be 0, in which case the node will be\n    placed at the root of the graph. `dependencies` may not have any\n    duplicate entries. A handle to the new node will be returned in\n    `phGraphNode`.\n\n    The element size must be 1, 2, or 4 bytes. When the graph is launched,\n    the node will perform the memset described by `memsetParams`.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n    memsetParams : :py:obj:`~.CUDA_MEMSET_NODE_PARAMS`\n        Parameters for the memory set\n    ctx : :py:obj:`~.CUcontext`\n        Context on which to run the node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node\n\n    See Also\n    --------\n    :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuGraphMemsetNodeGetParams`, :py:obj:`~.cuGraphMemsetNodeSetParams`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_483cuGraphAddMemsetNode = {"cuGraphAddMemsetNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_483cuGraphAddMemsetNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_482cuGraphAddMemsetNode};
static PyObject *__pyx_pw_4cuda_4cuda_483cuGraphAddMemsetNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *__pyx_v_memsetParams = 0;
  PyObject *__pyx_v_ctx = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddMemsetNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_memsetParams,&__pyx_n_s_ctx_2,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemsetNode", 1, 5, 5, 1); __PYX_ERR(0, 25644, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemsetNode", 1, 5, 5, 2); __PYX_ERR(0, 25644, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memsetParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemsetNode", 1, 5, 5, 3); __PYX_ERR(0, 25644, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ctx_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemsetNode", 1, 5, 5, 4); __PYX_ERR(0, 25644, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddMemsetNode") < 0)) __PYX_ERR(0, 25644, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 25644, __pyx_L3_error)
    __pyx_v_memsetParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *)values[3]);
    __pyx_v_ctx = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddMemsetNode", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25644, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddMemsetNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memsetParams), __pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS, 1, "memsetParams", 0))) __PYX_ERR(0, 25644, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_482cuGraphAddMemsetNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_memsetParams, __pyx_v_ctx);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_20cuGraphAddMemsetNode_2generator21(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":25692
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_20cuGraphAddMemsetNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_40_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_40_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 25692, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_20cuGraphAddMemsetNode_2generator21, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddMemsetNode_locals_gene, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 25692, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddMemsetNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_20cuGraphAddMemsetNode_2generator21(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 25692, 0, __PYX_ERR(0, 25692, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 25692, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 25692, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25692, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 25692, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 25692, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 25692, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25644
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemsetNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, memsetParams : CUDA_MEMSET_NODE_PARAMS, ctx):             # <<<<<<<<<<<<<<
 *     """ Creates a memset node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_482cuGraphAddMemsetNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *__pyx_v_memsetParams, PyObject *__pyx_v_ctx) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *__pyx_cur_scope;
  CUcontext __pyx_v_cctx;
  PyObject *__pyx_v_pctx = NULL;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUDA_MEMSET_NODE_PARAMS *__pyx_v_cmemsetParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_20cuGraphAddMemsetNode_2generator21 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct CUDA_MEMSET_NODE_PARAMS_st *__pyx_t_10;
  CUgraphNode *__pyx_t_11;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__863)
  __Pyx_RefNannySetupContext("cuGraphAddMemsetNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 25644, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddMemsetNode", __pyx_f[0], 25644, 0, __PYX_ERR(0, 25644, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":25682
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_ctx == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25683
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 */
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25682
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25684
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ctx, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25685
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pctx = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25686
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 *     else:
 *         pctx = int(CUcontext(ctx))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25686, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25684
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25688
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 *         pctx = int(CUcontext(ctx))             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pctx = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25689
 *     else:
 *         pctx = int(CUcontext(ctx))
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 * 
 *     dependencies = [] if dependencies is None else dependencies
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25689, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25691
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":25692
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_5 = __pyx_pf_4cuda_4cuda_20cuGraphAddMemsetNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 25692, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":25693
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 25693, __pyx_L1_error)

    /* "cuda/cuda.pyx":25692
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":25696
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_2 = (__pyx_v_hGraph == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25697
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25696
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":25698
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25699
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25700
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25700, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25698
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":25702
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25703
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25703, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":25705
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":25706
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":25707
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25708
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25708, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":25709
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":25710
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25710, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 25710, __pyx_L1_error)

      /* "cuda/cuda.pyx":25709
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":25712
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25712, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":25713
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25713, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":25707
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":25715
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cmemsetParams_ptr = memsetParams._ptr if memsetParams != None else NULL
 *     err = ccuda.cuGraphAddMemsetNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cmemsetParams_ptr, cctx)
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_2)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25715, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 25715, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":25716
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cmemsetParams_ptr = memsetParams._ptr if memsetParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddMemsetNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cmemsetParams_ptr, cctx)
 *     if cdependencies is not NULL:
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_memsetParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25716, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 25716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {
    __pyx_t_10 = __pyx_v_memsetParams->__pyx_base._ptr;
  } else {
    __pyx_t_10 = NULL;
  }
  __pyx_v_cmemsetParams_ptr = __pyx_t_10;

  /* "cuda/cuda.pyx":25717
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cmemsetParams_ptr = memsetParams._ptr if memsetParams != None else NULL
 *     err = ccuda.cuGraphAddMemsetNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cmemsetParams_ptr, cctx)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25717, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_11 = __pyx_v_cdependencies;
  }
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuGraphAddMemsetNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_11, __pyx_v_numDependencies, __pyx_v_cmemsetParams_ptr, __pyx_v_cctx); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25717, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":25718
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cmemsetParams_ptr = memsetParams._ptr if memsetParams != None else NULL
 *     err = ccuda.cuGraphAddMemsetNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cmemsetParams_ptr, cctx)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_2 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25719
 *     err = ccuda.cuGraphAddMemsetNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cmemsetParams_ptr, cctx)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":25718
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cmemsetParams_ptr = memsetParams._ptr if memsetParams != None else NULL
 *     err = ccuda.cuGraphAddMemsetNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cmemsetParams_ptr, cctx)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":25720
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_13, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25644
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemsetNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, memsetParams : CUDA_MEMSET_NODE_PARAMS, ctx):             # <<<<<<<<<<<<<<
 *     """ Creates a memset node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddMemsetNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pctx);
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_20cuGraphAddMemsetNode_2generator21);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25723
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemsetNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memset node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_485cuGraphMemsetNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_484cuGraphMemsetNodeGetParams[] = "cuGraphMemsetNodeGetParams(hNode)\n Returns a memset node's parameters.\n\n    Returns the parameters of memset node `hNode` in `nodeParams`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to get the parameters for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    nodeParams : :py:obj:`~.CUDA_MEMSET_NODE_PARAMS`\n        Pointer to return the parameters\n\n    See Also\n    --------\n    :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuGraphAddMemsetNode`, :py:obj:`~.cuGraphMemsetNodeSetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_485cuGraphMemsetNodeGetParams = {"cuGraphMemsetNodeGetParams", (PyCFunction)__pyx_pw_4cuda_4cuda_485cuGraphMemsetNodeGetParams, METH_O, __pyx_doc_4cuda_4cuda_484cuGraphMemsetNodeGetParams};
static PyObject *__pyx_pw_4cuda_4cuda_485cuGraphMemsetNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphMemsetNodeGetParams (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_484cuGraphMemsetNodeGetParams(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_484cuGraphMemsetNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *__pyx_v_nodeParams = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__864)
  __Pyx_RefNannySetupContext("cuGraphMemsetNodeGetParams", 0);
  __Pyx_TraceCall("cuGraphMemsetNodeGetParams", __pyx_f[0], 25723, 0, __PYX_ERR(0, 25723, __pyx_L1_error));

  /* "cuda/cuda.pyx":25745
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25746
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25745
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25747
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25748
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25749
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25749, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25747
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25751
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25752
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_MEMSET_NODE_PARAMS nodeParams = CUDA_MEMSET_NODE_PARAMS()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25752, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25754
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef CUDA_MEMSET_NODE_PARAMS nodeParams = CUDA_MEMSET_NODE_PARAMS()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphMemsetNodeGetParams(chNode, nodeParams._ptr)
 *     return (CUresult(err), nodeParams)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":25755
 * 
 *     cdef CUDA_MEMSET_NODE_PARAMS nodeParams = CUDA_MEMSET_NODE_PARAMS()
 *     err = ccuda.cuGraphMemsetNodeGetParams(chNode, nodeParams._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), nodeParams)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphMemsetNodeGetParams(__pyx_v_chNode, __pyx_v_nodeParams->__pyx_base._ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25755, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":25756
 *     cdef CUDA_MEMSET_NODE_PARAMS nodeParams = CUDA_MEMSET_NODE_PARAMS()
 *     err = ccuda.cuGraphMemsetNodeGetParams(chNode, nodeParams._ptr)
 *     return (CUresult(err), nodeParams)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_nodeParams));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_nodeParams));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_nodeParams));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25723
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemsetNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memset node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphMemsetNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_nodeParams);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25759
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemsetNodeSetParams(hNode, nodeParams : CUDA_MEMSET_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a memset node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_487cuGraphMemsetNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_486cuGraphMemsetNodeSetParams[] = "cuGraphMemsetNodeSetParams(hNode, CUDA_MEMSET_NODE_PARAMS nodeParams: CUDA_MEMSET_NODE_PARAMS)\n Sets a memset node's parameters.\n\n    Sets the parameters of memset node `hNode` to `nodeParams`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to set the parameters for\n    nodeParams : :py:obj:`~.CUDA_MEMSET_NODE_PARAMS`\n        Parameters to copy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuGraphAddMemsetNode`, :py:obj:`~.cuGraphMemsetNodeGetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_487cuGraphMemsetNodeSetParams = {"cuGraphMemsetNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_487cuGraphMemsetNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_486cuGraphMemsetNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_487cuGraphMemsetNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphMemsetNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_nodeParams,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphMemsetNodeSetParams", 1, 2, 2, 1); __PYX_ERR(0, 25759, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphMemsetNodeSetParams") < 0)) __PYX_ERR(0, 25759, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hNode = values[0];
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphMemsetNodeSetParams", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25759, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 25759, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_486cuGraphMemsetNodeSetParams(__pyx_self, __pyx_v_hNode, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_486cuGraphMemsetNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *__pyx_v_nodeParams) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUDA_MEMSET_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_MEMSET_NODE_PARAMS_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__865)
  __Pyx_RefNannySetupContext("cuGraphMemsetNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphMemsetNodeSetParams", __pyx_f[0], 25759, 0, __PYX_ERR(0, 25759, __pyx_L1_error));

  /* "cuda/cuda.pyx":25781
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25782
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25781
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25783
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25784
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25785
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25785, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25783
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25787
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25788
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25788, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25790
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphMemsetNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25790, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 25790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":25791
 * 
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphMemsetNodeSetParams(chNode, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphMemsetNodeSetParams(__pyx_v_chNode, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25791, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":25792
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphMemsetNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 25792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25759
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemsetNodeSetParams(hNode, nodeParams : CUDA_MEMSET_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a memset node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25795
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddHostNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a host execution node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_489cuGraphAddHostNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_488cuGraphAddHostNode[] = "cuGraphAddHostNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies, CUDA_HOST_NODE_PARAMS nodeParams: CUDA_HOST_NODE_PARAMS)\n Creates a host execution node and adds it to a graph.\n\n    Creates a new CPU execution node and adds it to `hGraph` with\n    `numDependencies` dependencies specified via `dependencies` and\n    arguments specified in `nodeParams`. It is possible for\n    `numDependencies` to be 0, in which case the node will be placed at the\n    root of the graph. `dependencies` may not have any duplicate entries. A\n    handle to the new node will be returned in `phGraphNode`.\n\n    When the graph is launched, the node will invoke the specified CPU\n    function. Host nodes are not supported under MPS with pre-Volta GPUs.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n    nodeParams : :py:obj:`~.CUDA_HOST_NODE_PARAMS`\n        Parameters for the host node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node\n\n    See Also\n    --------\n    :py:obj:`~.cuLaunchHostFunc`, :py:obj:`~.cuGraphHostNodeGetParams`, :py:obj:`~.cuGraphHostNodeSetParams`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_489cuGraphAddHostNode = {"cuGraphAddHostNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_489cuGraphAddHostNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_488cuGraphAddHostNode};
static PyObject *__pyx_pw_4cuda_4cuda_489cuGraphAddHostNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddHostNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_nodeParams,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddHostNode", 1, 4, 4, 1); __PYX_ERR(0, 25795, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddHostNode", 1, 4, 4, 2); __PYX_ERR(0, 25795, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddHostNode", 1, 4, 4, 3); __PYX_ERR(0, 25795, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddHostNode") < 0)) __PYX_ERR(0, 25795, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 25795, __pyx_L3_error)
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddHostNode", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25795, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddHostNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 25795, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_488cuGraphAddHostNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_18cuGraphAddHostNode_2generator22(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":25831
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_18cuGraphAddHostNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_42_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_42_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 25831, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_18cuGraphAddHostNode_2generator22, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddHostNode_locals_genexp, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 25831, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddHostNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_18cuGraphAddHostNode_2generator22(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 25831, 0, __PYX_ERR(0, 25831, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 25831, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 25831, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25831, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 25831, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25831, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 25831, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25831, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 25831, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25795
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddHostNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a host execution node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_488cuGraphAddHostNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *__pyx_cur_scope;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUDA_HOST_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_18cuGraphAddHostNode_2generator22 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct CUDA_HOST_NODE_PARAMS_st *__pyx_t_10;
  CUgraphNode *__pyx_t_11;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__866)
  __Pyx_RefNannySetupContext("cuGraphAddHostNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 25795, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddHostNode", __pyx_f[0], 25795, 0, __PYX_ERR(0, 25795, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":25830
 *     :py:obj:`~.cuLaunchHostFunc`, :py:obj:`~.cuGraphHostNodeGetParams`, :py:obj:`~.cuGraphHostNodeSetParams`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`
 *     """
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":25831
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_18cuGraphAddHostNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 25831, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":25832
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 25832, __pyx_L1_error)

    /* "cuda/cuda.pyx":25831
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":25835
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_4 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25836
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25835
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":25837
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":25838
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25839
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25839, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":25837
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":25841
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":25842
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25842, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":25844
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":25845
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":25846
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25846, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":25847
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25847, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":25848
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":25849
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25849, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25849, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25849, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25849, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25849, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25849, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25849, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25849, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25849, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 25849, __pyx_L1_error)

      /* "cuda/cuda.pyx":25848
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":25851
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25851, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":25852
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25852, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":25846
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":25854
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddHostNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25854, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 25854, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":25855
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddHostNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25855, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 25855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
    __pyx_t_10 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_10 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_10;

  /* "cuda/cuda.pyx":25856
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddHostNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_11 = __pyx_v_cdependencies;
  }
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuGraphAddHostNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_11, __pyx_v_numDependencies, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25856, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":25857
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddHostNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_4 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":25858
 *     err = ccuda.cuGraphAddHostNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":25857
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddHostNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":25859
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_13, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25795
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddHostNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a host execution node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddHostNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_18cuGraphAddHostNode_2generator22);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25862
 * 
 * @cython.embedsignature(True)
 * def cuGraphHostNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a host node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_491cuGraphHostNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_490cuGraphHostNodeGetParams[] = "cuGraphHostNodeGetParams(hNode)\n Returns a host node's parameters.\n\n    Returns the parameters of host node `hNode` in `nodeParams`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to get the parameters for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    nodeParams : :py:obj:`~.CUDA_HOST_NODE_PARAMS`\n        Pointer to return the parameters\n\n    See Also\n    --------\n    :py:obj:`~.cuLaunchHostFunc`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphHostNodeSetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_491cuGraphHostNodeGetParams = {"cuGraphHostNodeGetParams", (PyCFunction)__pyx_pw_4cuda_4cuda_491cuGraphHostNodeGetParams, METH_O, __pyx_doc_4cuda_4cuda_490cuGraphHostNodeGetParams};
static PyObject *__pyx_pw_4cuda_4cuda_491cuGraphHostNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphHostNodeGetParams (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_490cuGraphHostNodeGetParams(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_490cuGraphHostNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__867)
  __Pyx_RefNannySetupContext("cuGraphHostNodeGetParams", 0);
  __Pyx_TraceCall("cuGraphHostNodeGetParams", __pyx_f[0], 25862, 0, __PYX_ERR(0, 25862, __pyx_L1_error));

  /* "cuda/cuda.pyx":25884
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25885
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25884
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25886
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25887
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25888
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25888, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25886
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25890
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25891
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_HOST_NODE_PARAMS nodeParams = CUDA_HOST_NODE_PARAMS()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25891, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25893
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef CUDA_HOST_NODE_PARAMS nodeParams = CUDA_HOST_NODE_PARAMS()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphHostNodeGetParams(chNode, nodeParams._ptr)
 *     return (CUresult(err), nodeParams)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":25894
 * 
 *     cdef CUDA_HOST_NODE_PARAMS nodeParams = CUDA_HOST_NODE_PARAMS()
 *     err = ccuda.cuGraphHostNodeGetParams(chNode, nodeParams._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), nodeParams)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphHostNodeGetParams(__pyx_v_chNode, __pyx_v_nodeParams->__pyx_base._ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25894, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":25895
 *     cdef CUDA_HOST_NODE_PARAMS nodeParams = CUDA_HOST_NODE_PARAMS()
 *     err = ccuda.cuGraphHostNodeGetParams(chNode, nodeParams._ptr)
 *     return (CUresult(err), nodeParams)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 25895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_nodeParams));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_nodeParams));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_nodeParams));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25862
 * 
 * @cython.embedsignature(True)
 * def cuGraphHostNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a host node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphHostNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_nodeParams);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25898
 * 
 * @cython.embedsignature(True)
 * def cuGraphHostNodeSetParams(hNode, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a host node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_493cuGraphHostNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_492cuGraphHostNodeSetParams[] = "cuGraphHostNodeSetParams(hNode, CUDA_HOST_NODE_PARAMS nodeParams: CUDA_HOST_NODE_PARAMS)\n Sets a host node's parameters.\n\n    Sets the parameters of host node `hNode` to `nodeParams`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to set the parameters for\n    nodeParams : :py:obj:`~.CUDA_HOST_NODE_PARAMS`\n        Parameters to copy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuLaunchHostFunc`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphHostNodeGetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_493cuGraphHostNodeSetParams = {"cuGraphHostNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_493cuGraphHostNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_492cuGraphHostNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_493cuGraphHostNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphHostNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_nodeParams,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphHostNodeSetParams", 1, 2, 2, 1); __PYX_ERR(0, 25898, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphHostNodeSetParams") < 0)) __PYX_ERR(0, 25898, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hNode = values[0];
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphHostNodeSetParams", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25898, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 25898, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_492cuGraphHostNodeSetParams(__pyx_self, __pyx_v_hNode, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_492cuGraphHostNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUDA_HOST_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_HOST_NODE_PARAMS_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__868)
  __Pyx_RefNannySetupContext("cuGraphHostNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphHostNodeSetParams", __pyx_f[0], 25898, 0, __PYX_ERR(0, 25898, __pyx_L1_error));

  /* "cuda/cuda.pyx":25920
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25921
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25920
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25922
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25923
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25924
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25924, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25922
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25926
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25927
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25927, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25929
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphHostNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25929, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 25929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":25930
 * 
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphHostNodeSetParams(chNode, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphHostNodeSetParams(__pyx_v_chNode, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 25930, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":25931
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphHostNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 25931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25898
 * 
 * @cython.embedsignature(True)
 * def cuGraphHostNodeSetParams(hNode, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a host node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25934
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddChildGraphNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, childGraph):             # <<<<<<<<<<<<<<
 *     """ Creates a child graph node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_495cuGraphAddChildGraphNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_494cuGraphAddChildGraphNode[] = "cuGraphAddChildGraphNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies, childGraph)\n Creates a child graph node and adds it to a graph.\n\n    Creates a new node which executes an embedded graph, and adds it to\n    `hGraph` with `numDependencies` dependencies specified via\n    `dependencies`. It is possible for `numDependencies` to be 0, in which\n    case the node will be placed at the root of the graph. `dependencies`\n    may not have any duplicate entries. A handle to the new node will be\n    returned in `phGraphNode`.\n\n    If `hGraph` contains allocation or free nodes, this call will return an\n    error.\n\n    The node executes an embedded child graph. The child graph is cloned in\n    this call.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n    childGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        The graph to clone into this node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphChildGraphNodeGetGraph`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`, :py:obj:`~.cuGraphClone`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_495cuGraphAddChildGraphNode = {"cuGraphAddChildGraphNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_495cuGraphAddChildGraphNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_494cuGraphAddChildGraphNode};
static PyObject *__pyx_pw_4cuda_4cuda_495cuGraphAddChildGraphNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  PyObject *__pyx_v_childGraph = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddChildGraphNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_childGraph,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddChildGraphNode", 1, 4, 4, 1); __PYX_ERR(0, 25934, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddChildGraphNode", 1, 4, 4, 2); __PYX_ERR(0, 25934, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_childGraph)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddChildGraphNode", 1, 4, 4, 3); __PYX_ERR(0, 25934, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddChildGraphNode") < 0)) __PYX_ERR(0, 25934, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 25934, __pyx_L3_error)
    __pyx_v_childGraph = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddChildGraphNode", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 25934, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddChildGraphNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_494cuGraphAddChildGraphNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_childGraph);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_24cuGraphAddChildGraphNode_2generator23(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":25983
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_24cuGraphAddChildGraphNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_44_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_44_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 25983, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_24cuGraphAddChildGraphNode_2generator23, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddChildGraphNode_locals, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 25983, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddChildGraphNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_24cuGraphAddChildGraphNode_2generator23(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 25983, 0, __PYX_ERR(0, 25983, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 25983, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 25983, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25983, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 25983, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25983, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 25983, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25983, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 25983, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":25934
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddChildGraphNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, childGraph):             # <<<<<<<<<<<<<<
 *     """ Creates a child graph node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_494cuGraphAddChildGraphNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, PyObject *__pyx_v_childGraph) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *__pyx_cur_scope;
  CUgraph __pyx_v_cchildGraph;
  PyObject *__pyx_v_pchildGraph = NULL;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_24cuGraphAddChildGraphNode_2generator23 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  CUgraphNode *__pyx_t_10;
  CUresult __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__869)
  __Pyx_RefNannySetupContext("cuGraphAddChildGraphNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 25934, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddChildGraphNode", __pyx_f[0], 25934, 0, __PYX_ERR(0, 25934, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":25973
 *     """
 *     cdef ccuda.CUgraph cchildGraph
 *     if childGraph is None:             # <<<<<<<<<<<<<<
 *         cchildGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(childGraph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_childGraph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25974
 *     cdef ccuda.CUgraph cchildGraph
 *     if childGraph is None:
 *         cchildGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(childGraph, (CUgraph)):
 *         pchildGraph = int(childGraph)
 */
    __pyx_v_cchildGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25973
 *     """
 *     cdef ccuda.CUgraph cchildGraph
 *     if childGraph is None:             # <<<<<<<<<<<<<<
 *         cchildGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(childGraph, (CUgraph)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25975
 *     if childGraph is None:
 *         cchildGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(childGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         pchildGraph = int(childGraph)
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_childGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25976
 *         cchildGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(childGraph, (CUgraph)):
 *         pchildGraph = int(childGraph)             # <<<<<<<<<<<<<<
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_childGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pchildGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25977
 *     elif isinstance(childGraph, (CUgraph)):
 *         pchildGraph = int(childGraph)
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph             # <<<<<<<<<<<<<<
 *     else:
 *         pchildGraph = int(CUgraph(childGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pchildGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25977, __pyx_L1_error)
    __pyx_v_cchildGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25975
 *     if childGraph is None:
 *         cchildGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(childGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         pchildGraph = int(childGraph)
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":25979
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph
 *     else:
 *         pchildGraph = int(CUgraph(childGraph))             # <<<<<<<<<<<<<<
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_childGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pchildGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25980
 *     else:
 *         pchildGraph = int(CUgraph(childGraph))
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph             # <<<<<<<<<<<<<<
 * 
 *     dependencies = [] if dependencies is None else dependencies
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pchildGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25980, __pyx_L1_error)
    __pyx_v_cchildGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":25982
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph
 * 
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":25983
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_5 = __pyx_pf_4cuda_4cuda_24cuGraphAddChildGraphNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 25983, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":25984
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 25984, __pyx_L1_error)

    /* "cuda/cuda.pyx":25983
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":25987
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_2 = (__pyx_v_hGraph == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":25988
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":25987
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":25989
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25990
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":25991
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25991, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":25989
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":25993
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":25994
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 25994, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":25996
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":25997
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":25998
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25998, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":25999
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 25999, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":26000
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":26001
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26001, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26001, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26001, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26001, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26001, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26001, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26001, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26001, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26001, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 26001, __pyx_L1_error)

      /* "cuda/cuda.pyx":26000
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":26003
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26003, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":26004
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26004, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":25998
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":26006
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddChildGraphNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cchildGraph)
 *     if cdependencies is not NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_2)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26006, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26006, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":26007
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddChildGraphNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cchildGraph)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26007, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cdependencies;
  }
  __pyx_t_11 = __pyx_f_4cuda_5ccuda_cuGraphAddChildGraphNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_10, __pyx_v_numDependencies, __pyx_v_cchildGraph); if (unlikely(__pyx_t_11 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26007, __pyx_L1_error)
  __pyx_v_err = __pyx_t_11;

  /* "cuda/cuda.pyx":26008
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddChildGraphNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cchildGraph)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_2 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26009
 *     err = ccuda.cuGraphAddChildGraphNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cchildGraph)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":26008
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddChildGraphNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cchildGraph)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":26010
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":25934
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddChildGraphNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, childGraph):             # <<<<<<<<<<<<<<
 *     """ Creates a child graph node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddChildGraphNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pchildGraph);
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_24cuGraphAddChildGraphNode_2generator23);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26013
 * 
 * @cython.embedsignature(True)
 * def cuGraphChildGraphNodeGetGraph(hNode):             # <<<<<<<<<<<<<<
 *     """ Gets a handle to the embedded graph of a child graph node.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_497cuGraphChildGraphNodeGetGraph(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_496cuGraphChildGraphNodeGetGraph[] = "cuGraphChildGraphNodeGetGraph(hNode)\n Gets a handle to the embedded graph of a child graph node.\n\n    Gets a handle to the embedded graph in a child graph node. This call\n    does not clone the graph. Changes to the graph will be reflected in the\n    node, and the node retains ownership of the graph.\n\n    Allocation and free nodes cannot be added to the returned graph.\n    Attempting to do so will return an error.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to get the embedded graph for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n    phGraph : :py:obj:`~.CUgraph`\n        Location to store a handle to the graph\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphNodeFindInClone`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_497cuGraphChildGraphNodeGetGraph = {"cuGraphChildGraphNodeGetGraph", (PyCFunction)__pyx_pw_4cuda_4cuda_497cuGraphChildGraphNodeGetGraph, METH_O, __pyx_doc_4cuda_4cuda_496cuGraphChildGraphNodeGetGraph};
static PyObject *__pyx_pw_4cuda_4cuda_497cuGraphChildGraphNodeGetGraph(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphChildGraphNodeGetGraph (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_496cuGraphChildGraphNodeGetGraph(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_496cuGraphChildGraphNodeGetGraph(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_phGraph = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__870)
  __Pyx_RefNannySetupContext("cuGraphChildGraphNodeGetGraph", 0);
  __Pyx_TraceCall("cuGraphChildGraphNodeGetGraph", __pyx_f[0], 26013, 0, __PYX_ERR(0, 26013, __pyx_L1_error));

  /* "cuda/cuda.pyx":26040
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26041
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26040
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26042
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26043
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26044
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26044, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26042
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26046
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26047
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraph phGraph = CUgraph()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26047, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26049
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef CUgraph phGraph = CUgraph()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphChildGraphNodeGetGraph(chNode, phGraph._ptr)
 *     return (CUresult(err), phGraph)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phGraph = ((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":26050
 * 
 *     cdef CUgraph phGraph = CUgraph()
 *     err = ccuda.cuGraphChildGraphNodeGetGraph(chNode, phGraph._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraph)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphChildGraphNodeGetGraph(__pyx_v_chNode, __pyx_v_phGraph->_ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26050, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":26051
 *     cdef CUgraph phGraph = CUgraph()
 *     err = ccuda.cuGraphChildGraphNodeGetGraph(chNode, phGraph._ptr)
 *     return (CUresult(err), phGraph)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraph));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraph));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phGraph));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26013
 * 
 * @cython.embedsignature(True)
 * def cuGraphChildGraphNodeGetGraph(hNode):             # <<<<<<<<<<<<<<
 *     """ Gets a handle to the embedded graph of a child graph node.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphChildGraphNodeGetGraph", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraph);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26054
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEmptyNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Creates an empty node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_499cuGraphAddEmptyNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_498cuGraphAddEmptyNode[] = "cuGraphAddEmptyNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies)\n Creates an empty node and adds it to a graph.\n\n    Creates a new node which performs no operation, and adds it to `hGraph`\n    with `numDependencies` dependencies specified via `dependencies`. It is\n    possible for `numDependencies` to be 0, in which case the node will be\n    placed at the root of the graph. `dependencies` may not have any\n    duplicate entries. A handle to the new node will be returned in\n    `phGraphNode`.\n\n    An empty node performs no operation during execution, but can be used\n    for transitive ordering. For example, a phased execution graph with 2\n    groups of n nodes with a barrier between them can be represented using\n    an empty node and 2*n dependency edges, rather than no empty node and\n    n^2 dependency edges.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_499cuGraphAddEmptyNode = {"cuGraphAddEmptyNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_499cuGraphAddEmptyNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_498cuGraphAddEmptyNode};
static PyObject *__pyx_pw_4cuda_4cuda_499cuGraphAddEmptyNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddEmptyNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddEmptyNode", 1, 3, 3, 1); __PYX_ERR(0, 26054, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddEmptyNode", 1, 3, 3, 2); __PYX_ERR(0, 26054, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddEmptyNode") < 0)) __PYX_ERR(0, 26054, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 26054, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddEmptyNode", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26054, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddEmptyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_498cuGraphAddEmptyNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_19cuGraphAddEmptyNode_2generator24(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":26091
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_19cuGraphAddEmptyNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_46_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_46_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26091, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_19cuGraphAddEmptyNode_2generator24, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddEmptyNode_locals_genex, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 26091, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddEmptyNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_19cuGraphAddEmptyNode_2generator24(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 26091, 0, __PYX_ERR(0, 26091, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 26091, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 26091, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26091, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 26091, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 26091, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 26091, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26054
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEmptyNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Creates an empty node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_498cuGraphAddEmptyNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *__pyx_cur_scope;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_19cuGraphAddEmptyNode_2generator24 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  CUgraphNode *__pyx_t_10;
  CUresult __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__871)
  __Pyx_RefNannySetupContext("cuGraphAddEmptyNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26054, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddEmptyNode", __pyx_f[0], 26054, 0, __PYX_ERR(0, 26054, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":26090
 *     :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`
 *     """
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26090, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26091
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_19cuGraphAddEmptyNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 26091, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":26092
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26092, __pyx_L1_error)

    /* "cuda/cuda.pyx":26091
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":26095
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_4 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26096
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26095
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26097
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":26098
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26099
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26099, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":26097
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26101
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":26102
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26102, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":26104
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26105
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":26106
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":26107
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26107, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":26108
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":26109
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26109, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 26109, __pyx_L1_error)

      /* "cuda/cuda.pyx":26108
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":26111
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26111, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":26112
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26112, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":26106
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":26114
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddEmptyNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies)
 *     if cdependencies is not NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26114, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26114, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":26115
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddEmptyNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cdependencies;
  }
  __pyx_t_11 = __pyx_f_4cuda_5ccuda_cuGraphAddEmptyNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_10, __pyx_v_numDependencies); if (unlikely(__pyx_t_11 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26115, __pyx_L1_error)
  __pyx_v_err = __pyx_t_11;

  /* "cuda/cuda.pyx":26116
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddEmptyNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_4 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":26117
 *     err = ccuda.cuGraphAddEmptyNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":26116
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddEmptyNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":26118
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26054
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEmptyNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Creates an empty node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddEmptyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_19cuGraphAddEmptyNode_2generator24);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26121
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEventRecordNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, event):             # <<<<<<<<<<<<<<
 *     """ Creates an event record node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_501cuGraphAddEventRecordNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_500cuGraphAddEventRecordNode[] = "cuGraphAddEventRecordNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies, event)\n Creates an event record node and adds it to a graph.\n\n    Creates a new event record node and adds it to `hGraph` with\n    `numDependencies` dependencies specified via `dependencies` and event\n    specified in `event`. It is possible for `numDependencies` to be 0, in\n    which case the node will be placed at the root of the graph.\n    `dependencies` may not have any duplicate entries. A handle to the new\n    node will be returned in `phGraphNode`.\n\n    Each launch of the graph will record `event` to capture execution of\n    the node's dependencies.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n    event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Event for the node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`,\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_501cuGraphAddEventRecordNode = {"cuGraphAddEventRecordNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_501cuGraphAddEventRecordNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_500cuGraphAddEventRecordNode};
static PyObject *__pyx_pw_4cuda_4cuda_501cuGraphAddEventRecordNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  PyObject *__pyx_v_event = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddEventRecordNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_event_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddEventRecordNode", 1, 4, 4, 1); __PYX_ERR(0, 26121, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddEventRecordNode", 1, 4, 4, 2); __PYX_ERR(0, 26121, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddEventRecordNode", 1, 4, 4, 3); __PYX_ERR(0, 26121, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddEventRecordNode") < 0)) __PYX_ERR(0, 26121, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 26121, __pyx_L3_error)
    __pyx_v_event = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddEventRecordNode", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26121, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddEventRecordNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_500cuGraphAddEventRecordNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_event);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_25cuGraphAddEventRecordNode_2generator25(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":26167
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_25cuGraphAddEventRecordNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_48_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_48_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26167, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_25cuGraphAddEventRecordNode_2generator25, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddEventRecordNode_locals, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 26167, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddEventRecordNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_25cuGraphAddEventRecordNode_2generator25(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 26167, 0, __PYX_ERR(0, 26167, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 26167, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 26167, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26167, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 26167, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26167, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 26167, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26167, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 26167, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26121
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEventRecordNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, event):             # <<<<<<<<<<<<<<
 *     """ Creates an event record node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_500cuGraphAddEventRecordNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, PyObject *__pyx_v_event) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *__pyx_cur_scope;
  CUevent __pyx_v_cevent;
  PyObject *__pyx_v_pevent = NULL;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_25cuGraphAddEventRecordNode_2generator25 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  CUgraphNode *__pyx_t_10;
  CUresult __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__872)
  __Pyx_RefNannySetupContext("cuGraphAddEventRecordNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26121, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddEventRecordNode", __pyx_f[0], 26121, 0, __PYX_ERR(0, 26121, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":26157
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_event == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26158
 *     cdef ccuda.CUevent cevent
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 */
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26157
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26159
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_event, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26160
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pevent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26161
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 *     else:
 *         pevent = int(CUevent(event))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26161, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26159
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26163
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 *         pevent = int(CUevent(event))             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pevent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26164
 *     else:
 *         pevent = int(CUevent(event))
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 * 
 *     dependencies = [] if dependencies is None else dependencies
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26164, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26166
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 * 
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":26167
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_5 = __pyx_pf_4cuda_4cuda_25cuGraphAddEventRecordNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 26167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":26168
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26168, __pyx_L1_error)

    /* "cuda/cuda.pyx":26167
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":26171
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_2 = (__pyx_v_hGraph == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26172
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26171
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":26173
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26174
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26175
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26175, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26173
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":26177
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26178
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26178, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":26180
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":26181
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":26182
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26183
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26183, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":26184
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":26185
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26185, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 26185, __pyx_L1_error)

      /* "cuda/cuda.pyx":26184
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":26187
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26187, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":26188
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":26182
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":26190
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddEventRecordNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cevent)
 *     if cdependencies is not NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_2)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26190, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26190, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":26191
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddEventRecordNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cevent)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cdependencies;
  }
  __pyx_t_11 = __pyx_f_4cuda_5ccuda_cuGraphAddEventRecordNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_10, __pyx_v_numDependencies, __pyx_v_cevent); if (unlikely(__pyx_t_11 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26191, __pyx_L1_error)
  __pyx_v_err = __pyx_t_11;

  /* "cuda/cuda.pyx":26192
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddEventRecordNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cevent)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_2 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26193
 *     err = ccuda.cuGraphAddEventRecordNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cevent)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":26192
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddEventRecordNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cevent)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":26194
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26121
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEventRecordNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, event):             # <<<<<<<<<<<<<<
 *     """ Creates an event record node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddEventRecordNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pevent);
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_25cuGraphAddEventRecordNode_2generator25);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26197
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventRecordNodeGetEvent(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns the event associated with an event record node.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_503cuGraphEventRecordNodeGetEvent(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_502cuGraphEventRecordNodeGetEvent[] = "cuGraphEventRecordNodeGetEvent(hNode)\n Returns the event associated with an event record node.\n\n    Returns the event of event record node `hNode` in `event_out`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to get the event for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    event_out : :py:obj:`~.CUevent`\n        Pointer to return the event\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphEventRecordNodeSetEvent`, :py:obj:`~.cuGraphEventWaitNodeGetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_503cuGraphEventRecordNodeGetEvent = {"cuGraphEventRecordNodeGetEvent", (PyCFunction)__pyx_pw_4cuda_4cuda_503cuGraphEventRecordNodeGetEvent, METH_O, __pyx_doc_4cuda_4cuda_502cuGraphEventRecordNodeGetEvent};
static PyObject *__pyx_pw_4cuda_4cuda_503cuGraphEventRecordNodeGetEvent(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphEventRecordNodeGetEvent (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_502cuGraphEventRecordNodeGetEvent(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_502cuGraphEventRecordNodeGetEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_event_out = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__873)
  __Pyx_RefNannySetupContext("cuGraphEventRecordNodeGetEvent", 0);
  __Pyx_TraceCall("cuGraphEventRecordNodeGetEvent", __pyx_f[0], 26197, 0, __PYX_ERR(0, 26197, __pyx_L1_error));

  /* "cuda/cuda.pyx":26219
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26220
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26219
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26221
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26222
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26223
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26223, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26221
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26225
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26226
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUevent event_out = CUevent()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26226, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26228
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef CUevent event_out = CUevent()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphEventRecordNodeGetEvent(chNode, event_out._ptr)
 *     return (CUresult(err), event_out)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_event_out = ((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":26229
 * 
 *     cdef CUevent event_out = CUevent()
 *     err = ccuda.cuGraphEventRecordNodeGetEvent(chNode, event_out._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), event_out)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphEventRecordNodeGetEvent(__pyx_v_chNode, __pyx_v_event_out->_ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26229, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":26230
 *     cdef CUevent event_out = CUevent()
 *     err = ccuda.cuGraphEventRecordNodeGetEvent(chNode, event_out._ptr)
 *     return (CUresult(err), event_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_event_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_event_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_event_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26197
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventRecordNodeGetEvent(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns the event associated with an event record node.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphEventRecordNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_event_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26233
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventRecordNodeSetEvent(hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets an event record node's event.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_505cuGraphEventRecordNodeSetEvent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_504cuGraphEventRecordNodeSetEvent[] = "cuGraphEventRecordNodeSetEvent(hNode, event)\n Sets an event record node's event.\n\n    Sets the event of event record node `hNode` to `event`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to set the event for\n    event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Event to use\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphEventRecordNodeGetEvent`, :py:obj:`~.cuGraphEventWaitNodeSetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_505cuGraphEventRecordNodeSetEvent = {"cuGraphEventRecordNodeSetEvent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_505cuGraphEventRecordNodeSetEvent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_504cuGraphEventRecordNodeSetEvent};
static PyObject *__pyx_pw_4cuda_4cuda_505cuGraphEventRecordNodeSetEvent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  PyObject *__pyx_v_event = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphEventRecordNodeSetEvent (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_event_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphEventRecordNodeSetEvent", 1, 2, 2, 1); __PYX_ERR(0, 26233, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphEventRecordNodeSetEvent") < 0)) __PYX_ERR(0, 26233, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hNode = values[0];
    __pyx_v_event = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphEventRecordNodeSetEvent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26233, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_504cuGraphEventRecordNodeSetEvent(__pyx_self, __pyx_v_hNode, __pyx_v_event);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_504cuGraphEventRecordNodeSetEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, PyObject *__pyx_v_event) {
  CUevent __pyx_v_cevent;
  PyObject *__pyx_v_pevent = NULL;
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__874)
  __Pyx_RefNannySetupContext("cuGraphEventRecordNodeSetEvent", 0);
  __Pyx_TraceCall("cuGraphEventRecordNodeSetEvent", __pyx_f[0], 26233, 0, __PYX_ERR(0, 26233, __pyx_L1_error));

  /* "cuda/cuda.pyx":26255
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_event == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26256
 *     cdef ccuda.CUevent cevent
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 */
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26255
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26257
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_event, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26258
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pevent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26259
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 *     else:
 *         pevent = int(CUevent(event))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26259, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26257
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26261
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 *         pevent = int(CUevent(event))             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pevent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26262
 *     else:
 *         pevent = int(CUevent(event))
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode chNode
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26262, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26265
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26266
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26265
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26267
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26268
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26269
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26269, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26267
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26271
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26272
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphEventRecordNodeSetEvent(chNode, cevent)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26272, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":26274
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     err = ccuda.cuGraphEventRecordNodeSetEvent(chNode, cevent)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphEventRecordNodeSetEvent(__pyx_v_chNode, __pyx_v_cevent); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26274, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":26275
 * 
 *     err = ccuda.cuGraphEventRecordNodeSetEvent(chNode, cevent)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26233
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventRecordNodeSetEvent(hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets an event record node's event.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pevent);
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26278
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEventWaitNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, event):             # <<<<<<<<<<<<<<
 *     """ Creates an event wait node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_507cuGraphAddEventWaitNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_506cuGraphAddEventWaitNode[] = "cuGraphAddEventWaitNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies, event)\n Creates an event wait node and adds it to a graph.\n\n    Creates a new event wait node and adds it to `hGraph` with\n    `numDependencies` dependencies specified via `dependencies` and event\n    specified in `event`. It is possible for `numDependencies` to be 0, in\n    which case the node will be placed at the root of the graph.\n    `dependencies` may not have any duplicate entries. A handle to the new\n    node will be returned in `phGraphNode`.\n\n    The graph node will wait for all work captured in `event`. See\n    :py:obj:`~.cuEventRecord()` for details on what is captured by an\n    event. `event` may be from a different context or device than the\n    launch stream.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n    event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Event for the node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`,\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_507cuGraphAddEventWaitNode = {"cuGraphAddEventWaitNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_507cuGraphAddEventWaitNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_506cuGraphAddEventWaitNode};
static PyObject *__pyx_pw_4cuda_4cuda_507cuGraphAddEventWaitNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  PyObject *__pyx_v_event = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddEventWaitNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_event_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddEventWaitNode", 1, 4, 4, 1); __PYX_ERR(0, 26278, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddEventWaitNode", 1, 4, 4, 2); __PYX_ERR(0, 26278, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddEventWaitNode", 1, 4, 4, 3); __PYX_ERR(0, 26278, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddEventWaitNode") < 0)) __PYX_ERR(0, 26278, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 26278, __pyx_L3_error)
    __pyx_v_event = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddEventWaitNode", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26278, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddEventWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_506cuGraphAddEventWaitNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_event);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_23cuGraphAddEventWaitNode_2generator26(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":26326
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_23cuGraphAddEventWaitNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_50_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_50_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26326, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_23cuGraphAddEventWaitNode_2generator26, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddEventWaitNode_locals_g, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 26326, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddEventWaitNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_23cuGraphAddEventWaitNode_2generator26(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 26326, 0, __PYX_ERR(0, 26326, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 26326, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 26326, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26326, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 26326, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26326, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 26326, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26326, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 26326, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26278
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEventWaitNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, event):             # <<<<<<<<<<<<<<
 *     """ Creates an event wait node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_506cuGraphAddEventWaitNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, PyObject *__pyx_v_event) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *__pyx_cur_scope;
  CUevent __pyx_v_cevent;
  PyObject *__pyx_v_pevent = NULL;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_23cuGraphAddEventWaitNode_2generator26 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  CUgraphNode *__pyx_t_10;
  CUresult __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__875)
  __Pyx_RefNannySetupContext("cuGraphAddEventWaitNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26278, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddEventWaitNode", __pyx_f[0], 26278, 0, __PYX_ERR(0, 26278, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":26316
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_event == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26317
 *     cdef ccuda.CUevent cevent
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 */
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26316
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26318
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_event, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26319
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pevent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26320
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 *     else:
 *         pevent = int(CUevent(event))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26320, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26318
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26322
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 *         pevent = int(CUevent(event))             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pevent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26323
 *     else:
 *         pevent = int(CUevent(event))
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 * 
 *     dependencies = [] if dependencies is None else dependencies
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26323, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26325
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 * 
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":26326
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_5 = __pyx_pf_4cuda_4cuda_23cuGraphAddEventWaitNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 26326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":26327
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26327, __pyx_L1_error)

    /* "cuda/cuda.pyx":26326
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":26330
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_2 = (__pyx_v_hGraph == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26331
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26330
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":26332
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26333
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26334
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26334, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26332
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":26336
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26337
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26337, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":26339
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":26340
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":26341
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26341, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26342
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26342, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":26343
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":26344
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26344, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 26344, __pyx_L1_error)

      /* "cuda/cuda.pyx":26343
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":26346
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26346, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":26347
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26347, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":26341
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":26349
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddEventWaitNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cevent)
 *     if cdependencies is not NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_2)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26349, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26349, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":26350
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddEventWaitNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cevent)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26350, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26350, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cdependencies;
  }
  __pyx_t_11 = __pyx_f_4cuda_5ccuda_cuGraphAddEventWaitNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_10, __pyx_v_numDependencies, __pyx_v_cevent); if (unlikely(__pyx_t_11 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26350, __pyx_L1_error)
  __pyx_v_err = __pyx_t_11;

  /* "cuda/cuda.pyx":26351
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddEventWaitNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cevent)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_2 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26352
 *     err = ccuda.cuGraphAddEventWaitNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cevent)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":26351
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddEventWaitNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cevent)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":26353
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26278
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEventWaitNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, event):             # <<<<<<<<<<<<<<
 *     """ Creates an event wait node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddEventWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pevent);
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_23cuGraphAddEventWaitNode_2generator26);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26356
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventWaitNodeGetEvent(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns the event associated with an event wait node.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_509cuGraphEventWaitNodeGetEvent(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_508cuGraphEventWaitNodeGetEvent[] = "cuGraphEventWaitNodeGetEvent(hNode)\n Returns the event associated with an event wait node.\n\n    Returns the event of event wait node `hNode` in `event_out`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to get the event for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    event_out : :py:obj:`~.CUevent`\n        Pointer to return the event\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphEventWaitNodeSetEvent`, :py:obj:`~.cuGraphEventRecordNodeGetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_509cuGraphEventWaitNodeGetEvent = {"cuGraphEventWaitNodeGetEvent", (PyCFunction)__pyx_pw_4cuda_4cuda_509cuGraphEventWaitNodeGetEvent, METH_O, __pyx_doc_4cuda_4cuda_508cuGraphEventWaitNodeGetEvent};
static PyObject *__pyx_pw_4cuda_4cuda_509cuGraphEventWaitNodeGetEvent(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphEventWaitNodeGetEvent (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_508cuGraphEventWaitNodeGetEvent(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_508cuGraphEventWaitNodeGetEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_event_out = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__876)
  __Pyx_RefNannySetupContext("cuGraphEventWaitNodeGetEvent", 0);
  __Pyx_TraceCall("cuGraphEventWaitNodeGetEvent", __pyx_f[0], 26356, 0, __PYX_ERR(0, 26356, __pyx_L1_error));

  /* "cuda/cuda.pyx":26378
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26379
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26378
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26380
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26381
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26382
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26382, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26380
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26384
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26385
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUevent event_out = CUevent()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26385, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26387
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef CUevent event_out = CUevent()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphEventWaitNodeGetEvent(chNode, event_out._ptr)
 *     return (CUresult(err), event_out)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_event_out = ((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":26388
 * 
 *     cdef CUevent event_out = CUevent()
 *     err = ccuda.cuGraphEventWaitNodeGetEvent(chNode, event_out._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), event_out)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphEventWaitNodeGetEvent(__pyx_v_chNode, __pyx_v_event_out->_ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26388, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":26389
 *     cdef CUevent event_out = CUevent()
 *     err = ccuda.cuGraphEventWaitNodeGetEvent(chNode, event_out._ptr)
 *     return (CUresult(err), event_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_event_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_event_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_event_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26356
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventWaitNodeGetEvent(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns the event associated with an event wait node.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphEventWaitNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_event_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26392
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventWaitNodeSetEvent(hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets an event wait node's event.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_511cuGraphEventWaitNodeSetEvent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_510cuGraphEventWaitNodeSetEvent[] = "cuGraphEventWaitNodeSetEvent(hNode, event)\n Sets an event wait node's event.\n\n    Sets the event of event wait node `hNode` to `event`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to set the event for\n    event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Event to use\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphEventWaitNodeGetEvent`, :py:obj:`~.cuGraphEventRecordNodeSetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_511cuGraphEventWaitNodeSetEvent = {"cuGraphEventWaitNodeSetEvent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_511cuGraphEventWaitNodeSetEvent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_510cuGraphEventWaitNodeSetEvent};
static PyObject *__pyx_pw_4cuda_4cuda_511cuGraphEventWaitNodeSetEvent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  PyObject *__pyx_v_event = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphEventWaitNodeSetEvent (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_event_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphEventWaitNodeSetEvent", 1, 2, 2, 1); __PYX_ERR(0, 26392, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphEventWaitNodeSetEvent") < 0)) __PYX_ERR(0, 26392, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hNode = values[0];
    __pyx_v_event = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphEventWaitNodeSetEvent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26392, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_510cuGraphEventWaitNodeSetEvent(__pyx_self, __pyx_v_hNode, __pyx_v_event);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_510cuGraphEventWaitNodeSetEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, PyObject *__pyx_v_event) {
  CUevent __pyx_v_cevent;
  PyObject *__pyx_v_pevent = NULL;
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__877)
  __Pyx_RefNannySetupContext("cuGraphEventWaitNodeSetEvent", 0);
  __Pyx_TraceCall("cuGraphEventWaitNodeSetEvent", __pyx_f[0], 26392, 0, __PYX_ERR(0, 26392, __pyx_L1_error));

  /* "cuda/cuda.pyx":26414
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_event == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26415
 *     cdef ccuda.CUevent cevent
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 */
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26414
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26416
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_event, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26417
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pevent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26418
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 *     else:
 *         pevent = int(CUevent(event))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26418, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26416
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26420
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 *         pevent = int(CUevent(event))             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pevent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26421
 *     else:
 *         pevent = int(CUevent(event))
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode chNode
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26421, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26424
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26425
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26424
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26426
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26427
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26428
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26428, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26426
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26430
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26431
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphEventWaitNodeSetEvent(chNode, cevent)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26431, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":26433
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     err = ccuda.cuGraphEventWaitNodeSetEvent(chNode, cevent)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphEventWaitNodeSetEvent(__pyx_v_chNode, __pyx_v_cevent); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26433, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":26434
 * 
 *     err = ccuda.cuGraphEventWaitNodeSetEvent(chNode, cevent)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26392
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventWaitNodeSetEvent(hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets an event wait node's event.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pevent);
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26437
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an external semaphore signal node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_513cuGraphAddExternalSemaphoresSignalNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_512cuGraphAddExternalSemaphoresSignalNode[] = "cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS nodeParams: CUDA_EXT_SEM_SIGNAL_NODE_PARAMS)\n Creates an external semaphore signal node and adds it to a graph.\n\n    Creates a new external semaphore signal node and adds it to `hGraph`\n    with `numDependencies` dependencies specified via `dependencies` and\n    arguments specified in `nodeParams`. It is possible for\n    `numDependencies` to be 0, in which case the node will be placed at the\n    root of the graph. `dependencies` may not have any duplicate entries. A\n    handle to the new node will be returned in `phGraphNode`.\n\n    Performs a signal operation on a set of externally allocated semaphore\n    objects when the node is launched. The operation(s) will occur after\n    all of the node's dependencies have completed.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n    nodeParams : :py:obj:`~.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS`\n        Parameters for the node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphExternalSemaphoresSignalNodeGetParams`, :py:obj:`~.cuGraphExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGrap""hDestroyNode`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`,\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_513cuGraphAddExternalSemaphoresSignalNode = {"cuGraphAddExternalSemaphoresSignalNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_513cuGraphAddExternalSemaphoresSignalNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_512cuGraphAddExternalSemaphoresSignalNode};
static PyObject *__pyx_pw_4cuda_4cuda_513cuGraphAddExternalSemaphoresSignalNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddExternalSemaphoresSignalNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_nodeParams,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddExternalSemaphoresSignalNode", 1, 4, 4, 1); __PYX_ERR(0, 26437, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddExternalSemaphoresSignalNode", 1, 4, 4, 2); __PYX_ERR(0, 26437, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddExternalSemaphoresSignalNode", 1, 4, 4, 3); __PYX_ERR(0, 26437, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddExternalSemaphoresSignalNode") < 0)) __PYX_ERR(0, 26437, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 26437, __pyx_L3_error)
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddExternalSemaphoresSignalNode", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26437, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddExternalSemaphoresSignalNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 26437, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_512cuGraphAddExternalSemaphoresSignalNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_38cuGraphAddExternalSemaphoresSignalNode_2generator27(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":26474
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_38cuGraphAddExternalSemaphoresSignalNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_52_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_52_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26474, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_38cuGraphAddExternalSemaphoresSignalNode_2generator27, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddExternalSemaphoresSign, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 26474, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddExternalSemaphoresSignalNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_38cuGraphAddExternalSemaphoresSignalNode_2generator27(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 26474, 0, __PYX_ERR(0, 26474, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 26474, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 26474, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26474, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 26474, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26474, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 26474, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26474, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 26474, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26437
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an external semaphore signal node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_512cuGraphAddExternalSemaphoresSignalNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_nodeParams) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *__pyx_cur_scope;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_38cuGraphAddExternalSemaphoresSignalNode_2generator27 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_t_10;
  CUgraphNode *__pyx_t_11;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__878)
  __Pyx_RefNannySetupContext("cuGraphAddExternalSemaphoresSignalNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26437, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddExternalSemaphoresSignalNode", __pyx_f[0], 26437, 0, __PYX_ERR(0, 26437, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":26473
 *     :py:obj:`~.cuGraphExternalSemaphoresSignalNodeGetParams`, :py:obj:`~.cuGraphExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`,
 *     """
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26474
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_38cuGraphAddExternalSemaphoresSignalNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 26474, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":26475
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26475, __pyx_L1_error)

    /* "cuda/cuda.pyx":26474
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":26478
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_4 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26479
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26478
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26480
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":26481
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26482
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26482, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":26480
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26484
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":26485
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26485, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":26487
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26488
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":26489
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":26490
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26490, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":26491
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":26492
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26492, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 26492, __pyx_L1_error)

      /* "cuda/cuda.pyx":26491
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":26494
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26494, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":26495
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26495, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":26489
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":26497
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddExternalSemaphoresSignalNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26497, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26497, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":26498
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddExternalSemaphoresSignalNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26498, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 26498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
    __pyx_t_10 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_10 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_10;

  /* "cuda/cuda.pyx":26499
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddExternalSemaphoresSignalNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_11 = __pyx_v_cdependencies;
  }
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuGraphAddExternalSemaphoresSignalNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_11, __pyx_v_numDependencies, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26499, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":26500
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddExternalSemaphoresSignalNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_4 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":26501
 *     err = ccuda.cuGraphAddExternalSemaphoresSignalNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":26500
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddExternalSemaphoresSignalNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":26502
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_13, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26437
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an external semaphore signal node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddExternalSemaphoresSignalNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_38cuGraphAddExternalSemaphoresSignalNode_2generator27);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26505
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresSignalNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns an external semaphore signal node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_515cuGraphExternalSemaphoresSignalNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_514cuGraphExternalSemaphoresSignalNodeGetParams[] = "cuGraphExternalSemaphoresSignalNodeGetParams(hNode)\n Returns an external semaphore signal node's parameters.\n\n    Returns the parameters of an external semaphore signal node `hNode` in\n    `params_out`. The `extSemArray` and `paramsArray` returned in\n    `params_out`, are owned by the node. This memory remains valid until\n    the node is destroyed or its parameters are modified, and should not be\n    modified directly. Use\n    :py:obj:`~.cuGraphExternalSemaphoresSignalNodeSetParams` to update the\n    parameters of this node.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to get the parameters for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    params_out : :py:obj:`~.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS`\n        Pointer to return the parameters\n\n    See Also\n    --------\n    :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuGraphExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_515cuGraphExternalSemaphoresSignalNodeGetParams = {"cuGraphExternalSemaphoresSignalNodeGetParams", (PyCFunction)__pyx_pw_4cuda_4cuda_515cuGraphExternalSemaphoresSignalNodeGetParams, METH_O, __pyx_doc_4cuda_4cuda_514cuGraphExternalSemaphoresSignalNodeGetParams};
static PyObject *__pyx_pw_4cuda_4cuda_515cuGraphExternalSemaphoresSignalNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExternalSemaphoresSignalNodeGetParams (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_514cuGraphExternalSemaphoresSignalNodeGetParams(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_514cuGraphExternalSemaphoresSignalNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_params_out = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__879)
  __Pyx_RefNannySetupContext("cuGraphExternalSemaphoresSignalNodeGetParams", 0);
  __Pyx_TraceCall("cuGraphExternalSemaphoresSignalNodeGetParams", __pyx_f[0], 26505, 0, __PYX_ERR(0, 26505, __pyx_L1_error));

  /* "cuda/cuda.pyx":26533
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26534
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26533
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26535
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26536
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26537
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26537, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26535
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26539
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26540
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS params_out = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26540, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26542
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS params_out = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphExternalSemaphoresSignalNodeGetParams(chNode, params_out._ptr)
 *     return (CUresult(err), params_out)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_params_out = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":26543
 * 
 *     cdef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS params_out = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS()
 *     err = ccuda.cuGraphExternalSemaphoresSignalNodeGetParams(chNode, params_out._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), params_out)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresSignalNodeGetParams(__pyx_v_chNode, __pyx_v_params_out->__pyx_base._ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26543, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":26544
 *     cdef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS params_out = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS()
 *     err = ccuda.cuGraphExternalSemaphoresSignalNodeGetParams(chNode, params_out._ptr)
 *     return (CUresult(err), params_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_params_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_params_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_params_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26505
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresSignalNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns an external semaphore signal node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExternalSemaphoresSignalNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_params_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26547
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets an external semaphore signal node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_517cuGraphExternalSemaphoresSignalNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_516cuGraphExternalSemaphoresSignalNodeSetParams[] = "cuGraphExternalSemaphoresSignalNodeSetParams(hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS nodeParams: CUDA_EXT_SEM_SIGNAL_NODE_PARAMS)\n Sets an external semaphore signal node's parameters.\n\n    Sets the parameters of an external semaphore signal node `hNode` to\n    `nodeParams`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to set the parameters for\n    nodeParams : :py:obj:`~.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS`\n        Parameters to copy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuGraphExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_517cuGraphExternalSemaphoresSignalNodeSetParams = {"cuGraphExternalSemaphoresSignalNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_517cuGraphExternalSemaphoresSignalNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_516cuGraphExternalSemaphoresSignalNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_517cuGraphExternalSemaphoresSignalNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExternalSemaphoresSignalNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_nodeParams,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExternalSemaphoresSignalNodeSetParams", 1, 2, 2, 1); __PYX_ERR(0, 26547, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExternalSemaphoresSignalNodeSetParams") < 0)) __PYX_ERR(0, 26547, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hNode = values[0];
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExternalSemaphoresSignalNodeSetParams", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26547, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 26547, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_516cuGraphExternalSemaphoresSignalNodeSetParams(__pyx_self, __pyx_v_hNode, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_516cuGraphExternalSemaphoresSignalNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_nodeParams) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__880)
  __Pyx_RefNannySetupContext("cuGraphExternalSemaphoresSignalNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphExternalSemaphoresSignalNodeSetParams", __pyx_f[0], 26547, 0, __PYX_ERR(0, 26547, __pyx_L1_error));

  /* "cuda/cuda.pyx":26570
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26571
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26570
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26572
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26573
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26574
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26574, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26572
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26576
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26577
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26577, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26579
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphExternalSemaphoresSignalNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26579, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 26579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":26580
 * 
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExternalSemaphoresSignalNodeSetParams(chNode, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresSignalNodeSetParams(__pyx_v_chNode, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26580, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":26581
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExternalSemaphoresSignalNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 26581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26547
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets an external semaphore signal node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26584
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an external semaphore wait node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_519cuGraphAddExternalSemaphoresWaitNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_518cuGraphAddExternalSemaphoresWaitNode[] = "cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies, CUDA_EXT_SEM_WAIT_NODE_PARAMS nodeParams: CUDA_EXT_SEM_WAIT_NODE_PARAMS)\n Creates an external semaphore wait node and adds it to a graph.\n\n    Creates a new external semaphore wait node and adds it to `hGraph` with\n    `numDependencies` dependencies specified via `dependencies` and\n    arguments specified in `nodeParams`. It is possible for\n    `numDependencies` to be 0, in which case the node will be placed at the\n    root of the graph. `dependencies` may not have any duplicate entries. A\n    handle to the new node will be returned in `phGraphNode`.\n\n    Performs a wait operation on a set of externally allocated semaphore\n    objects when the node is launched. The node's dependencies will not be\n    launched until the wait operation has completed.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n    nodeParams : :py:obj:`~.CUDA_EXT_SEM_WAIT_NODE_PARAMS`\n        Parameters for the node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphExternalSemaphoresWaitNodeGetParams`, :py:obj:`~.cuGraphExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`,"" :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`,\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_519cuGraphAddExternalSemaphoresWaitNode = {"cuGraphAddExternalSemaphoresWaitNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_519cuGraphAddExternalSemaphoresWaitNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_518cuGraphAddExternalSemaphoresWaitNode};
static PyObject *__pyx_pw_4cuda_4cuda_519cuGraphAddExternalSemaphoresWaitNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddExternalSemaphoresWaitNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_nodeParams,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddExternalSemaphoresWaitNode", 1, 4, 4, 1); __PYX_ERR(0, 26584, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddExternalSemaphoresWaitNode", 1, 4, 4, 2); __PYX_ERR(0, 26584, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddExternalSemaphoresWaitNode", 1, 4, 4, 3); __PYX_ERR(0, 26584, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddExternalSemaphoresWaitNode") < 0)) __PYX_ERR(0, 26584, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 26584, __pyx_L3_error)
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddExternalSemaphoresWaitNode", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26584, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddExternalSemaphoresWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 26584, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_518cuGraphAddExternalSemaphoresWaitNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_36cuGraphAddExternalSemaphoresWaitNode_2generator28(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":26621
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_36cuGraphAddExternalSemaphoresWaitNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_54_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_54_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26621, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_36cuGraphAddExternalSemaphoresWaitNode_2generator28, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddExternalSemaphoresWait, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 26621, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddExternalSemaphoresWaitNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_36cuGraphAddExternalSemaphoresWaitNode_2generator28(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 26621, 0, __PYX_ERR(0, 26621, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 26621, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 26621, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26621, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 26621, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 26621, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 26621, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26584
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an external semaphore wait node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_518cuGraphAddExternalSemaphoresWaitNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_nodeParams) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *__pyx_cur_scope;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_36cuGraphAddExternalSemaphoresWaitNode_2generator28 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_t_10;
  CUgraphNode *__pyx_t_11;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__881)
  __Pyx_RefNannySetupContext("cuGraphAddExternalSemaphoresWaitNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26584, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddExternalSemaphoresWaitNode", __pyx_f[0], 26584, 0, __PYX_ERR(0, 26584, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":26620
 *     :py:obj:`~.cuGraphExternalSemaphoresWaitNodeGetParams`, :py:obj:`~.cuGraphExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`,
 *     """
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26621
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_36cuGraphAddExternalSemaphoresWaitNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 26621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":26622
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26622, __pyx_L1_error)

    /* "cuda/cuda.pyx":26621
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":26625
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_4 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26626
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26625
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26627
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":26628
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26629
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26629, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":26627
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26631
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":26632
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26632, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":26634
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26635
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":26636
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26636, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":26637
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26637, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":26638
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":26639
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26639, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 26639, __pyx_L1_error)

      /* "cuda/cuda.pyx":26638
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":26641
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26641, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":26642
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26642, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":26636
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":26644
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddExternalSemaphoresWaitNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26644, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26644, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":26645
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddExternalSemaphoresWaitNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26645, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 26645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
    __pyx_t_10 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_10 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_10;

  /* "cuda/cuda.pyx":26646
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddExternalSemaphoresWaitNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_11 = __pyx_v_cdependencies;
  }
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuGraphAddExternalSemaphoresWaitNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_11, __pyx_v_numDependencies, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26646, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":26647
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddExternalSemaphoresWaitNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_4 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":26648
 *     err = ccuda.cuGraphAddExternalSemaphoresWaitNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":26647
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddExternalSemaphoresWaitNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":26649
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_13, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26584
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an external semaphore wait node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddExternalSemaphoresWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_36cuGraphAddExternalSemaphoresWaitNode_2generator28);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26652
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresWaitNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns an external semaphore wait node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_521cuGraphExternalSemaphoresWaitNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_520cuGraphExternalSemaphoresWaitNodeGetParams[] = "cuGraphExternalSemaphoresWaitNodeGetParams(hNode)\n Returns an external semaphore wait node's parameters.\n\n    Returns the parameters of an external semaphore wait node `hNode` in\n    `params_out`. The `extSemArray` and `paramsArray` returned in\n    `params_out`, are owned by the node. This memory remains valid until\n    the node is destroyed or its parameters are modified, and should not be\n    modified directly. Use\n    :py:obj:`~.cuGraphExternalSemaphoresSignalNodeSetParams` to update the\n    parameters of this node.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to get the parameters for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    params_out : :py:obj:`~.CUDA_EXT_SEM_WAIT_NODE_PARAMS`\n        Pointer to return the parameters\n\n    See Also\n    --------\n    :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuGraphExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_521cuGraphExternalSemaphoresWaitNodeGetParams = {"cuGraphExternalSemaphoresWaitNodeGetParams", (PyCFunction)__pyx_pw_4cuda_4cuda_521cuGraphExternalSemaphoresWaitNodeGetParams, METH_O, __pyx_doc_4cuda_4cuda_520cuGraphExternalSemaphoresWaitNodeGetParams};
static PyObject *__pyx_pw_4cuda_4cuda_521cuGraphExternalSemaphoresWaitNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExternalSemaphoresWaitNodeGetParams (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_520cuGraphExternalSemaphoresWaitNodeGetParams(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_520cuGraphExternalSemaphoresWaitNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_params_out = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__882)
  __Pyx_RefNannySetupContext("cuGraphExternalSemaphoresWaitNodeGetParams", 0);
  __Pyx_TraceCall("cuGraphExternalSemaphoresWaitNodeGetParams", __pyx_f[0], 26652, 0, __PYX_ERR(0, 26652, __pyx_L1_error));

  /* "cuda/cuda.pyx":26680
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26681
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26680
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26682
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26683
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26684
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26684, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26682
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26686
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26687
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_EXT_SEM_WAIT_NODE_PARAMS params_out = CUDA_EXT_SEM_WAIT_NODE_PARAMS()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26687, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26689
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef CUDA_EXT_SEM_WAIT_NODE_PARAMS params_out = CUDA_EXT_SEM_WAIT_NODE_PARAMS()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphExternalSemaphoresWaitNodeGetParams(chNode, params_out._ptr)
 *     return (CUresult(err), params_out)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_params_out = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":26690
 * 
 *     cdef CUDA_EXT_SEM_WAIT_NODE_PARAMS params_out = CUDA_EXT_SEM_WAIT_NODE_PARAMS()
 *     err = ccuda.cuGraphExternalSemaphoresWaitNodeGetParams(chNode, params_out._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), params_out)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresWaitNodeGetParams(__pyx_v_chNode, __pyx_v_params_out->__pyx_base._ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26690, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":26691
 *     cdef CUDA_EXT_SEM_WAIT_NODE_PARAMS params_out = CUDA_EXT_SEM_WAIT_NODE_PARAMS()
 *     err = ccuda.cuGraphExternalSemaphoresWaitNodeGetParams(chNode, params_out._ptr)
 *     return (CUresult(err), params_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_params_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_params_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_params_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26652
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresWaitNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns an external semaphore wait node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExternalSemaphoresWaitNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_params_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26694
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets an external semaphore wait node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_523cuGraphExternalSemaphoresWaitNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_522cuGraphExternalSemaphoresWaitNodeSetParams[] = "cuGraphExternalSemaphoresWaitNodeSetParams(hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS nodeParams: CUDA_EXT_SEM_WAIT_NODE_PARAMS)\n Sets an external semaphore wait node's parameters.\n\n    Sets the parameters of an external semaphore wait node `hNode` to\n    `nodeParams`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to set the parameters for\n    nodeParams : :py:obj:`~.CUDA_EXT_SEM_WAIT_NODE_PARAMS`\n        Parameters to copy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuGraphExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_523cuGraphExternalSemaphoresWaitNodeSetParams = {"cuGraphExternalSemaphoresWaitNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_523cuGraphExternalSemaphoresWaitNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_522cuGraphExternalSemaphoresWaitNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_523cuGraphExternalSemaphoresWaitNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExternalSemaphoresWaitNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_nodeParams,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExternalSemaphoresWaitNodeSetParams", 1, 2, 2, 1); __PYX_ERR(0, 26694, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExternalSemaphoresWaitNodeSetParams") < 0)) __PYX_ERR(0, 26694, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hNode = values[0];
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExternalSemaphoresWaitNodeSetParams", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26694, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 26694, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_522cuGraphExternalSemaphoresWaitNodeSetParams(__pyx_self, __pyx_v_hNode, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_522cuGraphExternalSemaphoresWaitNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_nodeParams) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__883)
  __Pyx_RefNannySetupContext("cuGraphExternalSemaphoresWaitNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphExternalSemaphoresWaitNodeSetParams", __pyx_f[0], 26694, 0, __PYX_ERR(0, 26694, __pyx_L1_error));

  /* "cuda/cuda.pyx":26717
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26718
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26717
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26719
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26720
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26721
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26721, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26719
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26723
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26724
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26724, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26726
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphExternalSemaphoresWaitNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26726, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 26726, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":26727
 * 
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExternalSemaphoresWaitNodeSetParams(chNode, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresWaitNodeSetParams(__pyx_v_chNode, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26727, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":26728
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExternalSemaphoresWaitNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 26728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26694
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets an external semaphore wait node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26731
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddBatchMemOpNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a batch memory operation node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_525cuGraphAddBatchMemOpNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_524cuGraphAddBatchMemOpNode[] = "cuGraphAddBatchMemOpNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies, CUDA_BATCH_MEM_OP_NODE_PARAMS nodeParams: CUDA_BATCH_MEM_OP_NODE_PARAMS)\n Creates a batch memory operation node and adds it to a graph.\n\n    Creates a new batch memory operation node and adds it to `hGraph` with\n    `numDependencies` dependencies specified via `dependencies` and\n    arguments specified in `nodeParams`. It is possible for\n    `numDependencies` to be 0, in which case the node will be placed at the\n    root of the graph. `dependencies` may not have any duplicate entries. A\n    handle to the new node will be returned in `phGraphNode`.\n\n    When the node is added, the paramArray inside `nodeParams` is copied\n    and therefore it can be freed after the call returns.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n    nodeParams : :py:obj:`~.CUDA_BATCH_MEM_OP_NODE_PARAMS`\n        Parameters for the node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamBatchMemOp_v2`, :py:obj:`~.cuStreamWaitValue32_v2`, :py:obj:`~.cuStreamWriteValue32_v2`, :py:obj:`~.cuStreamWaitValue64_v2`, :py:obj:`~.cuStreamWriteValue64_v2`, :py:obj:`~.cuGraphBatchMemOpNodeGetParams`, :py:obj:`~.cuGraphBatchMemOpNodeSetParams`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetN""ode`,\n\n    Notes\n    -----\n    Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_525cuGraphAddBatchMemOpNode = {"cuGraphAddBatchMemOpNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_525cuGraphAddBatchMemOpNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_524cuGraphAddBatchMemOpNode};
static PyObject *__pyx_pw_4cuda_4cuda_525cuGraphAddBatchMemOpNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddBatchMemOpNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_nodeParams,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddBatchMemOpNode", 1, 4, 4, 1); __PYX_ERR(0, 26731, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddBatchMemOpNode", 1, 4, 4, 2); __PYX_ERR(0, 26731, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddBatchMemOpNode", 1, 4, 4, 3); __PYX_ERR(0, 26731, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddBatchMemOpNode") < 0)) __PYX_ERR(0, 26731, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 26731, __pyx_L3_error)
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddBatchMemOpNode", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26731, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddBatchMemOpNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 26731, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_524cuGraphAddBatchMemOpNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_24cuGraphAddBatchMemOpNode_2generator29(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":26771
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_24cuGraphAddBatchMemOpNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_56_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_56_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26771, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_24cuGraphAddBatchMemOpNode_2generator29, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddBatchMemOpNode_locals, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 26771, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddBatchMemOpNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_24cuGraphAddBatchMemOpNode_2generator29(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 26771, 0, __PYX_ERR(0, 26771, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 26771, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 26771, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26771, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 26771, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26771, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 26771, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26771, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 26771, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26731
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddBatchMemOpNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a batch memory operation node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_524cuGraphAddBatchMemOpNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *__pyx_cur_scope;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_24cuGraphAddBatchMemOpNode_2generator29 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_t_10;
  CUgraphNode *__pyx_t_11;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__884)
  __Pyx_RefNannySetupContext("cuGraphAddBatchMemOpNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26731, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddBatchMemOpNode", __pyx_f[0], 26731, 0, __PYX_ERR(0, 26731, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":26770
 *     Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).
 *     """
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26771
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_24cuGraphAddBatchMemOpNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 26771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":26772
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26772, __pyx_L1_error)

    /* "cuda/cuda.pyx":26771
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":26775
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_4 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26776
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26775
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26777
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":26778
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26779
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26779, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":26777
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26781
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":26782
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26782, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":26784
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26785
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":26786
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":26787
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26787, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":26788
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":26789
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26789, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 26789, __pyx_L1_error)

      /* "cuda/cuda.pyx":26788
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":26791
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26791, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":26792
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26792, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":26786
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":26794
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddBatchMemOpNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26794, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 26794, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":26795
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddBatchMemOpNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26795, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 26795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
    __pyx_t_10 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_10 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_10;

  /* "cuda/cuda.pyx":26796
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddBatchMemOpNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 26796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_11 = __pyx_v_cdependencies;
  }
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuGraphAddBatchMemOpNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_11, __pyx_v_numDependencies, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26796, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":26797
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddBatchMemOpNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_4 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":26798
 *     err = ccuda.cuGraphAddBatchMemOpNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":26797
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddBatchMemOpNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":26799
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_13, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26731
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddBatchMemOpNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a batch memory operation node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddBatchMemOpNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_24cuGraphAddBatchMemOpNode_2generator29);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26802
 * 
 * @cython.embedsignature(True)
 * def cuGraphBatchMemOpNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a batch mem op node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_527cuGraphBatchMemOpNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_526cuGraphBatchMemOpNodeGetParams[] = "cuGraphBatchMemOpNodeGetParams(hNode)\n Returns a batch mem op node's parameters.\n\n    Returns the parameters of batch mem op node `hNode` in\n    `nodeParams_out`. The `paramArray` returned in `nodeParams_out` is\n    owned by the node. This memory remains valid until the node is\n    destroyed or its parameters are modified, and should not be modified\n    directly. Use :py:obj:`~.cuGraphBatchMemOpNodeSetParams` to update the\n    parameters of this node.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to get the parameters for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    nodeParams_out : :py:obj:`~.CUDA_BATCH_MEM_OP_NODE_PARAMS`\n        Pointer to return the parameters\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamBatchMemOp_v2`, :py:obj:`~.cuGraphAddBatchMemOpNode`, :py:obj:`~.cuGraphBatchMemOpNodeSetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_527cuGraphBatchMemOpNodeGetParams = {"cuGraphBatchMemOpNodeGetParams", (PyCFunction)__pyx_pw_4cuda_4cuda_527cuGraphBatchMemOpNodeGetParams, METH_O, __pyx_doc_4cuda_4cuda_526cuGraphBatchMemOpNodeGetParams};
static PyObject *__pyx_pw_4cuda_4cuda_527cuGraphBatchMemOpNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphBatchMemOpNodeGetParams (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_526cuGraphBatchMemOpNodeGetParams(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_526cuGraphBatchMemOpNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams_out = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__885)
  __Pyx_RefNannySetupContext("cuGraphBatchMemOpNodeGetParams", 0);
  __Pyx_TraceCall("cuGraphBatchMemOpNodeGetParams", __pyx_f[0], 26802, 0, __PYX_ERR(0, 26802, __pyx_L1_error));

  /* "cuda/cuda.pyx":26829
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26830
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26829
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26831
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26832
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26833
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26833, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26831
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26835
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26836
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_BATCH_MEM_OP_NODE_PARAMS nodeParams_out = CUDA_BATCH_MEM_OP_NODE_PARAMS()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26836, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26838
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef CUDA_BATCH_MEM_OP_NODE_PARAMS nodeParams_out = CUDA_BATCH_MEM_OP_NODE_PARAMS()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphBatchMemOpNodeGetParams(chNode, nodeParams_out._ptr)
 *     return (CUresult(err), nodeParams_out)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_nodeParams_out = ((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":26839
 * 
 *     cdef CUDA_BATCH_MEM_OP_NODE_PARAMS nodeParams_out = CUDA_BATCH_MEM_OP_NODE_PARAMS()
 *     err = ccuda.cuGraphBatchMemOpNodeGetParams(chNode, nodeParams_out._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), nodeParams_out)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphBatchMemOpNodeGetParams(__pyx_v_chNode, __pyx_v_nodeParams_out->__pyx_base._ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26839, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":26840
 *     cdef CUDA_BATCH_MEM_OP_NODE_PARAMS nodeParams_out = CUDA_BATCH_MEM_OP_NODE_PARAMS()
 *     err = ccuda.cuGraphBatchMemOpNodeGetParams(chNode, nodeParams_out._ptr)
 *     return (CUresult(err), nodeParams_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_nodeParams_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_nodeParams_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_nodeParams_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26802
 * 
 * @cython.embedsignature(True)
 * def cuGraphBatchMemOpNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a batch mem op node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphBatchMemOpNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_nodeParams_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26843
 * 
 * @cython.embedsignature(True)
 * def cuGraphBatchMemOpNodeSetParams(hNode, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a batch mem op node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_529cuGraphBatchMemOpNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_528cuGraphBatchMemOpNodeSetParams[] = "cuGraphBatchMemOpNodeSetParams(hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS nodeParams: CUDA_BATCH_MEM_OP_NODE_PARAMS)\n Sets a batch mem op node's parameters.\n\n    Sets the parameters of batch mem op node `hNode` to `nodeParams`.\n\n    The paramArray inside `nodeParams` is copied and therefore it can be\n    freed after the call returns.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to set the parameters for\n    nodeParams : :py:obj:`~.CUDA_BATCH_MEM_OP_NODE_PARAMS`\n        Parameters to copy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamBatchMemOp_v2`, :py:obj:`~.cuGraphAddBatchMemOpNode`, :py:obj:`~.cuGraphBatchMemOpNodeGetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_529cuGraphBatchMemOpNodeSetParams = {"cuGraphBatchMemOpNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_529cuGraphBatchMemOpNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_528cuGraphBatchMemOpNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_529cuGraphBatchMemOpNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphBatchMemOpNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_nodeParams,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphBatchMemOpNodeSetParams", 1, 2, 2, 1); __PYX_ERR(0, 26843, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphBatchMemOpNodeSetParams") < 0)) __PYX_ERR(0, 26843, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hNode = values[0];
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphBatchMemOpNodeSetParams", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26843, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 26843, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_528cuGraphBatchMemOpNodeSetParams(__pyx_self, __pyx_v_hNode, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_528cuGraphBatchMemOpNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__886)
  __Pyx_RefNannySetupContext("cuGraphBatchMemOpNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphBatchMemOpNodeSetParams", __pyx_f[0], 26843, 0, __PYX_ERR(0, 26843, __pyx_L1_error));

  /* "cuda/cuda.pyx":26868
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26869
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26868
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26870
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26871
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26872
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26872, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26870
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26874
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26875
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26875, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26877
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphBatchMemOpNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26877, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 26877, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":26878
 * 
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphBatchMemOpNodeSetParams(chNode, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphBatchMemOpNodeSetParams(__pyx_v_chNode, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26878, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":26879
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphBatchMemOpNodeSetParams(chNode, cnodeParams_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 26879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26843
 * 
 * @cython.embedsignature(True)
 * def cuGraphBatchMemOpNodeSetParams(hNode, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a batch mem op node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26882
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a batch mem op node in the given graphExec.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_531cuGraphExecBatchMemOpNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_530cuGraphExecBatchMemOpNodeSetParams[] = "cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS nodeParams: CUDA_BATCH_MEM_OP_NODE_PARAMS)\n Sets the parameters for a batch mem op node in the given graphExec.\n\n    Sets the parameters of a batch mem op node in an executable graph\n    `hGraphExec`. The node is identified by the corresponding node `hNode`\n    in the non-executable graph, from which the executable graph was\n    instantiated.\n\n    The following fields on operations may be modified on an executable\n    graph:\n\n    op.waitValue.address op.waitValue.value[64] op.waitValue.flags bits\n    corresponding to wait type (i.e. CU_STREAM_WAIT_VALUE_FLUSH bit cannot\n    be modified) op.writeValue.address op.writeValue.value[64]\n\n    Other fields, such as the context, count or type of operations, and\n    other types of operations such as membars, may not be modified.\n\n    `hNode` must not have been removed from the original graph.\n\n    The modifications only affect future launches of `hGraphExec`. Already\n    enqueued or running launches of `hGraphExec` are not affected by this\n    call. `hNode` is also not modified by this call.\n\n    The paramArray inside `nodeParams` is copied and therefore it can be\n    freed after the call returns.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The executable graph in which to set the specified node\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Batch mem op node from the graph from which graphExec was\n        instantiated\n    nodeParams : :py:obj:`~.CUDA_BATCH_MEM_OP_NODE_PARAMS`\n        Updated Parameters to set\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuStreamBatchMemOp_v2`, :py:obj:`~.cuGraphAddBatchMemOpNode`, :py:obj:`~.cuGraphBatchMemOpNodeGetParams`, :py:obj:`~.cuGraphBatchMemOpNodeSetParams`,"" :py:obj:`~.cuGraphInstantiate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_531cuGraphExecBatchMemOpNodeSetParams = {"cuGraphExecBatchMemOpNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_531cuGraphExecBatchMemOpNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_530cuGraphExecBatchMemOpNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_531cuGraphExecBatchMemOpNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExecBatchMemOpNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hNode,&__pyx_n_s_nodeParams,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecBatchMemOpNodeSetParams", 1, 3, 3, 1); __PYX_ERR(0, 26882, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecBatchMemOpNodeSetParams", 1, 3, 3, 2); __PYX_ERR(0, 26882, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExecBatchMemOpNodeSetParams") < 0)) __PYX_ERR(0, 26882, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hNode = values[1];
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExecBatchMemOpNodeSetParams", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26882, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 26882, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_530cuGraphExecBatchMemOpNodeSetParams(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_530cuGraphExecBatchMemOpNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_BATCH_MEM_OP_NODE_PARAMS_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__887)
  __Pyx_RefNannySetupContext("cuGraphExecBatchMemOpNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphExecBatchMemOpNodeSetParams", __pyx_f[0], 26882, 0, __PYX_ERR(0, 26882, __pyx_L1_error));

  /* "cuda/cuda.pyx":26929
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26930
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26929
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26931
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26932
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26933
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26933, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26931
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":26935
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26936
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26936, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":26939
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":26940
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":26939
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26941
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":26942
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":26943
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26943, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":26941
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":26945
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":26946
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 26946, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":26948
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphExecBatchMemOpNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26948, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 26948, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":26949
 * 
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExecBatchMemOpNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphExecBatchMemOpNodeSetParams(__pyx_v_chGraphExec, __pyx_v_chNode, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 26949, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":26950
 *     cdef ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExecBatchMemOpNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 26950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26882
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a batch mem op node in the given graphExec.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26953
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemAllocNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_MEM_ALLOC_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an allocation node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_533cuGraphAddMemAllocNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_532cuGraphAddMemAllocNode[] = "cuGraphAddMemAllocNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS nodeParams: CUDA_MEM_ALLOC_NODE_PARAMS)\n Creates an allocation node and adds it to a graph.\n\n    Creates a new allocation node and adds it to `hGraph` with\n    `numDependencies` dependencies specified via `dependencies` and\n    arguments specified in `nodeParams`. It is possible for\n    `numDependencies` to be 0, in which case the node will be placed at the\n    root of the graph. `dependencies` may not have any duplicate entries. A\n    handle to the new node will be returned in `phGraphNode`.\n\n    When :py:obj:`~.cuGraphAddMemAllocNode` creates an allocation node, it\n    returns the address of the allocation in `nodeParams.dptr`. The\n    allocation's address remains fixed across instantiations and launches.\n\n    If the allocation is freed in the same graph, by creating a free node\n    using :py:obj:`~.cuGraphAddMemFreeNode`, the allocation can be accessed\n    by nodes ordered after the allocation node but before the free node.\n    These allocations cannot be freed outside the owning graph, and they\n    can only be freed once in the owning graph.\n\n    If the allocation is not freed in the same graph, then it can be\n    accessed not only by nodes in the graph which are ordered after the\n    allocation node, but also by stream operations ordered after the\n    graph's execution but before the allocation is freed.\n\n    Allocations which are not freed in the same graph can be freed by:\n\n    - passing the allocation to :py:obj:`~.cuMemFreeAsync` or\n      :py:obj:`~.cuMemFree`;\n\n    - launching a graph with a free node for that allocation; or\n\n    - specifying\n      :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH` during\n      instantiation, which makes each launch behave as though it called\n      :py:obj:`~.cuMemFreeAsync` for every unfreed allocation.\n\n    It is not possible to free an allocation in both the own""ing graph and\n    another graph. If the allocation is freed in the same graph, a free\n    node cannot be added to another graph. If the allocation is freed in\n    another graph, a free node can no longer be added to the owning graph.\n\n    The following restrictions apply to graphs which contain allocation\n    and/or memory free nodes:\n\n    - Nodes and edges of the graph cannot be deleted.\n\n    - The graph cannot be used in a child node.\n\n    - Only one instantiation of the graph may exist at any point in time.\n\n    - The graph cannot be cloned.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n    nodeParams : :py:obj:`~.CUDA_MEM_ALLOC_NODE_PARAMS`\n        Parameters for the node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddMemFreeNode`, :py:obj:`~.cuGraphMemAllocNodeGetParams`, :py:obj:`~.cuDeviceGraphMemTrim`, :py:obj:`~.cuDeviceGetGraphMemAttribute`, :py:obj:`~.cuDeviceSetGraphMemAttribute`, :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_533cuGraphAddMemAllocNode = {"cuGraphAddMemAllocNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_533cuGraphAddMemAllocNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_532cuGraphAddMemAllocNode};
static PyObject *__pyx_pw_4cuda_4cuda_533cuGraphAddMemAllocNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddMemAllocNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_nodeParams,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemAllocNode", 1, 4, 4, 1); __PYX_ERR(0, 26953, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemAllocNode", 1, 4, 4, 2); __PYX_ERR(0, 26953, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemAllocNode", 1, 4, 4, 3); __PYX_ERR(0, 26953, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddMemAllocNode") < 0)) __PYX_ERR(0, 26953, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 26953, __pyx_L3_error)
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddMemAllocNode", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26953, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddMemAllocNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 26953, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_532cuGraphAddMemAllocNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_22cuGraphAddMemAllocNode_2generator30(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":27029
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_22cuGraphAddMemAllocNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_58_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_58_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 27029, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_22cuGraphAddMemAllocNode_2generator30, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddMemAllocNode_locals_ge, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 27029, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddMemAllocNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_22cuGraphAddMemAllocNode_2generator30(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 27029, 0, __PYX_ERR(0, 27029, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 27029, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 27029, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27029, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 27029, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27029, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 27029, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27029, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 27029, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":26953
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemAllocNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_MEM_ALLOC_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an allocation node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_532cuGraphAddMemAllocNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_nodeParams) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *__pyx_cur_scope;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_22cuGraphAddMemAllocNode_2generator30 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  struct CUDA_MEM_ALLOC_NODE_PARAMS_st *__pyx_t_10;
  CUgraphNode *__pyx_t_11;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__888)
  __Pyx_RefNannySetupContext("cuGraphAddMemAllocNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 26953, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddMemAllocNode", __pyx_f[0], 26953, 0, __PYX_ERR(0, 26953, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":27028
 *     :py:obj:`~.cuGraphAddMemFreeNode`, :py:obj:`~.cuGraphMemAllocNodeGetParams`, :py:obj:`~.cuDeviceGraphMemTrim`, :py:obj:`~.cuDeviceGetGraphMemAttribute`, :py:obj:`~.cuDeviceSetGraphMemAttribute`, :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`
 *     """
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":27029
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_22cuGraphAddMemAllocNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 27029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":27030
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 27030, __pyx_L1_error)

    /* "cuda/cuda.pyx":27029
 *     """
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":27033
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_4 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27034
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27033
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":27035
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":27036
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27037
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27037, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":27035
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":27039
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":27040
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27040, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":27042
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":27043
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":27044
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":27045
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27045, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":27046
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_4 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "cuda/cuda.pyx":27047
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27047, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 27047, __pyx_L1_error)

      /* "cuda/cuda.pyx":27046
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":27049
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27049, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":27050
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27050, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":27044
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":27052
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_MEM_ALLOC_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddMemAllocNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_4)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27052, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 27052, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":27053
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_MEM_ALLOC_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddMemAllocNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27053, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 27053, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {
    __pyx_t_10 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_10 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_10;

  /* "cuda/cuda.pyx":27054
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     cdef ccuda.CUDA_MEM_ALLOC_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddMemAllocNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27054, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_11 = __pyx_v_cdependencies;
  }
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuGraphAddMemAllocNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_11, __pyx_v_numDependencies, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27054, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":27055
 *     cdef ccuda.CUDA_MEM_ALLOC_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddMemAllocNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_4 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":27056
 *     err = ccuda.cuGraphAddMemAllocNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":27055
 *     cdef ccuda.CUDA_MEM_ALLOC_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphAddMemAllocNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cnodeParams_ptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":27057
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_13, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":26953
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemAllocNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_MEM_ALLOC_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an allocation node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddMemAllocNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_22cuGraphAddMemAllocNode_2generator30);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27060
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemAllocNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memory alloc node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_535cuGraphMemAllocNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_534cuGraphMemAllocNodeGetParams[] = "cuGraphMemAllocNodeGetParams(hNode)\n Returns a memory alloc node's parameters.\n\n    Returns the parameters of a memory alloc node `hNode` in `params_out`.\n    The `poolProps` and `accessDescs` returned in `params_out`, are owned\n    by the node. This memory remains valid until the node is destroyed. The\n    returned parameters must not be modified.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to get the parameters for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    params_out : :py:obj:`~.CUDA_MEM_ALLOC_NODE_PARAMS`\n        Pointer to return the parameters\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddMemAllocNode`, :py:obj:`~.cuGraphMemFreeNodeGetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_535cuGraphMemAllocNodeGetParams = {"cuGraphMemAllocNodeGetParams", (PyCFunction)__pyx_pw_4cuda_4cuda_535cuGraphMemAllocNodeGetParams, METH_O, __pyx_doc_4cuda_4cuda_534cuGraphMemAllocNodeGetParams};
static PyObject *__pyx_pw_4cuda_4cuda_535cuGraphMemAllocNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphMemAllocNodeGetParams (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_534cuGraphMemAllocNodeGetParams(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_534cuGraphMemAllocNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_params_out = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__889)
  __Pyx_RefNannySetupContext("cuGraphMemAllocNodeGetParams", 0);
  __Pyx_TraceCall("cuGraphMemAllocNodeGetParams", __pyx_f[0], 27060, 0, __PYX_ERR(0, 27060, __pyx_L1_error));

  /* "cuda/cuda.pyx":27085
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27086
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27085
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27087
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27088
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27089
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27089, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27087
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27091
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27092
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_MEM_ALLOC_NODE_PARAMS params_out = CUDA_MEM_ALLOC_NODE_PARAMS()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27092, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27094
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef CUDA_MEM_ALLOC_NODE_PARAMS params_out = CUDA_MEM_ALLOC_NODE_PARAMS()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphMemAllocNodeGetParams(chNode, params_out._ptr)
 *     return (CUresult(err), params_out)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_params_out = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":27095
 * 
 *     cdef CUDA_MEM_ALLOC_NODE_PARAMS params_out = CUDA_MEM_ALLOC_NODE_PARAMS()
 *     err = ccuda.cuGraphMemAllocNodeGetParams(chNode, params_out._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), params_out)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphMemAllocNodeGetParams(__pyx_v_chNode, __pyx_v_params_out->__pyx_base._ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27095, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":27096
 *     cdef CUDA_MEM_ALLOC_NODE_PARAMS params_out = CUDA_MEM_ALLOC_NODE_PARAMS()
 *     err = ccuda.cuGraphMemAllocNodeGetParams(chNode, params_out._ptr)
 *     return (CUresult(err), params_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_params_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_params_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_params_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27060
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemAllocNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memory alloc node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphMemAllocNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_params_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27099
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemFreeNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, dptr):             # <<<<<<<<<<<<<<
 *     """ Creates a memory free node and adds it to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_537cuGraphAddMemFreeNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_536cuGraphAddMemFreeNode[] = "cuGraphAddMemFreeNode(hGraph, dependencies: List[CUgraphNode], size_t numDependencies, dptr)\n Creates a memory free node and adds it to a graph.\n\n    Creates a new memory free node and adds it to `hGraph` with\n    `numDependencies` dependencies specified via `dependencies` and\n    arguments specified in `nodeParams`. It is possible for\n    `numDependencies` to be 0, in which case the node will be placed at the\n    root of the graph. `dependencies` may not have any duplicate entries. A\n    handle to the new node will be returned in `phGraphNode`.\n\n    :py:obj:`~.cuGraphAddMemFreeNode` will return\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if the user attempts to free:\n\n    - an allocation twice in the same graph.\n\n    - an address that was not returned by an allocation node.\n\n    - an invalid address.\n\n    The following restrictions apply to graphs which contain allocation\n    and/or memory free nodes:\n\n    - Nodes and edges of the graph cannot be deleted.\n\n    - The graph cannot be used in a child node.\n\n    - Only one instantiation of the graph may exist at any point in time.\n\n    - The graph cannot be cloned.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which to add the node\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Dependencies of the node\n    numDependencies : size_t\n        Number of dependencies\n    dptr : :py:obj:`~.CUdeviceptr`\n        Address of memory to free\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phGraphNode : :py:obj:`~.CUgraphNode`\n        Returns newly created node\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddMemAllocNode`, :py:obj:`~.cuGraphMemFreeNodeGetParams`, :py:obj:`~.cuDeviceGraphMemTrim`, :py:obj:`~.cuDeviceGetGraphMemAttribut""e`, :py:obj:`~.cuDeviceSetGraphMemAttribute`, :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_537cuGraphAddMemFreeNode = {"cuGraphAddMemFreeNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_537cuGraphAddMemFreeNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_536cuGraphAddMemFreeNode};
static PyObject *__pyx_pw_4cuda_4cuda_537cuGraphAddMemFreeNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_dependencies = 0;
  size_t __pyx_v_numDependencies;
  PyObject *__pyx_v_dptr = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddMemFreeNode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_dependencies,&__pyx_n_s_numDependencies,&__pyx_n_s_dptr_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemFreeNode", 1, 4, 4, 1); __PYX_ERR(0, 27099, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemFreeNode", 1, 4, 4, 2); __PYX_ERR(0, 27099, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dptr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddMemFreeNode", 1, 4, 4, 3); __PYX_ERR(0, 27099, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddMemFreeNode") < 0)) __PYX_ERR(0, 27099, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_dependencies = values[1];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 27099, __pyx_L3_error)
    __pyx_v_dptr = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddMemFreeNode", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27099, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddMemFreeNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_536cuGraphAddMemFreeNode(__pyx_self, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_dptr);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_21cuGraphAddMemFreeNode_2generator31(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":27162
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_21cuGraphAddMemFreeNode_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_60_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_60_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 27162, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_21cuGraphAddMemFreeNode_2generator31, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddMemFreeNode_locals_gen, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 27162, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddMemFreeNode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_21cuGraphAddMemFreeNode_2generator31(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 27162, 0, __PYX_ERR(0, 27162, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 27162, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) { __Pyx_RaiseClosureNameError("dependencies"); __PYX_ERR(0, 27162, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_dependencies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27162, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 27162, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27162, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 27162, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27162, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 27162, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27099
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemFreeNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, dptr):             # <<<<<<<<<<<<<<
 *     """ Creates a memory free node and adds it to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_536cuGraphAddMemFreeNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_dependencies, size_t __pyx_v_numDependencies, PyObject *__pyx_v_dptr) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *__pyx_cur_scope;
  CUdeviceptr __pyx_v_cdptr;
  PyObject *__pyx_v_pdptr = NULL;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phGraphNode = 0;
  CUgraphNode *__pyx_v_cdependencies;
  Py_ssize_t __pyx_v_idx;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_21cuGraphAddMemFreeNode_2generator31 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  CUgraphNode *__pyx_t_10;
  CUresult __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__890)
  __Pyx_RefNannySetupContext("cuGraphAddMemFreeNode", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 27099, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddMemFreeNode", __pyx_f[0], 27099, 0, __PYX_ERR(0, 27099, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_dependencies = __pyx_v_dependencies;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_dependencies);

  /* "cuda/cuda.pyx":27152
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27153
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 */
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27152
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27154
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27155
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27156
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27156, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27154
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27158
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27159
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 * 
 *     dependencies = [] if dependencies is None else dependencies
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27159, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27161
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 *     dependencies = [] if dependencies is None else dependencies             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_dependencies == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_dependencies);
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dependencies);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dependencies, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":27162
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_5 = __pyx_pf_4cuda_4cuda_21cuGraphAddMemFreeNode_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 27162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":27163
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__798, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 27163, __pyx_L1_error)

    /* "cuda/cuda.pyx":27162
 * 
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":27166
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_2 = (__pyx_v_hGraph == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27167
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27166
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":27168
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27169
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27170
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27170, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27168
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":27172
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27173
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27173, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":27175
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phGraphNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":27176
 * 
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":27177
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27178
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27178, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":27179
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":27180
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(dependencies)):
 */
      __pyx_t_5 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27180, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 27180, __pyx_L1_error)

      /* "cuda/cuda.pyx":27179
 *     if len(dependencies) > 0:
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":27182
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(dependencies)):             # <<<<<<<<<<<<<<
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27182, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":27183
 *         else:
 *             for idx in range(len(dependencies)):
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27183, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cdependencies[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":27177
 *     cdef CUgraphNode phGraphNode = CUgraphNode()
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     if len(dependencies) > 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*> calloc(len(dependencies), sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":27185
 *                 cdependencies[idx] = (<CUgraphNode>dependencies[idx])._ptr[0]
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphAddMemFreeNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cdptr)
 *     if cdependencies is not NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = ((__pyx_v_numDependencies > ((size_t)__pyx_t_6)) != 0);
  if (unlikely(__pyx_t_2)) {
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_dependencies;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27185, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_List_is_too_small, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__660); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 27185, __pyx_L1_error)
  }

  /* "cuda/cuda.pyx":27186
 * 
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddMemFreeNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cdptr)             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_dependencies;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dependencies, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3)->_ptr;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cdependencies;
  }
  __pyx_t_11 = __pyx_f_4cuda_5ccuda_cuGraphAddMemFreeNode(__pyx_v_phGraphNode->_ptr, __pyx_v_chGraph, __pyx_t_10, __pyx_v_numDependencies, __pyx_v_cdptr); if (unlikely(__pyx_t_11 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27186, __pyx_L1_error)
  __pyx_v_err = __pyx_t_11;

  /* "cuda/cuda.pyx":27187
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddMemFreeNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cdptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  __pyx_t_2 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27188
 *     err = ccuda.cuGraphAddMemFreeNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cdptr)
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphNode)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":27187
 *     if numDependencies > <size_t>len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies))
 *     err = ccuda.cuGraphAddMemFreeNode(phGraphNode._ptr, chGraph, (<CUgraphNode>dependencies[0])._ptr if len(dependencies) == 1 else cdependencies, numDependencies, cdptr)
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)
 */
  }

  /* "cuda/cuda.pyx":27189
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), phGraphNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphNode));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_phGraphNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27099
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemFreeNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, dptr):             # <<<<<<<<<<<<<<
 *     """ Creates a memory free node and adds it to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddMemFreeNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdptr);
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphNode);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_21cuGraphAddMemFreeNode_2generator31);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27192
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemFreeNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memory free node's parameters.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_539cuGraphMemFreeNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_538cuGraphMemFreeNodeGetParams[] = "cuGraphMemFreeNodeGetParams(hNode)\n Returns a memory free node's parameters.\n\n    Returns the address of a memory free node `hNode` in `dptr_out`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to get the parameters for\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    dptr_out : :py:obj:`~.CUdeviceptr`\n        Pointer to return the device address\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddMemFreeNode`, :py:obj:`~.cuGraphMemAllocNodeGetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_539cuGraphMemFreeNodeGetParams = {"cuGraphMemFreeNodeGetParams", (PyCFunction)__pyx_pw_4cuda_4cuda_539cuGraphMemFreeNodeGetParams, METH_O, __pyx_doc_4cuda_4cuda_538cuGraphMemFreeNodeGetParams};
static PyObject *__pyx_pw_4cuda_4cuda_539cuGraphMemFreeNodeGetParams(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphMemFreeNodeGetParams (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_538cuGraphMemFreeNodeGetParams(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_538cuGraphMemFreeNodeGetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_dptr_out = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__891)
  __Pyx_RefNannySetupContext("cuGraphMemFreeNodeGetParams", 0);
  __Pyx_TraceCall("cuGraphMemFreeNodeGetParams", __pyx_f[0], 27192, 0, __PYX_ERR(0, 27192, __pyx_L1_error));

  /* "cuda/cuda.pyx":27214
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27215
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27214
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27216
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27217
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27218
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27218, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27216
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27220
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27221
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUdeviceptr dptr_out = CUdeviceptr()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27221, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27223
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef CUdeviceptr dptr_out = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphMemFreeNodeGetParams(chNode, dptr_out._ptr)
 *     return (CUresult(err), dptr_out)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_dptr_out = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":27224
 * 
 *     cdef CUdeviceptr dptr_out = CUdeviceptr()
 *     err = ccuda.cuGraphMemFreeNodeGetParams(chNode, dptr_out._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), dptr_out)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphMemFreeNodeGetParams(__pyx_v_chNode, __pyx_v_dptr_out->_ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27224, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":27225
 *     cdef CUdeviceptr dptr_out = CUdeviceptr()
 *     err = ccuda.cuGraphMemFreeNodeGetParams(chNode, dptr_out._ptr)
 *     return (CUresult(err), dptr_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_dptr_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dptr_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_dptr_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27192
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemFreeNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memory free node's parameters.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphMemFreeNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_dptr_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27228
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGraphMemTrim(device):             # <<<<<<<<<<<<<<
 *     """ Free unused memory that was cached on the specified device for use with graphs back to the OS.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_541cuDeviceGraphMemTrim(PyObject *__pyx_self, PyObject *__pyx_v_device); /*proto*/
static char __pyx_doc_4cuda_4cuda_540cuDeviceGraphMemTrim[] = "cuDeviceGraphMemTrim(device)\n Free unused memory that was cached on the specified device for use with graphs back to the OS.\n\n    Blocks which are not in use by a graph that is either currently\n    executing or scheduled to execute are freed back to the operating\n    system.\n\n    Parameters\n    ----------\n    device : :py:obj:`~.CUdevice`\n        The device for which cached memory should be freed.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddMemAllocNode`, :py:obj:`~.cuGraphAddMemFreeNode`, :py:obj:`~.cuDeviceSetGraphMemAttribute`, :py:obj:`~.cuDeviceGetGraphMemAttribute`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_541cuDeviceGraphMemTrim = {"cuDeviceGraphMemTrim", (PyCFunction)__pyx_pw_4cuda_4cuda_541cuDeviceGraphMemTrim, METH_O, __pyx_doc_4cuda_4cuda_540cuDeviceGraphMemTrim};
static PyObject *__pyx_pw_4cuda_4cuda_541cuDeviceGraphMemTrim(PyObject *__pyx_self, PyObject *__pyx_v_device) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGraphMemTrim (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_540cuDeviceGraphMemTrim(__pyx_self, ((PyObject *)__pyx_v_device));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_540cuDeviceGraphMemTrim(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_device) {
  CUdevice __pyx_v_cdevice;
  PyObject *__pyx_v_pdevice = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__892)
  __Pyx_RefNannySetupContext("cuDeviceGraphMemTrim", 0);
  __Pyx_TraceCall("cuDeviceGraphMemTrim", __pyx_f[0], 27228, 0, __PYX_ERR(0, 27228, __pyx_L1_error));

  /* "cuda/cuda.pyx":27250
 *     """
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_device == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27251
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 */
    __pyx_v_cdevice = ((CUdevice)0);

    /* "cuda/cuda.pyx":27250
 *     """
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27252
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_device, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27253
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27254
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdevice = int(CUdevice(device))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 27254, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":27252
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27256
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 *         pdevice = int(CUdevice(device))             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27257
 *     else:
 *         pdevice = int(CUdevice(device))
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuDeviceGraphMemTrim(cdevice)
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 27257, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27259
 *         cdevice = <ccuda.CUdevice>pdevice
 * 
 *     err = ccuda.cuDeviceGraphMemTrim(cdevice)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDeviceGraphMemTrim(__pyx_v_cdevice); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27259, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":27260
 * 
 *     err = ccuda.cuDeviceGraphMemTrim(cdevice)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27228
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGraphMemTrim(device):             # <<<<<<<<<<<<<<
 *     """ Free unused memory that was cached on the specified device for use with graphs back to the OS.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGraphMemTrim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27263
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetGraphMemAttribute(device, attr not None : CUgraphMem_attribute):             # <<<<<<<<<<<<<<
 *     """ Query asynchronous allocation attributes related to graphs.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_543cuDeviceGetGraphMemAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_542cuDeviceGetGraphMemAttribute[] = "cuDeviceGetGraphMemAttribute(device, attr: CUgraphMem_attribute)\n Query asynchronous allocation attributes related to graphs.\n\n    Valid attributes are:\n\n    - :py:obj:`~.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT`: Amount of memory, in\n      bytes, currently associated with graphs\n\n    - :py:obj:`~.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH`: High watermark of\n      memory, in bytes, associated with graphs since the last time it was\n      reset. High watermark can only be reset to zero.\n\n    - :py:obj:`~.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT`: Amount of memory,\n      in bytes, currently allocated for use by the CUDA graphs asynchronous\n      allocator.\n\n    - :py:obj:`~.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH`: High watermark of\n      memory, in bytes, currently allocated for use by the CUDA graphs\n      asynchronous allocator.\n\n    Parameters\n    ----------\n    device : :py:obj:`~.CUdevice`\n        Specifies the scope of the query\n    attr : :py:obj:`~.CUgraphMem_attribute`\n        attribute to get\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    value : Any\n        retrieved value\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceSetGraphMemAttribute`, :py:obj:`~.cuGraphAddMemAllocNode`, :py:obj:`~.cuGraphAddMemFreeNode`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_543cuDeviceGetGraphMemAttribute = {"cuDeviceGetGraphMemAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_543cuDeviceGetGraphMemAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_542cuDeviceGetGraphMemAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_543cuDeviceGetGraphMemAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_device = 0;
  PyObject *__pyx_v_attr = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetGraphMemAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_device,&__pyx_n_s_attr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_device)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceGetGraphMemAttribute", 1, 2, 2, 1); __PYX_ERR(0, 27263, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuDeviceGetGraphMemAttribute") < 0)) __PYX_ERR(0, 27263, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_device = values[0];
    __pyx_v_attr = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuDeviceGetGraphMemAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27263, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attr) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attr"); __PYX_ERR(0, 27263, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_542cuDeviceGetGraphMemAttribute(__pyx_self, __pyx_v_device, __pyx_v_attr);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_542cuDeviceGetGraphMemAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_device, PyObject *__pyx_v_attr) {
  CUdevice __pyx_v_cdevice;
  PyObject *__pyx_v_pdevice = NULL;
  CUgraphMem_attribute __pyx_v_cattr;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperCUgraphMem_attribute *__pyx_v_cvalue = 0;
  void *__pyx_v_cvalue_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUgraphMem_attribute __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_8;
  CUresult __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__893)
  __Pyx_RefNannySetupContext("cuDeviceGetGraphMemAttribute", 0);
  __Pyx_TraceCall("cuDeviceGetGraphMemAttribute", __pyx_f[0], 27263, 0, __PYX_ERR(0, 27263, __pyx_L1_error));

  /* "cuda/cuda.pyx":27302
 *     """
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_device == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27303
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 */
    __pyx_v_cdevice = ((CUdevice)0);

    /* "cuda/cuda.pyx":27302
 *     """
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27304
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_device, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27305
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27306
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdevice = int(CUdevice(device))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 27306, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":27304
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27308
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 *         pdevice = int(CUdevice(device))             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27309
 *     else:
 *         pdevice = int(CUdevice(device))
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphMem_attribute cattr = attr.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 27309, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27311
 *         cdevice = <ccuda.CUdevice>pdevice
 * 
 *     cdef ccuda.CUgraphMem_attribute cattr = attr.value             # <<<<<<<<<<<<<<
 *     cdef utils.HelperCUgraphMem_attribute cvalue = utils.HelperCUgraphMem_attribute(attr, 0, is_getter=True)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUgraphMem_attribute_enum)__Pyx_PyInt_As_enum__CUgraphMem_attribute_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 27311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattr = __pyx_t_6;

  /* "cuda/cuda.pyx":27312
 * 
 *     cdef ccuda.CUgraphMem_attribute cattr = attr.value
 *     cdef utils.HelperCUgraphMem_attribute cvalue = utils.HelperCUgraphMem_attribute(attr, 0, is_getter=True)             # <<<<<<<<<<<<<<
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     err = ccuda.cuDeviceGetGraphMemAttribute(cdevice, cattr, cvalue_ptr)
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_attr);
  __Pyx_GIVEREF(__pyx_v_attr);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_attr);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_0);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_getter, Py_True) < 0) __PYX_ERR(0, 27312, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUgraphMem_attribute), __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cvalue = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperCUgraphMem_attribute *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cuda/cuda.pyx":27313
 *     cdef ccuda.CUgraphMem_attribute cattr = attr.value
 *     cdef utils.HelperCUgraphMem_attribute cvalue = utils.HelperCUgraphMem_attribute(attr, 0, is_getter=True)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetGraphMemAttribute(cdevice, cattr, cvalue_ptr)
 *     return (CUresult(err), cvalue.pyObj())
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cvalue), __pyx_n_s_cptr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_7); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27313, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_cvalue_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_8));

  /* "cuda/cuda.pyx":27314
 *     cdef utils.HelperCUgraphMem_attribute cvalue = utils.HelperCUgraphMem_attribute(attr, 0, is_getter=True)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     err = ccuda.cuDeviceGetGraphMemAttribute(cdevice, cattr, cvalue_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), cvalue.pyObj())
 * 
 */
  __pyx_t_9 = __pyx_f_4cuda_5ccuda_cuDeviceGetGraphMemAttribute(__pyx_v_cdevice, __pyx_v_cattr, __pyx_v_cvalue_ptr); if (unlikely(__pyx_t_9 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27314, __pyx_L1_error)
  __pyx_v_err = __pyx_t_9;

  /* "cuda/cuda.pyx":27315
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     err = ccuda.cuDeviceGetGraphMemAttribute(cdevice, cattr, cvalue_ptr)
 *     return (CUresult(err), cvalue.pyObj())             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cvalue), __pyx_n_s_pyObj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __pyx_t_7 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27263
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetGraphMemAttribute(device, attr not None : CUgraphMem_attribute):             # <<<<<<<<<<<<<<
 *     """ Query asynchronous allocation attributes related to graphs.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdevice);
  __Pyx_XDECREF((PyObject *)__pyx_v_cvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27318
 * 
 * @cython.embedsignature(True)
 * def cuDeviceSetGraphMemAttribute(device, attr not None : CUgraphMem_attribute, value):             # <<<<<<<<<<<<<<
 *     """ Set asynchronous allocation attributes related to graphs.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_545cuDeviceSetGraphMemAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_544cuDeviceSetGraphMemAttribute[] = "cuDeviceSetGraphMemAttribute(device, attr: CUgraphMem_attribute, value)\n Set asynchronous allocation attributes related to graphs.\n\n    Valid attributes are:\n\n    - :py:obj:`~.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH`: High watermark of\n      memory, in bytes, associated with graphs since the last time it was\n      reset. High watermark can only be reset to zero.\n\n    - :py:obj:`~.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH`: High watermark of\n      memory, in bytes, currently allocated for use by the CUDA graphs\n      asynchronous allocator.\n\n    Parameters\n    ----------\n    device : :py:obj:`~.CUdevice`\n        Specifies the scope of the query\n    attr : :py:obj:`~.CUgraphMem_attribute`\n        attribute to get\n    value : Any\n        pointer to value to set\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceGetGraphMemAttribute`, :py:obj:`~.cuGraphAddMemAllocNode`, :py:obj:`~.cuGraphAddMemFreeNode`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_545cuDeviceSetGraphMemAttribute = {"cuDeviceSetGraphMemAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_545cuDeviceSetGraphMemAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_544cuDeviceSetGraphMemAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_545cuDeviceSetGraphMemAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_device = 0;
  PyObject *__pyx_v_attr = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceSetGraphMemAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_device,&__pyx_n_s_attr,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_device)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceSetGraphMemAttribute", 1, 3, 3, 1); __PYX_ERR(0, 27318, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceSetGraphMemAttribute", 1, 3, 3, 2); __PYX_ERR(0, 27318, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuDeviceSetGraphMemAttribute") < 0)) __PYX_ERR(0, 27318, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_device = values[0];
    __pyx_v_attr = values[1];
    __pyx_v_value = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuDeviceSetGraphMemAttribute", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27318, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceSetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attr) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attr"); __PYX_ERR(0, 27318, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_544cuDeviceSetGraphMemAttribute(__pyx_self, __pyx_v_device, __pyx_v_attr, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_544cuDeviceSetGraphMemAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_device, PyObject *__pyx_v_attr, PyObject *__pyx_v_value) {
  CUdevice __pyx_v_cdevice;
  PyObject *__pyx_v_pdevice = NULL;
  CUgraphMem_attribute __pyx_v_cattr;
  struct __pyx_obj_4cuda_4_lib_5utils_HelperCUgraphMem_attribute *__pyx_v_cvalue = 0;
  void *__pyx_v_cvalue_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUgraphMem_attribute __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_8;
  CUresult __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__894)
  __Pyx_RefNannySetupContext("cuDeviceSetGraphMemAttribute", 0);
  __Pyx_TraceCall("cuDeviceSetGraphMemAttribute", __pyx_f[0], 27318, 0, __PYX_ERR(0, 27318, __pyx_L1_error));

  /* "cuda/cuda.pyx":27350
 *     """
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_device == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27351
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 */
    __pyx_v_cdevice = ((CUdevice)0);

    /* "cuda/cuda.pyx":27350
 *     """
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27352
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_device, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27353
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27354
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdevice = int(CUdevice(device))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 27354, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":27352
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27356
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 *         pdevice = int(CUdevice(device))             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_device); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27357
 *     else:
 *         pdevice = int(CUdevice(device))
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphMem_attribute cattr = attr.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 27357, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27359
 *         cdevice = <ccuda.CUdevice>pdevice
 * 
 *     cdef ccuda.CUgraphMem_attribute cattr = attr.value             # <<<<<<<<<<<<<<
 *     cdef utils.HelperCUgraphMem_attribute cvalue = utils.HelperCUgraphMem_attribute(attr, value, is_getter=False)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUgraphMem_attribute_enum)__Pyx_PyInt_As_enum__CUgraphMem_attribute_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 27359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattr = __pyx_t_6;

  /* "cuda/cuda.pyx":27360
 * 
 *     cdef ccuda.CUgraphMem_attribute cattr = attr.value
 *     cdef utils.HelperCUgraphMem_attribute cvalue = utils.HelperCUgraphMem_attribute(attr, value, is_getter=False)             # <<<<<<<<<<<<<<
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     err = ccuda.cuDeviceSetGraphMemAttribute(cdevice, cattr, cvalue_ptr)
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_attr);
  __Pyx_GIVEREF(__pyx_v_attr);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_attr);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_value);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_getter, Py_False) < 0) __PYX_ERR(0, 27360, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperCUgraphMem_attribute), __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cvalue = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperCUgraphMem_attribute *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cuda/cuda.pyx":27361
 *     cdef ccuda.CUgraphMem_attribute cattr = attr.value
 *     cdef utils.HelperCUgraphMem_attribute cvalue = utils.HelperCUgraphMem_attribute(attr, value, is_getter=False)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceSetGraphMemAttribute(cdevice, cattr, cvalue_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cvalue), __pyx_n_s_cptr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_7); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27361, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_cvalue_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_8));

  /* "cuda/cuda.pyx":27362
 *     cdef utils.HelperCUgraphMem_attribute cvalue = utils.HelperCUgraphMem_attribute(attr, value, is_getter=False)
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     err = ccuda.cuDeviceSetGraphMemAttribute(cdevice, cattr, cvalue_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_9 = __pyx_f_4cuda_5ccuda_cuDeviceSetGraphMemAttribute(__pyx_v_cdevice, __pyx_v_cattr, __pyx_v_cvalue_ptr); if (unlikely(__pyx_t_9 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27362, __pyx_L1_error)
  __pyx_v_err = __pyx_t_9;

  /* "cuda/cuda.pyx":27363
 *     cdef void* cvalue_ptr = <void*><void_ptr>cvalue.cptr
 *     err = ccuda.cuDeviceSetGraphMemAttribute(cdevice, cattr, cvalue_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27318
 * 
 * @cython.embedsignature(True)
 * def cuDeviceSetGraphMemAttribute(device, attr not None : CUgraphMem_attribute, value):             # <<<<<<<<<<<<<<
 *     """ Set asynchronous allocation attributes related to graphs.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceSetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdevice);
  __Pyx_XDECREF((PyObject *)__pyx_v_cvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27366
 * 
 * @cython.embedsignature(True)
 * def cuGraphClone(originalGraph):             # <<<<<<<<<<<<<<
 *     """ Clones a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_547cuGraphClone(PyObject *__pyx_self, PyObject *__pyx_v_originalGraph); /*proto*/
static char __pyx_doc_4cuda_4cuda_546cuGraphClone[] = "cuGraphClone(originalGraph)\n Clones a graph.\n\n    This function creates a copy of `originalGraph` and returns it in\n    `phGraphClone`. All parameters are copied into the cloned graph. The\n    original graph may be modified after this call without affecting the\n    clone.\n\n    Child graph nodes in the original graph are recursively copied into the\n    clone.\n\n    Parameters\n    ----------\n    originalGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to clone\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    phGraphClone : :py:obj:`~.CUgraph`\n        Returns newly created cloned graph\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphNodeFindInClone`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_547cuGraphClone = {"cuGraphClone", (PyCFunction)__pyx_pw_4cuda_4cuda_547cuGraphClone, METH_O, __pyx_doc_4cuda_4cuda_546cuGraphClone};
static PyObject *__pyx_pw_4cuda_4cuda_547cuGraphClone(PyObject *__pyx_self, PyObject *__pyx_v_originalGraph) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphClone (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_546cuGraphClone(__pyx_self, ((PyObject *)__pyx_v_originalGraph));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_546cuGraphClone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_originalGraph) {
  CUgraph __pyx_v_coriginalGraph;
  PyObject *__pyx_v_poriginalGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraph *__pyx_v_phGraphClone = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__895)
  __Pyx_RefNannySetupContext("cuGraphClone", 0);
  __Pyx_TraceCall("cuGraphClone", __pyx_f[0], 27366, 0, __PYX_ERR(0, 27366, __pyx_L1_error));

  /* "cuda/cuda.pyx":27394
 *     """
 *     cdef ccuda.CUgraph coriginalGraph
 *     if originalGraph is None:             # <<<<<<<<<<<<<<
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(originalGraph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_originalGraph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27395
 *     cdef ccuda.CUgraph coriginalGraph
 *     if originalGraph is None:
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(originalGraph, (CUgraph)):
 *         poriginalGraph = int(originalGraph)
 */
    __pyx_v_coriginalGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27394
 *     """
 *     cdef ccuda.CUgraph coriginalGraph
 *     if originalGraph is None:             # <<<<<<<<<<<<<<
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(originalGraph, (CUgraph)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27396
 *     if originalGraph is None:
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(originalGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         poriginalGraph = int(originalGraph)
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>poriginalGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_originalGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27397
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(originalGraph, (CUgraph)):
 *         poriginalGraph = int(originalGraph)             # <<<<<<<<<<<<<<
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>poriginalGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_originalGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_poriginalGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27398
 *     elif isinstance(originalGraph, (CUgraph)):
 *         poriginalGraph = int(originalGraph)
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>poriginalGraph             # <<<<<<<<<<<<<<
 *     else:
 *         poriginalGraph = int(CUgraph(originalGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_poriginalGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27398, __pyx_L1_error)
    __pyx_v_coriginalGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27396
 *     if originalGraph is None:
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(originalGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         poriginalGraph = int(originalGraph)
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>poriginalGraph
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27400
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>poriginalGraph
 *     else:
 *         poriginalGraph = int(CUgraph(originalGraph))             # <<<<<<<<<<<<<<
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>poriginalGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_originalGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_poriginalGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27401
 *     else:
 *         poriginalGraph = int(CUgraph(originalGraph))
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>poriginalGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraph phGraphClone = CUgraph()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_poriginalGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27401, __pyx_L1_error)
    __pyx_v_coriginalGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27403
 *         coriginalGraph = <ccuda.CUgraph><void_ptr>poriginalGraph
 * 
 *     cdef CUgraph phGraphClone = CUgraph()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphClone(phGraphClone._ptr, coriginalGraph)
 *     return (CUresult(err), phGraphClone)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phGraphClone = ((struct __pyx_obj_4cuda_4cuda_CUgraph *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":27404
 * 
 *     cdef CUgraph phGraphClone = CUgraph()
 *     err = ccuda.cuGraphClone(phGraphClone._ptr, coriginalGraph)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphClone)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphClone(__pyx_v_phGraphClone->_ptr, __pyx_v_coriginalGraph); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27404, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":27405
 *     cdef CUgraph phGraphClone = CUgraph()
 *     err = ccuda.cuGraphClone(phGraphClone._ptr, coriginalGraph)
 *     return (CUresult(err), phGraphClone)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphClone));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphClone));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phGraphClone));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27366
 * 
 * @cython.embedsignature(True)
 * def cuGraphClone(originalGraph):             # <<<<<<<<<<<<<<
 *     """ Clones a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphClone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_poriginalGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphClone);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27408
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeFindInClone(hOriginalNode, hClonedGraph):             # <<<<<<<<<<<<<<
 *     """ Finds a cloned version of a node.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_549cuGraphNodeFindInClone(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_548cuGraphNodeFindInClone[] = "cuGraphNodeFindInClone(hOriginalNode, hClonedGraph)\n Finds a cloned version of a node.\n\n    This function returns the node in `hClonedGraph` corresponding to\n    `hOriginalNode` in the original graph.\n\n    `hClonedGraph` must have been cloned from `hOriginalGraph` via\n    :py:obj:`~.cuGraphClone`. `hOriginalNode` must have been in\n    `hOriginalGraph` at the time of the call to :py:obj:`~.cuGraphClone`,\n    and the corresponding cloned node in `hClonedGraph` must not have been\n    removed. The cloned node is then returned via `phClonedNode`.\n\n    Parameters\n    ----------\n    hOriginalNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Handle to the original node\n    hClonedGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Cloned graph to query\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n    phNode : :py:obj:`~.CUgraphNode`\n        Returns handle to the cloned node\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphClone`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_549cuGraphNodeFindInClone = {"cuGraphNodeFindInClone", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_549cuGraphNodeFindInClone, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_548cuGraphNodeFindInClone};
static PyObject *__pyx_pw_4cuda_4cuda_549cuGraphNodeFindInClone(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hOriginalNode = 0;
  PyObject *__pyx_v_hClonedGraph = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphNodeFindInClone (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hOriginalNode,&__pyx_n_s_hClonedGraph,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hOriginalNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hClonedGraph)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphNodeFindInClone", 1, 2, 2, 1); __PYX_ERR(0, 27408, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphNodeFindInClone") < 0)) __PYX_ERR(0, 27408, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hOriginalNode = values[0];
    __pyx_v_hClonedGraph = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphNodeFindInClone", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27408, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphNodeFindInClone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_548cuGraphNodeFindInClone(__pyx_self, __pyx_v_hOriginalNode, __pyx_v_hClonedGraph);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_548cuGraphNodeFindInClone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hOriginalNode, PyObject *__pyx_v_hClonedGraph) {
  CUgraph __pyx_v_chClonedGraph;
  PyObject *__pyx_v_phClonedGraph = NULL;
  CUgraphNode __pyx_v_chOriginalNode;
  PyObject *__pyx_v_phOriginalNode = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phNode = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__896)
  __Pyx_RefNannySetupContext("cuGraphNodeFindInClone", 0);
  __Pyx_TraceCall("cuGraphNodeFindInClone", __pyx_f[0], 27408, 0, __PYX_ERR(0, 27408, __pyx_L1_error));

  /* "cuda/cuda.pyx":27439
 *     """
 *     cdef ccuda.CUgraph chClonedGraph
 *     if hClonedGraph is None:             # <<<<<<<<<<<<<<
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hClonedGraph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_hClonedGraph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27440
 *     cdef ccuda.CUgraph chClonedGraph
 *     if hClonedGraph is None:
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hClonedGraph, (CUgraph)):
 *         phClonedGraph = int(hClonedGraph)
 */
    __pyx_v_chClonedGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27439
 *     """
 *     cdef ccuda.CUgraph chClonedGraph
 *     if hClonedGraph is None:             # <<<<<<<<<<<<<<
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hClonedGraph, (CUgraph)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27441
 *     if hClonedGraph is None:
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hClonedGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phClonedGraph = int(hClonedGraph)
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>phClonedGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hClonedGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27442
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hClonedGraph, (CUgraph)):
 *         phClonedGraph = int(hClonedGraph)             # <<<<<<<<<<<<<<
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>phClonedGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hClonedGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phClonedGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27443
 *     elif isinstance(hClonedGraph, (CUgraph)):
 *         phClonedGraph = int(hClonedGraph)
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>phClonedGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phClonedGraph = int(CUgraph(hClonedGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phClonedGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27443, __pyx_L1_error)
    __pyx_v_chClonedGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27441
 *     if hClonedGraph is None:
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hClonedGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phClonedGraph = int(hClonedGraph)
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>phClonedGraph
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27445
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>phClonedGraph
 *     else:
 *         phClonedGraph = int(CUgraph(hClonedGraph))             # <<<<<<<<<<<<<<
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>phClonedGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hClonedGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phClonedGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27446
 *     else:
 *         phClonedGraph = int(CUgraph(hClonedGraph))
 *         chClonedGraph = <ccuda.CUgraph><void_ptr>phClonedGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode chOriginalNode
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phClonedGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27446, __pyx_L1_error)
    __pyx_v_chClonedGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27449
 * 
 *     cdef ccuda.CUgraphNode chOriginalNode
 *     if hOriginalNode is None:             # <<<<<<<<<<<<<<
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hOriginalNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hOriginalNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27450
 *     cdef ccuda.CUgraphNode chOriginalNode
 *     if hOriginalNode is None:
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hOriginalNode, (CUgraphNode)):
 *         phOriginalNode = int(hOriginalNode)
 */
    __pyx_v_chOriginalNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27449
 * 
 *     cdef ccuda.CUgraphNode chOriginalNode
 *     if hOriginalNode is None:             # <<<<<<<<<<<<<<
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hOriginalNode, (CUgraphNode)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":27451
 *     if hOriginalNode is None:
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hOriginalNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phOriginalNode = int(hOriginalNode)
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>phOriginalNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hOriginalNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27452
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hOriginalNode, (CUgraphNode)):
 *         phOriginalNode = int(hOriginalNode)             # <<<<<<<<<<<<<<
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>phOriginalNode
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hOriginalNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phOriginalNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27453
 *     elif isinstance(hOriginalNode, (CUgraphNode)):
 *         phOriginalNode = int(hOriginalNode)
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>phOriginalNode             # <<<<<<<<<<<<<<
 *     else:
 *         phOriginalNode = int(CUgraphNode(hOriginalNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phOriginalNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27453, __pyx_L1_error)
    __pyx_v_chOriginalNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27451
 *     if hOriginalNode is None:
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hOriginalNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phOriginalNode = int(hOriginalNode)
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>phOriginalNode
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":27455
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>phOriginalNode
 *     else:
 *         phOriginalNode = int(CUgraphNode(hOriginalNode))             # <<<<<<<<<<<<<<
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>phOriginalNode
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hOriginalNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phOriginalNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27456
 *     else:
 *         phOriginalNode = int(CUgraphNode(hOriginalNode))
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>phOriginalNode             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode phNode = CUgraphNode()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phOriginalNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27456, __pyx_L1_error)
    __pyx_v_chOriginalNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":27458
 *         chOriginalNode = <ccuda.CUgraphNode><void_ptr>phOriginalNode
 * 
 *     cdef CUgraphNode phNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphNodeFindInClone(phNode._ptr, chOriginalNode, chClonedGraph)
 *     return (CUresult(err), phNode)
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_phNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":27459
 * 
 *     cdef CUgraphNode phNode = CUgraphNode()
 *     err = ccuda.cuGraphNodeFindInClone(phNode._ptr, chOriginalNode, chClonedGraph)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phNode)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphNodeFindInClone(__pyx_v_phNode->_ptr, __pyx_v_chOriginalNode, __pyx_v_chClonedGraph); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27459, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":27460
 *     cdef CUgraphNode phNode = CUgraphNode()
 *     err = ccuda.cuGraphNodeFindInClone(phNode._ptr, chOriginalNode, chClonedGraph)
 *     return (CUresult(err), phNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_phNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phNode));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_phNode));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27408
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeFindInClone(hOriginalNode, hClonedGraph):             # <<<<<<<<<<<<<<
 *     """ Finds a cloned version of a node.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphNodeFindInClone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phClonedGraph);
  __Pyx_XDECREF(__pyx_v_phOriginalNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27463
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetType(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a node's type.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_551cuGraphNodeGetType(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_550cuGraphNodeGetType[] = "cuGraphNodeGetType(hNode)\n Returns a node's type.\n\n    Returns the node type of `hNode` in `typename`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to query\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    typename : :py:obj:`~.CUgraphNodeType`\n        Pointer to return the node type\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphChildGraphNodeGetGraph`, :py:obj:`~.cuGraphKernelNodeGetParams`, :py:obj:`~.cuGraphKernelNodeSetParams`, :py:obj:`~.cuGraphHostNodeGetParams`, :py:obj:`~.cuGraphHostNodeSetParams`, :py:obj:`~.cuGraphMemcpyNodeGetParams`, :py:obj:`~.cuGraphMemcpyNodeSetParams`, :py:obj:`~.cuGraphMemsetNodeGetParams`, :py:obj:`~.cuGraphMemsetNodeSetParams`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_551cuGraphNodeGetType = {"cuGraphNodeGetType", (PyCFunction)__pyx_pw_4cuda_4cuda_551cuGraphNodeGetType, METH_O, __pyx_doc_4cuda_4cuda_550cuGraphNodeGetType};
static PyObject *__pyx_pw_4cuda_4cuda_551cuGraphNodeGetType(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphNodeGetType (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_550cuGraphNodeGetType(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_550cuGraphNodeGetType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphNodeType __pyx_v_typename;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__897)
  __Pyx_RefNannySetupContext("cuGraphNodeGetType", 0);
  __Pyx_TraceCall("cuGraphNodeGetType", __pyx_f[0], 27463, 0, __PYX_ERR(0, 27463, __pyx_L1_error));

  /* "cuda/cuda.pyx":27485
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27486
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27485
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27487
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27488
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27489
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27489, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27487
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27491
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27492
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNodeType typename
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27492, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27495
 * 
 *     cdef ccuda.CUgraphNodeType typename
 *     err = ccuda.cuGraphNodeGetType(chNode, &typename)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUgraphNodeType(typename))
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphNodeGetType(__pyx_v_chNode, (&__pyx_v_typename)); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27495, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":27496
 *     cdef ccuda.CUgraphNodeType typename
 *     err = ccuda.cuGraphNodeGetType(chNode, &typename)
 *     return (CUresult(err), CUgraphNodeType(typename))             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUgraphNodeType); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(__pyx_v_typename); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 27496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27463
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetType(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a node's type.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphNodeGetType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27499
 * 
 * @cython.embedsignature(True)
 * def cuGraphGetNodes(hGraph, size_t numNodes = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a graph's nodes.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_553cuGraphGetNodes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_552cuGraphGetNodes[] = "cuGraphGetNodes(hGraph, size_t numNodes=0)\n Returns a graph's nodes.\n\n    Returns a list of `hGraph's` nodes. `nodes` may be NULL, in which case\n    this function will return the number of nodes in `numNodes`. Otherwise,\n    `numNodes` entries will be filled in. If `numNodes` is higher than the\n    actual number of nodes, the remaining entries in `nodes` will be set to\n    NULL, and the number of nodes actually obtained will be returned in\n    `numNodes`.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to query\n    numNodes : int\n        See description\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    nodes : List[:py:obj:`~.CUgraphNode`]\n        Pointer to return the nodes\n    numNodes : int\n        See description\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetType`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_553cuGraphGetNodes = {"cuGraphGetNodes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_553cuGraphGetNodes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_552cuGraphGetNodes};
static PyObject *__pyx_pw_4cuda_4cuda_553cuGraphGetNodes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  size_t __pyx_v_numNodes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphGetNodes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_numNodes,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numNodes);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphGetNodes") < 0)) __PYX_ERR(0, 27499, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_hGraph = values[0];
    if (values[1]) {
      __pyx_v_numNodes = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_numNodes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 27499, __pyx_L3_error)
    } else {
      __pyx_v_numNodes = ((size_t)((size_t)0));
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphGetNodes", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27499, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphGetNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_552cuGraphGetNodes(__pyx_self, __pyx_v_hGraph, __pyx_v_numNodes);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_552cuGraphGetNodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, size_t __pyx_v_numNodes) {
  size_t __pyx_v__graph_length;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  CUgraphNode *__pyx_v_cnodes;
  PyObject *__pyx_v_pynodes = NULL;
  CUresult __pyx_v_err;
  size_t __pyx_10genexpr109__pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__898)
  __Pyx_RefNannySetupContext("cuGraphGetNodes", 0);
  __Pyx_TraceCall("cuGraphGetNodes", __pyx_f[0], 27499, 0, __PYX_ERR(0, 27499, __pyx_L1_error));

  /* "cuda/cuda.pyx":27529
 *     :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetType`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes`
 *     """
 *     cdef size_t _graph_length = numNodes             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 */
  __pyx_v__graph_length = __pyx_v_numNodes;

  /* "cuda/cuda.pyx":27531
 *     cdef size_t _graph_length = numNodes
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27532
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27531
 *     cdef size_t _graph_length = numNodes
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27533
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27534
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27535
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27535, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27533
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27537
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27538
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode* cnodes = NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27538, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27540
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef ccuda.CUgraphNode* cnodes = NULL             # <<<<<<<<<<<<<<
 *     pynodes = []
 *     if _graph_length != 0:
 */
  __pyx_v_cnodes = NULL;

  /* "cuda/cuda.pyx":27541
 * 
 *     cdef ccuda.CUgraphNode* cnodes = NULL
 *     pynodes = []             # <<<<<<<<<<<<<<
 *     if _graph_length != 0:
 *         cnodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pynodes = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":27542
 *     cdef ccuda.CUgraphNode* cnodes = NULL
 *     pynodes = []
 *     if _graph_length != 0:             # <<<<<<<<<<<<<<
 *         cnodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cnodes is NULL:
 */
  __pyx_t_1 = ((__pyx_v__graph_length != 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27543
 *     pynodes = []
 *     if _graph_length != 0:
 *         cnodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cnodes is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_v_cnodes = ((CUgraphNode *)calloc(__pyx_v__graph_length, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":27544
 *     if _graph_length != 0:
 *         cnodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cnodes is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetNodes(chGraph, cnodes, &numNodes)
 */
    __pyx_t_1 = ((__pyx_v_cnodes == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "cuda/cuda.pyx":27545
 *         cnodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cnodes is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphGetNodes(chGraph, cnodes, &numNodes)
 *     if CUresult(err) == CUresult(0):
 */
      __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v__graph_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 27545, __pyx_L1_error)

      /* "cuda/cuda.pyx":27544
 *     if _graph_length != 0:
 *         cnodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cnodes is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetNodes(chGraph, cnodes, &numNodes)
 */
    }

    /* "cuda/cuda.pyx":27542
 *     cdef ccuda.CUgraphNode* cnodes = NULL
 *     pynodes = []
 *     if _graph_length != 0:             # <<<<<<<<<<<<<<
 *         cnodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cnodes is NULL:
 */
  }

  /* "cuda/cuda.pyx":27546
 *         if cnodes is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetNodes(chGraph, cnodes, &numNodes)             # <<<<<<<<<<<<<<
 *     if CUresult(err) == CUresult(0):
 *         pynodes = [CUgraphNode(init_value=<void_ptr>cnodes[idx]) for idx in range(_graph_length)]
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphGetNodes(__pyx_v_chGraph, __pyx_v_cnodes, (&__pyx_v_numNodes)); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27546, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":27547
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetNodes(chGraph, cnodes, &numNodes)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pynodes = [CUgraphNode(init_value=<void_ptr>cnodes[idx]) for idx in range(_graph_length)]
 *     if cnodes is not NULL:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 27547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27548
 *     err = ccuda.cuGraphGetNodes(chGraph, cnodes, &numNodes)
 *     if CUresult(err) == CUresult(0):
 *         pynodes = [CUgraphNode(init_value=<void_ptr>cnodes[idx]) for idx in range(_graph_length)]             # <<<<<<<<<<<<<<
 *     if cnodes is not NULL:
 *         free(cnodes)
 */
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __pyx_v__graph_length;
      __pyx_t_10 = __pyx_t_9;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
        __pyx_10genexpr109__pyx_v_idx = __pyx_t_11;
        __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27548, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_cnodes[__pyx_10genexpr109__pyx_v_idx]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27548, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_init_value, __pyx_t_6) < 0) __PYX_ERR(0, 27548, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27548, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 27548, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_pynodes, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27547
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetNodes(chGraph, cnodes, &numNodes)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pynodes = [CUgraphNode(init_value=<void_ptr>cnodes[idx]) for idx in range(_graph_length)]
 *     if cnodes is not NULL:
 */
  }

  /* "cuda/cuda.pyx":27549
 *     if CUresult(err) == CUresult(0):
 *         pynodes = [CUgraphNode(init_value=<void_ptr>cnodes[idx]) for idx in range(_graph_length)]
 *     if cnodes is not NULL:             # <<<<<<<<<<<<<<
 *         free(cnodes)
 *     return (CUresult(err), pynodes, numNodes)
 */
  __pyx_t_1 = ((__pyx_v_cnodes != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27550
 *         pynodes = [CUgraphNode(init_value=<void_ptr>cnodes[idx]) for idx in range(_graph_length)]
 *     if cnodes is not NULL:
 *         free(cnodes)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pynodes, numNodes)
 * 
 */
    free(__pyx_v_cnodes);

    /* "cuda/cuda.pyx":27549
 *     if CUresult(err) == CUresult(0):
 *         pynodes = [CUgraphNode(init_value=<void_ptr>cnodes[idx]) for idx in range(_graph_length)]
 *     if cnodes is not NULL:             # <<<<<<<<<<<<<<
 *         free(cnodes)
 *     return (CUresult(err), pynodes, numNodes)
 */
  }

  /* "cuda/cuda.pyx":27551
 *     if cnodes is not NULL:
 *         free(cnodes)
 *     return (CUresult(err), pynodes, numNodes)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_numNodes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_pynodes);
  __Pyx_GIVEREF(__pyx_v_pynodes);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_pynodes);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27499
 * 
 * @cython.embedsignature(True)
 * def cuGraphGetNodes(hGraph, size_t numNodes = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a graph's nodes.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphGetNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF(__pyx_v_pynodes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27554
 * 
 * @cython.embedsignature(True)
 * def cuGraphGetRootNodes(hGraph, size_t numRootNodes = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a graph's root nodes.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_555cuGraphGetRootNodes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_554cuGraphGetRootNodes[] = "cuGraphGetRootNodes(hGraph, size_t numRootNodes=0)\n Returns a graph's root nodes.\n\n    Returns a list of `hGraph's` root nodes. `rootNodes` may be NULL, in\n    which case this function will return the number of root nodes in\n    `numRootNodes`. Otherwise, `numRootNodes` entries will be filled in. If\n    `numRootNodes` is higher than the actual number of root nodes, the\n    remaining entries in `rootNodes` will be set to NULL, and the number of\n    nodes actually obtained will be returned in `numRootNodes`.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to query\n    numRootNodes : int\n        See description\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    rootNodes : List[:py:obj:`~.CUgraphNode`]\n        Pointer to return the root nodes\n    numRootNodes : int\n        See description\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetType`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_555cuGraphGetRootNodes = {"cuGraphGetRootNodes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_555cuGraphGetRootNodes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_554cuGraphGetRootNodes};
static PyObject *__pyx_pw_4cuda_4cuda_555cuGraphGetRootNodes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  size_t __pyx_v_numRootNodes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphGetRootNodes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_numRootNodes,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numRootNodes);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphGetRootNodes") < 0)) __PYX_ERR(0, 27554, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_hGraph = values[0];
    if (values[1]) {
      __pyx_v_numRootNodes = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_numRootNodes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 27554, __pyx_L3_error)
    } else {
      __pyx_v_numRootNodes = ((size_t)((size_t)0));
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphGetRootNodes", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27554, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphGetRootNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_554cuGraphGetRootNodes(__pyx_self, __pyx_v_hGraph, __pyx_v_numRootNodes);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_554cuGraphGetRootNodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, size_t __pyx_v_numRootNodes) {
  size_t __pyx_v__graph_length;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  CUgraphNode *__pyx_v_crootNodes;
  PyObject *__pyx_v_pyrootNodes = NULL;
  CUresult __pyx_v_err;
  size_t __pyx_10genexpr110__pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__899)
  __Pyx_RefNannySetupContext("cuGraphGetRootNodes", 0);
  __Pyx_TraceCall("cuGraphGetRootNodes", __pyx_f[0], 27554, 0, __PYX_ERR(0, 27554, __pyx_L1_error));

  /* "cuda/cuda.pyx":27584
 *     :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetType`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes`
 *     """
 *     cdef size_t _graph_length = numRootNodes             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 */
  __pyx_v__graph_length = __pyx_v_numRootNodes;

  /* "cuda/cuda.pyx":27586
 *     cdef size_t _graph_length = numRootNodes
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27587
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27586
 *     cdef size_t _graph_length = numRootNodes
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27588
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27589
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27590
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27590, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27588
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27592
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27593
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode* crootNodes = NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27593, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27595
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef ccuda.CUgraphNode* crootNodes = NULL             # <<<<<<<<<<<<<<
 *     pyrootNodes = []
 *     if _graph_length != 0:
 */
  __pyx_v_crootNodes = NULL;

  /* "cuda/cuda.pyx":27596
 * 
 *     cdef ccuda.CUgraphNode* crootNodes = NULL
 *     pyrootNodes = []             # <<<<<<<<<<<<<<
 *     if _graph_length != 0:
 *         crootNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pyrootNodes = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":27597
 *     cdef ccuda.CUgraphNode* crootNodes = NULL
 *     pyrootNodes = []
 *     if _graph_length != 0:             # <<<<<<<<<<<<<<
 *         crootNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if crootNodes is NULL:
 */
  __pyx_t_1 = ((__pyx_v__graph_length != 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27598
 *     pyrootNodes = []
 *     if _graph_length != 0:
 *         crootNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if crootNodes is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_v_crootNodes = ((CUgraphNode *)calloc(__pyx_v__graph_length, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":27599
 *     if _graph_length != 0:
 *         crootNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if crootNodes is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetRootNodes(chGraph, crootNodes, &numRootNodes)
 */
    __pyx_t_1 = ((__pyx_v_crootNodes == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "cuda/cuda.pyx":27600
 *         crootNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if crootNodes is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphGetRootNodes(chGraph, crootNodes, &numRootNodes)
 *     if CUresult(err) == CUresult(0):
 */
      __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v__graph_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 27600, __pyx_L1_error)

      /* "cuda/cuda.pyx":27599
 *     if _graph_length != 0:
 *         crootNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if crootNodes is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetRootNodes(chGraph, crootNodes, &numRootNodes)
 */
    }

    /* "cuda/cuda.pyx":27597
 *     cdef ccuda.CUgraphNode* crootNodes = NULL
 *     pyrootNodes = []
 *     if _graph_length != 0:             # <<<<<<<<<<<<<<
 *         crootNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if crootNodes is NULL:
 */
  }

  /* "cuda/cuda.pyx":27601
 *         if crootNodes is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetRootNodes(chGraph, crootNodes, &numRootNodes)             # <<<<<<<<<<<<<<
 *     if CUresult(err) == CUresult(0):
 *         pyrootNodes = [CUgraphNode(init_value=<void_ptr>crootNodes[idx]) for idx in range(_graph_length)]
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphGetRootNodes(__pyx_v_chGraph, __pyx_v_crootNodes, (&__pyx_v_numRootNodes)); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27601, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":27602
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetRootNodes(chGraph, crootNodes, &numRootNodes)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pyrootNodes = [CUgraphNode(init_value=<void_ptr>crootNodes[idx]) for idx in range(_graph_length)]
 *     if crootNodes is not NULL:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 27602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27603
 *     err = ccuda.cuGraphGetRootNodes(chGraph, crootNodes, &numRootNodes)
 *     if CUresult(err) == CUresult(0):
 *         pyrootNodes = [CUgraphNode(init_value=<void_ptr>crootNodes[idx]) for idx in range(_graph_length)]             # <<<<<<<<<<<<<<
 *     if crootNodes is not NULL:
 *         free(crootNodes)
 */
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27603, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __pyx_v__graph_length;
      __pyx_t_10 = __pyx_t_9;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
        __pyx_10genexpr110__pyx_v_idx = __pyx_t_11;
        __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27603, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_crootNodes[__pyx_10genexpr110__pyx_v_idx]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27603, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_init_value, __pyx_t_6) < 0) __PYX_ERR(0, 27603, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27603, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 27603, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_pyrootNodes, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27602
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetRootNodes(chGraph, crootNodes, &numRootNodes)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pyrootNodes = [CUgraphNode(init_value=<void_ptr>crootNodes[idx]) for idx in range(_graph_length)]
 *     if crootNodes is not NULL:
 */
  }

  /* "cuda/cuda.pyx":27604
 *     if CUresult(err) == CUresult(0):
 *         pyrootNodes = [CUgraphNode(init_value=<void_ptr>crootNodes[idx]) for idx in range(_graph_length)]
 *     if crootNodes is not NULL:             # <<<<<<<<<<<<<<
 *         free(crootNodes)
 *     return (CUresult(err), pyrootNodes, numRootNodes)
 */
  __pyx_t_1 = ((__pyx_v_crootNodes != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27605
 *         pyrootNodes = [CUgraphNode(init_value=<void_ptr>crootNodes[idx]) for idx in range(_graph_length)]
 *     if crootNodes is not NULL:
 *         free(crootNodes)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pyrootNodes, numRootNodes)
 * 
 */
    free(__pyx_v_crootNodes);

    /* "cuda/cuda.pyx":27604
 *     if CUresult(err) == CUresult(0):
 *         pyrootNodes = [CUgraphNode(init_value=<void_ptr>crootNodes[idx]) for idx in range(_graph_length)]
 *     if crootNodes is not NULL:             # <<<<<<<<<<<<<<
 *         free(crootNodes)
 *     return (CUresult(err), pyrootNodes, numRootNodes)
 */
  }

  /* "cuda/cuda.pyx":27606
 *     if crootNodes is not NULL:
 *         free(crootNodes)
 *     return (CUresult(err), pyrootNodes, numRootNodes)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_numRootNodes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_pyrootNodes);
  __Pyx_GIVEREF(__pyx_v_pyrootNodes);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_pyrootNodes);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27554
 * 
 * @cython.embedsignature(True)
 * def cuGraphGetRootNodes(hGraph, size_t numRootNodes = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a graph's root nodes.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphGetRootNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF(__pyx_v_pyrootNodes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27609
 * 
 * @cython.embedsignature(True)
 * def cuGraphGetEdges(hGraph, size_t numEdges = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a graph's dependency edges.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_557cuGraphGetEdges(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_556cuGraphGetEdges[] = "cuGraphGetEdges(hGraph, size_t numEdges=0)\n Returns a graph's dependency edges.\n\n    Returns a list of `hGraph's` dependency edges. Edges are returned via\n    corresponding indices in `from` and `to`; that is, the node in `to`[i]\n    has a dependency on the node in `from`[i]. `from` and `to` may both be\n    NULL, in which case this function only returns the number of edges in\n    `numEdges`. Otherwise, `numEdges` entries will be filled in. If\n    `numEdges` is higher than the actual number of edges, the remaining\n    entries in `from` and `to` will be set to NULL, and the number of edges\n    actually returned will be written to `numEdges`.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to get the edges from\n    numEdges : int\n        See description\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    from : List[:py:obj:`~.CUgraphNode`]\n        Location to return edge endpoints\n    to : List[:py:obj:`~.CUgraphNode`]\n        Location to return edge endpoints\n    numEdges : int\n        See description\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphRemoveDependencies`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_557cuGraphGetEdges = {"cuGraphGetEdges", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_557cuGraphGetEdges, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_556cuGraphGetEdges};
static PyObject *__pyx_pw_4cuda_4cuda_557cuGraphGetEdges(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  size_t __pyx_v_numEdges;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphGetEdges (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_numEdges,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numEdges);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphGetEdges") < 0)) __PYX_ERR(0, 27609, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_hGraph = values[0];
    if (values[1]) {
      __pyx_v_numEdges = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_numEdges == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 27609, __pyx_L3_error)
    } else {
      __pyx_v_numEdges = ((size_t)((size_t)0));
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphGetEdges", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27609, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphGetEdges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_556cuGraphGetEdges(__pyx_self, __pyx_v_hGraph, __pyx_v_numEdges);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_556cuGraphGetEdges(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, size_t __pyx_v_numEdges) {
  size_t __pyx_v__graph_length;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  CUgraphNode *__pyx_v_cfrom_;
  PyObject *__pyx_v_pyfrom_ = NULL;
  CUgraphNode *__pyx_v_cto;
  PyObject *__pyx_v_pyto = NULL;
  CUresult __pyx_v_err;
  size_t __pyx_10genexpr111__pyx_v_idx;
  size_t __pyx_10genexpr112__pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__900)
  __Pyx_RefNannySetupContext("cuGraphGetEdges", 0);
  __Pyx_TraceCall("cuGraphGetEdges", __pyx_f[0], 27609, 0, __PYX_ERR(0, 27609, __pyx_L1_error));

  /* "cuda/cuda.pyx":27643
 *     :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphRemoveDependencies`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes`
 *     """
 *     cdef size_t _graph_length = numEdges             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 */
  __pyx_v__graph_length = __pyx_v_numEdges;

  /* "cuda/cuda.pyx":27645
 *     cdef size_t _graph_length = numEdges
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27646
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27645
 *     cdef size_t _graph_length = numEdges
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27647
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27648
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27649
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27649, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27647
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27651
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27652
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27652, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27654
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL             # <<<<<<<<<<<<<<
 *     pyfrom_ = []
 *     if _graph_length != 0:
 */
  __pyx_v_cfrom_ = NULL;

  /* "cuda/cuda.pyx":27655
 * 
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL
 *     pyfrom_ = []             # <<<<<<<<<<<<<<
 *     if _graph_length != 0:
 *         cfrom_ = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pyfrom_ = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":27656
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL
 *     pyfrom_ = []
 *     if _graph_length != 0:             # <<<<<<<<<<<<<<
 *         cfrom_ = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:
 */
  __pyx_t_1 = ((__pyx_v__graph_length != 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27657
 *     pyfrom_ = []
 *     if _graph_length != 0:
 *         cfrom_ = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cfrom_ is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_v_cfrom_ = ((CUgraphNode *)calloc(__pyx_v__graph_length, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":27658
 *     if _graph_length != 0:
 *         cfrom_ = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     cdef ccuda.CUgraphNode* cto = NULL
 */
    __pyx_t_1 = ((__pyx_v_cfrom_ == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "cuda/cuda.pyx":27659
 *         cfrom_ = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode* cto = NULL
 *     pyto = []
 */
      __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v__graph_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 27659, __pyx_L1_error)

      /* "cuda/cuda.pyx":27658
 *     if _graph_length != 0:
 *         cfrom_ = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     cdef ccuda.CUgraphNode* cto = NULL
 */
    }

    /* "cuda/cuda.pyx":27656
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL
 *     pyfrom_ = []
 *     if _graph_length != 0:             # <<<<<<<<<<<<<<
 *         cfrom_ = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:
 */
  }

  /* "cuda/cuda.pyx":27660
 *         if cfrom_ is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     cdef ccuda.CUgraphNode* cto = NULL             # <<<<<<<<<<<<<<
 *     pyto = []
 *     if _graph_length != 0:
 */
  __pyx_v_cto = NULL;

  /* "cuda/cuda.pyx":27661
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     cdef ccuda.CUgraphNode* cto = NULL
 *     pyto = []             # <<<<<<<<<<<<<<
 *     if _graph_length != 0:
 *         cto = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_pyto = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "cuda/cuda.pyx":27662
 *     cdef ccuda.CUgraphNode* cto = NULL
 *     pyto = []
 *     if _graph_length != 0:             # <<<<<<<<<<<<<<
 *         cto = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:
 */
  __pyx_t_1 = ((__pyx_v__graph_length != 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27663
 *     pyto = []
 *     if _graph_length != 0:
 *         cto = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cto is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_v_cto = ((CUgraphNode *)calloc(__pyx_v__graph_length, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":27664
 *     if _graph_length != 0:
 *         cto = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetEdges(chGraph, cfrom_, cto, &numEdges)
 */
    __pyx_t_1 = ((__pyx_v_cto == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "cuda/cuda.pyx":27665
 *         cto = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphGetEdges(chGraph, cfrom_, cto, &numEdges)
 *     if CUresult(err) == CUresult(0):
 */
      __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v__graph_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 27665, __pyx_L1_error)

      /* "cuda/cuda.pyx":27664
 *     if _graph_length != 0:
 *         cto = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetEdges(chGraph, cfrom_, cto, &numEdges)
 */
    }

    /* "cuda/cuda.pyx":27662
 *     cdef ccuda.CUgraphNode* cto = NULL
 *     pyto = []
 *     if _graph_length != 0:             # <<<<<<<<<<<<<<
 *         cto = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:
 */
  }

  /* "cuda/cuda.pyx":27666
 *         if cto is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetEdges(chGraph, cfrom_, cto, &numEdges)             # <<<<<<<<<<<<<<
 *     if CUresult(err) == CUresult(0):
 *         pyfrom_ = [CUgraphNode(init_value=<void_ptr>cfrom_[idx]) for idx in range(_graph_length)]
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphGetEdges(__pyx_v_chGraph, __pyx_v_cfrom_, __pyx_v_cto, (&__pyx_v_numEdges)); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27666, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":27667
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetEdges(chGraph, cfrom_, cto, &numEdges)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pyfrom_ = [CUgraphNode(init_value=<void_ptr>cfrom_[idx]) for idx in range(_graph_length)]
 *     if cfrom_ is not NULL:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 27667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27668
 *     err = ccuda.cuGraphGetEdges(chGraph, cfrom_, cto, &numEdges)
 *     if CUresult(err) == CUresult(0):
 *         pyfrom_ = [CUgraphNode(init_value=<void_ptr>cfrom_[idx]) for idx in range(_graph_length)]             # <<<<<<<<<<<<<<
 *     if cfrom_ is not NULL:
 *         free(cfrom_)
 */
    { /* enter inner scope */
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27668, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __pyx_v__graph_length;
      __pyx_t_10 = __pyx_t_9;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
        __pyx_10genexpr111__pyx_v_idx = __pyx_t_11;
        __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27668, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_cfrom_[__pyx_10genexpr111__pyx_v_idx]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27668, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_init_value, __pyx_t_3) < 0) __PYX_ERR(0, 27668, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27668, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 27668, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_pyfrom_, ((PyObject*)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27667
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphGetEdges(chGraph, cfrom_, cto, &numEdges)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pyfrom_ = [CUgraphNode(init_value=<void_ptr>cfrom_[idx]) for idx in range(_graph_length)]
 *     if cfrom_ is not NULL:
 */
  }

  /* "cuda/cuda.pyx":27669
 *     if CUresult(err) == CUresult(0):
 *         pyfrom_ = [CUgraphNode(init_value=<void_ptr>cfrom_[idx]) for idx in range(_graph_length)]
 *     if cfrom_ is not NULL:             # <<<<<<<<<<<<<<
 *         free(cfrom_)
 *     if CUresult(err) == CUresult(0):
 */
  __pyx_t_1 = ((__pyx_v_cfrom_ != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27670
 *         pyfrom_ = [CUgraphNode(init_value=<void_ptr>cfrom_[idx]) for idx in range(_graph_length)]
 *     if cfrom_ is not NULL:
 *         free(cfrom_)             # <<<<<<<<<<<<<<
 *     if CUresult(err) == CUresult(0):
 *         pyto = [CUgraphNode(init_value=<void_ptr>cto[idx]) for idx in range(_graph_length)]
 */
    free(__pyx_v_cfrom_);

    /* "cuda/cuda.pyx":27669
 *     if CUresult(err) == CUresult(0):
 *         pyfrom_ = [CUgraphNode(init_value=<void_ptr>cfrom_[idx]) for idx in range(_graph_length)]
 *     if cfrom_ is not NULL:             # <<<<<<<<<<<<<<
 *         free(cfrom_)
 *     if CUresult(err) == CUresult(0):
 */
  }

  /* "cuda/cuda.pyx":27671
 *     if cfrom_ is not NULL:
 *         free(cfrom_)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pyto = [CUgraphNode(init_value=<void_ptr>cto[idx]) for idx in range(_graph_length)]
 *     if cto is not NULL:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27671, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 27671, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27672
 *         free(cfrom_)
 *     if CUresult(err) == CUresult(0):
 *         pyto = [CUgraphNode(init_value=<void_ptr>cto[idx]) for idx in range(_graph_length)]             # <<<<<<<<<<<<<<
 *     if cto is not NULL:
 *         free(cto)
 */
    { /* enter inner scope */
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27672, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = __pyx_v__graph_length;
      __pyx_t_10 = __pyx_t_9;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
        __pyx_10genexpr112__pyx_v_idx = __pyx_t_11;
        __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_cto[__pyx_10genexpr112__pyx_v_idx]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_init_value, __pyx_t_5) < 0) __PYX_ERR(0, 27672, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 27672, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_pyto, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "cuda/cuda.pyx":27671
 *     if cfrom_ is not NULL:
 *         free(cfrom_)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pyto = [CUgraphNode(init_value=<void_ptr>cto[idx]) for idx in range(_graph_length)]
 *     if cto is not NULL:
 */
  }

  /* "cuda/cuda.pyx":27673
 *     if CUresult(err) == CUresult(0):
 *         pyto = [CUgraphNode(init_value=<void_ptr>cto[idx]) for idx in range(_graph_length)]
 *     if cto is not NULL:             # <<<<<<<<<<<<<<
 *         free(cto)
 *     return (CUresult(err), pyfrom_, pyto, numEdges)
 */
  __pyx_t_1 = ((__pyx_v_cto != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27674
 *         pyto = [CUgraphNode(init_value=<void_ptr>cto[idx]) for idx in range(_graph_length)]
 *     if cto is not NULL:
 *         free(cto)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pyfrom_, pyto, numEdges)
 * 
 */
    free(__pyx_v_cto);

    /* "cuda/cuda.pyx":27673
 *     if CUresult(err) == CUresult(0):
 *         pyto = [CUgraphNode(init_value=<void_ptr>cto[idx]) for idx in range(_graph_length)]
 *     if cto is not NULL:             # <<<<<<<<<<<<<<
 *         free(cto)
 *     return (CUresult(err), pyfrom_, pyto, numEdges)
 */
  }

  /* "cuda/cuda.pyx":27675
 *     if cto is not NULL:
 *         free(cto)
 *     return (CUresult(err), pyfrom_, pyto, numEdges)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_numEdges); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
  __Pyx_INCREF(__pyx_v_pyfrom_);
  __Pyx_GIVEREF(__pyx_v_pyfrom_);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_pyfrom_);
  __Pyx_INCREF(__pyx_v_pyto);
  __Pyx_GIVEREF(__pyx_v_pyto);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_pyto);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_5);
  __pyx_t_6 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27609
 * 
 * @cython.embedsignature(True)
 * def cuGraphGetEdges(hGraph, size_t numEdges = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a graph's dependency edges.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphGetEdges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF(__pyx_v_pyfrom_);
  __Pyx_XDECREF(__pyx_v_pyto);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27678
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetDependencies(hNode, size_t numDependencies = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a node's dependencies.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_559cuGraphNodeGetDependencies(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_558cuGraphNodeGetDependencies[] = "cuGraphNodeGetDependencies(hNode, size_t numDependencies=0)\n Returns a node's dependencies.\n\n    Returns a list of `node's` dependencies. `dependencies` may be NULL, in\n    which case this function will return the number of dependencies in\n    `numDependencies`. Otherwise, `numDependencies` entries will be filled\n    in. If `numDependencies` is higher than the actual number of\n    dependencies, the remaining entries in `dependencies` will be set to\n    NULL, and the number of nodes actually obtained will be returned in\n    `numDependencies`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to query\n    numDependencies : int\n        See description\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    dependencies : List[:py:obj:`~.CUgraphNode`]\n        Pointer to return the dependencies\n    numDependencies : int\n        See description\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphNodeGetDependentNodes`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphRemoveDependencies`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_559cuGraphNodeGetDependencies = {"cuGraphNodeGetDependencies", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_559cuGraphNodeGetDependencies, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_558cuGraphNodeGetDependencies};
static PyObject *__pyx_pw_4cuda_4cuda_559cuGraphNodeGetDependencies(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  size_t __pyx_v_numDependencies;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphNodeGetDependencies (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_numDependencies,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphNodeGetDependencies") < 0)) __PYX_ERR(0, 27678, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_hNode = values[0];
    if (values[1]) {
      __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 27678, __pyx_L3_error)
    } else {
      __pyx_v_numDependencies = ((size_t)((size_t)0));
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphNodeGetDependencies", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27678, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphNodeGetDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_558cuGraphNodeGetDependencies(__pyx_self, __pyx_v_hNode, __pyx_v_numDependencies);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_558cuGraphNodeGetDependencies(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, size_t __pyx_v_numDependencies) {
  size_t __pyx_v__graph_length;
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphNode *__pyx_v_cdependencies;
  PyObject *__pyx_v_pydependencies = NULL;
  CUresult __pyx_v_err;
  size_t __pyx_10genexpr113__pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__901)
  __Pyx_RefNannySetupContext("cuGraphNodeGetDependencies", 0);
  __Pyx_TraceCall("cuGraphNodeGetDependencies", __pyx_f[0], 27678, 0, __PYX_ERR(0, 27678, __pyx_L1_error));

  /* "cuda/cuda.pyx":27709
 *     :py:obj:`~.cuGraphNodeGetDependentNodes`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphRemoveDependencies`
 *     """
 *     cdef size_t _graph_length = numDependencies             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 */
  __pyx_v__graph_length = __pyx_v_numDependencies;

  /* "cuda/cuda.pyx":27711
 *     cdef size_t _graph_length = numDependencies
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27712
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27711
 *     cdef size_t _graph_length = numDependencies
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27713
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27714
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27715
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27715, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27713
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27717
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27718
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27718, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27720
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef ccuda.CUgraphNode* cdependencies = NULL             # <<<<<<<<<<<<<<
 *     pydependencies = []
 *     if _graph_length != 0:
 */
  __pyx_v_cdependencies = NULL;

  /* "cuda/cuda.pyx":27721
 * 
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     pydependencies = []             # <<<<<<<<<<<<<<
 *     if _graph_length != 0:
 *         cdependencies = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pydependencies = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":27722
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     pydependencies = []
 *     if _graph_length != 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  __pyx_t_1 = ((__pyx_v__graph_length != 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27723
 *     pydependencies = []
 *     if _graph_length != 0:
 *         cdependencies = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_v_cdependencies = ((CUgraphNode *)calloc(__pyx_v__graph_length, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":27724
 *     if _graph_length != 0:
 *         cdependencies = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphNodeGetDependencies(chNode, cdependencies, &numDependencies)
 */
    __pyx_t_1 = ((__pyx_v_cdependencies == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "cuda/cuda.pyx":27725
 *         cdependencies = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphNodeGetDependencies(chNode, cdependencies, &numDependencies)
 *     if CUresult(err) == CUresult(0):
 */
      __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v__graph_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 27725, __pyx_L1_error)

      /* "cuda/cuda.pyx":27724
 *     if _graph_length != 0:
 *         cdependencies = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphNodeGetDependencies(chNode, cdependencies, &numDependencies)
 */
    }

    /* "cuda/cuda.pyx":27722
 *     cdef ccuda.CUgraphNode* cdependencies = NULL
 *     pydependencies = []
 *     if _graph_length != 0:             # <<<<<<<<<<<<<<
 *         cdependencies = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cdependencies is NULL:
 */
  }

  /* "cuda/cuda.pyx":27726
 *         if cdependencies is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphNodeGetDependencies(chNode, cdependencies, &numDependencies)             # <<<<<<<<<<<<<<
 *     if CUresult(err) == CUresult(0):
 *         pydependencies = [CUgraphNode(init_value=<void_ptr>cdependencies[idx]) for idx in range(_graph_length)]
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphNodeGetDependencies(__pyx_v_chNode, __pyx_v_cdependencies, (&__pyx_v_numDependencies)); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27726, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":27727
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphNodeGetDependencies(chNode, cdependencies, &numDependencies)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pydependencies = [CUgraphNode(init_value=<void_ptr>cdependencies[idx]) for idx in range(_graph_length)]
 *     if cdependencies is not NULL:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 27727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27728
 *     err = ccuda.cuGraphNodeGetDependencies(chNode, cdependencies, &numDependencies)
 *     if CUresult(err) == CUresult(0):
 *         pydependencies = [CUgraphNode(init_value=<void_ptr>cdependencies[idx]) for idx in range(_graph_length)]             # <<<<<<<<<<<<<<
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 */
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27728, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __pyx_v__graph_length;
      __pyx_t_10 = __pyx_t_9;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
        __pyx_10genexpr113__pyx_v_idx = __pyx_t_11;
        __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27728, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_cdependencies[__pyx_10genexpr113__pyx_v_idx]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27728, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_init_value, __pyx_t_6) < 0) __PYX_ERR(0, 27728, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27728, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 27728, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_pydependencies, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27727
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphNodeGetDependencies(chNode, cdependencies, &numDependencies)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pydependencies = [CUgraphNode(init_value=<void_ptr>cdependencies[idx]) for idx in range(_graph_length)]
 *     if cdependencies is not NULL:
 */
  }

  /* "cuda/cuda.pyx":27729
 *     if CUresult(err) == CUresult(0):
 *         pydependencies = [CUgraphNode(init_value=<void_ptr>cdependencies[idx]) for idx in range(_graph_length)]
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), pydependencies, numDependencies)
 */
  __pyx_t_1 = ((__pyx_v_cdependencies != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27730
 *         pydependencies = [CUgraphNode(init_value=<void_ptr>cdependencies[idx]) for idx in range(_graph_length)]
 *     if cdependencies is not NULL:
 *         free(cdependencies)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pydependencies, numDependencies)
 * 
 */
    free(__pyx_v_cdependencies);

    /* "cuda/cuda.pyx":27729
 *     if CUresult(err) == CUresult(0):
 *         pydependencies = [CUgraphNode(init_value=<void_ptr>cdependencies[idx]) for idx in range(_graph_length)]
 *     if cdependencies is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependencies)
 *     return (CUresult(err), pydependencies, numDependencies)
 */
  }

  /* "cuda/cuda.pyx":27731
 *     if cdependencies is not NULL:
 *         free(cdependencies)
 *     return (CUresult(err), pydependencies, numDependencies)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependencies); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_pydependencies);
  __Pyx_GIVEREF(__pyx_v_pydependencies);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_pydependencies);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27678
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetDependencies(hNode, size_t numDependencies = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a node's dependencies.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphNodeGetDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_pydependencies);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27734
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetDependentNodes(hNode, size_t numDependentNodes = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a node's dependent nodes.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_561cuGraphNodeGetDependentNodes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_560cuGraphNodeGetDependentNodes[] = "cuGraphNodeGetDependentNodes(hNode, size_t numDependentNodes=0)\n Returns a node's dependent nodes.\n\n    Returns a list of `node's` dependent nodes. `dependentNodes` may be\n    NULL, in which case this function will return the number of dependent\n    nodes in `numDependentNodes`. Otherwise, `numDependentNodes` entries\n    will be filled in. If `numDependentNodes` is higher than the actual\n    number of dependent nodes, the remaining entries in `dependentNodes`\n    will be set to NULL, and the number of nodes actually obtained will be\n    returned in `numDependentNodes`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to query\n    numDependentNodes : int\n        See description\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    dependentNodes : List[:py:obj:`~.CUgraphNode`]\n        Pointer to return the dependent nodes\n    numDependentNodes : int\n        See description\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphRemoveDependencies`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_561cuGraphNodeGetDependentNodes = {"cuGraphNodeGetDependentNodes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_561cuGraphNodeGetDependentNodes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_560cuGraphNodeGetDependentNodes};
static PyObject *__pyx_pw_4cuda_4cuda_561cuGraphNodeGetDependentNodes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  size_t __pyx_v_numDependentNodes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphNodeGetDependentNodes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_numDependentNodes,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependentNodes);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphNodeGetDependentNodes") < 0)) __PYX_ERR(0, 27734, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_hNode = values[0];
    if (values[1]) {
      __pyx_v_numDependentNodes = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_numDependentNodes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 27734, __pyx_L3_error)
    } else {
      __pyx_v_numDependentNodes = ((size_t)((size_t)0));
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphNodeGetDependentNodes", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27734, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphNodeGetDependentNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_560cuGraphNodeGetDependentNodes(__pyx_self, __pyx_v_hNode, __pyx_v_numDependentNodes);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_560cuGraphNodeGetDependentNodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, size_t __pyx_v_numDependentNodes) {
  size_t __pyx_v__graph_length;
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphNode *__pyx_v_cdependentNodes;
  PyObject *__pyx_v_pydependentNodes = NULL;
  CUresult __pyx_v_err;
  size_t __pyx_10genexpr114__pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__902)
  __Pyx_RefNannySetupContext("cuGraphNodeGetDependentNodes", 0);
  __Pyx_TraceCall("cuGraphNodeGetDependentNodes", __pyx_f[0], 27734, 0, __PYX_ERR(0, 27734, __pyx_L1_error));

  /* "cuda/cuda.pyx":27765
 *     :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphRemoveDependencies`
 *     """
 *     cdef size_t _graph_length = numDependentNodes             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 */
  __pyx_v__graph_length = __pyx_v_numDependentNodes;

  /* "cuda/cuda.pyx":27767
 *     cdef size_t _graph_length = numDependentNodes
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27768
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27767
 *     cdef size_t _graph_length = numDependentNodes
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27769
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27770
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27771
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27771, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27769
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27773
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27774
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode* cdependentNodes = NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27774, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27776
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef ccuda.CUgraphNode* cdependentNodes = NULL             # <<<<<<<<<<<<<<
 *     pydependentNodes = []
 *     if _graph_length != 0:
 */
  __pyx_v_cdependentNodes = NULL;

  /* "cuda/cuda.pyx":27777
 * 
 *     cdef ccuda.CUgraphNode* cdependentNodes = NULL
 *     pydependentNodes = []             # <<<<<<<<<<<<<<
 *     if _graph_length != 0:
 *         cdependentNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pydependentNodes = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":27778
 *     cdef ccuda.CUgraphNode* cdependentNodes = NULL
 *     pydependentNodes = []
 *     if _graph_length != 0:             # <<<<<<<<<<<<<<
 *         cdependentNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cdependentNodes is NULL:
 */
  __pyx_t_1 = ((__pyx_v__graph_length != 0) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27779
 *     pydependentNodes = []
 *     if _graph_length != 0:
 *         cdependentNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cdependentNodes is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_v_cdependentNodes = ((CUgraphNode *)calloc(__pyx_v__graph_length, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":27780
 *     if _graph_length != 0:
 *         cdependentNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cdependentNodes is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphNodeGetDependentNodes(chNode, cdependentNodes, &numDependentNodes)
 */
    __pyx_t_1 = ((__pyx_v_cdependentNodes == NULL) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "cuda/cuda.pyx":27781
 *         cdependentNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cdependentNodes is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphNodeGetDependentNodes(chNode, cdependentNodes, &numDependentNodes)
 *     if CUresult(err) == CUresult(0):
 */
      __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v__graph_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 27781, __pyx_L1_error)

      /* "cuda/cuda.pyx":27780
 *     if _graph_length != 0:
 *         cdependentNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cdependentNodes is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphNodeGetDependentNodes(chNode, cdependentNodes, &numDependentNodes)
 */
    }

    /* "cuda/cuda.pyx":27778
 *     cdef ccuda.CUgraphNode* cdependentNodes = NULL
 *     pydependentNodes = []
 *     if _graph_length != 0:             # <<<<<<<<<<<<<<
 *         cdependentNodes = <ccuda.CUgraphNode*>calloc(_graph_length, sizeof(ccuda.CUgraphNode))
 *         if cdependentNodes is NULL:
 */
  }

  /* "cuda/cuda.pyx":27782
 *         if cdependentNodes is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphNodeGetDependentNodes(chNode, cdependentNodes, &numDependentNodes)             # <<<<<<<<<<<<<<
 *     if CUresult(err) == CUresult(0):
 *         pydependentNodes = [CUgraphNode(init_value=<void_ptr>cdependentNodes[idx]) for idx in range(_graph_length)]
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphNodeGetDependentNodes(__pyx_v_chNode, __pyx_v_cdependentNodes, (&__pyx_v_numDependentNodes)); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27782, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":27783
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphNodeGetDependentNodes(chNode, cdependentNodes, &numDependentNodes)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pydependentNodes = [CUgraphNode(init_value=<void_ptr>cdependentNodes[idx]) for idx in range(_graph_length)]
 *     if cdependentNodes is not NULL:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 27783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27784
 *     err = ccuda.cuGraphNodeGetDependentNodes(chNode, cdependentNodes, &numDependentNodes)
 *     if CUresult(err) == CUresult(0):
 *         pydependentNodes = [CUgraphNode(init_value=<void_ptr>cdependentNodes[idx]) for idx in range(_graph_length)]             # <<<<<<<<<<<<<<
 *     if cdependentNodes is not NULL:
 *         free(cdependentNodes)
 */
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27784, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __pyx_v__graph_length;
      __pyx_t_10 = __pyx_t_9;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
        __pyx_10genexpr114__pyx_v_idx = __pyx_t_11;
        __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27784, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_cdependentNodes[__pyx_10genexpr114__pyx_v_idx]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27784, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_init_value, __pyx_t_6) < 0) __PYX_ERR(0, 27784, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27784, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 27784, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_pydependentNodes, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27783
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *     err = ccuda.cuGraphNodeGetDependentNodes(chNode, cdependentNodes, &numDependentNodes)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pydependentNodes = [CUgraphNode(init_value=<void_ptr>cdependentNodes[idx]) for idx in range(_graph_length)]
 *     if cdependentNodes is not NULL:
 */
  }

  /* "cuda/cuda.pyx":27785
 *     if CUresult(err) == CUresult(0):
 *         pydependentNodes = [CUgraphNode(init_value=<void_ptr>cdependentNodes[idx]) for idx in range(_graph_length)]
 *     if cdependentNodes is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependentNodes)
 *     return (CUresult(err), pydependentNodes, numDependentNodes)
 */
  __pyx_t_1 = ((__pyx_v_cdependentNodes != NULL) != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27786
 *         pydependentNodes = [CUgraphNode(init_value=<void_ptr>cdependentNodes[idx]) for idx in range(_graph_length)]
 *     if cdependentNodes is not NULL:
 *         free(cdependentNodes)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pydependentNodes, numDependentNodes)
 * 
 */
    free(__pyx_v_cdependentNodes);

    /* "cuda/cuda.pyx":27785
 *     if CUresult(err) == CUresult(0):
 *         pydependentNodes = [CUgraphNode(init_value=<void_ptr>cdependentNodes[idx]) for idx in range(_graph_length)]
 *     if cdependentNodes is not NULL:             # <<<<<<<<<<<<<<
 *         free(cdependentNodes)
 *     return (CUresult(err), pydependentNodes, numDependentNodes)
 */
  }

  /* "cuda/cuda.pyx":27787
 *     if cdependentNodes is not NULL:
 *         free(cdependentNodes)
 *     return (CUresult(err), pydependentNodes, numDependentNodes)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_numDependentNodes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 27787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_pydependentNodes);
  __Pyx_GIVEREF(__pyx_v_pydependentNodes);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_pydependentNodes);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27734
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetDependentNodes(hNode, size_t numDependentNodes = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a node's dependent nodes.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphNodeGetDependentNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_pydependentNodes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27790
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddDependencies(hGraph, from_ : List[CUgraphNode], to : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Adds dependency edges to a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_563cuGraphAddDependencies(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_562cuGraphAddDependencies[] = "cuGraphAddDependencies(hGraph, from_: List[CUgraphNode], to: List[CUgraphNode], size_t numDependencies)\n Adds dependency edges to a graph.\n\n    The number of dependencies to be added is defined by `numDependencies`\n    Elements in `from` and `to` at corresponding indices define a\n    dependency. Each node in `from` and `to` must belong to `hGraph`.\n\n    If `numDependencies` is 0, elements in `from` and `to` will be ignored.\n    Specifying an existing dependency will return an error.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to which dependencies are added\n    from : List[:py:obj:`~.CUgraphNode`]\n        Array of nodes that provide the dependencies\n    to : List[:py:obj:`~.CUgraphNode`]\n        Array of dependent nodes\n    numDependencies : size_t\n        Number of dependencies to be added\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphRemoveDependencies`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_563cuGraphAddDependencies = {"cuGraphAddDependencies", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_563cuGraphAddDependencies, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_562cuGraphAddDependencies};
static PyObject *__pyx_pw_4cuda_4cuda_563cuGraphAddDependencies(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_from_ = 0;
  PyObject *__pyx_v_to = 0;
  size_t __pyx_v_numDependencies;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphAddDependencies (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_from,&__pyx_n_s_to,&__pyx_n_s_numDependencies,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddDependencies", 1, 4, 4, 1); __PYX_ERR(0, 27790, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddDependencies", 1, 4, 4, 2); __PYX_ERR(0, 27790, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphAddDependencies", 1, 4, 4, 3); __PYX_ERR(0, 27790, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphAddDependencies") < 0)) __PYX_ERR(0, 27790, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_from_ = values[1];
    __pyx_v_to = values[2];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 27790, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphAddDependencies", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27790, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_562cuGraphAddDependencies(__pyx_self, __pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_22cuGraphAddDependencies_2generator32(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":27821
 *     """
 *     to = [] if to is None else to
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_22cuGraphAddDependencies_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_62_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_62_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 27821, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_22cuGraphAddDependencies_2generator32, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddDependencies_locals_ge, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 27821, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddDependencies.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_22cuGraphAddDependencies_2generator32(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 27821, 0, __PYX_ERR(0, 27821, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 27821, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to)) { __Pyx_RaiseClosureNameError("to"); __PYX_ERR(0, 27821, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_to; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27821, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 27821, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27821, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 27821, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27821, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 27821, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_22cuGraphAddDependencies_5generator33(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":27825
 * 
 *     from_ = [] if from_ is None else from_
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_22cuGraphAddDependencies_3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_63_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_63_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 27825, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_22cuGraphAddDependencies_5generator33, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphAddDependencies_locals_ge, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 27825, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddDependencies.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_22cuGraphAddDependencies_5generator33(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 27825, 0, __PYX_ERR(0, 27825, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 27825, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_from_)) { __Pyx_RaiseClosureNameError("from_"); __PYX_ERR(0, 27825, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_from_)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_from_)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_from_; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_from_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27825, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 27825, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27825, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 27825, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27825, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 27825, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27790
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddDependencies(hGraph, from_ : List[CUgraphNode], to : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Adds dependency edges to a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_562cuGraphAddDependencies(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_from_, PyObject *__pyx_v_to, size_t __pyx_v_numDependencies) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *__pyx_cur_scope;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  CUgraphNode *__pyx_v_cfrom_;
  Py_ssize_t __pyx_v_idx;
  CUgraphNode *__pyx_v_cto;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_22cuGraphAddDependencies_2generator32 = 0;
  PyObject *__pyx_gb_4cuda_4cuda_22cuGraphAddDependencies_5generator33 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  CUgraphNode *__pyx_t_10;
  CUgraphNode *__pyx_t_11;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__903)
  __Pyx_RefNannySetupContext("cuGraphAddDependencies", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 27790, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphAddDependencies", __pyx_f[0], 27790, 0, __PYX_ERR(0, 27790, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_from_ = __pyx_v_from_;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_from_);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_from_);
  __pyx_cur_scope->__pyx_v_to = __pyx_v_to;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_to);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_to);

  /* "cuda/cuda.pyx":27820
 *     :py:obj:`~.cuGraphRemoveDependencies`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes`
 *     """
 *     to = [] if to is None else to             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_to == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_to);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_to;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_to);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_to, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":27821
 *     """
 *     to = [] if to is None else to
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_22cuGraphAddDependencies_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 27821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":27822
 *     to = [] if to is None else to
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     from_ = [] if from_ is None else from_
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__904, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 27822, __pyx_L1_error)

    /* "cuda/cuda.pyx":27821
 *     """
 *     to = [] if to is None else to
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":27824
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 *     from_ = [] if from_ is None else from_             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_4 = (__pyx_cur_scope->__pyx_v_from_ == Py_None);
  if ((__pyx_t_4 != 0)) {
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_from_);
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_from_;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_from_);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_from_, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":27825
 * 
 *     from_ = [] if from_ is None else from_
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_3 = __pyx_pf_4cuda_4cuda_22cuGraphAddDependencies_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 27825, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((!__pyx_t_4) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":27826
 *     from_ = [] if from_ is None else from_
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__905, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 27826, __pyx_L1_error)

    /* "cuda/cuda.pyx":27825
 * 
 *     from_ = [] if from_ is None else from_
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":27829
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_2 = (__pyx_v_hGraph == Py_None);
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":27830
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27829
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":27831
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27832
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_phGraph = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":27833
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27833, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":27831
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":27835
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27836
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27836, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":27838
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL             # <<<<<<<<<<<<<<
 *     if len(from_) > 0:
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cfrom_ = NULL;

  /* "cuda/cuda.pyx":27839
 * 
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL
 *     if len(from_) > 0:             # <<<<<<<<<<<<<<
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_from_;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27840
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL
 *     if len(from_) > 0:
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cfrom_ is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_from_;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27840, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_cfrom_ = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":27841
 *     if len(from_) > 0:
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_cfrom_ == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":27842
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(from_)):
 */
      __pyx_t_3 = __pyx_cur_scope->__pyx_v_from_;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27842, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_n_u_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 27842, __pyx_L1_error)

      /* "cuda/cuda.pyx":27841
 *     if len(from_) > 0:
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":27844
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(from_)):             # <<<<<<<<<<<<<<
 *                 cfrom_[idx] = (<CUgraphNode>from_[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_from_;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27844, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":27845
 *         else:
 *             for idx in range(len(from_)):
 *                 cfrom_[idx] = (<CUgraphNode>from_[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode* cto = NULL
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_from_, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27845, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cfrom_[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":27839
 * 
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL
 *     if len(from_) > 0:             # <<<<<<<<<<<<<<
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:
 */
  }

  /* "cuda/cuda.pyx":27847
 *                 cfrom_[idx] = (<CUgraphNode>from_[idx])._ptr[0]
 * 
 *     cdef ccuda.CUgraphNode* cto = NULL             # <<<<<<<<<<<<<<
 *     if len(to) > 0:
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cto = NULL;

  /* "cuda/cuda.pyx":27848
 * 
 *     cdef ccuda.CUgraphNode* cto = NULL
 *     if len(to) > 0:             # <<<<<<<<<<<<<<
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_to;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27849
 *     cdef ccuda.CUgraphNode* cto = NULL
 *     if len(to) > 0:
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cto is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_to;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27849, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_cto = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":27850
 *     if len(to) > 0:
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_cto == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":27851
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(to)):
 */
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_to;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27851, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 27851, __pyx_L1_error)

      /* "cuda/cuda.pyx":27850
 *     if len(to) > 0:
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":27853
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(to)):             # <<<<<<<<<<<<<<
 *                 cto[idx] = (<CUgraphNode>to[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_to;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27853, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":27854
 *         else:
 *             for idx in range(len(to)):
 *                 cto[idx] = (<CUgraphNode>to[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphAddDependencies(chGraph, (<CUgraphNode>from_[0])._ptr if len(from_) == 1 else cfrom_, (<CUgraphNode>to[0])._ptr if len(to) == 1 else cto, numDependencies)
 */
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_to, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27854, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        (__pyx_v_cto[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
    }

    /* "cuda/cuda.pyx":27848
 * 
 *     cdef ccuda.CUgraphNode* cto = NULL
 *     if len(to) > 0:             # <<<<<<<<<<<<<<
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:
 */
  }

  /* "cuda/cuda.pyx":27856
 *                 cto[idx] = (<CUgraphNode>to[idx])._ptr[0]
 * 
 *     err = ccuda.cuGraphAddDependencies(chGraph, (<CUgraphNode>from_[0])._ptr if len(from_) == 1 else cfrom_, (<CUgraphNode>to[0])._ptr if len(to) == 1 else cto, numDependencies)             # <<<<<<<<<<<<<<
 *     if cfrom_ is not NULL:
 *         free(cfrom_)
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_from_;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_from_, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1)->_ptr;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cfrom_;
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_to;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_to, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1)->_ptr;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __pyx_t_11 = __pyx_v_cto;
  }
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuGraphAddDependencies(__pyx_v_chGraph, __pyx_t_10, __pyx_t_11, __pyx_v_numDependencies); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27856, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":27857
 * 
 *     err = ccuda.cuGraphAddDependencies(chGraph, (<CUgraphNode>from_[0])._ptr if len(from_) == 1 else cfrom_, (<CUgraphNode>to[0])._ptr if len(to) == 1 else cto, numDependencies)
 *     if cfrom_ is not NULL:             # <<<<<<<<<<<<<<
 *         free(cfrom_)
 *     if cto is not NULL:
 */
  __pyx_t_2 = ((__pyx_v_cfrom_ != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27858
 *     err = ccuda.cuGraphAddDependencies(chGraph, (<CUgraphNode>from_[0])._ptr if len(from_) == 1 else cfrom_, (<CUgraphNode>to[0])._ptr if len(to) == 1 else cto, numDependencies)
 *     if cfrom_ is not NULL:
 *         free(cfrom_)             # <<<<<<<<<<<<<<
 *     if cto is not NULL:
 *         free(cto)
 */
    free(__pyx_v_cfrom_);

    /* "cuda/cuda.pyx":27857
 * 
 *     err = ccuda.cuGraphAddDependencies(chGraph, (<CUgraphNode>from_[0])._ptr if len(from_) == 1 else cfrom_, (<CUgraphNode>to[0])._ptr if len(to) == 1 else cto, numDependencies)
 *     if cfrom_ is not NULL:             # <<<<<<<<<<<<<<
 *         free(cfrom_)
 *     if cto is not NULL:
 */
  }

  /* "cuda/cuda.pyx":27859
 *     if cfrom_ is not NULL:
 *         free(cfrom_)
 *     if cto is not NULL:             # <<<<<<<<<<<<<<
 *         free(cto)
 *     return (CUresult(err),)
 */
  __pyx_t_2 = ((__pyx_v_cto != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27860
 *         free(cfrom_)
 *     if cto is not NULL:
 *         free(cto)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
    free(__pyx_v_cto);

    /* "cuda/cuda.pyx":27859
 *     if cfrom_ is not NULL:
 *         free(cfrom_)
 *     if cto is not NULL:             # <<<<<<<<<<<<<<
 *         free(cto)
 *     return (CUresult(err),)
 */
  }

  /* "cuda/cuda.pyx":27861
 *     if cto is not NULL:
 *         free(cto)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_1 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_13, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27790
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddDependencies(hGraph, from_ : List[CUgraphNode], to : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Adds dependency edges to a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuGraphAddDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_22cuGraphAddDependencies_2generator32);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_22cuGraphAddDependencies_5generator33);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27864
 * 
 * @cython.embedsignature(True)
 * def cuGraphRemoveDependencies(hGraph, from_ : List[CUgraphNode], to : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Removes dependency edges from a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_565cuGraphRemoveDependencies(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_564cuGraphRemoveDependencies[] = "cuGraphRemoveDependencies(hGraph, from_: List[CUgraphNode], to: List[CUgraphNode], size_t numDependencies)\n Removes dependency edges from a graph.\n\n    The number of `dependencies` to be removed is defined by\n    `numDependencies`. Elements in `from` and `to` at corresponding indices\n    define a dependency. Each node in `from` and `to` must belong to\n    `hGraph`.\n\n    If `numDependencies` is 0, elements in `from` and `to` will be ignored.\n    Specifying a non-existing dependency will return an error.\n\n    Dependencies cannot be removed from graphs which contain allocation or\n    free nodes. Any attempt to do so will return an error.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph from which to remove dependencies\n    from : List[:py:obj:`~.CUgraphNode`]\n        Array of nodes that provide the dependencies\n    to : List[:py:obj:`~.CUgraphNode`]\n        Array of dependent nodes\n    numDependencies : size_t\n        Number of dependencies to be removed\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_565cuGraphRemoveDependencies = {"cuGraphRemoveDependencies", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_565cuGraphRemoveDependencies, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_564cuGraphRemoveDependencies};
static PyObject *__pyx_pw_4cuda_4cuda_565cuGraphRemoveDependencies(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  PyObject *__pyx_v_from_ = 0;
  PyObject *__pyx_v_to = 0;
  size_t __pyx_v_numDependencies;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphRemoveDependencies (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_from,&__pyx_n_s_to,&__pyx_n_s_numDependencies,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphRemoveDependencies", 1, 4, 4, 1); __PYX_ERR(0, 27864, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphRemoveDependencies", 1, 4, 4, 2); __PYX_ERR(0, 27864, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numDependencies)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphRemoveDependencies", 1, 4, 4, 3); __PYX_ERR(0, 27864, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphRemoveDependencies") < 0)) __PYX_ERR(0, 27864, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_from_ = values[1];
    __pyx_v_to = values[2];
    __pyx_v_numDependencies = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_numDependencies == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 27864, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphRemoveDependencies", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27864, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphRemoveDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_564cuGraphRemoveDependencies(__pyx_self, __pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_25cuGraphRemoveDependencies_2generator34(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":27899
 *     """
 *     to = [] if to is None else to
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_25cuGraphRemoveDependencies_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_65_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_65_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 27899, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_25cuGraphRemoveDependencies_2generator34, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphRemoveDependencies_locals, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 27899, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphRemoveDependencies.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_25cuGraphRemoveDependencies_2generator34(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 27899, 0, __PYX_ERR(0, 27899, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 27899, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to)) { __Pyx_RaiseClosureNameError("to"); __PYX_ERR(0, 27899, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_to; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27899, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 27899, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27899, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 27899, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27899, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 27899, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_4cuda_4cuda_25cuGraphRemoveDependencies_5generator35(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cuda/cuda.pyx":27903
 * 
 *     from_ = [] if from_ is None else from_
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_25cuGraphRemoveDependencies_3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_66_genexpr(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_66_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 27903, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_4cuda_25cuGraphRemoveDependencies_5generator35, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cuGraphRemoveDependencies_locals, __pyx_n_s_cuda_cuda); if (unlikely(!gen)) __PYX_ERR(0, 27903, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphRemoveDependencies.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_4cuda_4cuda_25cuGraphRemoveDependencies_5generator35(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  __Pyx_TraceCall("genexpr", __pyx_f[0], 27903, 0, __PYX_ERR(0, 27903, __pyx_L1_error));
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_TraceReturn(Py_None, 0);
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 27903, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_from_)) { __Pyx_RaiseClosureNameError("from_"); __PYX_ERR(0, 27903, __pyx_L1_error) }
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_from_)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_from_)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_from_; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_from_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27903, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 27903, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27903, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 27903, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27903, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 27903, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v__x, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27864
 * 
 * @cython.embedsignature(True)
 * def cuGraphRemoveDependencies(hGraph, from_ : List[CUgraphNode], to : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Removes dependency edges from a graph.
 * 
 */

static PyObject *__pyx_pf_4cuda_4cuda_564cuGraphRemoveDependencies(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, PyObject *__pyx_v_from_, PyObject *__pyx_v_to, size_t __pyx_v_numDependencies) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *__pyx_cur_scope;
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  CUgraphNode *__pyx_v_cfrom_;
  Py_ssize_t __pyx_v_idx;
  CUgraphNode *__pyx_v_cto;
  CUresult __pyx_v_err;
  PyObject *__pyx_gb_4cuda_4cuda_25cuGraphRemoveDependencies_2generator34 = 0;
  PyObject *__pyx_gb_4cuda_4cuda_25cuGraphRemoveDependencies_5generator35 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  CUgraphNode *__pyx_t_10;
  CUgraphNode *__pyx_t_11;
  CUresult __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__906)
  __Pyx_RefNannySetupContext("cuGraphRemoveDependencies", 0);
  __pyx_cur_scope = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *)__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies(__pyx_ptype_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 27864, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __Pyx_TraceCall("cuGraphRemoveDependencies", __pyx_f[0], 27864, 0, __PYX_ERR(0, 27864, __pyx_L1_error));
  __pyx_cur_scope->__pyx_v_from_ = __pyx_v_from_;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_from_);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_from_);
  __pyx_cur_scope->__pyx_v_to = __pyx_v_to;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_to);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_to);

  /* "cuda/cuda.pyx":27898
 *     :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes`
 *     """
 *     to = [] if to is None else to             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_2 = (__pyx_cur_scope->__pyx_v_to == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_to);
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_to;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_to);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_to, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":27899
 *     """
 *     to = [] if to is None else to
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_1 = __pyx_pf_4cuda_4cuda_25cuGraphRemoveDependencies_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 27899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cuda/cuda.pyx":27900
 *     to = [] if to is None else to
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     from_ = [] if from_ is None else from_
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__904, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 27900, __pyx_L1_error)

    /* "cuda/cuda.pyx":27899
 *     """
 *     to = [] if to is None else to
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":27902
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 *     from_ = [] if from_ is None else from_             # <<<<<<<<<<<<<<
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")
 */
  __pyx_t_4 = (__pyx_cur_scope->__pyx_v_from_ == Py_None);
  if ((__pyx_t_4 != 0)) {
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_from_);
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_from_;
  }
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_from_);
  __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_from_, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":27903
 * 
 *     from_ = [] if from_ is None else from_
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  __pyx_t_3 = __pyx_pf_4cuda_4cuda_25cuGraphRemoveDependencies_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 27903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((!__pyx_t_4) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":27904
 *     from_ = [] if from_ is None else from_
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__905, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 27904, __pyx_L1_error)

    /* "cuda/cuda.pyx":27903
 * 
 *     from_ = [] if from_ is None else from_
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):             # <<<<<<<<<<<<<<
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")
 * 
 */
  }

  /* "cuda/cuda.pyx":27907
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_2 = (__pyx_v_hGraph == Py_None);
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (__pyx_t_4) {

    /* "cuda/cuda.pyx":27908
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27907
 * 
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":27909
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27910
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_phGraph = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cuda/cuda.pyx":27911
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27911, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));

    /* "cuda/cuda.pyx":27909
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":27913
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27914
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL
 */
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27914, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_5));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":27916
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL             # <<<<<<<<<<<<<<
 *     if len(from_) > 0:
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cfrom_ = NULL;

  /* "cuda/cuda.pyx":27917
 * 
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL
 *     if len(from_) > 0:             # <<<<<<<<<<<<<<
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_from_;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27917, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27918
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL
 *     if len(from_) > 0:
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cfrom_ is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_from_;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27918, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_cfrom_ = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":27919
 *     if len(from_) > 0:
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_cfrom_ == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":27920
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(from_)):
 */
      __pyx_t_3 = __pyx_cur_scope->__pyx_v_from_;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27920, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_n_u_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 27920, __pyx_L1_error)

      /* "cuda/cuda.pyx":27919
 *     if len(from_) > 0:
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":27922
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(from_)):             # <<<<<<<<<<<<<<
 *                 cfrom_[idx] = (<CUgraphNode>from_[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_from_;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27922, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":27923
 *         else:
 *             for idx in range(len(from_)):
 *                 cfrom_[idx] = (<CUgraphNode>from_[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode* cto = NULL
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_from_, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27923, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        (__pyx_v_cfrom_[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_7)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }

    /* "cuda/cuda.pyx":27917
 * 
 *     cdef ccuda.CUgraphNode* cfrom_ = NULL
 *     if len(from_) > 0:             # <<<<<<<<<<<<<<
 *         cfrom_ = <ccuda.CUgraphNode*> calloc(len(from_), sizeof(ccuda.CUgraphNode))
 *         if cfrom_ is NULL:
 */
  }

  /* "cuda/cuda.pyx":27925
 *                 cfrom_[idx] = (<CUgraphNode>from_[idx])._ptr[0]
 * 
 *     cdef ccuda.CUgraphNode* cto = NULL             # <<<<<<<<<<<<<<
 *     if len(to) > 0:
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))
 */
  __pyx_v_cto = NULL;

  /* "cuda/cuda.pyx":27926
 * 
 *     cdef ccuda.CUgraphNode* cto = NULL
 *     if len(to) > 0:             # <<<<<<<<<<<<<<
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:
 */
  __pyx_t_7 = __pyx_cur_scope->__pyx_v_to;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27926, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27927
 *     cdef ccuda.CUgraphNode* cto = NULL
 *     if len(to) > 0:
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))             # <<<<<<<<<<<<<<
 *         if cto is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 */
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_to;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27927, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_cto = ((CUgraphNode *)calloc(__pyx_t_6, (sizeof(CUgraphNode))));

    /* "cuda/cuda.pyx":27928
 *     if len(to) > 0:
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_cto == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":27929
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(ccuda.CUgraphNode)))             # <<<<<<<<<<<<<<
 *         else:
 *             for idx in range(len(to)):
 */
      __pyx_t_7 = __pyx_cur_scope->__pyx_v_to;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27929, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 27929, __pyx_L1_error)

      /* "cuda/cuda.pyx":27928
 *     if len(to) > 0:
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 */
    }

    /* "cuda/cuda.pyx":27931
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(ccuda.CUgraphNode)))
 *         else:
 *             for idx in range(len(to)):             # <<<<<<<<<<<<<<
 *                 cto[idx] = (<CUgraphNode>to[idx])._ptr[0]
 * 
 */
    /*else*/ {
      __pyx_t_1 = __pyx_cur_scope->__pyx_v_to;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27931, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __pyx_t_6;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_idx = __pyx_t_9;

        /* "cuda/cuda.pyx":27932
 *         else:
 *             for idx in range(len(to)):
 *                 cto[idx] = (<CUgraphNode>to[idx])._ptr[0]             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphRemoveDependencies(chGraph, (<CUgraphNode>from_[0])._ptr if len(from_) == 1 else cfrom_, (<CUgraphNode>to[0])._ptr if len(to) == 1 else cto, numDependencies)
 */
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_to, __pyx_v_idx, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27932, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        (__pyx_v_cto[__pyx_v_idx]) = (((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1)->_ptr[0]);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
    }

    /* "cuda/cuda.pyx":27926
 * 
 *     cdef ccuda.CUgraphNode* cto = NULL
 *     if len(to) > 0:             # <<<<<<<<<<<<<<
 *         cto = <ccuda.CUgraphNode*> calloc(len(to), sizeof(ccuda.CUgraphNode))
 *         if cto is NULL:
 */
  }

  /* "cuda/cuda.pyx":27934
 *                 cto[idx] = (<CUgraphNode>to[idx])._ptr[0]
 * 
 *     err = ccuda.cuGraphRemoveDependencies(chGraph, (<CUgraphNode>from_[0])._ptr if len(from_) == 1 else cfrom_, (<CUgraphNode>to[0])._ptr if len(to) == 1 else cto, numDependencies)             # <<<<<<<<<<<<<<
 *     if cfrom_ is not NULL:
 *         free(cfrom_)
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_from_;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27934, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_from_, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1)->_ptr;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __pyx_t_10 = __pyx_v_cfrom_;
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_to;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 27934, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (((__pyx_t_6 == 1) != 0)) {
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_to, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_1)->_ptr;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __pyx_t_11 = __pyx_v_cto;
  }
  __pyx_t_12 = __pyx_f_4cuda_5ccuda_cuGraphRemoveDependencies(__pyx_v_chGraph, __pyx_t_10, __pyx_t_11, __pyx_v_numDependencies); if (unlikely(__pyx_t_12 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27934, __pyx_L1_error)
  __pyx_v_err = __pyx_t_12;

  /* "cuda/cuda.pyx":27935
 * 
 *     err = ccuda.cuGraphRemoveDependencies(chGraph, (<CUgraphNode>from_[0])._ptr if len(from_) == 1 else cfrom_, (<CUgraphNode>to[0])._ptr if len(to) == 1 else cto, numDependencies)
 *     if cfrom_ is not NULL:             # <<<<<<<<<<<<<<
 *         free(cfrom_)
 *     if cto is not NULL:
 */
  __pyx_t_2 = ((__pyx_v_cfrom_ != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27936
 *     err = ccuda.cuGraphRemoveDependencies(chGraph, (<CUgraphNode>from_[0])._ptr if len(from_) == 1 else cfrom_, (<CUgraphNode>to[0])._ptr if len(to) == 1 else cto, numDependencies)
 *     if cfrom_ is not NULL:
 *         free(cfrom_)             # <<<<<<<<<<<<<<
 *     if cto is not NULL:
 *         free(cto)
 */
    free(__pyx_v_cfrom_);

    /* "cuda/cuda.pyx":27935
 * 
 *     err = ccuda.cuGraphRemoveDependencies(chGraph, (<CUgraphNode>from_[0])._ptr if len(from_) == 1 else cfrom_, (<CUgraphNode>to[0])._ptr if len(to) == 1 else cto, numDependencies)
 *     if cfrom_ is not NULL:             # <<<<<<<<<<<<<<
 *         free(cfrom_)
 *     if cto is not NULL:
 */
  }

  /* "cuda/cuda.pyx":27937
 *     if cfrom_ is not NULL:
 *         free(cfrom_)
 *     if cto is not NULL:             # <<<<<<<<<<<<<<
 *         free(cto)
 *     return (CUresult(err),)
 */
  __pyx_t_2 = ((__pyx_v_cto != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27938
 *         free(cfrom_)
 *     if cto is not NULL:
 *         free(cto)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
    free(__pyx_v_cto);

    /* "cuda/cuda.pyx":27937
 *     if cfrom_ is not NULL:
 *         free(cfrom_)
 *     if cto is not NULL:             # <<<<<<<<<<<<<<
 *         free(cto)
 *     return (CUresult(err),)
 */
  }

  /* "cuda/cuda.pyx":27939
 *     if cto is not NULL:
 *         free(cto)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_13 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_1 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_13, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27864
 * 
 * @cython.embedsignature(True)
 * def cuGraphRemoveDependencies(hGraph, from_ : List[CUgraphNode], to : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Removes dependency edges from a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cuda.cuda.cuGraphRemoveDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_25cuGraphRemoveDependencies_2generator34);
  __Pyx_XDECREF(__pyx_gb_4cuda_4cuda_25cuGraphRemoveDependencies_5generator35);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27942
 * 
 * @cython.embedsignature(True)
 * def cuGraphDestroyNode(hNode):             # <<<<<<<<<<<<<<
 *     """ Remove a node from the graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_567cuGraphDestroyNode(PyObject *__pyx_self, PyObject *__pyx_v_hNode); /*proto*/
static char __pyx_doc_4cuda_4cuda_566cuGraphDestroyNode[] = "cuGraphDestroyNode(hNode)\n Remove a node from the graph.\n\n    Removes `hNode` from its graph. This operation also severs any\n    dependencies of other nodes on `hNode` and vice versa.\n\n    Nodes which belong to a graph which contains allocation or free nodes\n    cannot be destroyed. Any attempt to do so will return an error.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node to remove\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_567cuGraphDestroyNode = {"cuGraphDestroyNode", (PyCFunction)__pyx_pw_4cuda_4cuda_567cuGraphDestroyNode, METH_O, __pyx_doc_4cuda_4cuda_566cuGraphDestroyNode};
static PyObject *__pyx_pw_4cuda_4cuda_567cuGraphDestroyNode(PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphDestroyNode (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_566cuGraphDestroyNode(__pyx_self, ((PyObject *)__pyx_v_hNode));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_566cuGraphDestroyNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__907)
  __Pyx_RefNannySetupContext("cuGraphDestroyNode", 0);
  __Pyx_TraceCall("cuGraphDestroyNode", __pyx_f[0], 27942, 0, __PYX_ERR(0, 27942, __pyx_L1_error));

  /* "cuda/cuda.pyx":27966
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":27967
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":27966
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27968
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":27969
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27969, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":27970
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27970, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":27968
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":27972
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":27973
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphDestroyNode(chNode)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 27973, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":27975
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     err = ccuda.cuGraphDestroyNode(chNode)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphDestroyNode(__pyx_v_chNode); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 27975, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":27976
 * 
 *     err = ccuda.cuGraphDestroyNode(chNode)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27942
 * 
 * @cython.embedsignature(True)
 * def cuGraphDestroyNode(hNode):             # <<<<<<<<<<<<<<
 *     """ Remove a node from the graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphDestroyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":27979
 * 
 * @cython.embedsignature(True)
 * def cuGraphInstantiate(hGraph, char* logBuffer, size_t bufferSize):             # <<<<<<<<<<<<<<
 *     """ Creates an executable graph from a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_569cuGraphInstantiate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_568cuGraphInstantiate[] = "cuGraphInstantiate(hGraph, char *logBuffer, size_t bufferSize)\n Creates an executable graph from a graph.\n\n    Instantiates `hGraph` as an executable graph. The graph is validated\n    for any structural constraints or intra-node constraints which were not\n    previously validated. If instantiation is successful, a handle to the\n    instantiated graph is returned in `phGraphExec`.\n\n    If there are any errors, diagnostic information may be returned in\n    `errorNode` and `logBuffer`. This is the primary way to inspect\n    instantiation errors. The output will be null terminated unless the\n    diagnostics overflow the buffer. In this case, they will be truncated,\n    and the last byte can be inspected to determine if truncation occurred.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to instantiate\n    logBuffer : bytes\n        A character buffer to store diagnostic messages\n    bufferSize : size_t\n        Size of the log buffer in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phGraphExec : :py:obj:`~.CUgraphExec`\n        Returns instantiated graph\n    phErrorNode : :py:obj:`~.CUgraphNode`\n        In case of an instantiation error, this may be modified to indicate\n        a node contributing to the error\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphInstantiateWithFlags`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphUpload`, :py:obj:`~.cuGraphLaunch`, :py:obj:`~.cuGraphExecDestroy`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_569cuGraphInstantiate = {"cuGraphInstantiate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_569cuGraphInstantiate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_568cuGraphInstantiate};
static PyObject *__pyx_pw_4cuda_4cuda_569cuGraphInstantiate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  char *__pyx_v_logBuffer;
  size_t __pyx_v_bufferSize;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphInstantiate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_logBuffer,&__pyx_n_s_bufferSize,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_logBuffer)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphInstantiate", 1, 3, 3, 1); __PYX_ERR(0, 27979, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bufferSize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphInstantiate", 1, 3, 3, 2); __PYX_ERR(0, 27979, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphInstantiate") < 0)) __PYX_ERR(0, 27979, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_logBuffer = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_logBuffer) && PyErr_Occurred())) __PYX_ERR(0, 27979, __pyx_L3_error)
    __pyx_v_bufferSize = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_bufferSize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 27979, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphInstantiate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27979, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphInstantiate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_568cuGraphInstantiate(__pyx_self, __pyx_v_hGraph, __pyx_v_logBuffer, __pyx_v_bufferSize);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_568cuGraphInstantiate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, char *__pyx_v_logBuffer, size_t __pyx_v_bufferSize) {
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_phGraphExec = 0;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_phErrorNode = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__908)
  __Pyx_RefNannySetupContext("cuGraphInstantiate", 0);
  __Pyx_TraceCall("cuGraphInstantiate", __pyx_f[0], 27979, 0, __PYX_ERR(0, 27979, __pyx_L1_error));

  /* "cuda/cuda.pyx":28017
 *     """
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28018
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28017
 *     """
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28019
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28020
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28021
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28021, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28019
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28023
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28024
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphExec phGraphExec = CUgraphExec()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28024, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28026
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphExec phGraphExec = CUgraphExec()             # <<<<<<<<<<<<<<
 *     cdef CUgraphNode phErrorNode = CUgraphNode()
 *     err = ccuda.cuGraphInstantiate(phGraphExec._ptr, chGraph, phErrorNode._ptr, logBuffer, bufferSize)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phGraphExec = ((struct __pyx_obj_4cuda_4cuda_CUgraphExec *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":28027
 * 
 *     cdef CUgraphExec phGraphExec = CUgraphExec()
 *     cdef CUgraphNode phErrorNode = CUgraphNode()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphInstantiate(phGraphExec._ptr, chGraph, phErrorNode._ptr, logBuffer, bufferSize)
 *     return (CUresult(err), phGraphExec, phErrorNode)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phErrorNode = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":28028
 *     cdef CUgraphExec phGraphExec = CUgraphExec()
 *     cdef CUgraphNode phErrorNode = CUgraphNode()
 *     err = ccuda.cuGraphInstantiate(phGraphExec._ptr, chGraph, phErrorNode._ptr, logBuffer, bufferSize)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphExec, phErrorNode)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphInstantiate(__pyx_v_phGraphExec->_ptr, __pyx_v_chGraph, __pyx_v_phErrorNode->_ptr, __pyx_v_logBuffer, __pyx_v_bufferSize); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28028, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":28029
 *     cdef CUgraphNode phErrorNode = CUgraphNode()
 *     err = ccuda.cuGraphInstantiate(phGraphExec._ptr, chGraph, phErrorNode._ptr, logBuffer, bufferSize)
 *     return (CUresult(err), phGraphExec, phErrorNode)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphExec));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphExec));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phGraphExec));
  __Pyx_INCREF(((PyObject *)__pyx_v_phErrorNode));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phErrorNode));
  PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_phErrorNode));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":27979
 * 
 * @cython.embedsignature(True)
 * def cuGraphInstantiate(hGraph, char* logBuffer, size_t bufferSize):             # <<<<<<<<<<<<<<
 *     """ Creates an executable graph from a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphInstantiate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphExec);
  __Pyx_XDECREF((PyObject *)__pyx_v_phErrorNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28032
 * 
 * @cython.embedsignature(True)
 * def cuGraphInstantiateWithFlags(hGraph, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Creates an executable graph from a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_571cuGraphInstantiateWithFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_570cuGraphInstantiateWithFlags[] = "cuGraphInstantiateWithFlags(hGraph, unsigned long long flags)\n Creates an executable graph from a graph.\n\n    Instantiates `hGraph` as an executable graph. The graph is validated\n    for any structural constraints or intra-node constraints which were not\n    previously validated. If instantiation is successful, a handle to the\n    instantiated graph is returned in `phGraphExec`.\n\n    The `flags` parameter controls the behavior of instantiation and\n    subsequent graph launches. Valid flags are:\n\n    - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH`, which\n      configures a graph containing memory allocation nodes to\n      automatically free any unfreed memory allocations before the graph is\n      relaunched.\n\n    - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY`, which\n      causes the graph to use the priorities from the per-node attributes\n      rather than the priority of the launch stream during execution. Note\n      that priorities are only available on kernel nodes, and are copied\n      from stream priority during stream capture.\n\n    If `hGraph` contains any allocation or free nodes, there can be at most\n    one executable graph in existence for that graph at a time.\n\n    An attempt to instantiate a second executable graph before destroying\n    the first with :py:obj:`~.cuGraphExecDestroy` will result in an error.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to instantiate\n    flags : unsigned long long\n        Flags to control instantiation. See\n        :py:obj:`~.CUgraphInstantiate_flags`.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phGraphExec : :py:obj:`~.CUgraphExec`\n        Returns instantiated graph\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphCre""ate`, :py:obj:`~.cuGraphUpload`, :py:obj:`~.cuGraphLaunch`, :py:obj:`~.cuGraphExecDestroy`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_571cuGraphInstantiateWithFlags = {"cuGraphInstantiateWithFlags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_571cuGraphInstantiateWithFlags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_570cuGraphInstantiateWithFlags};
static PyObject *__pyx_pw_4cuda_4cuda_571cuGraphInstantiateWithFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  unsigned PY_LONG_LONG __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphInstantiateWithFlags (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphInstantiateWithFlags", 1, 2, 2, 1); __PYX_ERR(0, 28032, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphInstantiateWithFlags") < 0)) __PYX_ERR(0, 28032, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v_flags == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28032, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphInstantiateWithFlags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28032, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphInstantiateWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_570cuGraphInstantiateWithFlags(__pyx_self, __pyx_v_hGraph, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_570cuGraphInstantiateWithFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphExec *__pyx_v_phGraphExec = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__909)
  __Pyx_RefNannySetupContext("cuGraphInstantiateWithFlags", 0);
  __Pyx_TraceCall("cuGraphInstantiateWithFlags", __pyx_f[0], 28032, 0, __PYX_ERR(0, 28032, __pyx_L1_error));

  /* "cuda/cuda.pyx":28080
 *     """
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28081
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28080
 *     """
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28082
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28083
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28084
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28084, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28082
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28086
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28087
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphExec phGraphExec = CUgraphExec()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28087, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28089
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     cdef CUgraphExec phGraphExec = CUgraphExec()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphInstantiateWithFlags(phGraphExec._ptr, chGraph, flags)
 *     return (CUresult(err), phGraphExec)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phGraphExec = ((struct __pyx_obj_4cuda_4cuda_CUgraphExec *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":28090
 * 
 *     cdef CUgraphExec phGraphExec = CUgraphExec()
 *     err = ccuda.cuGraphInstantiateWithFlags(phGraphExec._ptr, chGraph, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phGraphExec)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphInstantiateWithFlags(__pyx_v_phGraphExec->_ptr, __pyx_v_chGraph, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28090, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":28091
 *     cdef CUgraphExec phGraphExec = CUgraphExec()
 *     err = ccuda.cuGraphInstantiateWithFlags(phGraphExec._ptr, chGraph, flags)
 *     return (CUresult(err), phGraphExec)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_phGraphExec));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phGraphExec));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phGraphExec));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28032
 * 
 * @cython.embedsignature(True)
 * def cuGraphInstantiateWithFlags(hGraph, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Creates an executable graph from a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphInstantiateWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF((PyObject *)__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28094
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a kernel node in the given graphExec.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_573cuGraphExecKernelNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_572cuGraphExecKernelNodeSetParams[] = "cuGraphExecKernelNodeSetParams(hGraphExec, hNode, CUDA_KERNEL_NODE_PARAMS nodeParams: CUDA_KERNEL_NODE_PARAMS)\n Sets the parameters for a kernel node in the given graphExec.\n\n    Sets the parameters of a kernel node in an executable graph\n    `hGraphExec`. The node is identified by the corresponding node `hNode`\n    in the non-executable graph, from which the executable graph was\n    instantiated.\n\n    `hNode` must not have been removed from the original graph. All\n    `nodeParams` fields may change, but the following restrictions apply to\n    `func` updates:\n\n    - The owning context of the function cannot change.\n\n    - A node whose function originally did not use CUDA dynamic parallelism\n      cannot be updated to a function which uses CDP\n\n    The modifications only affect future launches of `hGraphExec`. Already\n    enqueued or running launches of `hGraphExec` are not affected by this\n    call. `hNode` is also not modified by this call.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The executable graph in which to set the specified node\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        kernel node from the graph from which graphExec was instantiated\n    nodeParams : :py:obj:`~.CUDA_KERNEL_NODE_PARAMS`\n        Updated Parameters to set\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:""obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_573cuGraphExecKernelNodeSetParams = {"cuGraphExecKernelNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_573cuGraphExecKernelNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_572cuGraphExecKernelNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_573cuGraphExecKernelNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExecKernelNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hNode,&__pyx_n_s_nodeParams,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecKernelNodeSetParams", 1, 3, 3, 1); __PYX_ERR(0, 28094, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecKernelNodeSetParams", 1, 3, 3, 2); __PYX_ERR(0, 28094, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExecKernelNodeSetParams") < 0)) __PYX_ERR(0, 28094, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hNode = values[1];
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExecKernelNodeSetParams", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28094, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 28094, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_572cuGraphExecKernelNodeSetParams(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_572cuGraphExecKernelNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUDA_KERNEL_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_KERNEL_NODE_PARAMS_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__910)
  __Pyx_RefNannySetupContext("cuGraphExecKernelNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphExecKernelNodeSetParams", __pyx_f[0], 28094, 0, __PYX_ERR(0, 28094, __pyx_L1_error));

  /* "cuda/cuda.pyx":28134
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28135
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28134
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28136
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28137
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28138
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28138, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28136
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28140
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28141
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28141, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28144
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28145
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28144
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28146
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28147
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28148
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28148, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28146
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28150
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28151
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28151, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28153
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphExecKernelNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28153, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 28153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":28154
 * 
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExecKernelNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphExecKernelNodeSetParams(__pyx_v_chGraphExec, __pyx_v_chNode, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28154, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":28155
 *     cdef ccuda.CUDA_KERNEL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExecKernelNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 28155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28094
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a kernel node in the given graphExec.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28158
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams : CUDA_MEMCPY3D, ctx):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a memcpy node in the given graphExec.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_575cuGraphExecMemcpyNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_574cuGraphExecMemcpyNodeSetParams[] = "cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, CUDA_MEMCPY3D copyParams: CUDA_MEMCPY3D, ctx)\n Sets the parameters for a memcpy node in the given graphExec.\n\n    Updates the work represented by `hNode` in `hGraphExec` as though\n    `hNode` had contained `copyParams` at instantiation. hNode must remain\n    in the graph which was used to instantiate `hGraphExec`. Changed edges\n    to and from hNode are ignored.\n\n    The source and destination memory in `copyParams` must be allocated\n    from the same contexts as the original source and destination memory.\n    Both the instantiation-time memory operands and the memory operands in\n    `copyParams` must be 1-dimensional. Zero-length operations are not\n    supported.\n\n    The modifications only affect future launches of `hGraphExec`. Already\n    enqueued or running launches of `hGraphExec` are not affected by this\n    call. hNode is also not modified by this call.\n\n    Returns CUDA_ERROR_INVALID_VALUE if the memory operands' mappings\n    changed or either the original or new memory operands are\n    multidimensional.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The executable graph in which to set the specified node\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Memcpy node from the graph which was used to instantiate graphExec\n    copyParams : :py:obj:`~.CUDA_MEMCPY3D`\n        The updated parameters to set\n    ctx : :py:obj:`~.CUcontext`\n        Context on which to run the node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEve""ntRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_575cuGraphExecMemcpyNodeSetParams = {"cuGraphExecMemcpyNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_575cuGraphExecMemcpyNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_574cuGraphExecMemcpyNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_575cuGraphExecMemcpyNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_copyParams = 0;
  PyObject *__pyx_v_ctx = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExecMemcpyNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hNode,&__pyx_n_s_copyParams,&__pyx_n_s_ctx_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecMemcpyNodeSetParams", 1, 4, 4, 1); __PYX_ERR(0, 28158, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_copyParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecMemcpyNodeSetParams", 1, 4, 4, 2); __PYX_ERR(0, 28158, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ctx_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecMemcpyNodeSetParams", 1, 4, 4, 3); __PYX_ERR(0, 28158, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExecMemcpyNodeSetParams") < 0)) __PYX_ERR(0, 28158, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hNode = values[1];
    __pyx_v_copyParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *)values[2]);
    __pyx_v_ctx = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExecMemcpyNodeSetParams", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28158, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_copyParams), __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D, 1, "copyParams", 0))) __PYX_ERR(0, 28158, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_574cuGraphExecMemcpyNodeSetParams(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_copyParams, __pyx_v_ctx);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_574cuGraphExecMemcpyNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D *__pyx_v_copyParams, PyObject *__pyx_v_ctx) {
  CUcontext __pyx_v_cctx;
  PyObject *__pyx_v_pctx = NULL;
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUDA_MEMCPY3D *__pyx_v_ccopyParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_MEMCPY3D_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__911)
  __Pyx_RefNannySetupContext("cuGraphExecMemcpyNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphExecMemcpyNodeSetParams", __pyx_f[0], 28158, 0, __PYX_ERR(0, 28158, __pyx_L1_error));

  /* "cuda/cuda.pyx":28201
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_ctx == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28202
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 */
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28201
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28203
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ctx, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28204
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pctx = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28205
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 *     else:
 *         pctx = int(CUcontext(ctx))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28205, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28203
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28207
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 *         pctx = int(CUcontext(ctx))             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pctx = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28208
 *     else:
 *         pctx = int(CUcontext(ctx))
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode chNode
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28208, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28211
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28212
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28211
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28213
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28214
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28215
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28215, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28213
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28217
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28218
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28218, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28221
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28222
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28221
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":28223
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28224
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28225
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28225, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28223
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":28227
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28228
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_MEMCPY3D* ccopyParams_ptr = copyParams._ptr if copyParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28228, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":28230
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     cdef ccuda.CUDA_MEMCPY3D* ccopyParams_ptr = copyParams._ptr if copyParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphExecMemcpyNodeSetParams(chGraphExec, chNode, ccopyParams_ptr, cctx)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_copyParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28230, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 28230, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_copyParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_ccopyParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":28231
 * 
 *     cdef ccuda.CUDA_MEMCPY3D* ccopyParams_ptr = copyParams._ptr if copyParams != None else NULL
 *     err = ccuda.cuGraphExecMemcpyNodeSetParams(chGraphExec, chNode, ccopyParams_ptr, cctx)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphExecMemcpyNodeSetParams(__pyx_v_chGraphExec, __pyx_v_chNode, __pyx_v_ccopyParams_ptr, __pyx_v_cctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28231, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":28232
 *     cdef ccuda.CUDA_MEMCPY3D* ccopyParams_ptr = copyParams._ptr if copyParams != None else NULL
 *     err = ccuda.cuGraphExecMemcpyNodeSetParams(chGraphExec, chNode, ccopyParams_ptr, cctx)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 28232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28158
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams : CUDA_MEMCPY3D, ctx):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a memcpy node in the given graphExec.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pctx);
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28235
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams : CUDA_MEMSET_NODE_PARAMS, ctx):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a memset node in the given graphExec.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_577cuGraphExecMemsetNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_576cuGraphExecMemsetNodeSetParams[] = "cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, CUDA_MEMSET_NODE_PARAMS memsetParams: CUDA_MEMSET_NODE_PARAMS, ctx)\n Sets the parameters for a memset node in the given graphExec.\n\n    Updates the work represented by `hNode` in `hGraphExec` as though\n    `hNode` had contained `memsetParams` at instantiation. hNode must\n    remain in the graph which was used to instantiate `hGraphExec`. Changed\n    edges to and from hNode are ignored.\n\n    The destination memory in `memsetParams` must be allocated from the\n    same contexts as the original destination memory. Both the\n    instantiation-time memory operand and the memory operand in\n    `memsetParams` must be 1-dimensional. Zero-length operations are not\n    supported.\n\n    The modifications only affect future launches of `hGraphExec`. Already\n    enqueued or running launches of `hGraphExec` are not affected by this\n    call. hNode is also not modified by this call.\n\n    Returns CUDA_ERROR_INVALID_VALUE if the memory operand's mappings\n    changed or either the original or new memory operand are\n    multidimensional.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The executable graph in which to set the specified node\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Memset node from the graph which was used to instantiate graphExec\n    memsetParams : :py:obj:`~.CUDA_MEMSET_NODE_PARAMS`\n        The updated parameters to set\n    ctx : :py:obj:`~.CUcontext`\n        Context on which to run the node\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddMemsetNode`, :py:obj:`~.cuGraphMemsetNodeSetParams`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~"".cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_577cuGraphExecMemsetNodeSetParams = {"cuGraphExecMemsetNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_577cuGraphExecMemsetNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_576cuGraphExecMemsetNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_577cuGraphExecMemsetNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *__pyx_v_memsetParams = 0;
  PyObject *__pyx_v_ctx = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExecMemsetNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hNode,&__pyx_n_s_memsetParams,&__pyx_n_s_ctx_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecMemsetNodeSetParams", 1, 4, 4, 1); __PYX_ERR(0, 28235, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memsetParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecMemsetNodeSetParams", 1, 4, 4, 2); __PYX_ERR(0, 28235, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ctx_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecMemsetNodeSetParams", 1, 4, 4, 3); __PYX_ERR(0, 28235, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExecMemsetNodeSetParams") < 0)) __PYX_ERR(0, 28235, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hNode = values[1];
    __pyx_v_memsetParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *)values[2]);
    __pyx_v_ctx = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExecMemsetNodeSetParams", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28235, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_memsetParams), __pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS, 1, "memsetParams", 0))) __PYX_ERR(0, 28235, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_576cuGraphExecMemsetNodeSetParams(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_memsetParams, __pyx_v_ctx);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_576cuGraphExecMemsetNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS *__pyx_v_memsetParams, PyObject *__pyx_v_ctx) {
  CUcontext __pyx_v_cctx;
  PyObject *__pyx_v_pctx = NULL;
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUDA_MEMSET_NODE_PARAMS *__pyx_v_cmemsetParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_MEMSET_NODE_PARAMS_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__912)
  __Pyx_RefNannySetupContext("cuGraphExecMemsetNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphExecMemsetNodeSetParams", __pyx_f[0], 28235, 0, __PYX_ERR(0, 28235, __pyx_L1_error));

  /* "cuda/cuda.pyx":28278
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_ctx == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28279
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 */
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28278
 *     """
 *     cdef ccuda.CUcontext cctx
 *     if ctx is None:             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28280
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ctx, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28281
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pctx = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28282
 *     elif isinstance(ctx, (CUcontext)):
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 *     else:
 *         pctx = int(CUcontext(ctx))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28282, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28280
 *     if ctx is None:
 *         cctx = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(ctx, (CUcontext)):             # <<<<<<<<<<<<<<
 *         pctx = int(ctx)
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28284
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 *     else:
 *         pctx = int(CUcontext(ctx))             # <<<<<<<<<<<<<<
 *         cctx = <ccuda.CUcontext><void_ptr>pctx
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_ctx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pctx = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28285
 *     else:
 *         pctx = int(CUcontext(ctx))
 *         cctx = <ccuda.CUcontext><void_ptr>pctx             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode chNode
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pctx); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28285, __pyx_L1_error)
    __pyx_v_cctx = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28288
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28289
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28288
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28290
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28291
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28292
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28292, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28290
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28294
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28295
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28295, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28298
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28299
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28298
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":28300
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28301
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28302
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28302, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28300
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":28304
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28305
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cmemsetParams_ptr = memsetParams._ptr if memsetParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28305, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":28307
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cmemsetParams_ptr = memsetParams._ptr if memsetParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphExecMemsetNodeSetParams(chGraphExec, chNode, cmemsetParams_ptr, cctx)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_memsetParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28307, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 28307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_memsetParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cmemsetParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":28308
 * 
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cmemsetParams_ptr = memsetParams._ptr if memsetParams != None else NULL
 *     err = ccuda.cuGraphExecMemsetNodeSetParams(chGraphExec, chNode, cmemsetParams_ptr, cctx)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphExecMemsetNodeSetParams(__pyx_v_chGraphExec, __pyx_v_chNode, __pyx_v_cmemsetParams_ptr, __pyx_v_cctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28308, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":28309
 *     cdef ccuda.CUDA_MEMSET_NODE_PARAMS* cmemsetParams_ptr = memsetParams._ptr if memsetParams != None else NULL
 *     err = ccuda.cuGraphExecMemsetNodeSetParams(chGraphExec, chNode, cmemsetParams_ptr, cctx)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 28309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28235
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams : CUDA_MEMSET_NODE_PARAMS, ctx):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a memset node in the given graphExec.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pctx);
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28312
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a host node in the given graphExec.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_579cuGraphExecHostNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_578cuGraphExecHostNodeSetParams[] = "cuGraphExecHostNodeSetParams(hGraphExec, hNode, CUDA_HOST_NODE_PARAMS nodeParams: CUDA_HOST_NODE_PARAMS)\n Sets the parameters for a host node in the given graphExec.\n\n    Updates the work represented by `hNode` in `hGraphExec` as though\n    `hNode` had contained `nodeParams` at instantiation. hNode must remain\n    in the graph which was used to instantiate `hGraphExec`. Changed edges\n    to and from hNode are ignored.\n\n    The modifications only affect future launches of `hGraphExec`. Already\n    enqueued or running launches of `hGraphExec` are not affected by this\n    call. hNode is also not modified by this call.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The executable graph in which to set the specified node\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Host node from the graph which was used to instantiate graphExec\n    nodeParams : :py:obj:`~.CUDA_HOST_NODE_PARAMS`\n        The updated parameters to set\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphHostNodeSetParams`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_579cuGraphExecHostNodeSetParams = {"cuGraphExecHostNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_579cuGraphExecHostNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_578cuGraphExecHostNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_579cuGraphExecHostNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExecHostNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hNode,&__pyx_n_s_nodeParams,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecHostNodeSetParams", 1, 3, 3, 1); __PYX_ERR(0, 28312, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecHostNodeSetParams", 1, 3, 3, 2); __PYX_ERR(0, 28312, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExecHostNodeSetParams") < 0)) __PYX_ERR(0, 28312, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hNode = values[1];
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExecHostNodeSetParams", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28312, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 28312, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_578cuGraphExecHostNodeSetParams(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_578cuGraphExecHostNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUDA_HOST_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_HOST_NODE_PARAMS_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__913)
  __Pyx_RefNannySetupContext("cuGraphExecHostNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphExecHostNodeSetParams", __pyx_f[0], 28312, 0, __PYX_ERR(0, 28312, __pyx_L1_error));

  /* "cuda/cuda.pyx":28343
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28344
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28343
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28345
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28346
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28347
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28347, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28345
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28349
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28350
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28350, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28353
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28354
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28353
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28355
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28356
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28357
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28357, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28355
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28359
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28360
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28360, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28362
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphExecHostNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28362, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 28362, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":28363
 * 
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExecHostNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphExecHostNodeSetParams(__pyx_v_chGraphExec, __pyx_v_chNode, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28363, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":28364
 *     cdef ccuda.CUDA_HOST_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExecHostNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 28364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28312
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a host node in the given graphExec.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28367
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph):             # <<<<<<<<<<<<<<
 *     """ Updates node parameters in the child graph node in the given graphExec.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_581cuGraphExecChildGraphNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_580cuGraphExecChildGraphNodeSetParams[] = "cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph)\n Updates node parameters in the child graph node in the given graphExec.\n\n    Updates the work represented by `hNode` in `hGraphExec` as though the\n    nodes contained in `hNode's` graph had the parameters contained in\n    `childGraph's` nodes at instantiation. `hNode` must remain in the graph\n    which was used to instantiate `hGraphExec`. Changed edges to and from\n    `hNode` are ignored.\n\n    The modifications only affect future launches of `hGraphExec`. Already\n    enqueued or running launches of `hGraphExec` are not affected by this\n    call. `hNode` is also not modified by this call.\n\n    The topology of `childGraph`, as well as the node insertion order, must\n    match that of the graph contained in `hNode`. See\n    :py:obj:`~.cuGraphExecUpdate()` for a list of restrictions on what can\n    be updated in an instantiated graph. The update is recursive, so child\n    graph nodes contained within the top level child graph will also be\n    updated.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The executable graph in which to set the specified node\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Host node from the graph which was used to instantiate graphExec\n    childGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        The graph supplying the updated parameters\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphChildGraphNodeGetGraph`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecE""xternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_581cuGraphExecChildGraphNodeSetParams = {"cuGraphExecChildGraphNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_581cuGraphExecChildGraphNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_580cuGraphExecChildGraphNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_581cuGraphExecChildGraphNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hNode = 0;
  PyObject *__pyx_v_childGraph = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExecChildGraphNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hNode,&__pyx_n_s_childGraph,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecChildGraphNodeSetParams", 1, 3, 3, 1); __PYX_ERR(0, 28367, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_childGraph)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecChildGraphNodeSetParams", 1, 3, 3, 2); __PYX_ERR(0, 28367, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExecChildGraphNodeSetParams") < 0)) __PYX_ERR(0, 28367, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hNode = values[1];
    __pyx_v_childGraph = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExecChildGraphNodeSetParams", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28367, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecChildGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_580cuGraphExecChildGraphNodeSetParams(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_childGraph);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_580cuGraphExecChildGraphNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, PyObject *__pyx_v_childGraph) {
  CUgraph __pyx_v_cchildGraph;
  PyObject *__pyx_v_pchildGraph = NULL;
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__914)
  __Pyx_RefNannySetupContext("cuGraphExecChildGraphNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphExecChildGraphNodeSetParams", __pyx_f[0], 28367, 0, __PYX_ERR(0, 28367, __pyx_L1_error));

  /* "cuda/cuda.pyx":28406
 *     """
 *     cdef ccuda.CUgraph cchildGraph
 *     if childGraph is None:             # <<<<<<<<<<<<<<
 *         cchildGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(childGraph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_childGraph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28407
 *     cdef ccuda.CUgraph cchildGraph
 *     if childGraph is None:
 *         cchildGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(childGraph, (CUgraph)):
 *         pchildGraph = int(childGraph)
 */
    __pyx_v_cchildGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28406
 *     """
 *     cdef ccuda.CUgraph cchildGraph
 *     if childGraph is None:             # <<<<<<<<<<<<<<
 *         cchildGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(childGraph, (CUgraph)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28408
 *     if childGraph is None:
 *         cchildGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(childGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         pchildGraph = int(childGraph)
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_childGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28409
 *         cchildGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(childGraph, (CUgraph)):
 *         pchildGraph = int(childGraph)             # <<<<<<<<<<<<<<
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_childGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pchildGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28410
 *     elif isinstance(childGraph, (CUgraph)):
 *         pchildGraph = int(childGraph)
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph             # <<<<<<<<<<<<<<
 *     else:
 *         pchildGraph = int(CUgraph(childGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pchildGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28410, __pyx_L1_error)
    __pyx_v_cchildGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28408
 *     if childGraph is None:
 *         cchildGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(childGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         pchildGraph = int(childGraph)
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28412
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph
 *     else:
 *         pchildGraph = int(CUgraph(childGraph))             # <<<<<<<<<<<<<<
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_childGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pchildGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28413
 *     else:
 *         pchildGraph = int(CUgraph(childGraph))
 *         cchildGraph = <ccuda.CUgraph><void_ptr>pchildGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode chNode
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pchildGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28413, __pyx_L1_error)
    __pyx_v_cchildGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28416
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28417
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28416
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28418
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28419
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28420
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28420, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28418
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28422
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28423
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28423, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28426
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28427
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28426
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":28428
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28429
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28430
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28430, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28428
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":28432
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28433
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphExecChildGraphNodeSetParams(chGraphExec, chNode, cchildGraph)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28433, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":28435
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     err = ccuda.cuGraphExecChildGraphNodeSetParams(chGraphExec, chNode, cchildGraph)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphExecChildGraphNodeSetParams(__pyx_v_chGraphExec, __pyx_v_chNode, __pyx_v_cchildGraph); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28435, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":28436
 * 
 *     err = ccuda.cuGraphExecChildGraphNodeSetParams(chGraphExec, chNode, cchildGraph)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28367
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph):             # <<<<<<<<<<<<<<
 *     """ Updates node parameters in the child graph node in the given graphExec.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecChildGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pchildGraph);
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28439
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets the event for an event record node in the given graphExec.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_583cuGraphExecEventRecordNodeSetEvent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_582cuGraphExecEventRecordNodeSetEvent[] = "cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)\n Sets the event for an event record node in the given graphExec.\n\n    Sets the event of an event record node in an executable graph\n    `hGraphExec`. The node is identified by the corresponding node `hNode`\n    in the non-executable graph, from which the executable graph was\n    instantiated.\n\n    The modifications only affect future launches of `hGraphExec`. Already\n    enqueued or running launches of `hGraphExec` are not affected by this\n    call. `hNode` is also not modified by this call.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The executable graph in which to set the specified node\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        event record node from the graph from which graphExec was\n        instantiated\n    event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Updated event to use\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphEventRecordNodeGetEvent`, :py:obj:`~.cuGraphEventWaitNodeSetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_583cuGraphExecEventRecordNodeSetEvent = {"cuGraphExecEventRecordNodeSetEvent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_583cuGraphExecEventRecordNodeSetEvent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_582cuGraphExecEventRecordNodeSetEvent};
static PyObject *__pyx_pw_4cuda_4cuda_583cuGraphExecEventRecordNodeSetEvent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hNode = 0;
  PyObject *__pyx_v_event = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExecEventRecordNodeSetEvent (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hNode,&__pyx_n_s_event_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecEventRecordNodeSetEvent", 1, 3, 3, 1); __PYX_ERR(0, 28439, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecEventRecordNodeSetEvent", 1, 3, 3, 2); __PYX_ERR(0, 28439, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExecEventRecordNodeSetEvent") < 0)) __PYX_ERR(0, 28439, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hNode = values[1];
    __pyx_v_event = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExecEventRecordNodeSetEvent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28439, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_582cuGraphExecEventRecordNodeSetEvent(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_582cuGraphExecEventRecordNodeSetEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, PyObject *__pyx_v_event) {
  CUevent __pyx_v_cevent;
  PyObject *__pyx_v_pevent = NULL;
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__915)
  __Pyx_RefNannySetupContext("cuGraphExecEventRecordNodeSetEvent", 0);
  __Pyx_TraceCall("cuGraphExecEventRecordNodeSetEvent", __pyx_f[0], 28439, 0, __PYX_ERR(0, 28439, __pyx_L1_error));

  /* "cuda/cuda.pyx":28471
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_event == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28472
 *     cdef ccuda.CUevent cevent
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 */
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28471
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28473
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_event, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28474
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pevent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28475
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 *     else:
 *         pevent = int(CUevent(event))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28475, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28473
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28477
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 *         pevent = int(CUevent(event))             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pevent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28478
 *     else:
 *         pevent = int(CUevent(event))
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode chNode
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28478, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28481
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28482
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28481
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28483
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28484
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28485
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28485, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28483
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28487
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28488
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28488, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28491
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28492
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28491
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":28493
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28494
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28495
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28495, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28493
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":28497
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28498
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphExecEventRecordNodeSetEvent(chGraphExec, chNode, cevent)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28498, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":28500
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     err = ccuda.cuGraphExecEventRecordNodeSetEvent(chGraphExec, chNode, cevent)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphExecEventRecordNodeSetEvent(__pyx_v_chGraphExec, __pyx_v_chNode, __pyx_v_cevent); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28500, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":28501
 * 
 *     err = ccuda.cuGraphExecEventRecordNodeSetEvent(chGraphExec, chNode, cevent)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28439
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets the event for an event record node in the given graphExec.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pevent);
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28504
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets the event for an event wait node in the given graphExec.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_585cuGraphExecEventWaitNodeSetEvent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_584cuGraphExecEventWaitNodeSetEvent[] = "cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)\n Sets the event for an event wait node in the given graphExec.\n\n    Sets the event of an event wait node in an executable graph\n    `hGraphExec`. The node is identified by the corresponding node `hNode`\n    in the non-executable graph, from which the executable graph was\n    instantiated.\n\n    The modifications only affect future launches of `hGraphExec`. Already\n    enqueued or running launches of `hGraphExec` are not affected by this\n    call. `hNode` is also not modified by this call.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The executable graph in which to set the specified node\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        event wait node from the graph from which graphExec was\n        instantiated\n    event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t`\n        Updated event to use\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphEventWaitNodeGetEvent`, :py:obj:`~.cuGraphEventRecordNodeSetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_585cuGraphExecEventWaitNodeSetEvent = {"cuGraphExecEventWaitNodeSetEvent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_585cuGraphExecEventWaitNodeSetEvent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_584cuGraphExecEventWaitNodeSetEvent};
static PyObject *__pyx_pw_4cuda_4cuda_585cuGraphExecEventWaitNodeSetEvent(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hNode = 0;
  PyObject *__pyx_v_event = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExecEventWaitNodeSetEvent (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hNode,&__pyx_n_s_event_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecEventWaitNodeSetEvent", 1, 3, 3, 1); __PYX_ERR(0, 28504, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecEventWaitNodeSetEvent", 1, 3, 3, 2); __PYX_ERR(0, 28504, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExecEventWaitNodeSetEvent") < 0)) __PYX_ERR(0, 28504, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hNode = values[1];
    __pyx_v_event = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExecEventWaitNodeSetEvent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28504, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_584cuGraphExecEventWaitNodeSetEvent(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_584cuGraphExecEventWaitNodeSetEvent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, PyObject *__pyx_v_event) {
  CUevent __pyx_v_cevent;
  PyObject *__pyx_v_pevent = NULL;
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__916)
  __Pyx_RefNannySetupContext("cuGraphExecEventWaitNodeSetEvent", 0);
  __Pyx_TraceCall("cuGraphExecEventWaitNodeSetEvent", __pyx_f[0], 28504, 0, __PYX_ERR(0, 28504, __pyx_L1_error));

  /* "cuda/cuda.pyx":28536
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
  __pyx_t_1 = (__pyx_v_event == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28537
 *     cdef ccuda.CUevent cevent
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 */
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28536
 *     """
 *     cdef ccuda.CUevent cevent
 *     if event is None:             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28538
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_event, __pyx_ptype_4cuda_4cuda_CUevent); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28539
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pevent = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28540
 *     elif isinstance(event, (CUevent)):
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 *     else:
 *         pevent = int(CUevent(event))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28540, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28538
 *     if event is None:
 *         cevent = <ccuda.CUevent><void_ptr>0
 *     elif isinstance(event, (CUevent)):             # <<<<<<<<<<<<<<
 *         pevent = int(event)
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28542
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 *     else:
 *         pevent = int(CUevent(event))             # <<<<<<<<<<<<<<
 *         cevent = <ccuda.CUevent><void_ptr>pevent
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pevent = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28543
 *     else:
 *         pevent = int(CUevent(event))
 *         cevent = <ccuda.CUevent><void_ptr>pevent             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode chNode
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pevent); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28543, __pyx_L1_error)
    __pyx_v_cevent = ((CUevent)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28546
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28547
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28546
 * 
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28548
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28549
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28550
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28550, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28548
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28552
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28553
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28553, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28556
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28557
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28556
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":28558
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28559
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28560
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28560, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28558
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":28562
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28563
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphExecEventWaitNodeSetEvent(chGraphExec, chNode, cevent)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28563, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":28565
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     err = ccuda.cuGraphExecEventWaitNodeSetEvent(chGraphExec, chNode, cevent)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphExecEventWaitNodeSetEvent(__pyx_v_chGraphExec, __pyx_v_chNode, __pyx_v_cevent); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28565, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":28566
 * 
 *     err = ccuda.cuGraphExecEventWaitNodeSetEvent(chGraphExec, chNode, cevent)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28504
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets the event for an event wait node in the given graphExec.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pevent);
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28569
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for an external semaphore signal node in the given graphExec.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_587cuGraphExecExternalSemaphoresSignalNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_586cuGraphExecExternalSemaphoresSignalNodeSetParams[] = "cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS nodeParams: CUDA_EXT_SEM_SIGNAL_NODE_PARAMS)\n Sets the parameters for an external semaphore signal node in the given graphExec.\n\n    Sets the parameters of an external semaphore signal node in an\n    executable graph `hGraphExec`. The node is identified by the\n    corresponding node `hNode` in the non-executable graph, from which the\n    executable graph was instantiated.\n\n    `hNode` must not have been removed from the original graph.\n\n    The modifications only affect future launches of `hGraphExec`. Already\n    enqueued or running launches of `hGraphExec` are not affected by this\n    call. `hNode` is also not modified by this call.\n\n    Changing `nodeParams->numExtSems` is not supported.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The executable graph in which to set the specified node\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        semaphore signal node from the graph from which graphExec was\n        instantiated\n    nodeParams : :py:obj:`~.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS`\n        Updated Parameters to set\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphIn""stantiate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_587cuGraphExecExternalSemaphoresSignalNodeSetParams = {"cuGraphExecExternalSemaphoresSignalNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_587cuGraphExecExternalSemaphoresSignalNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_586cuGraphExecExternalSemaphoresSignalNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_587cuGraphExecExternalSemaphoresSignalNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExecExternalSemaphoresSignalNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hNode,&__pyx_n_s_nodeParams,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecExternalSemaphoresSignalNodeSetParams", 1, 3, 3, 1); __PYX_ERR(0, 28569, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecExternalSemaphoresSignalNodeSetParams", 1, 3, 3, 2); __PYX_ERR(0, 28569, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExecExternalSemaphoresSignalNodeSetParams") < 0)) __PYX_ERR(0, 28569, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hNode = values[1];
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExecExternalSemaphoresSignalNodeSetParams", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28569, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 28569, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_586cuGraphExecExternalSemaphoresSignalNodeSetParams(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_586cuGraphExecExternalSemaphoresSignalNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_nodeParams) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__917)
  __Pyx_RefNannySetupContext("cuGraphExecExternalSemaphoresSignalNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_f[0], 28569, 0, __PYX_ERR(0, 28569, __pyx_L1_error));

  /* "cuda/cuda.pyx":28605
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28606
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28605
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28607
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28608
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28609
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28609, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28607
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28611
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28612
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28612, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28615
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28616
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28615
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28617
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28618
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28619
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28619, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28617
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28621
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28622
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28622, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28624
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphExecExternalSemaphoresSignalNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28624, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 28624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":28625
 * 
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExecExternalSemaphoresSignalNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphExecExternalSemaphoresSignalNodeSetParams(__pyx_v_chGraphExec, __pyx_v_chNode, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28625, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":28626
 *     cdef ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExecExternalSemaphoresSignalNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 28626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28569
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for an external semaphore signal node in the given graphExec.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28629
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for an external semaphore wait node in the given graphExec.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_589cuGraphExecExternalSemaphoresWaitNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_588cuGraphExecExternalSemaphoresWaitNodeSetParams[] = "cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS nodeParams: CUDA_EXT_SEM_WAIT_NODE_PARAMS)\n Sets the parameters for an external semaphore wait node in the given graphExec.\n\n    Sets the parameters of an external semaphore wait node in an executable\n    graph `hGraphExec`. The node is identified by the corresponding node\n    `hNode` in the non-executable graph, from which the executable graph\n    was instantiated.\n\n    `hNode` must not have been removed from the original graph.\n\n    The modifications only affect future launches of `hGraphExec`. Already\n    enqueued or running launches of `hGraphExec` are not affected by this\n    call. `hNode` is also not modified by this call.\n\n    Changing `nodeParams->numExtSems` is not supported.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The executable graph in which to set the specified node\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        semaphore wait node from the graph from which graphExec was\n        instantiated\n    nodeParams : :py:obj:`~.CUDA_EXT_SEM_WAIT_NODE_PARAMS`\n        Updated Parameters to set\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate`""\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_589cuGraphExecExternalSemaphoresWaitNodeSetParams = {"cuGraphExecExternalSemaphoresWaitNodeSetParams", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_589cuGraphExecExternalSemaphoresWaitNodeSetParams, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_588cuGraphExecExternalSemaphoresWaitNodeSetParams};
static PyObject *__pyx_pw_4cuda_4cuda_589cuGraphExecExternalSemaphoresWaitNodeSetParams(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hNode = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_nodeParams = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExecExternalSemaphoresWaitNodeSetParams (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hNode,&__pyx_n_s_nodeParams,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecExternalSemaphoresWaitNodeSetParams", 1, 3, 3, 1); __PYX_ERR(0, 28629, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeParams)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecExternalSemaphoresWaitNodeSetParams", 1, 3, 3, 2); __PYX_ERR(0, 28629, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExecExternalSemaphoresWaitNodeSetParams") < 0)) __PYX_ERR(0, 28629, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hNode = values[1];
    __pyx_v_nodeParams = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExecExternalSemaphoresWaitNodeSetParams", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28629, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nodeParams), __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS, 1, "nodeParams", 0))) __PYX_ERR(0, 28629, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_588cuGraphExecExternalSemaphoresWaitNodeSetParams(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_588cuGraphExecExternalSemaphoresWaitNodeSetParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_nodeParams) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_cnodeParams_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__918)
  __Pyx_RefNannySetupContext("cuGraphExecExternalSemaphoresWaitNodeSetParams", 0);
  __Pyx_TraceCall("cuGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_f[0], 28629, 0, __PYX_ERR(0, 28629, __pyx_L1_error));

  /* "cuda/cuda.pyx":28665
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28666
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28665
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28667
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28668
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28669
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28669, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28667
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28671
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28672
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28672, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28675
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28676
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28675
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28677
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28678
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28679
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28679, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28677
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28681
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28682
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28682, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28684
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphExecExternalSemaphoresWaitNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_nodeParams), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28684, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 28684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_nodeParams->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cnodeParams_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":28685
 * 
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExecExternalSemaphoresWaitNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphExecExternalSemaphoresWaitNodeSetParams(__pyx_v_chGraphExec, __pyx_v_chNode, __pyx_v_cnodeParams_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28685, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":28686
 *     cdef ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cnodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL
 *     err = ccuda.cuGraphExecExternalSemaphoresWaitNodeSetParams(chGraphExec, chNode, cnodeParams_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 28686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28629
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for an external semaphore wait node in the given graphExec.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28689
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled):             # <<<<<<<<<<<<<<
 *     """ Enables or disables the specified node in the given graphExec.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_591cuGraphNodeSetEnabled(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_590cuGraphNodeSetEnabled[] = "cuGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled)\n Enables or disables the specified node in the given graphExec.\n\n    Sets `hNode` to be either enabled or disabled. Disabled nodes are\n    functionally equivalent to empty nodes until they are reenabled.\n    Existing node parameters are not affected by disabling/enabling the\n    node.\n\n    The node is identified by the corresponding node `hNode` in the non-\n    executable graph, from which the executable graph was instantiated.\n\n    `hNode` must not have been removed from the original graph.\n\n    The modifications only affect future launches of `hGraphExec`. Already\n    enqueued or running launches of `hGraphExec` are not affected by this\n    call. `hNode` is also not modified by this call.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The executable graph in which to set the specified node\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node from the graph from which graphExec was instantiated\n    isEnabled : unsigned int\n        Node is enabled if != 0, otherwise the node is disabled\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphNodeGetEnabled`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` :py:obj:`~.cuGraphLaunch`\n\n    Notes\n    -----\n    Currently only kernel, memset and memcpy nodes are supported.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_591cuGraphNodeSetEnabled = {"cuGraphNodeSetEnabled", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_591cuGraphNodeSetEnabled, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_590cuGraphNodeSetEnabled};
static PyObject *__pyx_pw_4cuda_4cuda_591cuGraphNodeSetEnabled(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hNode = 0;
  unsigned int __pyx_v_isEnabled;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphNodeSetEnabled (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hNode,&__pyx_n_s_isEnabled,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphNodeSetEnabled", 1, 3, 3, 1); __PYX_ERR(0, 28689, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isEnabled)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphNodeSetEnabled", 1, 3, 3, 2); __PYX_ERR(0, 28689, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphNodeSetEnabled") < 0)) __PYX_ERR(0, 28689, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hNode = values[1];
    __pyx_v_isEnabled = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_isEnabled == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 28689, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphNodeSetEnabled", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28689, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphNodeSetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_590cuGraphNodeSetEnabled(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_590cuGraphNodeSetEnabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode, unsigned int __pyx_v_isEnabled) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__919)
  __Pyx_RefNannySetupContext("cuGraphNodeSetEnabled", 0);
  __Pyx_TraceCall("cuGraphNodeSetEnabled", __pyx_f[0], 28689, 0, __PYX_ERR(0, 28689, __pyx_L1_error));

  /* "cuda/cuda.pyx":28729
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28730
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28729
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28731
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28732
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28733
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28733, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28731
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28735
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28736
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28736, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28739
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28740
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28739
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28741
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28742
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28743
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28743, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28741
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28745
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28746
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphNodeSetEnabled(chGraphExec, chNode, isEnabled)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28746, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28748
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     err = ccuda.cuGraphNodeSetEnabled(chGraphExec, chNode, isEnabled)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphNodeSetEnabled(__pyx_v_chGraphExec, __pyx_v_chNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28748, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":28749
 * 
 *     err = ccuda.cuGraphNodeSetEnabled(chGraphExec, chNode, isEnabled)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28689
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled):             # <<<<<<<<<<<<<<
 *     """ Enables or disables the specified node in the given graphExec.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphNodeSetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28752
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetEnabled(hGraphExec, hNode):             # <<<<<<<<<<<<<<
 *     """ Query whether a node in the given graphExec is enabled.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_593cuGraphNodeGetEnabled(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_592cuGraphNodeGetEnabled[] = "cuGraphNodeGetEnabled(hGraphExec, hNode)\n Query whether a node in the given graphExec is enabled.\n\n    Sets isEnabled to 1 if `hNode` is enabled, or 0 if `hNode` is disabled.\n\n    The node is identified by the corresponding node `hNode` in the non-\n    executable graph, from which the executable graph was instantiated.\n\n    `hNode` must not have been removed from the original graph.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The executable graph in which to set the specified node\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Node from the graph from which graphExec was instantiated\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`,\n    isEnabled : unsigned int\n        Location to return the enabled status of the node\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphNodeSetEnabled`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` :py:obj:`~.cuGraphLaunch`\n\n    Notes\n    -----\n    Currently only kernel, memset and memcpy nodes are supported.\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_593cuGraphNodeGetEnabled = {"cuGraphNodeGetEnabled", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_593cuGraphNodeGetEnabled, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_592cuGraphNodeGetEnabled};
static PyObject *__pyx_pw_4cuda_4cuda_593cuGraphNodeGetEnabled(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hNode = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphNodeGetEnabled (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hNode,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphNodeGetEnabled", 1, 2, 2, 1); __PYX_ERR(0, 28752, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphNodeGetEnabled") < 0)) __PYX_ERR(0, 28752, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hNode = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphNodeGetEnabled", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28752, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphNodeGetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_592cuGraphNodeGetEnabled(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hNode);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_592cuGraphNodeGetEnabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hNode) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  unsigned int __pyx_v_isEnabled;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__920)
  __Pyx_RefNannySetupContext("cuGraphNodeGetEnabled", 0);
  __Pyx_TraceCall("cuGraphNodeGetEnabled", __pyx_f[0], 28752, 0, __PYX_ERR(0, 28752, __pyx_L1_error));

  /* "cuda/cuda.pyx":28785
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28786
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28785
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28787
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28788
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28789
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28789, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28787
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28791
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28792
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28792, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28795
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28796
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28795
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28797
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28798
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28799
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28799, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28797
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28801
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28802
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     cdef unsigned int isEnabled = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28802, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28804
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     cdef unsigned int isEnabled = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphNodeGetEnabled(chGraphExec, chNode, &isEnabled)
 *     return (CUresult(err), isEnabled)
 */
  __pyx_v_isEnabled = 0;

  /* "cuda/cuda.pyx":28805
 * 
 *     cdef unsigned int isEnabled = 0
 *     err = ccuda.cuGraphNodeGetEnabled(chGraphExec, chNode, &isEnabled)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), isEnabled)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphNodeGetEnabled(__pyx_v_chGraphExec, __pyx_v_chNode, (&__pyx_v_isEnabled)); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28805, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":28806
 *     cdef unsigned int isEnabled = 0
 *     err = ccuda.cuGraphNodeGetEnabled(chGraphExec, chNode, &isEnabled)
 *     return (CUresult(err), isEnabled)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_isEnabled); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28752
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetEnabled(hGraphExec, hNode):             # <<<<<<<<<<<<<<
 *     """ Query whether a node in the given graphExec is enabled.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphNodeGetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28809
 * 
 * @cython.embedsignature(True)
 * def cuGraphUpload(hGraphExec, hStream):             # <<<<<<<<<<<<<<
 *     """ Uploads an executable graph in a stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_595cuGraphUpload(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_594cuGraphUpload[] = "cuGraphUpload(hGraphExec, hStream)\n Uploads an executable graph in a stream.\n\n    Uploads `hGraphExec` to the device in `hStream` without executing it.\n    Uploads of the same `hGraphExec` will be serialized. Each upload is\n    ordered behind both any previous work in `hStream` and any previous\n    launches of `hGraphExec`. Uses memory cached by `stream` to back the\n    allocations owned by `hGraphExec`.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        Executable graph to upload\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream in which to upload the graph\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphLaunch`, :py:obj:`~.cuGraphExecDestroy`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_595cuGraphUpload = {"cuGraphUpload", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_595cuGraphUpload, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_594cuGraphUpload};
static PyObject *__pyx_pw_4cuda_4cuda_595cuGraphUpload(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphUpload (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hStream_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphUpload", 1, 2, 2, 1); __PYX_ERR(0, 28809, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphUpload") < 0)) __PYX_ERR(0, 28809, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hStream = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphUpload", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28809, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphUpload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_594cuGraphUpload(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_594cuGraphUpload(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__921)
  __Pyx_RefNannySetupContext("cuGraphUpload", 0);
  __Pyx_TraceCall("cuGraphUpload", __pyx_f[0], 28809, 0, __PYX_ERR(0, 28809, __pyx_L1_error));

  /* "cuda/cuda.pyx":28835
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28836
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28835
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28837
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28838
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28839
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28839, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28837
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28841
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28842
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28842, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28845
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28846
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28845
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28847
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28848
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28849
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28849, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28847
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28851
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28852
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphUpload(chGraphExec, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28852, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28854
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     err = ccuda.cuGraphUpload(chGraphExec, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphUpload(__pyx_v_chGraphExec, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28854, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":28855
 * 
 *     err = ccuda.cuGraphUpload(chGraphExec, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28809
 * 
 * @cython.embedsignature(True)
 * def cuGraphUpload(hGraphExec, hStream):             # <<<<<<<<<<<<<<
 *     """ Uploads an executable graph in a stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphUpload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28858
 * 
 * @cython.embedsignature(True)
 * def cuGraphLaunch(hGraphExec, hStream):             # <<<<<<<<<<<<<<
 *     """ Launches an executable graph in a stream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_597cuGraphLaunch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_596cuGraphLaunch[] = "cuGraphLaunch(hGraphExec, hStream)\n Launches an executable graph in a stream.\n\n    Executes `hGraphExec` in `hStream`. Only one instance of `hGraphExec`\n    may be executing at a time. Each launch is ordered behind both any\n    previous work in `hStream` and any previous launches of `hGraphExec`.\n    To execute a graph concurrently, it must be instantiated multiple times\n    into multiple executable graphs.\n\n    If any allocations created by `hGraphExec` remain unfreed (from a\n    previous launch) and `hGraphExec` was not instantiated with\n    :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH`, the launch\n    will fail with :py:obj:`~.CUDA_ERROR_INVALID_VALUE`.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        Executable graph to launch\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream in which to launch the graph\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphUpload`, :py:obj:`~.cuGraphExecDestroy`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_597cuGraphLaunch = {"cuGraphLaunch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_597cuGraphLaunch, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_596cuGraphLaunch};
static PyObject *__pyx_pw_4cuda_4cuda_597cuGraphLaunch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphLaunch (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hStream_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphLaunch", 1, 2, 2, 1); __PYX_ERR(0, 28858, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphLaunch") < 0)) __PYX_ERR(0, 28858, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hStream = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphLaunch", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28858, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_596cuGraphLaunch(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_596cuGraphLaunch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__922)
  __Pyx_RefNannySetupContext("cuGraphLaunch", 0);
  __Pyx_TraceCall("cuGraphLaunch", __pyx_f[0], 28858, 0, __PYX_ERR(0, 28858, __pyx_L1_error));

  /* "cuda/cuda.pyx":28889
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28890
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28889
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28891
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28892
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28893
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28893, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28891
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28895
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28896
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28896, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28899
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28900
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28899
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28901
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28902
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28903
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28903, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28901
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":28905
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28906
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphLaunch(chGraphExec, chStream)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28906, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":28908
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     err = ccuda.cuGraphLaunch(chGraphExec, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphLaunch(__pyx_v_chGraphExec, __pyx_v_chStream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28908, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":28909
 * 
 *     err = ccuda.cuGraphLaunch(chGraphExec, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28858
 * 
 * @cython.embedsignature(True)
 * def cuGraphLaunch(hGraphExec, hStream):             # <<<<<<<<<<<<<<
 *     """ Launches an executable graph in a stream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28912
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecDestroy(hGraphExec):             # <<<<<<<<<<<<<<
 *     """ Destroys an executable graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_599cuGraphExecDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec); /*proto*/
static char __pyx_doc_4cuda_4cuda_598cuGraphExecDestroy[] = "cuGraphExecDestroy(hGraphExec)\n Destroys an executable graph.\n\n    Destroys the executable graph specified by `hGraphExec`, as well as all\n    of its executable nodes. If the executable graph is in-flight, it will\n    not be terminated, but rather freed asynchronously on completion.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        Executable graph to destroy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphUpload`, :py:obj:`~.cuGraphLaunch`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_599cuGraphExecDestroy = {"cuGraphExecDestroy", (PyCFunction)__pyx_pw_4cuda_4cuda_599cuGraphExecDestroy, METH_O, __pyx_doc_4cuda_4cuda_598cuGraphExecDestroy};
static PyObject *__pyx_pw_4cuda_4cuda_599cuGraphExecDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExecDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_598cuGraphExecDestroy(__pyx_self, ((PyObject *)__pyx_v_hGraphExec));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_598cuGraphExecDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec) {
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__923)
  __Pyx_RefNannySetupContext("cuGraphExecDestroy", 0);
  __Pyx_TraceCall("cuGraphExecDestroy", __pyx_f[0], 28912, 0, __PYX_ERR(0, 28912, __pyx_L1_error));

  /* "cuda/cuda.pyx":28934
 *     """
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28935
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28934
 *     """
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28936
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28937
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28938
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28938, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28936
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28940
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28941
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphExecDestroy(chGraphExec)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28941, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28943
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     err = ccuda.cuGraphExecDestroy(chGraphExec)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphExecDestroy(__pyx_v_chGraphExec); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28943, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":28944
 * 
 *     err = ccuda.cuGraphExecDestroy(chGraphExec)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28912
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecDestroy(hGraphExec):             # <<<<<<<<<<<<<<
 *     """ Destroys an executable graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28947
 * 
 * @cython.embedsignature(True)
 * def cuGraphDestroy(hGraph):             # <<<<<<<<<<<<<<
 *     """ Destroys a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_601cuGraphDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hGraph); /*proto*/
static char __pyx_doc_4cuda_4cuda_600cuGraphDestroy[] = "cuGraphDestroy(hGraph)\n Destroys a graph.\n\n    Destroys the graph specified by `hGraph`, as well as all of its nodes.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        Graph to destroy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_601cuGraphDestroy = {"cuGraphDestroy", (PyCFunction)__pyx_pw_4cuda_4cuda_601cuGraphDestroy, METH_O, __pyx_doc_4cuda_4cuda_600cuGraphDestroy};
static PyObject *__pyx_pw_4cuda_4cuda_601cuGraphDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hGraph) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_600cuGraphDestroy(__pyx_self, ((PyObject *)__pyx_v_hGraph));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_600cuGraphDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph) {
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__924)
  __Pyx_RefNannySetupContext("cuGraphDestroy", 0);
  __Pyx_TraceCall("cuGraphDestroy", __pyx_f[0], 28947, 0, __PYX_ERR(0, 28947, __pyx_L1_error));

  /* "cuda/cuda.pyx":28967
 *     """
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":28968
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":28967
 *     """
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28969
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":28970
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":28971
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28971, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":28969
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":28973
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":28974
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphDestroy(chGraph)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 28974, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":28976
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     err = ccuda.cuGraphDestroy(chGraph)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphDestroy(__pyx_v_chGraph); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 28976, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":28977
 * 
 *     err = ccuda.cuGraphDestroy(chGraph)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28947
 * 
 * @cython.embedsignature(True)
 * def cuGraphDestroy(hGraph):             # <<<<<<<<<<<<<<
 *     """ Destroys a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":28980
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecUpdate(hGraphExec, hGraph):             # <<<<<<<<<<<<<<
 *     """ Check whether an executable graph can be updated with a graph and perform the update if possible.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_603cuGraphExecUpdate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_602cuGraphExecUpdate[] = "cuGraphExecUpdate(hGraphExec, hGraph)\n Check whether an executable graph can be updated with a graph and perform the update if possible.\n\n    Updates the node parameters in the instantiated graph specified by\n    `hGraphExec` with the node parameters in a topologically identical\n    graph specified by `hGraph`.\n\n    Limitations:\n\n    - Kernel nodes:\n\n      - The owning context of the function cannot change.\n\n      - A node whose function originally did not use CUDA dynamic\n        parallelism cannot be updated to a function which uses CDP.\n\n      - A cooperative node cannot be updated to a non-cooperative node, and\n        vice-versa.\n\n      - If the graph was instantiated with\n        CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY, the priority\n        attribute cannot change. Equality is checked on the originally\n        requested priority values, before they are clamped to the device's\n        supported range.\n\n    - Memset and memcpy nodes:\n\n      - The CUDA device(s) to which the operand(s) was allocated/mapped\n        cannot change.\n\n      - The source/destination memory must be allocated from the same\n        contexts as the original source/destination memory.\n\n      - Only 1D memsets can be changed.\n\n    - Additional memcpy node restrictions:\n\n      - Changing either the source or destination memory type(i.e.\n        CU_MEMORYTYPE_DEVICE, CU_MEMORYTYPE_ARRAY, etc.) is not supported.\n\n    - External semaphore wait nodes and record nodes:\n\n      - Changing the number of semaphores is not supported.\n\n    Note: The API may add further restrictions in future releases. The\n    return code should always be checked.\n\n    cuGraphExecUpdate sets `updateResult_out` to\n    CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED under the following\n    conditions:\n\n    - The count of nodes directly in `hGraphExec` and `hGraph` differ, in\n      which case `hErrorNode_out` is NULL.\n\n    - A node is deleted in `hGraph` but not not it""s pair from `hGraphExec`,\n      in which case `hErrorNode_out` is NULL.\n\n    - A node is deleted in `hGraphExec` but not its pair from `hGraph`, in\n      which case `hErrorNode_out` is the pairless node from `hGraph`.\n\n    - The dependent nodes of a pair differ, in which case `hErrorNode_out`\n      is the node from `hGraph`.\n\n    cuGraphExecUpdate sets `updateResult_out` to:\n\n    - CU_GRAPH_EXEC_UPDATE_ERROR if passed an invalid value.\n\n    - CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED if the graph topology\n      changed\n\n    - CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED if the type of a node\n      changed, in which case `hErrorNode_out` is set to the node from\n      `hGraph`.\n\n    - CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE if the\n      function changed in an unsupported way(see note above), in which case\n      `hErrorNode_out` is set to the node from `hGraph`\n\n    - CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED if any parameters to a\n      node changed in a way that is not supported, in which case\n      `hErrorNode_out` is set to the node from `hGraph`.\n\n    - CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED if any attributes of a\n      node changed in a way that is not supported, in which case\n      `hErrorNode_out` is set to the node from `hGraph`.\n\n    - CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED if something about a node is\n      unsupported, like the node's type or configuration, in which case\n      `hErrorNode_out` is set to the node from `hGraph`\n\n    If `updateResult_out` isn't set in one of the situations described\n    above, the update check passes and cuGraphExecUpdate updates\n    `hGraphExec` to match the contents of `hGraph`. If an error happens\n    during the update, `updateResult_out` will be set to\n    CU_GRAPH_EXEC_UPDATE_ERROR; otherwise, `updateResult_out` is set to\n    CU_GRAPH_EXEC_UPDATE_SUCCESS.\n\n    cuGraphExecUpdate returns CUDA_SUCCESS when the updated was performed\n    successfully. It"" returns CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE if the\n    graph update was not performed because it included changes which\n    violated constraints specific to instantiated graph update.\n\n    Parameters\n    ----------\n    hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t`\n        The instantiated graph to be updated\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        The graph containing the updated parameters\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE`,\n    hErrorNode_out : :py:obj:`~.CUgraphNode`\n        The node which caused the permissibility check to forbid the\n        update, if any\n    updateResult_out : :py:obj:`~.CUgraphExecUpdateResult`\n        Whether the graph update was permitted. If was forbidden, the\n        reason why\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphInstantiate`,\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_603cuGraphExecUpdate = {"cuGraphExecUpdate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_603cuGraphExecUpdate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_602cuGraphExecUpdate};
static PyObject *__pyx_pw_4cuda_4cuda_603cuGraphExecUpdate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraphExec = 0;
  PyObject *__pyx_v_hGraph = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphExecUpdate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraphExec,&__pyx_n_s_hGraph,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraphExec)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphExecUpdate", 1, 2, 2, 1); __PYX_ERR(0, 28980, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphExecUpdate") < 0)) __PYX_ERR(0, 28980, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hGraphExec = values[0];
    __pyx_v_hGraph = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphExecUpdate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28980, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecUpdate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_602cuGraphExecUpdate(__pyx_self, __pyx_v_hGraphExec, __pyx_v_hGraph);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_602cuGraphExecUpdate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraphExec, PyObject *__pyx_v_hGraph) {
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  CUgraphExec __pyx_v_chGraphExec;
  PyObject *__pyx_v_phGraphExec = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphNode *__pyx_v_hErrorNode_out = 0;
  CUgraphExecUpdateResult __pyx_v_updateResult_out;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__925)
  __Pyx_RefNannySetupContext("cuGraphExecUpdate", 0);
  __Pyx_TraceCall("cuGraphExecUpdate", __pyx_f[0], 28980, 0, __PYX_ERR(0, 28980, __pyx_L1_error));

  /* "cuda/cuda.pyx":29105
 *     """
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29106
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29105
 *     """
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29107
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29108
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29109
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29109, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29107
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29111
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29112
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29112, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29115
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
  __pyx_t_1 = (__pyx_v_hGraphExec == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29116
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 */
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29115
 * 
 *     cdef ccuda.CUgraphExec chGraphExec
 *     if hGraphExec is None:             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29117
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraphExec, __pyx_ptype_4cuda_4cuda_CUgraphExec); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29118
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phGraphExec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29119
 *     elif isinstance(hGraphExec, (CUgraphExec)):
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29119, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29117
 *     if hGraphExec is None:
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>0
 *     elif isinstance(hGraphExec, (CUgraphExec)):             # <<<<<<<<<<<<<<
 *         phGraphExec = int(hGraphExec)
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29121
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))             # <<<<<<<<<<<<<<
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), __pyx_v_hGraphExec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phGraphExec = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29122
 *     else:
 *         phGraphExec = int(CUgraphExec(hGraphExec))
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphNode hErrorNode_out = CUgraphNode()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraphExec); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29122, __pyx_L1_error)
    __pyx_v_chGraphExec = ((CUgraphExec)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":29124
 *         chGraphExec = <ccuda.CUgraphExec><void_ptr>phGraphExec
 * 
 *     cdef CUgraphNode hErrorNode_out = CUgraphNode()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUgraphExecUpdateResult updateResult_out
 *     err = ccuda.cuGraphExecUpdate(chGraphExec, chGraph, hErrorNode_out._ptr, &updateResult_out)
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_hErrorNode_out = ((struct __pyx_obj_4cuda_4cuda_CUgraphNode *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":29126
 *     cdef CUgraphNode hErrorNode_out = CUgraphNode()
 *     cdef ccuda.CUgraphExecUpdateResult updateResult_out
 *     err = ccuda.cuGraphExecUpdate(chGraphExec, chGraph, hErrorNode_out._ptr, &updateResult_out)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), hErrorNode_out, CUgraphExecUpdateResult(updateResult_out))
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphExecUpdate(__pyx_v_chGraphExec, __pyx_v_chGraph, __pyx_v_hErrorNode_out->_ptr, (&__pyx_v_updateResult_out)); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29126, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29127
 *     cdef ccuda.CUgraphExecUpdateResult updateResult_out
 *     err = ccuda.cuGraphExecUpdate(chGraphExec, chGraph, hErrorNode_out._ptr, &updateResult_out)
 *     return (CUresult(err), hErrorNode_out, CUgraphExecUpdateResult(updateResult_out))             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUgraphExecUpdateResult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_enum__CUgraphExecUpdateResult_enum(__pyx_v_updateResult_out); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_hErrorNode_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_hErrorNode_out));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_hErrorNode_out));
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":28980
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecUpdate(hGraphExec, hGraph):             # <<<<<<<<<<<<<<
 *     """ Check whether an executable graph can be updated with a graph and perform the update if possible.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphExecUpdate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XDECREF(__pyx_v_phGraphExec);
  __Pyx_XDECREF((PyObject *)__pyx_v_hErrorNode_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29130
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeCopyAttributes(dst, src):             # <<<<<<<<<<<<<<
 *     """ Copies attributes from source node to destination node.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_605cuGraphKernelNodeCopyAttributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_604cuGraphKernelNodeCopyAttributes[] = "cuGraphKernelNodeCopyAttributes(dst, src)\n Copies attributes from source node to destination node.\n\n    Copies attributes from source node `src` to destination node `dst`.\n    Both node must have the same context.\n\n    Parameters\n    ----------\n    dst : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Destination node\n    src : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n        Source node For list of attributes see\n        :py:obj:`~.CUkernelNodeAttrID`\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.CUaccessPolicyWindow`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_605cuGraphKernelNodeCopyAttributes = {"cuGraphKernelNodeCopyAttributes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_605cuGraphKernelNodeCopyAttributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_604cuGraphKernelNodeCopyAttributes};
static PyObject *__pyx_pw_4cuda_4cuda_605cuGraphKernelNodeCopyAttributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dst = 0;
  PyObject *__pyx_v_src = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphKernelNodeCopyAttributes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dst_2,&__pyx_n_s_src,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dst_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_src)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphKernelNodeCopyAttributes", 1, 2, 2, 1); __PYX_ERR(0, 29130, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphKernelNodeCopyAttributes") < 0)) __PYX_ERR(0, 29130, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_dst = values[0];
    __pyx_v_src = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphKernelNodeCopyAttributes", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29130, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphKernelNodeCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_604cuGraphKernelNodeCopyAttributes(__pyx_self, __pyx_v_dst, __pyx_v_src);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_604cuGraphKernelNodeCopyAttributes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
  CUgraphNode __pyx_v_csrc;
  PyObject *__pyx_v_psrc = NULL;
  CUgraphNode __pyx_v_cdst;
  PyObject *__pyx_v_pdst = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__926)
  __Pyx_RefNannySetupContext("cuGraphKernelNodeCopyAttributes", 0);
  __Pyx_TraceCall("cuGraphKernelNodeCopyAttributes", __pyx_f[0], 29130, 0, __PYX_ERR(0, 29130, __pyx_L1_error));

  /* "cuda/cuda.pyx":29154
 *     """
 *     cdef ccuda.CUgraphNode csrc
 *     if src is None:             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(src, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_src == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29155
 *     cdef ccuda.CUgraphNode csrc
 *     if src is None:
 *         csrc = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(src, (CUgraphNode)):
 *         psrc = int(src)
 */
    __pyx_v_csrc = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29154
 *     """
 *     cdef ccuda.CUgraphNode csrc
 *     if src is None:             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(src, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29156
 *     if src is None:
 *         csrc = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(src, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         psrc = int(src)
 *         csrc = <ccuda.CUgraphNode><void_ptr>psrc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_src, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29157
 *         csrc = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(src, (CUgraphNode)):
 *         psrc = int(src)             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUgraphNode><void_ptr>psrc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_src); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psrc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29158
 *     elif isinstance(src, (CUgraphNode)):
 *         psrc = int(src)
 *         csrc = <ccuda.CUgraphNode><void_ptr>psrc             # <<<<<<<<<<<<<<
 *     else:
 *         psrc = int(CUgraphNode(src))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29158, __pyx_L1_error)
    __pyx_v_csrc = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29156
 *     if src is None:
 *         csrc = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(src, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         psrc = int(src)
 *         csrc = <ccuda.CUgraphNode><void_ptr>psrc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29160
 *         csrc = <ccuda.CUgraphNode><void_ptr>psrc
 *     else:
 *         psrc = int(CUgraphNode(src))             # <<<<<<<<<<<<<<
 *         csrc = <ccuda.CUgraphNode><void_ptr>psrc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_src); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psrc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29161
 *     else:
 *         psrc = int(CUgraphNode(src))
 *         csrc = <ccuda.CUgraphNode><void_ptr>psrc             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphNode cdst
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psrc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29161, __pyx_L1_error)
    __pyx_v_csrc = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29164
 * 
 *     cdef ccuda.CUgraphNode cdst
 *     if dst is None:             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(dst, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_dst == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29165
 *     cdef ccuda.CUgraphNode cdst
 *     if dst is None:
 *         cdst = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dst, (CUgraphNode)):
 *         pdst = int(dst)
 */
    __pyx_v_cdst = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29164
 * 
 *     cdef ccuda.CUgraphNode cdst
 *     if dst is None:             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(dst, (CUgraphNode)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29166
 *     if dst is None:
 *         cdst = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(dst, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         pdst = int(dst)
 *         cdst = <ccuda.CUgraphNode><void_ptr>pdst
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dst, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29167
 *         cdst = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(dst, (CUgraphNode)):
 *         pdst = int(dst)             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUgraphNode><void_ptr>pdst
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdst = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29168
 *     elif isinstance(dst, (CUgraphNode)):
 *         pdst = int(dst)
 *         cdst = <ccuda.CUgraphNode><void_ptr>pdst             # <<<<<<<<<<<<<<
 *     else:
 *         pdst = int(CUgraphNode(dst))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdst); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29168, __pyx_L1_error)
    __pyx_v_cdst = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29166
 *     if dst is None:
 *         cdst = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(dst, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         pdst = int(dst)
 *         cdst = <ccuda.CUgraphNode><void_ptr>pdst
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29170
 *         cdst = <ccuda.CUgraphNode><void_ptr>pdst
 *     else:
 *         pdst = int(CUgraphNode(dst))             # <<<<<<<<<<<<<<
 *         cdst = <ccuda.CUgraphNode><void_ptr>pdst
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_dst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdst = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29171
 *     else:
 *         pdst = int(CUgraphNode(dst))
 *         cdst = <ccuda.CUgraphNode><void_ptr>pdst             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphKernelNodeCopyAttributes(cdst, csrc)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdst); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29171, __pyx_L1_error)
    __pyx_v_cdst = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":29173
 *         cdst = <ccuda.CUgraphNode><void_ptr>pdst
 * 
 *     err = ccuda.cuGraphKernelNodeCopyAttributes(cdst, csrc)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphKernelNodeCopyAttributes(__pyx_v_cdst, __pyx_v_csrc); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29173, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29174
 * 
 *     err = ccuda.cuGraphKernelNodeCopyAttributes(cdst, csrc)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29130
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeCopyAttributes(dst, src):             # <<<<<<<<<<<<<<
 *     """ Copies attributes from source node to destination node.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphKernelNodeCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psrc);
  __Pyx_XDECREF(__pyx_v_pdst);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29177
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeGetAttribute(hNode, attr not None : CUkernelNodeAttrID):             # <<<<<<<<<<<<<<
 *     """ Queries node attribute.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_607cuGraphKernelNodeGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_606cuGraphKernelNodeGetAttribute[] = "cuGraphKernelNodeGetAttribute(hNode, attr: CUkernelNodeAttrID)\n Queries node attribute.\n\n    Queries attribute `attr` from node `hNode` and stores it in\n    corresponding member of `value_out`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n\n    attr : :py:obj:`~.CUkernelNodeAttrID`\n\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n    value_out : :py:obj:`~.CUkernelNodeAttrValue`\n\n\n    See Also\n    --------\n    :py:obj:`~.CUaccessPolicyWindow`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_607cuGraphKernelNodeGetAttribute = {"cuGraphKernelNodeGetAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_607cuGraphKernelNodeGetAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_606cuGraphKernelNodeGetAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_607cuGraphKernelNodeGetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  PyObject *__pyx_v_attr = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphKernelNodeGetAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_attr,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphKernelNodeGetAttribute", 1, 2, 2, 1); __PYX_ERR(0, 29177, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphKernelNodeGetAttribute") < 0)) __PYX_ERR(0, 29177, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hNode = values[0];
    __pyx_v_attr = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphKernelNodeGetAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29177, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphKernelNodeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attr) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attr"); __PYX_ERR(0, 29177, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_606cuGraphKernelNodeGetAttribute(__pyx_self, __pyx_v_hNode, __pyx_v_attr);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_606cuGraphKernelNodeGetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, PyObject *__pyx_v_attr) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUkernelNodeAttrID __pyx_v_cattr;
  struct __pyx_obj_4cuda_4cuda_CUkernelNodeAttrValue *__pyx_v_value_out = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUkernelNodeAttrID __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__927)
  __Pyx_RefNannySetupContext("cuGraphKernelNodeGetAttribute", 0);
  __Pyx_TraceCall("cuGraphKernelNodeGetAttribute", __pyx_f[0], 29177, 0, __PYX_ERR(0, 29177, __pyx_L1_error));

  /* "cuda/cuda.pyx":29202
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29203
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29202
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29204
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29205
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29206
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29206, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29204
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29208
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29209
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUkernelNodeAttrID cattr = attr.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29209, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29211
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef ccuda.CUkernelNodeAttrID cattr = attr.value             # <<<<<<<<<<<<<<
 *     cdef CUkernelNodeAttrValue value_out = CUkernelNodeAttrValue()
 *     err = ccuda.cuGraphKernelNodeGetAttribute(chNode, cattr, value_out._ptr)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUlaunchAttributeID_enum)__Pyx_PyInt_As_enum__CUlaunchAttributeID_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 29211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattr = __pyx_t_6;

  /* "cuda/cuda.pyx":29212
 * 
 *     cdef ccuda.CUkernelNodeAttrID cattr = attr.value
 *     cdef CUkernelNodeAttrValue value_out = CUkernelNodeAttrValue()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphKernelNodeGetAttribute(chNode, cattr, value_out._ptr)
 *     return (CUresult(err), value_out)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUkernelNodeAttrValue)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_value_out = ((struct __pyx_obj_4cuda_4cuda_CUkernelNodeAttrValue *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":29213
 *     cdef ccuda.CUkernelNodeAttrID cattr = attr.value
 *     cdef CUkernelNodeAttrValue value_out = CUkernelNodeAttrValue()
 *     err = ccuda.cuGraphKernelNodeGetAttribute(chNode, cattr, value_out._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), value_out)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphKernelNodeGetAttribute(__pyx_v_chNode, __pyx_v_cattr, __pyx_v_value_out->__pyx_base._ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29213, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":29214
 *     cdef CUkernelNodeAttrValue value_out = CUkernelNodeAttrValue()
 *     err = ccuda.cuGraphKernelNodeGetAttribute(chNode, cattr, value_out._ptr)
 *     return (CUresult(err), value_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_value_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_value_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_value_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29177
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeGetAttribute(hNode, attr not None : CUkernelNodeAttrID):             # <<<<<<<<<<<<<<
 *     """ Queries node attribute.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuGraphKernelNodeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XDECREF((PyObject *)__pyx_v_value_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29217
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeSetAttribute(hNode, attr not None : CUkernelNodeAttrID, value : CUkernelNodeAttrValue):             # <<<<<<<<<<<<<<
 *     """ Sets node attribute.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_609cuGraphKernelNodeSetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_608cuGraphKernelNodeSetAttribute[] = "cuGraphKernelNodeSetAttribute(hNode, attr: CUkernelNodeAttrID, CUkernelNodeAttrValue value: CUkernelNodeAttrValue)\n Sets node attribute.\n\n    Sets attribute `attr` on node `hNode` from corresponding attribute of\n    `value`.\n\n    Parameters\n    ----------\n    hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t`\n\n    attr : :py:obj:`~.CUkernelNodeAttrID`\n\n    value : :py:obj:`~.CUkernelNodeAttrValue`\n\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`\n\n    See Also\n    --------\n    :py:obj:`~.CUaccessPolicyWindow`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_609cuGraphKernelNodeSetAttribute = {"cuGraphKernelNodeSetAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_609cuGraphKernelNodeSetAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_608cuGraphKernelNodeSetAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_609cuGraphKernelNodeSetAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hNode = 0;
  PyObject *__pyx_v_attr = 0;
  struct __pyx_obj_4cuda_4cuda_CUkernelNodeAttrValue *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphKernelNodeSetAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hNode,&__pyx_n_s_attr,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hNode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphKernelNodeSetAttribute", 1, 3, 3, 1); __PYX_ERR(0, 29217, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphKernelNodeSetAttribute", 1, 3, 3, 2); __PYX_ERR(0, 29217, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphKernelNodeSetAttribute") < 0)) __PYX_ERR(0, 29217, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hNode = values[0];
    __pyx_v_attr = values[1];
    __pyx_v_value = ((struct __pyx_obj_4cuda_4cuda_CUkernelNodeAttrValue *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphKernelNodeSetAttribute", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29217, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphKernelNodeSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attr) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attr"); __PYX_ERR(0, 29217, __pyx_L1_error)
  }
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_4cuda_4cuda_CUkernelNodeAttrValue, 1, "value", 0))) __PYX_ERR(0, 29217, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_608cuGraphKernelNodeSetAttribute(__pyx_self, __pyx_v_hNode, __pyx_v_attr, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_608cuGraphKernelNodeSetAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hNode, PyObject *__pyx_v_attr, struct __pyx_obj_4cuda_4cuda_CUkernelNodeAttrValue *__pyx_v_value) {
  CUgraphNode __pyx_v_chNode;
  PyObject *__pyx_v_phNode = NULL;
  CUkernelNodeAttrID __pyx_v_cattr;
  CUkernelNodeAttrValue *__pyx_v_cvalue_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUkernelNodeAttrID __pyx_t_6;
  union CUlaunchAttributeValue_union *__pyx_t_7;
  CUresult __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__928)
  __Pyx_RefNannySetupContext("cuGraphKernelNodeSetAttribute", 0);
  __Pyx_TraceCall("cuGraphKernelNodeSetAttribute", __pyx_f[0], 29217, 0, __PYX_ERR(0, 29217, __pyx_L1_error));

  /* "cuda/cuda.pyx":29242
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
  __pyx_t_1 = (__pyx_v_hNode == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29243
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 */
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29242
 *     """
 *     cdef ccuda.CUgraphNode chNode
 *     if hNode is None:             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29244
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hNode, __pyx_ptype_4cuda_4cuda_CUgraphNode); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29245
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phNode = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29246
 *     elif isinstance(hNode, (CUgraphNode)):
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29246, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29244
 *     if hNode is None:
 *         chNode = <ccuda.CUgraphNode><void_ptr>0
 *     elif isinstance(hNode, (CUgraphNode)):             # <<<<<<<<<<<<<<
 *         phNode = int(hNode)
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29248
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 *     else:
 *         phNode = int(CUgraphNode(hNode))             # <<<<<<<<<<<<<<
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), __pyx_v_hNode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phNode = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29249
 *     else:
 *         phNode = int(CUgraphNode(hNode))
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUkernelNodeAttrID cattr = attr.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phNode); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29249, __pyx_L1_error)
    __pyx_v_chNode = ((CUgraphNode)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29251
 *         chNode = <ccuda.CUgraphNode><void_ptr>phNode
 * 
 *     cdef ccuda.CUkernelNodeAttrID cattr = attr.value             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUkernelNodeAttrValue* cvalue_ptr = value._ptr if value != None else NULL
 *     err = ccuda.cuGraphKernelNodeSetAttribute(chNode, cattr, cvalue_ptr)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUlaunchAttributeID_enum)__Pyx_PyInt_As_enum__CUlaunchAttributeID_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 29251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cattr = __pyx_t_6;

  /* "cuda/cuda.pyx":29252
 * 
 *     cdef ccuda.CUkernelNodeAttrID cattr = attr.value
 *     cdef ccuda.CUkernelNodeAttrValue* cvalue_ptr = value._ptr if value != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphKernelNodeSetAttribute(chNode, cattr, cvalue_ptr)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_value), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29252, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 29252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_7 = __pyx_v_value->__pyx_base._ptr;
  } else {
    __pyx_t_7 = NULL;
  }
  __pyx_v_cvalue_ptr = __pyx_t_7;

  /* "cuda/cuda.pyx":29253
 *     cdef ccuda.CUkernelNodeAttrID cattr = attr.value
 *     cdef ccuda.CUkernelNodeAttrValue* cvalue_ptr = value._ptr if value != None else NULL
 *     err = ccuda.cuGraphKernelNodeSetAttribute(chNode, cattr, cvalue_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuGraphKernelNodeSetAttribute(__pyx_v_chNode, __pyx_v_cattr, __pyx_v_cvalue_ptr); if (unlikely(__pyx_t_8 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29253, __pyx_L1_error)
  __pyx_v_err = __pyx_t_8;

  /* "cuda/cuda.pyx":29254
 *     cdef ccuda.CUkernelNodeAttrValue* cvalue_ptr = value._ptr if value != None else NULL
 *     err = ccuda.cuGraphKernelNodeSetAttribute(chNode, cattr, cvalue_ptr)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 29254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29217
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeSetAttribute(hNode, attr not None : CUkernelNodeAttrID, value : CUkernelNodeAttrValue):             # <<<<<<<<<<<<<<
 *     """ Sets node attribute.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cuda.cuda.cuGraphKernelNodeSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phNode);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29257
 * 
 * @cython.embedsignature(True)
 * def cuGraphDebugDotPrint(hGraph, char* path, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a DOT file describing graph structure.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_611cuGraphDebugDotPrint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_610cuGraphDebugDotPrint[] = "cuGraphDebugDotPrint(hGraph, char *path, unsigned int flags)\n Write a DOT file describing graph structure.\n\n    Using the provided `hGraph`, write to `path` a DOT formatted\n    description of the graph. By default this includes the graph topology,\n    node types, node id, kernel names and memcpy direction. `flags` can be\n    specified to write more detailed information about each node type such\n    as parameter values, kernel attributes, node and function handles.\n\n    Parameters\n    ----------\n    hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        The graph to create a DOT file from\n    path : bytes\n        The path to write the DOT file to\n    flags : unsigned int\n        Flags from CUgraphDebugDot_flags for specifying which additional\n        node information to write\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OPERATING_SYSTEM`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_611cuGraphDebugDotPrint = {"cuGraphDebugDotPrint", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_611cuGraphDebugDotPrint, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_610cuGraphDebugDotPrint};
static PyObject *__pyx_pw_4cuda_4cuda_611cuGraphDebugDotPrint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hGraph = 0;
  char *__pyx_v_path;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphDebugDotPrint (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hGraph,&__pyx_n_s_path,&__pyx_n_s_flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hGraph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphDebugDotPrint", 1, 3, 3, 1); __PYX_ERR(0, 29257, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphDebugDotPrint", 1, 3, 3, 2); __PYX_ERR(0, 29257, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphDebugDotPrint") < 0)) __PYX_ERR(0, 29257, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hGraph = values[0];
    __pyx_v_path = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_path) && PyErr_Occurred())) __PYX_ERR(0, 29257, __pyx_L3_error)
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29257, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphDebugDotPrint", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29257, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphDebugDotPrint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_610cuGraphDebugDotPrint(__pyx_self, __pyx_v_hGraph, __pyx_v_path, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_610cuGraphDebugDotPrint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hGraph, char *__pyx_v_path, unsigned int __pyx_v_flags) {
  CUgraph __pyx_v_chGraph;
  PyObject *__pyx_v_phGraph = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__929)
  __Pyx_RefNannySetupContext("cuGraphDebugDotPrint", 0);
  __Pyx_TraceCall("cuGraphDebugDotPrint", __pyx_f[0], 29257, 0, __PYX_ERR(0, 29257, __pyx_L1_error));

  /* "cuda/cuda.pyx":29282
 *     """
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_hGraph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29283
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 */
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29282
 *     """
 *     cdef ccuda.CUgraph chGraph
 *     if hGraph is None:             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29284
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hGraph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29285
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phGraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29286
 *     elif isinstance(hGraph, (CUgraph)):
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29286, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29284
 *     if hGraph is None:
 *         chGraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(hGraph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         phGraph = int(hGraph)
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29288
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 *     else:
 *         phGraph = int(CUgraph(hGraph))             # <<<<<<<<<<<<<<
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_hGraph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phGraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29289
 *     else:
 *         phGraph = int(CUgraph(hGraph))
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphDebugDotPrint(chGraph, path, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phGraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29289, __pyx_L1_error)
    __pyx_v_chGraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29291
 *         chGraph = <ccuda.CUgraph><void_ptr>phGraph
 * 
 *     err = ccuda.cuGraphDebugDotPrint(chGraph, path, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphDebugDotPrint(__pyx_v_chGraph, __pyx_v_path, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29291, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29292
 * 
 *     err = ccuda.cuGraphDebugDotPrint(chGraph, path, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29257
 * 
 * @cython.embedsignature(True)
 * def cuGraphDebugDotPrint(hGraph, char* path, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a DOT file describing graph structure.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphDebugDotPrint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phGraph);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29295
 * 
 * @cython.embedsignature(True)
 * def cuUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Create a user object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_613cuUserObjectCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_612cuUserObjectCreate[] = "cuUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int flags)\n Create a user object.\n\n    Create a user object with the specified destructor callback and initial\n    reference count. The initial references are owned by the caller.\n\n    Destructor callbacks cannot make CUDA API calls and should avoid\n    blocking behavior, as they are executed by a shared internal thread.\n    Another thread may be signaled to perform such actions, if it does not\n    block forward progress of tasks scheduled through CUDA.\n\n    See CUDA User Objects in the CUDA C++ Programming Guide for more\n    information on user objects.\n\n    Parameters\n    ----------\n    ptr : Any\n        The pointer to pass to the destroy function\n    destroy : :py:obj:`~.CUhostFn`\n        Callback to free the user object when it is no longer in use\n    initialRefcount : unsigned int\n        The initial refcount to create the object with, typically 1. The\n        initial references are owned by the calling thread.\n    flags : unsigned int\n        Currently it is required to pass\n        :py:obj:`~.CU_USER_OBJECT_NO_DESTRUCTOR_SYNC`, which is the only\n        defined flag. This indicates that the destroy callback cannot be\n        waited on by any CUDA API. Users requiring synchronization of the\n        callback should signal its completion manually.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    object_out : :py:obj:`~.CUuserObject`\n        Location to return the user object handle\n\n    See Also\n    --------\n    :py:obj:`~.cuUserObjectRetain`, :py:obj:`~.cuUserObjectRelease`, :py:obj:`~.cuGraphRetainUserObject`, :py:obj:`~.cuGraphReleaseUserObject`, :py:obj:`~.cuGraphCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_613cuUserObjectCreate = {"cuUserObjectCreate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_613cuUserObjectCreate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_612cuUserObjectCreate};
static PyObject *__pyx_pw_4cuda_4cuda_613cuUserObjectCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ptr = 0;
  PyObject *__pyx_v_destroy = 0;
  unsigned int __pyx_v_initialRefcount;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuUserObjectCreate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ptr_2,&__pyx_n_s_destroy,&__pyx_n_s_initialRefcount,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ptr_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_destroy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuUserObjectCreate", 1, 4, 4, 1); __PYX_ERR(0, 29295, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initialRefcount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuUserObjectCreate", 1, 4, 4, 2); __PYX_ERR(0, 29295, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuUserObjectCreate", 1, 4, 4, 3); __PYX_ERR(0, 29295, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuUserObjectCreate") < 0)) __PYX_ERR(0, 29295, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_ptr = values[0];
    __pyx_v_destroy = values[1];
    __pyx_v_initialRefcount = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_initialRefcount == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29295, __pyx_L3_error)
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29295, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuUserObjectCreate", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29295, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuUserObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_612cuUserObjectCreate(__pyx_self, __pyx_v_ptr, __pyx_v_destroy, __pyx_v_initialRefcount, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_612cuUserObjectCreate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr, PyObject *__pyx_v_destroy, unsigned int __pyx_v_initialRefcount, unsigned int __pyx_v_flags) {
  CUhostFn __pyx_v_cdestroy;
  PyObject *__pyx_v_pdestroy = NULL;
  struct __pyx_obj_4cuda_4cuda_CUuserObject *__pyx_v_object_out = 0;
  PyObject *__pyx_v_cptr = NULL;
  void *__pyx_v_cptr_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__930)
  __Pyx_RefNannySetupContext("cuUserObjectCreate", 0);
  __Pyx_TraceCall("cuUserObjectCreate", __pyx_f[0], 29295, 0, __PYX_ERR(0, 29295, __pyx_L1_error));

  /* "cuda/cuda.pyx":29337
 *     """
 *     cdef ccuda.CUhostFn cdestroy
 *     if destroy is None:             # <<<<<<<<<<<<<<
 *         cdestroy = <ccuda.CUhostFn><void_ptr>0
 *     elif isinstance(destroy, (CUhostFn)):
 */
  __pyx_t_1 = (__pyx_v_destroy == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29338
 *     cdef ccuda.CUhostFn cdestroy
 *     if destroy is None:
 *         cdestroy = <ccuda.CUhostFn><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(destroy, (CUhostFn)):
 *         pdestroy = int(destroy)
 */
    __pyx_v_cdestroy = ((CUhostFn)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29337
 *     """
 *     cdef ccuda.CUhostFn cdestroy
 *     if destroy is None:             # <<<<<<<<<<<<<<
 *         cdestroy = <ccuda.CUhostFn><void_ptr>0
 *     elif isinstance(destroy, (CUhostFn)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29339
 *     if destroy is None:
 *         cdestroy = <ccuda.CUhostFn><void_ptr>0
 *     elif isinstance(destroy, (CUhostFn)):             # <<<<<<<<<<<<<<
 *         pdestroy = int(destroy)
 *         cdestroy = <ccuda.CUhostFn><void_ptr>pdestroy
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_destroy, __pyx_ptype_4cuda_4cuda_CUhostFn); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29340
 *         cdestroy = <ccuda.CUhostFn><void_ptr>0
 *     elif isinstance(destroy, (CUhostFn)):
 *         pdestroy = int(destroy)             # <<<<<<<<<<<<<<
 *         cdestroy = <ccuda.CUhostFn><void_ptr>pdestroy
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_destroy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdestroy = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29341
 *     elif isinstance(destroy, (CUhostFn)):
 *         pdestroy = int(destroy)
 *         cdestroy = <ccuda.CUhostFn><void_ptr>pdestroy             # <<<<<<<<<<<<<<
 *     else:
 *         pdestroy = int(CUhostFn(destroy))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdestroy); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29341, __pyx_L1_error)
    __pyx_v_cdestroy = ((CUhostFn)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29339
 *     if destroy is None:
 *         cdestroy = <ccuda.CUhostFn><void_ptr>0
 *     elif isinstance(destroy, (CUhostFn)):             # <<<<<<<<<<<<<<
 *         pdestroy = int(destroy)
 *         cdestroy = <ccuda.CUhostFn><void_ptr>pdestroy
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29343
 *         cdestroy = <ccuda.CUhostFn><void_ptr>pdestroy
 *     else:
 *         pdestroy = int(CUhostFn(destroy))             # <<<<<<<<<<<<<<
 *         cdestroy = <ccuda.CUhostFn><void_ptr>pdestroy
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUhostFn), __pyx_v_destroy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdestroy = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29344
 *     else:
 *         pdestroy = int(CUhostFn(destroy))
 *         cdestroy = <ccuda.CUhostFn><void_ptr>pdestroy             # <<<<<<<<<<<<<<
 * 
 *     cdef CUuserObject object_out = CUuserObject()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdestroy); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29344, __pyx_L1_error)
    __pyx_v_cdestroy = ((CUhostFn)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29346
 *         cdestroy = <ccuda.CUhostFn><void_ptr>pdestroy
 * 
 *     cdef CUuserObject object_out = CUuserObject()             # <<<<<<<<<<<<<<
 *     cptr = utils.HelperInputVoidPtr(ptr)
 *     cdef void* cptr_ptr = <void*><void_ptr>cptr.cptr
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUuserObject)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_object_out = ((struct __pyx_obj_4cuda_4cuda_CUuserObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":29347
 * 
 *     cdef CUuserObject object_out = CUuserObject()
 *     cptr = utils.HelperInputVoidPtr(ptr)             # <<<<<<<<<<<<<<
 *     cdef void* cptr_ptr = <void*><void_ptr>cptr.cptr
 *     err = ccuda.cuUserObjectCreate(object_out._ptr, cptr_ptr, cdestroy, initialRefcount, flags)
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr), __pyx_v_ptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_cptr = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":29348
 *     cdef CUuserObject object_out = CUuserObject()
 *     cptr = utils.HelperInputVoidPtr(ptr)
 *     cdef void* cptr_ptr = <void*><void_ptr>cptr.cptr             # <<<<<<<<<<<<<<
 *     err = ccuda.cuUserObjectCreate(object_out._ptr, cptr_ptr, cdestroy, initialRefcount, flags)
 *     return (CUresult(err), object_out)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cptr, __pyx_n_s_cptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29348, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cptr_ptr = ((void *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

  /* "cuda/cuda.pyx":29349
 *     cptr = utils.HelperInputVoidPtr(ptr)
 *     cdef void* cptr_ptr = <void*><void_ptr>cptr.cptr
 *     err = ccuda.cuUserObjectCreate(object_out._ptr, cptr_ptr, cdestroy, initialRefcount, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), object_out)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuUserObjectCreate(__pyx_v_object_out->_ptr, __pyx_v_cptr_ptr, __pyx_v_cdestroy, __pyx_v_initialRefcount, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29349, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29350
 *     cdef void* cptr_ptr = <void*><void_ptr>cptr.cptr
 *     err = ccuda.cuUserObjectCreate(object_out._ptr, cptr_ptr, cdestroy, initialRefcount, flags)
 *     return (CUresult(err), object_out)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_object_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_object_out));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_object_out));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29295
 * 
 * @cython.embedsignature(True)
 * def cuUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Create a user object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuUserObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdestroy);
  __Pyx_XDECREF((PyObject *)__pyx_v_object_out);
  __Pyx_XDECREF(__pyx_v_cptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29353
 * 
 * @cython.embedsignature(True)
 * def cuUserObjectRetain(object, unsigned int count):             # <<<<<<<<<<<<<<
 *     """ Retain a reference to a user object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_615cuUserObjectRetain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_614cuUserObjectRetain[] = "cuUserObjectRetain(object, unsigned int count)\n Retain a reference to a user object.\n\n    Retains new references to a user object. The new references are owned\n    by the caller.\n\n    See CUDA User Objects in the CUDA C++ Programming Guide for more\n    information on user objects.\n\n    Parameters\n    ----------\n    object : :py:obj:`~.CUuserObject`\n        The object to retain\n    count : unsigned int\n        The number of references to retain, typically 1. Must be nonzero\n        and not larger than INT_MAX.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuUserObjectCreate`, :py:obj:`~.cuUserObjectRelease`, :py:obj:`~.cuGraphRetainUserObject`, :py:obj:`~.cuGraphReleaseUserObject`, :py:obj:`~.cuGraphCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_615cuUserObjectRetain = {"cuUserObjectRetain", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_615cuUserObjectRetain, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_614cuUserObjectRetain};
static PyObject *__pyx_pw_4cuda_4cuda_615cuUserObjectRetain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_object = 0;
  unsigned int __pyx_v_count;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuUserObjectRetain (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_object,&__pyx_n_s_count_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_object)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuUserObjectRetain", 1, 2, 2, 1); __PYX_ERR(0, 29353, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuUserObjectRetain") < 0)) __PYX_ERR(0, 29353, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_object = values[0];
    __pyx_v_count = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_count == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29353, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuUserObjectRetain", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29353, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuUserObjectRetain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_614cuUserObjectRetain(__pyx_self, __pyx_v_object, __pyx_v_count);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_614cuUserObjectRetain(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_object, unsigned int __pyx_v_count) {
  CUuserObject __pyx_v_cobject;
  PyObject *__pyx_v_pobject = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__931)
  __Pyx_RefNannySetupContext("cuUserObjectRetain", 0);
  __Pyx_TraceCall("cuUserObjectRetain", __pyx_f[0], 29353, 0, __PYX_ERR(0, 29353, __pyx_L1_error));

  /* "cuda/cuda.pyx":29380
 *     """
 *     cdef ccuda.CUuserObject cobject
 *     if object is None:             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):
 */
  __pyx_t_1 = (__pyx_v_object == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29381
 *     cdef ccuda.CUuserObject cobject
 *     if object is None:
 *         cobject = <ccuda.CUuserObject><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(object, (CUuserObject)):
 *         pobject = int(object)
 */
    __pyx_v_cobject = ((CUuserObject)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29380
 *     """
 *     cdef ccuda.CUuserObject cobject
 *     if object is None:             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29382
 *     if object is None:
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):             # <<<<<<<<<<<<<<
 *         pobject = int(object)
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_object, __pyx_ptype_4cuda_4cuda_CUuserObject); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29383
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):
 *         pobject = int(object)             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pobject = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29384
 *     elif isinstance(object, (CUuserObject)):
 *         pobject = int(object)
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject             # <<<<<<<<<<<<<<
 *     else:
 *         pobject = int(CUuserObject(object))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pobject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29384, __pyx_L1_error)
    __pyx_v_cobject = ((CUuserObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29382
 *     if object is None:
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):             # <<<<<<<<<<<<<<
 *         pobject = int(object)
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29386
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 *     else:
 *         pobject = int(CUuserObject(object))             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUuserObject), __pyx_v_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pobject = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29387
 *     else:
 *         pobject = int(CUuserObject(object))
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuUserObjectRetain(cobject, count)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pobject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29387, __pyx_L1_error)
    __pyx_v_cobject = ((CUuserObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29389
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 * 
 *     err = ccuda.cuUserObjectRetain(cobject, count)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuUserObjectRetain(__pyx_v_cobject, __pyx_v_count); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29389, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29390
 * 
 *     err = ccuda.cuUserObjectRetain(cobject, count)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29353
 * 
 * @cython.embedsignature(True)
 * def cuUserObjectRetain(object, unsigned int count):             # <<<<<<<<<<<<<<
 *     """ Retain a reference to a user object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuUserObjectRetain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pobject);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29393
 * 
 * @cython.embedsignature(True)
 * def cuUserObjectRelease(object, unsigned int count):             # <<<<<<<<<<<<<<
 *     """ Release a reference to a user object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_617cuUserObjectRelease(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_616cuUserObjectRelease[] = "cuUserObjectRelease(object, unsigned int count)\n Release a reference to a user object.\n\n    Releases user object references owned by the caller. The object's\n    destructor is invoked if the reference count reaches zero.\n\n    It is undefined behavior to release references not owned by the caller,\n    or to use a user object handle after all references are released.\n\n    See CUDA User Objects in the CUDA C++ Programming Guide for more\n    information on user objects.\n\n    Parameters\n    ----------\n    object : :py:obj:`~.CUuserObject`\n        The object to release\n    count : unsigned int\n        The number of references to release, typically 1. Must be nonzero\n        and not larger than INT_MAX.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuUserObjectCreate`, :py:obj:`~.cuUserObjectRetain`, :py:obj:`~.cuGraphRetainUserObject`, :py:obj:`~.cuGraphReleaseUserObject`, :py:obj:`~.cuGraphCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_617cuUserObjectRelease = {"cuUserObjectRelease", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_617cuUserObjectRelease, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_616cuUserObjectRelease};
static PyObject *__pyx_pw_4cuda_4cuda_617cuUserObjectRelease(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_object = 0;
  unsigned int __pyx_v_count;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuUserObjectRelease (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_object,&__pyx_n_s_count_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_object)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuUserObjectRelease", 1, 2, 2, 1); __PYX_ERR(0, 29393, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuUserObjectRelease") < 0)) __PYX_ERR(0, 29393, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_object = values[0];
    __pyx_v_count = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_count == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29393, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuUserObjectRelease", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29393, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuUserObjectRelease", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_616cuUserObjectRelease(__pyx_self, __pyx_v_object, __pyx_v_count);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_616cuUserObjectRelease(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_object, unsigned int __pyx_v_count) {
  CUuserObject __pyx_v_cobject;
  PyObject *__pyx_v_pobject = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__932)
  __Pyx_RefNannySetupContext("cuUserObjectRelease", 0);
  __Pyx_TraceCall("cuUserObjectRelease", __pyx_f[0], 29393, 0, __PYX_ERR(0, 29393, __pyx_L1_error));

  /* "cuda/cuda.pyx":29423
 *     """
 *     cdef ccuda.CUuserObject cobject
 *     if object is None:             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):
 */
  __pyx_t_1 = (__pyx_v_object == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29424
 *     cdef ccuda.CUuserObject cobject
 *     if object is None:
 *         cobject = <ccuda.CUuserObject><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(object, (CUuserObject)):
 *         pobject = int(object)
 */
    __pyx_v_cobject = ((CUuserObject)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29423
 *     """
 *     cdef ccuda.CUuserObject cobject
 *     if object is None:             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29425
 *     if object is None:
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):             # <<<<<<<<<<<<<<
 *         pobject = int(object)
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_object, __pyx_ptype_4cuda_4cuda_CUuserObject); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29426
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):
 *         pobject = int(object)             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pobject = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29427
 *     elif isinstance(object, (CUuserObject)):
 *         pobject = int(object)
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject             # <<<<<<<<<<<<<<
 *     else:
 *         pobject = int(CUuserObject(object))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pobject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29427, __pyx_L1_error)
    __pyx_v_cobject = ((CUuserObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29425
 *     if object is None:
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):             # <<<<<<<<<<<<<<
 *         pobject = int(object)
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29429
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 *     else:
 *         pobject = int(CUuserObject(object))             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUuserObject), __pyx_v_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pobject = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29430
 *     else:
 *         pobject = int(CUuserObject(object))
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuUserObjectRelease(cobject, count)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pobject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29430, __pyx_L1_error)
    __pyx_v_cobject = ((CUuserObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29432
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 * 
 *     err = ccuda.cuUserObjectRelease(cobject, count)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuUserObjectRelease(__pyx_v_cobject, __pyx_v_count); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29432, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29433
 * 
 *     err = ccuda.cuUserObjectRelease(cobject, count)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29393
 * 
 * @cython.embedsignature(True)
 * def cuUserObjectRelease(object, unsigned int count):             # <<<<<<<<<<<<<<
 *     """ Release a reference to a user object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuUserObjectRelease", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pobject);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29436
 * 
 * @cython.embedsignature(True)
 * def cuGraphRetainUserObject(graph, object, unsigned int count, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Retain a reference to a user object from a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_619cuGraphRetainUserObject(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_618cuGraphRetainUserObject[] = "cuGraphRetainUserObject(graph, object, unsigned int count, unsigned int flags)\n Retain a reference to a user object from a graph.\n\n    Creates or moves user object references that will be owned by a CUDA\n    graph.\n\n    See CUDA User Objects in the CUDA C++ Programming Guide for more\n    information on user objects.\n\n    Parameters\n    ----------\n    graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        The graph to associate the reference with\n    object : :py:obj:`~.CUuserObject`\n        The user object to retain a reference for\n    count : unsigned int\n        The number of references to add to the graph, typically 1. Must be\n        nonzero and not larger than INT_MAX.\n    flags : unsigned int\n        The optional flag :py:obj:`~.CU_GRAPH_USER_OBJECT_MOVE` transfers\n        references from the calling thread, rather than create new\n        references. Pass 0 to create new references.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuUserObjectCreate`, :py:obj:`~.cuUserObjectRetain`, :py:obj:`~.cuUserObjectRelease`, :py:obj:`~.cuGraphReleaseUserObject`, :py:obj:`~.cuGraphCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_619cuGraphRetainUserObject = {"cuGraphRetainUserObject", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_619cuGraphRetainUserObject, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_618cuGraphRetainUserObject};
static PyObject *__pyx_pw_4cuda_4cuda_619cuGraphRetainUserObject(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_graph = 0;
  PyObject *__pyx_v_object = 0;
  unsigned int __pyx_v_count;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphRetainUserObject (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_graph,&__pyx_n_s_object,&__pyx_n_s_count_2,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_graph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_object)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphRetainUserObject", 1, 4, 4, 1); __PYX_ERR(0, 29436, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphRetainUserObject", 1, 4, 4, 2); __PYX_ERR(0, 29436, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphRetainUserObject", 1, 4, 4, 3); __PYX_ERR(0, 29436, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphRetainUserObject") < 0)) __PYX_ERR(0, 29436, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_graph = values[0];
    __pyx_v_object = values[1];
    __pyx_v_count = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_count == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29436, __pyx_L3_error)
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29436, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphRetainUserObject", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29436, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphRetainUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_618cuGraphRetainUserObject(__pyx_self, __pyx_v_graph, __pyx_v_object, __pyx_v_count, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_618cuGraphRetainUserObject(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_graph, PyObject *__pyx_v_object, unsigned int __pyx_v_count, unsigned int __pyx_v_flags) {
  CUuserObject __pyx_v_cobject;
  PyObject *__pyx_v_pobject = NULL;
  CUgraph __pyx_v_cgraph;
  PyObject *__pyx_v_pgraph = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__933)
  __Pyx_RefNannySetupContext("cuGraphRetainUserObject", 0);
  __Pyx_TraceCall("cuGraphRetainUserObject", __pyx_f[0], 29436, 0, __PYX_ERR(0, 29436, __pyx_L1_error));

  /* "cuda/cuda.pyx":29469
 *     """
 *     cdef ccuda.CUuserObject cobject
 *     if object is None:             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):
 */
  __pyx_t_1 = (__pyx_v_object == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29470
 *     cdef ccuda.CUuserObject cobject
 *     if object is None:
 *         cobject = <ccuda.CUuserObject><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(object, (CUuserObject)):
 *         pobject = int(object)
 */
    __pyx_v_cobject = ((CUuserObject)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29469
 *     """
 *     cdef ccuda.CUuserObject cobject
 *     if object is None:             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29471
 *     if object is None:
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):             # <<<<<<<<<<<<<<
 *         pobject = int(object)
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_object, __pyx_ptype_4cuda_4cuda_CUuserObject); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29472
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):
 *         pobject = int(object)             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pobject = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29473
 *     elif isinstance(object, (CUuserObject)):
 *         pobject = int(object)
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject             # <<<<<<<<<<<<<<
 *     else:
 *         pobject = int(CUuserObject(object))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pobject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29473, __pyx_L1_error)
    __pyx_v_cobject = ((CUuserObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29471
 *     if object is None:
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):             # <<<<<<<<<<<<<<
 *         pobject = int(object)
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29475
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 *     else:
 *         pobject = int(CUuserObject(object))             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUuserObject), __pyx_v_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pobject = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29476
 *     else:
 *         pobject = int(CUuserObject(object))
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph cgraph
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pobject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29476, __pyx_L1_error)
    __pyx_v_cobject = ((CUuserObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29479
 * 
 *     cdef ccuda.CUgraph cgraph
 *     if graph is None:             # <<<<<<<<<<<<<<
 *         cgraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(graph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_graph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29480
 *     cdef ccuda.CUgraph cgraph
 *     if graph is None:
 *         cgraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(graph, (CUgraph)):
 *         pgraph = int(graph)
 */
    __pyx_v_cgraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29479
 * 
 *     cdef ccuda.CUgraph cgraph
 *     if graph is None:             # <<<<<<<<<<<<<<
 *         cgraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(graph, (CUgraph)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29481
 *     if graph is None:
 *         cgraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(graph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         pgraph = int(graph)
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_graph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29482
 *         cgraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(graph, (CUgraph)):
 *         pgraph = int(graph)             # <<<<<<<<<<<<<<
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_graph); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pgraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29483
 *     elif isinstance(graph, (CUgraph)):
 *         pgraph = int(graph)
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph             # <<<<<<<<<<<<<<
 *     else:
 *         pgraph = int(CUgraph(graph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pgraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29483, __pyx_L1_error)
    __pyx_v_cgraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29481
 *     if graph is None:
 *         cgraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(graph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         pgraph = int(graph)
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29485
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph
 *     else:
 *         pgraph = int(CUgraph(graph))             # <<<<<<<<<<<<<<
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_graph); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pgraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29486
 *     else:
 *         pgraph = int(CUgraph(graph))
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphRetainUserObject(cgraph, cobject, count, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pgraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29486, __pyx_L1_error)
    __pyx_v_cgraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":29488
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph
 * 
 *     err = ccuda.cuGraphRetainUserObject(cgraph, cobject, count, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphRetainUserObject(__pyx_v_cgraph, __pyx_v_cobject, __pyx_v_count, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29488, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29489
 * 
 *     err = ccuda.cuGraphRetainUserObject(cgraph, cobject, count, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29436
 * 
 * @cython.embedsignature(True)
 * def cuGraphRetainUserObject(graph, object, unsigned int count, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Retain a reference to a user object from a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphRetainUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pobject);
  __Pyx_XDECREF(__pyx_v_pgraph);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29492
 * 
 * @cython.embedsignature(True)
 * def cuGraphReleaseUserObject(graph, object, unsigned int count):             # <<<<<<<<<<<<<<
 *     """ Release a user object reference from a graph.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_621cuGraphReleaseUserObject(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_620cuGraphReleaseUserObject[] = "cuGraphReleaseUserObject(graph, object, unsigned int count)\n Release a user object reference from a graph.\n\n    Releases user object references owned by a graph.\n\n    See CUDA User Objects in the CUDA C++ Programming Guide for more\n    information on user objects.\n\n    Parameters\n    ----------\n    graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t`\n        The graph that will release the reference\n    object : :py:obj:`~.CUuserObject`\n        The user object to release a reference for\n    count : unsigned int\n        The number of references to release, typically 1. Must be nonzero\n        and not larger than INT_MAX.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuUserObjectCreate`, :py:obj:`~.cuUserObjectRetain`, :py:obj:`~.cuUserObjectRelease`, :py:obj:`~.cuGraphRetainUserObject`, :py:obj:`~.cuGraphCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_621cuGraphReleaseUserObject = {"cuGraphReleaseUserObject", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_621cuGraphReleaseUserObject, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_620cuGraphReleaseUserObject};
static PyObject *__pyx_pw_4cuda_4cuda_621cuGraphReleaseUserObject(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_graph = 0;
  PyObject *__pyx_v_object = 0;
  unsigned int __pyx_v_count;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphReleaseUserObject (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_graph,&__pyx_n_s_object,&__pyx_n_s_count_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_graph)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_object)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphReleaseUserObject", 1, 3, 3, 1); __PYX_ERR(0, 29492, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphReleaseUserObject", 1, 3, 3, 2); __PYX_ERR(0, 29492, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphReleaseUserObject") < 0)) __PYX_ERR(0, 29492, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_graph = values[0];
    __pyx_v_object = values[1];
    __pyx_v_count = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_count == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29492, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphReleaseUserObject", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29492, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphReleaseUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_620cuGraphReleaseUserObject(__pyx_self, __pyx_v_graph, __pyx_v_object, __pyx_v_count);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_620cuGraphReleaseUserObject(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_graph, PyObject *__pyx_v_object, unsigned int __pyx_v_count) {
  CUuserObject __pyx_v_cobject;
  PyObject *__pyx_v_pobject = NULL;
  CUgraph __pyx_v_cgraph;
  PyObject *__pyx_v_pgraph = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__934)
  __Pyx_RefNannySetupContext("cuGraphReleaseUserObject", 0);
  __Pyx_TraceCall("cuGraphReleaseUserObject", __pyx_f[0], 29492, 0, __PYX_ERR(0, 29492, __pyx_L1_error));

  /* "cuda/cuda.pyx":29520
 *     """
 *     cdef ccuda.CUuserObject cobject
 *     if object is None:             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):
 */
  __pyx_t_1 = (__pyx_v_object == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29521
 *     cdef ccuda.CUuserObject cobject
 *     if object is None:
 *         cobject = <ccuda.CUuserObject><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(object, (CUuserObject)):
 *         pobject = int(object)
 */
    __pyx_v_cobject = ((CUuserObject)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29520
 *     """
 *     cdef ccuda.CUuserObject cobject
 *     if object is None:             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29522
 *     if object is None:
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):             # <<<<<<<<<<<<<<
 *         pobject = int(object)
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_object, __pyx_ptype_4cuda_4cuda_CUuserObject); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29523
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):
 *         pobject = int(object)             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pobject = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29524
 *     elif isinstance(object, (CUuserObject)):
 *         pobject = int(object)
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject             # <<<<<<<<<<<<<<
 *     else:
 *         pobject = int(CUuserObject(object))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pobject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29524, __pyx_L1_error)
    __pyx_v_cobject = ((CUuserObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29522
 *     if object is None:
 *         cobject = <ccuda.CUuserObject><void_ptr>0
 *     elif isinstance(object, (CUuserObject)):             # <<<<<<<<<<<<<<
 *         pobject = int(object)
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29526
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 *     else:
 *         pobject = int(CUuserObject(object))             # <<<<<<<<<<<<<<
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUuserObject), __pyx_v_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pobject = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29527
 *     else:
 *         pobject = int(CUuserObject(object))
 *         cobject = <ccuda.CUuserObject><void_ptr>pobject             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph cgraph
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pobject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29527, __pyx_L1_error)
    __pyx_v_cobject = ((CUuserObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29530
 * 
 *     cdef ccuda.CUgraph cgraph
 *     if graph is None:             # <<<<<<<<<<<<<<
 *         cgraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(graph, (CUgraph)):
 */
  __pyx_t_1 = (__pyx_v_graph == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29531
 *     cdef ccuda.CUgraph cgraph
 *     if graph is None:
 *         cgraph = <ccuda.CUgraph><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(graph, (CUgraph)):
 *         pgraph = int(graph)
 */
    __pyx_v_cgraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29530
 * 
 *     cdef ccuda.CUgraph cgraph
 *     if graph is None:             # <<<<<<<<<<<<<<
 *         cgraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(graph, (CUgraph)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29532
 *     if graph is None:
 *         cgraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(graph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         pgraph = int(graph)
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_graph, __pyx_ptype_4cuda_4cuda_CUgraph); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29533
 *         cgraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(graph, (CUgraph)):
 *         pgraph = int(graph)             # <<<<<<<<<<<<<<
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_graph); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pgraph = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29534
 *     elif isinstance(graph, (CUgraph)):
 *         pgraph = int(graph)
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph             # <<<<<<<<<<<<<<
 *     else:
 *         pgraph = int(CUgraph(graph))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pgraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29534, __pyx_L1_error)
    __pyx_v_cgraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29532
 *     if graph is None:
 *         cgraph = <ccuda.CUgraph><void_ptr>0
 *     elif isinstance(graph, (CUgraph)):             # <<<<<<<<<<<<<<
 *         pgraph = int(graph)
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29536
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph
 *     else:
 *         pgraph = int(CUgraph(graph))             # <<<<<<<<<<<<<<
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), __pyx_v_graph); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pgraph = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29537
 *     else:
 *         pgraph = int(CUgraph(graph))
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphReleaseUserObject(cgraph, cobject, count)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pgraph); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29537, __pyx_L1_error)
    __pyx_v_cgraph = ((CUgraph)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":29539
 *         cgraph = <ccuda.CUgraph><void_ptr>pgraph
 * 
 *     err = ccuda.cuGraphReleaseUserObject(cgraph, cobject, count)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphReleaseUserObject(__pyx_v_cgraph, __pyx_v_cobject, __pyx_v_count); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29539, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29540
 * 
 *     err = ccuda.cuGraphReleaseUserObject(cgraph, cobject, count)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29492
 * 
 * @cython.embedsignature(True)
 * def cuGraphReleaseUserObject(graph, object, unsigned int count):             # <<<<<<<<<<<<<<
 *     """ Release a user object reference from a graph.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphReleaseUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pobject);
  __Pyx_XDECREF(__pyx_v_pgraph);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29543
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dynamicSMemSize):             # <<<<<<<<<<<<<<
 *     """ Returns occupancy of a function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_623cuOccupancyMaxActiveBlocksPerMultiprocessor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_622cuOccupancyMaxActiveBlocksPerMultiprocessor[] = "cuOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dynamicSMemSize)\n Returns occupancy of a function.\n\n    Returns in `*numBlocks` the number of the maximum active blocks per\n    streaming multiprocessor.\n\n    Parameters\n    ----------\n    func : :py:obj:`~.CUfunction`\n        Kernel for which occupancy is calculated\n    blockSize : int\n        Block size the kernel is intended to be launched with\n    dynamicSMemSize : size_t\n        Per-block dynamic shared memory usage intended, in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    numBlocks : int\n        Returned occupancy\n\n    See Also\n    --------\n    :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessor`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_623cuOccupancyMaxActiveBlocksPerMultiprocessor = {"cuOccupancyMaxActiveBlocksPerMultiprocessor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_623cuOccupancyMaxActiveBlocksPerMultiprocessor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_622cuOccupancyMaxActiveBlocksPerMultiprocessor};
static PyObject *__pyx_pw_4cuda_4cuda_623cuOccupancyMaxActiveBlocksPerMultiprocessor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  int __pyx_v_blockSize;
  size_t __pyx_v_dynamicSMemSize;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuOccupancyMaxActiveBlocksPerMultiprocessor (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_2,&__pyx_n_s_blockSize,&__pyx_n_s_dynamicSMemSize,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockSize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxActiveBlocksPerMultiprocessor", 1, 3, 3, 1); __PYX_ERR(0, 29543, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamicSMemSize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxActiveBlocksPerMultiprocessor", 1, 3, 3, 2); __PYX_ERR(0, 29543, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuOccupancyMaxActiveBlocksPerMultiprocessor") < 0)) __PYX_ERR(0, 29543, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_func = values[0];
    __pyx_v_blockSize = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_blockSize == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29543, __pyx_L3_error)
    __pyx_v_dynamicSMemSize = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_dynamicSMemSize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 29543, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxActiveBlocksPerMultiprocessor", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29543, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_622cuOccupancyMaxActiveBlocksPerMultiprocessor(__pyx_self, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_622cuOccupancyMaxActiveBlocksPerMultiprocessor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize) {
  CUfunction __pyx_v_cfunc;
  PyObject *__pyx_v_pfunc = NULL;
  int __pyx_v_numBlocks;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__935)
  __Pyx_RefNannySetupContext("cuOccupancyMaxActiveBlocksPerMultiprocessor", 0);
  __Pyx_TraceCall("cuOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_f[0], 29543, 0, __PYX_ERR(0, 29543, __pyx_L1_error));

  /* "cuda/cuda.pyx":29570
 *     """
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_func == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29571
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 */
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29570
 *     """
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29572
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_func, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29573
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29574
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 *     else:
 *         pfunc = int(CUfunction(func))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29574, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29572
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29576
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 *         pfunc = int(CUfunction(func))             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29577
 *     else:
 *         pfunc = int(CUfunction(func))
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 * 
 *     cdef int numBlocks = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29577, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29579
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 *     cdef int numBlocks = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, cfunc, blockSize, dynamicSMemSize)
 *     return (CUresult(err), numBlocks)
 */
  __pyx_v_numBlocks = 0;

  /* "cuda/cuda.pyx":29580
 * 
 *     cdef int numBlocks = 0
 *     err = ccuda.cuOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, cfunc, blockSize, dynamicSMemSize)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), numBlocks)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveBlocksPerMultiprocessor((&__pyx_v_numBlocks), __pyx_v_cfunc, __pyx_v_blockSize, __pyx_v_dynamicSMemSize); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29580, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29581
 *     cdef int numBlocks = 0
 *     err = ccuda.cuOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, cfunc, blockSize, dynamicSMemSize)
 *     return (CUresult(err), numBlocks)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_numBlocks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29543
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dynamicSMemSize):             # <<<<<<<<<<<<<<
 *     """ Returns occupancy of a function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29584
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, size_t dynamicSMemSize, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Returns occupancy of a function.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_625cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_624cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags[] = "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, size_t dynamicSMemSize, unsigned int flags)\n Returns occupancy of a function.\n\n    Returns in `*numBlocks` the number of the maximum active blocks per\n    streaming multiprocessor.\n\n    The `Flags` parameter controls how special cases are handled. The valid\n    flags are:\n\n    - :py:obj:`~.CU_OCCUPANCY_DEFAULT`, which maintains the default\n      behavior as :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessor`;\n\n    - :py:obj:`~.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE`, which suppresses\n      the default behavior on platform where global caching affects\n      occupancy. On such platforms, if caching is enabled, but per-block SM\n      resource usage would result in zero occupancy, the occupancy\n      calculator will calculate the occupancy as if caching is disabled.\n      Setting :py:obj:`~.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE` makes the\n      occupancy calculator to return 0 in such cases. More information can\n      be found about this feature in the \"Unified L1/Texture Cache\" section\n      of the Maxwell tuning guide.\n\n    Parameters\n    ----------\n    func : :py:obj:`~.CUfunction`\n        Kernel for which occupancy is calculated\n    blockSize : int\n        Block size the kernel is intended to be launched with\n    dynamicSMemSize : size_t\n        Per-block dynamic shared memory usage intended, in bytes\n    flags : unsigned int\n        Requested behavior for the occupancy calculator\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    numBlocks : int\n        Returned occupancy\n\n    See Also\n    --------\n    :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_625cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = {"cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_625cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_624cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags};
static PyObject *__pyx_pw_4cuda_4cuda_625cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  int __pyx_v_blockSize;
  size_t __pyx_v_dynamicSMemSize;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_2,&__pyx_n_s_blockSize,&__pyx_n_s_dynamicSMemSize,&__pyx_n_s_flags_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockSize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", 1, 4, 4, 1); __PYX_ERR(0, 29584, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamicSMemSize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", 1, 4, 4, 2); __PYX_ERR(0, 29584, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", 1, 4, 4, 3); __PYX_ERR(0, 29584, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags") < 0)) __PYX_ERR(0, 29584, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_func = values[0];
    __pyx_v_blockSize = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_blockSize == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29584, __pyx_L3_error)
    __pyx_v_dynamicSMemSize = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_dynamicSMemSize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 29584, __pyx_L3_error)
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29584, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29584, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_624cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(__pyx_self, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_624cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize, unsigned int __pyx_v_flags) {
  CUfunction __pyx_v_cfunc;
  PyObject *__pyx_v_pfunc = NULL;
  int __pyx_v_numBlocks;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__936)
  __Pyx_RefNannySetupContext("cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", 0);
  __Pyx_TraceCall("cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_f[0], 29584, 0, __PYX_ERR(0, 29584, __pyx_L1_error));

  /* "cuda/cuda.pyx":29629
 *     """
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_func == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29630
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 */
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29629
 *     """
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29631
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_func, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29632
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29633
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 *     else:
 *         pfunc = int(CUfunction(func))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29633, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29631
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29635
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 *         pfunc = int(CUfunction(func))             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29636
 *     else:
 *         pfunc = int(CUfunction(func))
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 * 
 *     cdef int numBlocks = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29636, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29638
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 *     cdef int numBlocks = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(&numBlocks, cfunc, blockSize, dynamicSMemSize, flags)
 *     return (CUresult(err), numBlocks)
 */
  __pyx_v_numBlocks = 0;

  /* "cuda/cuda.pyx":29639
 * 
 *     cdef int numBlocks = 0
 *     err = ccuda.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(&numBlocks, cfunc, blockSize, dynamicSMemSize, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), numBlocks)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags((&__pyx_v_numBlocks), __pyx_v_cfunc, __pyx_v_blockSize, __pyx_v_dynamicSMemSize, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29639, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29640
 *     cdef int numBlocks = 0
 *     err = ccuda.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(&numBlocks, cfunc, blockSize, dynamicSMemSize, flags)
 *     return (CUresult(err), numBlocks)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_numBlocks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29584
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, size_t dynamicSMemSize, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Returns occupancy of a function.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29643
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxPotentialBlockSize(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit):             # <<<<<<<<<<<<<<
 *     """ Suggest a launch configuration with reasonable occupancy.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_627cuOccupancyMaxPotentialBlockSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_626cuOccupancyMaxPotentialBlockSize[] = "cuOccupancyMaxPotentialBlockSize(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit)\n Suggest a launch configuration with reasonable occupancy.\n\n    Returns in `*blockSize` a reasonable block size that can achieve the\n    maximum occupancy (or, the maximum number of active warps with the\n    fewest blocks per multiprocessor), and in `*minGridSize` the minimum\n    grid size to achieve the maximum occupancy.\n\n    If `blockSizeLimit` is 0, the configurator will use the maximum block\n    size permitted by the device / function instead.\n\n    If per-block dynamic shared memory allocation is not needed, the user\n    should leave both `blockSizeToDynamicSMemSize` and `dynamicSMemSize` as\n    0.\n\n    If per-block dynamic shared memory allocation is needed, then if the\n    dynamic shared memory size is constant regardless of block size, the\n    size should be passed through `dynamicSMemSize`, and\n    `blockSizeToDynamicSMemSize` should be NULL.\n\n    Otherwise, if the per-block dynamic shared memory size varies with\n    different block sizes, the user needs to provide a unary function\n    through `blockSizeToDynamicSMemSize` that computes the dynamic shared\n    memory needed by `func` for any given block size. `dynamicSMemSize` is\n    ignored. An example signature is:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    Parameters\n    ----------\n    func : :py:obj:`~.CUfunction`\n        Kernel for which launch configuration is calculated\n    blockSizeToDynamicSMemSize : :py:obj:`~.CUoccupancyB2DSize`\n        A function that calculates how much per-block dynamic shared memory\n        `func` uses based on the block size\n    dynamicSMemSize : size_t\n        Dynamic shared memory usage intended, in bytes\n    blockSizeLimit : int\n        The maximum block size `func` is designed to handle\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :""py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    minGridSize : int\n        Returned minimum grid size needed to achieve the maximum occupancy\n    blockSize : int\n        Returned maximum block size that can achieve the maximum occupancy\n\n    See Also\n    --------\n    :py:obj:`~.cudaOccupancyMaxPotentialBlockSize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_627cuOccupancyMaxPotentialBlockSize = {"cuOccupancyMaxPotentialBlockSize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_627cuOccupancyMaxPotentialBlockSize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_626cuOccupancyMaxPotentialBlockSize};
static PyObject *__pyx_pw_4cuda_4cuda_627cuOccupancyMaxPotentialBlockSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_blockSizeToDynamicSMemSize = 0;
  size_t __pyx_v_dynamicSMemSize;
  int __pyx_v_blockSizeLimit;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuOccupancyMaxPotentialBlockSize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_2,&__pyx_n_s_blockSizeToDynamicSMemSize,&__pyx_n_s_dynamicSMemSize,&__pyx_n_s_blockSizeLimit,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockSizeToDynamicSMemSize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxPotentialBlockSize", 1, 4, 4, 1); __PYX_ERR(0, 29643, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamicSMemSize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxPotentialBlockSize", 1, 4, 4, 2); __PYX_ERR(0, 29643, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockSizeLimit)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxPotentialBlockSize", 1, 4, 4, 3); __PYX_ERR(0, 29643, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuOccupancyMaxPotentialBlockSize") < 0)) __PYX_ERR(0, 29643, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_func = values[0];
    __pyx_v_blockSizeToDynamicSMemSize = values[1];
    __pyx_v_dynamicSMemSize = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_dynamicSMemSize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 29643, __pyx_L3_error)
    __pyx_v_blockSizeLimit = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_blockSizeLimit == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29643, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxPotentialBlockSize", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29643, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyMaxPotentialBlockSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_626cuOccupancyMaxPotentialBlockSize(__pyx_self, __pyx_v_func, __pyx_v_blockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_626cuOccupancyMaxPotentialBlockSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, PyObject *__pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit) {
  CUoccupancyB2DSize __pyx_v_cblockSizeToDynamicSMemSize;
  PyObject *__pyx_v_pblockSizeToDynamicSMemSize = NULL;
  CUfunction __pyx_v_cfunc;
  PyObject *__pyx_v_pfunc = NULL;
  int __pyx_v_minGridSize;
  int __pyx_v_blockSize;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__937)
  __Pyx_RefNannySetupContext("cuOccupancyMaxPotentialBlockSize", 0);
  __Pyx_TraceCall("cuOccupancyMaxPotentialBlockSize", __pyx_f[0], 29643, 0, __PYX_ERR(0, 29643, __pyx_L1_error));

  /* "cuda/cuda.pyx":29697
 *     """
 *     cdef ccuda.CUoccupancyB2DSize cblockSizeToDynamicSMemSize
 *     if blockSizeToDynamicSMemSize is None:             # <<<<<<<<<<<<<<
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>0
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):
 */
  __pyx_t_1 = (__pyx_v_blockSizeToDynamicSMemSize == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29698
 *     cdef ccuda.CUoccupancyB2DSize cblockSizeToDynamicSMemSize
 *     if blockSizeToDynamicSMemSize is None:
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):
 *         pblockSizeToDynamicSMemSize = int(blockSizeToDynamicSMemSize)
 */
    __pyx_v_cblockSizeToDynamicSMemSize = ((CUoccupancyB2DSize)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29697
 *     """
 *     cdef ccuda.CUoccupancyB2DSize cblockSizeToDynamicSMemSize
 *     if blockSizeToDynamicSMemSize is None:             # <<<<<<<<<<<<<<
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>0
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29699
 *     if blockSizeToDynamicSMemSize is None:
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>0
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):             # <<<<<<<<<<<<<<
 *         pblockSizeToDynamicSMemSize = int(blockSizeToDynamicSMemSize)
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_blockSizeToDynamicSMemSize, __pyx_ptype_4cuda_4cuda_CUoccupancyB2DSize); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29700
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>0
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):
 *         pblockSizeToDynamicSMemSize = int(blockSizeToDynamicSMemSize)             # <<<<<<<<<<<<<<
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_blockSizeToDynamicSMemSize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pblockSizeToDynamicSMemSize = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29701
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):
 *         pblockSizeToDynamicSMemSize = int(blockSizeToDynamicSMemSize)
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize             # <<<<<<<<<<<<<<
 *     else:
 *         pblockSizeToDynamicSMemSize = int(CUoccupancyB2DSize(blockSizeToDynamicSMemSize))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pblockSizeToDynamicSMemSize); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29701, __pyx_L1_error)
    __pyx_v_cblockSizeToDynamicSMemSize = ((CUoccupancyB2DSize)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29699
 *     if blockSizeToDynamicSMemSize is None:
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>0
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):             # <<<<<<<<<<<<<<
 *         pblockSizeToDynamicSMemSize = int(blockSizeToDynamicSMemSize)
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29703
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize
 *     else:
 *         pblockSizeToDynamicSMemSize = int(CUoccupancyB2DSize(blockSizeToDynamicSMemSize))             # <<<<<<<<<<<<<<
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUoccupancyB2DSize), __pyx_v_blockSizeToDynamicSMemSize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pblockSizeToDynamicSMemSize = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29704
 *     else:
 *         pblockSizeToDynamicSMemSize = int(CUoccupancyB2DSize(blockSizeToDynamicSMemSize))
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUfunction cfunc
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pblockSizeToDynamicSMemSize); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29704, __pyx_L1_error)
    __pyx_v_cblockSizeToDynamicSMemSize = ((CUoccupancyB2DSize)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29707
 * 
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_func == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29708
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 */
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29707
 * 
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29709
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_func, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29710
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_func); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29711
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 *     else:
 *         pfunc = int(CUfunction(func))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29711, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29709
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29713
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 *         pfunc = int(CUfunction(func))             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_func); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29714
 *     else:
 *         pfunc = int(CUfunction(func))
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 * 
 *     cdef int minGridSize = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29714, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":29716
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 *     cdef int minGridSize = 0             # <<<<<<<<<<<<<<
 *     cdef int blockSize = 0
 *     err = ccuda.cuOccupancyMaxPotentialBlockSize(&minGridSize, &blockSize, cfunc, cblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 */
  __pyx_v_minGridSize = 0;

  /* "cuda/cuda.pyx":29717
 * 
 *     cdef int minGridSize = 0
 *     cdef int blockSize = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuOccupancyMaxPotentialBlockSize(&minGridSize, &blockSize, cfunc, cblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 *     return (CUresult(err), minGridSize, blockSize)
 */
  __pyx_v_blockSize = 0;

  /* "cuda/cuda.pyx":29718
 *     cdef int minGridSize = 0
 *     cdef int blockSize = 0
 *     err = ccuda.cuOccupancyMaxPotentialBlockSize(&minGridSize, &blockSize, cfunc, cblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), minGridSize, blockSize)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialBlockSize((&__pyx_v_minGridSize), (&__pyx_v_blockSize), __pyx_v_cfunc, __pyx_v_cblockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29718, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29719
 *     cdef int blockSize = 0
 *     err = ccuda.cuOccupancyMaxPotentialBlockSize(&minGridSize, &blockSize, cfunc, cblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 *     return (CUresult(err), minGridSize, blockSize)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_minGridSize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_blockSize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29643
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxPotentialBlockSize(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit):             # <<<<<<<<<<<<<<
 *     """ Suggest a launch configuration with reasonable occupancy.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyMaxPotentialBlockSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pblockSizeToDynamicSMemSize);
  __Pyx_XDECREF(__pyx_v_pfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29722
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxPotentialBlockSizeWithFlags(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Suggest a launch configuration with reasonable occupancy.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_629cuOccupancyMaxPotentialBlockSizeWithFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_628cuOccupancyMaxPotentialBlockSizeWithFlags[] = "cuOccupancyMaxPotentialBlockSizeWithFlags(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags)\n Suggest a launch configuration with reasonable occupancy.\n\n    An extended version of :py:obj:`~.cuOccupancyMaxPotentialBlockSize`. In\n    addition to arguments passed to\n    :py:obj:`~.cuOccupancyMaxPotentialBlockSize`,\n    :py:obj:`~.cuOccupancyMaxPotentialBlockSizeWithFlags` also takes a\n    `Flags` parameter.\n\n    The `Flags` parameter controls how special cases are handled. The valid\n    flags are:\n\n    - :py:obj:`~.CU_OCCUPANCY_DEFAULT`, which maintains the default\n      behavior as :py:obj:`~.cuOccupancyMaxPotentialBlockSize`;\n\n    - :py:obj:`~.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE`, which suppresses\n      the default behavior on platform where global caching affects\n      occupancy. On such platforms, the launch configurations that produces\n      maximal occupancy might not support global caching. Setting\n      :py:obj:`~.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE` guarantees that the\n      the produced launch configuration is global caching compatible at a\n      potential cost of occupancy. More information can be found about this\n      feature in the \"Unified L1/Texture Cache\" section of the Maxwell\n      tuning guide.\n\n    Parameters\n    ----------\n    func : :py:obj:`~.CUfunction`\n        Kernel for which launch configuration is calculated\n    blockSizeToDynamicSMemSize : :py:obj:`~.CUoccupancyB2DSize`\n        A function that calculates how much per-block dynamic shared memory\n        `func` uses based on the block size\n    dynamicSMemSize : size_t\n        Dynamic shared memory usage intended, in bytes\n    blockSizeLimit : int\n        The maximum block size `func` is designed to handle\n    flags : unsigned int\n        Options\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:""obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    minGridSize : int\n        Returned minimum grid size needed to achieve the maximum occupancy\n    blockSize : int\n        Returned maximum block size that can achieve the maximum occupancy\n\n    See Also\n    --------\n    :py:obj:`~.cudaOccupancyMaxPotentialBlockSizeWithFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_629cuOccupancyMaxPotentialBlockSizeWithFlags = {"cuOccupancyMaxPotentialBlockSizeWithFlags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_629cuOccupancyMaxPotentialBlockSizeWithFlags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_628cuOccupancyMaxPotentialBlockSizeWithFlags};
static PyObject *__pyx_pw_4cuda_4cuda_629cuOccupancyMaxPotentialBlockSizeWithFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_blockSizeToDynamicSMemSize = 0;
  size_t __pyx_v_dynamicSMemSize;
  int __pyx_v_blockSizeLimit;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuOccupancyMaxPotentialBlockSizeWithFlags (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_2,&__pyx_n_s_blockSizeToDynamicSMemSize,&__pyx_n_s_dynamicSMemSize,&__pyx_n_s_blockSizeLimit,&__pyx_n_s_flags_2,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockSizeToDynamicSMemSize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxPotentialBlockSizeWithFlags", 1, 5, 5, 1); __PYX_ERR(0, 29722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dynamicSMemSize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxPotentialBlockSizeWithFlags", 1, 5, 5, 2); __PYX_ERR(0, 29722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockSizeLimit)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxPotentialBlockSizeWithFlags", 1, 5, 5, 3); __PYX_ERR(0, 29722, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxPotentialBlockSizeWithFlags", 1, 5, 5, 4); __PYX_ERR(0, 29722, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuOccupancyMaxPotentialBlockSizeWithFlags") < 0)) __PYX_ERR(0, 29722, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_func = values[0];
    __pyx_v_blockSizeToDynamicSMemSize = values[1];
    __pyx_v_dynamicSMemSize = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_dynamicSMemSize == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 29722, __pyx_L3_error)
    __pyx_v_blockSizeLimit = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_blockSizeLimit == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29722, __pyx_L3_error)
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[4]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29722, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxPotentialBlockSizeWithFlags", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29722, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyMaxPotentialBlockSizeWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_628cuOccupancyMaxPotentialBlockSizeWithFlags(__pyx_self, __pyx_v_func, __pyx_v_blockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_628cuOccupancyMaxPotentialBlockSizeWithFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, PyObject *__pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit, unsigned int __pyx_v_flags) {
  CUoccupancyB2DSize __pyx_v_cblockSizeToDynamicSMemSize;
  PyObject *__pyx_v_pblockSizeToDynamicSMemSize = NULL;
  CUfunction __pyx_v_cfunc;
  PyObject *__pyx_v_pfunc = NULL;
  int __pyx_v_minGridSize;
  int __pyx_v_blockSize;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__938)
  __Pyx_RefNannySetupContext("cuOccupancyMaxPotentialBlockSizeWithFlags", 0);
  __Pyx_TraceCall("cuOccupancyMaxPotentialBlockSizeWithFlags", __pyx_f[0], 29722, 0, __PYX_ERR(0, 29722, __pyx_L1_error));

  /* "cuda/cuda.pyx":29775
 *     """
 *     cdef ccuda.CUoccupancyB2DSize cblockSizeToDynamicSMemSize
 *     if blockSizeToDynamicSMemSize is None:             # <<<<<<<<<<<<<<
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>0
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):
 */
  __pyx_t_1 = (__pyx_v_blockSizeToDynamicSMemSize == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29776
 *     cdef ccuda.CUoccupancyB2DSize cblockSizeToDynamicSMemSize
 *     if blockSizeToDynamicSMemSize is None:
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):
 *         pblockSizeToDynamicSMemSize = int(blockSizeToDynamicSMemSize)
 */
    __pyx_v_cblockSizeToDynamicSMemSize = ((CUoccupancyB2DSize)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29775
 *     """
 *     cdef ccuda.CUoccupancyB2DSize cblockSizeToDynamicSMemSize
 *     if blockSizeToDynamicSMemSize is None:             # <<<<<<<<<<<<<<
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>0
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29777
 *     if blockSizeToDynamicSMemSize is None:
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>0
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):             # <<<<<<<<<<<<<<
 *         pblockSizeToDynamicSMemSize = int(blockSizeToDynamicSMemSize)
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_blockSizeToDynamicSMemSize, __pyx_ptype_4cuda_4cuda_CUoccupancyB2DSize); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29778
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>0
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):
 *         pblockSizeToDynamicSMemSize = int(blockSizeToDynamicSMemSize)             # <<<<<<<<<<<<<<
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_blockSizeToDynamicSMemSize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pblockSizeToDynamicSMemSize = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29779
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):
 *         pblockSizeToDynamicSMemSize = int(blockSizeToDynamicSMemSize)
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize             # <<<<<<<<<<<<<<
 *     else:
 *         pblockSizeToDynamicSMemSize = int(CUoccupancyB2DSize(blockSizeToDynamicSMemSize))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pblockSizeToDynamicSMemSize); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29779, __pyx_L1_error)
    __pyx_v_cblockSizeToDynamicSMemSize = ((CUoccupancyB2DSize)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29777
 *     if blockSizeToDynamicSMemSize is None:
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>0
 *     elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize)):             # <<<<<<<<<<<<<<
 *         pblockSizeToDynamicSMemSize = int(blockSizeToDynamicSMemSize)
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29781
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize
 *     else:
 *         pblockSizeToDynamicSMemSize = int(CUoccupancyB2DSize(blockSizeToDynamicSMemSize))             # <<<<<<<<<<<<<<
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUoccupancyB2DSize), __pyx_v_blockSizeToDynamicSMemSize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pblockSizeToDynamicSMemSize = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29782
 *     else:
 *         pblockSizeToDynamicSMemSize = int(CUoccupancyB2DSize(blockSizeToDynamicSMemSize))
 *         cblockSizeToDynamicSMemSize = <ccuda.CUoccupancyB2DSize><void_ptr>pblockSizeToDynamicSMemSize             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUfunction cfunc
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pblockSizeToDynamicSMemSize); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29782, __pyx_L1_error)
    __pyx_v_cblockSizeToDynamicSMemSize = ((CUoccupancyB2DSize)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29785
 * 
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_func == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29786
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 */
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29785
 * 
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29787
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_func, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29788
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_func); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29789
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 *     else:
 *         pfunc = int(CUfunction(func))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29789, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29787
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29791
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 *         pfunc = int(CUfunction(func))             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_func); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29792
 *     else:
 *         pfunc = int(CUfunction(func))
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 * 
 *     cdef int minGridSize = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29792, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":29794
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 *     cdef int minGridSize = 0             # <<<<<<<<<<<<<<
 *     cdef int blockSize = 0
 *     err = ccuda.cuOccupancyMaxPotentialBlockSizeWithFlags(&minGridSize, &blockSize, cfunc, cblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 */
  __pyx_v_minGridSize = 0;

  /* "cuda/cuda.pyx":29795
 * 
 *     cdef int minGridSize = 0
 *     cdef int blockSize = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuOccupancyMaxPotentialBlockSizeWithFlags(&minGridSize, &blockSize, cfunc, cblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 *     return (CUresult(err), minGridSize, blockSize)
 */
  __pyx_v_blockSize = 0;

  /* "cuda/cuda.pyx":29796
 *     cdef int minGridSize = 0
 *     cdef int blockSize = 0
 *     err = ccuda.cuOccupancyMaxPotentialBlockSizeWithFlags(&minGridSize, &blockSize, cfunc, cblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), minGridSize, blockSize)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialBlockSizeWithFlags((&__pyx_v_minGridSize), (&__pyx_v_blockSize), __pyx_v_cfunc, __pyx_v_cblockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29796, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29797
 *     cdef int blockSize = 0
 *     err = ccuda.cuOccupancyMaxPotentialBlockSizeWithFlags(&minGridSize, &blockSize, cfunc, cblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 *     return (CUresult(err), minGridSize, blockSize)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_minGridSize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_blockSize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29722
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxPotentialBlockSizeWithFlags(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Suggest a launch configuration with reasonable occupancy.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyMaxPotentialBlockSizeWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pblockSizeToDynamicSMemSize);
  __Pyx_XDECREF(__pyx_v_pfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29800
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize):             # <<<<<<<<<<<<<<
 *     """ Returns dynamic shared memory available per block when launching `numBlocks` blocks on SM.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_631cuOccupancyAvailableDynamicSMemPerBlock(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_630cuOccupancyAvailableDynamicSMemPerBlock[] = "cuOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize)\n Returns dynamic shared memory available per block when launching `numBlocks` blocks on SM.\n\n    Returns in `*dynamicSmemSize` the maximum size of dynamic shared memory\n    to allow `numBlocks` blocks per SM.\n\n    Parameters\n    ----------\n    func : :py:obj:`~.CUfunction`\n        Kernel function for which occupancy is calculated\n    numBlocks : int\n        Number of blocks to fit on SM\n    blockSize : int\n        Size of the blocks\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    dynamicSmemSize : int\n        Returned maximum dynamic shared memory\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_631cuOccupancyAvailableDynamicSMemPerBlock = {"cuOccupancyAvailableDynamicSMemPerBlock", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_631cuOccupancyAvailableDynamicSMemPerBlock, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_630cuOccupancyAvailableDynamicSMemPerBlock};
static PyObject *__pyx_pw_4cuda_4cuda_631cuOccupancyAvailableDynamicSMemPerBlock(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  int __pyx_v_numBlocks;
  int __pyx_v_blockSize;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuOccupancyAvailableDynamicSMemPerBlock (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_2,&__pyx_n_s_numBlocks,&__pyx_n_s_blockSize,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numBlocks)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyAvailableDynamicSMemPerBlock", 1, 3, 3, 1); __PYX_ERR(0, 29800, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blockSize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyAvailableDynamicSMemPerBlock", 1, 3, 3, 2); __PYX_ERR(0, 29800, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuOccupancyAvailableDynamicSMemPerBlock") < 0)) __PYX_ERR(0, 29800, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_func = values[0];
    __pyx_v_numBlocks = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_numBlocks == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29800, __pyx_L3_error)
    __pyx_v_blockSize = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_blockSize == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29800, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuOccupancyAvailableDynamicSMemPerBlock", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29800, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyAvailableDynamicSMemPerBlock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_630cuOccupancyAvailableDynamicSMemPerBlock(__pyx_self, __pyx_v_func, __pyx_v_numBlocks, __pyx_v_blockSize);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_630cuOccupancyAvailableDynamicSMemPerBlock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, int __pyx_v_numBlocks, int __pyx_v_blockSize) {
  CUfunction __pyx_v_cfunc;
  PyObject *__pyx_v_pfunc = NULL;
  size_t __pyx_v_dynamicSmemSize;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__939)
  __Pyx_RefNannySetupContext("cuOccupancyAvailableDynamicSMemPerBlock", 0);
  __Pyx_TraceCall("cuOccupancyAvailableDynamicSMemPerBlock", __pyx_f[0], 29800, 0, __PYX_ERR(0, 29800, __pyx_L1_error));

  /* "cuda/cuda.pyx":29823
 *     """
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_func == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29824
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 */
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29823
 *     """
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29825
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_func, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29826
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29827
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 *     else:
 *         pfunc = int(CUfunction(func))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29827, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29825
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29829
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 *         pfunc = int(CUfunction(func))             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29830
 *     else:
 *         pfunc = int(CUfunction(func))
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 * 
 *     cdef size_t dynamicSmemSize = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29830, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29832
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 *     cdef size_t dynamicSmemSize = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuOccupancyAvailableDynamicSMemPerBlock(&dynamicSmemSize, cfunc, numBlocks, blockSize)
 *     return (CUresult(err), dynamicSmemSize)
 */
  __pyx_v_dynamicSmemSize = 0;

  /* "cuda/cuda.pyx":29833
 * 
 *     cdef size_t dynamicSmemSize = 0
 *     err = ccuda.cuOccupancyAvailableDynamicSMemPerBlock(&dynamicSmemSize, cfunc, numBlocks, blockSize)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), dynamicSmemSize)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuOccupancyAvailableDynamicSMemPerBlock((&__pyx_v_dynamicSmemSize), __pyx_v_cfunc, __pyx_v_numBlocks, __pyx_v_blockSize); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29833, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29834
 *     cdef size_t dynamicSmemSize = 0
 *     err = ccuda.cuOccupancyAvailableDynamicSMemPerBlock(&dynamicSmemSize, cfunc, numBlocks, blockSize)
 *     return (CUresult(err), dynamicSmemSize)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_dynamicSmemSize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29800
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize):             # <<<<<<<<<<<<<<
 *     """ Returns dynamic shared memory available per block when launching `numBlocks` blocks on SM.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyAvailableDynamicSMemPerBlock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29837
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxPotentialClusterSize(func, config : CUlaunchConfig):             # <<<<<<<<<<<<<<
 *     """ Given the kernel function (`func`) and launch configuration (`config`), return the maximum cluster size in `*clusterSize`.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_633cuOccupancyMaxPotentialClusterSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_632cuOccupancyMaxPotentialClusterSize[] = "cuOccupancyMaxPotentialClusterSize(func, CUlaunchConfig config: CUlaunchConfig)\n Given the kernel function (`func`) and launch configuration (`config`), return the maximum cluster size in `*clusterSize`.\n\n    The cluster dimensions in `config` are ignored. If func has a required\n    cluster size set (see :py:obj:`~.cudaFuncGetAttributes` /\n    :py:obj:`~.cuFuncGetAttribute`),`*clusterSize` will reflect the\n    required cluster size.\n\n    By default this function will always return a value that's portable on\n    future hardware. A higher value may be returned if the kernel function\n    allows non-portable cluster sizes.\n\n    This function will respect the compile time launch bounds.\n\n    Parameters\n    ----------\n    func : :py:obj:`~.CUfunction`\n        Kernel function for which maximum cluster size is calculated\n    config : :py:obj:`~.CUlaunchConfig`\n        Launch configuration for the given kernel function\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    clusterSize : int\n        Returned maximum cluster size that can be launched for the given\n        kernel function and launch configuration\n\n    See Also\n    --------\n    :py:obj:`~.cudaFuncGetAttributes` :py:obj:`~.cuFuncGetAttributes`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_633cuOccupancyMaxPotentialClusterSize = {"cuOccupancyMaxPotentialClusterSize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_633cuOccupancyMaxPotentialClusterSize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_632cuOccupancyMaxPotentialClusterSize};
static PyObject *__pyx_pw_4cuda_4cuda_633cuOccupancyMaxPotentialClusterSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  struct __pyx_obj_4cuda_4cuda_CUlaunchConfig *__pyx_v_config = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuOccupancyMaxPotentialClusterSize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_2,&__pyx_n_s_config,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxPotentialClusterSize", 1, 2, 2, 1); __PYX_ERR(0, 29837, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuOccupancyMaxPotentialClusterSize") < 0)) __PYX_ERR(0, 29837, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_func = values[0];
    __pyx_v_config = ((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxPotentialClusterSize", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29837, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyMaxPotentialClusterSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_config), __pyx_ptype_4cuda_4cuda_CUlaunchConfig, 1, "config", 0))) __PYX_ERR(0, 29837, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_632cuOccupancyMaxPotentialClusterSize(__pyx_self, __pyx_v_func, __pyx_v_config);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_632cuOccupancyMaxPotentialClusterSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, struct __pyx_obj_4cuda_4cuda_CUlaunchConfig *__pyx_v_config) {
  CUfunction __pyx_v_cfunc;
  PyObject *__pyx_v_pfunc = NULL;
  int __pyx_v_clusterSize;
  CUlaunchConfig *__pyx_v_cconfig_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUlaunchConfig_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__940)
  __Pyx_RefNannySetupContext("cuOccupancyMaxPotentialClusterSize", 0);
  __Pyx_TraceCall("cuOccupancyMaxPotentialClusterSize", __pyx_f[0], 29837, 0, __PYX_ERR(0, 29837, __pyx_L1_error));

  /* "cuda/cuda.pyx":29871
 *     """
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_func == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29872
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 */
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29871
 *     """
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29873
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_func, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29874
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29875
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 *     else:
 *         pfunc = int(CUfunction(func))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29875, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29873
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29877
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 *         pfunc = int(CUfunction(func))             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29878
 *     else:
 *         pfunc = int(CUfunction(func))
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 * 
 *     cdef int clusterSize = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29878, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29880
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 *     cdef int clusterSize = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUlaunchConfig* cconfig_ptr = config._ptr if config != None else NULL
 *     err = ccuda.cuOccupancyMaxPotentialClusterSize(&clusterSize, cfunc, cconfig_ptr)
 */
  __pyx_v_clusterSize = 0;

  /* "cuda/cuda.pyx":29881
 * 
 *     cdef int clusterSize = 0
 *     cdef ccuda.CUlaunchConfig* cconfig_ptr = config._ptr if config != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuOccupancyMaxPotentialClusterSize(&clusterSize, cfunc, cconfig_ptr)
 *     return (CUresult(err), clusterSize)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_config), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29881, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 29881, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_config->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cconfig_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":29882
 *     cdef int clusterSize = 0
 *     cdef ccuda.CUlaunchConfig* cconfig_ptr = config._ptr if config != None else NULL
 *     err = ccuda.cuOccupancyMaxPotentialClusterSize(&clusterSize, cfunc, cconfig_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), clusterSize)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialClusterSize((&__pyx_v_clusterSize), __pyx_v_cfunc, __pyx_v_cconfig_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29882, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":29883
 *     cdef ccuda.CUlaunchConfig* cconfig_ptr = config._ptr if config != None else NULL
 *     err = ccuda.cuOccupancyMaxPotentialClusterSize(&clusterSize, cfunc, cconfig_ptr)
 *     return (CUresult(err), clusterSize)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_clusterSize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29837
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxPotentialClusterSize(func, config : CUlaunchConfig):             # <<<<<<<<<<<<<<
 *     """ Given the kernel function (`func`) and launch configuration (`config`), return the maximum cluster size in `*clusterSize`.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyMaxPotentialClusterSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29886
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxActiveClusters(func, config : CUlaunchConfig):             # <<<<<<<<<<<<<<
 *     """ Given the kernel function (`func`) and launch configuration (`config`), return the maximum number of clusters that could co-exist on the target device in `*numClusters`.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_635cuOccupancyMaxActiveClusters(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_634cuOccupancyMaxActiveClusters[] = "cuOccupancyMaxActiveClusters(func, CUlaunchConfig config: CUlaunchConfig)\n Given the kernel function (`func`) and launch configuration (`config`), return the maximum number of clusters that could co-exist on the target device in `*numClusters`.\n\n    If the function has required cluster size already set (see\n    :py:obj:`~.cudaFuncGetAttributes` / :py:obj:`~.cuFuncGetAttribute`),\n    the cluster size from config must either be unspecified or match the\n    required size. Without required sizes, the cluster size must be\n    specified in config, else the function will return an error.\n\n    Note that various attributes of the kernel function may affect\n    occupancy calculation. Runtime environment may affect how the hardware\n    schedules the clusters, so the calculated occupancy is not guaranteed\n    to be achievable.\n\n    Parameters\n    ----------\n    func : :py:obj:`~.CUfunction`\n        Kernel function for which maximum number of clusters are calculated\n    config : :py:obj:`~.CUlaunchConfig`\n        Launch configuration for the given kernel function\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_CLUSTER_SIZE`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n    numClusters : int\n        Returned maximum number of clusters that could co-exist on the\n        target device\n\n    See Also\n    --------\n    :py:obj:`~.cudaFuncGetAttributes` :py:obj:`~.cuFuncGetAttributes`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_635cuOccupancyMaxActiveClusters = {"cuOccupancyMaxActiveClusters", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_635cuOccupancyMaxActiveClusters, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_634cuOccupancyMaxActiveClusters};
static PyObject *__pyx_pw_4cuda_4cuda_635cuOccupancyMaxActiveClusters(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  struct __pyx_obj_4cuda_4cuda_CUlaunchConfig *__pyx_v_config = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuOccupancyMaxActiveClusters (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_2,&__pyx_n_s_config,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxActiveClusters", 1, 2, 2, 1); __PYX_ERR(0, 29886, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuOccupancyMaxActiveClusters") < 0)) __PYX_ERR(0, 29886, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_func = values[0];
    __pyx_v_config = ((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuOccupancyMaxActiveClusters", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29886, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyMaxActiveClusters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_config), __pyx_ptype_4cuda_4cuda_CUlaunchConfig, 1, "config", 0))) __PYX_ERR(0, 29886, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_634cuOccupancyMaxActiveClusters(__pyx_self, __pyx_v_func, __pyx_v_config);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_634cuOccupancyMaxActiveClusters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func, struct __pyx_obj_4cuda_4cuda_CUlaunchConfig *__pyx_v_config) {
  CUfunction __pyx_v_cfunc;
  PyObject *__pyx_v_pfunc = NULL;
  int __pyx_v_numClusters;
  CUlaunchConfig *__pyx_v_cconfig_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUlaunchConfig_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__941)
  __Pyx_RefNannySetupContext("cuOccupancyMaxActiveClusters", 0);
  __Pyx_TraceCall("cuOccupancyMaxActiveClusters", __pyx_f[0], 29886, 0, __PYX_ERR(0, 29886, __pyx_L1_error));

  /* "cuda/cuda.pyx":29920
 *     """
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
  __pyx_t_1 = (__pyx_v_func == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29921
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 */
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29920
 *     """
 *     cdef ccuda.CUfunction cfunc
 *     if func is None:             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29922
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_func, __pyx_ptype_4cuda_4cuda_CUfunction); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29923
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pfunc = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29924
 *     elif isinstance(func, (CUfunction)):
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 *     else:
 *         pfunc = int(CUfunction(func))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29924, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29922
 *     if func is None:
 *         cfunc = <ccuda.CUfunction><void_ptr>0
 *     elif isinstance(func, (CUfunction)):             # <<<<<<<<<<<<<<
 *         pfunc = int(func)
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29926
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 *     else:
 *         pfunc = int(CUfunction(func))             # <<<<<<<<<<<<<<
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), __pyx_v_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pfunc = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29927
 *     else:
 *         pfunc = int(CUfunction(func))
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc             # <<<<<<<<<<<<<<
 * 
 *     cdef int numClusters = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pfunc); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29927, __pyx_L1_error)
    __pyx_v_cfunc = ((CUfunction)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29929
 *         cfunc = <ccuda.CUfunction><void_ptr>pfunc
 * 
 *     cdef int numClusters = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUlaunchConfig* cconfig_ptr = config._ptr if config != None else NULL
 *     err = ccuda.cuOccupancyMaxActiveClusters(&numClusters, cfunc, cconfig_ptr)
 */
  __pyx_v_numClusters = 0;

  /* "cuda/cuda.pyx":29930
 * 
 *     cdef int numClusters = 0
 *     cdef ccuda.CUlaunchConfig* cconfig_ptr = config._ptr if config != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuOccupancyMaxActiveClusters(&numClusters, cfunc, cconfig_ptr)
 *     return (CUresult(err), numClusters)
 */
  __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_config), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29930, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 29930, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_config->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cconfig_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":29931
 *     cdef int numClusters = 0
 *     cdef ccuda.CUlaunchConfig* cconfig_ptr = config._ptr if config != None else NULL
 *     err = ccuda.cuOccupancyMaxActiveClusters(&numClusters, cfunc, cconfig_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), numClusters)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveClusters((&__pyx_v_numClusters), __pyx_v_cfunc, __pyx_v_cconfig_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29931, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":29932
 *     cdef ccuda.CUlaunchConfig* cconfig_ptr = config._ptr if config != None else NULL
 *     err = ccuda.cuOccupancyMaxActiveClusters(&numClusters, cfunc, cconfig_ptr)
 *     return (CUresult(err), numClusters)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_numClusters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 29932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29886
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxActiveClusters(func, config : CUlaunchConfig):             # <<<<<<<<<<<<<<
 *     """ Given the kernel function (`func`) and launch configuration (`config`), return the maximum number of clusters that could co-exist on the target device in `*numClusters`.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuOccupancyMaxActiveClusters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pfunc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29935
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetArray(hTexRef, hArray, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Binds an array as a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_637cuTexRefSetArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_636cuTexRefSetArray[] = "cuTexRefSetArray(hTexRef, hArray, unsigned int Flags)\n Binds an array as a texture reference.\n\n    [Deprecated]\n\n    Binds the CUDA array `hArray` to the texture reference `hTexRef`. Any\n    previous address or CUDA array state associated with the texture\n    reference is superseded by this function. `Flags` must be set to\n    :py:obj:`~.CU_TRSA_OVERRIDE_FORMAT`. Any CUDA array previously bound to\n    `hTexRef` is unbound.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference to bind\n    hArray : :py:obj:`~.CUarray`\n        Array to bind\n    Flags : unsigned int\n        Options (must be :py:obj:`~.CU_TRSA_OVERRIDE_FORMAT`)\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaBindTextureToArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_637cuTexRefSetArray = {"cuTexRefSetArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_637cuTexRefSetArray, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_636cuTexRefSetArray};
static PyObject *__pyx_pw_4cuda_4cuda_637cuTexRefSetArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  PyObject *__pyx_v_hArray = 0;
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetArray (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_hArray_2,&__pyx_n_s_Flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hArray_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetArray", 1, 3, 3, 1); __PYX_ERR(0, 29935, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetArray", 1, 3, 3, 2); __PYX_ERR(0, 29935, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetArray") < 0)) __PYX_ERR(0, 29935, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_hArray = values[1];
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29935, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetArray", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29935, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_636cuTexRefSetArray(__pyx_self, __pyx_v_hTexRef, __pyx_v_hArray, __pyx_v_Flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_636cuTexRefSetArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, PyObject *__pyx_v_hArray, unsigned int __pyx_v_Flags) {
  CUarray __pyx_v_chArray;
  PyObject *__pyx_v_phArray = NULL;
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__942)
  __Pyx_RefNannySetupContext("cuTexRefSetArray", 0);
  __Pyx_TraceCall("cuTexRefSetArray", __pyx_f[0], 29935, 0, __PYX_ERR(0, 29935, __pyx_L1_error));

  /* "cuda/cuda.pyx":29965
 *     """
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_hArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29966
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)
 */
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29965
 *     """
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29967
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29968
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29969
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 *     else:
 *         phArray = int(CUarray(hArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29969, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29967
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":29971
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 *     else:
 *         phArray = int(CUarray(hArray))             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29972
 *     else:
 *         phArray = int(CUarray(hArray))
 *         chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUtexref chTexRef
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29972, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":29975
 * 
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":29976
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":29975
 * 
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29977
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":29978
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":29979
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29979, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":29977
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":29981
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29981, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29981, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":29982
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuTexRefSetArray(chTexRef, chArray, Flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 29982, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":29984
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     err = ccuda.cuTexRefSetArray(chTexRef, chArray, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefSetArray(__pyx_v_chTexRef, __pyx_v_chArray, __pyx_v_Flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 29984, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":29985
 * 
 *     err = ccuda.cuTexRefSetArray(chTexRef, chArray, Flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29935
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetArray(hTexRef, hArray, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Binds an array as a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phArray);
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":29988
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Binds a mipmapped array to a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_639cuTexRefSetMipmappedArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_638cuTexRefSetMipmappedArray[] = "cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, unsigned int Flags)\n Binds a mipmapped array to a texture reference.\n\n    [Deprecated]\n\n    Binds the CUDA mipmapped array `hMipmappedArray` to the texture\n    reference `hTexRef`. Any previous address or CUDA array state\n    associated with the texture reference is superseded by this function.\n    `Flags` must be set to :py:obj:`~.CU_TRSA_OVERRIDE_FORMAT`. Any CUDA\n    array previously bound to `hTexRef` is unbound.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference to bind\n    hMipmappedArray : :py:obj:`~.CUmipmappedArray`\n        Mipmapped array to bind\n    Flags : unsigned int\n        Options (must be :py:obj:`~.CU_TRSA_OVERRIDE_FORMAT`)\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaBindTextureToMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_639cuTexRefSetMipmappedArray = {"cuTexRefSetMipmappedArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_639cuTexRefSetMipmappedArray, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_638cuTexRefSetMipmappedArray};
static PyObject *__pyx_pw_4cuda_4cuda_639cuTexRefSetMipmappedArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  PyObject *__pyx_v_hMipmappedArray = 0;
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetMipmappedArray (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_hMipmappedArray_2,&__pyx_n_s_Flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hMipmappedArray_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetMipmappedArray", 1, 3, 3, 1); __PYX_ERR(0, 29988, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetMipmappedArray", 1, 3, 3, 2); __PYX_ERR(0, 29988, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetMipmappedArray") < 0)) __PYX_ERR(0, 29988, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_hMipmappedArray = values[1];
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29988, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetMipmappedArray", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 29988, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_638cuTexRefSetMipmappedArray(__pyx_self, __pyx_v_hTexRef, __pyx_v_hMipmappedArray, __pyx_v_Flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_638cuTexRefSetMipmappedArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, PyObject *__pyx_v_hMipmappedArray, unsigned int __pyx_v_Flags) {
  CUmipmappedArray __pyx_v_chMipmappedArray;
  PyObject *__pyx_v_phMipmappedArray = NULL;
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__943)
  __Pyx_RefNannySetupContext("cuTexRefSetMipmappedArray", 0);
  __Pyx_TraceCall("cuTexRefSetMipmappedArray", __pyx_f[0], 29988, 0, __PYX_ERR(0, 29988, __pyx_L1_error));

  /* "cuda/cuda.pyx":30018
 *     """
 *     cdef ccuda.CUmipmappedArray chMipmappedArray
 *     if hMipmappedArray is None:             # <<<<<<<<<<<<<<
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 */
  __pyx_t_1 = (__pyx_v_hMipmappedArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30019
 *     cdef ccuda.CUmipmappedArray chMipmappedArray
 *     if hMipmappedArray is None:
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 *         phMipmappedArray = int(hMipmappedArray)
 */
    __pyx_v_chMipmappedArray = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30018
 *     """
 *     cdef ccuda.CUmipmappedArray chMipmappedArray
 *     if hMipmappedArray is None:             # <<<<<<<<<<<<<<
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30020
 *     if hMipmappedArray is None:
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *         phMipmappedArray = int(hMipmappedArray)
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hMipmappedArray, __pyx_ptype_4cuda_4cuda_CUmipmappedArray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30021
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 *         phMipmappedArray = int(hMipmappedArray)             # <<<<<<<<<<<<<<
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hMipmappedArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phMipmappedArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30022
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):
 *         phMipmappedArray = int(hMipmappedArray)
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray             # <<<<<<<<<<<<<<
 *     else:
 *         phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phMipmappedArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30022, __pyx_L1_error)
    __pyx_v_chMipmappedArray = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30020
 *     if hMipmappedArray is None:
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>0
 *     elif isinstance(hMipmappedArray, (CUmipmappedArray)):             # <<<<<<<<<<<<<<
 *         phMipmappedArray = int(hMipmappedArray)
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30024
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 *     else:
 *         phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))             # <<<<<<<<<<<<<<
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray), __pyx_v_hMipmappedArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phMipmappedArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30025
 *     else:
 *         phMipmappedArray = int(CUmipmappedArray(hMipmappedArray))
 *         chMipmappedArray = <ccuda.CUmipmappedArray><void_ptr>phMipmappedArray             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUtexref chTexRef
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phMipmappedArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30025, __pyx_L1_error)
    __pyx_v_chMipmappedArray = ((CUmipmappedArray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30028
 * 
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30029
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30028
 * 
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":30030
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30031
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30032
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30032, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30030
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":30034
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30035
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuTexRefSetMipmappedArray(chTexRef, chMipmappedArray, Flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30035, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":30037
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     err = ccuda.cuTexRefSetMipmappedArray(chTexRef, chMipmappedArray, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefSetMipmappedArray(__pyx_v_chTexRef, __pyx_v_chMipmappedArray, __pyx_v_Flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30037, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30038
 * 
 *     err = ccuda.cuTexRefSetMipmappedArray(chTexRef, chMipmappedArray, Flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":29988
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Binds a mipmapped array to a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phMipmappedArray);
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30041
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetAddress(hTexRef, dptr, size_t numbytes):             # <<<<<<<<<<<<<<
 *     """ Binds an address as a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_641cuTexRefSetAddress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_640cuTexRefSetAddress[] = "cuTexRefSetAddress(hTexRef, dptr, size_t numbytes)\n Binds an address as a texture reference.\n\n    [Deprecated]\n\n    Binds a linear address range to the texture reference `hTexRef`. Any\n    previous address or CUDA array state associated with the texture\n    reference is superseded by this function. Any memory previously bound\n    to `hTexRef` is unbound.\n\n    Since the hardware enforces an alignment requirement on texture base\n    addresses, :py:obj:`~.cuTexRefSetAddress()` passes back a byte offset\n    in `*ByteOffset` that must be applied to texture fetches in order to\n    read from the desired memory. This offset must be divided by the texel\n    size and passed to kernels that read from the texture so they can be\n    applied to the :py:obj:`~.tex1Dfetch()` function.\n\n    If the device memory pointer was returned from\n    :py:obj:`~.cuMemAlloc()`, the offset is guaranteed to be 0 and NULL may\n    be passed as the `ByteOffset` parameter.\n\n    The total number of elements (or texels) in the linear address range\n    cannot exceed\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH`. The\n    number of elements is computed as (`numbytes` / bytesPerElement), where\n    bytesPerElement is determined from the data format and number of\n    components set using :py:obj:`~.cuTexRefSetFormat()`.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference to bind\n    dptr : :py:obj:`~.CUdeviceptr`\n        Device pointer to bind\n    numbytes : size_t\n        Size of memory to bind in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    ByteOffset : int\n        Returned byte offset\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`"", :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaBindTexture`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_641cuTexRefSetAddress = {"cuTexRefSetAddress", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_641cuTexRefSetAddress, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_640cuTexRefSetAddress};
static PyObject *__pyx_pw_4cuda_4cuda_641cuTexRefSetAddress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  PyObject *__pyx_v_dptr = 0;
  size_t __pyx_v_numbytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetAddress (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_dptr_2,&__pyx_n_s_numbytes,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dptr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetAddress", 1, 3, 3, 1); __PYX_ERR(0, 30041, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numbytes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetAddress", 1, 3, 3, 2); __PYX_ERR(0, 30041, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetAddress") < 0)) __PYX_ERR(0, 30041, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_dptr = values[1];
    __pyx_v_numbytes = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_numbytes == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 30041, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetAddress", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30041, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_640cuTexRefSetAddress(__pyx_self, __pyx_v_hTexRef, __pyx_v_dptr, __pyx_v_numbytes);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_640cuTexRefSetAddress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, PyObject *__pyx_v_dptr, size_t __pyx_v_numbytes) {
  CUdeviceptr __pyx_v_cdptr;
  PyObject *__pyx_v_pdptr = NULL;
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  size_t __pyx_v_ByteOffset;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__944)
  __Pyx_RefNannySetupContext("cuTexRefSetAddress", 0);
  __Pyx_TraceCall("cuTexRefSetAddress", __pyx_f[0], 30041, 0, __PYX_ERR(0, 30041, __pyx_L1_error));

  /* "cuda/cuda.pyx":30090
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30091
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 */
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30090
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30092
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30093
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30094
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30094, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30092
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30096
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30097
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUtexref chTexRef
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30097, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30100
 * 
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30101
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30100
 * 
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":30102
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30103
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30104
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30104, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30102
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":30106
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30107
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef size_t ByteOffset = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30107, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":30109
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef size_t ByteOffset = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefSetAddress(&ByteOffset, chTexRef, cdptr, numbytes)
 *     return (CUresult(err), ByteOffset)
 */
  __pyx_v_ByteOffset = 0;

  /* "cuda/cuda.pyx":30110
 * 
 *     cdef size_t ByteOffset = 0
 *     err = ccuda.cuTexRefSetAddress(&ByteOffset, chTexRef, cdptr, numbytes)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), ByteOffset)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefSetAddress((&__pyx_v_ByteOffset), __pyx_v_chTexRef, __pyx_v_cdptr, __pyx_v_numbytes); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30110, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30111
 *     cdef size_t ByteOffset = 0
 *     err = ccuda.cuTexRefSetAddress(&ByteOffset, chTexRef, cdptr, numbytes)
 *     return (CUresult(err), ByteOffset)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_ByteOffset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30041
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetAddress(hTexRef, dptr, size_t numbytes):             # <<<<<<<<<<<<<<
 *     """ Binds an address as a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdptr);
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30114
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetAddress2D(hTexRef, desc : CUDA_ARRAY_DESCRIPTOR, dptr, size_t Pitch):             # <<<<<<<<<<<<<<
 *     """ Binds an address as a 2D texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_643cuTexRefSetAddress2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_642cuTexRefSetAddress2D[] = "cuTexRefSetAddress2D(hTexRef, CUDA_ARRAY_DESCRIPTOR desc: CUDA_ARRAY_DESCRIPTOR, dptr, size_t Pitch)\n Binds an address as a 2D texture reference.\n\n    [Deprecated]\n\n    Binds a linear address range to the texture reference `hTexRef`. Any\n    previous address or CUDA array state associated with the texture\n    reference is superseded by this function. Any memory previously bound\n    to `hTexRef` is unbound.\n\n    Using a :py:obj:`~.tex2D()` function inside a kernel requires a call to\n    either :py:obj:`~.cuTexRefSetArray()` to bind the corresponding texture\n    reference to an array, or :py:obj:`~.cuTexRefSetAddress2D()` to bind\n    the texture reference to linear memory.\n\n    Function calls to :py:obj:`~.cuTexRefSetFormat()` cannot follow calls\n    to :py:obj:`~.cuTexRefSetAddress2D()` for the same texture reference.\n\n    It is required that `dptr` be aligned to the appropriate hardware-\n    specific texture alignment. You can query this value using the device\n    attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT`. If an\n    unaligned `dptr` is supplied, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is\n    returned.\n\n    `Pitch` has to be aligned to the hardware-specific texture pitch\n    alignment. This value can be queried using the device attribute\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT`. If an\n    unaligned `Pitch` is supplied, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is\n    returned.\n\n    Width and Height, which are specified in elements (or texels), cannot\n    exceed :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH`\n    and :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT`\n    respectively. `Pitch`, which is specified in bytes, cannot exceed\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH`.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference to bind\n    desc : :py:obj:`~.CUDA_ARRAY_DESCRIPTOR`\n        Descriptor of CUDA ""array\n    dptr : :py:obj:`~.CUdeviceptr`\n        Device pointer to bind\n    Pitch : size_t\n        Line pitch in bytes\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaBindTexture2D`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_643cuTexRefSetAddress2D = {"cuTexRefSetAddress2D", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_643cuTexRefSetAddress2D, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_642cuTexRefSetAddress2D};
static PyObject *__pyx_pw_4cuda_4cuda_643cuTexRefSetAddress2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR *__pyx_v_desc = 0;
  PyObject *__pyx_v_dptr = 0;
  size_t __pyx_v_Pitch;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetAddress2D (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_desc,&__pyx_n_s_dptr_2,&__pyx_n_s_Pitch,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_desc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetAddress2D", 1, 4, 4, 1); __PYX_ERR(0, 30114, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dptr_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetAddress2D", 1, 4, 4, 2); __PYX_ERR(0, 30114, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Pitch)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetAddress2D", 1, 4, 4, 3); __PYX_ERR(0, 30114, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetAddress2D") < 0)) __PYX_ERR(0, 30114, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_desc = ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR *)values[1]);
    __pyx_v_dptr = values[2];
    __pyx_v_Pitch = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_Pitch == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 30114, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetAddress2D", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30114, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetAddress2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_desc), __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR, 1, "desc", 0))) __PYX_ERR(0, 30114, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_642cuTexRefSetAddress2D(__pyx_self, __pyx_v_hTexRef, __pyx_v_desc, __pyx_v_dptr, __pyx_v_Pitch);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_642cuTexRefSetAddress2D(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR *__pyx_v_desc, PyObject *__pyx_v_dptr, size_t __pyx_v_Pitch) {
  CUdeviceptr __pyx_v_cdptr;
  PyObject *__pyx_v_pdptr = NULL;
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUDA_ARRAY_DESCRIPTOR *__pyx_v_cdesc_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct CUDA_ARRAY_DESCRIPTOR_st *__pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__945)
  __Pyx_RefNannySetupContext("cuTexRefSetAddress2D", 0);
  __Pyx_TraceCall("cuTexRefSetAddress2D", __pyx_f[0], 30114, 0, __PYX_ERR(0, 30114, __pyx_L1_error));

  /* "cuda/cuda.pyx":30171
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
  __pyx_t_1 = (__pyx_v_dptr == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30172
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 */
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30171
 *     """
 *     cdef ccuda.CUdeviceptr cdptr
 *     if dptr is None:             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30173
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dptr, __pyx_ptype_4cuda_4cuda_CUdeviceptr); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30174
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdptr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30175
 *     elif isinstance(dptr, (CUdeviceptr)):
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30175, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30173
 *     if dptr is None:
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>0
 *     elif isinstance(dptr, (CUdeviceptr)):             # <<<<<<<<<<<<<<
 *         pdptr = int(dptr)
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30177
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))             # <<<<<<<<<<<<<<
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), __pyx_v_dptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdptr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30178
 *     else:
 *         pdptr = int(CUdeviceptr(dptr))
 *         cdptr = <ccuda.CUdeviceptr><void_ptr>pdptr             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUtexref chTexRef
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pdptr); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30178, __pyx_L1_error)
    __pyx_v_cdptr = ((CUdeviceptr)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30181
 * 
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30182
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30181
 * 
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":30183
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30184
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30185
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30185, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30183
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":30187
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30188
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_ARRAY_DESCRIPTOR* cdesc_ptr = desc._ptr if desc != None else NULL
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30188, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":30190
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef ccuda.CUDA_ARRAY_DESCRIPTOR* cdesc_ptr = desc._ptr if desc != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefSetAddress2D(chTexRef, cdesc_ptr, cdptr, Pitch)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_desc), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30190, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 30190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {
    __pyx_t_6 = __pyx_v_desc->__pyx_base._ptr;
  } else {
    __pyx_t_6 = NULL;
  }
  __pyx_v_cdesc_ptr = __pyx_t_6;

  /* "cuda/cuda.pyx":30191
 * 
 *     cdef ccuda.CUDA_ARRAY_DESCRIPTOR* cdesc_ptr = desc._ptr if desc != None else NULL
 *     err = ccuda.cuTexRefSetAddress2D(chTexRef, cdesc_ptr, cdptr, Pitch)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuTexRefSetAddress2D(__pyx_v_chTexRef, __pyx_v_cdesc_ptr, __pyx_v_cdptr, __pyx_v_Pitch); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30191, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":30192
 *     cdef ccuda.CUDA_ARRAY_DESCRIPTOR* cdesc_ptr = desc._ptr if desc != None else NULL
 *     err = ccuda.cuTexRefSetAddress2D(chTexRef, cdesc_ptr, cdptr, Pitch)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 30192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30114
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetAddress2D(hTexRef, desc : CUDA_ARRAY_DESCRIPTOR, dptr, size_t Pitch):             # <<<<<<<<<<<<<<
 *     """ Binds an address as a 2D texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetAddress2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdptr);
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30195
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetFormat(hTexRef, fmt not None : CUarray_format, int NumPackedComponents):             # <<<<<<<<<<<<<<
 *     """ Sets the format for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_645cuTexRefSetFormat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_644cuTexRefSetFormat[] = "cuTexRefSetFormat(hTexRef, fmt: CUarray_format, int NumPackedComponents)\n Sets the format for a texture reference.\n\n    [Deprecated]\n\n    Specifies the format of the data to be read by the texture reference\n    `hTexRef`. `fmt` and `NumPackedComponents` are exactly analogous to the\n    :py:obj:`~.Format` and :py:obj:`~.NumChannels` members of the\n    :py:obj:`~.CUDA_ARRAY_DESCRIPTOR` structure: They specify the format of\n    each component and the number of components per array element.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n    fmt : :py:obj:`~.CUarray_format`\n        Format to set\n    NumPackedComponents : int\n        Number of components per array element\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaCreateChannelDesc`, :py:obj:`~.cudaBindTexture`, :py:obj:`~.cudaBindTexture2D`, :py:obj:`~.cudaBindTextureToArray`, :py:obj:`~.cudaBindTextureToMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_645cuTexRefSetFormat = {"cuTexRefSetFormat", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_645cuTexRefSetFormat, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_644cuTexRefSetFormat};
static PyObject *__pyx_pw_4cuda_4cuda_645cuTexRefSetFormat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  PyObject *__pyx_v_fmt = 0;
  int __pyx_v_NumPackedComponents;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetFormat (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_fmt,&__pyx_n_s_NumPackedComponents,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fmt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetFormat", 1, 3, 3, 1); __PYX_ERR(0, 30195, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_NumPackedComponents)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetFormat", 1, 3, 3, 2); __PYX_ERR(0, 30195, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetFormat") < 0)) __PYX_ERR(0, 30195, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_fmt = values[1];
    __pyx_v_NumPackedComponents = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_NumPackedComponents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 30195, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetFormat", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30195, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_fmt) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "fmt"); __PYX_ERR(0, 30195, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_644cuTexRefSetFormat(__pyx_self, __pyx_v_hTexRef, __pyx_v_fmt, __pyx_v_NumPackedComponents);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_644cuTexRefSetFormat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, PyObject *__pyx_v_fmt, int __pyx_v_NumPackedComponents) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUarray_format __pyx_v_cfmt;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUarray_format __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__946)
  __Pyx_RefNannySetupContext("cuTexRefSetFormat", 0);
  __Pyx_TraceCall("cuTexRefSetFormat", __pyx_f[0], 30195, 0, __PYX_ERR(0, 30195, __pyx_L1_error));

  /* "cuda/cuda.pyx":30225
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30226
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30225
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30227
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30228
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30229
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30229, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30227
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30231
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30232
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUarray_format cfmt = fmt.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30232, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30234
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef ccuda.CUarray_format cfmt = fmt.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefSetFormat(chTexRef, cfmt, NumPackedComponents)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUarray_format_enum)__Pyx_PyInt_As_enum__CUarray_format_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 30234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cfmt = __pyx_t_6;

  /* "cuda/cuda.pyx":30235
 * 
 *     cdef ccuda.CUarray_format cfmt = fmt.value
 *     err = ccuda.cuTexRefSetFormat(chTexRef, cfmt, NumPackedComponents)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuTexRefSetFormat(__pyx_v_chTexRef, __pyx_v_cfmt, __pyx_v_NumPackedComponents); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30235, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":30236
 *     cdef ccuda.CUarray_format cfmt = fmt.value
 *     err = ccuda.cuTexRefSetFormat(chTexRef, cfmt, NumPackedComponents)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 30236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30195
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetFormat(hTexRef, fmt not None : CUarray_format, int NumPackedComponents):             # <<<<<<<<<<<<<<
 *     """ Sets the format for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30239
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetAddressMode(hTexRef, int dim, am not None : CUaddress_mode):             # <<<<<<<<<<<<<<
 *     """ Sets the addressing mode for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_647cuTexRefSetAddressMode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_646cuTexRefSetAddressMode[] = "cuTexRefSetAddressMode(hTexRef, int dim, am: CUaddress_mode)\n Sets the addressing mode for a texture reference.\n\n    [Deprecated]\n\n    Specifies the addressing mode `am` for the given dimension `dim` of the\n    texture reference `hTexRef`. If `dim` is zero, the addressing mode is\n    applied to the first parameter of the functions used to fetch from the\n    texture; if `dim` is 1, the second, and so on.\n    :py:obj:`~.CUaddress_mode` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    Note that this call has no effect if `hTexRef` is bound to linear\n    memory. Also, if the flag, :py:obj:`~.CU_TRSF_NORMALIZED_COORDINATES`,\n    is not set, the only supported address mode is\n    :py:obj:`~.CU_TR_ADDRESS_MODE_CLAMP`.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n    dim : int\n        Dimension\n    am : :py:obj:`~.CUaddress_mode`\n        Addressing mode to set\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaBindTexture`, :py:obj:`~.cudaBindTexture2D`, :py:obj:`~.cudaBindTextureToArray`, :py:obj:`~.cudaBindTextureToMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_647cuTexRefSetAddressMode = {"cuTexRefSetAddressMode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_647cuTexRefSetAddressMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_646cuTexRefSetAddressMode};
static PyObject *__pyx_pw_4cuda_4cuda_647cuTexRefSetAddressMode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  int __pyx_v_dim;
  PyObject *__pyx_v_am = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetAddressMode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_dim,&__pyx_n_s_am,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetAddressMode", 1, 3, 3, 1); __PYX_ERR(0, 30239, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_am)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetAddressMode", 1, 3, 3, 2); __PYX_ERR(0, 30239, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetAddressMode") < 0)) __PYX_ERR(0, 30239, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_dim = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dim == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 30239, __pyx_L3_error)
    __pyx_v_am = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetAddressMode", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30239, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_am) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "am"); __PYX_ERR(0, 30239, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_646cuTexRefSetAddressMode(__pyx_self, __pyx_v_hTexRef, __pyx_v_dim, __pyx_v_am);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_646cuTexRefSetAddressMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, int __pyx_v_dim, PyObject *__pyx_v_am) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUaddress_mode __pyx_v_cam;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUaddress_mode __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__947)
  __Pyx_RefNannySetupContext("cuTexRefSetAddressMode", 0);
  __Pyx_TraceCall("cuTexRefSetAddressMode", __pyx_f[0], 30239, 0, __PYX_ERR(0, 30239, __pyx_L1_error));

  /* "cuda/cuda.pyx":30276
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30277
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30276
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30278
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30279
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30280
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30280, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30278
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30282
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30283
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUaddress_mode cam = am.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30283, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30285
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef ccuda.CUaddress_mode cam = am.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefSetAddressMode(chTexRef, dim, cam)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_am, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUaddress_mode_enum)__Pyx_PyInt_As_enum__CUaddress_mode_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 30285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cam = __pyx_t_6;

  /* "cuda/cuda.pyx":30286
 * 
 *     cdef ccuda.CUaddress_mode cam = am.value
 *     err = ccuda.cuTexRefSetAddressMode(chTexRef, dim, cam)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuTexRefSetAddressMode(__pyx_v_chTexRef, __pyx_v_dim, __pyx_v_cam); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30286, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":30287
 *     cdef ccuda.CUaddress_mode cam = am.value
 *     err = ccuda.cuTexRefSetAddressMode(chTexRef, dim, cam)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 30287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30239
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetAddressMode(hTexRef, int dim, am not None : CUaddress_mode):             # <<<<<<<<<<<<<<
 *     """ Sets the addressing mode for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30290
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetFilterMode(hTexRef, fm not None : CUfilter_mode):             # <<<<<<<<<<<<<<
 *     """ Sets the filtering mode for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_649cuTexRefSetFilterMode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_648cuTexRefSetFilterMode[] = "cuTexRefSetFilterMode(hTexRef, fm: CUfilter_mode)\n Sets the filtering mode for a texture reference.\n\n    [Deprecated]\n\n    Specifies the filtering mode `fm` to be used when reading memory\n    through the texture reference `hTexRef`. :py:obj:`~.CUfilter_mode_enum`\n    is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    Note that this call has no effect if `hTexRef` is bound to linear\n    memory.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n    fm : :py:obj:`~.CUfilter_mode`\n        Filtering mode to set\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaBindTextureToArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_649cuTexRefSetFilterMode = {"cuTexRefSetFilterMode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_649cuTexRefSetFilterMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_648cuTexRefSetFilterMode};
static PyObject *__pyx_pw_4cuda_4cuda_649cuTexRefSetFilterMode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  PyObject *__pyx_v_fm = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetFilterMode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_fm,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fm)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetFilterMode", 1, 2, 2, 1); __PYX_ERR(0, 30290, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetFilterMode") < 0)) __PYX_ERR(0, 30290, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_fm = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetFilterMode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30290, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_fm) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "fm"); __PYX_ERR(0, 30290, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_648cuTexRefSetFilterMode(__pyx_self, __pyx_v_hTexRef, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_648cuTexRefSetFilterMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, PyObject *__pyx_v_fm) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUfilter_mode __pyx_v_cfm;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUfilter_mode __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__948)
  __Pyx_RefNannySetupContext("cuTexRefSetFilterMode", 0);
  __Pyx_TraceCall("cuTexRefSetFilterMode", __pyx_f[0], 30290, 0, __PYX_ERR(0, 30290, __pyx_L1_error));

  /* "cuda/cuda.pyx":30321
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30322
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30321
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30323
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30324
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30325
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30325, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30323
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30327
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30328
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUfilter_mode cfm = fm.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30328, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30330
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef ccuda.CUfilter_mode cfm = fm.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefSetFilterMode(chTexRef, cfm)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fm, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUfilter_mode_enum)__Pyx_PyInt_As_enum__CUfilter_mode_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 30330, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cfm = __pyx_t_6;

  /* "cuda/cuda.pyx":30331
 * 
 *     cdef ccuda.CUfilter_mode cfm = fm.value
 *     err = ccuda.cuTexRefSetFilterMode(chTexRef, cfm)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuTexRefSetFilterMode(__pyx_v_chTexRef, __pyx_v_cfm); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30331, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":30332
 *     cdef ccuda.CUfilter_mode cfm = fm.value
 *     err = ccuda.cuTexRefSetFilterMode(chTexRef, cfm)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 30332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30290
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetFilterMode(hTexRef, fm not None : CUfilter_mode):             # <<<<<<<<<<<<<<
 *     """ Sets the filtering mode for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30335
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmapFilterMode(hTexRef, fm not None : CUfilter_mode):             # <<<<<<<<<<<<<<
 *     """ Sets the mipmap filtering mode for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_651cuTexRefSetMipmapFilterMode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_650cuTexRefSetMipmapFilterMode[] = "cuTexRefSetMipmapFilterMode(hTexRef, fm: CUfilter_mode)\n Sets the mipmap filtering mode for a texture reference.\n\n    [Deprecated]\n\n    Specifies the mipmap filtering mode `fm` to be used when reading memory\n    through the texture reference `hTexRef`. :py:obj:`~.CUfilter_mode_enum`\n    is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    Note that this call has no effect if `hTexRef` is not bound to a\n    mipmapped array.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n    fm : :py:obj:`~.CUfilter_mode`\n        Filtering mode to set\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaBindTextureToMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_651cuTexRefSetMipmapFilterMode = {"cuTexRefSetMipmapFilterMode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_651cuTexRefSetMipmapFilterMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_650cuTexRefSetMipmapFilterMode};
static PyObject *__pyx_pw_4cuda_4cuda_651cuTexRefSetMipmapFilterMode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  PyObject *__pyx_v_fm = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetMipmapFilterMode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_fm,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fm)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetMipmapFilterMode", 1, 2, 2, 1); __PYX_ERR(0, 30335, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetMipmapFilterMode") < 0)) __PYX_ERR(0, 30335, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_fm = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetMipmapFilterMode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30335, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_fm) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "fm"); __PYX_ERR(0, 30335, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_650cuTexRefSetMipmapFilterMode(__pyx_self, __pyx_v_hTexRef, __pyx_v_fm);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_650cuTexRefSetMipmapFilterMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, PyObject *__pyx_v_fm) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUfilter_mode __pyx_v_cfm;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUfilter_mode __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__949)
  __Pyx_RefNannySetupContext("cuTexRefSetMipmapFilterMode", 0);
  __Pyx_TraceCall("cuTexRefSetMipmapFilterMode", __pyx_f[0], 30335, 0, __PYX_ERR(0, 30335, __pyx_L1_error));

  /* "cuda/cuda.pyx":30366
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30367
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30366
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30368
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30369
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30370
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30370, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30368
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30372
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30373
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUfilter_mode cfm = fm.value
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30373, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30375
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef ccuda.CUfilter_mode cfm = fm.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefSetMipmapFilterMode(chTexRef, cfm)
 *     return (CUresult(err),)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fm, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = ((enum CUfilter_mode_enum)__Pyx_PyInt_As_enum__CUfilter_mode_enum(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 30375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cfm = __pyx_t_6;

  /* "cuda/cuda.pyx":30376
 * 
 *     cdef ccuda.CUfilter_mode cfm = fm.value
 *     err = ccuda.cuTexRefSetMipmapFilterMode(chTexRef, cfm)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuTexRefSetMipmapFilterMode(__pyx_v_chTexRef, __pyx_v_cfm); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30376, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":30377
 *     cdef ccuda.CUfilter_mode cfm = fm.value
 *     err = ccuda.cuTexRefSetMipmapFilterMode(chTexRef, cfm)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 30377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30335
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmapFilterMode(hTexRef, fm not None : CUfilter_mode):             # <<<<<<<<<<<<<<
 *     """ Sets the mipmap filtering mode for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30380
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmapLevelBias(hTexRef, float bias):             # <<<<<<<<<<<<<<
 *     """ Sets the mipmap level bias for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_653cuTexRefSetMipmapLevelBias(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_652cuTexRefSetMipmapLevelBias[] = "cuTexRefSetMipmapLevelBias(hTexRef, float bias)\n Sets the mipmap level bias for a texture reference.\n\n    [Deprecated]\n\n    Specifies the mipmap level bias `bias` to be added to the specified\n    mipmap level when reading memory through the texture reference\n    `hTexRef`.\n\n    Note that this call has no effect if `hTexRef` is not bound to a\n    mipmapped array.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n    bias : float\n        Mipmap level bias\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaBindTextureToMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_653cuTexRefSetMipmapLevelBias = {"cuTexRefSetMipmapLevelBias", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_653cuTexRefSetMipmapLevelBias, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_652cuTexRefSetMipmapLevelBias};
static PyObject *__pyx_pw_4cuda_4cuda_653cuTexRefSetMipmapLevelBias(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  float __pyx_v_bias;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetMipmapLevelBias (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_bias,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bias)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetMipmapLevelBias", 1, 2, 2, 1); __PYX_ERR(0, 30380, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetMipmapLevelBias") < 0)) __PYX_ERR(0, 30380, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_bias = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_bias == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 30380, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetMipmapLevelBias", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30380, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_652cuTexRefSetMipmapLevelBias(__pyx_self, __pyx_v_hTexRef, __pyx_v_bias);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_652cuTexRefSetMipmapLevelBias(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, float __pyx_v_bias) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__950)
  __Pyx_RefNannySetupContext("cuTexRefSetMipmapLevelBias", 0);
  __Pyx_TraceCall("cuTexRefSetMipmapLevelBias", __pyx_f[0], 30380, 0, __PYX_ERR(0, 30380, __pyx_L1_error));

  /* "cuda/cuda.pyx":30409
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30410
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30409
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30411
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30412
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30413
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30413, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30411
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30415
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30416
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuTexRefSetMipmapLevelBias(chTexRef, bias)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30416, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30418
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     err = ccuda.cuTexRefSetMipmapLevelBias(chTexRef, bias)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefSetMipmapLevelBias(__pyx_v_chTexRef, __pyx_v_bias); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30418, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30419
 * 
 *     err = ccuda.cuTexRefSetMipmapLevelBias(chTexRef, bias)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30380
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmapLevelBias(hTexRef, float bias):             # <<<<<<<<<<<<<<
 *     """ Sets the mipmap level bias for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30422
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmapLevelClamp(hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp):             # <<<<<<<<<<<<<<
 *     """ Sets the mipmap min/max mipmap level clamps for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_655cuTexRefSetMipmapLevelClamp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_654cuTexRefSetMipmapLevelClamp[] = "cuTexRefSetMipmapLevelClamp(hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp)\n Sets the mipmap min/max mipmap level clamps for a texture reference.\n\n    [Deprecated]\n\n    Specifies the min/max mipmap level clamps, `minMipmapLevelClamp` and\n    `maxMipmapLevelClamp` respectively, to be used when reading memory\n    through the texture reference `hTexRef`.\n\n    Note that this call has no effect if `hTexRef` is not bound to a\n    mipmapped array.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n    minMipmapLevelClamp : float\n        Mipmap min level clamp\n    maxMipmapLevelClamp : float\n        Mipmap max level clamp\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaBindTextureToMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_655cuTexRefSetMipmapLevelClamp = {"cuTexRefSetMipmapLevelClamp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_655cuTexRefSetMipmapLevelClamp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_654cuTexRefSetMipmapLevelClamp};
static PyObject *__pyx_pw_4cuda_4cuda_655cuTexRefSetMipmapLevelClamp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  float __pyx_v_minMipmapLevelClamp;
  float __pyx_v_maxMipmapLevelClamp;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetMipmapLevelClamp (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_minMipmapLevelClamp_2,&__pyx_n_s_maxMipmapLevelClamp_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_minMipmapLevelClamp_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetMipmapLevelClamp", 1, 3, 3, 1); __PYX_ERR(0, 30422, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxMipmapLevelClamp_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetMipmapLevelClamp", 1, 3, 3, 2); __PYX_ERR(0, 30422, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetMipmapLevelClamp") < 0)) __PYX_ERR(0, 30422, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_minMipmapLevelClamp = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_minMipmapLevelClamp == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 30422, __pyx_L3_error)
    __pyx_v_maxMipmapLevelClamp = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_maxMipmapLevelClamp == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 30422, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetMipmapLevelClamp", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30422, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_654cuTexRefSetMipmapLevelClamp(__pyx_self, __pyx_v_hTexRef, __pyx_v_minMipmapLevelClamp, __pyx_v_maxMipmapLevelClamp);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_654cuTexRefSetMipmapLevelClamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, float __pyx_v_minMipmapLevelClamp, float __pyx_v_maxMipmapLevelClamp) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__951)
  __Pyx_RefNannySetupContext("cuTexRefSetMipmapLevelClamp", 0);
  __Pyx_TraceCall("cuTexRefSetMipmapLevelClamp", __pyx_f[0], 30422, 0, __PYX_ERR(0, 30422, __pyx_L1_error));

  /* "cuda/cuda.pyx":30453
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30454
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30453
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30455
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30456
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30457
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30457, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30455
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30459
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30460
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuTexRefSetMipmapLevelClamp(chTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30460, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30462
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     err = ccuda.cuTexRefSetMipmapLevelClamp(chTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefSetMipmapLevelClamp(__pyx_v_chTexRef, __pyx_v_minMipmapLevelClamp, __pyx_v_maxMipmapLevelClamp); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30462, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30463
 * 
 *     err = ccuda.cuTexRefSetMipmapLevelClamp(chTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30422
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmapLevelClamp(hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp):             # <<<<<<<<<<<<<<
 *     """ Sets the mipmap min/max mipmap level clamps for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30466
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMaxAnisotropy(hTexRef, unsigned int maxAniso):             # <<<<<<<<<<<<<<
 *     """ Sets the maximum anisotropy for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_657cuTexRefSetMaxAnisotropy(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_656cuTexRefSetMaxAnisotropy[] = "cuTexRefSetMaxAnisotropy(hTexRef, unsigned int maxAniso)\n Sets the maximum anisotropy for a texture reference.\n\n    [Deprecated]\n\n    Specifies the maximum anisotropy `maxAniso` to be used when reading\n    memory through the texture reference `hTexRef`.\n\n    Note that this call has no effect if `hTexRef` is bound to linear\n    memory.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n    maxAniso : unsigned int\n        Maximum anisotropy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaBindTextureToArray`, :py:obj:`~.cudaBindTextureToMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_657cuTexRefSetMaxAnisotropy = {"cuTexRefSetMaxAnisotropy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_657cuTexRefSetMaxAnisotropy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_656cuTexRefSetMaxAnisotropy};
static PyObject *__pyx_pw_4cuda_4cuda_657cuTexRefSetMaxAnisotropy(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  unsigned int __pyx_v_maxAniso;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetMaxAnisotropy (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_maxAniso,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxAniso)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetMaxAnisotropy", 1, 2, 2, 1); __PYX_ERR(0, 30466, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetMaxAnisotropy") < 0)) __PYX_ERR(0, 30466, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_maxAniso = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_maxAniso == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 30466, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetMaxAnisotropy", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30466, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_656cuTexRefSetMaxAnisotropy(__pyx_self, __pyx_v_hTexRef, __pyx_v_maxAniso);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_656cuTexRefSetMaxAnisotropy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, unsigned int __pyx_v_maxAniso) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__952)
  __Pyx_RefNannySetupContext("cuTexRefSetMaxAnisotropy", 0);
  __Pyx_TraceCall("cuTexRefSetMaxAnisotropy", __pyx_f[0], 30466, 0, __PYX_ERR(0, 30466, __pyx_L1_error));

  /* "cuda/cuda.pyx":30494
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30495
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30494
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30496
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30497
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30498
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30498, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30496
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30500
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30501
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuTexRefSetMaxAnisotropy(chTexRef, maxAniso)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30501, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30503
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     err = ccuda.cuTexRefSetMaxAnisotropy(chTexRef, maxAniso)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefSetMaxAnisotropy(__pyx_v_chTexRef, __pyx_v_maxAniso); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30503, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30504
 * 
 *     err = ccuda.cuTexRefSetMaxAnisotropy(chTexRef, maxAniso)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30466
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMaxAnisotropy(hTexRef, unsigned int maxAniso):             # <<<<<<<<<<<<<<
 *     """ Sets the maximum anisotropy for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30507
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetBorderColor(hTexRef, float pBorderColor):             # <<<<<<<<<<<<<<
 *     """ Sets the border color for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_659cuTexRefSetBorderColor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_658cuTexRefSetBorderColor[] = "cuTexRefSetBorderColor(hTexRef, float pBorderColor)\n Sets the border color for a texture reference.\n\n    [Deprecated]\n\n    Specifies the value of the RGBA color via the `pBorderColor` to the\n    texture reference `hTexRef`. The color value supports only float type\n    and holds color components in the following sequence: pBorderColor[0]\n    holds 'R' component pBorderColor[1] holds 'G' component pBorderColor[2]\n    holds 'B' component pBorderColor[3] holds 'A' component\n\n    Note that the color values can be set only when the Address mode is set\n    to CU_TR_ADDRESS_MODE_BORDER using :py:obj:`~.cuTexRefSetAddressMode`.\n    Applications using integer border color values have to\n    \"reinterpret_cast\" their values to float.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n    pBorderColor : float\n        RGBA color\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetBorderColor`, :py:obj:`~.cudaBindTexture`, :py:obj:`~.cudaBindTexture2D`, :py:obj:`~.cudaBindTextureToArray`, :py:obj:`~.cudaBindTextureToMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_659cuTexRefSetBorderColor = {"cuTexRefSetBorderColor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_659cuTexRefSetBorderColor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_658cuTexRefSetBorderColor};
static PyObject *__pyx_pw_4cuda_4cuda_659cuTexRefSetBorderColor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  float __pyx_v_pBorderColor;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetBorderColor (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_pBorderColor,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pBorderColor)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetBorderColor", 1, 2, 2, 1); __PYX_ERR(0, 30507, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetBorderColor") < 0)) __PYX_ERR(0, 30507, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_pBorderColor = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_pBorderColor == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 30507, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetBorderColor", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30507, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_658cuTexRefSetBorderColor(__pyx_self, __pyx_v_hTexRef, __pyx_v_pBorderColor);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_658cuTexRefSetBorderColor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, float __pyx_v_pBorderColor) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__953)
  __Pyx_RefNannySetupContext("cuTexRefSetBorderColor", 0);
  __Pyx_TraceCall("cuTexRefSetBorderColor", __pyx_f[0], 30507, 0, __PYX_ERR(0, 30507, __pyx_L1_error));

  /* "cuda/cuda.pyx":30540
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30541
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30540
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30542
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30543
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30544
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30544, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30542
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30546
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30547
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuTexRefSetBorderColor(chTexRef, &pBorderColor)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30547, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30549
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     err = ccuda.cuTexRefSetBorderColor(chTexRef, &pBorderColor)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefSetBorderColor(__pyx_v_chTexRef, (&__pyx_v_pBorderColor)); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30549, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30550
 * 
 *     err = ccuda.cuTexRefSetBorderColor(chTexRef, &pBorderColor)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30507
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetBorderColor(hTexRef, float pBorderColor):             # <<<<<<<<<<<<<<
 *     """ Sets the border color for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30553
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetFlags(hTexRef, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Sets the flags for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_661cuTexRefSetFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_660cuTexRefSetFlags[] = "cuTexRefSetFlags(hTexRef, unsigned int Flags)\n Sets the flags for a texture reference.\n\n    [Deprecated]\n\n    Specifies optional flags via `Flags` to specify the behavior of data\n    returned through the texture reference `hTexRef`. The valid flags are:\n\n    - :py:obj:`~.CU_TRSF_READ_AS_INTEGER`, which suppresses the default\n      behavior of having the texture promote integer data to floating point\n      data in the range [0, 1]. Note that texture with 32-bit integer\n      format would not be promoted, regardless of whether or not this flag\n      is specified;\n\n    - :py:obj:`~.CU_TRSF_NORMALIZED_COORDINATES`, which suppresses the\n      default behavior of having the texture coordinates range from [0,\n      Dim) where Dim is the width or height of the CUDA array. Instead, the\n      texture coordinates [0, 1.0) reference the entire breadth of the\n      array dimension;\n\n    - :py:obj:`~.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION`, which disables\n      any trilinear filtering optimizations. Trilinear optimizations\n      improve texture filtering performance by allowing bilinear filtering\n      on textures in scenarios where it can closely approximate the\n      expected results.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n    Flags : unsigned int\n        Optional flags to set\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :p""y:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaBindTexture`, :py:obj:`~.cudaBindTexture2D`, :py:obj:`~.cudaBindTextureToArray`, :py:obj:`~.cudaBindTextureToMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_661cuTexRefSetFlags = {"cuTexRefSetFlags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_661cuTexRefSetFlags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_660cuTexRefSetFlags};
static PyObject *__pyx_pw_4cuda_4cuda_661cuTexRefSetFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefSetFlags (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_Flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefSetFlags", 1, 2, 2, 1); __PYX_ERR(0, 30553, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefSetFlags") < 0)) __PYX_ERR(0, 30553, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 30553, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefSetFlags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30553, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_660cuTexRefSetFlags(__pyx_self, __pyx_v_hTexRef, __pyx_v_Flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_660cuTexRefSetFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, unsigned int __pyx_v_Flags) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__954)
  __Pyx_RefNannySetupContext("cuTexRefSetFlags", 0);
  __Pyx_TraceCall("cuTexRefSetFlags", __pyx_f[0], 30553, 0, __PYX_ERR(0, 30553, __pyx_L1_error));

  /* "cuda/cuda.pyx":30596
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30597
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30596
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30598
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30599
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30600
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30600, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30598
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30602
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30603
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuTexRefSetFlags(chTexRef, Flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30603, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30605
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     err = ccuda.cuTexRefSetFlags(chTexRef, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefSetFlags(__pyx_v_chTexRef, __pyx_v_Flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30605, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30606
 * 
 *     err = ccuda.cuTexRefSetFlags(chTexRef, Flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30553
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetFlags(hTexRef, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Sets the flags for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30609
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetAddress(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the address associated with a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_663cuTexRefGetAddress(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_662cuTexRefGetAddress[] = "cuTexRefGetAddress(hTexRef)\n Gets the address associated with a texture reference.\n\n    [Deprecated]\n\n    Returns in `*pdptr` the base address bound to the texture reference\n    `hTexRef`, or returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if the\n    texture reference is not bound to any device memory range.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pdptr : :py:obj:`~.CUdeviceptr`\n        Returned device address\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_663cuTexRefGetAddress = {"cuTexRefGetAddress", (PyCFunction)__pyx_pw_4cuda_4cuda_663cuTexRefGetAddress, METH_O, __pyx_doc_4cuda_4cuda_662cuTexRefGetAddress};
static PyObject *__pyx_pw_4cuda_4cuda_663cuTexRefGetAddress(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefGetAddress (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_662cuTexRefGetAddress(__pyx_self, ((PyObject *)__pyx_v_hTexRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_662cuTexRefGetAddress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_pdptr = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__955)
  __Pyx_RefNannySetupContext("cuTexRefGetAddress", 0);
  __Pyx_TraceCall("cuTexRefGetAddress", __pyx_f[0], 30609, 0, __PYX_ERR(0, 30609, __pyx_L1_error));

  /* "cuda/cuda.pyx":30635
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30636
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30635
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30637
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30638
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30639
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30639, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30637
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30641
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30642
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef CUdeviceptr pdptr = CUdeviceptr()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30642, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30644
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef CUdeviceptr pdptr = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefGetAddress(pdptr._ptr, chTexRef)
 *     return (CUresult(err), pdptr)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pdptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":30645
 * 
 *     cdef CUdeviceptr pdptr = CUdeviceptr()
 *     err = ccuda.cuTexRefGetAddress(pdptr._ptr, chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pdptr)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefGetAddress(__pyx_v_pdptr->_ptr, __pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30645, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30646
 *     cdef CUdeviceptr pdptr = CUdeviceptr()
 *     err = ccuda.cuTexRefGetAddress(pdptr._ptr, chTexRef)
 *     return (CUresult(err), pdptr)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pdptr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pdptr));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pdptr));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30609
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetAddress(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the address associated with a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XDECREF((PyObject *)__pyx_v_pdptr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30649
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetArray(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the array bound to a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_665cuTexRefGetArray(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_664cuTexRefGetArray[] = "cuTexRefGetArray(hTexRef)\n Gets the array bound to a texture reference.\n\n    [Deprecated]\n\n    Returns in `*phArray` the CUDA array bound to the texture reference\n    `hTexRef`, or returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if the\n    texture reference is not bound to any CUDA array.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phArray : :py:obj:`~.CUarray`\n        Returned array\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_665cuTexRefGetArray = {"cuTexRefGetArray", (PyCFunction)__pyx_pw_4cuda_4cuda_665cuTexRefGetArray, METH_O, __pyx_doc_4cuda_4cuda_664cuTexRefGetArray};
static PyObject *__pyx_pw_4cuda_4cuda_665cuTexRefGetArray(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefGetArray (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_664cuTexRefGetArray(__pyx_self, ((PyObject *)__pyx_v_hTexRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_664cuTexRefGetArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_phArray = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__956)
  __Pyx_RefNannySetupContext("cuTexRefGetArray", 0);
  __Pyx_TraceCall("cuTexRefGetArray", __pyx_f[0], 30649, 0, __PYX_ERR(0, 30649, __pyx_L1_error));

  /* "cuda/cuda.pyx":30675
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30676
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30675
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30677
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30678
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30679
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30679, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30677
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30681
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30682
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef CUarray phArray = CUarray()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30682, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30684
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef CUarray phArray = CUarray()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefGetArray(phArray._ptr, chTexRef)
 *     return (CUresult(err), phArray)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":30685
 * 
 *     cdef CUarray phArray = CUarray()
 *     err = ccuda.cuTexRefGetArray(phArray._ptr, chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phArray)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefGetArray(__pyx_v_phArray->_ptr, __pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30685, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30686
 *     cdef CUarray phArray = CUarray()
 *     err = ccuda.cuTexRefGetArray(phArray._ptr, chTexRef)
 *     return (CUresult(err), phArray)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_phArray));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phArray));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phArray));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30649
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetArray(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the array bound to a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XDECREF((PyObject *)__pyx_v_phArray);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30689
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmappedArray(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the mipmapped array bound to a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_667cuTexRefGetMipmappedArray(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_666cuTexRefGetMipmappedArray[] = "cuTexRefGetMipmappedArray(hTexRef)\n Gets the mipmapped array bound to a texture reference.\n\n    [Deprecated]\n\n    Returns in `*phMipmappedArray` the CUDA mipmapped array bound to the\n    texture reference `hTexRef`, or returns\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if the texture reference is not\n    bound to any CUDA mipmapped array.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phMipmappedArray : :py:obj:`~.CUmipmappedArray`\n        Returned mipmapped array\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_667cuTexRefGetMipmappedArray = {"cuTexRefGetMipmappedArray", (PyCFunction)__pyx_pw_4cuda_4cuda_667cuTexRefGetMipmappedArray, METH_O, __pyx_doc_4cuda_4cuda_666cuTexRefGetMipmappedArray};
static PyObject *__pyx_pw_4cuda_4cuda_667cuTexRefGetMipmappedArray(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefGetMipmappedArray (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_666cuTexRefGetMipmappedArray(__pyx_self, ((PyObject *)__pyx_v_hTexRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_666cuTexRefGetMipmappedArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_phMipmappedArray = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__957)
  __Pyx_RefNannySetupContext("cuTexRefGetMipmappedArray", 0);
  __Pyx_TraceCall("cuTexRefGetMipmappedArray", __pyx_f[0], 30689, 0, __PYX_ERR(0, 30689, __pyx_L1_error));

  /* "cuda/cuda.pyx":30716
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30717
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30716
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30718
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30719
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30720
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30720, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30718
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30722
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30723
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef CUmipmappedArray phMipmappedArray = CUmipmappedArray()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30723, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30725
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef CUmipmappedArray phMipmappedArray = CUmipmappedArray()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefGetMipmappedArray(phMipmappedArray._ptr, chTexRef)
 *     return (CUresult(err), phMipmappedArray)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phMipmappedArray = ((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":30726
 * 
 *     cdef CUmipmappedArray phMipmappedArray = CUmipmappedArray()
 *     err = ccuda.cuTexRefGetMipmappedArray(phMipmappedArray._ptr, chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phMipmappedArray)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefGetMipmappedArray(__pyx_v_phMipmappedArray->_ptr, __pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30726, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30727
 *     cdef CUmipmappedArray phMipmappedArray = CUmipmappedArray()
 *     err = ccuda.cuTexRefGetMipmappedArray(phMipmappedArray._ptr, chTexRef)
 *     return (CUresult(err), phMipmappedArray)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_phMipmappedArray));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phMipmappedArray));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phMipmappedArray));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30689
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmappedArray(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the mipmapped array bound to a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XDECREF((PyObject *)__pyx_v_phMipmappedArray);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30730
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetAddressMode(hTexRef, int dim):             # <<<<<<<<<<<<<<
 *     """ Gets the addressing mode used by a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_669cuTexRefGetAddressMode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_668cuTexRefGetAddressMode[] = "cuTexRefGetAddressMode(hTexRef, int dim)\n Gets the addressing mode used by a texture reference.\n\n    [Deprecated]\n\n    Returns in `*pam` the addressing mode corresponding to the dimension\n    `dim` of the texture reference `hTexRef`. Currently, the only valid\n    value for `dim` are 0 and 1.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n    dim : int\n        Dimension\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pam : :py:obj:`~.CUaddress_mode`\n        Returned addressing mode\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_669cuTexRefGetAddressMode = {"cuTexRefGetAddressMode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_669cuTexRefGetAddressMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_668cuTexRefGetAddressMode};
static PyObject *__pyx_pw_4cuda_4cuda_669cuTexRefGetAddressMode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hTexRef = 0;
  int __pyx_v_dim;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefGetAddressMode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hTexRef,&__pyx_n_s_dim,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hTexRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexRefGetAddressMode", 1, 2, 2, 1); __PYX_ERR(0, 30730, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexRefGetAddressMode") < 0)) __PYX_ERR(0, 30730, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hTexRef = values[0];
    __pyx_v_dim = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dim == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 30730, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexRefGetAddressMode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30730, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_668cuTexRefGetAddressMode(__pyx_self, __pyx_v_hTexRef, __pyx_v_dim);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_668cuTexRefGetAddressMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef, int __pyx_v_dim) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUaddress_mode __pyx_v_pam;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__958)
  __Pyx_RefNannySetupContext("cuTexRefGetAddressMode", 0);
  __Pyx_TraceCall("cuTexRefGetAddressMode", __pyx_f[0], 30730, 0, __PYX_ERR(0, 30730, __pyx_L1_error));

  /* "cuda/cuda.pyx":30758
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30759
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30758
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30760
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30761
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30762
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30762, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30760
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30764
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30765
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUaddress_mode pam
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30765, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30768
 * 
 *     cdef ccuda.CUaddress_mode pam
 *     err = ccuda.cuTexRefGetAddressMode(&pam, chTexRef, dim)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUaddress_mode(pam))
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefGetAddressMode((&__pyx_v_pam), __pyx_v_chTexRef, __pyx_v_dim); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30768, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30769
 *     cdef ccuda.CUaddress_mode pam
 *     err = ccuda.cuTexRefGetAddressMode(&pam, chTexRef, dim)
 *     return (CUresult(err), CUaddress_mode(pam))             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUaddress_mode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_enum__CUaddress_mode_enum(__pyx_v_pam); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 30769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30730
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetAddressMode(hTexRef, int dim):             # <<<<<<<<<<<<<<
 *     """ Gets the addressing mode used by a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30772
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetFilterMode(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the filter-mode used by a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_671cuTexRefGetFilterMode(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_670cuTexRefGetFilterMode[] = "cuTexRefGetFilterMode(hTexRef)\n Gets the filter-mode used by a texture reference.\n\n    [Deprecated]\n\n    Returns in `*pfm` the filtering mode of the texture reference\n    `hTexRef`.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pfm : :py:obj:`~.CUfilter_mode`\n        Returned filtering mode\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_671cuTexRefGetFilterMode = {"cuTexRefGetFilterMode", (PyCFunction)__pyx_pw_4cuda_4cuda_671cuTexRefGetFilterMode, METH_O, __pyx_doc_4cuda_4cuda_670cuTexRefGetFilterMode};
static PyObject *__pyx_pw_4cuda_4cuda_671cuTexRefGetFilterMode(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefGetFilterMode (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_670cuTexRefGetFilterMode(__pyx_self, ((PyObject *)__pyx_v_hTexRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_670cuTexRefGetFilterMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUfilter_mode __pyx_v_pfm;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__959)
  __Pyx_RefNannySetupContext("cuTexRefGetFilterMode", 0);
  __Pyx_TraceCall("cuTexRefGetFilterMode", __pyx_f[0], 30772, 0, __PYX_ERR(0, 30772, __pyx_L1_error));

  /* "cuda/cuda.pyx":30797
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30798
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30797
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30799
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30800
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30801
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30801, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30799
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30803
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30804
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUfilter_mode pfm
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30804, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30807
 * 
 *     cdef ccuda.CUfilter_mode pfm
 *     err = ccuda.cuTexRefGetFilterMode(&pfm, chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUfilter_mode(pfm))
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefGetFilterMode((&__pyx_v_pfm), __pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30807, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30808
 *     cdef ccuda.CUfilter_mode pfm
 *     err = ccuda.cuTexRefGetFilterMode(&pfm, chTexRef)
 *     return (CUresult(err), CUfilter_mode(pfm))             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUfilter_mode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_enum__CUfilter_mode_enum(__pyx_v_pfm); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 30808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30772
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetFilterMode(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the filter-mode used by a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30811
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetFormat(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the format used by a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_673cuTexRefGetFormat(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_672cuTexRefGetFormat[] = "cuTexRefGetFormat(hTexRef)\n Gets the format used by a texture reference.\n\n    [Deprecated]\n\n    Returns in `*pFormat` and `*pNumChannels` the format and number of\n    components of the CUDA array bound to the texture reference `hTexRef`.\n    If `pFormat` or `pNumChannels` is NULL, it will be ignored.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pFormat : :py:obj:`~.CUarray_format`\n        Returned format\n    pNumChannels : int\n        Returned number of components\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_673cuTexRefGetFormat = {"cuTexRefGetFormat", (PyCFunction)__pyx_pw_4cuda_4cuda_673cuTexRefGetFormat, METH_O, __pyx_doc_4cuda_4cuda_672cuTexRefGetFormat};
static PyObject *__pyx_pw_4cuda_4cuda_673cuTexRefGetFormat(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefGetFormat (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_672cuTexRefGetFormat(__pyx_self, ((PyObject *)__pyx_v_hTexRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_672cuTexRefGetFormat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUarray_format __pyx_v_pFormat;
  int __pyx_v_pNumChannels;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__960)
  __Pyx_RefNannySetupContext("cuTexRefGetFormat", 0);
  __Pyx_TraceCall("cuTexRefGetFormat", __pyx_f[0], 30811, 0, __PYX_ERR(0, 30811, __pyx_L1_error));

  /* "cuda/cuda.pyx":30839
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30840
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30839
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30841
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30842
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30843
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30843, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30841
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30845
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30846
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUarray_format pFormat
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30846, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30849
 * 
 *     cdef ccuda.CUarray_format pFormat
 *     cdef int pNumChannels = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefGetFormat(&pFormat, &pNumChannels, chTexRef)
 *     return (CUresult(err), CUarray_format(pFormat), pNumChannels)
 */
  __pyx_v_pNumChannels = 0;

  /* "cuda/cuda.pyx":30850
 *     cdef ccuda.CUarray_format pFormat
 *     cdef int pNumChannels = 0
 *     err = ccuda.cuTexRefGetFormat(&pFormat, &pNumChannels, chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUarray_format(pFormat), pNumChannels)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefGetFormat((&__pyx_v_pFormat), (&__pyx_v_pNumChannels), __pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30850, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30851
 *     cdef int pNumChannels = 0
 *     err = ccuda.cuTexRefGetFormat(&pFormat, &pNumChannels, chTexRef)
 *     return (CUresult(err), CUarray_format(pFormat), pNumChannels)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUarray_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_enum__CUarray_format_enum(__pyx_v_pFormat); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 30851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_pNumChannels); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 30851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30811
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetFormat(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the format used by a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30854
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmapFilterMode(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the mipmap filtering mode for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_675cuTexRefGetMipmapFilterMode(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_674cuTexRefGetMipmapFilterMode[] = "cuTexRefGetMipmapFilterMode(hTexRef)\n Gets the mipmap filtering mode for a texture reference.\n\n    [Deprecated]\n\n    Returns the mipmap filtering mode in `pfm` that's used when reading\n    memory through the texture reference `hTexRef`.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pfm : :py:obj:`~.CUfilter_mode`\n        Returned mipmap filtering mode\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_675cuTexRefGetMipmapFilterMode = {"cuTexRefGetMipmapFilterMode", (PyCFunction)__pyx_pw_4cuda_4cuda_675cuTexRefGetMipmapFilterMode, METH_O, __pyx_doc_4cuda_4cuda_674cuTexRefGetMipmapFilterMode};
static PyObject *__pyx_pw_4cuda_4cuda_675cuTexRefGetMipmapFilterMode(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefGetMipmapFilterMode (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_674cuTexRefGetMipmapFilterMode(__pyx_self, ((PyObject *)__pyx_v_hTexRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_674cuTexRefGetMipmapFilterMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUfilter_mode __pyx_v_pfm;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__961)
  __Pyx_RefNannySetupContext("cuTexRefGetMipmapFilterMode", 0);
  __Pyx_TraceCall("cuTexRefGetMipmapFilterMode", __pyx_f[0], 30854, 0, __PYX_ERR(0, 30854, __pyx_L1_error));

  /* "cuda/cuda.pyx":30879
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30880
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30879
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30881
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30882
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30883
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30883, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30881
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30885
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30886
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUfilter_mode pfm
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30886, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30889
 * 
 *     cdef ccuda.CUfilter_mode pfm
 *     err = ccuda.cuTexRefGetMipmapFilterMode(&pfm, chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), CUfilter_mode(pfm))
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefGetMipmapFilterMode((&__pyx_v_pfm), __pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30889, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30890
 *     cdef ccuda.CUfilter_mode pfm
 *     err = ccuda.cuTexRefGetMipmapFilterMode(&pfm, chTexRef)
 *     return (CUresult(err), CUfilter_mode(pfm))             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUfilter_mode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_enum__CUfilter_mode_enum(__pyx_v_pfm); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 30890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30854
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmapFilterMode(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the mipmap filtering mode for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30893
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmapLevelBias(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the mipmap level bias for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_677cuTexRefGetMipmapLevelBias(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_676cuTexRefGetMipmapLevelBias[] = "cuTexRefGetMipmapLevelBias(hTexRef)\n Gets the mipmap level bias for a texture reference.\n\n    [Deprecated]\n\n    Returns the mipmap level bias in `pBias` that's added to the specified\n    mipmap level when reading memory through the texture reference\n    `hTexRef`.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pbias : float\n        Returned mipmap level bias\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_677cuTexRefGetMipmapLevelBias = {"cuTexRefGetMipmapLevelBias", (PyCFunction)__pyx_pw_4cuda_4cuda_677cuTexRefGetMipmapLevelBias, METH_O, __pyx_doc_4cuda_4cuda_676cuTexRefGetMipmapLevelBias};
static PyObject *__pyx_pw_4cuda_4cuda_677cuTexRefGetMipmapLevelBias(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefGetMipmapLevelBias (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_676cuTexRefGetMipmapLevelBias(__pyx_self, ((PyObject *)__pyx_v_hTexRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_676cuTexRefGetMipmapLevelBias(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  float __pyx_v_pbias;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__962)
  __Pyx_RefNannySetupContext("cuTexRefGetMipmapLevelBias", 0);
  __Pyx_TraceCall("cuTexRefGetMipmapLevelBias", __pyx_f[0], 30893, 0, __PYX_ERR(0, 30893, __pyx_L1_error));

  /* "cuda/cuda.pyx":30919
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30920
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30919
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30921
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30922
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30923
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30923, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30921
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30925
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30926
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef float pbias = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30926, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30928
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef float pbias = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefGetMipmapLevelBias(&pbias, chTexRef)
 *     return (CUresult(err), pbias)
 */
  __pyx_v_pbias = 0.0;

  /* "cuda/cuda.pyx":30929
 * 
 *     cdef float pbias = 0
 *     err = ccuda.cuTexRefGetMipmapLevelBias(&pbias, chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pbias)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefGetMipmapLevelBias((&__pyx_v_pbias), __pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30929, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30930
 *     cdef float pbias = 0
 *     err = ccuda.cuTexRefGetMipmapLevelBias(&pbias, chTexRef)
 *     return (CUresult(err), pbias)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pbias); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30893
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmapLevelBias(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the mipmap level bias for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30933
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmapLevelClamp(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the min/max mipmap level clamps for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_679cuTexRefGetMipmapLevelClamp(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_678cuTexRefGetMipmapLevelClamp[] = "cuTexRefGetMipmapLevelClamp(hTexRef)\n Gets the min/max mipmap level clamps for a texture reference.\n\n    [Deprecated]\n\n    Returns the min/max mipmap level clamps in `pminMipmapLevelClamp` and\n    `pmaxMipmapLevelClamp` that's used when reading memory through the\n    texture reference `hTexRef`.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pminMipmapLevelClamp : float\n        Returned mipmap min level clamp\n    pmaxMipmapLevelClamp : float\n        Returned mipmap max level clamp\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_679cuTexRefGetMipmapLevelClamp = {"cuTexRefGetMipmapLevelClamp", (PyCFunction)__pyx_pw_4cuda_4cuda_679cuTexRefGetMipmapLevelClamp, METH_O, __pyx_doc_4cuda_4cuda_678cuTexRefGetMipmapLevelClamp};
static PyObject *__pyx_pw_4cuda_4cuda_679cuTexRefGetMipmapLevelClamp(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefGetMipmapLevelClamp (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_678cuTexRefGetMipmapLevelClamp(__pyx_self, ((PyObject *)__pyx_v_hTexRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_678cuTexRefGetMipmapLevelClamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  float __pyx_v_pminMipmapLevelClamp;
  float __pyx_v_pmaxMipmapLevelClamp;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__963)
  __Pyx_RefNannySetupContext("cuTexRefGetMipmapLevelClamp", 0);
  __Pyx_TraceCall("cuTexRefGetMipmapLevelClamp", __pyx_f[0], 30933, 0, __PYX_ERR(0, 30933, __pyx_L1_error));

  /* "cuda/cuda.pyx":30961
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":30962
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":30961
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30963
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":30964
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":30965
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30965, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":30963
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":30967
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":30968
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef float pminMipmapLevelClamp = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 30968, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":30970
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef float pminMipmapLevelClamp = 0             # <<<<<<<<<<<<<<
 *     cdef float pmaxMipmapLevelClamp = 0
 *     err = ccuda.cuTexRefGetMipmapLevelClamp(&pminMipmapLevelClamp, &pmaxMipmapLevelClamp, chTexRef)
 */
  __pyx_v_pminMipmapLevelClamp = 0.0;

  /* "cuda/cuda.pyx":30971
 * 
 *     cdef float pminMipmapLevelClamp = 0
 *     cdef float pmaxMipmapLevelClamp = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefGetMipmapLevelClamp(&pminMipmapLevelClamp, &pmaxMipmapLevelClamp, chTexRef)
 *     return (CUresult(err), pminMipmapLevelClamp, pmaxMipmapLevelClamp)
 */
  __pyx_v_pmaxMipmapLevelClamp = 0.0;

  /* "cuda/cuda.pyx":30972
 *     cdef float pminMipmapLevelClamp = 0
 *     cdef float pmaxMipmapLevelClamp = 0
 *     err = ccuda.cuTexRefGetMipmapLevelClamp(&pminMipmapLevelClamp, &pmaxMipmapLevelClamp, chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pminMipmapLevelClamp, pmaxMipmapLevelClamp)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefGetMipmapLevelClamp((&__pyx_v_pminMipmapLevelClamp), (&__pyx_v_pmaxMipmapLevelClamp), __pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 30972, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":30973
 *     cdef float pmaxMipmapLevelClamp = 0
 *     err = ccuda.cuTexRefGetMipmapLevelClamp(&pminMipmapLevelClamp, &pmaxMipmapLevelClamp, chTexRef)
 *     return (CUresult(err), pminMipmapLevelClamp, pmaxMipmapLevelClamp)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pminMipmapLevelClamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_pmaxMipmapLevelClamp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 30973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 30973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30933
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmapLevelClamp(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the min/max mipmap level clamps for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":30976
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMaxAnisotropy(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the maximum anisotropy for a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_681cuTexRefGetMaxAnisotropy(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_680cuTexRefGetMaxAnisotropy[] = "cuTexRefGetMaxAnisotropy(hTexRef)\n Gets the maximum anisotropy for a texture reference.\n\n    [Deprecated]\n\n    Returns the maximum anisotropy in `pmaxAniso` that's used when reading\n    memory through the texture reference `hTexRef`.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pmaxAniso : int\n        Returned maximum anisotropy\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_681cuTexRefGetMaxAnisotropy = {"cuTexRefGetMaxAnisotropy", (PyCFunction)__pyx_pw_4cuda_4cuda_681cuTexRefGetMaxAnisotropy, METH_O, __pyx_doc_4cuda_4cuda_680cuTexRefGetMaxAnisotropy};
static PyObject *__pyx_pw_4cuda_4cuda_681cuTexRefGetMaxAnisotropy(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefGetMaxAnisotropy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_680cuTexRefGetMaxAnisotropy(__pyx_self, ((PyObject *)__pyx_v_hTexRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_680cuTexRefGetMaxAnisotropy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  int __pyx_v_pmaxAniso;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__964)
  __Pyx_RefNannySetupContext("cuTexRefGetMaxAnisotropy", 0);
  __Pyx_TraceCall("cuTexRefGetMaxAnisotropy", __pyx_f[0], 30976, 0, __PYX_ERR(0, 30976, __pyx_L1_error));

  /* "cuda/cuda.pyx":31001
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31002
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31001
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31003
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31004
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31005
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31005, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31003
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31007
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31008
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef int pmaxAniso = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31008, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31010
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef int pmaxAniso = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefGetMaxAnisotropy(&pmaxAniso, chTexRef)
 *     return (CUresult(err), pmaxAniso)
 */
  __pyx_v_pmaxAniso = 0;

  /* "cuda/cuda.pyx":31011
 * 
 *     cdef int pmaxAniso = 0
 *     err = ccuda.cuTexRefGetMaxAnisotropy(&pmaxAniso, chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pmaxAniso)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefGetMaxAnisotropy((&__pyx_v_pmaxAniso), __pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31011, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31012
 *     cdef int pmaxAniso = 0
 *     err = ccuda.cuTexRefGetMaxAnisotropy(&pmaxAniso, chTexRef)
 *     return (CUresult(err), pmaxAniso)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pmaxAniso); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":30976
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMaxAnisotropy(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the maximum anisotropy for a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31015
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetBorderColor(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the border color used by a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_683cuTexRefGetBorderColor(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_682cuTexRefGetBorderColor[] = "cuTexRefGetBorderColor(hTexRef)\n Gets the border color used by a texture reference.\n\n    [Deprecated]\n\n    Returns in `pBorderColor`, values of the RGBA color used by the texture\n    reference `hTexRef`. The color value is of type float and holds color\n    components in the following sequence: pBorderColor[0] holds 'R'\n    component pBorderColor[1] holds 'G' component pBorderColor[2] holds 'B'\n    component pBorderColor[3] holds 'A' component\n\n    Parameters\n    ----------\n    pBorderColor : :py:obj:`~.CUtexref`\n        Returned Type and Value of RGBA color\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    hTexRef : float\n        Texture reference\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetBorderColor`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_683cuTexRefGetBorderColor = {"cuTexRefGetBorderColor", (PyCFunction)__pyx_pw_4cuda_4cuda_683cuTexRefGetBorderColor, METH_O, __pyx_doc_4cuda_4cuda_682cuTexRefGetBorderColor};
static PyObject *__pyx_pw_4cuda_4cuda_683cuTexRefGetBorderColor(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefGetBorderColor (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_682cuTexRefGetBorderColor(__pyx_self, ((PyObject *)__pyx_v_hTexRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_682cuTexRefGetBorderColor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  float __pyx_v_pBorderColor;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__965)
  __Pyx_RefNannySetupContext("cuTexRefGetBorderColor", 0);
  __Pyx_TraceCall("cuTexRefGetBorderColor", __pyx_f[0], 31015, 0, __PYX_ERR(0, 31015, __pyx_L1_error));

  /* "cuda/cuda.pyx":31043
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31044
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31043
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31045
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31046
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31047
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31047, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31045
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31049
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31050
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef float pBorderColor = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31050, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31052
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef float pBorderColor = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefGetBorderColor(&pBorderColor, chTexRef)
 *     return (CUresult(err), pBorderColor)
 */
  __pyx_v_pBorderColor = 0.0;

  /* "cuda/cuda.pyx":31053
 * 
 *     cdef float pBorderColor = 0
 *     err = ccuda.cuTexRefGetBorderColor(&pBorderColor, chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pBorderColor)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefGetBorderColor((&__pyx_v_pBorderColor), __pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31053, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31054
 *     cdef float pBorderColor = 0
 *     err = ccuda.cuTexRefGetBorderColor(&pBorderColor, chTexRef)
 *     return (CUresult(err), pBorderColor)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pBorderColor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31015
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetBorderColor(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the border color used by a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31057
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetFlags(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the flags used by a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_685cuTexRefGetFlags(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_684cuTexRefGetFlags[] = "cuTexRefGetFlags(hTexRef)\n Gets the flags used by a texture reference.\n\n    [Deprecated]\n\n    Returns in `*pFlags` the flags of the texture reference `hTexRef`.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pFlags : unsigned int\n        Returned flags\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFormat`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_685cuTexRefGetFlags = {"cuTexRefGetFlags", (PyCFunction)__pyx_pw_4cuda_4cuda_685cuTexRefGetFlags, METH_O, __pyx_doc_4cuda_4cuda_684cuTexRefGetFlags};
static PyObject *__pyx_pw_4cuda_4cuda_685cuTexRefGetFlags(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefGetFlags (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_684cuTexRefGetFlags(__pyx_self, ((PyObject *)__pyx_v_hTexRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_684cuTexRefGetFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  unsigned int __pyx_v_pFlags;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__966)
  __Pyx_RefNannySetupContext("cuTexRefGetFlags", 0);
  __Pyx_TraceCall("cuTexRefGetFlags", __pyx_f[0], 31057, 0, __PYX_ERR(0, 31057, __pyx_L1_error));

  /* "cuda/cuda.pyx":31081
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31082
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31081
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31083
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31084
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31085
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31085, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31083
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31087
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31088
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     cdef unsigned int pFlags = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31088, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31090
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     cdef unsigned int pFlags = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefGetFlags(&pFlags, chTexRef)
 *     return (CUresult(err), pFlags)
 */
  __pyx_v_pFlags = 0;

  /* "cuda/cuda.pyx":31091
 * 
 *     cdef unsigned int pFlags = 0
 *     err = ccuda.cuTexRefGetFlags(&pFlags, chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pFlags)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefGetFlags((&__pyx_v_pFlags), __pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31091, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31092
 *     cdef unsigned int pFlags = 0
 *     err = ccuda.cuTexRefGetFlags(&pFlags, chTexRef)
 *     return (CUresult(err), pFlags)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_pFlags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31057
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetFlags(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the flags used by a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31095
 * 
 * @cython.embedsignature(True)
 * def cuTexRefCreate():             # <<<<<<<<<<<<<<
 *     """ Creates a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_687cuTexRefCreate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_686cuTexRefCreate[] = "cuTexRefCreate()\n Creates a texture reference.\n\n    [Deprecated]\n\n    Creates a texture reference and returns its handle in `*pTexRef`. Once\n    created, the application must call :py:obj:`~.cuTexRefSetArray()` or\n    :py:obj:`~.cuTexRefSetAddress()` to associate the reference with\n    allocated memory. Other texture reference functions are used to specify\n    the format and interpretation (addressing, filtering, etc.) to be used\n    when the memory is read through this texture reference.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pTexRef : :py:obj:`~.CUtexref`\n        Returned texture reference\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefDestroy`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_687cuTexRefCreate = {"cuTexRefCreate", (PyCFunction)__pyx_pw_4cuda_4cuda_687cuTexRefCreate, METH_NOARGS, __pyx_doc_4cuda_4cuda_686cuTexRefCreate};
static PyObject *__pyx_pw_4cuda_4cuda_687cuTexRefCreate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefCreate (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_686cuTexRefCreate(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_686cuTexRefCreate(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_4cuda_4cuda_CUtexref *__pyx_v_pTexRef = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUresult __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__967)
  __Pyx_RefNannySetupContext("cuTexRefCreate", 0);
  __Pyx_TraceCall("cuTexRefCreate", __pyx_f[0], 31095, 0, __PYX_ERR(0, 31095, __pyx_L1_error));

  /* "cuda/cuda.pyx":31118
 *     :py:obj:`~.cuTexRefDestroy`
 *     """
 *     cdef CUtexref pTexRef = CUtexref()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexRefCreate(pTexRef._ptr)
 *     return (CUresult(err), pTexRef)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pTexRef = ((struct __pyx_obj_4cuda_4cuda_CUtexref *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":31119
 *     """
 *     cdef CUtexref pTexRef = CUtexref()
 *     err = ccuda.cuTexRefCreate(pTexRef._ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pTexRef)
 * 
 */
  __pyx_t_2 = __pyx_f_4cuda_5ccuda_cuTexRefCreate(__pyx_v_pTexRef->_ptr); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31119, __pyx_L1_error)
  __pyx_v_err = __pyx_t_2;

  /* "cuda/cuda.pyx":31120
 *     cdef CUtexref pTexRef = CUtexref()
 *     err = ccuda.cuTexRefCreate(pTexRef._ptr)
 *     return (CUresult(err), pTexRef)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pTexRef));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pTexRef));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pTexRef));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31095
 * 
 * @cython.embedsignature(True)
 * def cuTexRefCreate():             # <<<<<<<<<<<<<<
 *     """ Creates a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31123
 * 
 * @cython.embedsignature(True)
 * def cuTexRefDestroy(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Destroys a texture reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_689cuTexRefDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_688cuTexRefDestroy[] = "cuTexRefDestroy(hTexRef)\n Destroys a texture reference.\n\n    [Deprecated]\n\n    Destroys the texture reference specified by `hTexRef`.\n\n    Parameters\n    ----------\n    hTexRef : :py:obj:`~.CUtexref`\n        Texture reference to destroy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexRefCreate`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_689cuTexRefDestroy = {"cuTexRefDestroy", (PyCFunction)__pyx_pw_4cuda_4cuda_689cuTexRefDestroy, METH_O, __pyx_doc_4cuda_4cuda_688cuTexRefDestroy};
static PyObject *__pyx_pw_4cuda_4cuda_689cuTexRefDestroy(PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexRefDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_688cuTexRefDestroy(__pyx_self, ((PyObject *)__pyx_v_hTexRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_688cuTexRefDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hTexRef) {
  CUtexref __pyx_v_chTexRef;
  PyObject *__pyx_v_phTexRef = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__968)
  __Pyx_RefNannySetupContext("cuTexRefDestroy", 0);
  __Pyx_TraceCall("cuTexRefDestroy", __pyx_f[0], 31123, 0, __PYX_ERR(0, 31123, __pyx_L1_error));

  /* "cuda/cuda.pyx":31145
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
  __pyx_t_1 = (__pyx_v_hTexRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31146
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 */
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31145
 *     """
 *     cdef ccuda.CUtexref chTexRef
 *     if hTexRef is None:             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31147
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hTexRef, __pyx_ptype_4cuda_4cuda_CUtexref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31148
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phTexRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31149
 *     elif isinstance(hTexRef, (CUtexref)):
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31149, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31147
 *     if hTexRef is None:
 *         chTexRef = <ccuda.CUtexref><void_ptr>0
 *     elif isinstance(hTexRef, (CUtexref)):             # <<<<<<<<<<<<<<
 *         phTexRef = int(hTexRef)
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31151
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))             # <<<<<<<<<<<<<<
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), __pyx_v_hTexRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phTexRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31152
 *     else:
 *         phTexRef = int(CUtexref(hTexRef))
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuTexRefDestroy(chTexRef)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phTexRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31152, __pyx_L1_error)
    __pyx_v_chTexRef = ((CUtexref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31154
 *         chTexRef = <ccuda.CUtexref><void_ptr>phTexRef
 * 
 *     err = ccuda.cuTexRefDestroy(chTexRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexRefDestroy(__pyx_v_chTexRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31154, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31155
 * 
 *     err = ccuda.cuTexRefDestroy(chTexRef)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31123
 * 
 * @cython.embedsignature(True)
 * def cuTexRefDestroy(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Destroys a texture reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexRefDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phTexRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31158
 * 
 * @cython.embedsignature(True)
 * def cuSurfRefSetArray(hSurfRef, hArray, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Sets the CUDA array for a surface reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_691cuSurfRefSetArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_690cuSurfRefSetArray[] = "cuSurfRefSetArray(hSurfRef, hArray, unsigned int Flags)\n Sets the CUDA array for a surface reference.\n\n    [Deprecated]\n\n    Sets the CUDA array `hArray` to be read and written by the surface\n    reference `hSurfRef`. Any previous CUDA array state associated with the\n    surface reference is superseded by this function. `Flags` must be set\n    to 0. The :py:obj:`~.CUDA_ARRAY3D_SURFACE_LDST` flag must have been set\n    for the CUDA array. Any CUDA array previously bound to `hSurfRef` is\n    unbound.\n\n    Parameters\n    ----------\n    hSurfRef : :py:obj:`~.CUsurfref`\n        Surface reference handle\n    hArray : :py:obj:`~.CUarray`\n        CUDA array handle\n    Flags : unsigned int\n        set to 0\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuModuleGetSurfRef`, :py:obj:`~.cuSurfRefGetArray`, :py:obj:`~.cudaBindSurfaceToArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_691cuSurfRefSetArray = {"cuSurfRefSetArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_691cuSurfRefSetArray, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_690cuSurfRefSetArray};
static PyObject *__pyx_pw_4cuda_4cuda_691cuSurfRefSetArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hSurfRef = 0;
  PyObject *__pyx_v_hArray = 0;
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuSurfRefSetArray (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hSurfRef,&__pyx_n_s_hArray_2,&__pyx_n_s_Flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hSurfRef)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hArray_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuSurfRefSetArray", 1, 3, 3, 1); __PYX_ERR(0, 31158, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuSurfRefSetArray", 1, 3, 3, 2); __PYX_ERR(0, 31158, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuSurfRefSetArray") < 0)) __PYX_ERR(0, 31158, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hSurfRef = values[0];
    __pyx_v_hArray = values[1];
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 31158, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuSurfRefSetArray", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 31158, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuSurfRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_690cuSurfRefSetArray(__pyx_self, __pyx_v_hSurfRef, __pyx_v_hArray, __pyx_v_Flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_690cuSurfRefSetArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hSurfRef, PyObject *__pyx_v_hArray, unsigned int __pyx_v_Flags) {
  CUarray __pyx_v_chArray;
  PyObject *__pyx_v_phArray = NULL;
  CUsurfref __pyx_v_chSurfRef;
  PyObject *__pyx_v_phSurfRef = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__969)
  __Pyx_RefNannySetupContext("cuSurfRefSetArray", 0);
  __Pyx_TraceCall("cuSurfRefSetArray", __pyx_f[0], 31158, 0, __PYX_ERR(0, 31158, __pyx_L1_error));

  /* "cuda/cuda.pyx":31189
 *     """
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 */
  __pyx_t_1 = (__pyx_v_hArray == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31190
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)
 */
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31189
 *     """
 *     cdef ccuda.CUarray chArray
 *     if hArray is None:             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31191
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hArray, __pyx_ptype_4cuda_4cuda_CUarray); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31192
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phArray = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31193
 *     elif isinstance(hArray, (CUarray)):
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 *     else:
 *         phArray = int(CUarray(hArray))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31193, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31191
 *     if hArray is None:
 *         chArray = <ccuda.CUarray><void_ptr>0
 *     elif isinstance(hArray, (CUarray)):             # <<<<<<<<<<<<<<
 *         phArray = int(hArray)
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31195
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 *     else:
 *         phArray = int(CUarray(hArray))             # <<<<<<<<<<<<<<
 *         chArray = <ccuda.CUarray><void_ptr>phArray
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), __pyx_v_hArray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phArray = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31196
 *     else:
 *         phArray = int(CUarray(hArray))
 *         chArray = <ccuda.CUarray><void_ptr>phArray             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUsurfref chSurfRef
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phArray); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31196, __pyx_L1_error)
    __pyx_v_chArray = ((CUarray)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31199
 * 
 *     cdef ccuda.CUsurfref chSurfRef
 *     if hSurfRef is None:             # <<<<<<<<<<<<<<
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>0
 *     elif isinstance(hSurfRef, (CUsurfref)):
 */
  __pyx_t_1 = (__pyx_v_hSurfRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31200
 *     cdef ccuda.CUsurfref chSurfRef
 *     if hSurfRef is None:
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hSurfRef, (CUsurfref)):
 *         phSurfRef = int(hSurfRef)
 */
    __pyx_v_chSurfRef = ((CUsurfref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31199
 * 
 *     cdef ccuda.CUsurfref chSurfRef
 *     if hSurfRef is None:             # <<<<<<<<<<<<<<
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>0
 *     elif isinstance(hSurfRef, (CUsurfref)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":31201
 *     if hSurfRef is None:
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>0
 *     elif isinstance(hSurfRef, (CUsurfref)):             # <<<<<<<<<<<<<<
 *         phSurfRef = int(hSurfRef)
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hSurfRef, __pyx_ptype_4cuda_4cuda_CUsurfref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31202
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>0
 *     elif isinstance(hSurfRef, (CUsurfref)):
 *         phSurfRef = int(hSurfRef)             # <<<<<<<<<<<<<<
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hSurfRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_phSurfRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31203
 *     elif isinstance(hSurfRef, (CUsurfref)):
 *         phSurfRef = int(hSurfRef)
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef             # <<<<<<<<<<<<<<
 *     else:
 *         phSurfRef = int(CUsurfref(hSurfRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phSurfRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31203, __pyx_L1_error)
    __pyx_v_chSurfRef = ((CUsurfref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31201
 *     if hSurfRef is None:
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>0
 *     elif isinstance(hSurfRef, (CUsurfref)):             # <<<<<<<<<<<<<<
 *         phSurfRef = int(hSurfRef)
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":31205
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef
 *     else:
 *         phSurfRef = int(CUsurfref(hSurfRef))             # <<<<<<<<<<<<<<
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUsurfref), __pyx_v_hSurfRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_phSurfRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31206
 *     else:
 *         phSurfRef = int(CUsurfref(hSurfRef))
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuSurfRefSetArray(chSurfRef, chArray, Flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phSurfRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31206, __pyx_L1_error)
    __pyx_v_chSurfRef = ((CUsurfref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":31208
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef
 * 
 *     err = ccuda.cuSurfRefSetArray(chSurfRef, chArray, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuSurfRefSetArray(__pyx_v_chSurfRef, __pyx_v_chArray, __pyx_v_Flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31208, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31209
 * 
 *     err = ccuda.cuSurfRefSetArray(chSurfRef, chArray, Flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31158
 * 
 * @cython.embedsignature(True)
 * def cuSurfRefSetArray(hSurfRef, hArray, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Sets the CUDA array for a surface reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuSurfRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phArray);
  __Pyx_XDECREF(__pyx_v_phSurfRef);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31212
 * 
 * @cython.embedsignature(True)
 * def cuSurfRefGetArray(hSurfRef):             # <<<<<<<<<<<<<<
 *     """ Passes back the CUDA array bound to a surface reference.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_693cuSurfRefGetArray(PyObject *__pyx_self, PyObject *__pyx_v_hSurfRef); /*proto*/
static char __pyx_doc_4cuda_4cuda_692cuSurfRefGetArray[] = "cuSurfRefGetArray(hSurfRef)\n Passes back the CUDA array bound to a surface reference.\n\n    [Deprecated]\n\n    Returns in `*phArray` the CUDA array bound to the surface reference\n    `hSurfRef`, or returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if the\n    surface reference is not bound to any CUDA array.\n\n    Parameters\n    ----------\n    hSurfRef : :py:obj:`~.CUsurfref`\n        Surface reference handle\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    phArray : :py:obj:`~.CUarray`\n        Surface reference handle\n\n    See Also\n    --------\n    :py:obj:`~.cuModuleGetSurfRef`, :py:obj:`~.cuSurfRefSetArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_693cuSurfRefGetArray = {"cuSurfRefGetArray", (PyCFunction)__pyx_pw_4cuda_4cuda_693cuSurfRefGetArray, METH_O, __pyx_doc_4cuda_4cuda_692cuSurfRefGetArray};
static PyObject *__pyx_pw_4cuda_4cuda_693cuSurfRefGetArray(PyObject *__pyx_self, PyObject *__pyx_v_hSurfRef) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuSurfRefGetArray (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_692cuSurfRefGetArray(__pyx_self, ((PyObject *)__pyx_v_hSurfRef));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_692cuSurfRefGetArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_hSurfRef) {
  CUsurfref __pyx_v_chSurfRef;
  PyObject *__pyx_v_phSurfRef = NULL;
  struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_phArray = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__970)
  __Pyx_RefNannySetupContext("cuSurfRefGetArray", 0);
  __Pyx_TraceCall("cuSurfRefGetArray", __pyx_f[0], 31212, 0, __PYX_ERR(0, 31212, __pyx_L1_error));

  /* "cuda/cuda.pyx":31238
 *     """
 *     cdef ccuda.CUsurfref chSurfRef
 *     if hSurfRef is None:             # <<<<<<<<<<<<<<
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>0
 *     elif isinstance(hSurfRef, (CUsurfref)):
 */
  __pyx_t_1 = (__pyx_v_hSurfRef == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31239
 *     cdef ccuda.CUsurfref chSurfRef
 *     if hSurfRef is None:
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hSurfRef, (CUsurfref)):
 *         phSurfRef = int(hSurfRef)
 */
    __pyx_v_chSurfRef = ((CUsurfref)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31238
 *     """
 *     cdef ccuda.CUsurfref chSurfRef
 *     if hSurfRef is None:             # <<<<<<<<<<<<<<
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>0
 *     elif isinstance(hSurfRef, (CUsurfref)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31240
 *     if hSurfRef is None:
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>0
 *     elif isinstance(hSurfRef, (CUsurfref)):             # <<<<<<<<<<<<<<
 *         phSurfRef = int(hSurfRef)
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hSurfRef, __pyx_ptype_4cuda_4cuda_CUsurfref); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31241
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>0
 *     elif isinstance(hSurfRef, (CUsurfref)):
 *         phSurfRef = int(hSurfRef)             # <<<<<<<<<<<<<<
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hSurfRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phSurfRef = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31242
 *     elif isinstance(hSurfRef, (CUsurfref)):
 *         phSurfRef = int(hSurfRef)
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef             # <<<<<<<<<<<<<<
 *     else:
 *         phSurfRef = int(CUsurfref(hSurfRef))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phSurfRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31242, __pyx_L1_error)
    __pyx_v_chSurfRef = ((CUsurfref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31240
 *     if hSurfRef is None:
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>0
 *     elif isinstance(hSurfRef, (CUsurfref)):             # <<<<<<<<<<<<<<
 *         phSurfRef = int(hSurfRef)
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31244
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef
 *     else:
 *         phSurfRef = int(CUsurfref(hSurfRef))             # <<<<<<<<<<<<<<
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUsurfref), __pyx_v_hSurfRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phSurfRef = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31245
 *     else:
 *         phSurfRef = int(CUsurfref(hSurfRef))
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef             # <<<<<<<<<<<<<<
 * 
 *     cdef CUarray phArray = CUarray()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phSurfRef); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31245, __pyx_L1_error)
    __pyx_v_chSurfRef = ((CUsurfref)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31247
 *         chSurfRef = <ccuda.CUsurfref><void_ptr>phSurfRef
 * 
 *     cdef CUarray phArray = CUarray()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuSurfRefGetArray(phArray._ptr, chSurfRef)
 *     return (CUresult(err), phArray)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":31248
 * 
 *     cdef CUarray phArray = CUarray()
 *     err = ccuda.cuSurfRefGetArray(phArray._ptr, chSurfRef)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phArray)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuSurfRefGetArray(__pyx_v_phArray->_ptr, __pyx_v_chSurfRef); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31248, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31249
 *     cdef CUarray phArray = CUarray()
 *     err = ccuda.cuSurfRefGetArray(phArray._ptr, chSurfRef)
 *     return (CUresult(err), phArray)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_phArray));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phArray));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phArray));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31212
 * 
 * @cython.embedsignature(True)
 * def cuSurfRefGetArray(hSurfRef):             # <<<<<<<<<<<<<<
 *     """ Passes back the CUDA array bound to a surface reference.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuSurfRefGetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phSurfRef);
  __Pyx_XDECREF((PyObject *)__pyx_v_phArray);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31252
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectCreate(pResDesc : CUDA_RESOURCE_DESC, pTexDesc : CUDA_TEXTURE_DESC, pResViewDesc : CUDA_RESOURCE_VIEW_DESC):             # <<<<<<<<<<<<<<
 *     """ Creates a texture object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_695cuTexObjectCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_694cuTexObjectCreate[] = "cuTexObjectCreate(CUDA_RESOURCE_DESC pResDesc: CUDA_RESOURCE_DESC, CUDA_TEXTURE_DESC pTexDesc: CUDA_TEXTURE_DESC, CUDA_RESOURCE_VIEW_DESC pResViewDesc: CUDA_RESOURCE_VIEW_DESC)\n Creates a texture object.\n\n    Creates a texture object and returns it in `pTexObject`. `pResDesc`\n    describes the data to texture from. `pTexDesc` describes how the data\n    should be sampled. `pResViewDesc` is an optional argument that\n    specifies an alternate format for the data described by `pResDesc`, and\n    also describes the subresource region to restrict access to when\n    texturing. `pResViewDesc` can only be specified if the type of resource\n    is a CUDA array or a CUDA mipmapped array.\n\n    Texture objects are only supported on devices of compute capability 3.0\n    or higher. Additionally, a texture object is an opaque value, and, as\n    such, should only be accessed through CUDA API calls.\n\n    The :py:obj:`~.CUDA_RESOURCE_DESC` structure is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - :py:obj:`~.CUDA_RESOURCE_DESC.resType` specifies the type of resource\n      to texture from. CUresourceType is defined as:\n\n    - **View CUDA Toolkit Documentation for a C++ code example**\n\n    If :py:obj:`~.CUDA_RESOURCE_DESC.resType` is set to\n    :py:obj:`~.CU_RESOURCE_TYPE_ARRAY`,\n    :py:obj:`~.CUDA_RESOURCE_DESC`::res::array::hArray must be set to a\n    valid CUDA array handle.\n\n    If :py:obj:`~.CUDA_RESOURCE_DESC.resType` is set to\n    :py:obj:`~.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY`,\n    :py:obj:`~.CUDA_RESOURCE_DESC`::res::mipmap::hMipmappedArray must be\n    set to a valid CUDA mipmapped array handle.\n\n    If :py:obj:`~.CUDA_RESOURCE_DESC.resType` is set to\n    :py:obj:`~.CU_RESOURCE_TYPE_LINEAR`,\n    :py:obj:`~.CUDA_RESOURCE_DESC`::res::linear::devPtr must be set to a\n    valid device pointer, that is aligned to\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT`.\n    :py:obj:`~.CUDA_RESOURCE_D""ESC`::res::linear::format and\n    :py:obj:`~.CUDA_RESOURCE_DESC`::res::linear::numChannels describe the\n    format of each component and the number of components per array\n    element. :py:obj:`~.CUDA_RESOURCE_DESC`::res::linear::sizeInBytes\n    specifies the size of the array in bytes. The total number of elements\n    in the linear address range cannot exceed\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH`. The\n    number of elements is computed as (sizeInBytes / (sizeof(format) *\n    numChannels)).\n\n    If :py:obj:`~.CUDA_RESOURCE_DESC.resType` is set to\n    :py:obj:`~.CU_RESOURCE_TYPE_PITCH2D`,\n    :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::devPtr must be set to a\n    valid device pointer, that is aligned to\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT`.\n    :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::format and\n    :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::numChannels describe the\n    format of each component and the number of components per array\n    element. :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::width and\n    :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::height specify the width\n    and height of the array in elements, and cannot exceed\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH` and\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT`\n    respectively.\n    :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::pitchInBytes specifies\n    the pitch between two rows in bytes and has to be aligned to\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT`. Pitch cannot\n    exceed :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH`.\n\n    - :py:obj:`~.flags` must be set to zero.\n\n    The :py:obj:`~.CUDA_TEXTURE_DESC` struct is defined as\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where\n\n    - :py:obj:`~.CUDA_TEXTURE_DESC.addressMode` specifies the addressing\n      mode for each dimension of the texture data.\n      "":py:obj:`~.CUaddress_mode` is defined as:\n\n    - **View CUDA Toolkit Documentation for a C++ code example**\n\n    - This is ignored if :py:obj:`~.CUDA_RESOURCE_DESC.resType` is\n      :py:obj:`~.CU_RESOURCE_TYPE_LINEAR`. Also, if the flag,\n      :py:obj:`~.CU_TRSF_NORMALIZED_COORDINATES` is not set, the only\n      supported address mode is :py:obj:`~.CU_TR_ADDRESS_MODE_CLAMP`.\n\n    - :py:obj:`~.CUDA_TEXTURE_DESC.filterMode` specifies the filtering mode\n      to be used when fetching from the texture. CUfilter_mode is defined\n      as:\n\n    - **View CUDA Toolkit Documentation for a C++ code example**\n\n    - This is ignored if :py:obj:`~.CUDA_RESOURCE_DESC.resType` is\n      :py:obj:`~.CU_RESOURCE_TYPE_LINEAR`.\n\n    - :py:obj:`~.CUDA_TEXTURE_DESC.flags` can be any combination of the\n      following:\n\n      - :py:obj:`~.CU_TRSF_READ_AS_INTEGER`, which suppresses the default\n        behavior of having the texture promote integer data to floating\n        point data in the range [0, 1]. Note that texture with 32-bit\n        integer format would not be promoted, regardless of whether or not\n        this flag is specified.\n\n      - :py:obj:`~.CU_TRSF_NORMALIZED_COORDINATES`, which suppresses the\n        default behavior of having the texture coordinates range from [0,\n        Dim) where Dim is the width or height of the CUDA array. Instead,\n        the texture coordinates [0, 1.0) reference the entire breadth of\n        the array dimension; Note that for CUDA mipmapped arrays, this flag\n        has to be set.\n\n      - :py:obj:`~.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION`, which disables\n        any trilinear filtering optimizations. Trilinear optimizations\n        improve texture filtering performance by allowing bilinear\n        filtering on textures in scenarios where it can closely approximate\n        the expected results.\n\n      - :py:obj:`~.CU_TRSF_SEAMLESS_CUBEMAP`, which enables seamless cube\n        map filtering. This flag can onl""y be specified if the underlying\n        resource is a CUDA array or a CUDA mipmapped array that was created\n        with the flag :py:obj:`~.CUDA_ARRAY3D_CUBEMAP`. When seamless cube\n        map filtering is enabled, texture address modes specified by\n        :py:obj:`~.CUDA_TEXTURE_DESC.addressMode` are ignored. Instead, if\n        the :py:obj:`~.CUDA_TEXTURE_DESC.filterMode` is set to\n        :py:obj:`~.CU_TR_FILTER_MODE_POINT` the address mode\n        :py:obj:`~.CU_TR_ADDRESS_MODE_CLAMP` will be applied for all\n        dimensions. If the :py:obj:`~.CUDA_TEXTURE_DESC.filterMode` is set\n        to :py:obj:`~.CU_TR_FILTER_MODE_LINEAR` seamless cube map filtering\n        will be performed when sampling along the cube face borders.\n\n    - :py:obj:`~.CUDA_TEXTURE_DESC.maxAnisotropy` specifies the maximum\n      anisotropy ratio to be used when doing anisotropic filtering. This\n      value will be clamped to the range [1,16].\n\n    - :py:obj:`~.CUDA_TEXTURE_DESC.mipmapFilterMode` specifies the filter\n      mode when the calculated mipmap level lies between two defined mipmap\n      levels.\n\n    - :py:obj:`~.CUDA_TEXTURE_DESC.mipmapLevelBias` specifies the offset to\n      be applied to the calculated mipmap level.\n\n    - :py:obj:`~.CUDA_TEXTURE_DESC.minMipmapLevelClamp` specifies the lower\n      end of the mipmap level range to clamp access to.\n\n    - :py:obj:`~.CUDA_TEXTURE_DESC.maxMipmapLevelClamp` specifies the upper\n      end of the mipmap level range to clamp access to.\n\n    The :py:obj:`~.CUDA_RESOURCE_VIEW_DESC` struct is defined as\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    where:\n\n    - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.format` specifies how the data\n      contained in the CUDA array or CUDA mipmapped array should be\n      interpreted. Note that this can incur a change in size of the texture\n      data. If the resource view format is a block compressed format, then\n      the underlying CUDA array or"" CUDA mipmapped array has to have a base\n      of format :py:obj:`~.CU_AD_FORMAT_UNSIGNED_INT32`. with 2 or 4\n      channels, depending on the block compressed format. For ex., BC1 and\n      BC4 require the underlying CUDA array to have a format of\n      :py:obj:`~.CU_AD_FORMAT_UNSIGNED_INT32` with 2 channels. The other BC\n      formats require the underlying resource to have the same base format\n      but with 4 channels.\n\n    - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.width` specifies the new width of\n      the texture data. If the resource view format is a block compressed\n      format, this value has to be 4 times the original width of the\n      resource. For non block compressed formats, this value has to be\n      equal to that of the original resource.\n\n    - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.height` specifies the new height\n      of the texture data. If the resource view format is a block\n      compressed format, this value has to be 4 times the original height\n      of the resource. For non block compressed formats, this value has to\n      be equal to that of the original resource.\n\n    - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.depth` specifies the new depth of\n      the texture data. This value has to be equal to that of the original\n      resource.\n\n    - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.firstMipmapLevel` specifies the\n      most detailed mipmap level. This will be the new mipmap level zero.\n      For non-mipmapped resources, this value has to be\n      zero.:py:obj:`~.CUDA_TEXTURE_DESC.minMipmapLevelClamp` and\n      :py:obj:`~.CUDA_TEXTURE_DESC.maxMipmapLevelClamp` will be relative to\n      this value. For ex., if the firstMipmapLevel is set to 2, and a\n      minMipmapLevelClamp of 1.2 is specified, then the actual minimum\n      mipmap level clamp will be 3.2.\n\n    - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.lastMipmapLevel` specifies the\n      least detailed mipmap level. For non-mipmapped resources, this value\n      has to be zero.""\n\n    - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.firstLayer` specifies the first\n      layer index for layered textures. This will be the new layer zero.\n      For non-layered resources, this value has to be zero.\n\n    - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.lastLayer` specifies the last\n      layer index for layered textures. For non-layered resources, this\n      value has to be zero.\n\n    Parameters\n    ----------\n    pResDesc : :py:obj:`~.CUDA_RESOURCE_DESC`\n        Resource descriptor\n    pTexDesc : :py:obj:`~.CUDA_TEXTURE_DESC`\n        Texture descriptor\n    pResViewDesc : :py:obj:`~.CUDA_RESOURCE_VIEW_DESC`\n        Resource view descriptor\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pTexObject : :py:obj:`~.CUtexObject`\n        Texture object to create\n\n    See Also\n    --------\n    :py:obj:`~.cuTexObjectDestroy`, :py:obj:`~.cudaCreateTextureObject`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_695cuTexObjectCreate = {"cuTexObjectCreate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_695cuTexObjectCreate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_694cuTexObjectCreate};
static PyObject *__pyx_pw_4cuda_4cuda_695cuTexObjectCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC *__pyx_v_pResDesc = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC *__pyx_v_pTexDesc = 0;
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC *__pyx_v_pResViewDesc = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexObjectCreate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pResDesc,&__pyx_n_s_pTexDesc,&__pyx_n_s_pResViewDesc,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pResDesc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pTexDesc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexObjectCreate", 1, 3, 3, 1); __PYX_ERR(0, 31252, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pResViewDesc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuTexObjectCreate", 1, 3, 3, 2); __PYX_ERR(0, 31252, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuTexObjectCreate") < 0)) __PYX_ERR(0, 31252, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_pResDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC *)values[0]);
    __pyx_v_pTexDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC *)values[1]);
    __pyx_v_pResViewDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuTexObjectCreate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 31252, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuTexObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pResDesc), __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC, 1, "pResDesc", 0))) __PYX_ERR(0, 31252, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pTexDesc), __pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC, 1, "pTexDesc", 0))) __PYX_ERR(0, 31252, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pResViewDesc), __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC, 1, "pResViewDesc", 0))) __PYX_ERR(0, 31252, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_694cuTexObjectCreate(__pyx_self, __pyx_v_pResDesc, __pyx_v_pTexDesc, __pyx_v_pResViewDesc);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_694cuTexObjectCreate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC *__pyx_v_pResDesc, struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC *__pyx_v_pTexDesc, struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC *__pyx_v_pResViewDesc) {
  struct __pyx_obj_4cuda_4cuda_CUtexObject *__pyx_v_pTexObject = 0;
  CUDA_RESOURCE_DESC *__pyx_v_cpResDesc_ptr;
  CUDA_TEXTURE_DESC *__pyx_v_cpTexDesc_ptr;
  CUDA_RESOURCE_VIEW_DESC *__pyx_v_cpResViewDesc_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct CUDA_RESOURCE_DESC_st *__pyx_t_2;
  int __pyx_t_3;
  struct CUDA_TEXTURE_DESC_st *__pyx_t_4;
  struct CUDA_RESOURCE_VIEW_DESC_st *__pyx_t_5;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__971)
  __Pyx_RefNannySetupContext("cuTexObjectCreate", 0);
  __Pyx_TraceCall("cuTexObjectCreate", __pyx_f[0], 31252, 0, __PYX_ERR(0, 31252, __pyx_L1_error));

  /* "cuda/cuda.pyx":31477
 *     :py:obj:`~.cuTexObjectDestroy`, :py:obj:`~.cudaCreateTextureObject`
 *     """
 *     cdef CUtexObject pTexObject = CUtexObject()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_RESOURCE_DESC* cpResDesc_ptr = pResDesc._ptr if pResDesc != None else NULL
 *     cdef ccuda.CUDA_TEXTURE_DESC* cpTexDesc_ptr = pTexDesc._ptr if pTexDesc != None else NULL
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexObject)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pTexObject = ((struct __pyx_obj_4cuda_4cuda_CUtexObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":31478
 *     """
 *     cdef CUtexObject pTexObject = CUtexObject()
 *     cdef ccuda.CUDA_RESOURCE_DESC* cpResDesc_ptr = pResDesc._ptr if pResDesc != None else NULL             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_TEXTURE_DESC* cpTexDesc_ptr = pTexDesc._ptr if pTexDesc != None else NULL
 *     cdef ccuda.CUDA_RESOURCE_VIEW_DESC* cpResViewDesc_ptr = pResViewDesc._ptr if pResViewDesc != None else NULL
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_pResDesc), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31478, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 31478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_2 = __pyx_v_pResDesc->__pyx_base._ptr;
  } else {
    __pyx_t_2 = NULL;
  }
  __pyx_v_cpResDesc_ptr = __pyx_t_2;

  /* "cuda/cuda.pyx":31479
 *     cdef CUtexObject pTexObject = CUtexObject()
 *     cdef ccuda.CUDA_RESOURCE_DESC* cpResDesc_ptr = pResDesc._ptr if pResDesc != None else NULL
 *     cdef ccuda.CUDA_TEXTURE_DESC* cpTexDesc_ptr = pTexDesc._ptr if pTexDesc != None else NULL             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_RESOURCE_VIEW_DESC* cpResViewDesc_ptr = pResViewDesc._ptr if pResViewDesc != None else NULL
 *     err = ccuda.cuTexObjectCreate(pTexObject._ptr, cpResDesc_ptr, cpTexDesc_ptr, cpResViewDesc_ptr)
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_pTexDesc), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31479, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 31479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_v_pTexDesc->__pyx_base._ptr;
  } else {
    __pyx_t_4 = NULL;
  }
  __pyx_v_cpTexDesc_ptr = __pyx_t_4;

  /* "cuda/cuda.pyx":31480
 *     cdef ccuda.CUDA_RESOURCE_DESC* cpResDesc_ptr = pResDesc._ptr if pResDesc != None else NULL
 *     cdef ccuda.CUDA_TEXTURE_DESC* cpTexDesc_ptr = pTexDesc._ptr if pTexDesc != None else NULL
 *     cdef ccuda.CUDA_RESOURCE_VIEW_DESC* cpResViewDesc_ptr = pResViewDesc._ptr if pResViewDesc != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexObjectCreate(pTexObject._ptr, cpResDesc_ptr, cpTexDesc_ptr, cpResViewDesc_ptr)
 *     return (CUresult(err), pTexObject)
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_pResViewDesc), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31480, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 31480, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_5 = __pyx_v_pResViewDesc->__pyx_base._ptr;
  } else {
    __pyx_t_5 = NULL;
  }
  __pyx_v_cpResViewDesc_ptr = __pyx_t_5;

  /* "cuda/cuda.pyx":31481
 *     cdef ccuda.CUDA_TEXTURE_DESC* cpTexDesc_ptr = pTexDesc._ptr if pTexDesc != None else NULL
 *     cdef ccuda.CUDA_RESOURCE_VIEW_DESC* cpResViewDesc_ptr = pResViewDesc._ptr if pResViewDesc != None else NULL
 *     err = ccuda.cuTexObjectCreate(pTexObject._ptr, cpResDesc_ptr, cpTexDesc_ptr, cpResViewDesc_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pTexObject)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexObjectCreate(__pyx_v_pTexObject->_ptr, __pyx_v_cpResDesc_ptr, __pyx_v_cpTexDesc_ptr, __pyx_v_cpResViewDesc_ptr); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31481, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31482
 *     cdef ccuda.CUDA_RESOURCE_VIEW_DESC* cpResViewDesc_ptr = pResViewDesc._ptr if pResViewDesc != None else NULL
 *     err = ccuda.cuTexObjectCreate(pTexObject._ptr, cpResDesc_ptr, cpTexDesc_ptr, cpResViewDesc_ptr)
 *     return (CUresult(err), pTexObject)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 31482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pTexObject));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pTexObject));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_pTexObject));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31252
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectCreate(pResDesc : CUDA_RESOURCE_DESC, pTexDesc : CUDA_TEXTURE_DESC, pResViewDesc : CUDA_RESOURCE_VIEW_DESC):             # <<<<<<<<<<<<<<
 *     """ Creates a texture object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuTexObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pTexObject);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31485
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectDestroy(texObject):             # <<<<<<<<<<<<<<
 *     """ Destroys a texture object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_697cuTexObjectDestroy(PyObject *__pyx_self, PyObject *__pyx_v_texObject); /*proto*/
static char __pyx_doc_4cuda_4cuda_696cuTexObjectDestroy[] = "cuTexObjectDestroy(texObject)\n Destroys a texture object.\n\n    Destroys the texture object specified by `texObject`.\n\n    Parameters\n    ----------\n    texObject : :py:obj:`~.CUtexObject`\n        Texture object to destroy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuTexObjectCreate`, :py:obj:`~.cudaDestroyTextureObject`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_697cuTexObjectDestroy = {"cuTexObjectDestroy", (PyCFunction)__pyx_pw_4cuda_4cuda_697cuTexObjectDestroy, METH_O, __pyx_doc_4cuda_4cuda_696cuTexObjectDestroy};
static PyObject *__pyx_pw_4cuda_4cuda_697cuTexObjectDestroy(PyObject *__pyx_self, PyObject *__pyx_v_texObject) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexObjectDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_696cuTexObjectDestroy(__pyx_self, ((PyObject *)__pyx_v_texObject));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_696cuTexObjectDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_texObject) {
  CUtexObject __pyx_v_ctexObject;
  PyObject *__pyx_v_ptexObject = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__972)
  __Pyx_RefNannySetupContext("cuTexObjectDestroy", 0);
  __Pyx_TraceCall("cuTexObjectDestroy", __pyx_f[0], 31485, 0, __PYX_ERR(0, 31485, __pyx_L1_error));

  /* "cuda/cuda.pyx":31505
 *     """
 *     cdef ccuda.CUtexObject ctexObject
 *     if texObject is None:             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):
 */
  __pyx_t_1 = (__pyx_v_texObject == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31506
 *     cdef ccuda.CUtexObject ctexObject
 *     if texObject is None:
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(texObject, (CUtexObject)):
 *         ptexObject = int(texObject)
 */
    __pyx_v_ctexObject = ((CUtexObject)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31505
 *     """
 *     cdef ccuda.CUtexObject ctexObject
 *     if texObject is None:             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31507
 *     if texObject is None:
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):             # <<<<<<<<<<<<<<
 *         ptexObject = int(texObject)
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_texObject, __pyx_ptype_4cuda_4cuda_CUtexObject); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31508
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):
 *         ptexObject = int(texObject)             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_texObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ptexObject = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31509
 *     elif isinstance(texObject, (CUtexObject)):
 *         ptexObject = int(texObject)
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject             # <<<<<<<<<<<<<<
 *     else:
 *         ptexObject = int(CUtexObject(texObject))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ptexObject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31509, __pyx_L1_error)
    __pyx_v_ctexObject = ((CUtexObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31507
 *     if texObject is None:
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):             # <<<<<<<<<<<<<<
 *         ptexObject = int(texObject)
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31511
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 *     else:
 *         ptexObject = int(CUtexObject(texObject))             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexObject), __pyx_v_texObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ptexObject = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31512
 *     else:
 *         ptexObject = int(CUtexObject(texObject))
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuTexObjectDestroy(ctexObject)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ptexObject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31512, __pyx_L1_error)
    __pyx_v_ctexObject = ((CUtexObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31514
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 * 
 *     err = ccuda.cuTexObjectDestroy(ctexObject)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexObjectDestroy(__pyx_v_ctexObject); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31514, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31515
 * 
 *     err = ccuda.cuTexObjectDestroy(ctexObject)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31485
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectDestroy(texObject):             # <<<<<<<<<<<<<<
 *     """ Destroys a texture object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexObjectDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ptexObject);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31518
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectGetResourceDesc(texObject):             # <<<<<<<<<<<<<<
 *     """ Returns a texture object's resource descriptor.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_699cuTexObjectGetResourceDesc(PyObject *__pyx_self, PyObject *__pyx_v_texObject); /*proto*/
static char __pyx_doc_4cuda_4cuda_698cuTexObjectGetResourceDesc[] = "cuTexObjectGetResourceDesc(texObject)\n Returns a texture object's resource descriptor.\n\n    Returns the resource descriptor for the texture object specified by\n    `texObject`.\n\n    Parameters\n    ----------\n    texObject : :py:obj:`~.CUtexObject`\n        Texture object\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pResDesc : :py:obj:`~.CUDA_RESOURCE_DESC`\n        Resource descriptor\n\n    See Also\n    --------\n    :py:obj:`~.cuTexObjectCreate`, :py:obj:`~.cudaGetTextureObjectResourceDesc`,\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_699cuTexObjectGetResourceDesc = {"cuTexObjectGetResourceDesc", (PyCFunction)__pyx_pw_4cuda_4cuda_699cuTexObjectGetResourceDesc, METH_O, __pyx_doc_4cuda_4cuda_698cuTexObjectGetResourceDesc};
static PyObject *__pyx_pw_4cuda_4cuda_699cuTexObjectGetResourceDesc(PyObject *__pyx_self, PyObject *__pyx_v_texObject) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexObjectGetResourceDesc (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_698cuTexObjectGetResourceDesc(__pyx_self, ((PyObject *)__pyx_v_texObject));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_698cuTexObjectGetResourceDesc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_texObject) {
  CUtexObject __pyx_v_ctexObject;
  PyObject *__pyx_v_ptexObject = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC *__pyx_v_pResDesc = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__973)
  __Pyx_RefNannySetupContext("cuTexObjectGetResourceDesc", 0);
  __Pyx_TraceCall("cuTexObjectGetResourceDesc", __pyx_f[0], 31518, 0, __PYX_ERR(0, 31518, __pyx_L1_error));

  /* "cuda/cuda.pyx":31541
 *     """
 *     cdef ccuda.CUtexObject ctexObject
 *     if texObject is None:             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):
 */
  __pyx_t_1 = (__pyx_v_texObject == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31542
 *     cdef ccuda.CUtexObject ctexObject
 *     if texObject is None:
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(texObject, (CUtexObject)):
 *         ptexObject = int(texObject)
 */
    __pyx_v_ctexObject = ((CUtexObject)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31541
 *     """
 *     cdef ccuda.CUtexObject ctexObject
 *     if texObject is None:             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31543
 *     if texObject is None:
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):             # <<<<<<<<<<<<<<
 *         ptexObject = int(texObject)
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_texObject, __pyx_ptype_4cuda_4cuda_CUtexObject); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31544
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):
 *         ptexObject = int(texObject)             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_texObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ptexObject = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31545
 *     elif isinstance(texObject, (CUtexObject)):
 *         ptexObject = int(texObject)
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject             # <<<<<<<<<<<<<<
 *     else:
 *         ptexObject = int(CUtexObject(texObject))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ptexObject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31545, __pyx_L1_error)
    __pyx_v_ctexObject = ((CUtexObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31543
 *     if texObject is None:
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):             # <<<<<<<<<<<<<<
 *         ptexObject = int(texObject)
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31547
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 *     else:
 *         ptexObject = int(CUtexObject(texObject))             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexObject), __pyx_v_texObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ptexObject = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31548
 *     else:
 *         ptexObject = int(CUtexObject(texObject))
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_RESOURCE_DESC pResDesc = CUDA_RESOURCE_DESC()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ptexObject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31548, __pyx_L1_error)
    __pyx_v_ctexObject = ((CUtexObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31550
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 * 
 *     cdef CUDA_RESOURCE_DESC pResDesc = CUDA_RESOURCE_DESC()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexObjectGetResourceDesc(pResDesc._ptr, ctexObject)
 *     return (CUresult(err), pResDesc)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pResDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":31551
 * 
 *     cdef CUDA_RESOURCE_DESC pResDesc = CUDA_RESOURCE_DESC()
 *     err = ccuda.cuTexObjectGetResourceDesc(pResDesc._ptr, ctexObject)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pResDesc)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexObjectGetResourceDesc(__pyx_v_pResDesc->__pyx_base._ptr, __pyx_v_ctexObject); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31551, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31552
 *     cdef CUDA_RESOURCE_DESC pResDesc = CUDA_RESOURCE_DESC()
 *     err = ccuda.cuTexObjectGetResourceDesc(pResDesc._ptr, ctexObject)
 *     return (CUresult(err), pResDesc)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pResDesc));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pResDesc));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pResDesc));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31518
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectGetResourceDesc(texObject):             # <<<<<<<<<<<<<<
 *     """ Returns a texture object's resource descriptor.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexObjectGetResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ptexObject);
  __Pyx_XDECREF((PyObject *)__pyx_v_pResDesc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31555
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectGetTextureDesc(texObject):             # <<<<<<<<<<<<<<
 *     """ Returns a texture object's texture descriptor.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_701cuTexObjectGetTextureDesc(PyObject *__pyx_self, PyObject *__pyx_v_texObject); /*proto*/
static char __pyx_doc_4cuda_4cuda_700cuTexObjectGetTextureDesc[] = "cuTexObjectGetTextureDesc(texObject)\n Returns a texture object's texture descriptor.\n\n    Returns the texture descriptor for the texture object specified by\n    `texObject`.\n\n    Parameters\n    ----------\n    texObject : :py:obj:`~.CUtexObject`\n        Texture object\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pTexDesc : :py:obj:`~.CUDA_TEXTURE_DESC`\n        Texture descriptor\n\n    See Also\n    --------\n    :py:obj:`~.cuTexObjectCreate`, :py:obj:`~.cudaGetTextureObjectTextureDesc`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_701cuTexObjectGetTextureDesc = {"cuTexObjectGetTextureDesc", (PyCFunction)__pyx_pw_4cuda_4cuda_701cuTexObjectGetTextureDesc, METH_O, __pyx_doc_4cuda_4cuda_700cuTexObjectGetTextureDesc};
static PyObject *__pyx_pw_4cuda_4cuda_701cuTexObjectGetTextureDesc(PyObject *__pyx_self, PyObject *__pyx_v_texObject) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexObjectGetTextureDesc (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_700cuTexObjectGetTextureDesc(__pyx_self, ((PyObject *)__pyx_v_texObject));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_700cuTexObjectGetTextureDesc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_texObject) {
  CUtexObject __pyx_v_ctexObject;
  PyObject *__pyx_v_ptexObject = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC *__pyx_v_pTexDesc = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__974)
  __Pyx_RefNannySetupContext("cuTexObjectGetTextureDesc", 0);
  __Pyx_TraceCall("cuTexObjectGetTextureDesc", __pyx_f[0], 31555, 0, __PYX_ERR(0, 31555, __pyx_L1_error));

  /* "cuda/cuda.pyx":31578
 *     """
 *     cdef ccuda.CUtexObject ctexObject
 *     if texObject is None:             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):
 */
  __pyx_t_1 = (__pyx_v_texObject == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31579
 *     cdef ccuda.CUtexObject ctexObject
 *     if texObject is None:
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(texObject, (CUtexObject)):
 *         ptexObject = int(texObject)
 */
    __pyx_v_ctexObject = ((CUtexObject)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31578
 *     """
 *     cdef ccuda.CUtexObject ctexObject
 *     if texObject is None:             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31580
 *     if texObject is None:
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):             # <<<<<<<<<<<<<<
 *         ptexObject = int(texObject)
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_texObject, __pyx_ptype_4cuda_4cuda_CUtexObject); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31581
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):
 *         ptexObject = int(texObject)             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_texObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ptexObject = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31582
 *     elif isinstance(texObject, (CUtexObject)):
 *         ptexObject = int(texObject)
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject             # <<<<<<<<<<<<<<
 *     else:
 *         ptexObject = int(CUtexObject(texObject))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ptexObject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31582, __pyx_L1_error)
    __pyx_v_ctexObject = ((CUtexObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31580
 *     if texObject is None:
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):             # <<<<<<<<<<<<<<
 *         ptexObject = int(texObject)
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31584
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 *     else:
 *         ptexObject = int(CUtexObject(texObject))             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexObject), __pyx_v_texObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ptexObject = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31585
 *     else:
 *         ptexObject = int(CUtexObject(texObject))
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_TEXTURE_DESC pTexDesc = CUDA_TEXTURE_DESC()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ptexObject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31585, __pyx_L1_error)
    __pyx_v_ctexObject = ((CUtexObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31587
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 * 
 *     cdef CUDA_TEXTURE_DESC pTexDesc = CUDA_TEXTURE_DESC()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexObjectGetTextureDesc(pTexDesc._ptr, ctexObject)
 *     return (CUresult(err), pTexDesc)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pTexDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":31588
 * 
 *     cdef CUDA_TEXTURE_DESC pTexDesc = CUDA_TEXTURE_DESC()
 *     err = ccuda.cuTexObjectGetTextureDesc(pTexDesc._ptr, ctexObject)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pTexDesc)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexObjectGetTextureDesc(__pyx_v_pTexDesc->__pyx_base._ptr, __pyx_v_ctexObject); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31588, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31589
 *     cdef CUDA_TEXTURE_DESC pTexDesc = CUDA_TEXTURE_DESC()
 *     err = ccuda.cuTexObjectGetTextureDesc(pTexDesc._ptr, ctexObject)
 *     return (CUresult(err), pTexDesc)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pTexDesc));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pTexDesc));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pTexDesc));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31555
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectGetTextureDesc(texObject):             # <<<<<<<<<<<<<<
 *     """ Returns a texture object's texture descriptor.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexObjectGetTextureDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ptexObject);
  __Pyx_XDECREF((PyObject *)__pyx_v_pTexDesc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31592
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectGetResourceViewDesc(texObject):             # <<<<<<<<<<<<<<
 *     """ Returns a texture object's resource view descriptor.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_703cuTexObjectGetResourceViewDesc(PyObject *__pyx_self, PyObject *__pyx_v_texObject); /*proto*/
static char __pyx_doc_4cuda_4cuda_702cuTexObjectGetResourceViewDesc[] = "cuTexObjectGetResourceViewDesc(texObject)\n Returns a texture object's resource view descriptor.\n\n    Returns the resource view descriptor for the texture object specified\n    by `texObject`. If no resource view was set for `texObject`, the\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned.\n\n    Parameters\n    ----------\n    texObject : :py:obj:`~.CUtexObject`\n        Texture object\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pResViewDesc : :py:obj:`~.CUDA_RESOURCE_VIEW_DESC`\n        Resource view descriptor\n\n    See Also\n    --------\n    :py:obj:`~.cuTexObjectCreate`, :py:obj:`~.cudaGetTextureObjectResourceViewDesc`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_703cuTexObjectGetResourceViewDesc = {"cuTexObjectGetResourceViewDesc", (PyCFunction)__pyx_pw_4cuda_4cuda_703cuTexObjectGetResourceViewDesc, METH_O, __pyx_doc_4cuda_4cuda_702cuTexObjectGetResourceViewDesc};
static PyObject *__pyx_pw_4cuda_4cuda_703cuTexObjectGetResourceViewDesc(PyObject *__pyx_self, PyObject *__pyx_v_texObject) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuTexObjectGetResourceViewDesc (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_702cuTexObjectGetResourceViewDesc(__pyx_self, ((PyObject *)__pyx_v_texObject));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_702cuTexObjectGetResourceViewDesc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_texObject) {
  CUtexObject __pyx_v_ctexObject;
  PyObject *__pyx_v_ptexObject = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC *__pyx_v_pResViewDesc = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__975)
  __Pyx_RefNannySetupContext("cuTexObjectGetResourceViewDesc", 0);
  __Pyx_TraceCall("cuTexObjectGetResourceViewDesc", __pyx_f[0], 31592, 0, __PYX_ERR(0, 31592, __pyx_L1_error));

  /* "cuda/cuda.pyx":31616
 *     """
 *     cdef ccuda.CUtexObject ctexObject
 *     if texObject is None:             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):
 */
  __pyx_t_1 = (__pyx_v_texObject == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31617
 *     cdef ccuda.CUtexObject ctexObject
 *     if texObject is None:
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(texObject, (CUtexObject)):
 *         ptexObject = int(texObject)
 */
    __pyx_v_ctexObject = ((CUtexObject)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31616
 *     """
 *     cdef ccuda.CUtexObject ctexObject
 *     if texObject is None:             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31618
 *     if texObject is None:
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):             # <<<<<<<<<<<<<<
 *         ptexObject = int(texObject)
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_texObject, __pyx_ptype_4cuda_4cuda_CUtexObject); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31619
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):
 *         ptexObject = int(texObject)             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_texObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ptexObject = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31620
 *     elif isinstance(texObject, (CUtexObject)):
 *         ptexObject = int(texObject)
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject             # <<<<<<<<<<<<<<
 *     else:
 *         ptexObject = int(CUtexObject(texObject))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ptexObject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31620, __pyx_L1_error)
    __pyx_v_ctexObject = ((CUtexObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31618
 *     if texObject is None:
 *         ctexObject = <ccuda.CUtexObject><void_ptr>0
 *     elif isinstance(texObject, (CUtexObject)):             # <<<<<<<<<<<<<<
 *         ptexObject = int(texObject)
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31622
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 *     else:
 *         ptexObject = int(CUtexObject(texObject))             # <<<<<<<<<<<<<<
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexObject), __pyx_v_texObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ptexObject = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31623
 *     else:
 *         ptexObject = int(CUtexObject(texObject))
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_RESOURCE_VIEW_DESC pResViewDesc = CUDA_RESOURCE_VIEW_DESC()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ptexObject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31623, __pyx_L1_error)
    __pyx_v_ctexObject = ((CUtexObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31625
 *         ctexObject = <ccuda.CUtexObject><void_ptr>ptexObject
 * 
 *     cdef CUDA_RESOURCE_VIEW_DESC pResViewDesc = CUDA_RESOURCE_VIEW_DESC()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuTexObjectGetResourceViewDesc(pResViewDesc._ptr, ctexObject)
 *     return (CUresult(err), pResViewDesc)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pResViewDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":31626
 * 
 *     cdef CUDA_RESOURCE_VIEW_DESC pResViewDesc = CUDA_RESOURCE_VIEW_DESC()
 *     err = ccuda.cuTexObjectGetResourceViewDesc(pResViewDesc._ptr, ctexObject)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pResViewDesc)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuTexObjectGetResourceViewDesc(__pyx_v_pResViewDesc->__pyx_base._ptr, __pyx_v_ctexObject); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31626, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31627
 *     cdef CUDA_RESOURCE_VIEW_DESC pResViewDesc = CUDA_RESOURCE_VIEW_DESC()
 *     err = ccuda.cuTexObjectGetResourceViewDesc(pResViewDesc._ptr, ctexObject)
 *     return (CUresult(err), pResViewDesc)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pResViewDesc));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pResViewDesc));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pResViewDesc));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31592
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectGetResourceViewDesc(texObject):             # <<<<<<<<<<<<<<
 *     """ Returns a texture object's resource view descriptor.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuTexObjectGetResourceViewDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ptexObject);
  __Pyx_XDECREF((PyObject *)__pyx_v_pResViewDesc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31630
 * 
 * @cython.embedsignature(True)
 * def cuSurfObjectCreate(pResDesc : CUDA_RESOURCE_DESC):             # <<<<<<<<<<<<<<
 *     """ Creates a surface object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_705cuSurfObjectCreate(PyObject *__pyx_self, PyObject *__pyx_v_pResDesc); /*proto*/
static char __pyx_doc_4cuda_4cuda_704cuSurfObjectCreate[] = "cuSurfObjectCreate(CUDA_RESOURCE_DESC pResDesc: CUDA_RESOURCE_DESC)\n Creates a surface object.\n\n    Creates a surface object and returns it in `pSurfObject`. `pResDesc`\n    describes the data to perform surface load/stores on.\n    :py:obj:`~.CUDA_RESOURCE_DESC.resType` must be\n    :py:obj:`~.CU_RESOURCE_TYPE_ARRAY` and\n    :py:obj:`~.CUDA_RESOURCE_DESC`::res::array::hArray must be set to a\n    valid CUDA array handle. :py:obj:`~.CUDA_RESOURCE_DESC.flags` must be\n    set to zero.\n\n    Surface objects are only supported on devices of compute capability 3.0\n    or higher. Additionally, a surface object is an opaque value, and, as\n    such, should only be accessed through CUDA API calls.\n\n    Parameters\n    ----------\n    pResDesc : :py:obj:`~.CUDA_RESOURCE_DESC`\n        Resource descriptor\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pSurfObject : :py:obj:`~.CUsurfObject`\n        Surface object to create\n\n    See Also\n    --------\n    :py:obj:`~.cuSurfObjectDestroy`, :py:obj:`~.cudaCreateSurfaceObject`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_705cuSurfObjectCreate = {"cuSurfObjectCreate", (PyCFunction)__pyx_pw_4cuda_4cuda_705cuSurfObjectCreate, METH_O, __pyx_doc_4cuda_4cuda_704cuSurfObjectCreate};
static PyObject *__pyx_pw_4cuda_4cuda_705cuSurfObjectCreate(PyObject *__pyx_self, PyObject *__pyx_v_pResDesc) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuSurfObjectCreate (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pResDesc), __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC, 1, "pResDesc", 0))) __PYX_ERR(0, 31630, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_704cuSurfObjectCreate(__pyx_self, ((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC *)__pyx_v_pResDesc));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_704cuSurfObjectCreate(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC *__pyx_v_pResDesc) {
  struct __pyx_obj_4cuda_4cuda_CUsurfObject *__pyx_v_pSurfObject = 0;
  CUDA_RESOURCE_DESC *__pyx_v_cpResDesc_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct CUDA_RESOURCE_DESC_st *__pyx_t_2;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__976)
  __Pyx_RefNannySetupContext("cuSurfObjectCreate", 0);
  __Pyx_TraceCall("cuSurfObjectCreate", __pyx_f[0], 31630, 0, __PYX_ERR(0, 31630, __pyx_L1_error));

  /* "cuda/cuda.pyx":31661
 *     :py:obj:`~.cuSurfObjectDestroy`, :py:obj:`~.cudaCreateSurfaceObject`
 *     """
 *     cdef CUsurfObject pSurfObject = CUsurfObject()             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUDA_RESOURCE_DESC* cpResDesc_ptr = pResDesc._ptr if pResDesc != None else NULL
 *     err = ccuda.cuSurfObjectCreate(pSurfObject._ptr, cpResDesc_ptr)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUsurfObject)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pSurfObject = ((struct __pyx_obj_4cuda_4cuda_CUsurfObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":31662
 *     """
 *     cdef CUsurfObject pSurfObject = CUsurfObject()
 *     cdef ccuda.CUDA_RESOURCE_DESC* cpResDesc_ptr = pResDesc._ptr if pResDesc != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuSurfObjectCreate(pSurfObject._ptr, cpResDesc_ptr)
 *     return (CUresult(err), pSurfObject)
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_pResDesc), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31662, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 31662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_2 = __pyx_v_pResDesc->__pyx_base._ptr;
  } else {
    __pyx_t_2 = NULL;
  }
  __pyx_v_cpResDesc_ptr = __pyx_t_2;

  /* "cuda/cuda.pyx":31663
 *     cdef CUsurfObject pSurfObject = CUsurfObject()
 *     cdef ccuda.CUDA_RESOURCE_DESC* cpResDesc_ptr = pResDesc._ptr if pResDesc != None else NULL
 *     err = ccuda.cuSurfObjectCreate(pSurfObject._ptr, cpResDesc_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pSurfObject)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuSurfObjectCreate(__pyx_v_pSurfObject->_ptr, __pyx_v_cpResDesc_ptr); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31663, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":31664
 *     cdef ccuda.CUDA_RESOURCE_DESC* cpResDesc_ptr = pResDesc._ptr if pResDesc != None else NULL
 *     err = ccuda.cuSurfObjectCreate(pSurfObject._ptr, cpResDesc_ptr)
 *     return (CUresult(err), pSurfObject)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 31664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_pSurfObject));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pSurfObject));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_pSurfObject));
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31630
 * 
 * @cython.embedsignature(True)
 * def cuSurfObjectCreate(pResDesc : CUDA_RESOURCE_DESC):             # <<<<<<<<<<<<<<
 *     """ Creates a surface object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuSurfObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pSurfObject);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31667
 * 
 * @cython.embedsignature(True)
 * def cuSurfObjectDestroy(surfObject):             # <<<<<<<<<<<<<<
 *     """ Destroys a surface object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_707cuSurfObjectDestroy(PyObject *__pyx_self, PyObject *__pyx_v_surfObject); /*proto*/
static char __pyx_doc_4cuda_4cuda_706cuSurfObjectDestroy[] = "cuSurfObjectDestroy(surfObject)\n Destroys a surface object.\n\n    Destroys the surface object specified by `surfObject`.\n\n    Parameters\n    ----------\n    surfObject : :py:obj:`~.CUsurfObject`\n        Surface object to destroy\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuSurfObjectCreate`, :py:obj:`~.cudaDestroySurfaceObject`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_707cuSurfObjectDestroy = {"cuSurfObjectDestroy", (PyCFunction)__pyx_pw_4cuda_4cuda_707cuSurfObjectDestroy, METH_O, __pyx_doc_4cuda_4cuda_706cuSurfObjectDestroy};
static PyObject *__pyx_pw_4cuda_4cuda_707cuSurfObjectDestroy(PyObject *__pyx_self, PyObject *__pyx_v_surfObject) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuSurfObjectDestroy (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_706cuSurfObjectDestroy(__pyx_self, ((PyObject *)__pyx_v_surfObject));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_706cuSurfObjectDestroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_surfObject) {
  CUsurfObject __pyx_v_csurfObject;
  PyObject *__pyx_v_psurfObject = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__977)
  __Pyx_RefNannySetupContext("cuSurfObjectDestroy", 0);
  __Pyx_TraceCall("cuSurfObjectDestroy", __pyx_f[0], 31667, 0, __PYX_ERR(0, 31667, __pyx_L1_error));

  /* "cuda/cuda.pyx":31687
 *     """
 *     cdef ccuda.CUsurfObject csurfObject
 *     if surfObject is None:             # <<<<<<<<<<<<<<
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>0
 *     elif isinstance(surfObject, (CUsurfObject)):
 */
  __pyx_t_1 = (__pyx_v_surfObject == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31688
 *     cdef ccuda.CUsurfObject csurfObject
 *     if surfObject is None:
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(surfObject, (CUsurfObject)):
 *         psurfObject = int(surfObject)
 */
    __pyx_v_csurfObject = ((CUsurfObject)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31687
 *     """
 *     cdef ccuda.CUsurfObject csurfObject
 *     if surfObject is None:             # <<<<<<<<<<<<<<
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>0
 *     elif isinstance(surfObject, (CUsurfObject)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31689
 *     if surfObject is None:
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>0
 *     elif isinstance(surfObject, (CUsurfObject)):             # <<<<<<<<<<<<<<
 *         psurfObject = int(surfObject)
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_surfObject, __pyx_ptype_4cuda_4cuda_CUsurfObject); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31690
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>0
 *     elif isinstance(surfObject, (CUsurfObject)):
 *         psurfObject = int(surfObject)             # <<<<<<<<<<<<<<
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_surfObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psurfObject = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31691
 *     elif isinstance(surfObject, (CUsurfObject)):
 *         psurfObject = int(surfObject)
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject             # <<<<<<<<<<<<<<
 *     else:
 *         psurfObject = int(CUsurfObject(surfObject))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psurfObject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31691, __pyx_L1_error)
    __pyx_v_csurfObject = ((CUsurfObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31689
 *     if surfObject is None:
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>0
 *     elif isinstance(surfObject, (CUsurfObject)):             # <<<<<<<<<<<<<<
 *         psurfObject = int(surfObject)
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31693
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject
 *     else:
 *         psurfObject = int(CUsurfObject(surfObject))             # <<<<<<<<<<<<<<
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUsurfObject), __pyx_v_surfObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psurfObject = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31694
 *     else:
 *         psurfObject = int(CUsurfObject(surfObject))
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuSurfObjectDestroy(csurfObject)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psurfObject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31694, __pyx_L1_error)
    __pyx_v_csurfObject = ((CUsurfObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31696
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject
 * 
 *     err = ccuda.cuSurfObjectDestroy(csurfObject)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuSurfObjectDestroy(__pyx_v_csurfObject); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31696, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31697
 * 
 *     err = ccuda.cuSurfObjectDestroy(csurfObject)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31667
 * 
 * @cython.embedsignature(True)
 * def cuSurfObjectDestroy(surfObject):             # <<<<<<<<<<<<<<
 *     """ Destroys a surface object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuSurfObjectDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psurfObject);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31700
 * 
 * @cython.embedsignature(True)
 * def cuSurfObjectGetResourceDesc(surfObject):             # <<<<<<<<<<<<<<
 *     """ Returns a surface object's resource descriptor.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_709cuSurfObjectGetResourceDesc(PyObject *__pyx_self, PyObject *__pyx_v_surfObject); /*proto*/
static char __pyx_doc_4cuda_4cuda_708cuSurfObjectGetResourceDesc[] = "cuSurfObjectGetResourceDesc(surfObject)\n Returns a surface object's resource descriptor.\n\n    Returns the resource descriptor for the surface object specified by\n    `surfObject`.\n\n    Parameters\n    ----------\n    surfObject : :py:obj:`~.CUsurfObject`\n        Surface object\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pResDesc : :py:obj:`~.CUDA_RESOURCE_DESC`\n        Resource descriptor\n\n    See Also\n    --------\n    :py:obj:`~.cuSurfObjectCreate`, :py:obj:`~.cudaGetSurfaceObjectResourceDesc`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_709cuSurfObjectGetResourceDesc = {"cuSurfObjectGetResourceDesc", (PyCFunction)__pyx_pw_4cuda_4cuda_709cuSurfObjectGetResourceDesc, METH_O, __pyx_doc_4cuda_4cuda_708cuSurfObjectGetResourceDesc};
static PyObject *__pyx_pw_4cuda_4cuda_709cuSurfObjectGetResourceDesc(PyObject *__pyx_self, PyObject *__pyx_v_surfObject) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuSurfObjectGetResourceDesc (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_708cuSurfObjectGetResourceDesc(__pyx_self, ((PyObject *)__pyx_v_surfObject));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_708cuSurfObjectGetResourceDesc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_surfObject) {
  CUsurfObject __pyx_v_csurfObject;
  PyObject *__pyx_v_psurfObject = NULL;
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC *__pyx_v_pResDesc = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__978)
  __Pyx_RefNannySetupContext("cuSurfObjectGetResourceDesc", 0);
  __Pyx_TraceCall("cuSurfObjectGetResourceDesc", __pyx_f[0], 31700, 0, __PYX_ERR(0, 31700, __pyx_L1_error));

  /* "cuda/cuda.pyx":31723
 *     """
 *     cdef ccuda.CUsurfObject csurfObject
 *     if surfObject is None:             # <<<<<<<<<<<<<<
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>0
 *     elif isinstance(surfObject, (CUsurfObject)):
 */
  __pyx_t_1 = (__pyx_v_surfObject == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31724
 *     cdef ccuda.CUsurfObject csurfObject
 *     if surfObject is None:
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(surfObject, (CUsurfObject)):
 *         psurfObject = int(surfObject)
 */
    __pyx_v_csurfObject = ((CUsurfObject)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31723
 *     """
 *     cdef ccuda.CUsurfObject csurfObject
 *     if surfObject is None:             # <<<<<<<<<<<<<<
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>0
 *     elif isinstance(surfObject, (CUsurfObject)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31725
 *     if surfObject is None:
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>0
 *     elif isinstance(surfObject, (CUsurfObject)):             # <<<<<<<<<<<<<<
 *         psurfObject = int(surfObject)
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_surfObject, __pyx_ptype_4cuda_4cuda_CUsurfObject); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31726
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>0
 *     elif isinstance(surfObject, (CUsurfObject)):
 *         psurfObject = int(surfObject)             # <<<<<<<<<<<<<<
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_surfObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_psurfObject = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31727
 *     elif isinstance(surfObject, (CUsurfObject)):
 *         psurfObject = int(surfObject)
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject             # <<<<<<<<<<<<<<
 *     else:
 *         psurfObject = int(CUsurfObject(surfObject))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psurfObject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31727, __pyx_L1_error)
    __pyx_v_csurfObject = ((CUsurfObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31725
 *     if surfObject is None:
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>0
 *     elif isinstance(surfObject, (CUsurfObject)):             # <<<<<<<<<<<<<<
 *         psurfObject = int(surfObject)
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31729
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject
 *     else:
 *         psurfObject = int(CUsurfObject(surfObject))             # <<<<<<<<<<<<<<
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUsurfObject), __pyx_v_surfObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_psurfObject = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31730
 *     else:
 *         psurfObject = int(CUsurfObject(surfObject))
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject             # <<<<<<<<<<<<<<
 * 
 *     cdef CUDA_RESOURCE_DESC pResDesc = CUDA_RESOURCE_DESC()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_psurfObject); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31730, __pyx_L1_error)
    __pyx_v_csurfObject = ((CUsurfObject)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31732
 *         csurfObject = <ccuda.CUsurfObject><void_ptr>psurfObject
 * 
 *     cdef CUDA_RESOURCE_DESC pResDesc = CUDA_RESOURCE_DESC()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuSurfObjectGetResourceDesc(pResDesc._ptr, csurfObject)
 *     return (CUresult(err), pResDesc)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pResDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":31733
 * 
 *     cdef CUDA_RESOURCE_DESC pResDesc = CUDA_RESOURCE_DESC()
 *     err = ccuda.cuSurfObjectGetResourceDesc(pResDesc._ptr, csurfObject)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pResDesc)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuSurfObjectGetResourceDesc(__pyx_v_pResDesc->__pyx_base._ptr, __pyx_v_csurfObject); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31733, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31734
 *     cdef CUDA_RESOURCE_DESC pResDesc = CUDA_RESOURCE_DESC()
 *     err = ccuda.cuSurfObjectGetResourceDesc(pResDesc._ptr, csurfObject)
 *     return (CUresult(err), pResDesc)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pResDesc));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pResDesc));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pResDesc));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31700
 * 
 * @cython.embedsignature(True)
 * def cuSurfObjectGetResourceDesc(surfObject):             # <<<<<<<<<<<<<<
 *     """ Returns a surface object's resource descriptor.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuSurfObjectGetResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_psurfObject);
  __Pyx_XDECREF((PyObject *)__pyx_v_pResDesc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31737
 * 
 * @cython.embedsignature(True)
 * def cuDeviceCanAccessPeer(dev, peerDev):             # <<<<<<<<<<<<<<
 *     """ Queries if a device may directly access a peer device's memory.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_711cuDeviceCanAccessPeer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_710cuDeviceCanAccessPeer[] = "cuDeviceCanAccessPeer(dev, peerDev)\n Queries if a device may directly access a peer device's memory.\n\n    Returns in `*canAccessPeer` a value of 1 if contexts on `dev` are\n    capable of directly accessing memory from contexts on `peerDev` and 0\n    otherwise. If direct access of `peerDev` from `dev` is possible, then\n    access may be enabled on two specific contexts by calling\n    :py:obj:`~.cuCtxEnablePeerAccess()`.\n\n    Parameters\n    ----------\n    dev : :py:obj:`~.CUdevice`\n        Device from which allocations on `peerDev` are to be directly\n        accessed.\n    peerDev : :py:obj:`~.CUdevice`\n        Device on which the allocations to be directly accessed by `dev`\n        reside.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`\n    canAccessPeer : int\n        Returned access capability\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxEnablePeerAccess`, :py:obj:`~.cuCtxDisablePeerAccess`, :py:obj:`~.cudaDeviceCanAccessPeer`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_711cuDeviceCanAccessPeer = {"cuDeviceCanAccessPeer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_711cuDeviceCanAccessPeer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_710cuDeviceCanAccessPeer};
static PyObject *__pyx_pw_4cuda_4cuda_711cuDeviceCanAccessPeer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dev = 0;
  PyObject *__pyx_v_peerDev = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceCanAccessPeer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dev,&__pyx_n_s_peerDev,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dev)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_peerDev)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceCanAccessPeer", 1, 2, 2, 1); __PYX_ERR(0, 31737, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuDeviceCanAccessPeer") < 0)) __PYX_ERR(0, 31737, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_dev = values[0];
    __pyx_v_peerDev = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuDeviceCanAccessPeer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 31737, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceCanAccessPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_710cuDeviceCanAccessPeer(__pyx_self, __pyx_v_dev, __pyx_v_peerDev);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_710cuDeviceCanAccessPeer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dev, PyObject *__pyx_v_peerDev) {
  CUdevice __pyx_v_cpeerDev;
  PyObject *__pyx_v_ppeerDev = NULL;
  CUdevice __pyx_v_cdev;
  PyObject *__pyx_v_pdev = NULL;
  int __pyx_v_canAccessPeer;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__979)
  __Pyx_RefNannySetupContext("cuDeviceCanAccessPeer", 0);
  __Pyx_TraceCall("cuDeviceCanAccessPeer", __pyx_f[0], 31737, 0, __PYX_ERR(0, 31737, __pyx_L1_error));

  /* "cuda/cuda.pyx":31767
 *     """
 *     cdef ccuda.CUdevice cpeerDev
 *     if peerDev is None:             # <<<<<<<<<<<<<<
 *         cpeerDev = <ccuda.CUdevice>0
 *     elif isinstance(peerDev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_peerDev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31768
 *     cdef ccuda.CUdevice cpeerDev
 *     if peerDev is None:
 *         cpeerDev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(peerDev, (CUdevice)):
 *         ppeerDev = int(peerDev)
 */
    __pyx_v_cpeerDev = ((CUdevice)0);

    /* "cuda/cuda.pyx":31767
 *     """
 *     cdef ccuda.CUdevice cpeerDev
 *     if peerDev is None:             # <<<<<<<<<<<<<<
 *         cpeerDev = <ccuda.CUdevice>0
 *     elif isinstance(peerDev, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31769
 *     if peerDev is None:
 *         cpeerDev = <ccuda.CUdevice>0
 *     elif isinstance(peerDev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         ppeerDev = int(peerDev)
 *         cpeerDev = <ccuda.CUdevice>ppeerDev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_peerDev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31770
 *         cpeerDev = <ccuda.CUdevice>0
 *     elif isinstance(peerDev, (CUdevice)):
 *         ppeerDev = int(peerDev)             # <<<<<<<<<<<<<<
 *         cpeerDev = <ccuda.CUdevice>ppeerDev
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_peerDev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ppeerDev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31771
 *     elif isinstance(peerDev, (CUdevice)):
 *         ppeerDev = int(peerDev)
 *         cpeerDev = <ccuda.CUdevice>ppeerDev             # <<<<<<<<<<<<<<
 *     else:
 *         ppeerDev = int(CUdevice(peerDev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_ppeerDev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 31771, __pyx_L1_error)
    __pyx_v_cpeerDev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":31769
 *     if peerDev is None:
 *         cpeerDev = <ccuda.CUdevice>0
 *     elif isinstance(peerDev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         ppeerDev = int(peerDev)
 *         cpeerDev = <ccuda.CUdevice>ppeerDev
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31773
 *         cpeerDev = <ccuda.CUdevice>ppeerDev
 *     else:
 *         ppeerDev = int(CUdevice(peerDev))             # <<<<<<<<<<<<<<
 *         cpeerDev = <ccuda.CUdevice>ppeerDev
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_peerDev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ppeerDev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31774
 *     else:
 *         ppeerDev = int(CUdevice(peerDev))
 *         cpeerDev = <ccuda.CUdevice>ppeerDev             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdevice cdev
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_ppeerDev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 31774, __pyx_L1_error)
    __pyx_v_cpeerDev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31777
 * 
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dev == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31778
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 */
    __pyx_v_cdev = ((CUdevice)0);

    /* "cuda/cuda.pyx":31777
 * 
 *     cdef ccuda.CUdevice cdev
 *     if dev is None:             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":31779
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dev, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31780
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_dev); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pdev = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31781
 *     elif isinstance(dev, (CUdevice)):
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 *     else:
 *         pdev = int(CUdevice(dev))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 31781, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":31779
 *     if dev is None:
 *         cdev = <ccuda.CUdevice>0
 *     elif isinstance(dev, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdev = int(dev)
 *         cdev = <ccuda.CUdevice>pdev
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":31783
 *         cdev = <ccuda.CUdevice>pdev
 *     else:
 *         pdev = int(CUdevice(dev))             # <<<<<<<<<<<<<<
 *         cdev = <ccuda.CUdevice>pdev
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dev); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pdev = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31784
 *     else:
 *         pdev = int(CUdevice(dev))
 *         cdev = <ccuda.CUdevice>pdev             # <<<<<<<<<<<<<<
 * 
 *     cdef int canAccessPeer = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdev); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 31784, __pyx_L1_error)
    __pyx_v_cdev = ((CUdevice)__pyx_t_4);
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":31786
 *         cdev = <ccuda.CUdevice>pdev
 * 
 *     cdef int canAccessPeer = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceCanAccessPeer(&canAccessPeer, cdev, cpeerDev)
 *     return (CUresult(err), canAccessPeer)
 */
  __pyx_v_canAccessPeer = 0;

  /* "cuda/cuda.pyx":31787
 * 
 *     cdef int canAccessPeer = 0
 *     err = ccuda.cuDeviceCanAccessPeer(&canAccessPeer, cdev, cpeerDev)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), canAccessPeer)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuDeviceCanAccessPeer((&__pyx_v_canAccessPeer), __pyx_v_cdev, __pyx_v_cpeerDev); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31787, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31788
 *     cdef int canAccessPeer = 0
 *     err = ccuda.cuDeviceCanAccessPeer(&canAccessPeer, cdev, cpeerDev)
 *     return (CUresult(err), canAccessPeer)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_canAccessPeer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31737
 * 
 * @cython.embedsignature(True)
 * def cuDeviceCanAccessPeer(dev, peerDev):             # <<<<<<<<<<<<<<
 *     """ Queries if a device may directly access a peer device's memory.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceCanAccessPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppeerDev);
  __Pyx_XDECREF(__pyx_v_pdev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31791
 * 
 * @cython.embedsignature(True)
 * def cuCtxEnablePeerAccess(peerContext, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Enables direct access to memory allocations in a peer context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_713cuCtxEnablePeerAccess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_712cuCtxEnablePeerAccess[] = "cuCtxEnablePeerAccess(peerContext, unsigned int Flags)\n Enables direct access to memory allocations in a peer context.\n\n    If both the current context and `peerContext` are on devices which\n    support unified addressing (as may be queried using\n    :py:obj:`~.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING`) and same major\n    compute capability, then on success all allocations from `peerContext`\n    will immediately be accessible by the current context. See\n    :py:obj:`~.Unified Addressing` for additional details.\n\n    Note that access granted by this call is unidirectional and that in\n    order to access memory from the current context in `peerContext`, a\n    separate symmetric call to :py:obj:`~.cuCtxEnablePeerAccess()` is\n    required.\n\n    Note that there are both device-wide and system-wide limitations per\n    system configuration, as noted in the CUDA Programming Guide under the\n    section \"Peer-to-Peer Memory Access\".\n\n    Returns :py:obj:`~.CUDA_ERROR_PEER_ACCESS_UNSUPPORTED` if\n    :py:obj:`~.cuDeviceCanAccessPeer()` indicates that the\n    :py:obj:`~.CUdevice` of the current context cannot directly access\n    memory from the :py:obj:`~.CUdevice` of `peerContext`.\n\n    Returns :py:obj:`~.CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED` if direct\n    access of `peerContext` from the current context has already been\n    enabled.\n\n    Returns :py:obj:`~.CUDA_ERROR_TOO_MANY_PEERS` if direct peer access is\n    not possible because hardware resources required for peer access have\n    been exhausted.\n\n    Returns :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` if there is no current\n    context, `peerContext` is not a valid context, or if the current\n    context is `peerContext`.\n\n    Returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if `Flags` is not 0.\n\n    Parameters\n    ----------\n    peerContext : :py:obj:`~.CUcontext`\n        Peer context to enable direct access to from the current context\n    Flags : unsigned int\n        Reserved for future"" use and must be set to 0\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED`, :py:obj:`~.CUDA_ERROR_TOO_MANY_PEERS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_PEER_ACCESS_UNSUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceCanAccessPeer`, :py:obj:`~.cuCtxDisablePeerAccess`, :py:obj:`~.cudaDeviceEnablePeerAccess`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_713cuCtxEnablePeerAccess = {"cuCtxEnablePeerAccess", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_713cuCtxEnablePeerAccess, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_712cuCtxEnablePeerAccess};
static PyObject *__pyx_pw_4cuda_4cuda_713cuCtxEnablePeerAccess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_peerContext = 0;
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxEnablePeerAccess (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_peerContext,&__pyx_n_s_Flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_peerContext)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuCtxEnablePeerAccess", 1, 2, 2, 1); __PYX_ERR(0, 31791, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuCtxEnablePeerAccess") < 0)) __PYX_ERR(0, 31791, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_peerContext = values[0];
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 31791, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuCtxEnablePeerAccess", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 31791, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuCtxEnablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_712cuCtxEnablePeerAccess(__pyx_self, __pyx_v_peerContext, __pyx_v_Flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_712cuCtxEnablePeerAccess(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_peerContext, unsigned int __pyx_v_Flags) {
  CUcontext __pyx_v_cpeerContext;
  PyObject *__pyx_v_ppeerContext = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__980)
  __Pyx_RefNannySetupContext("cuCtxEnablePeerAccess", 0);
  __Pyx_TraceCall("cuCtxEnablePeerAccess", __pyx_f[0], 31791, 0, __PYX_ERR(0, 31791, __pyx_L1_error));

  /* "cuda/cuda.pyx":31846
 *     """
 *     cdef ccuda.CUcontext cpeerContext
 *     if peerContext is None:             # <<<<<<<<<<<<<<
 *         cpeerContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(peerContext, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_peerContext == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31847
 *     cdef ccuda.CUcontext cpeerContext
 *     if peerContext is None:
 *         cpeerContext = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(peerContext, (CUcontext)):
 *         ppeerContext = int(peerContext)
 */
    __pyx_v_cpeerContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31846
 *     """
 *     cdef ccuda.CUcontext cpeerContext
 *     if peerContext is None:             # <<<<<<<<<<<<<<
 *         cpeerContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(peerContext, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31848
 *     if peerContext is None:
 *         cpeerContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(peerContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *         ppeerContext = int(peerContext)
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_peerContext, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31849
 *         cpeerContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(peerContext, (CUcontext)):
 *         ppeerContext = int(peerContext)             # <<<<<<<<<<<<<<
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_peerContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ppeerContext = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31850
 *     elif isinstance(peerContext, (CUcontext)):
 *         ppeerContext = int(peerContext)
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext             # <<<<<<<<<<<<<<
 *     else:
 *         ppeerContext = int(CUcontext(peerContext))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppeerContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31850, __pyx_L1_error)
    __pyx_v_cpeerContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31848
 *     if peerContext is None:
 *         cpeerContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(peerContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *         ppeerContext = int(peerContext)
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31852
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext
 *     else:
 *         ppeerContext = int(CUcontext(peerContext))             # <<<<<<<<<<<<<<
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_peerContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ppeerContext = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31853
 *     else:
 *         ppeerContext = int(CUcontext(peerContext))
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuCtxEnablePeerAccess(cpeerContext, Flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppeerContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31853, __pyx_L1_error)
    __pyx_v_cpeerContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31855
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext
 * 
 *     err = ccuda.cuCtxEnablePeerAccess(cpeerContext, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuCtxEnablePeerAccess(__pyx_v_cpeerContext, __pyx_v_Flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31855, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31856
 * 
 *     err = ccuda.cuCtxEnablePeerAccess(cpeerContext, Flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31791
 * 
 * @cython.embedsignature(True)
 * def cuCtxEnablePeerAccess(peerContext, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Enables direct access to memory allocations in a peer context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuCtxEnablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppeerContext);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31859
 * 
 * @cython.embedsignature(True)
 * def cuCtxDisablePeerAccess(peerContext):             # <<<<<<<<<<<<<<
 *     """ Disables direct access to memory allocations in a peer context and unregisters any registered allocations.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_715cuCtxDisablePeerAccess(PyObject *__pyx_self, PyObject *__pyx_v_peerContext); /*proto*/
static char __pyx_doc_4cuda_4cuda_714cuCtxDisablePeerAccess[] = "cuCtxDisablePeerAccess(peerContext)\n Disables direct access to memory allocations in a peer context and unregisters any registered allocations.\n\n    Returns :py:obj:`~.CUDA_ERROR_PEER_ACCESS_NOT_ENABLED` if direct peer\n    access has not yet been enabled from `peerContext` to the current\n    context.\n\n    Returns :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` if there is no current\n    context, or if `peerContext` is not a valid context.\n\n    Parameters\n    ----------\n    peerContext : :py:obj:`~.CUcontext`\n        Peer context to disable direct access to\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_PEER_ACCESS_NOT_ENABLED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`,\n\n    See Also\n    --------\n    :py:obj:`~.cuDeviceCanAccessPeer`, :py:obj:`~.cuCtxEnablePeerAccess`, :py:obj:`~.cudaDeviceDisablePeerAccess`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_715cuCtxDisablePeerAccess = {"cuCtxDisablePeerAccess", (PyCFunction)__pyx_pw_4cuda_4cuda_715cuCtxDisablePeerAccess, METH_O, __pyx_doc_4cuda_4cuda_714cuCtxDisablePeerAccess};
static PyObject *__pyx_pw_4cuda_4cuda_715cuCtxDisablePeerAccess(PyObject *__pyx_self, PyObject *__pyx_v_peerContext) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuCtxDisablePeerAccess (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_714cuCtxDisablePeerAccess(__pyx_self, ((PyObject *)__pyx_v_peerContext));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_714cuCtxDisablePeerAccess(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_peerContext) {
  CUcontext __pyx_v_cpeerContext;
  PyObject *__pyx_v_ppeerContext = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__981)
  __Pyx_RefNannySetupContext("cuCtxDisablePeerAccess", 0);
  __Pyx_TraceCall("cuCtxDisablePeerAccess", __pyx_f[0], 31859, 0, __PYX_ERR(0, 31859, __pyx_L1_error));

  /* "cuda/cuda.pyx":31884
 *     """
 *     cdef ccuda.CUcontext cpeerContext
 *     if peerContext is None:             # <<<<<<<<<<<<<<
 *         cpeerContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(peerContext, (CUcontext)):
 */
  __pyx_t_1 = (__pyx_v_peerContext == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31885
 *     cdef ccuda.CUcontext cpeerContext
 *     if peerContext is None:
 *         cpeerContext = <ccuda.CUcontext><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(peerContext, (CUcontext)):
 *         ppeerContext = int(peerContext)
 */
    __pyx_v_cpeerContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31884
 *     """
 *     cdef ccuda.CUcontext cpeerContext
 *     if peerContext is None:             # <<<<<<<<<<<<<<
 *         cpeerContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(peerContext, (CUcontext)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31886
 *     if peerContext is None:
 *         cpeerContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(peerContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *         ppeerContext = int(peerContext)
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_peerContext, __pyx_ptype_4cuda_4cuda_CUcontext); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31887
 *         cpeerContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(peerContext, (CUcontext)):
 *         ppeerContext = int(peerContext)             # <<<<<<<<<<<<<<
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_peerContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ppeerContext = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31888
 *     elif isinstance(peerContext, (CUcontext)):
 *         ppeerContext = int(peerContext)
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext             # <<<<<<<<<<<<<<
 *     else:
 *         ppeerContext = int(CUcontext(peerContext))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppeerContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31888, __pyx_L1_error)
    __pyx_v_cpeerContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31886
 *     if peerContext is None:
 *         cpeerContext = <ccuda.CUcontext><void_ptr>0
 *     elif isinstance(peerContext, (CUcontext)):             # <<<<<<<<<<<<<<
 *         ppeerContext = int(peerContext)
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31890
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext
 *     else:
 *         ppeerContext = int(CUcontext(peerContext))             # <<<<<<<<<<<<<<
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), __pyx_v_peerContext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ppeerContext = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31891
 *     else:
 *         ppeerContext = int(CUcontext(peerContext))
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuCtxDisablePeerAccess(cpeerContext)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppeerContext); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31891, __pyx_L1_error)
    __pyx_v_cpeerContext = ((CUcontext)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31893
 *         cpeerContext = <ccuda.CUcontext><void_ptr>ppeerContext
 * 
 *     err = ccuda.cuCtxDisablePeerAccess(cpeerContext)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuCtxDisablePeerAccess(__pyx_v_cpeerContext); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31893, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":31894
 * 
 *     err = ccuda.cuCtxDisablePeerAccess(cpeerContext)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31859
 * 
 * @cython.embedsignature(True)
 * def cuCtxDisablePeerAccess(peerContext):             # <<<<<<<<<<<<<<
 *     """ Disables direct access to memory allocations in a peer context and unregisters any registered allocations.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuCtxDisablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppeerContext);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31897
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetP2PAttribute(attrib not None : CUdevice_P2PAttribute, srcDevice, dstDevice):             # <<<<<<<<<<<<<<
 *     """ Queries attributes of the link between two devices.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_717cuDeviceGetP2PAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_716cuDeviceGetP2PAttribute[] = "cuDeviceGetP2PAttribute(attrib: CUdevice_P2PAttribute, srcDevice, dstDevice)\n Queries attributes of the link between two devices.\n\n    Returns in `*value` the value of the requested attribute `attrib` of\n    the link between `srcDevice` and `dstDevice`. The supported attributes\n    are:\n\n    - :py:obj:`~.CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK`: A relative\n      value indicating the performance of the link between two devices.\n\n    - :py:obj:`~.CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED` P2P: 1 if P2P\n      Access is enable.\n\n    - :py:obj:`~.CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED`: 1 if\n      Atomic operations over the link are supported.\n\n    - :py:obj:`~.CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED`: 1 if\n      cudaArray can be accessed over the link.\n\n    Returns :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` if `srcDevice` or\n    `dstDevice` are not valid or if they represent the same device.\n\n    Returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if `attrib` is not valid\n    or if `value` is a null pointer.\n\n    Parameters\n    ----------\n    attrib : :py:obj:`~.CUdevice_P2PAttribute`\n        The requested attribute of the link between `srcDevice` and\n        `dstDevice`.\n    srcDevice : :py:obj:`~.CUdevice`\n        The source device of the target link.\n    dstDevice : :py:obj:`~.CUdevice`\n        The destination device of the target link.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    value : int\n        Returned value of the requested attribute\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxEnablePeerAccess`, :py:obj:`~.cuCtxDisablePeerAccess`, :py:obj:`~.cuDeviceCanAccessPeer`, :py:obj:`~.cudaDeviceGetP2PAttribute`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_717cuDeviceGetP2PAttribute = {"cuDeviceGetP2PAttribute", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_717cuDeviceGetP2PAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_716cuDeviceGetP2PAttribute};
static PyObject *__pyx_pw_4cuda_4cuda_717cuDeviceGetP2PAttribute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_attrib = 0;
  PyObject *__pyx_v_srcDevice = 0;
  PyObject *__pyx_v_dstDevice = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuDeviceGetP2PAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attrib,&__pyx_n_s_srcDevice_2,&__pyx_n_s_dstDevice_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrib)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_srcDevice_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceGetP2PAttribute", 1, 3, 3, 1); __PYX_ERR(0, 31897, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dstDevice_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuDeviceGetP2PAttribute", 1, 3, 3, 2); __PYX_ERR(0, 31897, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuDeviceGetP2PAttribute") < 0)) __PYX_ERR(0, 31897, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_attrib = values[0];
    __pyx_v_srcDevice = values[1];
    __pyx_v_dstDevice = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuDeviceGetP2PAttribute", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 31897, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetP2PAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_attrib) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "attrib"); __PYX_ERR(0, 31897, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_716cuDeviceGetP2PAttribute(__pyx_self, __pyx_v_attrib, __pyx_v_srcDevice, __pyx_v_dstDevice);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_716cuDeviceGetP2PAttribute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attrib, PyObject *__pyx_v_srcDevice, PyObject *__pyx_v_dstDevice) {
  CUdevice __pyx_v_cdstDevice;
  PyObject *__pyx_v_pdstDevice = NULL;
  CUdevice __pyx_v_csrcDevice;
  PyObject *__pyx_v_psrcDevice = NULL;
  int __pyx_v_value;
  CUdevice_P2PAttribute __pyx_v_cattrib;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CUdevice __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUdevice_P2PAttribute __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__982)
  __Pyx_RefNannySetupContext("cuDeviceGetP2PAttribute", 0);
  __Pyx_TraceCall("cuDeviceGetP2PAttribute", __pyx_f[0], 31897, 0, __PYX_ERR(0, 31897, __pyx_L1_error));

  /* "cuda/cuda.pyx":31944
 *     """
 *     cdef ccuda.CUdevice cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdevice>0
 *     elif isinstance(dstDevice, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_dstDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31945
 *     cdef ccuda.CUdevice cdstDevice
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(dstDevice, (CUdevice)):
 *         pdstDevice = int(dstDevice)
 */
    __pyx_v_cdstDevice = ((CUdevice)0);

    /* "cuda/cuda.pyx":31944
 *     """
 *     cdef ccuda.CUdevice cdstDevice
 *     if dstDevice is None:             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdevice>0
 *     elif isinstance(dstDevice, (CUdevice)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31946
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdevice>0
 *     elif isinstance(dstDevice, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdevice>pdstDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_dstDevice, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31947
 *         cdstDevice = <ccuda.CUdevice>0
 *     elif isinstance(dstDevice, (CUdevice)):
 *         pdstDevice = int(dstDevice)             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdevice>pdstDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pdstDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31948
 *     elif isinstance(dstDevice, (CUdevice)):
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdevice>pdstDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdstDevice = int(CUdevice(dstDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 31948, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":31946
 *     if dstDevice is None:
 *         cdstDevice = <ccuda.CUdevice>0
 *     elif isinstance(dstDevice, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdstDevice = int(dstDevice)
 *         cdstDevice = <ccuda.CUdevice>pdstDevice
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31950
 *         cdstDevice = <ccuda.CUdevice>pdstDevice
 *     else:
 *         pdstDevice = int(CUdevice(dstDevice))             # <<<<<<<<<<<<<<
 *         cdstDevice = <ccuda.CUdevice>pdstDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_dstDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pdstDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31951
 *     else:
 *         pdstDevice = int(CUdevice(dstDevice))
 *         cdstDevice = <ccuda.CUdevice>pdstDevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdevice csrcDevice
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdstDevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 31951, __pyx_L1_error)
    __pyx_v_cdstDevice = ((CUdevice)__pyx_t_4);
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":31954
 * 
 *     cdef ccuda.CUdevice csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdevice>0
 *     elif isinstance(srcDevice, (CUdevice)):
 */
  __pyx_t_1 = (__pyx_v_srcDevice == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31955
 *     cdef ccuda.CUdevice csrcDevice
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(srcDevice, (CUdevice)):
 *         psrcDevice = int(srcDevice)
 */
    __pyx_v_csrcDevice = ((CUdevice)0);

    /* "cuda/cuda.pyx":31954
 * 
 *     cdef ccuda.CUdevice csrcDevice
 *     if srcDevice is None:             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdevice>0
 *     elif isinstance(srcDevice, (CUdevice)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":31956
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdevice>0
 *     elif isinstance(srcDevice, (CUdevice)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdevice>psrcDevice
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_srcDevice, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31957
 *         csrcDevice = <ccuda.CUdevice>0
 *     elif isinstance(srcDevice, (CUdevice)):
 *         psrcDevice = int(srcDevice)             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdevice>psrcDevice
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_srcDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_psrcDevice = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":31958
 *     elif isinstance(srcDevice, (CUdevice)):
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdevice>psrcDevice             # <<<<<<<<<<<<<<
 *     else:
 *         psrcDevice = int(CUdevice(srcDevice))
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 31958, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdevice)__pyx_t_4);

    /* "cuda/cuda.pyx":31956
 *     if srcDevice is None:
 *         csrcDevice = <ccuda.CUdevice>0
 *     elif isinstance(srcDevice, (CUdevice)):             # <<<<<<<<<<<<<<
 *         psrcDevice = int(srcDevice)
 *         csrcDevice = <ccuda.CUdevice>psrcDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":31960
 *         csrcDevice = <ccuda.CUdevice>psrcDevice
 *     else:
 *         psrcDevice = int(CUdevice(srcDevice))             # <<<<<<<<<<<<<<
 *         csrcDevice = <ccuda.CUdevice>psrcDevice
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_srcDevice); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31960, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31960, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_psrcDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31961
 *     else:
 *         psrcDevice = int(CUdevice(srcDevice))
 *         csrcDevice = <ccuda.CUdevice>psrcDevice             # <<<<<<<<<<<<<<
 * 
 *     cdef int value = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_psrcDevice); if (unlikely((__pyx_t_4 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 31961, __pyx_L1_error)
    __pyx_v_csrcDevice = ((CUdevice)__pyx_t_4);
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":31963
 *         csrcDevice = <ccuda.CUdevice>psrcDevice
 * 
 *     cdef int value = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUdevice_P2PAttribute cattrib = attrib.value
 *     err = ccuda.cuDeviceGetP2PAttribute(&value, cattrib, csrcDevice, cdstDevice)
 */
  __pyx_v_value = 0;

  /* "cuda/cuda.pyx":31964
 * 
 *     cdef int value = 0
 *     cdef ccuda.CUdevice_P2PAttribute cattrib = attrib.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuDeviceGetP2PAttribute(&value, cattrib, csrcDevice, cdstDevice)
 *     return (CUresult(err), value)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = ((enum CUdevice_P2PAttribute_enum)__Pyx_PyInt_As_enum__CUdevice_P2PAttribute_enum(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 31964, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cattrib = __pyx_t_6;

  /* "cuda/cuda.pyx":31965
 *     cdef int value = 0
 *     cdef ccuda.CUdevice_P2PAttribute cattrib = attrib.value
 *     err = ccuda.cuDeviceGetP2PAttribute(&value, cattrib, csrcDevice, cdstDevice)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), value)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuDeviceGetP2PAttribute((&__pyx_v_value), __pyx_v_cattrib, __pyx_v_csrcDevice, __pyx_v_cdstDevice); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 31965, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":31966
 *     cdef ccuda.CUdevice_P2PAttribute cattrib = attrib.value
 *     err = ccuda.cuDeviceGetP2PAttribute(&value, cattrib, csrcDevice, cdstDevice)
 *     return (CUresult(err), value)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 31966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 31966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31897
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetP2PAttribute(attrib not None : CUdevice_P2PAttribute, srcDevice, dstDevice):             # <<<<<<<<<<<<<<
 *     """ Queries attributes of the link between two devices.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuDeviceGetP2PAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pdstDevice);
  __Pyx_XDECREF(__pyx_v_psrcDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":31969
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsUnregisterResource(resource):             # <<<<<<<<<<<<<<
 *     """ Unregisters a graphics resource for access by CUDA.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_719cuGraphicsUnregisterResource(PyObject *__pyx_self, PyObject *__pyx_v_resource); /*proto*/
static char __pyx_doc_4cuda_4cuda_718cuGraphicsUnregisterResource[] = "cuGraphicsUnregisterResource(resource)\n Unregisters a graphics resource for access by CUDA.\n\n    Unregisters the graphics resource `resource` so it is not accessible by\n    CUDA unless registered again.\n\n    If `resource` is invalid then :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is\n    returned.\n\n    Parameters\n    ----------\n    resource : :py:obj:`~.CUgraphicsResource`\n        Resource to unregister\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphicsD3D9RegisterResource`, :py:obj:`~.cuGraphicsD3D10RegisterResource`, :py:obj:`~.cuGraphicsD3D11RegisterResource`, :py:obj:`~.cuGraphicsGLRegisterBuffer`, :py:obj:`~.cuGraphicsGLRegisterImage`, :py:obj:`~.cudaGraphicsUnregisterResource`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_719cuGraphicsUnregisterResource = {"cuGraphicsUnregisterResource", (PyCFunction)__pyx_pw_4cuda_4cuda_719cuGraphicsUnregisterResource, METH_O, __pyx_doc_4cuda_4cuda_718cuGraphicsUnregisterResource};
static PyObject *__pyx_pw_4cuda_4cuda_719cuGraphicsUnregisterResource(PyObject *__pyx_self, PyObject *__pyx_v_resource) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsUnregisterResource (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_718cuGraphicsUnregisterResource(__pyx_self, ((PyObject *)__pyx_v_resource));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_718cuGraphicsUnregisterResource(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_resource) {
  CUgraphicsResource __pyx_v_cresource;
  PyObject *__pyx_v_presource = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__983)
  __Pyx_RefNannySetupContext("cuGraphicsUnregisterResource", 0);
  __Pyx_TraceCall("cuGraphicsUnregisterResource", __pyx_f[0], 31969, 0, __PYX_ERR(0, 31969, __pyx_L1_error));

  /* "cuda/cuda.pyx":31993
 *     """
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 */
  __pyx_t_1 = (__pyx_v_resource == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":31994
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)
 */
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":31993
 *     """
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31995
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_resource, __pyx_ptype_4cuda_4cuda_CUgraphicsResource); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":31996
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_resource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_presource = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":31997
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource             # <<<<<<<<<<<<<<
 *     else:
 *         presource = int(CUgraphicsResource(resource))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presource); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 31997, __pyx_L1_error)
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":31995
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":31999
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 *     else:
 *         presource = int(CUgraphicsResource(resource))             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource), __pyx_v_resource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_presource = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32000
 *     else:
 *         presource = int(CUgraphicsResource(resource))
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphicsUnregisterResource(cresource)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presource); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32000, __pyx_L1_error)
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32002
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 * 
 *     err = ccuda.cuGraphicsUnregisterResource(cresource)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphicsUnregisterResource(__pyx_v_cresource); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32002, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":32003
 * 
 *     err = ccuda.cuGraphicsUnregisterResource(cresource)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":31969
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsUnregisterResource(resource):             # <<<<<<<<<<<<<<
 *     """ Unregisters a graphics resource for access by CUDA.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsUnregisterResource", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_presource);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32006
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsigned int mipLevel):             # <<<<<<<<<<<<<<
 *     """ Get an array through which to access a subresource of a mapped graphics resource.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_721cuGraphicsSubResourceGetMappedArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_720cuGraphicsSubResourceGetMappedArray[] = "cuGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsigned int mipLevel)\n Get an array through which to access a subresource of a mapped graphics resource.\n\n    Returns in `*pArray` an array through which the subresource of the\n    mapped graphics resource `resource` which corresponds to array index\n    `arrayIndex` and mipmap level `mipLevel` may be accessed. The value set\n    in `*pArray` may change every time that `resource` is mapped.\n\n    If `resource` is not a texture then it cannot be accessed via an array\n    and :py:obj:`~.CUDA_ERROR_NOT_MAPPED_AS_ARRAY` is returned. If\n    `arrayIndex` is not a valid array index for `resource` then\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. If `mipLevel` is not\n    a valid mipmap level for `resource` then\n    :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. If `resource` is not\n    mapped then :py:obj:`~.CUDA_ERROR_NOT_MAPPED` is returned.\n\n    Parameters\n    ----------\n    resource : :py:obj:`~.CUgraphicsResource`\n        Mapped resource to access\n    arrayIndex : unsigned int\n        Array index for array textures or cubemap face index as defined by\n        :py:obj:`~.CUarray_cubemap_face` for cubemap textures for the\n        subresource to access\n    mipLevel : unsigned int\n        Mipmap level for the subresource to access\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_MAPPED`, :py:obj:`~.CUDA_ERROR_NOT_MAPPED_AS_ARRAY`\n    pArray : :py:obj:`~.CUarray`\n        Returned array through which a subresource of `resource` may be\n        accessed\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphicsResourceGetMappedPointer`, :py:obj:`~.cudaGraphicsSubResourceGetMappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_721cuGraphicsSubResourceGetMappedArray = {"cuGraphicsSubResourceGetMappedArray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_721cuGraphicsSubResourceGetMappedArray, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_720cuGraphicsSubResourceGetMappedArray};
static PyObject *__pyx_pw_4cuda_4cuda_721cuGraphicsSubResourceGetMappedArray(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_resource = 0;
  unsigned int __pyx_v_arrayIndex;
  unsigned int __pyx_v_mipLevel;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsSubResourceGetMappedArray (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_resource_2,&__pyx_n_s_arrayIndex,&__pyx_n_s_mipLevel,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resource_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arrayIndex)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsSubResourceGetMappedArray", 1, 3, 3, 1); __PYX_ERR(0, 32006, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mipLevel)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsSubResourceGetMappedArray", 1, 3, 3, 2); __PYX_ERR(0, 32006, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphicsSubResourceGetMappedArray") < 0)) __PYX_ERR(0, 32006, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_resource = values[0];
    __pyx_v_arrayIndex = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_arrayIndex == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32006, __pyx_L3_error)
    __pyx_v_mipLevel = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_mipLevel == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32006, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphicsSubResourceGetMappedArray", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32006, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsSubResourceGetMappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_720cuGraphicsSubResourceGetMappedArray(__pyx_self, __pyx_v_resource, __pyx_v_arrayIndex, __pyx_v_mipLevel);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_720cuGraphicsSubResourceGetMappedArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_resource, unsigned int __pyx_v_arrayIndex, unsigned int __pyx_v_mipLevel) {
  CUgraphicsResource __pyx_v_cresource;
  PyObject *__pyx_v_presource = NULL;
  struct __pyx_obj_4cuda_4cuda_CUarray *__pyx_v_pArray = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__984)
  __Pyx_RefNannySetupContext("cuGraphicsSubResourceGetMappedArray", 0);
  __Pyx_TraceCall("cuGraphicsSubResourceGetMappedArray", __pyx_f[0], 32006, 0, __PYX_ERR(0, 32006, __pyx_L1_error));

  /* "cuda/cuda.pyx":32046
 *     """
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 */
  __pyx_t_1 = (__pyx_v_resource == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32047
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)
 */
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32046
 *     """
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32048
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_resource, __pyx_ptype_4cuda_4cuda_CUgraphicsResource); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32049
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_resource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_presource = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32050
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource             # <<<<<<<<<<<<<<
 *     else:
 *         presource = int(CUgraphicsResource(resource))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presource); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32050, __pyx_L1_error)
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32048
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32052
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 *     else:
 *         presource = int(CUgraphicsResource(resource))             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource), __pyx_v_resource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_presource = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32053
 *     else:
 *         presource = int(CUgraphicsResource(resource))
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource             # <<<<<<<<<<<<<<
 * 
 *     cdef CUarray pArray = CUarray()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presource); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32053, __pyx_L1_error)
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32055
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 * 
 *     cdef CUarray pArray = CUarray()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphicsSubResourceGetMappedArray(pArray._ptr, cresource, arrayIndex, mipLevel)
 *     return (CUresult(err), pArray)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":32056
 * 
 *     cdef CUarray pArray = CUarray()
 *     err = ccuda.cuGraphicsSubResourceGetMappedArray(pArray._ptr, cresource, arrayIndex, mipLevel)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pArray)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphicsSubResourceGetMappedArray(__pyx_v_pArray->_ptr, __pyx_v_cresource, __pyx_v_arrayIndex, __pyx_v_mipLevel); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32056, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":32057
 *     cdef CUarray pArray = CUarray()
 *     err = ccuda.cuGraphicsSubResourceGetMappedArray(pArray._ptr, cresource, arrayIndex, mipLevel)
 *     return (CUresult(err), pArray)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pArray));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pArray));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pArray));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32006
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsigned int mipLevel):             # <<<<<<<<<<<<<<
 *     """ Get an array through which to access a subresource of a mapped graphics resource.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsSubResourceGetMappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_presource);
  __Pyx_XDECREF((PyObject *)__pyx_v_pArray);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32060
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceGetMappedMipmappedArray(resource):             # <<<<<<<<<<<<<<
 *     """ Get a mipmapped array through which to access a mapped graphics resource.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_723cuGraphicsResourceGetMappedMipmappedArray(PyObject *__pyx_self, PyObject *__pyx_v_resource); /*proto*/
static char __pyx_doc_4cuda_4cuda_722cuGraphicsResourceGetMappedMipmappedArray[] = "cuGraphicsResourceGetMappedMipmappedArray(resource)\n Get a mipmapped array through which to access a mapped graphics resource.\n\n    Returns in `*pMipmappedArray` a mipmapped array through which the\n    mapped graphics resource `resource`. The value set in\n    `*pMipmappedArray` may change every time that `resource` is mapped.\n\n    If `resource` is not a texture then it cannot be accessed via a\n    mipmapped array and :py:obj:`~.CUDA_ERROR_NOT_MAPPED_AS_ARRAY` is\n    returned. If `resource` is not mapped then\n    :py:obj:`~.CUDA_ERROR_NOT_MAPPED` is returned.\n\n    Parameters\n    ----------\n    resource : :py:obj:`~.CUgraphicsResource`\n        Mapped resource to access\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_MAPPED`, :py:obj:`~.CUDA_ERROR_NOT_MAPPED_AS_ARRAY`\n    pMipmappedArray : :py:obj:`~.CUmipmappedArray`\n        Returned mipmapped array through which `resource` may be accessed\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphicsResourceGetMappedPointer`, :py:obj:`~.cudaGraphicsResourceGetMappedMipmappedArray`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_723cuGraphicsResourceGetMappedMipmappedArray = {"cuGraphicsResourceGetMappedMipmappedArray", (PyCFunction)__pyx_pw_4cuda_4cuda_723cuGraphicsResourceGetMappedMipmappedArray, METH_O, __pyx_doc_4cuda_4cuda_722cuGraphicsResourceGetMappedMipmappedArray};
static PyObject *__pyx_pw_4cuda_4cuda_723cuGraphicsResourceGetMappedMipmappedArray(PyObject *__pyx_self, PyObject *__pyx_v_resource) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsResourceGetMappedMipmappedArray (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_722cuGraphicsResourceGetMappedMipmappedArray(__pyx_self, ((PyObject *)__pyx_v_resource));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_722cuGraphicsResourceGetMappedMipmappedArray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_resource) {
  CUgraphicsResource __pyx_v_cresource;
  PyObject *__pyx_v_presource = NULL;
  struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *__pyx_v_pMipmappedArray = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__985)
  __Pyx_RefNannySetupContext("cuGraphicsResourceGetMappedMipmappedArray", 0);
  __Pyx_TraceCall("cuGraphicsResourceGetMappedMipmappedArray", __pyx_f[0], 32060, 0, __PYX_ERR(0, 32060, __pyx_L1_error));

  /* "cuda/cuda.pyx":32089
 *     """
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 */
  __pyx_t_1 = (__pyx_v_resource == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32090
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)
 */
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32089
 *     """
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32091
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_resource, __pyx_ptype_4cuda_4cuda_CUgraphicsResource); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32092
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_resource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_presource = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32093
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource             # <<<<<<<<<<<<<<
 *     else:
 *         presource = int(CUgraphicsResource(resource))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presource); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32093, __pyx_L1_error)
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32091
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32095
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 *     else:
 *         presource = int(CUgraphicsResource(resource))             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource), __pyx_v_resource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_presource = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32096
 *     else:
 *         presource = int(CUgraphicsResource(resource))
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource             # <<<<<<<<<<<<<<
 * 
 *     cdef CUmipmappedArray pMipmappedArray = CUmipmappedArray()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presource); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32096, __pyx_L1_error)
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32098
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 * 
 *     cdef CUmipmappedArray pMipmappedArray = CUmipmappedArray()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray._ptr, cresource)
 *     return (CUresult(err), pMipmappedArray)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pMipmappedArray = ((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":32099
 * 
 *     cdef CUmipmappedArray pMipmappedArray = CUmipmappedArray()
 *     err = ccuda.cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray._ptr, cresource)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pMipmappedArray)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedMipmappedArray(__pyx_v_pMipmappedArray->_ptr, __pyx_v_cresource); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32099, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":32100
 *     cdef CUmipmappedArray pMipmappedArray = CUmipmappedArray()
 *     err = ccuda.cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray._ptr, cresource)
 *     return (CUresult(err), pMipmappedArray)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pMipmappedArray));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pMipmappedArray));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pMipmappedArray));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32060
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceGetMappedMipmappedArray(resource):             # <<<<<<<<<<<<<<
 *     """ Get a mipmapped array through which to access a mapped graphics resource.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsResourceGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_presource);
  __Pyx_XDECREF((PyObject *)__pyx_v_pMipmappedArray);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32103
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceGetMappedPointer(resource):             # <<<<<<<<<<<<<<
 *     """ Get a device pointer through which to access a mapped graphics resource.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_725cuGraphicsResourceGetMappedPointer(PyObject *__pyx_self, PyObject *__pyx_v_resource); /*proto*/
static char __pyx_doc_4cuda_4cuda_724cuGraphicsResourceGetMappedPointer[] = "cuGraphicsResourceGetMappedPointer(resource)\n Get a device pointer through which to access a mapped graphics resource.\n\n    Returns in `*pDevPtr` a pointer through which the mapped graphics\n    resource `resource` may be accessed. Returns in `pSize` the size of the\n    memory in bytes which may be accessed from that pointer. The value set\n    in `pPointer` may change every time that `resource` is mapped.\n\n    If `resource` is not a buffer then it cannot be accessed via a pointer\n    and :py:obj:`~.CUDA_ERROR_NOT_MAPPED_AS_POINTER` is returned. If\n    `resource` is not mapped then :py:obj:`~.CUDA_ERROR_NOT_MAPPED` is\n    returned.\n\n    Parameters\n    ----------\n    resource : :py:obj:`~.CUgraphicsResource`\n        None\n\n    Returns\n    -------\n    CUresult\n\n    pDevPtr : :py:obj:`~.CUdeviceptr`\n        None\n    pSize : int\n        None\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_725cuGraphicsResourceGetMappedPointer = {"cuGraphicsResourceGetMappedPointer", (PyCFunction)__pyx_pw_4cuda_4cuda_725cuGraphicsResourceGetMappedPointer, METH_O, __pyx_doc_4cuda_4cuda_724cuGraphicsResourceGetMappedPointer};
static PyObject *__pyx_pw_4cuda_4cuda_725cuGraphicsResourceGetMappedPointer(PyObject *__pyx_self, PyObject *__pyx_v_resource) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsResourceGetMappedPointer (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_724cuGraphicsResourceGetMappedPointer(__pyx_self, ((PyObject *)__pyx_v_resource));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_724cuGraphicsResourceGetMappedPointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_resource) {
  CUgraphicsResource __pyx_v_cresource;
  PyObject *__pyx_v_presource = NULL;
  struct __pyx_obj_4cuda_4cuda_CUdeviceptr *__pyx_v_pDevPtr = 0;
  size_t __pyx_v_pSize;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__986)
  __Pyx_RefNannySetupContext("cuGraphicsResourceGetMappedPointer", 0);
  __Pyx_TraceCall("cuGraphicsResourceGetMappedPointer", __pyx_f[0], 32103, 0, __PYX_ERR(0, 32103, __pyx_L1_error));

  /* "cuda/cuda.pyx":32131
 *     """
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 */
  __pyx_t_1 = (__pyx_v_resource == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32132
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)
 */
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32131
 *     """
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32133
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_resource, __pyx_ptype_4cuda_4cuda_CUgraphicsResource); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32134
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_resource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_presource = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32135
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource             # <<<<<<<<<<<<<<
 *     else:
 *         presource = int(CUgraphicsResource(resource))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presource); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32135, __pyx_L1_error)
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32133
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32137
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 *     else:
 *         presource = int(CUgraphicsResource(resource))             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource), __pyx_v_resource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_presource = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32138
 *     else:
 *         presource = int(CUgraphicsResource(resource))
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource             # <<<<<<<<<<<<<<
 * 
 *     cdef CUdeviceptr pDevPtr = CUdeviceptr()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presource); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32138, __pyx_L1_error)
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32140
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 * 
 *     cdef CUdeviceptr pDevPtr = CUdeviceptr()             # <<<<<<<<<<<<<<
 *     cdef size_t pSize = 0
 *     err = ccuda.cuGraphicsResourceGetMappedPointer(pDevPtr._ptr, &pSize, cresource)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pDevPtr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":32141
 * 
 *     cdef CUdeviceptr pDevPtr = CUdeviceptr()
 *     cdef size_t pSize = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphicsResourceGetMappedPointer(pDevPtr._ptr, &pSize, cresource)
 *     return (CUresult(err), pDevPtr, pSize)
 */
  __pyx_v_pSize = 0;

  /* "cuda/cuda.pyx":32142
 *     cdef CUdeviceptr pDevPtr = CUdeviceptr()
 *     cdef size_t pSize = 0
 *     err = ccuda.cuGraphicsResourceGetMappedPointer(pDevPtr._ptr, &pSize, cresource)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pDevPtr, pSize)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedPointer(__pyx_v_pDevPtr->_ptr, (&__pyx_v_pSize), __pyx_v_cresource); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32142, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":32143
 *     cdef size_t pSize = 0
 *     err = ccuda.cuGraphicsResourceGetMappedPointer(pDevPtr._ptr, &pSize, cresource)
 *     return (CUresult(err), pDevPtr, pSize)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_pSize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pDevPtr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pDevPtr));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_pDevPtr));
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32103
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceGetMappedPointer(resource):             # <<<<<<<<<<<<<<
 *     """ Get a device pointer through which to access a mapped graphics resource.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsResourceGetMappedPointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_presource);
  __Pyx_XDECREF((PyObject *)__pyx_v_pDevPtr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32146
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceSetMapFlags(resource, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Set usage flags for mapping a graphics resource.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_727cuGraphicsResourceSetMapFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_726cuGraphicsResourceSetMapFlags[] = "cuGraphicsResourceSetMapFlags(resource, unsigned int flags)\n Set usage flags for mapping a graphics resource.\n\n    Set `flags` for mapping the graphics resource `resource`.\n\n    Changes to `flags` will take effect the next time `resource` is mapped.\n    The `flags` argument may be any of the following:\n\n    - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE`: Specifies no hints\n      about how this resource will be used. It is therefore assumed that\n      this resource will be read from and written to by CUDA kernels. This\n      is the default value.\n\n    - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READONLY`: Specifies that\n      CUDA kernels which access this resource will not write to this\n      resource.\n\n    - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITEDISCARD`: Specifies\n      that CUDA kernels which access this resource will not read from this\n      resource and will write over the entire contents of the resource, so\n      none of the data previously stored in the resource will be preserved.\n\n    If `resource` is presently mapped for access by CUDA then\n    :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED` is returned. If `flags` is not\n    one of the above values then :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is\n    returned.\n\n    Parameters\n    ----------\n    resource : :py:obj:`~.CUgraphicsResource`\n        Registered resource to set flags for\n    flags : unsigned int\n        Parameters for resource mapping\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cudaGraphicsResourceSetMapFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_727cuGraphicsResourceSetMapFlags = {"cuGraphicsResourceSetMapFlags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_727cuGraphicsResourceSetMapFlags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_726cuGraphicsResourceSetMapFlags};
static PyObject *__pyx_pw_4cuda_4cuda_727cuGraphicsResourceSetMapFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_resource = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsResourceSetMapFlags (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_resource_2,&__pyx_n_s_flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resource_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsResourceSetMapFlags", 1, 2, 2, 1); __PYX_ERR(0, 32146, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphicsResourceSetMapFlags") < 0)) __PYX_ERR(0, 32146, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_resource = values[0];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32146, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphicsResourceSetMapFlags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32146, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsResourceSetMapFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_726cuGraphicsResourceSetMapFlags(__pyx_self, __pyx_v_resource, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_726cuGraphicsResourceSetMapFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_resource, unsigned int __pyx_v_flags) {
  CUgraphicsResource __pyx_v_cresource;
  PyObject *__pyx_v_presource = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__987)
  __Pyx_RefNannySetupContext("cuGraphicsResourceSetMapFlags", 0);
  __Pyx_TraceCall("cuGraphicsResourceSetMapFlags", __pyx_f[0], 32146, 0, __PYX_ERR(0, 32146, __pyx_L1_error));

  /* "cuda/cuda.pyx":32190
 *     """
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 */
  __pyx_t_1 = (__pyx_v_resource == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32191
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)
 */
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32190
 *     """
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32192
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_resource, __pyx_ptype_4cuda_4cuda_CUgraphicsResource); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32193
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_resource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_presource = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32194
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource             # <<<<<<<<<<<<<<
 *     else:
 *         presource = int(CUgraphicsResource(resource))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presource); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32194, __pyx_L1_error)
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32192
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32196
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 *     else:
 *         presource = int(CUgraphicsResource(resource))             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource), __pyx_v_resource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_presource = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32197
 *     else:
 *         presource = int(CUgraphicsResource(resource))
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphicsResourceSetMapFlags(cresource, flags)
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presource); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32197, __pyx_L1_error)
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32199
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 * 
 *     err = ccuda.cuGraphicsResourceSetMapFlags(cresource, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphicsResourceSetMapFlags(__pyx_v_cresource, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32199, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":32200
 * 
 *     err = ccuda.cuGraphicsResourceSetMapFlags(cresource, flags)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32146
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceSetMapFlags(resource, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Set usage flags for mapping a graphics resource.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsResourceSetMapFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_presource);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32203
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsMapResources(unsigned int count, resources, hStream):             # <<<<<<<<<<<<<<
 *     """ Map graphics resources for access by CUDA.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_729cuGraphicsMapResources(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_728cuGraphicsMapResources[] = "cuGraphicsMapResources(unsigned int count, resources, hStream)\n Map graphics resources for access by CUDA.\n\n    Maps the `count` graphics resources in `resources` for access by CUDA.\n\n    The resources in `resources` may be accessed by CUDA until they are\n    unmapped. The graphics API from which `resources` were registered\n    should not access any resources while they are mapped by CUDA. If an\n    application does so, the results are undefined.\n\n    This function provides the synchronization guarantee that any graphics\n    calls issued before :py:obj:`~.cuGraphicsMapResources()` will complete\n    before any subsequent CUDA work issued in `stream` begins.\n\n    If `resources` includes any duplicate entries then\n    :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is returned. If any of\n    `resources` are presently mapped for access by CUDA then\n    :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED` is returned.\n\n    Parameters\n    ----------\n    count : unsigned int\n        Number of resources to map\n    resources : :py:obj:`~.CUgraphicsResource`\n        Resources to map for CUDA usage\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream with which to synchronize\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphicsResourceGetMappedPointer`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray`, :py:obj:`~.cuGraphicsUnmapResources`, :py:obj:`~.cudaGraphicsMapResources`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_729cuGraphicsMapResources = {"cuGraphicsMapResources", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_729cuGraphicsMapResources, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_728cuGraphicsMapResources};
static PyObject *__pyx_pw_4cuda_4cuda_729cuGraphicsMapResources(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_count;
  PyObject *__pyx_v_resources = 0;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsMapResources (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_count_2,&__pyx_n_s_resources,&__pyx_n_s_hStream_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resources)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsMapResources", 1, 3, 3, 1); __PYX_ERR(0, 32203, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsMapResources", 1, 3, 3, 2); __PYX_ERR(0, 32203, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphicsMapResources") < 0)) __PYX_ERR(0, 32203, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_count = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_count == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32203, __pyx_L3_error)
    __pyx_v_resources = values[1];
    __pyx_v_hStream = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphicsMapResources", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32203, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsMapResources", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_728cuGraphicsMapResources(__pyx_self, __pyx_v_count, __pyx_v_resources, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_728cuGraphicsMapResources(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_count, PyObject *__pyx_v_resources, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUgraphicsResource *__pyx_v_cresources;
  PyObject *__pyx_v_presources = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__988)
  __Pyx_RefNannySetupContext("cuGraphicsMapResources", 0);
  __Pyx_TraceCall("cuGraphicsMapResources", __pyx_f[0], 32203, 0, __PYX_ERR(0, 32203, __pyx_L1_error));

  /* "cuda/cuda.pyx":32241
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32242
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32241
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32243
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32244
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32245
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32245, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32243
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32247
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32248
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphicsResource *cresources
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32248, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32251
 * 
 *     cdef ccuda.CUgraphicsResource *cresources
 *     if resources is None:             # <<<<<<<<<<<<<<
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(resources, (CUgraphicsResource)):
 */
  __pyx_t_1 = (__pyx_v_resources == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32252
 *     cdef ccuda.CUgraphicsResource *cresources
 *     if resources is None:
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(resources, (CUgraphicsResource)):
 *         presources = resources.getPtr()
 */
    __pyx_v_cresources = ((CUgraphicsResource *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":32251
 * 
 *     cdef ccuda.CUgraphicsResource *cresources
 *     if resources is None:             # <<<<<<<<<<<<<<
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(resources, (CUgraphicsResource)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":32253
 *     if resources is None:
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(resources, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presources = resources.getPtr()
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_resources, __pyx_ptype_4cuda_4cuda_CUgraphicsResource); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32254
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(resources, (CUgraphicsResource)):
 *         presources = resources.getPtr()             # <<<<<<<<<<<<<<
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources
 *     elif isinstance(resources, (int)):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_resources, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_presources = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32255
 *     elif isinstance(resources, (CUgraphicsResource)):
 *         presources = resources.getPtr()
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources             # <<<<<<<<<<<<<<
 *     elif isinstance(resources, (int)):
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>resources
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presources); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32255, __pyx_L1_error)
    __pyx_v_cresources = ((CUgraphicsResource *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32253
 *     if resources is None:
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(resources, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presources = resources.getPtr()
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":32256
 *         presources = resources.getPtr()
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources
 *     elif isinstance(resources, (int)):             # <<<<<<<<<<<<<<
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>resources
 *     else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_resources); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":32257
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources
 *     elif isinstance(resources, (int)):
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>resources             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'resources' is not instance of type (expected <class 'int, cuda.CUgraphicsResource'>, found " + str(type(resources)))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_resources); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32257, __pyx_L1_error)
    __pyx_v_cresources = ((CUgraphicsResource *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32256
 *         presources = resources.getPtr()
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources
 *     elif isinstance(resources, (int)):             # <<<<<<<<<<<<<<
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>resources
 *     else:
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":32259
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>resources
 *     else:
 *         raise TypeError("Argument 'resources' is not instance of type (expected <class 'int, cuda.CUgraphicsResource'>, found " + str(type(resources)))             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphicsMapResources(count, cresources, chStream)
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_resources))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_resources_is_not_instan, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 32259, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":32261
 *         raise TypeError("Argument 'resources' is not instance of type (expected <class 'int, cuda.CUgraphicsResource'>, found " + str(type(resources)))
 * 
 *     err = ccuda.cuGraphicsMapResources(count, cresources, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphicsMapResources(__pyx_v_count, __pyx_v_cresources, __pyx_v_chStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32261, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":32262
 * 
 *     err = ccuda.cuGraphicsMapResources(count, cresources, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 32262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32203
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsMapResources(unsigned int count, resources, hStream):             # <<<<<<<<<<<<<<
 *     """ Map graphics resources for access by CUDA.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsMapResources", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_presources);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32265
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsUnmapResources(unsigned int count, resources, hStream):             # <<<<<<<<<<<<<<
 *     """ Unmap graphics resources.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_731cuGraphicsUnmapResources(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_730cuGraphicsUnmapResources[] = "cuGraphicsUnmapResources(unsigned int count, resources, hStream)\n Unmap graphics resources.\n\n    Unmaps the `count` graphics resources in `resources`.\n\n    Once unmapped, the resources in `resources` may not be accessed by CUDA\n    until they are mapped again.\n\n    This function provides the synchronization guarantee that any CUDA work\n    issued in `stream` before :py:obj:`~.cuGraphicsUnmapResources()` will\n    complete before any subsequently issued graphics work begins.\n\n    If `resources` includes any duplicate entries then\n    :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is returned. If any of\n    `resources` are not presently mapped for access by CUDA then\n    :py:obj:`~.CUDA_ERROR_NOT_MAPPED` is returned.\n\n    Parameters\n    ----------\n    count : unsigned int\n        Number of resources to unmap\n    resources : :py:obj:`~.CUgraphicsResource`\n        Resources to unmap\n    hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t`\n        Stream with which to synchronize\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_MAPPED`, :py:obj:`~.CUDA_ERROR_UNKNOWN`\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cudaGraphicsUnmapResources`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_731cuGraphicsUnmapResources = {"cuGraphicsUnmapResources", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_731cuGraphicsUnmapResources, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_730cuGraphicsUnmapResources};
static PyObject *__pyx_pw_4cuda_4cuda_731cuGraphicsUnmapResources(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_count;
  PyObject *__pyx_v_resources = 0;
  PyObject *__pyx_v_hStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsUnmapResources (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_count_2,&__pyx_n_s_resources,&__pyx_n_s_hStream_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resources)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsUnmapResources", 1, 3, 3, 1); __PYX_ERR(0, 32265, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hStream_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsUnmapResources", 1, 3, 3, 2); __PYX_ERR(0, 32265, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphicsUnmapResources") < 0)) __PYX_ERR(0, 32265, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_count = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_count == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32265, __pyx_L3_error)
    __pyx_v_resources = values[1];
    __pyx_v_hStream = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphicsUnmapResources", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32265, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsUnmapResources", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_730cuGraphicsUnmapResources(__pyx_self, __pyx_v_count, __pyx_v_resources, __pyx_v_hStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_730cuGraphicsUnmapResources(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_count, PyObject *__pyx_v_resources, PyObject *__pyx_v_hStream) {
  CUstream __pyx_v_chStream;
  PyObject *__pyx_v_phStream = NULL;
  CUgraphicsResource *__pyx_v_cresources;
  PyObject *__pyx_v_presources = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__989)
  __Pyx_RefNannySetupContext("cuGraphicsUnmapResources", 0);
  __Pyx_TraceCall("cuGraphicsUnmapResources", __pyx_f[0], 32265, 0, __PYX_ERR(0, 32265, __pyx_L1_error));

  /* "cuda/cuda.pyx":32301
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_hStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32302
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 */
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32301
 *     """
 *     cdef ccuda.CUstream chStream
 *     if hStream is None:             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32303
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_hStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32304
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_phStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32305
 *     elif isinstance(hStream, (CUstream)):
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 *     else:
 *         phStream = int(CUstream(hStream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32305, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32303
 *     if hStream is None:
 *         chStream = <ccuda.CUstream><void_ptr>0
 *     elif isinstance(hStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         phStream = int(hStream)
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32307
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 *     else:
 *         phStream = int(CUstream(hStream))             # <<<<<<<<<<<<<<
 *         chStream = <ccuda.CUstream><void_ptr>phStream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), __pyx_v_hStream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_phStream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32308
 *     else:
 *         phStream = int(CUstream(hStream))
 *         chStream = <ccuda.CUstream><void_ptr>phStream             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphicsResource *cresources
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_phStream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32308, __pyx_L1_error)
    __pyx_v_chStream = ((CUstream)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32311
 * 
 *     cdef ccuda.CUgraphicsResource *cresources
 *     if resources is None:             # <<<<<<<<<<<<<<
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(resources, (CUgraphicsResource)):
 */
  __pyx_t_1 = (__pyx_v_resources == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32312
 *     cdef ccuda.CUgraphicsResource *cresources
 *     if resources is None:
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(resources, (CUgraphicsResource)):
 *         presources = resources.getPtr()
 */
    __pyx_v_cresources = ((CUgraphicsResource *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":32311
 * 
 *     cdef ccuda.CUgraphicsResource *cresources
 *     if resources is None:             # <<<<<<<<<<<<<<
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(resources, (CUgraphicsResource)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":32313
 *     if resources is None:
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(resources, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presources = resources.getPtr()
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_resources, __pyx_ptype_4cuda_4cuda_CUgraphicsResource); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32314
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(resources, (CUgraphicsResource)):
 *         presources = resources.getPtr()             # <<<<<<<<<<<<<<
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources
 *     elif isinstance(resources, (int)):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_resources, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_presources = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32315
 *     elif isinstance(resources, (CUgraphicsResource)):
 *         presources = resources.getPtr()
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources             # <<<<<<<<<<<<<<
 *     elif isinstance(resources, (int)):
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>resources
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presources); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32315, __pyx_L1_error)
    __pyx_v_cresources = ((CUgraphicsResource *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32313
 *     if resources is None:
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(resources, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presources = resources.getPtr()
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":32316
 *         presources = resources.getPtr()
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources
 *     elif isinstance(resources, (int)):             # <<<<<<<<<<<<<<
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>resources
 *     else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_resources); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":32317
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources
 *     elif isinstance(resources, (int)):
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>resources             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'resources' is not instance of type (expected <class 'int, cuda.CUgraphicsResource'>, found " + str(type(resources)))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_resources); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32317, __pyx_L1_error)
    __pyx_v_cresources = ((CUgraphicsResource *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32316
 *         presources = resources.getPtr()
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>presources
 *     elif isinstance(resources, (int)):             # <<<<<<<<<<<<<<
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>resources
 *     else:
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":32319
 *         cresources = <ccuda.CUgraphicsResource*><void_ptr>resources
 *     else:
 *         raise TypeError("Argument 'resources' is not instance of type (expected <class 'int, cuda.CUgraphicsResource'>, found " + str(type(resources)))             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuGraphicsUnmapResources(count, cresources, chStream)
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_resources))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_resources_is_not_instan, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 32319, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":32321
 *         raise TypeError("Argument 'resources' is not instance of type (expected <class 'int, cuda.CUgraphicsResource'>, found " + str(type(resources)))
 * 
 *     err = ccuda.cuGraphicsUnmapResources(count, cresources, chStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuGraphicsUnmapResources(__pyx_v_count, __pyx_v_cresources, __pyx_v_chStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32321, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":32322
 * 
 *     err = ccuda.cuGraphicsUnmapResources(count, cresources, chStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 32322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32265
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsUnmapResources(unsigned int count, resources, hStream):             # <<<<<<<<<<<<<<
 *     """ Unmap graphics resources.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsUnmapResources", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_phStream);
  __Pyx_XDECREF(__pyx_v_presources);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32325
 * 
 * @cython.embedsignature(True)
 * def cuGetProcAddress(char* symbol, int cudaVersion, flags):             # <<<<<<<<<<<<<<
 *     """ Returns the requested driver API function pointer.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_733cuGetProcAddress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_732cuGetProcAddress[] = "cuGetProcAddress(char *symbol, int cudaVersion, flags)\n Returns the requested driver API function pointer.\n\n    Returns in `**pfn` the address of the CUDA driver function for the\n    requested CUDA version and flags.\n\n    The CUDA version is specified as (1000 * major + 10 * minor), so CUDA\n    11.2 should be specified as 11020. For a requested driver symbol, if\n    the specified CUDA version is greater than or equal to the CUDA version\n    in which the driver symbol was introduced, this API will return the\n    function pointer to the corresponding versioned function.\n\n    The pointer returned by the API should be cast to a function pointer\n    matching the requested driver function's definition in the API header\n    file. The function pointer typedef can be picked up from the\n    corresponding typedefs header file. For example, cudaTypedefs.h\n    consists of function pointer typedefs for driver APIs defined in\n    :py:obj:`~.cuda.h`.\n\n    The API will return :py:obj:`~.CUDA_ERROR_NOT_FOUND` if the requested\n    driver function is not supported on the platform, no ABI compatible\n    driver function exists for the specified `cudaVersion` or if the driver\n    symbol is invalid.\n\n    The requested flags can be:\n\n    - :py:obj:`~.CU_GET_PROC_ADDRESS_DEFAULT`: This is the default mode.\n      This is equivalent to\n      :py:obj:`~.CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM` if the code\n      is compiled with --default-stream per-thread compilation flag or the\n      macro CUDA_API_PER_THREAD_DEFAULT_STREAM is defined;\n      :py:obj:`~.CU_GET_PROC_ADDRESS_LEGACY_STREAM` otherwise.\n\n    - :py:obj:`~.CU_GET_PROC_ADDRESS_LEGACY_STREAM`: This will enable the\n      search for all driver symbols that match the requested driver symbol\n      name except the corresponding per-thread versions.\n\n    - :py:obj:`~.CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM`: This will\n      enable the search for all driver symbols that match the requested\n   ""   driver symbol name including the per-thread versions. If a per-thread\n      version is not found, the API will return the legacy version of the\n      driver function.\n\n    Parameters\n    ----------\n    symbol : bytes\n        The base name of the driver API function to look for. As an\n        example, for the driver API :py:obj:`~.cuMemAlloc_v2`, `symbol`\n        would be cuMemAlloc and `cudaVersion` would be the ABI compatible\n        CUDA version for the _v2 variant.\n    cudaVersion : int\n        The CUDA version to look for the requested driver symbol\n    flags : Any\n        Flags to specify search options.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`\n    pfn : Any\n        Location to return the function pointer to the requested driver\n        function\n\n    See Also\n    --------\n    :py:obj:`~.cudaGetDriverEntryPoint`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_733cuGetProcAddress = {"cuGetProcAddress", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_733cuGetProcAddress, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_732cuGetProcAddress};
static PyObject *__pyx_pw_4cuda_4cuda_733cuGetProcAddress(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  char *__pyx_v_symbol;
  int __pyx_v_cudaVersion;
  PyObject *__pyx_v_flags = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGetProcAddress (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_symbol,&__pyx_n_s_cudaVersion,&__pyx_n_s_flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_symbol)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cudaVersion)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGetProcAddress", 1, 3, 3, 1); __PYX_ERR(0, 32325, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGetProcAddress", 1, 3, 3, 2); __PYX_ERR(0, 32325, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGetProcAddress") < 0)) __PYX_ERR(0, 32325, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_symbol = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_symbol) && PyErr_Occurred())) __PYX_ERR(0, 32325, __pyx_L3_error)
    __pyx_v_cudaVersion = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_cudaVersion == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32325, __pyx_L3_error)
    __pyx_v_flags = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGetProcAddress", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32325, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGetProcAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_732cuGetProcAddress(__pyx_self, __pyx_v_symbol, __pyx_v_cudaVersion, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_732cuGetProcAddress(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_symbol, int __pyx_v_cudaVersion, PyObject *__pyx_v_flags) {
  cuuint64_t __pyx_v_cflags;
  PyObject *__pyx_v_pflags = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_pfn;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__990)
  __Pyx_RefNannySetupContext("cuGetProcAddress", 0);
  __Pyx_TraceCall("cuGetProcAddress", __pyx_f[0], 32325, 0, __PYX_ERR(0, 32325, __pyx_L1_error));

  /* "cuda/cuda.pyx":32393
 *     """
 *     cdef ccuda.cuuint64_t cflags
 *     if flags is None:             # <<<<<<<<<<<<<<
 *         cflags = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(flags, (cuuint64_t)):
 */
  __pyx_t_1 = (__pyx_v_flags == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32394
 *     cdef ccuda.cuuint64_t cflags
 *     if flags is None:
 *         cflags = <ccuda.cuuint64_t><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(flags, (cuuint64_t)):
 *         pflags = int(flags)
 */
    __pyx_v_cflags = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32393
 *     """
 *     cdef ccuda.cuuint64_t cflags
 *     if flags is None:             # <<<<<<<<<<<<<<
 *         cflags = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(flags, (cuuint64_t)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32395
 *     if flags is None:
 *         cflags = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(flags, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *         pflags = int(flags)
 *         cflags = <ccuda.cuuint64_t><void_ptr>pflags
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_flags, __pyx_ptype_4cuda_4cuda_cuuint64_t); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32396
 *         cflags = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(flags, (cuuint64_t)):
 *         pflags = int(flags)             # <<<<<<<<<<<<<<
 *         cflags = <ccuda.cuuint64_t><void_ptr>pflags
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pflags = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32397
 *     elif isinstance(flags, (cuuint64_t)):
 *         pflags = int(flags)
 *         cflags = <ccuda.cuuint64_t><void_ptr>pflags             # <<<<<<<<<<<<<<
 *     else:
 *         pflags = int(cuuint64_t(flags))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pflags); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32397, __pyx_L1_error)
    __pyx_v_cflags = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32395
 *     if flags is None:
 *         cflags = <ccuda.cuuint64_t><void_ptr>0
 *     elif isinstance(flags, (cuuint64_t)):             # <<<<<<<<<<<<<<
 *         pflags = int(flags)
 *         cflags = <ccuda.cuuint64_t><void_ptr>pflags
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32399
 *         cflags = <ccuda.cuuint64_t><void_ptr>pflags
 *     else:
 *         pflags = int(cuuint64_t(flags))             # <<<<<<<<<<<<<<
 *         cflags = <ccuda.cuuint64_t><void_ptr>pflags
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t), __pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pflags = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32400
 *     else:
 *         pflags = int(cuuint64_t(flags))
 *         cflags = <ccuda.cuuint64_t><void_ptr>pflags             # <<<<<<<<<<<<<<
 * 
 *     cdef void_ptr pfn = 0
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pflags); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32400, __pyx_L1_error)
    __pyx_v_cflags = ((cuuint64_t)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32402
 *         cflags = <ccuda.cuuint64_t><void_ptr>pflags
 * 
 *     cdef void_ptr pfn = 0             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGetProcAddress(symbol, <void**>&pfn, cudaVersion, cflags)
 *     return (CUresult(err), pfn)
 */
  __pyx_v_pfn = 0;

  /* "cuda/cuda.pyx":32403
 * 
 *     cdef void_ptr pfn = 0
 *     err = ccuda.cuGetProcAddress(symbol, <void**>&pfn, cudaVersion, cflags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pfn)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(__pyx_v_symbol, ((void **)(&__pyx_v_pfn)), __pyx_v_cudaVersion, __pyx_v_cflags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32403, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":32404
 *     cdef void_ptr pfn = 0
 *     err = ccuda.cuGetProcAddress(symbol, <void**>&pfn, cudaVersion, cflags)
 *     return (CUresult(err), pfn)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_pfn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32325
 * 
 * @cython.embedsignature(True)
 * def cuGetProcAddress(char* symbol, int cudaVersion, flags):             # <<<<<<<<<<<<<<
 *     """ Returns the requested driver API function pointer.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGetProcAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pflags);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32407
 * 
 * @cython.embedsignature(True)
 * def cuGetExportTable(pExportTableId : CUuuid):             # <<<<<<<<<<<<<<
 *     """
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_735cuGetExportTable(PyObject *__pyx_self, PyObject *__pyx_v_pExportTableId); /*proto*/
static char __pyx_doc_4cuda_4cuda_734cuGetExportTable[] = "cuGetExportTable(CUuuid pExportTableId: CUuuid)\n \n\n    Parameters\n    ----------\n    pExportTableId : :py:obj:`~.CUuuid`\n        None\n\n    Returns\n    -------\n    CUresult\n\n    ppExportTable : Any\n        None\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_735cuGetExportTable = {"cuGetExportTable", (PyCFunction)__pyx_pw_4cuda_4cuda_735cuGetExportTable, METH_O, __pyx_doc_4cuda_4cuda_734cuGetExportTable};
static PyObject *__pyx_pw_4cuda_4cuda_735cuGetExportTable(PyObject *__pyx_self, PyObject *__pyx_v_pExportTableId) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGetExportTable (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pExportTableId), __pyx_ptype_4cuda_4cuda_CUuuid, 1, "pExportTableId", 0))) __PYX_ERR(0, 32407, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_734cuGetExportTable(__pyx_self, ((struct __pyx_obj_4cuda_4cuda_CUuuid *)__pyx_v_pExportTableId));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_734cuGetExportTable(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_4cuda_4cuda_CUuuid *__pyx_v_pExportTableId) {
  __pyx_t_4cuda_4cuda_void_ptr __pyx_v_ppExportTable;
  CUuuid *__pyx_v_cpExportTableId_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  struct CUuuid_st *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  CUresult __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__991)
  __Pyx_RefNannySetupContext("cuGetExportTable", 0);
  __Pyx_TraceCall("cuGetExportTable", __pyx_f[0], 32407, 0, __PYX_ERR(0, 32407, __pyx_L1_error));

  /* "cuda/cuda.pyx":32422
 *         None
 *     """
 *     cdef void_ptr ppExportTable = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUuuid* cpExportTableId_ptr = pExportTableId._ptr if pExportTableId != None else NULL
 *     err = ccuda.cuGetExportTable(<const void**>&ppExportTable, cpExportTableId_ptr)
 */
  __pyx_v_ppExportTable = 0;

  /* "cuda/cuda.pyx":32423
 *     """
 *     cdef void_ptr ppExportTable = 0
 *     cdef ccuda.CUuuid* cpExportTableId_ptr = pExportTableId._ptr if pExportTableId != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGetExportTable(<const void**>&ppExportTable, cpExportTableId_ptr)
 *     return (CUresult(err), ppExportTable)
 */
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_pExportTableId), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32423, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 32423, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __pyx_t_1 = __pyx_v_pExportTableId->__pyx_base._ptr;
  } else {
    __pyx_t_1 = NULL;
  }
  __pyx_v_cpExportTableId_ptr = __pyx_t_1;

  /* "cuda/cuda.pyx":32424
 *     cdef void_ptr ppExportTable = 0
 *     cdef ccuda.CUuuid* cpExportTableId_ptr = pExportTableId._ptr if pExportTableId != None else NULL
 *     err = ccuda.cuGetExportTable(<const void**>&ppExportTable, cpExportTableId_ptr)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), ppExportTable)
 * 
 */
  __pyx_t_4 = __pyx_f_4cuda_5ccuda_cuGetExportTable(((void const **)(&__pyx_v_ppExportTable)), __pyx_v_cpExportTableId_ptr); if (unlikely(__pyx_t_4 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32424, __pyx_L1_error)
  __pyx_v_err = __pyx_t_4;

  /* "cuda/cuda.pyx":32425
 *     cdef ccuda.CUuuid* cpExportTableId_ptr = pExportTableId._ptr if pExportTableId != None else NULL
 *     err = ccuda.cuGetExportTable(<const void**>&ppExportTable, cpExportTableId_ptr)
 *     return (CUresult(err), ppExportTable)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 32425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(__pyx_v_ppExportTable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 32425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32407
 * 
 * @cython.embedsignature(True)
 * def cuGetExportTable(pExportTableId : CUuuid):             # <<<<<<<<<<<<<<
 *     """
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuGetExportTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32428
 * 
 * @cython.embedsignature(True)
 * def cuProfilerInitialize(char* configFile, char* outputFile, outputMode not None : CUoutput_mode):             # <<<<<<<<<<<<<<
 *     """ Initialize the profiling.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_737cuProfilerInitialize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_736cuProfilerInitialize[] = "cuProfilerInitialize(char *configFile, char *outputFile, outputMode: CUoutput_mode)\n Initialize the profiling.\n\n    [Deprecated]\n\n    Using this API user can initialize the CUDA profiler by specifying the\n    configuration file, output file and output file format. This API is\n    generally used to profile different set of counters by looping the\n    kernel launch. The `configFile` parameter can be used to select\n    profiling options including profiler counters. Refer to the \"Compute\n    Command Line Profiler User Guide\" for supported profiler options and\n    counters.\n\n    Limitation: The CUDA profiler cannot be initialized with this API if\n    another profiling tool is already active, as indicated by the\n    :py:obj:`~.CUDA_ERROR_PROFILER_DISABLED` return code.\n\n    Typical usage of the profiling APIs is as follows:\n\n    for each set of counters/options {  :py:obj:`~.cuProfilerInitialize()`;\n    //Initialize profiling, set the counters or options in the config file\n    ...  :py:obj:`~.cuProfilerStart()`;   // code to be profiled\n    :py:obj:`~.cuProfilerStop()`;   ...  :py:obj:`~.cuProfilerStart()`;\n    // code to be profiled   :py:obj:`~.cuProfilerStop()`;   ... }\n\n    Parameters\n    ----------\n    configFile : bytes\n        Name of the config file that lists the counters/options for\n        profiling.\n    outputFile : bytes\n        Name of the outputFile where the profiling results will be stored.\n    outputMode : :py:obj:`~.CUoutput_mode`\n        outputMode, can be :py:obj:`~.CU_OUT_KEY_VALUE_PAIR` or\n        :py:obj:`~.CU_OUT_CSV`.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_PROFILER_DISABLED`\n\n    See Also\n    --------\n    :py:obj:`~.cuProfilerStart`, :py:obj:`~.cuProfilerStop`, :py:obj:`~.cudaProfilerInitialize`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_737cuProfilerInitialize = {"cuProfilerInitialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_737cuProfilerInitialize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_736cuProfilerInitialize};
static PyObject *__pyx_pw_4cuda_4cuda_737cuProfilerInitialize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  char *__pyx_v_configFile;
  char *__pyx_v_outputFile;
  PyObject *__pyx_v_outputMode = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuProfilerInitialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_configFile,&__pyx_n_s_outputFile,&__pyx_n_s_outputMode,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_configFile)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputFile)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuProfilerInitialize", 1, 3, 3, 1); __PYX_ERR(0, 32428, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outputMode)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuProfilerInitialize", 1, 3, 3, 2); __PYX_ERR(0, 32428, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuProfilerInitialize") < 0)) __PYX_ERR(0, 32428, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_configFile = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_configFile) && PyErr_Occurred())) __PYX_ERR(0, 32428, __pyx_L3_error)
    __pyx_v_outputFile = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_outputFile) && PyErr_Occurred())) __PYX_ERR(0, 32428, __pyx_L3_error)
    __pyx_v_outputMode = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuProfilerInitialize", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32428, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuProfilerInitialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_outputMode) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "outputMode"); __PYX_ERR(0, 32428, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_736cuProfilerInitialize(__pyx_self, __pyx_v_configFile, __pyx_v_outputFile, __pyx_v_outputMode);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_736cuProfilerInitialize(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_configFile, char *__pyx_v_outputFile, PyObject *__pyx_v_outputMode) {
  CUoutput_mode __pyx_v_coutputMode;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CUoutput_mode __pyx_t_2;
  CUresult __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__992)
  __Pyx_RefNannySetupContext("cuProfilerInitialize", 0);
  __Pyx_TraceCall("cuProfilerInitialize", __pyx_f[0], 32428, 0, __PYX_ERR(0, 32428, __pyx_L1_error));

  /* "cuda/cuda.pyx":32473
 *     :py:obj:`~.cuProfilerStart`, :py:obj:`~.cuProfilerStop`, :py:obj:`~.cudaProfilerInitialize`
 *     """
 *     cdef ccuda.CUoutput_mode coutputMode = outputMode.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuProfilerInitialize(configFile, outputFile, coutputMode)
 *     return (CUresult(err),)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_outputMode, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum CUoutput_mode_enum)__Pyx_PyInt_As_enum__CUoutput_mode_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 32473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_coutputMode = __pyx_t_2;

  /* "cuda/cuda.pyx":32474
 *     """
 *     cdef ccuda.CUoutput_mode coutputMode = outputMode.value
 *     err = ccuda.cuProfilerInitialize(configFile, outputFile, coutputMode)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_3 = __pyx_f_4cuda_5ccuda_cuProfilerInitialize(__pyx_v_configFile, __pyx_v_outputFile, __pyx_v_coutputMode); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32474, __pyx_L1_error)
  __pyx_v_err = __pyx_t_3;

  /* "cuda/cuda.pyx":32475
 *     cdef ccuda.CUoutput_mode coutputMode = outputMode.value
 *     err = ccuda.cuProfilerInitialize(configFile, outputFile, coutputMode)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32428
 * 
 * @cython.embedsignature(True)
 * def cuProfilerInitialize(char* configFile, char* outputFile, outputMode not None : CUoutput_mode):             # <<<<<<<<<<<<<<
 *     """ Initialize the profiling.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cuda.cuda.cuProfilerInitialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32478
 * 
 * @cython.embedsignature(True)
 * def cuProfilerStart():             # <<<<<<<<<<<<<<
 *     """ Enable profiling.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_739cuProfilerStart(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_738cuProfilerStart[] = "cuProfilerStart()\n Enable profiling.\n\n    Enables profile collection by the active profiling tool for the current\n    context. If profiling is already enabled, then\n    :py:obj:`~.cuProfilerStart()` has no effect.\n\n    cuProfilerStart and cuProfilerStop APIs are used to programmatically\n    control the profiling granularity by allowing profiling to be done only\n    on selective pieces of code.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`\n\n    See Also\n    --------\n    :py:obj:`~.cuProfilerInitialize`, :py:obj:`~.cuProfilerStop`, :py:obj:`~.cudaProfilerStart`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_739cuProfilerStart = {"cuProfilerStart", (PyCFunction)__pyx_pw_4cuda_4cuda_739cuProfilerStart, METH_NOARGS, __pyx_doc_4cuda_4cuda_738cuProfilerStart};
static PyObject *__pyx_pw_4cuda_4cuda_739cuProfilerStart(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuProfilerStart (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_738cuProfilerStart(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_738cuProfilerStart(CYTHON_UNUSED PyObject *__pyx_self) {
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__993)
  __Pyx_RefNannySetupContext("cuProfilerStart", 0);
  __Pyx_TraceCall("cuProfilerStart", __pyx_f[0], 32478, 0, __PYX_ERR(0, 32478, __pyx_L1_error));

  /* "cuda/cuda.pyx":32498
 *     :py:obj:`~.cuProfilerInitialize`, :py:obj:`~.cuProfilerStop`, :py:obj:`~.cudaProfilerStart`
 *     """
 *     err = ccuda.cuProfilerStart()             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuProfilerStart(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32498, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":32499
 *     """
 *     err = ccuda.cuProfilerStart()
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32478
 * 
 * @cython.embedsignature(True)
 * def cuProfilerStart():             # <<<<<<<<<<<<<<
 *     """ Enable profiling.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuProfilerStart", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32502
 * 
 * @cython.embedsignature(True)
 * def cuProfilerStop():             # <<<<<<<<<<<<<<
 *     """ Disable profiling.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_741cuProfilerStop(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_4cuda_4cuda_740cuProfilerStop[] = "cuProfilerStop()\n Disable profiling.\n\n    Disables profile collection by the active profiling tool for the\n    current context. If profiling is already disabled, then\n    :py:obj:`~.cuProfilerStop()` has no effect.\n\n    cuProfilerStart and cuProfilerStop APIs are used to programmatically\n    control the profiling granularity by allowing profiling to be done only\n    on selective pieces of code.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`\n\n    See Also\n    --------\n    :py:obj:`~.cuProfilerInitialize`, :py:obj:`~.cuProfilerStart`, :py:obj:`~.cudaProfilerStop`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_741cuProfilerStop = {"cuProfilerStop", (PyCFunction)__pyx_pw_4cuda_4cuda_741cuProfilerStop, METH_NOARGS, __pyx_doc_4cuda_4cuda_740cuProfilerStop};
static PyObject *__pyx_pw_4cuda_4cuda_741cuProfilerStop(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuProfilerStop (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_740cuProfilerStop(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_740cuProfilerStop(CYTHON_UNUSED PyObject *__pyx_self) {
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  CUresult __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__994)
  __Pyx_RefNannySetupContext("cuProfilerStop", 0);
  __Pyx_TraceCall("cuProfilerStop", __pyx_f[0], 32502, 0, __PYX_ERR(0, 32502, __pyx_L1_error));

  /* "cuda/cuda.pyx":32522
 *     :py:obj:`~.cuProfilerInitialize`, :py:obj:`~.cuProfilerStart`, :py:obj:`~.cudaProfilerStop`
 *     """
 *     err = ccuda.cuProfilerStop()             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_1 = __pyx_f_4cuda_5ccuda_cuProfilerStop(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32522, __pyx_L1_error)
  __pyx_v_err = __pyx_t_1;

  /* "cuda/cuda.pyx":32523
 *     """
 *     err = ccuda.cuProfilerStop()
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32502
 * 
 * @cython.embedsignature(True)
 * def cuProfilerStop():             # <<<<<<<<<<<<<<
 *     """ Disable profiling.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cuda.cuda.cuProfilerStop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32526
 * 
 * @cython.embedsignature(True)
 * def cuVDPAUGetDevice(vdpDevice, vdpGetProcAddress):             # <<<<<<<<<<<<<<
 *     """ Gets the CUDA device associated with a VDPAU device.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_743cuVDPAUGetDevice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_742cuVDPAUGetDevice[] = "cuVDPAUGetDevice(vdpDevice, vdpGetProcAddress)\n Gets the CUDA device associated with a VDPAU device.\n\n    Returns in `*pDevice` the CUDA device associated with a `vdpDevice`, if\n    applicable.\n\n    Parameters\n    ----------\n    vdpDevice : :py:obj:`~.VdpDevice`\n        A VdpDevice handle\n    vdpGetProcAddress : :py:obj:`~.VdpGetProcAddress`\n        VDPAU's VdpGetProcAddress function pointer\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`\n    pDevice : :py:obj:`~.CUdevice`\n        Device associated with vdpDevice\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuVDPAUCtxCreate`, :py:obj:`~.cuGraphicsVDPAURegisterVideoSurface`, :py:obj:`~.cuGraphicsVDPAURegisterOutputSurface`, :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsResourceSetMapFlags`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsUnmapResources`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray`, :py:obj:`~.cudaVDPAUGetDevice`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_743cuVDPAUGetDevice = {"cuVDPAUGetDevice", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_743cuVDPAUGetDevice, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_742cuVDPAUGetDevice};
static PyObject *__pyx_pw_4cuda_4cuda_743cuVDPAUGetDevice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vdpDevice = 0;
  PyObject *__pyx_v_vdpGetProcAddress = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuVDPAUGetDevice (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vdpDevice,&__pyx_n_s_vdpGetProcAddress,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vdpDevice)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vdpGetProcAddress)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuVDPAUGetDevice", 1, 2, 2, 1); __PYX_ERR(0, 32526, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuVDPAUGetDevice") < 0)) __PYX_ERR(0, 32526, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vdpDevice = values[0];
    __pyx_v_vdpGetProcAddress = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuVDPAUGetDevice", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32526, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuVDPAUGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_742cuVDPAUGetDevice(__pyx_self, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_742cuVDPAUGetDevice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vdpDevice, PyObject *__pyx_v_vdpGetProcAddress) {
  __pyx_t_4cuda_5ccuda_VdpGetProcAddress *__pyx_v_cvdpGetProcAddress;
  PyObject *__pyx_v_pvdpGetProcAddress = NULL;
  __pyx_t_4cuda_5ccuda_VdpDevice __pyx_v_cvdpDevice;
  PyObject *__pyx_v_pvdpDevice = NULL;
  struct __pyx_obj_4cuda_4cuda_CUdevice *__pyx_v_pDevice = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__995)
  __Pyx_RefNannySetupContext("cuVDPAUGetDevice", 0);
  __Pyx_TraceCall("cuVDPAUGetDevice", __pyx_f[0], 32526, 0, __PYX_ERR(0, 32526, __pyx_L1_error));

  /* "cuda/cuda.pyx":32551
 *     """
 *     cdef ccuda.VdpGetProcAddress *cvdpGetProcAddress
 *     if vdpGetProcAddress is None:             # <<<<<<<<<<<<<<
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>NULL
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):
 */
  __pyx_t_1 = (__pyx_v_vdpGetProcAddress == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32552
 *     cdef ccuda.VdpGetProcAddress *cvdpGetProcAddress
 *     if vdpGetProcAddress is None:
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()
 */
    __pyx_v_cvdpGetProcAddress = ((__pyx_t_4cuda_5ccuda_VdpGetProcAddress *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":32551
 *     """
 *     cdef ccuda.VdpGetProcAddress *cvdpGetProcAddress
 *     if vdpGetProcAddress is None:             # <<<<<<<<<<<<<<
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>NULL
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32553
 *     if vdpGetProcAddress is None:
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>NULL
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):             # <<<<<<<<<<<<<<
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_vdpGetProcAddress, __pyx_ptype_4cuda_4cuda_VdpGetProcAddress); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32554
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>NULL
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()             # <<<<<<<<<<<<<<
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress
 *     elif isinstance(vdpGetProcAddress, (int)):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_vdpGetProcAddress, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_pvdpGetProcAddress = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32555
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress             # <<<<<<<<<<<<<<
 *     elif isinstance(vdpGetProcAddress, (int)):
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>vdpGetProcAddress
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvdpGetProcAddress); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32555, __pyx_L1_error)
    __pyx_v_cvdpGetProcAddress = ((__pyx_t_4cuda_5ccuda_VdpGetProcAddress *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":32553
 *     if vdpGetProcAddress is None:
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>NULL
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):             # <<<<<<<<<<<<<<
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32556
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress
 *     elif isinstance(vdpGetProcAddress, (int)):             # <<<<<<<<<<<<<<
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>vdpGetProcAddress
 *     else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_vdpGetProcAddress); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":32557
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress
 *     elif isinstance(vdpGetProcAddress, (int)):
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>vdpGetProcAddress             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'vdpGetProcAddress' is not instance of type (expected <class 'int, cuda.VdpGetProcAddress'>, found " + str(type(vdpGetProcAddress)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_vdpGetProcAddress); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32557, __pyx_L1_error)
    __pyx_v_cvdpGetProcAddress = ((__pyx_t_4cuda_5ccuda_VdpGetProcAddress *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":32556
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress
 *     elif isinstance(vdpGetProcAddress, (int)):             # <<<<<<<<<<<<<<
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>vdpGetProcAddress
 *     else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32559
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>vdpGetProcAddress
 *     else:
 *         raise TypeError("Argument 'vdpGetProcAddress' is not instance of type (expected <class 'int, cuda.VdpGetProcAddress'>, found " + str(type(vdpGetProcAddress)))             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.VdpDevice cvdpDevice
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_vdpGetProcAddress))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_vdpGetProcAddress_is_no, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 32559, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32562
 * 
 *     cdef ccuda.VdpDevice cvdpDevice
 *     if vdpDevice is None:             # <<<<<<<<<<<<<<
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>0
 *     elif isinstance(vdpDevice, (VdpDevice)):
 */
  __pyx_t_2 = (__pyx_v_vdpDevice == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32563
 *     cdef ccuda.VdpDevice cvdpDevice
 *     if vdpDevice is None:
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(vdpDevice, (VdpDevice)):
 *         pvdpDevice = int(vdpDevice)
 */
    __pyx_v_cvdpDevice = ((__pyx_t_4cuda_5ccuda_VdpDevice)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32562
 * 
 *     cdef ccuda.VdpDevice cvdpDevice
 *     if vdpDevice is None:             # <<<<<<<<<<<<<<
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>0
 *     elif isinstance(vdpDevice, (VdpDevice)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":32564
 *     if vdpDevice is None:
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>0
 *     elif isinstance(vdpDevice, (VdpDevice)):             # <<<<<<<<<<<<<<
 *         pvdpDevice = int(vdpDevice)
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_vdpDevice, __pyx_ptype_4cuda_4cuda_VdpDevice); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32565
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>0
 *     elif isinstance(vdpDevice, (VdpDevice)):
 *         pvdpDevice = int(vdpDevice)             # <<<<<<<<<<<<<<
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_vdpDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvdpDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32566
 *     elif isinstance(vdpDevice, (VdpDevice)):
 *         pvdpDevice = int(vdpDevice)
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pvdpDevice = int(VdpDevice(vdpDevice))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvdpDevice); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32566, __pyx_L1_error)
    __pyx_v_cvdpDevice = ((__pyx_t_4cuda_5ccuda_VdpDevice)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":32564
 *     if vdpDevice is None:
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>0
 *     elif isinstance(vdpDevice, (VdpDevice)):             # <<<<<<<<<<<<<<
 *         pvdpDevice = int(vdpDevice)
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":32568
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice
 *     else:
 *         pvdpDevice = int(VdpDevice(vdpDevice))             # <<<<<<<<<<<<<<
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_VdpDevice), __pyx_v_vdpDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvdpDevice = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cuda/cuda.pyx":32569
 *     else:
 *         pvdpDevice = int(VdpDevice(vdpDevice))
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice             # <<<<<<<<<<<<<<
 * 
 *     cdef CUdevice pDevice = CUdevice()
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvdpDevice); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32569, __pyx_L1_error)
    __pyx_v_cvdpDevice = ((__pyx_t_4cuda_5ccuda_VdpDevice)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":32571
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice
 * 
 *     cdef CUdevice pDevice = CUdevice()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuVDPAUGetDevice(pDevice._ptr, cvdpDevice, cvdpGetProcAddress)
 *     return (CUresult(err), pDevice)
 */
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_pDevice = ((struct __pyx_obj_4cuda_4cuda_CUdevice *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":32572
 * 
 *     cdef CUdevice pDevice = CUdevice()
 *     err = ccuda.cuVDPAUGetDevice(pDevice._ptr, cvdpDevice, cvdpGetProcAddress)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pDevice)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuVDPAUGetDevice(__pyx_v_pDevice->_ptr, __pyx_v_cvdpDevice, __pyx_v_cvdpGetProcAddress); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32572, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":32573
 *     cdef CUdevice pDevice = CUdevice()
 *     err = ccuda.cuVDPAUGetDevice(pDevice._ptr, cvdpDevice, cvdpGetProcAddress)
 *     return (CUresult(err), pDevice)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_pDevice));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pDevice));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pDevice));
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32526
 * 
 * @cython.embedsignature(True)
 * def cuVDPAUGetDevice(vdpDevice, vdpGetProcAddress):             # <<<<<<<<<<<<<<
 *     """ Gets the CUDA device associated with a VDPAU device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuVDPAUGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvdpGetProcAddress);
  __Pyx_XDECREF(__pyx_v_pvdpDevice);
  __Pyx_XDECREF((PyObject *)__pyx_v_pDevice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32576
 * 
 * @cython.embedsignature(True)
 * def cuVDPAUCtxCreate(unsigned int flags, device, vdpDevice, vdpGetProcAddress):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context for interoperability with VDPAU.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_745cuVDPAUCtxCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_744cuVDPAUCtxCreate[] = "cuVDPAUCtxCreate(unsigned int flags, device, vdpDevice, vdpGetProcAddress)\n Create a CUDA context for interoperability with VDPAU.\n\n    Creates a new CUDA context, initializes VDPAU interoperability, and\n    associates the CUDA context with the calling thread. It must be called\n    before performing any other VDPAU interoperability operations. It may\n    fail if the needed VDPAU driver facilities are not available. For usage\n    of the `flags` parameter, see :py:obj:`~.cuCtxCreate()`.\n\n    Parameters\n    ----------\n    flags : unsigned int\n        Options for CUDA context creation\n    device : :py:obj:`~.CUdevice`\n        Device on which to create the context\n    vdpDevice : :py:obj:`~.VdpDevice`\n        The VdpDevice to interop with\n    vdpGetProcAddress : :py:obj:`~.VdpGetProcAddress`\n        VDPAU's VdpGetProcAddress function pointer\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    pCtx : :py:obj:`~.CUcontext`\n        Returned CUDA context\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuGraphicsVDPAURegisterVideoSurface`, :py:obj:`~.cuGraphicsVDPAURegisterOutputSurface`, :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsResourceSetMapFlags`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsUnmapResources`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray`, :py:obj:`~.cuVDPAUGetDevice`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_745cuVDPAUCtxCreate = {"cuVDPAUCtxCreate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_745cuVDPAUCtxCreate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_744cuVDPAUCtxCreate};
static PyObject *__pyx_pw_4cuda_4cuda_745cuVDPAUCtxCreate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_flags;
  PyObject *__pyx_v_device = 0;
  PyObject *__pyx_v_vdpDevice = 0;
  PyObject *__pyx_v_vdpGetProcAddress = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuVDPAUCtxCreate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flags_2,&__pyx_n_s_device,&__pyx_n_s_vdpDevice,&__pyx_n_s_vdpGetProcAddress,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_device)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuVDPAUCtxCreate", 1, 4, 4, 1); __PYX_ERR(0, 32576, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vdpDevice)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuVDPAUCtxCreate", 1, 4, 4, 2); __PYX_ERR(0, 32576, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vdpGetProcAddress)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuVDPAUCtxCreate", 1, 4, 4, 3); __PYX_ERR(0, 32576, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuVDPAUCtxCreate") < 0)) __PYX_ERR(0, 32576, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32576, __pyx_L3_error)
    __pyx_v_device = values[1];
    __pyx_v_vdpDevice = values[2];
    __pyx_v_vdpGetProcAddress = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuVDPAUCtxCreate", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32576, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuVDPAUCtxCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_744cuVDPAUCtxCreate(__pyx_self, __pyx_v_flags, __pyx_v_device, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_744cuVDPAUCtxCreate(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags, PyObject *__pyx_v_device, PyObject *__pyx_v_vdpDevice, PyObject *__pyx_v_vdpGetProcAddress) {
  __pyx_t_4cuda_5ccuda_VdpGetProcAddress *__pyx_v_cvdpGetProcAddress;
  PyObject *__pyx_v_pvdpGetProcAddress = NULL;
  __pyx_t_4cuda_5ccuda_VdpDevice __pyx_v_cvdpDevice;
  PyObject *__pyx_v_pvdpDevice = NULL;
  CUdevice __pyx_v_cdevice;
  PyObject *__pyx_v_pdevice = NULL;
  struct __pyx_obj_4cuda_4cuda_CUcontext *__pyx_v_pCtx = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_6;
  CUdevice __pyx_t_7;
  CUresult __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__996)
  __Pyx_RefNannySetupContext("cuVDPAUCtxCreate", 0);
  __Pyx_TraceCall("cuVDPAUCtxCreate", __pyx_f[0], 32576, 0, __PYX_ERR(0, 32576, __pyx_L1_error));

  /* "cuda/cuda.pyx":32608
 *     """
 *     cdef ccuda.VdpGetProcAddress *cvdpGetProcAddress
 *     if vdpGetProcAddress is None:             # <<<<<<<<<<<<<<
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>NULL
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):
 */
  __pyx_t_1 = (__pyx_v_vdpGetProcAddress == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32609
 *     cdef ccuda.VdpGetProcAddress *cvdpGetProcAddress
 *     if vdpGetProcAddress is None:
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()
 */
    __pyx_v_cvdpGetProcAddress = ((__pyx_t_4cuda_5ccuda_VdpGetProcAddress *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":32608
 *     """
 *     cdef ccuda.VdpGetProcAddress *cvdpGetProcAddress
 *     if vdpGetProcAddress is None:             # <<<<<<<<<<<<<<
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>NULL
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32610
 *     if vdpGetProcAddress is None:
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>NULL
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):             # <<<<<<<<<<<<<<
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_vdpGetProcAddress, __pyx_ptype_4cuda_4cuda_VdpGetProcAddress); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32611
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>NULL
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()             # <<<<<<<<<<<<<<
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress
 *     elif isinstance(vdpGetProcAddress, (int)):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_vdpGetProcAddress, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_pvdpGetProcAddress = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32612
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress             # <<<<<<<<<<<<<<
 *     elif isinstance(vdpGetProcAddress, (int)):
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>vdpGetProcAddress
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvdpGetProcAddress); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32612, __pyx_L1_error)
    __pyx_v_cvdpGetProcAddress = ((__pyx_t_4cuda_5ccuda_VdpGetProcAddress *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":32610
 *     if vdpGetProcAddress is None:
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>NULL
 *     elif isinstance(vdpGetProcAddress, (VdpGetProcAddress)):             # <<<<<<<<<<<<<<
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32613
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress
 *     elif isinstance(vdpGetProcAddress, (int)):             # <<<<<<<<<<<<<<
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>vdpGetProcAddress
 *     else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_vdpGetProcAddress); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":32614
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress
 *     elif isinstance(vdpGetProcAddress, (int)):
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>vdpGetProcAddress             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'vdpGetProcAddress' is not instance of type (expected <class 'int, cuda.VdpGetProcAddress'>, found " + str(type(vdpGetProcAddress)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_vdpGetProcAddress); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32614, __pyx_L1_error)
    __pyx_v_cvdpGetProcAddress = ((__pyx_t_4cuda_5ccuda_VdpGetProcAddress *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":32613
 *         pvdpGetProcAddress = vdpGetProcAddress.getPtr()
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>pvdpGetProcAddress
 *     elif isinstance(vdpGetProcAddress, (int)):             # <<<<<<<<<<<<<<
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>vdpGetProcAddress
 *     else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32616
 *         cvdpGetProcAddress = <ccuda.VdpGetProcAddress*><void_ptr>vdpGetProcAddress
 *     else:
 *         raise TypeError("Argument 'vdpGetProcAddress' is not instance of type (expected <class 'int, cuda.VdpGetProcAddress'>, found " + str(type(vdpGetProcAddress)))             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.VdpDevice cvdpDevice
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_vdpGetProcAddress))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_vdpGetProcAddress_is_no, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 32616, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32619
 * 
 *     cdef ccuda.VdpDevice cvdpDevice
 *     if vdpDevice is None:             # <<<<<<<<<<<<<<
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>0
 *     elif isinstance(vdpDevice, (VdpDevice)):
 */
  __pyx_t_2 = (__pyx_v_vdpDevice == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32620
 *     cdef ccuda.VdpDevice cvdpDevice
 *     if vdpDevice is None:
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(vdpDevice, (VdpDevice)):
 *         pvdpDevice = int(vdpDevice)
 */
    __pyx_v_cvdpDevice = ((__pyx_t_4cuda_5ccuda_VdpDevice)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32619
 * 
 *     cdef ccuda.VdpDevice cvdpDevice
 *     if vdpDevice is None:             # <<<<<<<<<<<<<<
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>0
 *     elif isinstance(vdpDevice, (VdpDevice)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":32621
 *     if vdpDevice is None:
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>0
 *     elif isinstance(vdpDevice, (VdpDevice)):             # <<<<<<<<<<<<<<
 *         pvdpDevice = int(vdpDevice)
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_vdpDevice, __pyx_ptype_4cuda_4cuda_VdpDevice); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32622
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>0
 *     elif isinstance(vdpDevice, (VdpDevice)):
 *         pvdpDevice = int(vdpDevice)             # <<<<<<<<<<<<<<
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_vdpDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvdpDevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32623
 *     elif isinstance(vdpDevice, (VdpDevice)):
 *         pvdpDevice = int(vdpDevice)
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice             # <<<<<<<<<<<<<<
 *     else:
 *         pvdpDevice = int(VdpDevice(vdpDevice))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvdpDevice); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32623, __pyx_L1_error)
    __pyx_v_cvdpDevice = ((__pyx_t_4cuda_5ccuda_VdpDevice)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":32621
 *     if vdpDevice is None:
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>0
 *     elif isinstance(vdpDevice, (VdpDevice)):             # <<<<<<<<<<<<<<
 *         pvdpDevice = int(vdpDevice)
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":32625
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice
 *     else:
 *         pvdpDevice = int(VdpDevice(vdpDevice))             # <<<<<<<<<<<<<<
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_VdpDevice), __pyx_v_vdpDevice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvdpDevice = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cuda/cuda.pyx":32626
 *     else:
 *         pvdpDevice = int(VdpDevice(vdpDevice))
 *         cvdpDevice = <ccuda.VdpDevice><void_ptr>pvdpDevice             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdevice cdevice
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvdpDevice); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32626, __pyx_L1_error)
    __pyx_v_cvdpDevice = ((__pyx_t_4cuda_5ccuda_VdpDevice)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":32629
 * 
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
  __pyx_t_2 = (__pyx_v_device == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32630
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0             # <<<<<<<<<<<<<<
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 */
    __pyx_v_cdevice = ((CUdevice)0);

    /* "cuda/cuda.pyx":32629
 * 
 *     cdef ccuda.CUdevice cdevice
 *     if device is None:             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":32631
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_device, __pyx_ptype_4cuda_4cuda_CUdevice); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32632
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 */
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_device); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_pdevice = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cuda/cuda.pyx":32633
 *     elif isinstance(device, (CUdevice)):
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 *     else:
 *         pdevice = int(CUdevice(device))
 */
    __pyx_t_7 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_7 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 32633, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_7);

    /* "cuda/cuda.pyx":32631
 *     if device is None:
 *         cdevice = <ccuda.CUdevice>0
 *     elif isinstance(device, (CUdevice)):             # <<<<<<<<<<<<<<
 *         pdevice = int(device)
 *         cdevice = <ccuda.CUdevice>pdevice
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":32635
 *         cdevice = <ccuda.CUdevice>pdevice
 *     else:
 *         pdevice = int(CUdevice(device))             # <<<<<<<<<<<<<<
 *         cdevice = <ccuda.CUdevice>pdevice
 * 
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_v_device); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_pdevice = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32636
 *     else:
 *         pdevice = int(CUdevice(device))
 *         cdevice = <ccuda.CUdevice>pdevice             # <<<<<<<<<<<<<<
 * 
 *     cdef CUcontext pCtx = CUcontext()
 */
    __pyx_t_7 = __Pyx_PyInt_As_CUdevice_v1(__pyx_v_pdevice); if (unlikely((__pyx_t_7 == ((CUdevice)-1)) && PyErr_Occurred())) __PYX_ERR(0, 32636, __pyx_L1_error)
    __pyx_v_cdevice = ((CUdevice)__pyx_t_7);
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":32638
 *         cdevice = <ccuda.CUdevice>pdevice
 * 
 *     cdef CUcontext pCtx = CUcontext()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuVDPAUCtxCreate(pCtx._ptr, flags, cdevice, cvdpDevice, cvdpGetProcAddress)
 *     return (CUresult(err), pCtx)
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_pCtx = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":32639
 * 
 *     cdef CUcontext pCtx = CUcontext()
 *     err = ccuda.cuVDPAUCtxCreate(pCtx._ptr, flags, cdevice, cvdpDevice, cvdpGetProcAddress)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pCtx)
 * 
 */
  __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuVDPAUCtxCreate(__pyx_v_pCtx->_ptr, __pyx_v_flags, __pyx_v_cdevice, __pyx_v_cvdpDevice, __pyx_v_cvdpGetProcAddress); if (unlikely(__pyx_t_8 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32639, __pyx_L1_error)
  __pyx_v_err = __pyx_t_8;

  /* "cuda/cuda.pyx":32640
 *     cdef CUcontext pCtx = CUcontext()
 *     err = ccuda.cuVDPAUCtxCreate(pCtx._ptr, flags, cdevice, cvdpDevice, cvdpGetProcAddress)
 *     return (CUresult(err), pCtx)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_pCtx));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pCtx));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_pCtx));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32576
 * 
 * @cython.embedsignature(True)
 * def cuVDPAUCtxCreate(unsigned int flags, device, vdpDevice, vdpGetProcAddress):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context for interoperability with VDPAU.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuVDPAUCtxCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvdpGetProcAddress);
  __Pyx_XDECREF(__pyx_v_pvdpDevice);
  __Pyx_XDECREF(__pyx_v_pdevice);
  __Pyx_XDECREF((PyObject *)__pyx_v_pCtx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32643
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Registers a VDPAU VdpVideoSurface object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_747cuGraphicsVDPAURegisterVideoSurface(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_746cuGraphicsVDPAURegisterVideoSurface[] = "cuGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags)\n Registers a VDPAU VdpVideoSurface object.\n\n    Registers the VdpVideoSurface specified by `vdpSurface` for access by\n    CUDA. A handle to the registered object is returned as `pCudaResource`.\n    The surface's intended usage is specified using `flags`, as follows:\n\n    - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE`: Specifies no hints\n      about how this resource will be used. It is therefore assumed that\n      this resource will be read from and written to by CUDA. This is the\n      default value.\n\n    - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY`: Specifies that\n      CUDA will not write to this resource.\n\n    - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD`: Specifies\n      that CUDA will not read from this resource and will write over the\n      entire contents of the resource, so none of the data previously\n      stored in the resource will be preserved.\n\n    The VdpVideoSurface is presented as an array of subresources that may\n    be accessed using pointers returned by\n    :py:obj:`~.cuGraphicsSubResourceGetMappedArray`. The exact number of\n    valid `arrayIndex` values depends on the VDPAU surface format. The\n    mapping is shown in the table below. `mipLevel` must be 0.\n\n    Parameters\n    ----------\n    vdpSurface : :py:obj:`~.VdpVideoSurface`\n        The VdpVideoSurface to be registered\n    flags : unsigned int\n        Map flags\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`,\n    pCudaResource : :py:obj:`~.CUgraphicsResource`\n        Pointer to the returned object handle\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuVDPAUCtxCreate`, :py:obj:`~.cuGraphicsVDPAURegisterOutputSurface`, :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsResourceSetMapFlags""`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsUnmapResources`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray`, :py:obj:`~.cuVDPAUGetDevice`, :py:obj:`~.cudaGraphicsVDPAURegisterVideoSurface`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_747cuGraphicsVDPAURegisterVideoSurface = {"cuGraphicsVDPAURegisterVideoSurface", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_747cuGraphicsVDPAURegisterVideoSurface, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_746cuGraphicsVDPAURegisterVideoSurface};
static PyObject *__pyx_pw_4cuda_4cuda_747cuGraphicsVDPAURegisterVideoSurface(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vdpSurface = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsVDPAURegisterVideoSurface (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vdpSurface,&__pyx_n_s_flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vdpSurface)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsVDPAURegisterVideoSurface", 1, 2, 2, 1); __PYX_ERR(0, 32643, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphicsVDPAURegisterVideoSurface") < 0)) __PYX_ERR(0, 32643, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vdpSurface = values[0];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32643, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphicsVDPAURegisterVideoSurface", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32643, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsVDPAURegisterVideoSurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_746cuGraphicsVDPAURegisterVideoSurface(__pyx_self, __pyx_v_vdpSurface, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_746cuGraphicsVDPAURegisterVideoSurface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vdpSurface, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_VdpVideoSurface __pyx_v_cvdpSurface;
  PyObject *__pyx_v_pvdpSurface = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_pCudaResource = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__997)
  __Pyx_RefNannySetupContext("cuGraphicsVDPAURegisterVideoSurface", 0);
  __Pyx_TraceCall("cuGraphicsVDPAURegisterVideoSurface", __pyx_f[0], 32643, 0, __PYX_ERR(0, 32643, __pyx_L1_error));

  /* "cuda/cuda.pyx":32688
 *     """
 *     cdef ccuda.VdpVideoSurface cvdpSurface
 *     if vdpSurface is None:             # <<<<<<<<<<<<<<
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>0
 *     elif isinstance(vdpSurface, (VdpVideoSurface)):
 */
  __pyx_t_1 = (__pyx_v_vdpSurface == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32689
 *     cdef ccuda.VdpVideoSurface cvdpSurface
 *     if vdpSurface is None:
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(vdpSurface, (VdpVideoSurface)):
 *         pvdpSurface = int(vdpSurface)
 */
    __pyx_v_cvdpSurface = ((__pyx_t_4cuda_5ccuda_VdpVideoSurface)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32688
 *     """
 *     cdef ccuda.VdpVideoSurface cvdpSurface
 *     if vdpSurface is None:             # <<<<<<<<<<<<<<
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>0
 *     elif isinstance(vdpSurface, (VdpVideoSurface)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32690
 *     if vdpSurface is None:
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>0
 *     elif isinstance(vdpSurface, (VdpVideoSurface)):             # <<<<<<<<<<<<<<
 *         pvdpSurface = int(vdpSurface)
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>pvdpSurface
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_vdpSurface, __pyx_ptype_4cuda_4cuda_VdpVideoSurface); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32691
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>0
 *     elif isinstance(vdpSurface, (VdpVideoSurface)):
 *         pvdpSurface = int(vdpSurface)             # <<<<<<<<<<<<<<
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>pvdpSurface
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_vdpSurface); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvdpSurface = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32692
 *     elif isinstance(vdpSurface, (VdpVideoSurface)):
 *         pvdpSurface = int(vdpSurface)
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>pvdpSurface             # <<<<<<<<<<<<<<
 *     else:
 *         pvdpSurface = int(VdpVideoSurface(vdpSurface))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvdpSurface); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32692, __pyx_L1_error)
    __pyx_v_cvdpSurface = ((__pyx_t_4cuda_5ccuda_VdpVideoSurface)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32690
 *     if vdpSurface is None:
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>0
 *     elif isinstance(vdpSurface, (VdpVideoSurface)):             # <<<<<<<<<<<<<<
 *         pvdpSurface = int(vdpSurface)
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>pvdpSurface
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32694
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>pvdpSurface
 *     else:
 *         pvdpSurface = int(VdpVideoSurface(vdpSurface))             # <<<<<<<<<<<<<<
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>pvdpSurface
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_VdpVideoSurface), __pyx_v_vdpSurface); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvdpSurface = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32695
 *     else:
 *         pvdpSurface = int(VdpVideoSurface(vdpSurface))
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>pvdpSurface             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvdpSurface); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32695, __pyx_L1_error)
    __pyx_v_cvdpSurface = ((__pyx_t_4cuda_5ccuda_VdpVideoSurface)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32697
 *         cvdpSurface = <ccuda.VdpVideoSurface><void_ptr>pvdpSurface
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphicsVDPAURegisterVideoSurface(pCudaResource._ptr, cvdpSurface, flags)
 *     return (CUresult(err), pCudaResource)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pCudaResource = ((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":32698
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 *     err = ccuda.cuGraphicsVDPAURegisterVideoSurface(pCudaResource._ptr, cvdpSurface, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pCudaResource)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphicsVDPAURegisterVideoSurface(__pyx_v_pCudaResource->_ptr, __pyx_v_cvdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32698, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":32699
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 *     err = ccuda.cuGraphicsVDPAURegisterVideoSurface(pCudaResource._ptr, cvdpSurface, flags)
 *     return (CUresult(err), pCudaResource)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pCudaResource));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pCudaResource));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pCudaResource));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32643
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Registers a VDPAU VdpVideoSurface object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsVDPAURegisterVideoSurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvdpSurface);
  __Pyx_XDECREF((PyObject *)__pyx_v_pCudaResource);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32702
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Registers a VDPAU VdpOutputSurface object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_749cuGraphicsVDPAURegisterOutputSurface(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_748cuGraphicsVDPAURegisterOutputSurface[] = "cuGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags)\n Registers a VDPAU VdpOutputSurface object.\n\n    Registers the VdpOutputSurface specified by `vdpSurface` for access by\n    CUDA. A handle to the registered object is returned as `pCudaResource`.\n    The surface's intended usage is specified using `flags`, as follows:\n\n    - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE`: Specifies no hints\n      about how this resource will be used. It is therefore assumed that\n      this resource will be read from and written to by CUDA. This is the\n      default value.\n\n    - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY`: Specifies that\n      CUDA will not write to this resource.\n\n    - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD`: Specifies\n      that CUDA will not read from this resource and will write over the\n      entire contents of the resource, so none of the data previously\n      stored in the resource will be preserved.\n\n    The VdpOutputSurface is presented as an array of subresources that may\n    be accessed using pointers returned by\n    :py:obj:`~.cuGraphicsSubResourceGetMappedArray`. The exact number of\n    valid `arrayIndex` values depends on the VDPAU surface format. The\n    mapping is shown in the table below. `mipLevel` must be 0.\n\n    Parameters\n    ----------\n    vdpSurface : :py:obj:`~.VdpOutputSurface`\n        The VdpOutputSurface to be registered\n    flags : unsigned int\n        Map flags\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`,\n    pCudaResource : :py:obj:`~.CUgraphicsResource`\n        Pointer to the returned object handle\n\n    See Also\n    --------\n    :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuVDPAUCtxCreate`, :py:obj:`~.cuGraphicsVDPAURegisterVideoSurface`, :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsResourceSetMap""Flags`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsUnmapResources`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray`, :py:obj:`~.cuVDPAUGetDevice`, :py:obj:`~.cudaGraphicsVDPAURegisterOutputSurface`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_749cuGraphicsVDPAURegisterOutputSurface = {"cuGraphicsVDPAURegisterOutputSurface", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_749cuGraphicsVDPAURegisterOutputSurface, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_748cuGraphicsVDPAURegisterOutputSurface};
static PyObject *__pyx_pw_4cuda_4cuda_749cuGraphicsVDPAURegisterOutputSurface(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vdpSurface = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsVDPAURegisterOutputSurface (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vdpSurface,&__pyx_n_s_flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vdpSurface)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsVDPAURegisterOutputSurface", 1, 2, 2, 1); __PYX_ERR(0, 32702, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphicsVDPAURegisterOutputSurface") < 0)) __PYX_ERR(0, 32702, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vdpSurface = values[0];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32702, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphicsVDPAURegisterOutputSurface", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32702, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsVDPAURegisterOutputSurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_748cuGraphicsVDPAURegisterOutputSurface(__pyx_self, __pyx_v_vdpSurface, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_748cuGraphicsVDPAURegisterOutputSurface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vdpSurface, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_VdpOutputSurface __pyx_v_cvdpSurface;
  PyObject *__pyx_v_pvdpSurface = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_pCudaResource = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__998)
  __Pyx_RefNannySetupContext("cuGraphicsVDPAURegisterOutputSurface", 0);
  __Pyx_TraceCall("cuGraphicsVDPAURegisterOutputSurface", __pyx_f[0], 32702, 0, __PYX_ERR(0, 32702, __pyx_L1_error));

  /* "cuda/cuda.pyx":32747
 *     """
 *     cdef ccuda.VdpOutputSurface cvdpSurface
 *     if vdpSurface is None:             # <<<<<<<<<<<<<<
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>0
 *     elif isinstance(vdpSurface, (VdpOutputSurface)):
 */
  __pyx_t_1 = (__pyx_v_vdpSurface == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32748
 *     cdef ccuda.VdpOutputSurface cvdpSurface
 *     if vdpSurface is None:
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(vdpSurface, (VdpOutputSurface)):
 *         pvdpSurface = int(vdpSurface)
 */
    __pyx_v_cvdpSurface = ((__pyx_t_4cuda_5ccuda_VdpOutputSurface)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32747
 *     """
 *     cdef ccuda.VdpOutputSurface cvdpSurface
 *     if vdpSurface is None:             # <<<<<<<<<<<<<<
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>0
 *     elif isinstance(vdpSurface, (VdpOutputSurface)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32749
 *     if vdpSurface is None:
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>0
 *     elif isinstance(vdpSurface, (VdpOutputSurface)):             # <<<<<<<<<<<<<<
 *         pvdpSurface = int(vdpSurface)
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>pvdpSurface
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_vdpSurface, __pyx_ptype_4cuda_4cuda_VdpOutputSurface); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32750
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>0
 *     elif isinstance(vdpSurface, (VdpOutputSurface)):
 *         pvdpSurface = int(vdpSurface)             # <<<<<<<<<<<<<<
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>pvdpSurface
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_vdpSurface); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pvdpSurface = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32751
 *     elif isinstance(vdpSurface, (VdpOutputSurface)):
 *         pvdpSurface = int(vdpSurface)
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>pvdpSurface             # <<<<<<<<<<<<<<
 *     else:
 *         pvdpSurface = int(VdpOutputSurface(vdpSurface))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvdpSurface); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32751, __pyx_L1_error)
    __pyx_v_cvdpSurface = ((__pyx_t_4cuda_5ccuda_VdpOutputSurface)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32749
 *     if vdpSurface is None:
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>0
 *     elif isinstance(vdpSurface, (VdpOutputSurface)):             # <<<<<<<<<<<<<<
 *         pvdpSurface = int(vdpSurface)
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>pvdpSurface
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32753
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>pvdpSurface
 *     else:
 *         pvdpSurface = int(VdpOutputSurface(vdpSurface))             # <<<<<<<<<<<<<<
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>pvdpSurface
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_VdpOutputSurface), __pyx_v_vdpSurface); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pvdpSurface = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32754
 *     else:
 *         pvdpSurface = int(VdpOutputSurface(vdpSurface))
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>pvdpSurface             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pvdpSurface); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32754, __pyx_L1_error)
    __pyx_v_cvdpSurface = ((__pyx_t_4cuda_5ccuda_VdpOutputSurface)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32756
 *         cvdpSurface = <ccuda.VdpOutputSurface><void_ptr>pvdpSurface
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphicsVDPAURegisterOutputSurface(pCudaResource._ptr, cvdpSurface, flags)
 *     return (CUresult(err), pCudaResource)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pCudaResource = ((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":32757
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 *     err = ccuda.cuGraphicsVDPAURegisterOutputSurface(pCudaResource._ptr, cvdpSurface, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pCudaResource)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphicsVDPAURegisterOutputSurface(__pyx_v_pCudaResource->_ptr, __pyx_v_cvdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32757, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":32758
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 *     err = ccuda.cuGraphicsVDPAURegisterOutputSurface(pCudaResource._ptr, cvdpSurface, flags)
 *     return (CUresult(err), pCudaResource)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pCudaResource));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pCudaResource));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pCudaResource));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32702
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Registers a VDPAU VdpOutputSurface object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsVDPAURegisterOutputSurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pvdpSurface);
  __Pyx_XDECREF((PyObject *)__pyx_v_pCudaResource);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32761
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsEGLRegisterImage(image, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Registers an EGL image.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_751cuGraphicsEGLRegisterImage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_750cuGraphicsEGLRegisterImage[] = "cuGraphicsEGLRegisterImage(image, unsigned int flags)\n Registers an EGL image.\n\n    Registers the EGLImageKHR specified by `image` for access by CUDA. A\n    handle to the registered object is returned as `pCudaResource`.\n    Additional Mapping/Unmapping is not required for the registered\n    resource and :py:obj:`~.cuGraphicsResourceGetMappedEglFrame` can be\n    directly called on the `pCudaResource`.\n\n    The application will be responsible for synchronizing access to shared\n    objects. The application must ensure that any pending operation which\n    access the objects have completed before passing control to CUDA. This\n    may be accomplished by issuing and waiting for glFinish command on all\n    GLcontexts (for OpenGL and likewise for other APIs). The application\n    will be also responsible for ensuring that any pending operation on the\n    registered CUDA resource has completed prior to executing subsequent\n    commands in other APIs accesing the same memory objects. This can be\n    accomplished by calling cuCtxSynchronize or cuEventSynchronize\n    (preferably).\n\n    The surface's intended usage is specified using `flags`, as follows:\n\n    - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE`: Specifies no hints\n      about how this resource will be used. It is therefore assumed that\n      this resource will be read from and written to by CUDA. This is the\n      default value.\n\n    - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY`: Specifies that\n      CUDA will not write to this resource.\n\n    - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD`: Specifies\n      that CUDA will not read from this resource and will write over the\n      entire contents of the resource, so none of the data previously\n      stored in the resource will be preserved.\n\n    The EGLImageKHR is an object which can be used to create EGLImage\n    target resource. It is defined as a void pointer. typedef void*\n    EGLImageKHR\n\n    Parameters""\n    ----------\n    image : :py:obj:`~.EGLImageKHR`\n        An EGLImageKHR image which can be used to create target resource.\n    flags : unsigned int\n        Map flags\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`,\n    pCudaResource : :py:obj:`~.CUgraphicsResource`\n        Pointer to the returned object handle\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphicsEGLRegisterImage`, :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsResourceSetMapFlags`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsUnmapResources`, :py:obj:`~.cudaGraphicsEGLRegisterImage`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_751cuGraphicsEGLRegisterImage = {"cuGraphicsEGLRegisterImage", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_751cuGraphicsEGLRegisterImage, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_750cuGraphicsEGLRegisterImage};
static PyObject *__pyx_pw_4cuda_4cuda_751cuGraphicsEGLRegisterImage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_image = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsEGLRegisterImage (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_image,&__pyx_n_s_flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_image)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsEGLRegisterImage", 1, 2, 2, 1); __PYX_ERR(0, 32761, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphicsEGLRegisterImage") < 0)) __PYX_ERR(0, 32761, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_image = values[0];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32761, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphicsEGLRegisterImage", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32761, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsEGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_750cuGraphicsEGLRegisterImage(__pyx_self, __pyx_v_image, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_750cuGraphicsEGLRegisterImage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_image, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_EGLImageKHR __pyx_v_cimage;
  PyObject *__pyx_v_pimage = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_pCudaResource = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__999)
  __Pyx_RefNannySetupContext("cuGraphicsEGLRegisterImage", 0);
  __Pyx_TraceCall("cuGraphicsEGLRegisterImage", __pyx_f[0], 32761, 0, __PYX_ERR(0, 32761, __pyx_L1_error));

  /* "cuda/cuda.pyx":32819
 *     """
 *     cdef ccuda.EGLImageKHR cimage
 *     if image is None:             # <<<<<<<<<<<<<<
 *         cimage = <ccuda.EGLImageKHR><void_ptr>0
 *     elif isinstance(image, (EGLImageKHR)):
 */
  __pyx_t_1 = (__pyx_v_image == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32820
 *     cdef ccuda.EGLImageKHR cimage
 *     if image is None:
 *         cimage = <ccuda.EGLImageKHR><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(image, (EGLImageKHR)):
 *         pimage = int(image)
 */
    __pyx_v_cimage = ((__pyx_t_4cuda_5ccuda_EGLImageKHR)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32819
 *     """
 *     cdef ccuda.EGLImageKHR cimage
 *     if image is None:             # <<<<<<<<<<<<<<
 *         cimage = <ccuda.EGLImageKHR><void_ptr>0
 *     elif isinstance(image, (EGLImageKHR)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32821
 *     if image is None:
 *         cimage = <ccuda.EGLImageKHR><void_ptr>0
 *     elif isinstance(image, (EGLImageKHR)):             # <<<<<<<<<<<<<<
 *         pimage = int(image)
 *         cimage = <ccuda.EGLImageKHR><void_ptr>pimage
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_image, __pyx_ptype_4cuda_4cuda_EGLImageKHR); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32822
 *         cimage = <ccuda.EGLImageKHR><void_ptr>0
 *     elif isinstance(image, (EGLImageKHR)):
 *         pimage = int(image)             # <<<<<<<<<<<<<<
 *         cimage = <ccuda.EGLImageKHR><void_ptr>pimage
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_image); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pimage = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32823
 *     elif isinstance(image, (EGLImageKHR)):
 *         pimage = int(image)
 *         cimage = <ccuda.EGLImageKHR><void_ptr>pimage             # <<<<<<<<<<<<<<
 *     else:
 *         pimage = int(EGLImageKHR(image))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pimage); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32823, __pyx_L1_error)
    __pyx_v_cimage = ((__pyx_t_4cuda_5ccuda_EGLImageKHR)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32821
 *     if image is None:
 *         cimage = <ccuda.EGLImageKHR><void_ptr>0
 *     elif isinstance(image, (EGLImageKHR)):             # <<<<<<<<<<<<<<
 *         pimage = int(image)
 *         cimage = <ccuda.EGLImageKHR><void_ptr>pimage
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32825
 *         cimage = <ccuda.EGLImageKHR><void_ptr>pimage
 *     else:
 *         pimage = int(EGLImageKHR(image))             # <<<<<<<<<<<<<<
 *         cimage = <ccuda.EGLImageKHR><void_ptr>pimage
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_EGLImageKHR), __pyx_v_image); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pimage = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32826
 *     else:
 *         pimage = int(EGLImageKHR(image))
 *         cimage = <ccuda.EGLImageKHR><void_ptr>pimage             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pimage); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32826, __pyx_L1_error)
    __pyx_v_cimage = ((__pyx_t_4cuda_5ccuda_EGLImageKHR)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32828
 *         cimage = <ccuda.EGLImageKHR><void_ptr>pimage
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphicsEGLRegisterImage(pCudaResource._ptr, cimage, flags)
 *     return (CUresult(err), pCudaResource)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pCudaResource = ((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":32829
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 *     err = ccuda.cuGraphicsEGLRegisterImage(pCudaResource._ptr, cimage, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pCudaResource)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphicsEGLRegisterImage(__pyx_v_pCudaResource->_ptr, __pyx_v_cimage, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32829, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":32830
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 *     err = ccuda.cuGraphicsEGLRegisterImage(pCudaResource._ptr, cimage, flags)
 *     return (CUresult(err), pCudaResource)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pCudaResource));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pCudaResource));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pCudaResource));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32761
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsEGLRegisterImage(image, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Registers an EGL image.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsEGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pimage);
  __Pyx_XDECREF((PyObject *)__pyx_v_pCudaResource);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32833
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerConnect(stream):             # <<<<<<<<<<<<<<
 *     """ Connect CUDA to EGLStream as a consumer.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_753cuEGLStreamConsumerConnect(PyObject *__pyx_self, PyObject *__pyx_v_stream); /*proto*/
static char __pyx_doc_4cuda_4cuda_752cuEGLStreamConsumerConnect[] = "cuEGLStreamConsumerConnect(stream)\n Connect CUDA to EGLStream as a consumer.\n\n    Connect CUDA as a consumer to EGLStreamKHR specified by `stream`.\n\n    The EGLStreamKHR is an EGL object that transfers a sequence of image\n    frames from one API to another.\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.EGLStreamKHR`\n        EGLStreamKHR handle\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`,\n    conn : :py:obj:`~.CUeglStreamConnection`\n        Pointer to the returned connection handle\n\n    See Also\n    --------\n    :py:obj:`~.cuEGLStreamConsumerConnect`, :py:obj:`~.cuEGLStreamConsumerDisconnect`, :py:obj:`~.cuEGLStreamConsumerAcquireFrame`, :py:obj:`~.cuEGLStreamConsumerReleaseFrame`, :py:obj:`~.cudaEGLStreamConsumerConnect`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_753cuEGLStreamConsumerConnect = {"cuEGLStreamConsumerConnect", (PyCFunction)__pyx_pw_4cuda_4cuda_753cuEGLStreamConsumerConnect, METH_O, __pyx_doc_4cuda_4cuda_752cuEGLStreamConsumerConnect};
static PyObject *__pyx_pw_4cuda_4cuda_753cuEGLStreamConsumerConnect(PyObject *__pyx_self, PyObject *__pyx_v_stream) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEGLStreamConsumerConnect (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_752cuEGLStreamConsumerConnect(__pyx_self, ((PyObject *)__pyx_v_stream));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_752cuEGLStreamConsumerConnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream) {
  __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_conn = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1000)
  __Pyx_RefNannySetupContext("cuEGLStreamConsumerConnect", 0);
  __Pyx_TraceCall("cuEGLStreamConsumerConnect", __pyx_f[0], 32833, 0, __PYX_ERR(0, 32833, __pyx_L1_error));

  /* "cuda/cuda.pyx":32858
 *     """
 *     cdef ccuda.EGLStreamKHR cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32859
 *     cdef ccuda.EGLStreamKHR cstream
 *     if stream is None:
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (EGLStreamKHR)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((__pyx_t_4cuda_5ccuda_EGLStreamKHR)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32858
 *     """
 *     cdef ccuda.EGLStreamKHR cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32860
 *     if stream is None:
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_EGLStreamKHR); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32861
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32862
 *     elif isinstance(stream, (EGLStreamKHR)):
 *         pstream = int(stream)
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(EGLStreamKHR(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32862, __pyx_L1_error)
    __pyx_v_cstream = ((__pyx_t_4cuda_5ccuda_EGLStreamKHR)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32860
 *     if stream is None:
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32864
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 *     else:
 *         pstream = int(EGLStreamKHR(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_EGLStreamKHR), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32865
 *     else:
 *         pstream = int(EGLStreamKHR(stream))
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     cdef CUeglStreamConnection conn = CUeglStreamConnection()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32865, __pyx_L1_error)
    __pyx_v_cstream = ((__pyx_t_4cuda_5ccuda_EGLStreamKHR)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32867
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 * 
 *     cdef CUeglStreamConnection conn = CUeglStreamConnection()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuEGLStreamConsumerConnect(conn._ptr, cstream)
 *     return (CUresult(err), conn)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUeglStreamConnection)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_conn = ((struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":32868
 * 
 *     cdef CUeglStreamConnection conn = CUeglStreamConnection()
 *     err = ccuda.cuEGLStreamConsumerConnect(conn._ptr, cstream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), conn)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerConnect(__pyx_v_conn->_ptr, __pyx_v_cstream); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32868, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":32869
 *     cdef CUeglStreamConnection conn = CUeglStreamConnection()
 *     err = ccuda.cuEGLStreamConsumerConnect(conn._ptr, cstream)
 *     return (CUresult(err), conn)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_conn));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_conn));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_conn));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32833
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerConnect(stream):             # <<<<<<<<<<<<<<
 *     """ Connect CUDA to EGLStream as a consumer.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamConsumerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XDECREF((PyObject *)__pyx_v_conn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32872
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerConnectWithFlags(stream, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Connect CUDA to EGLStream as a consumer with given flags.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_755cuEGLStreamConsumerConnectWithFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_754cuEGLStreamConsumerConnectWithFlags[] = "cuEGLStreamConsumerConnectWithFlags(stream, unsigned int flags)\n Connect CUDA to EGLStream as a consumer with given flags.\n\n    Connect CUDA as a consumer to EGLStreamKHR specified by `stream` with\n    specified `flags` defined by CUeglResourceLocationFlags.\n\n    The flags specify whether the consumer wants to access frames from\n    system memory or video memory. Default is\n    :py:obj:`~.CU_EGL_RESOURCE_LOCATION_VIDMEM`.\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.EGLStreamKHR`\n        EGLStreamKHR handle\n    flags : unsigned int\n        Flags denote intended location - system or video.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`,\n    conn : :py:obj:`~.CUeglStreamConnection`\n        Pointer to the returned connection handle\n\n    See Also\n    --------\n    :py:obj:`~.cuEGLStreamConsumerConnect`, :py:obj:`~.cuEGLStreamConsumerDisconnect`, :py:obj:`~.cuEGLStreamConsumerAcquireFrame`, :py:obj:`~.cuEGLStreamConsumerReleaseFrame`, :py:obj:`~.cudaEGLStreamConsumerConnectWithFlags`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_755cuEGLStreamConsumerConnectWithFlags = {"cuEGLStreamConsumerConnectWithFlags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_755cuEGLStreamConsumerConnectWithFlags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_754cuEGLStreamConsumerConnectWithFlags};
static PyObject *__pyx_pw_4cuda_4cuda_755cuEGLStreamConsumerConnectWithFlags(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEGLStreamConsumerConnectWithFlags (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEGLStreamConsumerConnectWithFlags", 1, 2, 2, 1); __PYX_ERR(0, 32872, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuEGLStreamConsumerConnectWithFlags") < 0)) __PYX_ERR(0, 32872, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_stream = values[0];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32872, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuEGLStreamConsumerConnectWithFlags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32872, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamConsumerConnectWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_754cuEGLStreamConsumerConnectWithFlags(__pyx_self, __pyx_v_stream, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_754cuEGLStreamConsumerConnectWithFlags(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_conn = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1001)
  __Pyx_RefNannySetupContext("cuEGLStreamConsumerConnectWithFlags", 0);
  __Pyx_TraceCall("cuEGLStreamConsumerConnectWithFlags", __pyx_f[0], 32872, 0, __PYX_ERR(0, 32872, __pyx_L1_error));

  /* "cuda/cuda.pyx":32901
 *     """
 *     cdef ccuda.EGLStreamKHR cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32902
 *     cdef ccuda.EGLStreamKHR cstream
 *     if stream is None:
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (EGLStreamKHR)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((__pyx_t_4cuda_5ccuda_EGLStreamKHR)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":32901
 *     """
 *     cdef ccuda.EGLStreamKHR cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32903
 *     if stream is None:
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_EGLStreamKHR); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32904
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32905
 *     elif isinstance(stream, (EGLStreamKHR)):
 *         pstream = int(stream)
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(EGLStreamKHR(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32905, __pyx_L1_error)
    __pyx_v_cstream = ((__pyx_t_4cuda_5ccuda_EGLStreamKHR)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":32903
 *     if stream is None:
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32907
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 *     else:
 *         pstream = int(EGLStreamKHR(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_EGLStreamKHR), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":32908
 *     else:
 *         pstream = int(EGLStreamKHR(stream))
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     cdef CUeglStreamConnection conn = CUeglStreamConnection()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32908, __pyx_L1_error)
    __pyx_v_cstream = ((__pyx_t_4cuda_5ccuda_EGLStreamKHR)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32910
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 * 
 *     cdef CUeglStreamConnection conn = CUeglStreamConnection()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuEGLStreamConsumerConnectWithFlags(conn._ptr, cstream, flags)
 *     return (CUresult(err), conn)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUeglStreamConnection)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_conn = ((struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":32911
 * 
 *     cdef CUeglStreamConnection conn = CUeglStreamConnection()
 *     err = ccuda.cuEGLStreamConsumerConnectWithFlags(conn._ptr, cstream, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), conn)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerConnectWithFlags(__pyx_v_conn->_ptr, __pyx_v_cstream, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32911, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":32912
 *     cdef CUeglStreamConnection conn = CUeglStreamConnection()
 *     err = ccuda.cuEGLStreamConsumerConnectWithFlags(conn._ptr, cstream, flags)
 *     return (CUresult(err), conn)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_conn));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_conn));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_conn));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32872
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerConnectWithFlags(stream, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Connect CUDA to EGLStream as a consumer with given flags.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamConsumerConnectWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XDECREF((PyObject *)__pyx_v_conn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32915
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerDisconnect(conn):             # <<<<<<<<<<<<<<
 *     """ Disconnect CUDA as a consumer to EGLStream .
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_757cuEGLStreamConsumerDisconnect(PyObject *__pyx_self, PyObject *__pyx_v_conn); /*proto*/
static char __pyx_doc_4cuda_4cuda_756cuEGLStreamConsumerDisconnect[] = "cuEGLStreamConsumerDisconnect(conn)\n Disconnect CUDA as a consumer to EGLStream .\n\n    Disconnect CUDA as a consumer to EGLStreamKHR.\n\n    Parameters\n    ----------\n    conn : :py:obj:`~.CUeglStreamConnection`\n        Conection to disconnect.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`,\n\n    See Also\n    --------\n    :py:obj:`~.cuEGLStreamConsumerConnect`, :py:obj:`~.cuEGLStreamConsumerDisconnect`, :py:obj:`~.cuEGLStreamConsumerAcquireFrame`, :py:obj:`~.cuEGLStreamConsumerReleaseFrame`, :py:obj:`~.cudaEGLStreamConsumerDisconnect`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_757cuEGLStreamConsumerDisconnect = {"cuEGLStreamConsumerDisconnect", (PyCFunction)__pyx_pw_4cuda_4cuda_757cuEGLStreamConsumerDisconnect, METH_O, __pyx_doc_4cuda_4cuda_756cuEGLStreamConsumerDisconnect};
static PyObject *__pyx_pw_4cuda_4cuda_757cuEGLStreamConsumerDisconnect(PyObject *__pyx_self, PyObject *__pyx_v_conn) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEGLStreamConsumerDisconnect (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_756cuEGLStreamConsumerDisconnect(__pyx_self, ((PyObject *)__pyx_v_conn));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_756cuEGLStreamConsumerDisconnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn) {
  __pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_cconn;
  PyObject *__pyx_v_pconn = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1002)
  __Pyx_RefNannySetupContext("cuEGLStreamConsumerDisconnect", 0);
  __Pyx_TraceCall("cuEGLStreamConsumerDisconnect", __pyx_f[0], 32915, 0, __PYX_ERR(0, 32915, __pyx_L1_error));

  /* "cuda/cuda.pyx":32935
 *     """
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 */
  __pyx_t_1 = (__pyx_v_conn == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32936
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()
 */
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":32935
 *     """
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32937
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):             # <<<<<<<<<<<<<<
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_conn, __pyx_ptype_4cuda_4cuda_CUeglStreamConnection); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32938
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_conn, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_pconn = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32939
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn             # <<<<<<<<<<<<<<
 *     elif isinstance(conn, (int)):
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pconn); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32939, __pyx_L1_error)
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":32937
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):             # <<<<<<<<<<<<<<
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32940
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_conn); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":32941
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_conn); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32941, __pyx_L1_error)
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":32940
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32943
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuEGLStreamConsumerDisconnect(cconn)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_conn))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_conn_is_not_instance_of, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 32943, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32945
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))
 * 
 *     err = ccuda.cuEGLStreamConsumerDisconnect(cconn)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerDisconnect(__pyx_v_cconn); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 32945, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":32946
 * 
 *     err = ccuda.cuEGLStreamConsumerDisconnect(cconn)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32915
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerDisconnect(conn):             # <<<<<<<<<<<<<<
 *     """ Disconnect CUDA as a consumer to EGLStream .
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamConsumerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pconn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":32949
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int timeout):             # <<<<<<<<<<<<<<
 *     """ Acquire an image frame from the EGLStream with CUDA as a consumer.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_759cuEGLStreamConsumerAcquireFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_758cuEGLStreamConsumerAcquireFrame[] = "cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int timeout)\n Acquire an image frame from the EGLStream with CUDA as a consumer.\n\n    Acquire an image frame from EGLStreamKHR. This API can also acquire an\n    old frame presented by the producer unless explicitly disabled by\n    setting EGL_SUPPORT_REUSE_NV flag to EGL_FALSE during stream\n    initialization. By default, EGLStream is created with this flag set to\n    EGL_TRUE. :py:obj:`~.cuGraphicsResourceGetMappedEglFrame` can be called\n    on `pCudaResource` to get :py:obj:`~.CUeglFrame`.\n\n    Parameters\n    ----------\n    conn : :py:obj:`~.CUeglStreamConnection`\n        Connection on which to acquire\n    pCudaResource : :py:obj:`~.CUgraphicsResource`\n        CUDA resource on which the stream frame will be mapped for use.\n    pStream : :py:obj:`~.CUstream`\n        CUDA stream for synchronization and any data migrations implied by\n        :py:obj:`~.CUeglResourceLocationFlags`.\n    timeout : unsigned int\n        Desired timeout in usec for a new frame to be acquired. If set as\n        :py:obj:`~.CUDA_EGL_INFINITE_TIMEOUT`, acquire waits infinitely.\n        After timeout occurs CUDA consumer tries to acquire an old frame if\n        available and EGL_SUPPORT_REUSE_NV flag is set.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`,\n\n    See Also\n    --------\n    :py:obj:`~.cuEGLStreamConsumerConnect`, :py:obj:`~.cuEGLStreamConsumerDisconnect`, :py:obj:`~.cuEGLStreamConsumerAcquireFrame`, :py:obj:`~.cuEGLStreamConsumerReleaseFrame`, :py:obj:`~.cudaEGLStreamConsumerAcquireFrame`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_759cuEGLStreamConsumerAcquireFrame = {"cuEGLStreamConsumerAcquireFrame", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_759cuEGLStreamConsumerAcquireFrame, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_758cuEGLStreamConsumerAcquireFrame};
static PyObject *__pyx_pw_4cuda_4cuda_759cuEGLStreamConsumerAcquireFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_conn = 0;
  PyObject *__pyx_v_pCudaResource = 0;
  PyObject *__pyx_v_pStream = 0;
  unsigned int __pyx_v_timeout;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEGLStreamConsumerAcquireFrame (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conn,&__pyx_n_s_pCudaResource,&__pyx_n_s_pStream,&__pyx_n_s_timeout,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conn)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pCudaResource)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEGLStreamConsumerAcquireFrame", 1, 4, 4, 1); __PYX_ERR(0, 32949, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pStream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEGLStreamConsumerAcquireFrame", 1, 4, 4, 2); __PYX_ERR(0, 32949, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEGLStreamConsumerAcquireFrame", 1, 4, 4, 3); __PYX_ERR(0, 32949, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuEGLStreamConsumerAcquireFrame") < 0)) __PYX_ERR(0, 32949, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_conn = values[0];
    __pyx_v_pCudaResource = values[1];
    __pyx_v_pStream = values[2];
    __pyx_v_timeout = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_timeout == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32949, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuEGLStreamConsumerAcquireFrame", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32949, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamConsumerAcquireFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_758cuEGLStreamConsumerAcquireFrame(__pyx_self, __pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream, __pyx_v_timeout);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_758cuEGLStreamConsumerAcquireFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn, PyObject *__pyx_v_pCudaResource, PyObject *__pyx_v_pStream, unsigned int __pyx_v_timeout) {
  CUstream *__pyx_v_cpStream;
  PyObject *__pyx_v_ppStream = NULL;
  CUgraphicsResource *__pyx_v_cpCudaResource;
  PyObject *__pyx_v_ppCudaResource = NULL;
  __pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_cconn;
  PyObject *__pyx_v_pconn = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1003)
  __Pyx_RefNannySetupContext("cuEGLStreamConsumerAcquireFrame", 0);
  __Pyx_TraceCall("cuEGLStreamConsumerAcquireFrame", __pyx_f[0], 32949, 0, __PYX_ERR(0, 32949, __pyx_L1_error));

  /* "cuda/cuda.pyx":32984
 *     """
 *     cdef ccuda.CUstream *cpStream
 *     if pStream is None:             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_pStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32985
 *     cdef ccuda.CUstream *cpStream
 *     if pStream is None:
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(pStream, (CUstream)):
 *         ppStream = pStream.getPtr()
 */
    __pyx_v_cpStream = ((CUstream *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":32984
 *     """
 *     cdef ccuda.CUstream *cpStream
 *     if pStream is None:             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32986
 *     if pStream is None:
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32987
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):
 *         ppStream = pStream.getPtr()             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pStream, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_ppStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32988
 *     elif isinstance(pStream, (CUstream)):
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream             # <<<<<<<<<<<<<<
 *     elif isinstance(pStream, (int)):
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppStream); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32988, __pyx_L1_error)
    __pyx_v_cpStream = ((CUstream *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":32986
 *     if pStream is None:
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32989
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 *     else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_pStream); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":32990
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'pStream' is not instance of type (expected <class 'int, cuda.CUstream'>, found " + str(type(pStream)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pStream); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32990, __pyx_L1_error)
    __pyx_v_cpStream = ((CUstream *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":32989
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 *     else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":32992
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 *     else:
 *         raise TypeError("Argument 'pStream' is not instance of type (expected <class 'int, cuda.CUstream'>, found " + str(type(pStream)))             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphicsResource *cpCudaResource
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_pStream))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_pStream_is_not_instance, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 32992, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":32995
 * 
 *     cdef ccuda.CUgraphicsResource *cpCudaResource
 *     if pCudaResource is None:             # <<<<<<<<<<<<<<
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):
 */
  __pyx_t_2 = (__pyx_v_pCudaResource == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":32996
 *     cdef ccuda.CUgraphicsResource *cpCudaResource
 *     if pCudaResource is None:
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):
 *         ppCudaResource = pCudaResource.getPtr()
 */
    __pyx_v_cpCudaResource = ((CUgraphicsResource *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":32995
 * 
 *     cdef ccuda.CUgraphicsResource *cpCudaResource
 *     if pCudaResource is None:             # <<<<<<<<<<<<<<
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":32997
 *     if pCudaResource is None:
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         ppCudaResource = pCudaResource.getPtr()
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>ppCudaResource
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_pCudaResource, __pyx_ptype_4cuda_4cuda_CUgraphicsResource); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":32998
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):
 *         ppCudaResource = pCudaResource.getPtr()             # <<<<<<<<<<<<<<
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>ppCudaResource
 *     elif isinstance(pCudaResource, (int)):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pCudaResource, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_ppCudaResource = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":32999
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):
 *         ppCudaResource = pCudaResource.getPtr()
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>ppCudaResource             # <<<<<<<<<<<<<<
 *     elif isinstance(pCudaResource, (int)):
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>pCudaResource
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppCudaResource); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 32999, __pyx_L1_error)
    __pyx_v_cpCudaResource = ((CUgraphicsResource *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":32997
 *     if pCudaResource is None:
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>NULL
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         ppCudaResource = pCudaResource.getPtr()
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>ppCudaResource
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33000
 *         ppCudaResource = pCudaResource.getPtr()
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>ppCudaResource
 *     elif isinstance(pCudaResource, (int)):             # <<<<<<<<<<<<<<
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>pCudaResource
 *     else:
 */
  __pyx_t_2 = PyInt_Check(__pyx_v_pCudaResource); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "cuda/cuda.pyx":33001
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>ppCudaResource
 *     elif isinstance(pCudaResource, (int)):
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>pCudaResource             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'pCudaResource' is not instance of type (expected <class 'int, cuda.CUgraphicsResource'>, found " + str(type(pCudaResource)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pCudaResource); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33001, __pyx_L1_error)
    __pyx_v_cpCudaResource = ((CUgraphicsResource *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33000
 *         ppCudaResource = pCudaResource.getPtr()
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>ppCudaResource
 *     elif isinstance(pCudaResource, (int)):             # <<<<<<<<<<<<<<
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>pCudaResource
 *     else:
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33003
 *         cpCudaResource = <ccuda.CUgraphicsResource*><void_ptr>pCudaResource
 *     else:
 *         raise TypeError("Argument 'pCudaResource' is not instance of type (expected <class 'int, cuda.CUgraphicsResource'>, found " + str(type(pCudaResource)))             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUeglStreamConnection *cconn
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_pCudaResource))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_pCudaResource_is_not_in, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 33003, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":33006
 * 
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 */
  __pyx_t_1 = (__pyx_v_conn == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33007
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()
 */
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":33006
 * 
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":33008
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):             # <<<<<<<<<<<<<<
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_conn, __pyx_ptype_4cuda_4cuda_CUeglStreamConnection); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33009
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_conn, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_pconn = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33010
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn             # <<<<<<<<<<<<<<
 *     elif isinstance(conn, (int)):
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pconn); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33010, __pyx_L1_error)
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33008
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):             # <<<<<<<<<<<<<<
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":33011
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_conn); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":33012
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_conn); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33012, __pyx_L1_error)
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33011
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":33014
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuEGLStreamConsumerAcquireFrame(cconn, cpCudaResource, cpStream, timeout)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_conn))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_conn_is_not_instance_of, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 33014, __pyx_L1_error)
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":33016
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))
 * 
 *     err = ccuda.cuEGLStreamConsumerAcquireFrame(cconn, cpCudaResource, cpStream, timeout)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerAcquireFrame(__pyx_v_cconn, __pyx_v_cpCudaResource, __pyx_v_cpStream, __pyx_v_timeout); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 33016, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":33017
 * 
 *     err = ccuda.cuEGLStreamConsumerAcquireFrame(cconn, cpCudaResource, cpStream, timeout)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":32949
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int timeout):             # <<<<<<<<<<<<<<
 *     """ Acquire an image frame from the EGLStream with CUDA as a consumer.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamConsumerAcquireFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppStream);
  __Pyx_XDECREF(__pyx_v_ppCudaResource);
  __Pyx_XDECREF(__pyx_v_pconn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":33020
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream):             # <<<<<<<<<<<<<<
 *     """ Releases the last frame acquired from the EGLStream.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_761cuEGLStreamConsumerReleaseFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_760cuEGLStreamConsumerReleaseFrame[] = "cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)\n Releases the last frame acquired from the EGLStream.\n\n    Release the acquired image frame specified by `pCudaResource` to\n    EGLStreamKHR. If EGL_SUPPORT_REUSE_NV flag is set to EGL_TRUE, at the\n    time of EGL creation this API doesn't release the last frame acquired\n    on the EGLStream. By default, EGLStream is created with this flag set\n    to EGL_TRUE.\n\n    Parameters\n    ----------\n    conn : :py:obj:`~.CUeglStreamConnection`\n        Connection on which to release\n    pCudaResource : :py:obj:`~.CUgraphicsResource`\n        CUDA resource whose corresponding frame is to be released\n    pStream : :py:obj:`~.CUstream`\n        CUDA stream on which release will be done.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuEGLStreamConsumerConnect`, :py:obj:`~.cuEGLStreamConsumerDisconnect`, :py:obj:`~.cuEGLStreamConsumerAcquireFrame`, :py:obj:`~.cuEGLStreamConsumerReleaseFrame`, :py:obj:`~.cudaEGLStreamConsumerReleaseFrame`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_761cuEGLStreamConsumerReleaseFrame = {"cuEGLStreamConsumerReleaseFrame", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_761cuEGLStreamConsumerReleaseFrame, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_760cuEGLStreamConsumerReleaseFrame};
static PyObject *__pyx_pw_4cuda_4cuda_761cuEGLStreamConsumerReleaseFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_conn = 0;
  PyObject *__pyx_v_pCudaResource = 0;
  PyObject *__pyx_v_pStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEGLStreamConsumerReleaseFrame (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conn,&__pyx_n_s_pCudaResource,&__pyx_n_s_pStream,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conn)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pCudaResource)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEGLStreamConsumerReleaseFrame", 1, 3, 3, 1); __PYX_ERR(0, 33020, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pStream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEGLStreamConsumerReleaseFrame", 1, 3, 3, 2); __PYX_ERR(0, 33020, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuEGLStreamConsumerReleaseFrame") < 0)) __PYX_ERR(0, 33020, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_conn = values[0];
    __pyx_v_pCudaResource = values[1];
    __pyx_v_pStream = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuEGLStreamConsumerReleaseFrame", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 33020, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamConsumerReleaseFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_760cuEGLStreamConsumerReleaseFrame(__pyx_self, __pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_760cuEGLStreamConsumerReleaseFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn, PyObject *__pyx_v_pCudaResource, PyObject *__pyx_v_pStream) {
  CUstream *__pyx_v_cpStream;
  PyObject *__pyx_v_ppStream = NULL;
  CUgraphicsResource __pyx_v_cpCudaResource;
  PyObject *__pyx_v_ppCudaResource = NULL;
  __pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_cconn;
  PyObject *__pyx_v_pconn = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1004)
  __Pyx_RefNannySetupContext("cuEGLStreamConsumerReleaseFrame", 0);
  __Pyx_TraceCall("cuEGLStreamConsumerReleaseFrame", __pyx_f[0], 33020, 0, __PYX_ERR(0, 33020, __pyx_L1_error));

  /* "cuda/cuda.pyx":33048
 *     """
 *     cdef ccuda.CUstream *cpStream
 *     if pStream is None:             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_pStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33049
 *     cdef ccuda.CUstream *cpStream
 *     if pStream is None:
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(pStream, (CUstream)):
 *         ppStream = pStream.getPtr()
 */
    __pyx_v_cpStream = ((CUstream *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":33048
 *     """
 *     cdef ccuda.CUstream *cpStream
 *     if pStream is None:             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33050
 *     if pStream is None:
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33051
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):
 *         ppStream = pStream.getPtr()             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pStream, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_ppStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33052
 *     elif isinstance(pStream, (CUstream)):
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream             # <<<<<<<<<<<<<<
 *     elif isinstance(pStream, (int)):
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppStream); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33052, __pyx_L1_error)
    __pyx_v_cpStream = ((CUstream *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33050
 *     if pStream is None:
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33053
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 *     else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_pStream); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":33054
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'pStream' is not instance of type (expected <class 'int, cuda.CUstream'>, found " + str(type(pStream)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pStream); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33054, __pyx_L1_error)
    __pyx_v_cpStream = ((CUstream *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33053
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 *     else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33056
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 *     else:
 *         raise TypeError("Argument 'pStream' is not instance of type (expected <class 'int, cuda.CUstream'>, found " + str(type(pStream)))             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraphicsResource cpCudaResource
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_pStream))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_pStream_is_not_instance, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 33056, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":33059
 * 
 *     cdef ccuda.CUgraphicsResource cpCudaResource
 *     if pCudaResource is None:             # <<<<<<<<<<<<<<
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):
 */
  __pyx_t_2 = (__pyx_v_pCudaResource == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33060
 *     cdef ccuda.CUgraphicsResource cpCudaResource
 *     if pCudaResource is None:
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):
 *         ppCudaResource = int(pCudaResource)
 */
    __pyx_v_cpCudaResource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":33059
 * 
 *     cdef ccuda.CUgraphicsResource cpCudaResource
 *     if pCudaResource is None:             # <<<<<<<<<<<<<<
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33061
 *     if pCudaResource is None:
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         ppCudaResource = int(pCudaResource)
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>ppCudaResource
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_pCudaResource, __pyx_ptype_4cuda_4cuda_CUgraphicsResource); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33062
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):
 *         ppCudaResource = int(pCudaResource)             # <<<<<<<<<<<<<<
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>ppCudaResource
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_pCudaResource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33062, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ppCudaResource = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33063
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):
 *         ppCudaResource = int(pCudaResource)
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>ppCudaResource             # <<<<<<<<<<<<<<
 *     else:
 *         ppCudaResource = int(CUgraphicsResource(pCudaResource))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppCudaResource); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33063, __pyx_L1_error)
    __pyx_v_cpCudaResource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33061
 *     if pCudaResource is None:
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(pCudaResource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         ppCudaResource = int(pCudaResource)
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>ppCudaResource
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33065
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>ppCudaResource
 *     else:
 *         ppCudaResource = int(CUgraphicsResource(pCudaResource))             # <<<<<<<<<<<<<<
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>ppCudaResource
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource), __pyx_v_pCudaResource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ppCudaResource = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cuda/cuda.pyx":33066
 *     else:
 *         ppCudaResource = int(CUgraphicsResource(pCudaResource))
 *         cpCudaResource = <ccuda.CUgraphicsResource><void_ptr>ppCudaResource             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUeglStreamConnection *cconn
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppCudaResource); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33066, __pyx_L1_error)
    __pyx_v_cpCudaResource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":33069
 * 
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 */
  __pyx_t_2 = (__pyx_v_conn == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33070
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()
 */
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":33069
 * 
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":33071
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):             # <<<<<<<<<<<<<<
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_conn, __pyx_ptype_4cuda_4cuda_CUeglStreamConnection); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33072
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_conn, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pconn = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cuda/cuda.pyx":33073
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn             # <<<<<<<<<<<<<<
 *     elif isinstance(conn, (int)):
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pconn); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33073, __pyx_L1_error)
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33071
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):             # <<<<<<<<<<<<<<
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":33074
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 */
  __pyx_t_2 = PyInt_Check(__pyx_v_conn); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "cuda/cuda.pyx":33075
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_conn); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33075, __pyx_L1_error)
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33074
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":33077
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuEGLStreamConsumerReleaseFrame(cconn, cpCudaResource, cpStream)
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_conn))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_conn_is_not_instance_of, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 33077, __pyx_L1_error)
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":33079
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))
 * 
 *     err = ccuda.cuEGLStreamConsumerReleaseFrame(cconn, cpCudaResource, cpStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerReleaseFrame(__pyx_v_cconn, __pyx_v_cpCudaResource, __pyx_v_cpStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 33079, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":33080
 * 
 *     err = ccuda.cuEGLStreamConsumerReleaseFrame(cconn, cpCudaResource, cpStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":33020
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream):             # <<<<<<<<<<<<<<
 *     """ Releases the last frame acquired from the EGLStream.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamConsumerReleaseFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppStream);
  __Pyx_XDECREF(__pyx_v_ppCudaResource);
  __Pyx_XDECREF(__pyx_v_pconn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":33083
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerConnect(stream, width, height):             # <<<<<<<<<<<<<<
 *     """ Connect CUDA to EGLStream as a producer.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_763cuEGLStreamProducerConnect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_762cuEGLStreamProducerConnect[] = "cuEGLStreamProducerConnect(stream, width, height)\n Connect CUDA to EGLStream as a producer.\n\n    Connect CUDA as a producer to EGLStreamKHR specified by `stream`.\n\n    The EGLStreamKHR is an EGL object that transfers a sequence of image\n    frames from one API to another.\n\n    Parameters\n    ----------\n    stream : :py:obj:`~.EGLStreamKHR`\n        EGLStreamKHR handle\n    width : :py:obj:`~.EGLint`\n        width of the image to be submitted to the stream\n    height : :py:obj:`~.EGLint`\n        height of the image to be submitted to the stream\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`,\n    conn : :py:obj:`~.CUeglStreamConnection`\n        Pointer to the returned connection handle\n\n    See Also\n    --------\n    :py:obj:`~.cuEGLStreamProducerConnect`, :py:obj:`~.cuEGLStreamProducerDisconnect`, :py:obj:`~.cuEGLStreamProducerPresentFrame`, :py:obj:`~.cudaEGLStreamProducerConnect`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_763cuEGLStreamProducerConnect = {"cuEGLStreamProducerConnect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_763cuEGLStreamProducerConnect, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_762cuEGLStreamProducerConnect};
static PyObject *__pyx_pw_4cuda_4cuda_763cuEGLStreamProducerConnect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEGLStreamProducerConnect (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_width_2,&__pyx_n_s_height_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEGLStreamProducerConnect", 1, 3, 3, 1); __PYX_ERR(0, 33083, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEGLStreamProducerConnect", 1, 3, 3, 2); __PYX_ERR(0, 33083, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuEGLStreamProducerConnect") < 0)) __PYX_ERR(0, 33083, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_stream = values[0];
    __pyx_v_width = values[1];
    __pyx_v_height = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuEGLStreamProducerConnect", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 33083, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamProducerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_762cuEGLStreamProducerConnect(__pyx_self, __pyx_v_stream, __pyx_v_width, __pyx_v_height);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_762cuEGLStreamProducerConnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_width, PyObject *__pyx_v_height) {
  __pyx_t_4cuda_5ccuda_EGLint __pyx_v_cheight;
  PyObject *__pyx_v_pheight = NULL;
  __pyx_t_4cuda_5ccuda_EGLint __pyx_v_cwidth;
  PyObject *__pyx_v_pwidth = NULL;
  __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_cstream;
  PyObject *__pyx_v_pstream = NULL;
  struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *__pyx_v_conn = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1005)
  __Pyx_RefNannySetupContext("cuEGLStreamProducerConnect", 0);
  __Pyx_TraceCall("cuEGLStreamProducerConnect", __pyx_f[0], 33083, 0, __PYX_ERR(0, 33083, __pyx_L1_error));

  /* "cuda/cuda.pyx":33112
 *     """
 *     cdef ccuda.EGLint cheight
 *     if height is None:             # <<<<<<<<<<<<<<
 *         cheight = <ccuda.EGLint><void_ptr>0
 *     elif isinstance(height, (EGLint)):
 */
  __pyx_t_1 = (__pyx_v_height == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33113
 *     cdef ccuda.EGLint cheight
 *     if height is None:
 *         cheight = <ccuda.EGLint><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(height, (EGLint)):
 *         pheight = int(height)
 */
    __pyx_v_cheight = ((__pyx_t_4cuda_5ccuda_EGLint)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":33112
 *     """
 *     cdef ccuda.EGLint cheight
 *     if height is None:             # <<<<<<<<<<<<<<
 *         cheight = <ccuda.EGLint><void_ptr>0
 *     elif isinstance(height, (EGLint)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33114
 *     if height is None:
 *         cheight = <ccuda.EGLint><void_ptr>0
 *     elif isinstance(height, (EGLint)):             # <<<<<<<<<<<<<<
 *         pheight = int(height)
 *         cheight = <ccuda.EGLint><void_ptr>pheight
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_height, __pyx_ptype_4cuda_4cuda_EGLint); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33115
 *         cheight = <ccuda.EGLint><void_ptr>0
 *     elif isinstance(height, (EGLint)):
 *         pheight = int(height)             # <<<<<<<<<<<<<<
 *         cheight = <ccuda.EGLint><void_ptr>pheight
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pheight = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33116
 *     elif isinstance(height, (EGLint)):
 *         pheight = int(height)
 *         cheight = <ccuda.EGLint><void_ptr>pheight             # <<<<<<<<<<<<<<
 *     else:
 *         pheight = int(EGLint(height))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pheight); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33116, __pyx_L1_error)
    __pyx_v_cheight = ((__pyx_t_4cuda_5ccuda_EGLint)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":33114
 *     if height is None:
 *         cheight = <ccuda.EGLint><void_ptr>0
 *     elif isinstance(height, (EGLint)):             # <<<<<<<<<<<<<<
 *         pheight = int(height)
 *         cheight = <ccuda.EGLint><void_ptr>pheight
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33118
 *         cheight = <ccuda.EGLint><void_ptr>pheight
 *     else:
 *         pheight = int(EGLint(height))             # <<<<<<<<<<<<<<
 *         cheight = <ccuda.EGLint><void_ptr>pheight
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_EGLint), __pyx_v_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pheight = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":33119
 *     else:
 *         pheight = int(EGLint(height))
 *         cheight = <ccuda.EGLint><void_ptr>pheight             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.EGLint cwidth
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pheight); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33119, __pyx_L1_error)
    __pyx_v_cheight = ((__pyx_t_4cuda_5ccuda_EGLint)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":33122
 * 
 *     cdef ccuda.EGLint cwidth
 *     if width is None:             # <<<<<<<<<<<<<<
 *         cwidth = <ccuda.EGLint><void_ptr>0
 *     elif isinstance(width, (EGLint)):
 */
  __pyx_t_1 = (__pyx_v_width == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33123
 *     cdef ccuda.EGLint cwidth
 *     if width is None:
 *         cwidth = <ccuda.EGLint><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(width, (EGLint)):
 *         pwidth = int(width)
 */
    __pyx_v_cwidth = ((__pyx_t_4cuda_5ccuda_EGLint)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":33122
 * 
 *     cdef ccuda.EGLint cwidth
 *     if width is None:             # <<<<<<<<<<<<<<
 *         cwidth = <ccuda.EGLint><void_ptr>0
 *     elif isinstance(width, (EGLint)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33124
 *     if width is None:
 *         cwidth = <ccuda.EGLint><void_ptr>0
 *     elif isinstance(width, (EGLint)):             # <<<<<<<<<<<<<<
 *         pwidth = int(width)
 *         cwidth = <ccuda.EGLint><void_ptr>pwidth
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_width, __pyx_ptype_4cuda_4cuda_EGLint); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33125
 *         cwidth = <ccuda.EGLint><void_ptr>0
 *     elif isinstance(width, (EGLint)):
 *         pwidth = int(width)             # <<<<<<<<<<<<<<
 *         cwidth = <ccuda.EGLint><void_ptr>pwidth
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_width); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pwidth = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":33126
 *     elif isinstance(width, (EGLint)):
 *         pwidth = int(width)
 *         cwidth = <ccuda.EGLint><void_ptr>pwidth             # <<<<<<<<<<<<<<
 *     else:
 *         pwidth = int(EGLint(width))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pwidth); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33126, __pyx_L1_error)
    __pyx_v_cwidth = ((__pyx_t_4cuda_5ccuda_EGLint)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":33124
 *     if width is None:
 *         cwidth = <ccuda.EGLint><void_ptr>0
 *     elif isinstance(width, (EGLint)):             # <<<<<<<<<<<<<<
 *         pwidth = int(width)
 *         cwidth = <ccuda.EGLint><void_ptr>pwidth
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33128
 *         cwidth = <ccuda.EGLint><void_ptr>pwidth
 *     else:
 *         pwidth = int(EGLint(width))             # <<<<<<<<<<<<<<
 *         cwidth = <ccuda.EGLint><void_ptr>pwidth
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_EGLint), __pyx_v_width); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pwidth = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33129
 *     else:
 *         pwidth = int(EGLint(width))
 *         cwidth = <ccuda.EGLint><void_ptr>pwidth             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.EGLStreamKHR cstream
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pwidth); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33129, __pyx_L1_error)
    __pyx_v_cwidth = ((__pyx_t_4cuda_5ccuda_EGLint)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":33132
 * 
 *     cdef ccuda.EGLStreamKHR cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):
 */
  __pyx_t_1 = (__pyx_v_stream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33133
 *     cdef ccuda.EGLStreamKHR cstream
 *     if stream is None:
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(stream, (EGLStreamKHR)):
 *         pstream = int(stream)
 */
    __pyx_v_cstream = ((__pyx_t_4cuda_5ccuda_EGLStreamKHR)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":33132
 * 
 *     cdef ccuda.EGLStreamKHR cstream
 *     if stream is None:             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":33134
 *     if stream is None:
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_stream, __pyx_ptype_4cuda_4cuda_EGLStreamKHR); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33135
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):
 *         pstream = int(stream)             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pstream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33136
 *     elif isinstance(stream, (EGLStreamKHR)):
 *         pstream = int(stream)
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream             # <<<<<<<<<<<<<<
 *     else:
 *         pstream = int(EGLStreamKHR(stream))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33136, __pyx_L1_error)
    __pyx_v_cstream = ((__pyx_t_4cuda_5ccuda_EGLStreamKHR)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":33134
 *     if stream is None:
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>0
 *     elif isinstance(stream, (EGLStreamKHR)):             # <<<<<<<<<<<<<<
 *         pstream = int(stream)
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 */
    goto __pyx_L5;
  }

  /* "cuda/cuda.pyx":33138
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 *     else:
 *         pstream = int(EGLStreamKHR(stream))             # <<<<<<<<<<<<<<
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_EGLStreamKHR), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pstream = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":33139
 *     else:
 *         pstream = int(EGLStreamKHR(stream))
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream             # <<<<<<<<<<<<<<
 * 
 *     cdef CUeglStreamConnection conn = CUeglStreamConnection()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pstream); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33139, __pyx_L1_error)
    __pyx_v_cstream = ((__pyx_t_4cuda_5ccuda_EGLStreamKHR)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L5:;

  /* "cuda/cuda.pyx":33141
 *         cstream = <ccuda.EGLStreamKHR><void_ptr>pstream
 * 
 *     cdef CUeglStreamConnection conn = CUeglStreamConnection()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuEGLStreamProducerConnect(conn._ptr, cstream, cwidth, cheight)
 *     return (CUresult(err), conn)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUeglStreamConnection)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_conn = ((struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":33142
 * 
 *     cdef CUeglStreamConnection conn = CUeglStreamConnection()
 *     err = ccuda.cuEGLStreamProducerConnect(conn._ptr, cstream, cwidth, cheight)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), conn)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuEGLStreamProducerConnect(__pyx_v_conn->_ptr, __pyx_v_cstream, __pyx_v_cwidth, __pyx_v_cheight); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 33142, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":33143
 *     cdef CUeglStreamConnection conn = CUeglStreamConnection()
 *     err = ccuda.cuEGLStreamProducerConnect(conn._ptr, cstream, cwidth, cheight)
 *     return (CUresult(err), conn)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_conn));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_conn));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_conn));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":33083
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerConnect(stream, width, height):             # <<<<<<<<<<<<<<
 *     """ Connect CUDA to EGLStream as a producer.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamProducerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pheight);
  __Pyx_XDECREF(__pyx_v_pwidth);
  __Pyx_XDECREF(__pyx_v_pstream);
  __Pyx_XDECREF((PyObject *)__pyx_v_conn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":33146
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerDisconnect(conn):             # <<<<<<<<<<<<<<
 *     """ Disconnect CUDA as a producer to EGLStream .
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_765cuEGLStreamProducerDisconnect(PyObject *__pyx_self, PyObject *__pyx_v_conn); /*proto*/
static char __pyx_doc_4cuda_4cuda_764cuEGLStreamProducerDisconnect[] = "cuEGLStreamProducerDisconnect(conn)\n Disconnect CUDA as a producer to EGLStream .\n\n    Disconnect CUDA as a producer to EGLStreamKHR.\n\n    Parameters\n    ----------\n    conn : :py:obj:`~.CUeglStreamConnection`\n        Conection to disconnect.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`,\n\n    See Also\n    --------\n    :py:obj:`~.cuEGLStreamProducerConnect`, :py:obj:`~.cuEGLStreamProducerDisconnect`, :py:obj:`~.cuEGLStreamProducerPresentFrame`, :py:obj:`~.cudaEGLStreamProducerDisconnect`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_765cuEGLStreamProducerDisconnect = {"cuEGLStreamProducerDisconnect", (PyCFunction)__pyx_pw_4cuda_4cuda_765cuEGLStreamProducerDisconnect, METH_O, __pyx_doc_4cuda_4cuda_764cuEGLStreamProducerDisconnect};
static PyObject *__pyx_pw_4cuda_4cuda_765cuEGLStreamProducerDisconnect(PyObject *__pyx_self, PyObject *__pyx_v_conn) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEGLStreamProducerDisconnect (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_764cuEGLStreamProducerDisconnect(__pyx_self, ((PyObject *)__pyx_v_conn));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_764cuEGLStreamProducerDisconnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn) {
  __pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_cconn;
  PyObject *__pyx_v_pconn = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1006)
  __Pyx_RefNannySetupContext("cuEGLStreamProducerDisconnect", 0);
  __Pyx_TraceCall("cuEGLStreamProducerDisconnect", __pyx_f[0], 33146, 0, __PYX_ERR(0, 33146, __pyx_L1_error));

  /* "cuda/cuda.pyx":33166
 *     """
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 */
  __pyx_t_1 = (__pyx_v_conn == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33167
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()
 */
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":33166
 *     """
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33168
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):             # <<<<<<<<<<<<<<
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_conn, __pyx_ptype_4cuda_4cuda_CUeglStreamConnection); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33169
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_conn, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_pconn = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33170
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn             # <<<<<<<<<<<<<<
 *     elif isinstance(conn, (int)):
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pconn); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33170, __pyx_L1_error)
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33168
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):             # <<<<<<<<<<<<<<
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33171
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_conn); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":33172
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_conn); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33172, __pyx_L1_error)
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33171
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33174
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuEGLStreamProducerDisconnect(cconn)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_conn))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_conn_is_not_instance_of, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 33174, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":33176
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))
 * 
 *     err = ccuda.cuEGLStreamProducerDisconnect(cconn)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuEGLStreamProducerDisconnect(__pyx_v_cconn); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 33176, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":33177
 * 
 *     err = ccuda.cuEGLStreamProducerDisconnect(cconn)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":33146
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerDisconnect(conn):             # <<<<<<<<<<<<<<
 *     """ Disconnect CUDA as a producer to EGLStream .
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamProducerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pconn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":33180
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerPresentFrame(conn, eglframe not None : CUeglFrame, pStream):             # <<<<<<<<<<<<<<
 *     """ Present a CUDA eglFrame to the EGLStream with CUDA as a producer.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_767cuEGLStreamProducerPresentFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_766cuEGLStreamProducerPresentFrame[] = "cuEGLStreamProducerPresentFrame(conn, CUeglFrame eglframe: CUeglFrame, pStream)\n Present a CUDA eglFrame to the EGLStream with CUDA as a producer.\n\n    When a frame is presented by the producer, it gets associated with the\n    EGLStream and thus it is illegal to free the frame before the producer\n    is disconnected. If a frame is freed and reused it may lead to\n    undefined behavior.\n\n    If producer and consumer are on different GPUs (iGPU and dGPU) then\n    frametype :py:obj:`~.CU_EGL_FRAME_TYPE_ARRAY` is not supported.\n    :py:obj:`~.CU_EGL_FRAME_TYPE_PITCH` can be used for such cross-device\n    applications.\n\n    The :py:obj:`~.CUeglFrame` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    For :py:obj:`~.CUeglFrame` of type :py:obj:`~.CU_EGL_FRAME_TYPE_PITCH`,\n    the application may present sub-region of a memory allocation. In that\n    case, the pitched pointer will specify the start address of the sub-\n    region in the allocation and corresponding :py:obj:`~.CUeglFrame`\n    fields will specify the dimensions of the sub-region.\n\n    Parameters\n    ----------\n    conn : :py:obj:`~.CUeglStreamConnection`\n        Connection on which to present the CUDA array\n    eglframe : :py:obj:`~.CUeglFrame`\n        CUDA Eglstream Proucer Frame handle to be sent to the consumer over\n        EglStream.\n    pStream : :py:obj:`~.CUstream`\n        CUDA stream on which to present the frame.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`,\n\n    See Also\n    --------\n    :py:obj:`~.cuEGLStreamProducerConnect`, :py:obj:`~.cuEGLStreamProducerDisconnect`, :py:obj:`~.cuEGLStreamProducerReturnFrame`, :py:obj:`~.cudaEGLStreamProducerPresentFrame`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_767cuEGLStreamProducerPresentFrame = {"cuEGLStreamProducerPresentFrame", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_767cuEGLStreamProducerPresentFrame, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_766cuEGLStreamProducerPresentFrame};
static PyObject *__pyx_pw_4cuda_4cuda_767cuEGLStreamProducerPresentFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_conn = 0;
  struct __pyx_obj_4cuda_4cuda_CUeglFrame *__pyx_v_eglframe = 0;
  PyObject *__pyx_v_pStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEGLStreamProducerPresentFrame (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conn,&__pyx_n_s_eglframe,&__pyx_n_s_pStream,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conn)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eglframe)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEGLStreamProducerPresentFrame", 1, 3, 3, 1); __PYX_ERR(0, 33180, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pStream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEGLStreamProducerPresentFrame", 1, 3, 3, 2); __PYX_ERR(0, 33180, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuEGLStreamProducerPresentFrame") < 0)) __PYX_ERR(0, 33180, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_conn = values[0];
    __pyx_v_eglframe = ((struct __pyx_obj_4cuda_4cuda_CUeglFrame *)values[1]);
    __pyx_v_pStream = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuEGLStreamProducerPresentFrame", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 33180, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamProducerPresentFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eglframe), __pyx_ptype_4cuda_4cuda_CUeglFrame, 0, "eglframe", 0))) __PYX_ERR(0, 33180, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_766cuEGLStreamProducerPresentFrame(__pyx_self, __pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_766cuEGLStreamProducerPresentFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn, struct __pyx_obj_4cuda_4cuda_CUeglFrame *__pyx_v_eglframe, PyObject *__pyx_v_pStream) {
  CUstream *__pyx_v_cpStream;
  PyObject *__pyx_v_ppStream = NULL;
  __pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_cconn;
  PyObject *__pyx_v_pconn = NULL;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_6;
  CUresult __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1007)
  __Pyx_RefNannySetupContext("cuEGLStreamProducerPresentFrame", 0);
  __Pyx_TraceCall("cuEGLStreamProducerPresentFrame", __pyx_f[0], 33180, 0, __PYX_ERR(0, 33180, __pyx_L1_error));

  /* "cuda/cuda.pyx":33223
 *     """
 *     cdef ccuda.CUstream *cpStream
 *     if pStream is None:             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_pStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33224
 *     cdef ccuda.CUstream *cpStream
 *     if pStream is None:
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(pStream, (CUstream)):
 *         ppStream = pStream.getPtr()
 */
    __pyx_v_cpStream = ((CUstream *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":33223
 *     """
 *     cdef ccuda.CUstream *cpStream
 *     if pStream is None:             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33225
 *     if pStream is None:
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33226
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):
 *         ppStream = pStream.getPtr()             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pStream, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_ppStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33227
 *     elif isinstance(pStream, (CUstream)):
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream             # <<<<<<<<<<<<<<
 *     elif isinstance(pStream, (int)):
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppStream); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33227, __pyx_L1_error)
    __pyx_v_cpStream = ((CUstream *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33225
 *     if pStream is None:
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33228
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 *     else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_pStream); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":33229
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'pStream' is not instance of type (expected <class 'int, cuda.CUstream'>, found " + str(type(pStream)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pStream); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33229, __pyx_L1_error)
    __pyx_v_cpStream = ((CUstream *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33228
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 *     else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33231
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 *     else:
 *         raise TypeError("Argument 'pStream' is not instance of type (expected <class 'int, cuda.CUstream'>, found " + str(type(pStream)))             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUeglStreamConnection *cconn
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_pStream))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_pStream_is_not_instance, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 33231, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":33234
 * 
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 */
  __pyx_t_2 = (__pyx_v_conn == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33235
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()
 */
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":33234
 * 
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33236
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):             # <<<<<<<<<<<<<<
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_conn, __pyx_ptype_4cuda_4cuda_CUeglStreamConnection); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33237
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_conn, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_pconn = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33238
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn             # <<<<<<<<<<<<<<
 *     elif isinstance(conn, (int)):
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pconn); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33238, __pyx_L1_error)
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33236
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):             # <<<<<<<<<<<<<<
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33239
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 */
  __pyx_t_2 = PyInt_Check(__pyx_v_conn); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "cuda/cuda.pyx":33240
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_conn); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33240, __pyx_L1_error)
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33239
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33242
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))             # <<<<<<<<<<<<<<
 * 
 *     err = ccuda.cuEGLStreamProducerPresentFrame(cconn, eglframe._ptr[0], cpStream)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_conn))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_conn_is_not_instance_of, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 33242, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":33244
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))
 * 
 *     err = ccuda.cuEGLStreamProducerPresentFrame(cconn, eglframe._ptr[0], cpStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_7 = __pyx_f_4cuda_5ccuda_cuEGLStreamProducerPresentFrame(__pyx_v_cconn, (__pyx_v_eglframe->__pyx_base._ptr[0]), __pyx_v_cpStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 33244, __pyx_L1_error)
  __pyx_v_err = __pyx_t_7;

  /* "cuda/cuda.pyx":33245
 * 
 *     err = ccuda.cuEGLStreamProducerPresentFrame(cconn, eglframe._ptr[0], cpStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":33180
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerPresentFrame(conn, eglframe not None : CUeglFrame, pStream):             # <<<<<<<<<<<<<<
 *     """ Present a CUDA eglFrame to the EGLStream with CUDA as a producer.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamProducerPresentFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppStream);
  __Pyx_XDECREF(__pyx_v_pconn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":33248
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerReturnFrame(conn, eglframe : CUeglFrame, pStream):             # <<<<<<<<<<<<<<
 *     """ Return the CUDA eglFrame to the EGLStream released by the consumer.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_769cuEGLStreamProducerReturnFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_768cuEGLStreamProducerReturnFrame[] = "cuEGLStreamProducerReturnFrame(conn, CUeglFrame eglframe: CUeglFrame, pStream)\n Return the CUDA eglFrame to the EGLStream released by the consumer.\n\n    This API can potentially return CUDA_ERROR_LAUNCH_TIMEOUT if the\n    consumer has not returned a frame to EGL stream. If timeout is returned\n    the application can retry.\n\n    Parameters\n    ----------\n    conn : :py:obj:`~.CUeglStreamConnection`\n        Connection on which to return\n    eglframe : :py:obj:`~.CUeglFrame`\n        CUDA Eglstream Proucer Frame handle returned from the consumer over\n        EglStream.\n    pStream : :py:obj:`~.CUstream`\n        CUDA stream on which to return the frame.\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`\n\n    See Also\n    --------\n    :py:obj:`~.cuEGLStreamProducerConnect`, :py:obj:`~.cuEGLStreamProducerDisconnect`, :py:obj:`~.cuEGLStreamProducerPresentFrame`, :py:obj:`~.cudaEGLStreamProducerReturnFrame`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_769cuEGLStreamProducerReturnFrame = {"cuEGLStreamProducerReturnFrame", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_769cuEGLStreamProducerReturnFrame, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_768cuEGLStreamProducerReturnFrame};
static PyObject *__pyx_pw_4cuda_4cuda_769cuEGLStreamProducerReturnFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_conn = 0;
  struct __pyx_obj_4cuda_4cuda_CUeglFrame *__pyx_v_eglframe = 0;
  PyObject *__pyx_v_pStream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEGLStreamProducerReturnFrame (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conn,&__pyx_n_s_eglframe,&__pyx_n_s_pStream,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conn)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eglframe)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEGLStreamProducerReturnFrame", 1, 3, 3, 1); __PYX_ERR(0, 33248, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pStream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEGLStreamProducerReturnFrame", 1, 3, 3, 2); __PYX_ERR(0, 33248, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuEGLStreamProducerReturnFrame") < 0)) __PYX_ERR(0, 33248, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_conn = values[0];
    __pyx_v_eglframe = ((struct __pyx_obj_4cuda_4cuda_CUeglFrame *)values[1]);
    __pyx_v_pStream = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuEGLStreamProducerReturnFrame", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 33248, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamProducerReturnFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eglframe), __pyx_ptype_4cuda_4cuda_CUeglFrame, 1, "eglframe", 0))) __PYX_ERR(0, 33248, __pyx_L1_error)
  __pyx_r = __pyx_pf_4cuda_4cuda_768cuEGLStreamProducerReturnFrame(__pyx_self, __pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_768cuEGLStreamProducerReturnFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn, struct __pyx_obj_4cuda_4cuda_CUeglFrame *__pyx_v_eglframe, PyObject *__pyx_v_pStream) {
  CUstream *__pyx_v_cpStream;
  PyObject *__pyx_v_ppStream = NULL;
  __pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_cconn;
  PyObject *__pyx_v_pconn = NULL;
  __pyx_t_4cuda_5ccuda_CUeglFrame *__pyx_v_ceglframe_ptr;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_6;
  struct __pyx_t_4cuda_5ccuda_CUeglFrame_st *__pyx_t_7;
  CUresult __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1008)
  __Pyx_RefNannySetupContext("cuEGLStreamProducerReturnFrame", 0);
  __Pyx_TraceCall("cuEGLStreamProducerReturnFrame", __pyx_f[0], 33248, 0, __PYX_ERR(0, 33248, __pyx_L1_error));

  /* "cuda/cuda.pyx":33275
 *     """
 *     cdef ccuda.CUstream *cpStream
 *     if pStream is None:             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):
 */
  __pyx_t_1 = (__pyx_v_pStream == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33276
 *     cdef ccuda.CUstream *cpStream
 *     if pStream is None:
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(pStream, (CUstream)):
 *         ppStream = pStream.getPtr()
 */
    __pyx_v_cpStream = ((CUstream *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":33275
 *     """
 *     cdef ccuda.CUstream *cpStream
 *     if pStream is None:             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33277
 *     if pStream is None:
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_pStream, __pyx_ptype_4cuda_4cuda_CUstream); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33278
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):
 *         ppStream = pStream.getPtr()             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pStream, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_ppStream = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33279
 *     elif isinstance(pStream, (CUstream)):
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream             # <<<<<<<<<<<<<<
 *     elif isinstance(pStream, (int)):
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ppStream); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33279, __pyx_L1_error)
    __pyx_v_cpStream = ((CUstream *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33277
 *     if pStream is None:
 *         cpStream = <ccuda.CUstream*><void_ptr>NULL
 *     elif isinstance(pStream, (CUstream)):             # <<<<<<<<<<<<<<
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33280
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 *     else:
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_pStream); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cuda/cuda.pyx":33281
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'pStream' is not instance of type (expected <class 'int, cuda.CUstream'>, found " + str(type(pStream)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pStream); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33281, __pyx_L1_error)
    __pyx_v_cpStream = ((CUstream *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33280
 *         ppStream = pStream.getPtr()
 *         cpStream = <ccuda.CUstream*><void_ptr>ppStream
 *     elif isinstance(pStream, (int)):             # <<<<<<<<<<<<<<
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 *     else:
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33283
 *         cpStream = <ccuda.CUstream*><void_ptr>pStream
 *     else:
 *         raise TypeError("Argument 'pStream' is not instance of type (expected <class 'int, cuda.CUstream'>, found " + str(type(pStream)))             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUeglStreamConnection *cconn
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_pStream))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_pStream_is_not_instance, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 33283, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":33286
 * 
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 */
  __pyx_t_2 = (__pyx_v_conn == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33287
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL             # <<<<<<<<<<<<<<
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()
 */
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)NULL));

    /* "cuda/cuda.pyx":33286
 * 
 *     cdef ccuda.CUeglStreamConnection *cconn
 *     if conn is None:             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33288
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):             # <<<<<<<<<<<<<<
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_conn, __pyx_ptype_4cuda_4cuda_CUeglStreamConnection); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33289
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_conn, __pyx_n_s_getPtr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_pconn = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33290
 *     elif isinstance(conn, (CUeglStreamConnection)):
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn             # <<<<<<<<<<<<<<
 *     elif isinstance(conn, (int)):
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pconn); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33290, __pyx_L1_error)
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33288
 *     if conn is None:
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>NULL
 *     elif isinstance(conn, (CUeglStreamConnection)):             # <<<<<<<<<<<<<<
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33291
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 */
  __pyx_t_2 = PyInt_Check(__pyx_v_conn); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "cuda/cuda.pyx":33292
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))
 */
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_conn); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33292, __pyx_L1_error)
    __pyx_v_cconn = ((__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_6));

    /* "cuda/cuda.pyx":33291
 *         pconn = conn.getPtr()
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>pconn
 *     elif isinstance(conn, (int)):             # <<<<<<<<<<<<<<
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33294
 *         cconn = <ccuda.CUeglStreamConnection*><void_ptr>conn
 *     else:
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUeglFrame* ceglframe_ptr = eglframe._ptr if eglframe != None else NULL
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_conn))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Argument_conn_is_not_instance_of, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 33294, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":33296
 *         raise TypeError("Argument 'conn' is not instance of type (expected <class 'int, cuda.CUeglStreamConnection'>, found " + str(type(conn)))
 * 
 *     cdef ccuda.CUeglFrame* ceglframe_ptr = eglframe._ptr if eglframe != None else NULL             # <<<<<<<<<<<<<<
 *     err = ccuda.cuEGLStreamProducerReturnFrame(cconn, ceglframe_ptr, cpStream)
 *     return (CUresult(err),)
 */
  __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_eglframe), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33296, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 33296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {
    __pyx_t_7 = __pyx_v_eglframe->__pyx_base._ptr;
  } else {
    __pyx_t_7 = NULL;
  }
  __pyx_v_ceglframe_ptr = __pyx_t_7;

  /* "cuda/cuda.pyx":33297
 * 
 *     cdef ccuda.CUeglFrame* ceglframe_ptr = eglframe._ptr if eglframe != None else NULL
 *     err = ccuda.cuEGLStreamProducerReturnFrame(cconn, ceglframe_ptr, cpStream)             # <<<<<<<<<<<<<<
 *     return (CUresult(err),)
 * 
 */
  __pyx_t_8 = __pyx_f_4cuda_5ccuda_cuEGLStreamProducerReturnFrame(__pyx_v_cconn, __pyx_v_ceglframe_ptr, __pyx_v_cpStream); if (unlikely(__pyx_t_8 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 33297, __pyx_L1_error)
  __pyx_v_err = __pyx_t_8;

  /* "cuda/cuda.pyx":33298
 *     cdef ccuda.CUeglFrame* ceglframe_ptr = eglframe._ptr if eglframe != None else NULL
 *     err = ccuda.cuEGLStreamProducerReturnFrame(cconn, ceglframe_ptr, cpStream)
 *     return (CUresult(err),)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":33248
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerReturnFrame(conn, eglframe : CUeglFrame, pStream):             # <<<<<<<<<<<<<<
 *     """ Return the CUDA eglFrame to the EGLStream released by the consumer.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cuda.cuda.cuEGLStreamProducerReturnFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ppStream);
  __Pyx_XDECREF(__pyx_v_pconn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":33301
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned int mipLevel):             # <<<<<<<<<<<<<<
 *     """ Get an eglFrame through which to access a registered EGL graphics resource.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_771cuGraphicsResourceGetMappedEglFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_770cuGraphicsResourceGetMappedEglFrame[] = "cuGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned int mipLevel)\n Get an eglFrame through which to access a registered EGL graphics resource.\n\n    Returns in `*eglFrame` an eglFrame pointer through which the registered\n    graphics resource `resource` may be accessed. This API can only be\n    called for registered EGL graphics resources.\n\n    The :py:obj:`~.CUeglFrame` is defined as:\n\n    **View CUDA Toolkit Documentation for a C++ code example**\n\n    If `resource` is not registered then :py:obj:`~.CUDA_ERROR_NOT_MAPPED`\n    is returned.\n\n    Parameters\n    ----------\n    resource : :py:obj:`~.CUgraphicsResource`\n        None\n    index : unsigned int\n        None\n    mipLevel : unsigned int\n        None\n\n    Returns\n    -------\n    CUresult\n\n    eglFrame : :py:obj:`~.CUeglFrame`\n        None\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_771cuGraphicsResourceGetMappedEglFrame = {"cuGraphicsResourceGetMappedEglFrame", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_771cuGraphicsResourceGetMappedEglFrame, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_770cuGraphicsResourceGetMappedEglFrame};
static PyObject *__pyx_pw_4cuda_4cuda_771cuGraphicsResourceGetMappedEglFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_resource = 0;
  unsigned int __pyx_v_index;
  unsigned int __pyx_v_mipLevel;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsResourceGetMappedEglFrame (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_resource_2,&__pyx_n_s_index,&__pyx_n_s_mipLevel,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resource_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsResourceGetMappedEglFrame", 1, 3, 3, 1); __PYX_ERR(0, 33301, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mipLevel)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsResourceGetMappedEglFrame", 1, 3, 3, 2); __PYX_ERR(0, 33301, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphicsResourceGetMappedEglFrame") < 0)) __PYX_ERR(0, 33301, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_resource = values[0];
    __pyx_v_index = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_index == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 33301, __pyx_L3_error)
    __pyx_v_mipLevel = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_mipLevel == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 33301, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphicsResourceGetMappedEglFrame", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 33301, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsResourceGetMappedEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_770cuGraphicsResourceGetMappedEglFrame(__pyx_self, __pyx_v_resource, __pyx_v_index, __pyx_v_mipLevel);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_770cuGraphicsResourceGetMappedEglFrame(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_resource, unsigned int __pyx_v_index, unsigned int __pyx_v_mipLevel) {
  CUgraphicsResource __pyx_v_cresource;
  PyObject *__pyx_v_presource = NULL;
  struct __pyx_obj_4cuda_4cuda_CUeglFrame *__pyx_v_eglFrame = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1009)
  __Pyx_RefNannySetupContext("cuGraphicsResourceGetMappedEglFrame", 0);
  __Pyx_TraceCall("cuGraphicsResourceGetMappedEglFrame", __pyx_f[0], 33301, 0, __PYX_ERR(0, 33301, __pyx_L1_error));

  /* "cuda/cuda.pyx":33332
 *     """
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 */
  __pyx_t_1 = (__pyx_v_resource == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33333
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)
 */
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":33332
 *     """
 *     cdef ccuda.CUgraphicsResource cresource
 *     if resource is None:             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33334
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_resource, __pyx_ptype_4cuda_4cuda_CUgraphicsResource); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33335
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_resource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_presource = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33336
 *     elif isinstance(resource, (CUgraphicsResource)):
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource             # <<<<<<<<<<<<<<
 *     else:
 *         presource = int(CUgraphicsResource(resource))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presource); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33336, __pyx_L1_error)
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":33334
 *     if resource is None:
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>0
 *     elif isinstance(resource, (CUgraphicsResource)):             # <<<<<<<<<<<<<<
 *         presource = int(resource)
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33338
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 *     else:
 *         presource = int(CUgraphicsResource(resource))             # <<<<<<<<<<<<<<
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource), __pyx_v_resource); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_presource = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":33339
 *     else:
 *         presource = int(CUgraphicsResource(resource))
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource             # <<<<<<<<<<<<<<
 * 
 *     cdef CUeglFrame eglFrame = CUeglFrame()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_presource); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33339, __pyx_L1_error)
    __pyx_v_cresource = ((CUgraphicsResource)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":33341
 *         cresource = <ccuda.CUgraphicsResource><void_ptr>presource
 * 
 *     cdef CUeglFrame eglFrame = CUeglFrame()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphicsResourceGetMappedEglFrame(eglFrame._ptr, cresource, index, mipLevel)
 *     return (CUresult(err), eglFrame)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUeglFrame)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_eglFrame = ((struct __pyx_obj_4cuda_4cuda_CUeglFrame *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":33342
 * 
 *     cdef CUeglFrame eglFrame = CUeglFrame()
 *     err = ccuda.cuGraphicsResourceGetMappedEglFrame(eglFrame._ptr, cresource, index, mipLevel)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), eglFrame)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedEglFrame(__pyx_v_eglFrame->__pyx_base._ptr, __pyx_v_cresource, __pyx_v_index, __pyx_v_mipLevel); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 33342, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":33343
 *     cdef CUeglFrame eglFrame = CUeglFrame()
 *     err = ccuda.cuGraphicsResourceGetMappedEglFrame(eglFrame._ptr, cresource, index, mipLevel)
 *     return (CUresult(err), eglFrame)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_eglFrame));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_eglFrame));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_eglFrame));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":33301
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned int mipLevel):             # <<<<<<<<<<<<<<
 *     """ Get an eglFrame through which to access a registered EGL graphics resource.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsResourceGetMappedEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_presource);
  __Pyx_XDECREF((PyObject *)__pyx_v_eglFrame);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":33346
 * 
 * @cython.embedsignature(True)
 * def cuEventCreateFromEGLSync(eglSync, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Creates an event from EGLSync object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_773cuEventCreateFromEGLSync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_772cuEventCreateFromEGLSync[] = "cuEventCreateFromEGLSync(eglSync, unsigned int flags)\n Creates an event from EGLSync object.\n\n    Creates an event *phEvent from an EGLSyncKHR eglSync with the flags\n    specified via `flags`. Valid flags include:\n\n    - :py:obj:`~.CU_EVENT_DEFAULT`: Default event creation flag.\n\n    - :py:obj:`~.CU_EVENT_BLOCKING_SYNC`: Specifies that the created event\n      should use blocking synchronization. A CPU thread that uses\n      :py:obj:`~.cuEventSynchronize()` to wait on an event created with\n      this flag will block until the event has actually been completed.\n\n    Once the `eglSync` gets destroyed, :py:obj:`~.cuEventDestroy` is the\n    only API that can be invoked on the event.\n\n    :py:obj:`~.cuEventRecord` and TimingData are not supported for events\n    created from EGLSync.\n\n    The EGLSyncKHR is an opaque handle to an EGL sync object. typedef void*\n    EGLSyncKHR\n\n    Parameters\n    ----------\n    eglSync : :py:obj:`~.EGLSyncKHR`\n        Opaque handle to EGLSync object\n    flags : unsigned int\n        Event creation flags\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`\n    phEvent : :py:obj:`~.CUevent`\n        Returns newly created event\n\n    See Also\n    --------\n    :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventDestroy`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_773cuEventCreateFromEGLSync = {"cuEventCreateFromEGLSync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_773cuEventCreateFromEGLSync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_772cuEventCreateFromEGLSync};
static PyObject *__pyx_pw_4cuda_4cuda_773cuEventCreateFromEGLSync(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_eglSync = 0;
  unsigned int __pyx_v_flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuEventCreateFromEGLSync (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eglSync,&__pyx_n_s_flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eglSync)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuEventCreateFromEGLSync", 1, 2, 2, 1); __PYX_ERR(0, 33346, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuEventCreateFromEGLSync") < 0)) __PYX_ERR(0, 33346, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_eglSync = values[0];
    __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 33346, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuEventCreateFromEGLSync", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 33346, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuEventCreateFromEGLSync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_772cuEventCreateFromEGLSync(__pyx_self, __pyx_v_eglSync, __pyx_v_flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_772cuEventCreateFromEGLSync(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_eglSync, unsigned int __pyx_v_flags) {
  __pyx_t_4cuda_5ccuda_EGLSyncKHR __pyx_v_ceglSync;
  PyObject *__pyx_v_peglSync = NULL;
  struct __pyx_obj_4cuda_4cuda_CUevent *__pyx_v_phEvent = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1010)
  __Pyx_RefNannySetupContext("cuEventCreateFromEGLSync", 0);
  __Pyx_TraceCall("cuEventCreateFromEGLSync", __pyx_f[0], 33346, 0, __PYX_ERR(0, 33346, __pyx_L1_error));

  /* "cuda/cuda.pyx":33387
 *     """
 *     cdef ccuda.EGLSyncKHR ceglSync
 *     if eglSync is None:             # <<<<<<<<<<<<<<
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>0
 *     elif isinstance(eglSync, (EGLSyncKHR)):
 */
  __pyx_t_1 = (__pyx_v_eglSync == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33388
 *     cdef ccuda.EGLSyncKHR ceglSync
 *     if eglSync is None:
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(eglSync, (EGLSyncKHR)):
 *         peglSync = int(eglSync)
 */
    __pyx_v_ceglSync = ((__pyx_t_4cuda_5ccuda_EGLSyncKHR)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":33387
 *     """
 *     cdef ccuda.EGLSyncKHR ceglSync
 *     if eglSync is None:             # <<<<<<<<<<<<<<
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>0
 *     elif isinstance(eglSync, (EGLSyncKHR)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33389
 *     if eglSync is None:
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>0
 *     elif isinstance(eglSync, (EGLSyncKHR)):             # <<<<<<<<<<<<<<
 *         peglSync = int(eglSync)
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>peglSync
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_eglSync, __pyx_ptype_4cuda_4cuda_EGLSyncKHR); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33390
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>0
 *     elif isinstance(eglSync, (EGLSyncKHR)):
 *         peglSync = int(eglSync)             # <<<<<<<<<<<<<<
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>peglSync
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_eglSync); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_peglSync = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33391
 *     elif isinstance(eglSync, (EGLSyncKHR)):
 *         peglSync = int(eglSync)
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>peglSync             # <<<<<<<<<<<<<<
 *     else:
 *         peglSync = int(EGLSyncKHR(eglSync))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_peglSync); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33391, __pyx_L1_error)
    __pyx_v_ceglSync = ((__pyx_t_4cuda_5ccuda_EGLSyncKHR)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":33389
 *     if eglSync is None:
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>0
 *     elif isinstance(eglSync, (EGLSyncKHR)):             # <<<<<<<<<<<<<<
 *         peglSync = int(eglSync)
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>peglSync
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33393
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>peglSync
 *     else:
 *         peglSync = int(EGLSyncKHR(eglSync))             # <<<<<<<<<<<<<<
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>peglSync
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_EGLSyncKHR), __pyx_v_eglSync); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_peglSync = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":33394
 *     else:
 *         peglSync = int(EGLSyncKHR(eglSync))
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>peglSync             # <<<<<<<<<<<<<<
 * 
 *     cdef CUevent phEvent = CUevent()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_peglSync); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33394, __pyx_L1_error)
    __pyx_v_ceglSync = ((__pyx_t_4cuda_5ccuda_EGLSyncKHR)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":33396
 *         ceglSync = <ccuda.EGLSyncKHR><void_ptr>peglSync
 * 
 *     cdef CUevent phEvent = CUevent()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuEventCreateFromEGLSync(phEvent._ptr, ceglSync, flags)
 *     return (CUresult(err), phEvent)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_phEvent = ((struct __pyx_obj_4cuda_4cuda_CUevent *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":33397
 * 
 *     cdef CUevent phEvent = CUevent()
 *     err = ccuda.cuEventCreateFromEGLSync(phEvent._ptr, ceglSync, flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), phEvent)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuEventCreateFromEGLSync(__pyx_v_phEvent->_ptr, __pyx_v_ceglSync, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 33397, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":33398
 *     cdef CUevent phEvent = CUevent()
 *     err = ccuda.cuEventCreateFromEGLSync(phEvent._ptr, ceglSync, flags)
 *     return (CUresult(err), phEvent)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_phEvent));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_phEvent));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_phEvent));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":33346
 * 
 * @cython.embedsignature(True)
 * def cuEventCreateFromEGLSync(eglSync, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Creates an event from EGLSync object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuEventCreateFromEGLSync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_peglSync);
  __Pyx_XDECREF((PyObject *)__pyx_v_phEvent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":33401
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsGLRegisterBuffer(buffer, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Registers an OpenGL buffer object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_775cuGraphicsGLRegisterBuffer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_774cuGraphicsGLRegisterBuffer[] = "cuGraphicsGLRegisterBuffer(buffer, unsigned int Flags)\n Registers an OpenGL buffer object.\n\n    Registers the buffer object specified by `buffer` for access by CUDA. A\n    handle to the registered object is returned as `pCudaResource`. The\n    register flags `Flags` specify the intended usage, as follows:\n\n    - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_NONE`: Specifies no hints about\n      how this resource will be used. It is therefore assumed that this\n      resource will be read from and written to by CUDA. This is the\n      default value.\n\n    - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY`: Specifies that CUDA\n      will not write to this resource.\n\n    - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD`: Specifies that\n      CUDA will not read from this resource and will write over the entire\n      contents of the resource, so none of the data previously stored in\n      the resource will be preserved.\n\n    Parameters\n    ----------\n    buffer : :py:obj:`~.GLuint`\n        name of buffer object to be registered\n    Flags : unsigned int\n        Register flags\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`,\n    pCudaResource : :py:obj:`~.CUgraphicsResource`\n        Pointer to the returned object handle\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsResourceGetMappedPointer`, :py:obj:`~.cudaGraphicsGLRegisterBuffer`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_775cuGraphicsGLRegisterBuffer = {"cuGraphicsGLRegisterBuffer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_775cuGraphicsGLRegisterBuffer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_774cuGraphicsGLRegisterBuffer};
static PyObject *__pyx_pw_4cuda_4cuda_775cuGraphicsGLRegisterBuffer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_buffer = 0;
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsGLRegisterBuffer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buffer,&__pyx_n_s_Flags_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buffer)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsGLRegisterBuffer", 1, 2, 2, 1); __PYX_ERR(0, 33401, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphicsGLRegisterBuffer") < 0)) __PYX_ERR(0, 33401, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_buffer = values[0];
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 33401, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphicsGLRegisterBuffer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 33401, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsGLRegisterBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_774cuGraphicsGLRegisterBuffer(__pyx_self, __pyx_v_buffer, __pyx_v_Flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_774cuGraphicsGLRegisterBuffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_buffer, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_GLuint __pyx_v_cbuffer;
  PyObject *__pyx_v_pbuffer = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_pCudaResource = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1011)
  __Pyx_RefNannySetupContext("cuGraphicsGLRegisterBuffer", 0);
  __Pyx_TraceCall("cuGraphicsGLRegisterBuffer", __pyx_f[0], 33401, 0, __PYX_ERR(0, 33401, __pyx_L1_error));

  /* "cuda/cuda.pyx":33440
 *     """
 *     cdef ccuda.GLuint cbuffer
 *     if buffer is None:             # <<<<<<<<<<<<<<
 *         cbuffer = <ccuda.GLuint><void_ptr>0
 *     elif isinstance(buffer, (GLuint)):
 */
  __pyx_t_1 = (__pyx_v_buffer == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33441
 *     cdef ccuda.GLuint cbuffer
 *     if buffer is None:
 *         cbuffer = <ccuda.GLuint><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(buffer, (GLuint)):
 *         pbuffer = int(buffer)
 */
    __pyx_v_cbuffer = ((__pyx_t_4cuda_5ccuda_GLuint)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":33440
 *     """
 *     cdef ccuda.GLuint cbuffer
 *     if buffer is None:             # <<<<<<<<<<<<<<
 *         cbuffer = <ccuda.GLuint><void_ptr>0
 *     elif isinstance(buffer, (GLuint)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33442
 *     if buffer is None:
 *         cbuffer = <ccuda.GLuint><void_ptr>0
 *     elif isinstance(buffer, (GLuint)):             # <<<<<<<<<<<<<<
 *         pbuffer = int(buffer)
 *         cbuffer = <ccuda.GLuint><void_ptr>pbuffer
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_buffer, __pyx_ptype_4cuda_4cuda_GLuint); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33443
 *         cbuffer = <ccuda.GLuint><void_ptr>0
 *     elif isinstance(buffer, (GLuint)):
 *         pbuffer = int(buffer)             # <<<<<<<<<<<<<<
 *         cbuffer = <ccuda.GLuint><void_ptr>pbuffer
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_buffer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_pbuffer = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33444
 *     elif isinstance(buffer, (GLuint)):
 *         pbuffer = int(buffer)
 *         cbuffer = <ccuda.GLuint><void_ptr>pbuffer             # <<<<<<<<<<<<<<
 *     else:
 *         pbuffer = int(GLuint(buffer))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pbuffer); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33444, __pyx_L1_error)
    __pyx_v_cbuffer = ((__pyx_t_4cuda_5ccuda_GLuint)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":33442
 *     if buffer is None:
 *         cbuffer = <ccuda.GLuint><void_ptr>0
 *     elif isinstance(buffer, (GLuint)):             # <<<<<<<<<<<<<<
 *         pbuffer = int(buffer)
 *         cbuffer = <ccuda.GLuint><void_ptr>pbuffer
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33446
 *         cbuffer = <ccuda.GLuint><void_ptr>pbuffer
 *     else:
 *         pbuffer = int(GLuint(buffer))             # <<<<<<<<<<<<<<
 *         cbuffer = <ccuda.GLuint><void_ptr>pbuffer
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_GLuint), __pyx_v_buffer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_pbuffer = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":33447
 *     else:
 *         pbuffer = int(GLuint(buffer))
 *         cbuffer = <ccuda.GLuint><void_ptr>pbuffer             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pbuffer); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33447, __pyx_L1_error)
    __pyx_v_cbuffer = ((__pyx_t_4cuda_5ccuda_GLuint)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":33449
 *         cbuffer = <ccuda.GLuint><void_ptr>pbuffer
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphicsGLRegisterBuffer(pCudaResource._ptr, cbuffer, Flags)
 *     return (CUresult(err), pCudaResource)
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pCudaResource = ((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cuda/cuda.pyx":33450
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 *     err = ccuda.cuGraphicsGLRegisterBuffer(pCudaResource._ptr, cbuffer, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pCudaResource)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphicsGLRegisterBuffer(__pyx_v_pCudaResource->_ptr, __pyx_v_cbuffer, __pyx_v_Flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 33450, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":33451
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 *     err = ccuda.cuGraphicsGLRegisterBuffer(pCudaResource._ptr, cbuffer, Flags)
 *     return (CUresult(err), pCudaResource)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_pCudaResource));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pCudaResource));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pCudaResource));
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":33401
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsGLRegisterBuffer(buffer, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Registers an OpenGL buffer object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsGLRegisterBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pbuffer);
  __Pyx_XDECREF((PyObject *)__pyx_v_pCudaResource);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":33454
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsGLRegisterImage(image, target, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Register an OpenGL texture or renderbuffer object.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_777cuGraphicsGLRegisterImage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_776cuGraphicsGLRegisterImage[] = "cuGraphicsGLRegisterImage(image, target, unsigned int Flags)\n Register an OpenGL texture or renderbuffer object.\n\n    Registers the texture or renderbuffer object specified by `image` for\n    access by CUDA.   A handle to the registered object is returned as\n    `pCudaResource`.\n\n    `target` must match the type of the object, and must be one of\n    :py:obj:`~.GL_TEXTURE_2D`, :py:obj:`~.GL_TEXTURE_RECTANGLE`,\n    :py:obj:`~.GL_TEXTURE_CUBE_MAP`, :py:obj:`~.GL_TEXTURE_3D`,\n    :py:obj:`~.GL_TEXTURE_2D_ARRAY`, or :py:obj:`~.GL_RENDERBUFFER`.\n\n    The register flags `Flags` specify the intended usage, as follows:\n\n    - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_NONE`: Specifies no hints about\n      how this resource will be used. It is therefore assumed that this\n      resource will be read from and written to by CUDA. This is the\n      default value.\n\n    - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY`: Specifies that CUDA\n      will not write to this resource.\n\n    - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD`: Specifies that\n      CUDA will not read from this resource and will write over the entire\n      contents of the resource, so none of the data previously stored in\n      the resource will be preserved.\n\n    - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST`: Specifies that\n      CUDA will bind this resource to a surface reference.\n\n    - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER`: Specifies that\n      CUDA will perform texture gather operations on this resource.\n\n    The following image formats are supported. For brevity's sake, the list\n    is abbreviated. For ex., {GL_R, GL_RG} X {8, 16} would expand to the\n    following 4 formats {GL_R8, GL_R16, GL_RG8, GL_RG16} :\n\n    - GL_RED, GL_RG, GL_RGBA, GL_LUMINANCE, GL_ALPHA, GL_LUMINANCE_ALPHA,\n      GL_INTENSITY\n\n    - {GL_R, GL_RG, GL_RGBA} X {8, 16, 16F, 32F, 8UI, 16UI, 32UI, 8I, 16I,\n      32I}\n\n    - {GL_LUMINANCE, GL_ALPHA, GL_LUMINANCE_ALPHA, G""L_INTENSITY} X {8, 16,\n      16F_ARB, 32F_ARB, 8UI_EXT, 16UI_EXT, 32UI_EXT, 8I_EXT, 16I_EXT,\n      32I_EXT}\n\n    The following image classes are currently disallowed:\n\n    - Textures with borders\n\n    - Multisampled renderbuffers\n\n    Parameters\n    ----------\n    image : :py:obj:`~.GLuint`\n        name of texture or renderbuffer object to be registered\n    target : :py:obj:`~.GLenum`\n        Identifies the type of object specified by `image`\n    Flags : unsigned int\n        Register flags\n\n    Returns\n    -------\n    CUresult\n        :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`,\n    pCudaResource : :py:obj:`~.CUgraphicsResource`\n        Pointer to the returned object handle\n\n    See Also\n    --------\n    :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray`, :py:obj:`~.cudaGraphicsGLRegisterImage`\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_777cuGraphicsGLRegisterImage = {"cuGraphicsGLRegisterImage", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_777cuGraphicsGLRegisterImage, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_776cuGraphicsGLRegisterImage};
static PyObject *__pyx_pw_4cuda_4cuda_777cuGraphicsGLRegisterImage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_image = 0;
  PyObject *__pyx_v_target = 0;
  unsigned int __pyx_v_Flags;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGraphicsGLRegisterImage (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_image,&__pyx_n_s_target,&__pyx_n_s_Flags_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_image)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsGLRegisterImage", 1, 3, 3, 1); __PYX_ERR(0, 33454, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Flags_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGraphicsGLRegisterImage", 1, 3, 3, 2); __PYX_ERR(0, 33454, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGraphicsGLRegisterImage") < 0)) __PYX_ERR(0, 33454, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_image = values[0];
    __pyx_v_target = values[1];
    __pyx_v_Flags = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_Flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 33454, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGraphicsGLRegisterImage", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 33454, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4cuda_4cuda_776cuGraphicsGLRegisterImage(__pyx_self, __pyx_v_image, __pyx_v_target, __pyx_v_Flags);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_776cuGraphicsGLRegisterImage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_image, PyObject *__pyx_v_target, unsigned int __pyx_v_Flags) {
  __pyx_t_4cuda_5ccuda_GLenum __pyx_v_ctarget;
  PyObject *__pyx_v_ptarget = NULL;
  __pyx_t_4cuda_5ccuda_GLuint __pyx_v_cimage;
  PyObject *__pyx_v_pimage = NULL;
  struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *__pyx_v_pCudaResource = 0;
  CUresult __pyx_v_err;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_4cuda_4cuda_void_ptr __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1012)
  __Pyx_RefNannySetupContext("cuGraphicsGLRegisterImage", 0);
  __Pyx_TraceCall("cuGraphicsGLRegisterImage", __pyx_f[0], 33454, 0, __PYX_ERR(0, 33454, __pyx_L1_error));

  /* "cuda/cuda.pyx":33528
 *     """
 *     cdef ccuda.GLenum ctarget
 *     if target is None:             # <<<<<<<<<<<<<<
 *         ctarget = <ccuda.GLenum><void_ptr>0
 *     elif isinstance(target, (GLenum)):
 */
  __pyx_t_1 = (__pyx_v_target == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33529
 *     cdef ccuda.GLenum ctarget
 *     if target is None:
 *         ctarget = <ccuda.GLenum><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(target, (GLenum)):
 *         ptarget = int(target)
 */
    __pyx_v_ctarget = ((__pyx_t_4cuda_5ccuda_GLenum)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":33528
 *     """
 *     cdef ccuda.GLenum ctarget
 *     if target is None:             # <<<<<<<<<<<<<<
 *         ctarget = <ccuda.GLenum><void_ptr>0
 *     elif isinstance(target, (GLenum)):
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33530
 *     if target is None:
 *         ctarget = <ccuda.GLenum><void_ptr>0
 *     elif isinstance(target, (GLenum)):             # <<<<<<<<<<<<<<
 *         ptarget = int(target)
 *         ctarget = <ccuda.GLenum><void_ptr>ptarget
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_target, __pyx_ptype_4cuda_4cuda_GLenum); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33531
 *         ctarget = <ccuda.GLenum><void_ptr>0
 *     elif isinstance(target, (GLenum)):
 *         ptarget = int(target)             # <<<<<<<<<<<<<<
 *         ctarget = <ccuda.GLenum><void_ptr>ptarget
 *     else:
 */
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_target); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_ptarget = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33532
 *     elif isinstance(target, (GLenum)):
 *         ptarget = int(target)
 *         ctarget = <ccuda.GLenum><void_ptr>ptarget             # <<<<<<<<<<<<<<
 *     else:
 *         ptarget = int(GLenum(target))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ptarget); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33532, __pyx_L1_error)
    __pyx_v_ctarget = ((__pyx_t_4cuda_5ccuda_GLenum)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":33530
 *     if target is None:
 *         ctarget = <ccuda.GLenum><void_ptr>0
 *     elif isinstance(target, (GLenum)):             # <<<<<<<<<<<<<<
 *         ptarget = int(target)
 *         ctarget = <ccuda.GLenum><void_ptr>ptarget
 */
    goto __pyx_L3;
  }

  /* "cuda/cuda.pyx":33534
 *         ctarget = <ccuda.GLenum><void_ptr>ptarget
 *     else:
 *         ptarget = int(GLenum(target))             # <<<<<<<<<<<<<<
 *         ctarget = <ccuda.GLenum><void_ptr>ptarget
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_GLenum), __pyx_v_target); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ptarget = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":33535
 *     else:
 *         ptarget = int(GLenum(target))
 *         ctarget = <ccuda.GLenum><void_ptr>ptarget             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.GLuint cimage
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_ptarget); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33535, __pyx_L1_error)
    __pyx_v_ctarget = ((__pyx_t_4cuda_5ccuda_GLenum)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L3:;

  /* "cuda/cuda.pyx":33538
 * 
 *     cdef ccuda.GLuint cimage
 *     if image is None:             # <<<<<<<<<<<<<<
 *         cimage = <ccuda.GLuint><void_ptr>0
 *     elif isinstance(image, (GLuint)):
 */
  __pyx_t_1 = (__pyx_v_image == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33539
 *     cdef ccuda.GLuint cimage
 *     if image is None:
 *         cimage = <ccuda.GLuint><void_ptr>0             # <<<<<<<<<<<<<<
 *     elif isinstance(image, (GLuint)):
 *         pimage = int(image)
 */
    __pyx_v_cimage = ((__pyx_t_4cuda_5ccuda_GLuint)((__pyx_t_4cuda_4cuda_void_ptr)0));

    /* "cuda/cuda.pyx":33538
 * 
 *     cdef ccuda.GLuint cimage
 *     if image is None:             # <<<<<<<<<<<<<<
 *         cimage = <ccuda.GLuint><void_ptr>0
 *     elif isinstance(image, (GLuint)):
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33540
 *     if image is None:
 *         cimage = <ccuda.GLuint><void_ptr>0
 *     elif isinstance(image, (GLuint)):             # <<<<<<<<<<<<<<
 *         pimage = int(image)
 *         cimage = <ccuda.GLuint><void_ptr>pimage
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_image, __pyx_ptype_4cuda_4cuda_GLuint); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cuda/cuda.pyx":33541
 *         cimage = <ccuda.GLuint><void_ptr>0
 *     elif isinstance(image, (GLuint)):
 *         pimage = int(image)             # <<<<<<<<<<<<<<
 *         cimage = <ccuda.GLuint><void_ptr>pimage
 *     else:
 */
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_image); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_pimage = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cuda/cuda.pyx":33542
 *     elif isinstance(image, (GLuint)):
 *         pimage = int(image)
 *         cimage = <ccuda.GLuint><void_ptr>pimage             # <<<<<<<<<<<<<<
 *     else:
 *         pimage = int(GLuint(image))
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pimage); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33542, __pyx_L1_error)
    __pyx_v_cimage = ((__pyx_t_4cuda_5ccuda_GLuint)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));

    /* "cuda/cuda.pyx":33540
 *     if image is None:
 *         cimage = <ccuda.GLuint><void_ptr>0
 *     elif isinstance(image, (GLuint)):             # <<<<<<<<<<<<<<
 *         pimage = int(image)
 *         cimage = <ccuda.GLuint><void_ptr>pimage
 */
    goto __pyx_L4;
  }

  /* "cuda/cuda.pyx":33544
 *         cimage = <ccuda.GLuint><void_ptr>pimage
 *     else:
 *         pimage = int(GLuint(image))             # <<<<<<<<<<<<<<
 *         cimage = <ccuda.GLuint><void_ptr>pimage
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cuda_4cuda_GLuint), __pyx_v_image); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_pimage = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33545
 *     else:
 *         pimage = int(GLuint(image))
 *         cimage = <ccuda.GLuint><void_ptr>pimage             # <<<<<<<<<<<<<<
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_pimage); if (unlikely((__pyx_t_4 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 33545, __pyx_L1_error)
    __pyx_v_cimage = ((__pyx_t_4cuda_5ccuda_GLuint)((__pyx_t_4cuda_4cuda_void_ptr)__pyx_t_4));
  }
  __pyx_L4:;

  /* "cuda/cuda.pyx":33547
 *         cimage = <ccuda.GLuint><void_ptr>pimage
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGraphicsGLRegisterImage(pCudaResource._ptr, cimage, ctarget, Flags)
 *     return (CUresult(err), pCudaResource)
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_pCudaResource = ((struct __pyx_obj_4cuda_4cuda_CUgraphicsResource *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":33548
 * 
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 *     err = ccuda.cuGraphicsGLRegisterImage(pCudaResource._ptr, cimage, ctarget, Flags)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pCudaResource)
 * 
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGraphicsGLRegisterImage(__pyx_v_pCudaResource->_ptr, __pyx_v_cimage, __pyx_v_ctarget, __pyx_v_Flags); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 33548, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":33549
 *     cdef CUgraphicsResource pCudaResource = CUgraphicsResource()
 *     err = ccuda.cuGraphicsGLRegisterImage(pCudaResource._ptr, cimage, ctarget, Flags)
 *     return (CUresult(err), pCudaResource)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_pCudaResource));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_pCudaResource));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_pCudaResource));
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":33454
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsGLRegisterImage(image, target, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Register an OpenGL texture or renderbuffer object.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cuda.cuda.cuGraphicsGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ptarget);
  __Pyx_XDECREF(__pyx_v_pimage);
  __Pyx_XDECREF((PyObject *)__pyx_v_pCudaResource);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":33552
 * 
 * @cython.embedsignature(True)
 * def cuGLGetDevices(unsigned int cudaDeviceCount, deviceList not None : CUGLDeviceList):             # <<<<<<<<<<<<<<
 *     """ Gets the CUDA devices associated with the current OpenGL context.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_779cuGLGetDevices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4cuda_4cuda_778cuGLGetDevices[] = "cuGLGetDevices(unsigned int cudaDeviceCount, deviceList: CUGLDeviceList)\n Gets the CUDA devices associated with the current OpenGL context.\n\n    Returns in `*pCudaDeviceCount` the number of CUDA-compatible devices\n    corresponding to the current OpenGL context. Also returns in\n    `*pCudaDevices` at most cudaDeviceCount of the CUDA-compatible devices\n    corresponding to the current OpenGL context. If any of the GPUs being\n    used by the current OpenGL context are not CUDA capable then the call\n    will return CUDA_ERROR_NO_DEVICE.\n\n    The `deviceList` argument may be any of the following:\n    CU_GL_DEVICE_LIST_ALL: Query all devices used by the current OpenGL\n    context. CU_GL_DEVICE_LIST_CURRENT_FRAME: Query the devices used by the\n    current OpenGL context to render the current frame (in SLI).\n    CU_GL_DEVICE_LIST_NEXT_FRAME: Query the devices used by the current\n    OpenGL context to render the next frame (in SLI). Note that this is a\n    prediction, it can't be guaranteed that this is correct in all cases.\n\n    Parameters\n    ----------\n    cudaDeviceCount : unsigned int\n        The size of the output device array pCudaDevices.\n    deviceList : CUGLDeviceList\n        The set of devices to return.\n\n    Returns\n    -------\n    CUresult\n        CUDA_SUCCESS\n        CUDA_ERROR_NO_DEVICE\n        CUDA_ERROR_INVALID_VALUE\n        CUDA_ERROR_INVALID_CONTEXT\n        CUDA_ERROR_INVALID_GRAPHICS_CONTEXT\n    pCudaDeviceCount : unsigned int\n        Returned number of CUDA devices.\n    pCudaDevices : List[CUdevice]\n        Returned CUDA devices.\n\n    See Also\n    --------\n    ~.cudaGLGetDevices\n\n    Notes\n    -----\n    This function is not supported on Mac OS X.\n\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_779cuGLGetDevices = {"cuGLGetDevices", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cuda_4cuda_779cuGLGetDevices, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cuda_4cuda_778cuGLGetDevices};
static PyObject *__pyx_pw_4cuda_4cuda_779cuGLGetDevices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_cudaDeviceCount;
  PyObject *__pyx_v_deviceList = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cuGLGetDevices (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cudaDeviceCount,&__pyx_n_s_deviceList,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cudaDeviceCount)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_deviceList)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cuGLGetDevices", 1, 2, 2, 1); __PYX_ERR(0, 33552, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cuGLGetDevices") < 0)) __PYX_ERR(0, 33552, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_cudaDeviceCount = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_cudaDeviceCount == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 33552, __pyx_L3_error)
    __pyx_v_deviceList = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cuGLGetDevices", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 33552, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cuda.cuda.cuGLGetDevices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_deviceList) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "deviceList"); __PYX_ERR(0, 33552, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_4cuda_4cuda_778cuGLGetDevices(__pyx_self, __pyx_v_cudaDeviceCount, __pyx_v_deviceList);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_778cuGLGetDevices(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_cudaDeviceCount, PyObject *__pyx_v_deviceList) {
  unsigned int __pyx_v_pCudaDeviceCount;
  CUdevice *__pyx_v_cpCudaDevices;
  PyObject *__pyx_v_pypCudaDevices = NULL;
  __pyx_t_4cuda_5ccuda_CUGLDeviceList __pyx_v_cdeviceList;
  CUresult __pyx_v_err;
  unsigned int __pyx_10genexpr119__pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __pyx_t_4cuda_5ccuda_CUGLDeviceList __pyx_t_5;
  CUresult __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  unsigned int __pyx_t_8;
  unsigned int __pyx_t_9;
  unsigned int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1013)
  __Pyx_RefNannySetupContext("cuGLGetDevices", 0);
  __Pyx_TraceCall("cuGLGetDevices", __pyx_f[0], 33552, 0, __PYX_ERR(0, 33552, __pyx_L1_error));

  /* "cuda/cuda.pyx":33599
 * 
 *     """
 *     cdef unsigned int pCudaDeviceCount = 0             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUdevice* cpCudaDevices = NULL
 *     pypCudaDevices = []
 */
  __pyx_v_pCudaDeviceCount = 0;

  /* "cuda/cuda.pyx":33600
 *     """
 *     cdef unsigned int pCudaDeviceCount = 0
 *     cdef ccuda.CUdevice* cpCudaDevices = NULL             # <<<<<<<<<<<<<<
 *     pypCudaDevices = []
 *     if cudaDeviceCount != 0:
 */
  __pyx_v_cpCudaDevices = NULL;

  /* "cuda/cuda.pyx":33601
 *     cdef unsigned int pCudaDeviceCount = 0
 *     cdef ccuda.CUdevice* cpCudaDevices = NULL
 *     pypCudaDevices = []             # <<<<<<<<<<<<<<
 *     if cudaDeviceCount != 0:
 *         cpCudaDevices = <ccuda.CUdevice*>calloc(cudaDeviceCount, sizeof(ccuda.CUdevice))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pypCudaDevices = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":33602
 *     cdef ccuda.CUdevice* cpCudaDevices = NULL
 *     pypCudaDevices = []
 *     if cudaDeviceCount != 0:             # <<<<<<<<<<<<<<
 *         cpCudaDevices = <ccuda.CUdevice*>calloc(cudaDeviceCount, sizeof(ccuda.CUdevice))
 *         if cpCudaDevices is NULL:
 */
  __pyx_t_2 = ((__pyx_v_cudaDeviceCount != 0) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33603
 *     pypCudaDevices = []
 *     if cudaDeviceCount != 0:
 *         cpCudaDevices = <ccuda.CUdevice*>calloc(cudaDeviceCount, sizeof(ccuda.CUdevice))             # <<<<<<<<<<<<<<
 *         if cpCudaDevices is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(cudaDeviceCount) + 'x' + str(sizeof(ccuda.CUdevice)))
 */
    __pyx_v_cpCudaDevices = ((CUdevice *)calloc(__pyx_v_cudaDeviceCount, (sizeof(CUdevice))));

    /* "cuda/cuda.pyx":33604
 *     if cudaDeviceCount != 0:
 *         cpCudaDevices = <ccuda.CUdevice*>calloc(cudaDeviceCount, sizeof(ccuda.CUdevice))
 *         if cpCudaDevices is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(cudaDeviceCount) + 'x' + str(sizeof(ccuda.CUdevice)))
 *     cdef ccuda.CUGLDeviceList cdeviceList = deviceList.value
 */
    __pyx_t_2 = ((__pyx_v_cpCudaDevices == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "cuda/cuda.pyx":33605
 *         cpCudaDevices = <ccuda.CUdevice*>calloc(cudaDeviceCount, sizeof(ccuda.CUdevice))
 *         if cpCudaDevices is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(cudaDeviceCount) + 'x' + str(sizeof(ccuda.CUdevice)))             # <<<<<<<<<<<<<<
 *     cdef ccuda.CUGLDeviceList cdeviceList = deviceList.value
 *     err = ccuda.cuGLGetDevices(&pCudaDeviceCount, cpCudaDevices, cudaDeviceCount, cdeviceList)
 */
      __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_cudaDeviceCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUdevice))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_MemoryError, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 33605, __pyx_L1_error)

      /* "cuda/cuda.pyx":33604
 *     if cudaDeviceCount != 0:
 *         cpCudaDevices = <ccuda.CUdevice*>calloc(cudaDeviceCount, sizeof(ccuda.CUdevice))
 *         if cpCudaDevices is NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(cudaDeviceCount) + 'x' + str(sizeof(ccuda.CUdevice)))
 *     cdef ccuda.CUGLDeviceList cdeviceList = deviceList.value
 */
    }

    /* "cuda/cuda.pyx":33602
 *     cdef ccuda.CUdevice* cpCudaDevices = NULL
 *     pypCudaDevices = []
 *     if cudaDeviceCount != 0:             # <<<<<<<<<<<<<<
 *         cpCudaDevices = <ccuda.CUdevice*>calloc(cudaDeviceCount, sizeof(ccuda.CUdevice))
 *         if cpCudaDevices is NULL:
 */
  }

  /* "cuda/cuda.pyx":33606
 *         if cpCudaDevices is NULL:
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(cudaDeviceCount) + 'x' + str(sizeof(ccuda.CUdevice)))
 *     cdef ccuda.CUGLDeviceList cdeviceList = deviceList.value             # <<<<<<<<<<<<<<
 *     err = ccuda.cuGLGetDevices(&pCudaDeviceCount, cpCudaDevices, cudaDeviceCount, cdeviceList)
 *     if CUresult(err) == CUresult(0):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_deviceList, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = ((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)__Pyx_PyInt_As_enum____pyx_t_4cuda_5ccuda_CUGLDeviceList_enum(__pyx_t_4)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 33606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_cdeviceList = __pyx_t_5;

  /* "cuda/cuda.pyx":33607
 *             raise MemoryError('Failed to allocate length x size memory: ' + str(cudaDeviceCount) + 'x' + str(sizeof(ccuda.CUdevice)))
 *     cdef ccuda.CUGLDeviceList cdeviceList = deviceList.value
 *     err = ccuda.cuGLGetDevices(&pCudaDeviceCount, cpCudaDevices, cudaDeviceCount, cdeviceList)             # <<<<<<<<<<<<<<
 *     if CUresult(err) == CUresult(0):
 *         pypCudaDevices = [CUdevice(init_value=<void_ptr>cpCudaDevices[idx]) for idx in range(cudaDeviceCount)]
 */
  __pyx_t_6 = __pyx_f_4cuda_5ccuda_cuGLGetDevices((&__pyx_v_pCudaDeviceCount), __pyx_v_cpCudaDevices, __pyx_v_cudaDeviceCount, __pyx_v_cdeviceList); if (unlikely(__pyx_t_6 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 33607, __pyx_L1_error)
  __pyx_v_err = __pyx_t_6;

  /* "cuda/cuda.pyx":33608
 *     cdef ccuda.CUGLDeviceList cdeviceList = deviceList.value
 *     err = ccuda.cuGLGetDevices(&pCudaDeviceCount, cpCudaDevices, cudaDeviceCount, cdeviceList)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pypCudaDevices = [CUdevice(init_value=<void_ptr>cpCudaDevices[idx]) for idx in range(cudaDeviceCount)]
 *     if cpCudaDevices is not NULL:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_0);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33609
 *     err = ccuda.cuGLGetDevices(&pCudaDeviceCount, cpCudaDevices, cudaDeviceCount, cdeviceList)
 *     if CUresult(err) == CUresult(0):
 *         pypCudaDevices = [CUdevice(init_value=<void_ptr>cpCudaDevices[idx]) for idx in range(cudaDeviceCount)]             # <<<<<<<<<<<<<<
 *     if cpCudaDevices is not NULL:
 *         free(cpCudaDevices)
 */
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = __pyx_v_cudaDeviceCount;
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_10genexpr119__pyx_v_idx = __pyx_t_10;
        __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33609, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_4cuda_void_ptr)(__pyx_v_cpCudaDevices[__pyx_10genexpr119__pyx_v_idx]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33609, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_init_value, __pyx_t_4) < 0) __PYX_ERR(0, 33609, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33609, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 33609, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_pypCudaDevices, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cuda/cuda.pyx":33608
 *     cdef ccuda.CUGLDeviceList cdeviceList = deviceList.value
 *     err = ccuda.cuGLGetDevices(&pCudaDeviceCount, cpCudaDevices, cudaDeviceCount, cdeviceList)
 *     if CUresult(err) == CUresult(0):             # <<<<<<<<<<<<<<
 *         pypCudaDevices = [CUdevice(init_value=<void_ptr>cpCudaDevices[idx]) for idx in range(cudaDeviceCount)]
 *     if cpCudaDevices is not NULL:
 */
  }

  /* "cuda/cuda.pyx":33610
 *     if CUresult(err) == CUresult(0):
 *         pypCudaDevices = [CUdevice(init_value=<void_ptr>cpCudaDevices[idx]) for idx in range(cudaDeviceCount)]
 *     if cpCudaDevices is not NULL:             # <<<<<<<<<<<<<<
 *         free(cpCudaDevices)
 *     return (CUresult(err), pCudaDeviceCount, pypCudaDevices)
 */
  __pyx_t_2 = ((__pyx_v_cpCudaDevices != NULL) != 0);
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33611
 *         pypCudaDevices = [CUdevice(init_value=<void_ptr>cpCudaDevices[idx]) for idx in range(cudaDeviceCount)]
 *     if cpCudaDevices is not NULL:
 *         free(cpCudaDevices)             # <<<<<<<<<<<<<<
 *     return (CUresult(err), pCudaDeviceCount, pypCudaDevices)
 * 
 */
    free(__pyx_v_cpCudaDevices);

    /* "cuda/cuda.pyx":33610
 *     if CUresult(err) == CUresult(0):
 *         pypCudaDevices = [CUdevice(init_value=<void_ptr>cpCudaDevices[idx]) for idx in range(cudaDeviceCount)]
 *     if cpCudaDevices is not NULL:             # <<<<<<<<<<<<<<
 *         free(cpCudaDevices)
 *     return (CUresult(err), pCudaDeviceCount, pypCudaDevices)
 */
  }

  /* "cuda/cuda.pyx":33612
 *     if cpCudaDevices is not NULL:
 *         free(cpCudaDevices)
 *     return (CUresult(err), pCudaDeviceCount, pypCudaDevices)             # <<<<<<<<<<<<<<
 * 
 * @cython.embedsignature(True)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyInt_From_enum__cudaError_enum(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_pCudaDeviceCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __Pyx_INCREF(__pyx_v_pypCudaDevices);
  __Pyx_GIVEREF(__pyx_v_pypCudaDevices);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_pypCudaDevices);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cuda/cuda.pyx":33552
 * 
 * @cython.embedsignature(True)
 * def cuGLGetDevices(unsigned int cudaDeviceCount, deviceList not None : CUGLDeviceList):             # <<<<<<<<<<<<<<
 *     """ Gets the CUDA devices associated with the current OpenGL context.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cuda.cuda.cuGLGetDevices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pypCudaDevices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cuda/cuda.pyx":33615
 * 
 * @cython.embedsignature(True)
 * def sizeof(objType):             # <<<<<<<<<<<<<<
 *     """ Returns the size of provided CUDA Python structure in bytes
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_4cuda_4cuda_781sizeof(PyObject *__pyx_self, PyObject *__pyx_v_objType); /*proto*/
static char __pyx_doc_4cuda_4cuda_780sizeof[] = "sizeof(objType)\n Returns the size of provided CUDA Python structure in bytes\n\n    Parameters\n    ----------\n    objType : Any\n        CUDA Python object\n\n    Returns\n    -------\n    lowered_name : int\n        The size of `objType` in bytes\n    ";
static PyMethodDef __pyx_mdef_4cuda_4cuda_781sizeof = {"sizeof", (PyCFunction)__pyx_pw_4cuda_4cuda_781sizeof, METH_O, __pyx_doc_4cuda_4cuda_780sizeof};
static PyObject *__pyx_pw_4cuda_4cuda_781sizeof(PyObject *__pyx_self, PyObject *__pyx_v_objType) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sizeof (wrapper)", 0);
  __pyx_r = __pyx_pf_4cuda_4cuda_780sizeof(__pyx_self, ((PyObject *)__pyx_v_objType));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4cuda_4cuda_780sizeof(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objType) {
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceFrameInit(__pyx_codeobj__1014)
  __Pyx_RefNannySetupContext("sizeof", 0);
  __Pyx_TraceCall("sizeof", __pyx_f[0], 33615, 0, __PYX_ERR(0, 33615, __pyx_L1_error));

  /* "cuda/cuda.pyx":33628
 *         The size of `objType` in bytes
 *     """
 *     if objType == CUuuid_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUuuid_st)
 *     if objType == CUipcEventHandle_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUuuid_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33628, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33629
 *     """
 *     if objType == CUuuid_st:
 *         return sizeof(ccuda.CUuuid_st)             # <<<<<<<<<<<<<<
 *     if objType == CUipcEventHandle_st:
 *         return sizeof(ccuda.CUipcEventHandle_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUuuid_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33628
 *         The size of `objType` in bytes
 *     """
 *     if objType == CUuuid_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUuuid_st)
 *     if objType == CUipcEventHandle_st:
 */
  }

  /* "cuda/cuda.pyx":33630
 *     if objType == CUuuid_st:
 *         return sizeof(ccuda.CUuuid_st)
 *     if objType == CUipcEventHandle_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUipcEventHandle_st)
 *     if objType == CUipcMemHandle_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUipcEventHandle_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33630, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33631
 *         return sizeof(ccuda.CUuuid_st)
 *     if objType == CUipcEventHandle_st:
 *         return sizeof(ccuda.CUipcEventHandle_st)             # <<<<<<<<<<<<<<
 *     if objType == CUipcMemHandle_st:
 *         return sizeof(ccuda.CUipcMemHandle_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUipcEventHandle_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33630
 *     if objType == CUuuid_st:
 *         return sizeof(ccuda.CUuuid_st)
 *     if objType == CUipcEventHandle_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUipcEventHandle_st)
 *     if objType == CUipcMemHandle_st:
 */
  }

  /* "cuda/cuda.pyx":33632
 *     if objType == CUipcEventHandle_st:
 *         return sizeof(ccuda.CUipcEventHandle_st)
 *     if objType == CUipcMemHandle_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUipcMemHandle_st)
 *     if objType == CUstreamBatchMemOpParams_union:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUipcMemHandle_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33632, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33633
 *         return sizeof(ccuda.CUipcEventHandle_st)
 *     if objType == CUipcMemHandle_st:
 *         return sizeof(ccuda.CUipcMemHandle_st)             # <<<<<<<<<<<<<<
 *     if objType == CUstreamBatchMemOpParams_union:
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_union)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUipcMemHandle_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33632
 *     if objType == CUipcEventHandle_st:
 *         return sizeof(ccuda.CUipcEventHandle_st)
 *     if objType == CUipcMemHandle_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUipcMemHandle_st)
 *     if objType == CUstreamBatchMemOpParams_union:
 */
  }

  /* "cuda/cuda.pyx":33634
 *     if objType == CUipcMemHandle_st:
 *         return sizeof(ccuda.CUipcMemHandle_st)
 *     if objType == CUstreamBatchMemOpParams_union:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_union)
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams_union), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33634, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33635
 *         return sizeof(ccuda.CUipcMemHandle_st)
 *     if objType == CUstreamBatchMemOpParams_union:
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_union)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(union CUstreamBatchMemOpParams_union))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33634
 *     if objType == CUipcMemHandle_st:
 *         return sizeof(ccuda.CUipcMemHandle_st)
 *     if objType == CUstreamBatchMemOpParams_union:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_union)
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_st:
 */
  }

  /* "cuda/cuda.pyx":33636
 *     if objType == CUstreamBatchMemOpParams_union:
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_union)
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st)
 *     if objType == CUdevprop_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33636, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33636, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33637
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_union)
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st)             # <<<<<<<<<<<<<<
 *     if objType == CUdevprop_st:
 *         return sizeof(ccuda.CUdevprop_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_BATCH_MEM_OP_NODE_PARAMS_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33636
 *     if objType == CUstreamBatchMemOpParams_union:
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_union)
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st)
 *     if objType == CUdevprop_st:
 */
  }

  /* "cuda/cuda.pyx":33638
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st)
 *     if objType == CUdevprop_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdevprop_st)
 *     if objType == CUaccessPolicyWindow_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevprop_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33638, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33639
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st)
 *     if objType == CUdevprop_st:
 *         return sizeof(ccuda.CUdevprop_st)             # <<<<<<<<<<<<<<
 *     if objType == CUaccessPolicyWindow_st:
 *         return sizeof(ccuda.CUaccessPolicyWindow_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUdevprop_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33638
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st)
 *     if objType == CUdevprop_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdevprop_st)
 *     if objType == CUaccessPolicyWindow_st:
 */
  }

  /* "cuda/cuda.pyx":33640
 *     if objType == CUdevprop_st:
 *         return sizeof(ccuda.CUdevprop_st)
 *     if objType == CUaccessPolicyWindow_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUaccessPolicyWindow_st)
 *     if objType == CUDA_KERNEL_NODE_PARAMS_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33640, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33641
 *         return sizeof(ccuda.CUdevprop_st)
 *     if objType == CUaccessPolicyWindow_st:
 *         return sizeof(ccuda.CUaccessPolicyWindow_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_KERNEL_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUaccessPolicyWindow_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33640
 *     if objType == CUdevprop_st:
 *         return sizeof(ccuda.CUdevprop_st)
 *     if objType == CUaccessPolicyWindow_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUaccessPolicyWindow_st)
 *     if objType == CUDA_KERNEL_NODE_PARAMS_st:
 */
  }

  /* "cuda/cuda.pyx":33642
 *     if objType == CUaccessPolicyWindow_st:
 *         return sizeof(ccuda.CUaccessPolicyWindow_st)
 *     if objType == CUDA_KERNEL_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_st)
 *     if objType == CUDA_MEMSET_NODE_PARAMS_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33642, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33643
 *         return sizeof(ccuda.CUaccessPolicyWindow_st)
 *     if objType == CUDA_KERNEL_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEMSET_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_KERNEL_NODE_PARAMS_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33642
 *     if objType == CUaccessPolicyWindow_st:
 *         return sizeof(ccuda.CUaccessPolicyWindow_st)
 *     if objType == CUDA_KERNEL_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_st)
 *     if objType == CUDA_MEMSET_NODE_PARAMS_st:
 */
  }

  /* "cuda/cuda.pyx":33644
 *     if objType == CUDA_KERNEL_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_st)
 *     if objType == CUDA_MEMSET_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_st)
 *     if objType == CUDA_HOST_NODE_PARAMS_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33644, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33645
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_st)
 *     if objType == CUDA_MEMSET_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_HOST_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_MEMSET_NODE_PARAMS_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33644
 *     if objType == CUDA_KERNEL_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_st)
 *     if objType == CUDA_MEMSET_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_st)
 *     if objType == CUDA_HOST_NODE_PARAMS_st:
 */
  }

  /* "cuda/cuda.pyx":33646
 *     if objType == CUDA_MEMSET_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_st)
 *     if objType == CUDA_HOST_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_st)
 *     if objType == CUlaunchAttributeValue_union:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33646, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33647
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_st)
 *     if objType == CUDA_HOST_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_st)             # <<<<<<<<<<<<<<
 *     if objType == CUlaunchAttributeValue_union:
 *         return sizeof(ccuda.CUlaunchAttributeValue_union)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_HOST_NODE_PARAMS_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33646
 *     if objType == CUDA_MEMSET_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_st)
 *     if objType == CUDA_HOST_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_st)
 *     if objType == CUlaunchAttributeValue_union:
 */
  }

  /* "cuda/cuda.pyx":33648
 *     if objType == CUDA_HOST_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_st)
 *     if objType == CUlaunchAttributeValue_union:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlaunchAttributeValue_union)
 *     if objType == CUlaunchAttribute_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue_union), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33648, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33649
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_st)
 *     if objType == CUlaunchAttributeValue_union:
 *         return sizeof(ccuda.CUlaunchAttributeValue_union)             # <<<<<<<<<<<<<<
 *     if objType == CUlaunchAttribute_st:
 *         return sizeof(ccuda.CUlaunchAttribute_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(union CUlaunchAttributeValue_union))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33648
 *     if objType == CUDA_HOST_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_st)
 *     if objType == CUlaunchAttributeValue_union:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlaunchAttributeValue_union)
 *     if objType == CUlaunchAttribute_st:
 */
  }

  /* "cuda/cuda.pyx":33650
 *     if objType == CUlaunchAttributeValue_union:
 *         return sizeof(ccuda.CUlaunchAttributeValue_union)
 *     if objType == CUlaunchAttribute_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlaunchAttribute_st)
 *     if objType == CUlaunchConfig_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUlaunchAttribute_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33650, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33651
 *         return sizeof(ccuda.CUlaunchAttributeValue_union)
 *     if objType == CUlaunchAttribute_st:
 *         return sizeof(ccuda.CUlaunchAttribute_st)             # <<<<<<<<<<<<<<
 *     if objType == CUlaunchConfig_st:
 *         return sizeof(ccuda.CUlaunchConfig_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUlaunchAttribute_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33650
 *     if objType == CUlaunchAttributeValue_union:
 *         return sizeof(ccuda.CUlaunchAttributeValue_union)
 *     if objType == CUlaunchAttribute_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlaunchAttribute_st)
 *     if objType == CUlaunchConfig_st:
 */
  }

  /* "cuda/cuda.pyx":33652
 *     if objType == CUlaunchAttribute_st:
 *         return sizeof(ccuda.CUlaunchAttribute_st)
 *     if objType == CUlaunchConfig_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlaunchConfig_st)
 *     if objType == CUexecAffinitySmCount_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUlaunchConfig_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33652, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33653
 *         return sizeof(ccuda.CUlaunchAttribute_st)
 *     if objType == CUlaunchConfig_st:
 *         return sizeof(ccuda.CUlaunchConfig_st)             # <<<<<<<<<<<<<<
 *     if objType == CUexecAffinitySmCount_st:
 *         return sizeof(ccuda.CUexecAffinitySmCount_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUlaunchConfig_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33652
 *     if objType == CUlaunchAttribute_st:
 *         return sizeof(ccuda.CUlaunchAttribute_st)
 *     if objType == CUlaunchConfig_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlaunchConfig_st)
 *     if objType == CUexecAffinitySmCount_st:
 */
  }

  /* "cuda/cuda.pyx":33654
 *     if objType == CUlaunchConfig_st:
 *         return sizeof(ccuda.CUlaunchConfig_st)
 *     if objType == CUexecAffinitySmCount_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexecAffinitySmCount_st)
 *     if objType == CUexecAffinityParam_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33654, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33655
 *         return sizeof(ccuda.CUlaunchConfig_st)
 *     if objType == CUexecAffinitySmCount_st:
 *         return sizeof(ccuda.CUexecAffinitySmCount_st)             # <<<<<<<<<<<<<<
 *     if objType == CUexecAffinityParam_st:
 *         return sizeof(ccuda.CUexecAffinityParam_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUexecAffinitySmCount_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33654
 *     if objType == CUlaunchConfig_st:
 *         return sizeof(ccuda.CUlaunchConfig_st)
 *     if objType == CUexecAffinitySmCount_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexecAffinitySmCount_st)
 *     if objType == CUexecAffinityParam_st:
 */
  }

  /* "cuda/cuda.pyx":33656
 *     if objType == CUexecAffinitySmCount_st:
 *         return sizeof(ccuda.CUexecAffinitySmCount_st)
 *     if objType == CUexecAffinityParam_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexecAffinityParam_st)
 *     if objType == CUDA_MEMCPY2D_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUexecAffinityParam_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33656, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33657
 *         return sizeof(ccuda.CUexecAffinitySmCount_st)
 *     if objType == CUexecAffinityParam_st:
 *         return sizeof(ccuda.CUexecAffinityParam_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEMCPY2D_st:
 *         return sizeof(ccuda.CUDA_MEMCPY2D_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUexecAffinityParam_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33656
 *     if objType == CUexecAffinitySmCount_st:
 *         return sizeof(ccuda.CUexecAffinitySmCount_st)
 *     if objType == CUexecAffinityParam_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexecAffinityParam_st)
 *     if objType == CUDA_MEMCPY2D_st:
 */
  }

  /* "cuda/cuda.pyx":33658
 *     if objType == CUexecAffinityParam_st:
 *         return sizeof(ccuda.CUexecAffinityParam_st)
 *     if objType == CUDA_MEMCPY2D_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY2D_st)
 *     if objType == CUDA_MEMCPY3D_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33658, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33659
 *         return sizeof(ccuda.CUexecAffinityParam_st)
 *     if objType == CUDA_MEMCPY2D_st:
 *         return sizeof(ccuda.CUDA_MEMCPY2D_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEMCPY3D_st:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_MEMCPY2D_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33658
 *     if objType == CUexecAffinityParam_st:
 *         return sizeof(ccuda.CUexecAffinityParam_st)
 *     if objType == CUDA_MEMCPY2D_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY2D_st)
 *     if objType == CUDA_MEMCPY3D_st:
 */
  }

  /* "cuda/cuda.pyx":33660
 *     if objType == CUDA_MEMCPY2D_st:
 *         return sizeof(ccuda.CUDA_MEMCPY2D_st)
 *     if objType == CUDA_MEMCPY3D_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY3D_st)
 *     if objType == CUDA_MEMCPY3D_PEER_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33660, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33661
 *         return sizeof(ccuda.CUDA_MEMCPY2D_st)
 *     if objType == CUDA_MEMCPY3D_st:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEMCPY3D_PEER_st:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_MEMCPY3D_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33660
 *     if objType == CUDA_MEMCPY2D_st:
 *         return sizeof(ccuda.CUDA_MEMCPY2D_st)
 *     if objType == CUDA_MEMCPY3D_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY3D_st)
 *     if objType == CUDA_MEMCPY3D_PEER_st:
 */
  }

  /* "cuda/cuda.pyx":33662
 *     if objType == CUDA_MEMCPY3D_st:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_st)
 *     if objType == CUDA_MEMCPY3D_PEER_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_st)
 *     if objType == CUDA_ARRAY_DESCRIPTOR_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33662, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33663
 *         return sizeof(ccuda.CUDA_MEMCPY3D_st)
 *     if objType == CUDA_MEMCPY3D_PEER_st:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_ARRAY_DESCRIPTOR_st:
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_MEMCPY3D_PEER_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33662
 *     if objType == CUDA_MEMCPY3D_st:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_st)
 *     if objType == CUDA_MEMCPY3D_PEER_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_st)
 *     if objType == CUDA_ARRAY_DESCRIPTOR_st:
 */
  }

  /* "cuda/cuda.pyx":33664
 *     if objType == CUDA_MEMCPY3D_PEER_st:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_st)
 *     if objType == CUDA_ARRAY_DESCRIPTOR_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_st)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33664, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33664, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33665
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_st)
 *     if objType == CUDA_ARRAY_DESCRIPTOR_st:
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_st:
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_ARRAY_DESCRIPTOR_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33664
 *     if objType == CUDA_MEMCPY3D_PEER_st:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_st)
 *     if objType == CUDA_ARRAY_DESCRIPTOR_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_st)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_st:
 */
  }

  /* "cuda/cuda.pyx":33666
 *     if objType == CUDA_ARRAY_DESCRIPTOR_st:
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_st)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_st)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33666, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33667
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_st)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_st:
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_st:
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_ARRAY3D_DESCRIPTOR_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33666
 *     if objType == CUDA_ARRAY_DESCRIPTOR_st:
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_st)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_st)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_st:
 */
  }

  /* "cuda/cuda.pyx":33668
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_st:
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_st)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33668, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33668, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33669
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_st)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_st:
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_st:
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_ARRAY_SPARSE_PROPERTIES_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33668
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_st:
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_st)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_st:
 */
  }

  /* "cuda/cuda.pyx":33670
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_st:
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st)
 *     if objType == CUDA_RESOURCE_DESC_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33670, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33671
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_st:
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_RESOURCE_DESC_st:
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33670
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_st:
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_st)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st)
 *     if objType == CUDA_RESOURCE_DESC_st:
 */
  }

  /* "cuda/cuda.pyx":33672
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_st:
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st)
 *     if objType == CUDA_RESOURCE_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_st)
 *     if objType == CUDA_TEXTURE_DESC_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33672, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33672, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33673
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st)
 *     if objType == CUDA_RESOURCE_DESC_st:
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_TEXTURE_DESC_st:
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_RESOURCE_DESC_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33672
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_st:
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st)
 *     if objType == CUDA_RESOURCE_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_st)
 *     if objType == CUDA_TEXTURE_DESC_st:
 */
  }

  /* "cuda/cuda.pyx":33674
 *     if objType == CUDA_RESOURCE_DESC_st:
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_st)
 *     if objType == CUDA_TEXTURE_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_st)
 *     if objType == CUDA_RESOURCE_VIEW_DESC_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33674, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33675
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_st)
 *     if objType == CUDA_TEXTURE_DESC_st:
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_RESOURCE_VIEW_DESC_st:
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_TEXTURE_DESC_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33674
 *     if objType == CUDA_RESOURCE_DESC_st:
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_st)
 *     if objType == CUDA_TEXTURE_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_st)
 *     if objType == CUDA_RESOURCE_VIEW_DESC_st:
 */
  }

  /* "cuda/cuda.pyx":33676
 *     if objType == CUDA_TEXTURE_DESC_st:
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_st)
 *     if objType == CUDA_RESOURCE_VIEW_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_st)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33676, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33677
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_st)
 *     if objType == CUDA_RESOURCE_VIEW_DESC_st:
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_RESOURCE_VIEW_DESC_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33676
 *     if objType == CUDA_TEXTURE_DESC_st:
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_st)
 *     if objType == CUDA_RESOURCE_VIEW_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_st)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:
 */
  }

  /* "cuda/cuda.pyx":33678
 *     if objType == CUDA_RESOURCE_VIEW_DESC_st:
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_st)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st)
 *     if objType == CUDA_LAUNCH_PARAMS_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33678, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33679
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_st)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_LAUNCH_PARAMS_st:
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33678
 *     if objType == CUDA_RESOURCE_VIEW_DESC_st:
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_st)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st)
 *     if objType == CUDA_LAUNCH_PARAMS_st:
 */
  }

  /* "cuda/cuda.pyx":33680
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st)
 *     if objType == CUDA_LAUNCH_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33680, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33681
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st)
 *     if objType == CUDA_LAUNCH_PARAMS_st:
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_LAUNCH_PARAMS_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33680
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st:
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st)
 *     if objType == CUDA_LAUNCH_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st:
 */
  }

  /* "cuda/cuda.pyx":33682
 *     if objType == CUDA_LAUNCH_PARAMS_st:
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33682, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33683
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33682
 *     if objType == CUDA_LAUNCH_PARAMS_st:
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:
 */
  }

  /* "cuda/cuda.pyx":33684
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33684, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33685
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33684
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:
 */
  }

  /* "cuda/cuda.pyx":33686
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33686, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33687
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33686
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st:
 */
  }

  /* "cuda/cuda.pyx":33688
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33688, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33689
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33688
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st:
 */
  }

  /* "cuda/cuda.pyx":33690
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33690, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33691
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33690
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st:
 */
  }

  /* "cuda/cuda.pyx":33692
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33692, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33692, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33693
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33692
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:
 */
  }

  /* "cuda/cuda.pyx":33694
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33694, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33695
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33694
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:
 */
  }

  /* "cuda/cuda.pyx":33696
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st)
 *     if objType == CUarrayMapInfo_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33696, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33697
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st)             # <<<<<<<<<<<<<<
 *     if objType == CUarrayMapInfo_st:
 *         return sizeof(ccuda.CUarrayMapInfo_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33696
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st)
 *     if objType == CUarrayMapInfo_st:
 */
  }

  /* "cuda/cuda.pyx":33698
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st)
 *     if objType == CUarrayMapInfo_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUarrayMapInfo_st)
 *     if objType == CUmemLocation_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUarrayMapInfo_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33698, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33699
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st)
 *     if objType == CUarrayMapInfo_st:
 *         return sizeof(ccuda.CUarrayMapInfo_st)             # <<<<<<<<<<<<<<
 *     if objType == CUmemLocation_st:
 *         return sizeof(ccuda.CUmemLocation_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUarrayMapInfo_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33698
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st)
 *     if objType == CUarrayMapInfo_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUarrayMapInfo_st)
 *     if objType == CUmemLocation_st:
 */
  }

  /* "cuda/cuda.pyx":33700
 *     if objType == CUarrayMapInfo_st:
 *         return sizeof(ccuda.CUarrayMapInfo_st)
 *     if objType == CUmemLocation_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemLocation_st)
 *     if objType == CUmemAllocationProp_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemLocation_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33700, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33701
 *         return sizeof(ccuda.CUarrayMapInfo_st)
 *     if objType == CUmemLocation_st:
 *         return sizeof(ccuda.CUmemLocation_st)             # <<<<<<<<<<<<<<
 *     if objType == CUmemAllocationProp_st:
 *         return sizeof(ccuda.CUmemAllocationProp_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUmemLocation_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33700
 *     if objType == CUarrayMapInfo_st:
 *         return sizeof(ccuda.CUarrayMapInfo_st)
 *     if objType == CUmemLocation_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemLocation_st)
 *     if objType == CUmemAllocationProp_st:
 */
  }

  /* "cuda/cuda.pyx":33702
 *     if objType == CUmemLocation_st:
 *         return sizeof(ccuda.CUmemLocation_st)
 *     if objType == CUmemAllocationProp_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemAllocationProp_st)
 *     if objType == CUmemAccessDesc_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemAllocationProp_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33702, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33702, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33703
 *         return sizeof(ccuda.CUmemLocation_st)
 *     if objType == CUmemAllocationProp_st:
 *         return sizeof(ccuda.CUmemAllocationProp_st)             # <<<<<<<<<<<<<<
 *     if objType == CUmemAccessDesc_st:
 *         return sizeof(ccuda.CUmemAccessDesc_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUmemAllocationProp_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33702
 *     if objType == CUmemLocation_st:
 *         return sizeof(ccuda.CUmemLocation_st)
 *     if objType == CUmemAllocationProp_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemAllocationProp_st)
 *     if objType == CUmemAccessDesc_st:
 */
  }

  /* "cuda/cuda.pyx":33704
 *     if objType == CUmemAllocationProp_st:
 *         return sizeof(ccuda.CUmemAllocationProp_st)
 *     if objType == CUmemAccessDesc_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemAccessDesc_st)
 *     if objType == CUmemPoolProps_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemAccessDesc_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33704, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33704, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33705
 *         return sizeof(ccuda.CUmemAllocationProp_st)
 *     if objType == CUmemAccessDesc_st:
 *         return sizeof(ccuda.CUmemAccessDesc_st)             # <<<<<<<<<<<<<<
 *     if objType == CUmemPoolProps_st:
 *         return sizeof(ccuda.CUmemPoolProps_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUmemAccessDesc_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33704
 *     if objType == CUmemAllocationProp_st:
 *         return sizeof(ccuda.CUmemAllocationProp_st)
 *     if objType == CUmemAccessDesc_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemAccessDesc_st)
 *     if objType == CUmemPoolProps_st:
 */
  }

  /* "cuda/cuda.pyx":33706
 *     if objType == CUmemAccessDesc_st:
 *         return sizeof(ccuda.CUmemAccessDesc_st)
 *     if objType == CUmemPoolProps_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemPoolProps_st)
 *     if objType == CUmemPoolPtrExportData_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemPoolProps_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33706, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33707
 *         return sizeof(ccuda.CUmemAccessDesc_st)
 *     if objType == CUmemPoolProps_st:
 *         return sizeof(ccuda.CUmemPoolProps_st)             # <<<<<<<<<<<<<<
 *     if objType == CUmemPoolPtrExportData_st:
 *         return sizeof(ccuda.CUmemPoolPtrExportData_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUmemPoolProps_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33706
 *     if objType == CUmemAccessDesc_st:
 *         return sizeof(ccuda.CUmemAccessDesc_st)
 *     if objType == CUmemPoolProps_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemPoolProps_st)
 *     if objType == CUmemPoolPtrExportData_st:
 */
  }

  /* "cuda/cuda.pyx":33708
 *     if objType == CUmemPoolProps_st:
 *         return sizeof(ccuda.CUmemPoolProps_st)
 *     if objType == CUmemPoolPtrExportData_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemPoolPtrExportData_st)
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33708, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33709
 *         return sizeof(ccuda.CUmemPoolProps_st)
 *     if objType == CUmemPoolPtrExportData_st:
 *         return sizeof(ccuda.CUmemPoolPtrExportData_st)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUmemPoolPtrExportData_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33708
 *     if objType == CUmemPoolProps_st:
 *         return sizeof(ccuda.CUmemPoolProps_st)
 *     if objType == CUmemPoolPtrExportData_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemPoolPtrExportData_st)
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS_st:
 */
  }

  /* "cuda/cuda.pyx":33710
 *     if objType == CUmemPoolPtrExportData_st:
 *         return sizeof(ccuda.CUmemPoolPtrExportData_st)
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS_st)
 *     if objType == CUeglFrame_st:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33710, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33711
 *         return sizeof(ccuda.CUmemPoolPtrExportData_st)
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS_st)             # <<<<<<<<<<<<<<
 *     if objType == CUeglFrame_st:
 *         return sizeof(ccuda.CUeglFrame_st)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CUDA_MEM_ALLOC_NODE_PARAMS_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33710
 *     if objType == CUmemPoolPtrExportData_st:
 *         return sizeof(ccuda.CUmemPoolPtrExportData_st)
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS_st)
 *     if objType == CUeglFrame_st:
 */
  }

  /* "cuda/cuda.pyx":33712
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS_st)
 *     if objType == CUeglFrame_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUeglFrame_st)
 *     if objType == CUcontext:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUeglFrame_st), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33712, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33713
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS_st)
 *     if objType == CUeglFrame_st:
 *         return sizeof(ccuda.CUeglFrame_st)             # <<<<<<<<<<<<<<
 *     if objType == CUcontext:
 *         return sizeof(ccuda.CUcontext)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct __pyx_t_4cuda_5ccuda_CUeglFrame_st))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33712
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS_st:
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS_st)
 *     if objType == CUeglFrame_st:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUeglFrame_st)
 *     if objType == CUcontext:
 */
  }

  /* "cuda/cuda.pyx":33714
 *     if objType == CUeglFrame_st:
 *         return sizeof(ccuda.CUeglFrame_st)
 *     if objType == CUcontext:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUcontext)
 *     if objType == CUmodule:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33714, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33715
 *         return sizeof(ccuda.CUeglFrame_st)
 *     if objType == CUcontext:
 *         return sizeof(ccuda.CUcontext)             # <<<<<<<<<<<<<<
 *     if objType == CUmodule:
 *         return sizeof(ccuda.CUmodule)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUcontext))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33714
 *     if objType == CUeglFrame_st:
 *         return sizeof(ccuda.CUeglFrame_st)
 *     if objType == CUcontext:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUcontext)
 *     if objType == CUmodule:
 */
  }

  /* "cuda/cuda.pyx":33716
 *     if objType == CUcontext:
 *         return sizeof(ccuda.CUcontext)
 *     if objType == CUmodule:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmodule)
 *     if objType == CUfunction:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmodule), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33716, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33717
 *         return sizeof(ccuda.CUcontext)
 *     if objType == CUmodule:
 *         return sizeof(ccuda.CUmodule)             # <<<<<<<<<<<<<<
 *     if objType == CUfunction:
 *         return sizeof(ccuda.CUfunction)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmodule))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33716
 *     if objType == CUcontext:
 *         return sizeof(ccuda.CUcontext)
 *     if objType == CUmodule:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmodule)
 *     if objType == CUfunction:
 */
  }

  /* "cuda/cuda.pyx":33718
 *     if objType == CUmodule:
 *         return sizeof(ccuda.CUmodule)
 *     if objType == CUfunction:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUfunction)
 *     if objType == CUarray:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33718, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33718, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33719
 *         return sizeof(ccuda.CUmodule)
 *     if objType == CUfunction:
 *         return sizeof(ccuda.CUfunction)             # <<<<<<<<<<<<<<
 *     if objType == CUarray:
 *         return sizeof(ccuda.CUarray)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUfunction))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33718
 *     if objType == CUmodule:
 *         return sizeof(ccuda.CUmodule)
 *     if objType == CUfunction:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUfunction)
 *     if objType == CUarray:
 */
  }

  /* "cuda/cuda.pyx":33720
 *     if objType == CUfunction:
 *         return sizeof(ccuda.CUfunction)
 *     if objType == CUarray:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUarray)
 *     if objType == CUmipmappedArray:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33720, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33720, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33721
 *         return sizeof(ccuda.CUfunction)
 *     if objType == CUarray:
 *         return sizeof(ccuda.CUarray)             # <<<<<<<<<<<<<<
 *     if objType == CUmipmappedArray:
 *         return sizeof(ccuda.CUmipmappedArray)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUarray))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33720
 *     if objType == CUfunction:
 *         return sizeof(ccuda.CUfunction)
 *     if objType == CUarray:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUarray)
 *     if objType == CUmipmappedArray:
 */
  }

  /* "cuda/cuda.pyx":33722
 *     if objType == CUarray:
 *         return sizeof(ccuda.CUarray)
 *     if objType == CUmipmappedArray:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmipmappedArray)
 *     if objType == CUtexref:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33722, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33723
 *         return sizeof(ccuda.CUarray)
 *     if objType == CUmipmappedArray:
 *         return sizeof(ccuda.CUmipmappedArray)             # <<<<<<<<<<<<<<
 *     if objType == CUtexref:
 *         return sizeof(ccuda.CUtexref)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmipmappedArray))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33722
 *     if objType == CUarray:
 *         return sizeof(ccuda.CUarray)
 *     if objType == CUmipmappedArray:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmipmappedArray)
 *     if objType == CUtexref:
 */
  }

  /* "cuda/cuda.pyx":33724
 *     if objType == CUmipmappedArray:
 *         return sizeof(ccuda.CUmipmappedArray)
 *     if objType == CUtexref:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUtexref)
 *     if objType == CUsurfref:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33724, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33725
 *         return sizeof(ccuda.CUmipmappedArray)
 *     if objType == CUtexref:
 *         return sizeof(ccuda.CUtexref)             # <<<<<<<<<<<<<<
 *     if objType == CUsurfref:
 *         return sizeof(ccuda.CUsurfref)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUtexref))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33724
 *     if objType == CUmipmappedArray:
 *         return sizeof(ccuda.CUmipmappedArray)
 *     if objType == CUtexref:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUtexref)
 *     if objType == CUsurfref:
 */
  }

  /* "cuda/cuda.pyx":33726
 *     if objType == CUtexref:
 *         return sizeof(ccuda.CUtexref)
 *     if objType == CUsurfref:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUsurfref)
 *     if objType == CUevent:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUsurfref), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33726, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33726, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33727
 *         return sizeof(ccuda.CUtexref)
 *     if objType == CUsurfref:
 *         return sizeof(ccuda.CUsurfref)             # <<<<<<<<<<<<<<
 *     if objType == CUevent:
 *         return sizeof(ccuda.CUevent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUsurfref))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33726
 *     if objType == CUtexref:
 *         return sizeof(ccuda.CUtexref)
 *     if objType == CUsurfref:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUsurfref)
 *     if objType == CUevent:
 */
  }

  /* "cuda/cuda.pyx":33728
 *     if objType == CUsurfref:
 *         return sizeof(ccuda.CUsurfref)
 *     if objType == CUevent:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUevent)
 *     if objType == CUstream:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33728, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33728, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33729
 *         return sizeof(ccuda.CUsurfref)
 *     if objType == CUevent:
 *         return sizeof(ccuda.CUevent)             # <<<<<<<<<<<<<<
 *     if objType == CUstream:
 *         return sizeof(ccuda.CUstream)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUevent))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33728
 *     if objType == CUsurfref:
 *         return sizeof(ccuda.CUsurfref)
 *     if objType == CUevent:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUevent)
 *     if objType == CUstream:
 */
  }

  /* "cuda/cuda.pyx":33730
 *     if objType == CUevent:
 *         return sizeof(ccuda.CUevent)
 *     if objType == CUstream:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstream)
 *     if objType == CUgraphicsResource:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33730, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33730, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33731
 *         return sizeof(ccuda.CUevent)
 *     if objType == CUstream:
 *         return sizeof(ccuda.CUstream)             # <<<<<<<<<<<<<<
 *     if objType == CUgraphicsResource:
 *         return sizeof(ccuda.CUgraphicsResource)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUstream))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33730
 *     if objType == CUevent:
 *         return sizeof(ccuda.CUevent)
 *     if objType == CUstream:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstream)
 *     if objType == CUgraphicsResource:
 */
  }

  /* "cuda/cuda.pyx":33732
 *     if objType == CUstream:
 *         return sizeof(ccuda.CUstream)
 *     if objType == CUgraphicsResource:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUgraphicsResource)
 *     if objType == CUexternalMemory:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33732, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33732, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33733
 *         return sizeof(ccuda.CUstream)
 *     if objType == CUgraphicsResource:
 *         return sizeof(ccuda.CUgraphicsResource)             # <<<<<<<<<<<<<<
 *     if objType == CUexternalMemory:
 *         return sizeof(ccuda.CUexternalMemory)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphicsResource))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33732
 *     if objType == CUstream:
 *         return sizeof(ccuda.CUstream)
 *     if objType == CUgraphicsResource:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUgraphicsResource)
 *     if objType == CUexternalMemory:
 */
  }

  /* "cuda/cuda.pyx":33734
 *     if objType == CUgraphicsResource:
 *         return sizeof(ccuda.CUgraphicsResource)
 *     if objType == CUexternalMemory:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexternalMemory)
 *     if objType == CUexternalSemaphore:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalMemory), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33734, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33735
 *         return sizeof(ccuda.CUgraphicsResource)
 *     if objType == CUexternalMemory:
 *         return sizeof(ccuda.CUexternalMemory)             # <<<<<<<<<<<<<<
 *     if objType == CUexternalSemaphore:
 *         return sizeof(ccuda.CUexternalSemaphore)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUexternalMemory))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33734
 *     if objType == CUgraphicsResource:
 *         return sizeof(ccuda.CUgraphicsResource)
 *     if objType == CUexternalMemory:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexternalMemory)
 *     if objType == CUexternalSemaphore:
 */
  }

  /* "cuda/cuda.pyx":33736
 *     if objType == CUexternalMemory:
 *         return sizeof(ccuda.CUexternalMemory)
 *     if objType == CUexternalSemaphore:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexternalSemaphore)
 *     if objType == CUgraph:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalSemaphore), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33736, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33737
 *         return sizeof(ccuda.CUexternalMemory)
 *     if objType == CUexternalSemaphore:
 *         return sizeof(ccuda.CUexternalSemaphore)             # <<<<<<<<<<<<<<
 *     if objType == CUgraph:
 *         return sizeof(ccuda.CUgraph)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUexternalSemaphore))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33736
 *     if objType == CUexternalMemory:
 *         return sizeof(ccuda.CUexternalMemory)
 *     if objType == CUexternalSemaphore:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexternalSemaphore)
 *     if objType == CUgraph:
 */
  }

  /* "cuda/cuda.pyx":33738
 *     if objType == CUexternalSemaphore:
 *         return sizeof(ccuda.CUexternalSemaphore)
 *     if objType == CUgraph:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUgraph)
 *     if objType == CUgraphNode:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33738, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33739
 *         return sizeof(ccuda.CUexternalSemaphore)
 *     if objType == CUgraph:
 *         return sizeof(ccuda.CUgraph)             # <<<<<<<<<<<<<<
 *     if objType == CUgraphNode:
 *         return sizeof(ccuda.CUgraphNode)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUgraph))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33738
 *     if objType == CUexternalSemaphore:
 *         return sizeof(ccuda.CUexternalSemaphore)
 *     if objType == CUgraph:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUgraph)
 *     if objType == CUgraphNode:
 */
  }

  /* "cuda/cuda.pyx":33740
 *     if objType == CUgraph:
 *         return sizeof(ccuda.CUgraph)
 *     if objType == CUgraphNode:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUgraphNode)
 *     if objType == CUgraphExec:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33740, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33741
 *         return sizeof(ccuda.CUgraph)
 *     if objType == CUgraphNode:
 *         return sizeof(ccuda.CUgraphNode)             # <<<<<<<<<<<<<<
 *     if objType == CUgraphExec:
 *         return sizeof(ccuda.CUgraphExec)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphNode))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33740
 *     if objType == CUgraph:
 *         return sizeof(ccuda.CUgraph)
 *     if objType == CUgraphNode:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUgraphNode)
 *     if objType == CUgraphExec:
 */
  }

  /* "cuda/cuda.pyx":33742
 *     if objType == CUgraphNode:
 *         return sizeof(ccuda.CUgraphNode)
 *     if objType == CUgraphExec:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUgraphExec)
 *     if objType == CUmemoryPool:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33742, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33743
 *         return sizeof(ccuda.CUgraphNode)
 *     if objType == CUgraphExec:
 *         return sizeof(ccuda.CUgraphExec)             # <<<<<<<<<<<<<<
 *     if objType == CUmemoryPool:
 *         return sizeof(ccuda.CUmemoryPool)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUgraphExec))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33742
 *     if objType == CUgraphNode:
 *         return sizeof(ccuda.CUgraphNode)
 *     if objType == CUgraphExec:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUgraphExec)
 *     if objType == CUmemoryPool:
 */
  }

  /* "cuda/cuda.pyx":33744
 *     if objType == CUgraphExec:
 *         return sizeof(ccuda.CUgraphExec)
 *     if objType == CUmemoryPool:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemoryPool)
 *     if objType == CUuserObject:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33744, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33744, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33745
 *         return sizeof(ccuda.CUgraphExec)
 *     if objType == CUmemoryPool:
 *         return sizeof(ccuda.CUmemoryPool)             # <<<<<<<<<<<<<<
 *     if objType == CUuserObject:
 *         return sizeof(ccuda.CUuserObject)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemoryPool))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33744
 *     if objType == CUgraphExec:
 *         return sizeof(ccuda.CUgraphExec)
 *     if objType == CUmemoryPool:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemoryPool)
 *     if objType == CUuserObject:
 */
  }

  /* "cuda/cuda.pyx":33746
 *     if objType == CUmemoryPool:
 *         return sizeof(ccuda.CUmemoryPool)
 *     if objType == CUuserObject:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUuserObject)
 *     if objType == CUlinkState:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUuserObject), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33746, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33747
 *         return sizeof(ccuda.CUmemoryPool)
 *     if objType == CUuserObject:
 *         return sizeof(ccuda.CUuserObject)             # <<<<<<<<<<<<<<
 *     if objType == CUlinkState:
 *         return sizeof(ccuda.CUlinkState)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUuserObject))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33746
 *     if objType == CUmemoryPool:
 *         return sizeof(ccuda.CUmemoryPool)
 *     if objType == CUuserObject:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUuserObject)
 *     if objType == CUlinkState:
 */
  }

  /* "cuda/cuda.pyx":33748
 *     if objType == CUuserObject:
 *         return sizeof(ccuda.CUuserObject)
 *     if objType == CUlinkState:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlinkState)
 *     if objType == EGLImageKHR:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUlinkState), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33748, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33748, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33749
 *         return sizeof(ccuda.CUuserObject)
 *     if objType == CUlinkState:
 *         return sizeof(ccuda.CUlinkState)             # <<<<<<<<<<<<<<
 *     if objType == EGLImageKHR:
 *         return sizeof(ccuda.EGLImageKHR)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUlinkState))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33748
 *     if objType == CUuserObject:
 *         return sizeof(ccuda.CUuserObject)
 *     if objType == CUlinkState:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlinkState)
 *     if objType == EGLImageKHR:
 */
  }

  /* "cuda/cuda.pyx":33750
 *     if objType == CUlinkState:
 *         return sizeof(ccuda.CUlinkState)
 *     if objType == EGLImageKHR:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.EGLImageKHR)
 *     if objType == EGLStreamKHR:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_EGLImageKHR), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33750, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33751
 *         return sizeof(ccuda.CUlinkState)
 *     if objType == EGLImageKHR:
 *         return sizeof(ccuda.EGLImageKHR)             # <<<<<<<<<<<<<<
 *     if objType == EGLStreamKHR:
 *         return sizeof(ccuda.EGLStreamKHR)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_EGLImageKHR))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33750
 *     if objType == CUlinkState:
 *         return sizeof(ccuda.CUlinkState)
 *     if objType == EGLImageKHR:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.EGLImageKHR)
 *     if objType == EGLStreamKHR:
 */
  }

  /* "cuda/cuda.pyx":33752
 *     if objType == EGLImageKHR:
 *         return sizeof(ccuda.EGLImageKHR)
 *     if objType == EGLStreamKHR:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.EGLStreamKHR)
 *     if objType == EGLSyncKHR:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_EGLStreamKHR), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33752, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33753
 *         return sizeof(ccuda.EGLImageKHR)
 *     if objType == EGLStreamKHR:
 *         return sizeof(ccuda.EGLStreamKHR)             # <<<<<<<<<<<<<<
 *     if objType == EGLSyncKHR:
 *         return sizeof(ccuda.EGLSyncKHR)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_EGLStreamKHR))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33752
 *     if objType == EGLImageKHR:
 *         return sizeof(ccuda.EGLImageKHR)
 *     if objType == EGLStreamKHR:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.EGLStreamKHR)
 *     if objType == EGLSyncKHR:
 */
  }

  /* "cuda/cuda.pyx":33754
 *     if objType == EGLStreamKHR:
 *         return sizeof(ccuda.EGLStreamKHR)
 *     if objType == EGLSyncKHR:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.EGLSyncKHR)
 *     if objType == CUeglStreamConnection:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_EGLSyncKHR), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33754, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33755
 *         return sizeof(ccuda.EGLStreamKHR)
 *     if objType == EGLSyncKHR:
 *         return sizeof(ccuda.EGLSyncKHR)             # <<<<<<<<<<<<<<
 *     if objType == CUeglStreamConnection:
 *         return sizeof(ccuda.CUeglStreamConnection)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_EGLSyncKHR))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33754
 *     if objType == EGLStreamKHR:
 *         return sizeof(ccuda.EGLStreamKHR)
 *     if objType == EGLSyncKHR:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.EGLSyncKHR)
 *     if objType == CUeglStreamConnection:
 */
  }

  /* "cuda/cuda.pyx":33756
 *     if objType == EGLSyncKHR:
 *         return sizeof(ccuda.EGLSyncKHR)
 *     if objType == CUeglStreamConnection:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUeglStreamConnection)
 *     if objType == CUhostFn:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUeglStreamConnection), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33756, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33757
 *         return sizeof(ccuda.EGLSyncKHR)
 *     if objType == CUeglStreamConnection:
 *         return sizeof(ccuda.CUeglStreamConnection)             # <<<<<<<<<<<<<<
 *     if objType == CUhostFn:
 *         return sizeof(ccuda.CUhostFn)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_CUeglStreamConnection))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33756
 *     if objType == EGLSyncKHR:
 *         return sizeof(ccuda.EGLSyncKHR)
 *     if objType == CUeglStreamConnection:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUeglStreamConnection)
 *     if objType == CUhostFn:
 */
  }

  /* "cuda/cuda.pyx":33758
 *     if objType == CUeglStreamConnection:
 *         return sizeof(ccuda.CUeglStreamConnection)
 *     if objType == CUhostFn:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUhostFn)
 *     if objType == CUstreamCallback:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUhostFn), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33758, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33759
 *         return sizeof(ccuda.CUeglStreamConnection)
 *     if objType == CUhostFn:
 *         return sizeof(ccuda.CUhostFn)             # <<<<<<<<<<<<<<
 *     if objType == CUstreamCallback:
 *         return sizeof(ccuda.CUstreamCallback)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUhostFn))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33758
 *     if objType == CUeglStreamConnection:
 *         return sizeof(ccuda.CUeglStreamConnection)
 *     if objType == CUhostFn:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUhostFn)
 *     if objType == CUstreamCallback:
 */
  }

  /* "cuda/cuda.pyx":33760
 *     if objType == CUhostFn:
 *         return sizeof(ccuda.CUhostFn)
 *     if objType == CUstreamCallback:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstreamCallback)
 *     if objType == CUoccupancyB2DSize:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamCallback), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33760, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33761
 *         return sizeof(ccuda.CUhostFn)
 *     if objType == CUstreamCallback:
 *         return sizeof(ccuda.CUstreamCallback)             # <<<<<<<<<<<<<<
 *     if objType == CUoccupancyB2DSize:
 *         return sizeof(ccuda.CUoccupancyB2DSize)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUstreamCallback))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33760
 *     if objType == CUhostFn:
 *         return sizeof(ccuda.CUhostFn)
 *     if objType == CUstreamCallback:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstreamCallback)
 *     if objType == CUoccupancyB2DSize:
 */
  }

  /* "cuda/cuda.pyx":33762
 *     if objType == CUstreamCallback:
 *         return sizeof(ccuda.CUstreamCallback)
 *     if objType == CUoccupancyB2DSize:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUoccupancyB2DSize)
 *     if objType == CUuuid:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUoccupancyB2DSize), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33762, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33763
 *         return sizeof(ccuda.CUstreamCallback)
 *     if objType == CUoccupancyB2DSize:
 *         return sizeof(ccuda.CUoccupancyB2DSize)             # <<<<<<<<<<<<<<
 *     if objType == CUuuid:
 *         return sizeof(ccuda.CUuuid)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUoccupancyB2DSize))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33762
 *     if objType == CUstreamCallback:
 *         return sizeof(ccuda.CUstreamCallback)
 *     if objType == CUoccupancyB2DSize:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUoccupancyB2DSize)
 *     if objType == CUuuid:
 */
  }

  /* "cuda/cuda.pyx":33764
 *     if objType == CUoccupancyB2DSize:
 *         return sizeof(ccuda.CUoccupancyB2DSize)
 *     if objType == CUuuid:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUuuid)
 *     if objType == CUipcEventHandle_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUuuid), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33764, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33764, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33765
 *         return sizeof(ccuda.CUoccupancyB2DSize)
 *     if objType == CUuuid:
 *         return sizeof(ccuda.CUuuid)             # <<<<<<<<<<<<<<
 *     if objType == CUipcEventHandle_v1:
 *         return sizeof(ccuda.CUipcEventHandle_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUuuid))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33764
 *     if objType == CUoccupancyB2DSize:
 *         return sizeof(ccuda.CUoccupancyB2DSize)
 *     if objType == CUuuid:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUuuid)
 *     if objType == CUipcEventHandle_v1:
 */
  }

  /* "cuda/cuda.pyx":33766
 *     if objType == CUuuid:
 *         return sizeof(ccuda.CUuuid)
 *     if objType == CUipcEventHandle_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUipcEventHandle_v1)
 *     if objType == CUipcEventHandle:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUipcEventHandle_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33766, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33767
 *         return sizeof(ccuda.CUuuid)
 *     if objType == CUipcEventHandle_v1:
 *         return sizeof(ccuda.CUipcEventHandle_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUipcEventHandle:
 *         return sizeof(ccuda.CUipcEventHandle)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUipcEventHandle_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33766
 *     if objType == CUuuid:
 *         return sizeof(ccuda.CUuuid)
 *     if objType == CUipcEventHandle_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUipcEventHandle_v1)
 *     if objType == CUipcEventHandle:
 */
  }

  /* "cuda/cuda.pyx":33768
 *     if objType == CUipcEventHandle_v1:
 *         return sizeof(ccuda.CUipcEventHandle_v1)
 *     if objType == CUipcEventHandle:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUipcEventHandle)
 *     if objType == CUipcMemHandle_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUipcEventHandle), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33768, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33768, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33769
 *         return sizeof(ccuda.CUipcEventHandle_v1)
 *     if objType == CUipcEventHandle:
 *         return sizeof(ccuda.CUipcEventHandle)             # <<<<<<<<<<<<<<
 *     if objType == CUipcMemHandle_v1:
 *         return sizeof(ccuda.CUipcMemHandle_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUipcEventHandle))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33768
 *     if objType == CUipcEventHandle_v1:
 *         return sizeof(ccuda.CUipcEventHandle_v1)
 *     if objType == CUipcEventHandle:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUipcEventHandle)
 *     if objType == CUipcMemHandle_v1:
 */
  }

  /* "cuda/cuda.pyx":33770
 *     if objType == CUipcEventHandle:
 *         return sizeof(ccuda.CUipcEventHandle)
 *     if objType == CUipcMemHandle_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUipcMemHandle_v1)
 *     if objType == CUipcMemHandle:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUipcMemHandle_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33770, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33771
 *         return sizeof(ccuda.CUipcEventHandle)
 *     if objType == CUipcMemHandle_v1:
 *         return sizeof(ccuda.CUipcMemHandle_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUipcMemHandle:
 *         return sizeof(ccuda.CUipcMemHandle)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUipcMemHandle_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33770
 *     if objType == CUipcEventHandle:
 *         return sizeof(ccuda.CUipcEventHandle)
 *     if objType == CUipcMemHandle_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUipcMemHandle_v1)
 *     if objType == CUipcMemHandle:
 */
  }

  /* "cuda/cuda.pyx":33772
 *     if objType == CUipcMemHandle_v1:
 *         return sizeof(ccuda.CUipcMemHandle_v1)
 *     if objType == CUipcMemHandle:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUipcMemHandle)
 *     if objType == CUstreamBatchMemOpParams_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUipcMemHandle), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33772, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33773
 *         return sizeof(ccuda.CUipcMemHandle_v1)
 *     if objType == CUipcMemHandle:
 *         return sizeof(ccuda.CUipcMemHandle)             # <<<<<<<<<<<<<<
 *     if objType == CUstreamBatchMemOpParams_v1:
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUipcMemHandle))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33772
 *     if objType == CUipcMemHandle_v1:
 *         return sizeof(ccuda.CUipcMemHandle_v1)
 *     if objType == CUipcMemHandle:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUipcMemHandle)
 *     if objType == CUstreamBatchMemOpParams_v1:
 */
  }

  /* "cuda/cuda.pyx":33774
 *     if objType == CUipcMemHandle:
 *         return sizeof(ccuda.CUipcMemHandle)
 *     if objType == CUstreamBatchMemOpParams_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_v1)
 *     if objType == CUstreamBatchMemOpParams:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33774, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33775
 *         return sizeof(ccuda.CUipcMemHandle)
 *     if objType == CUstreamBatchMemOpParams_v1:
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUstreamBatchMemOpParams:
 *         return sizeof(ccuda.CUstreamBatchMemOpParams)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUstreamBatchMemOpParams_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33774
 *     if objType == CUipcMemHandle:
 *         return sizeof(ccuda.CUipcMemHandle)
 *     if objType == CUstreamBatchMemOpParams_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_v1)
 *     if objType == CUstreamBatchMemOpParams:
 */
  }

  /* "cuda/cuda.pyx":33776
 *     if objType == CUstreamBatchMemOpParams_v1:
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_v1)
 *     if objType == CUstreamBatchMemOpParams:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstreamBatchMemOpParams)
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33776, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33777
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_v1)
 *     if objType == CUstreamBatchMemOpParams:
 *         return sizeof(ccuda.CUstreamBatchMemOpParams)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUstreamBatchMemOpParams))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33776
 *     if objType == CUstreamBatchMemOpParams_v1:
 *         return sizeof(ccuda.CUstreamBatchMemOpParams_v1)
 *     if objType == CUstreamBatchMemOpParams:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstreamBatchMemOpParams)
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS:
 */
  }

  /* "cuda/cuda.pyx":33778
 *     if objType == CUstreamBatchMemOpParams:
 *         return sizeof(ccuda.CUstreamBatchMemOpParams)
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS)
 *     if objType == CUdevprop_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33778, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33779
 *         return sizeof(ccuda.CUstreamBatchMemOpParams)
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS)             # <<<<<<<<<<<<<<
 *     if objType == CUdevprop_v1:
 *         return sizeof(ccuda.CUdevprop_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_BATCH_MEM_OP_NODE_PARAMS))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33778
 *     if objType == CUstreamBatchMemOpParams:
 *         return sizeof(ccuda.CUstreamBatchMemOpParams)
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS)
 *     if objType == CUdevprop_v1:
 */
  }

  /* "cuda/cuda.pyx":33780
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS)
 *     if objType == CUdevprop_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdevprop_v1)
 *     if objType == CUdevprop:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevprop_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33780, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33781
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS)
 *     if objType == CUdevprop_v1:
 *         return sizeof(ccuda.CUdevprop_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUdevprop:
 *         return sizeof(ccuda.CUdevprop)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUdevprop_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33780
 *     if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_BATCH_MEM_OP_NODE_PARAMS)
 *     if objType == CUdevprop_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdevprop_v1)
 *     if objType == CUdevprop:
 */
  }

  /* "cuda/cuda.pyx":33782
 *     if objType == CUdevprop_v1:
 *         return sizeof(ccuda.CUdevprop_v1)
 *     if objType == CUdevprop:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdevprop)
 *     if objType == CUaccessPolicyWindow_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevprop), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33782, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33783
 *         return sizeof(ccuda.CUdevprop_v1)
 *     if objType == CUdevprop:
 *         return sizeof(ccuda.CUdevprop)             # <<<<<<<<<<<<<<
 *     if objType == CUaccessPolicyWindow_v1:
 *         return sizeof(ccuda.CUaccessPolicyWindow_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUdevprop))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33782
 *     if objType == CUdevprop_v1:
 *         return sizeof(ccuda.CUdevprop_v1)
 *     if objType == CUdevprop:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdevprop)
 *     if objType == CUaccessPolicyWindow_v1:
 */
  }

  /* "cuda/cuda.pyx":33784
 *     if objType == CUdevprop:
 *         return sizeof(ccuda.CUdevprop)
 *     if objType == CUaccessPolicyWindow_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUaccessPolicyWindow_v1)
 *     if objType == CUaccessPolicyWindow:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33784, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33785
 *         return sizeof(ccuda.CUdevprop)
 *     if objType == CUaccessPolicyWindow_v1:
 *         return sizeof(ccuda.CUaccessPolicyWindow_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUaccessPolicyWindow:
 *         return sizeof(ccuda.CUaccessPolicyWindow)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUaccessPolicyWindow_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33784
 *     if objType == CUdevprop:
 *         return sizeof(ccuda.CUdevprop)
 *     if objType == CUaccessPolicyWindow_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUaccessPolicyWindow_v1)
 *     if objType == CUaccessPolicyWindow:
 */
  }

  /* "cuda/cuda.pyx":33786
 *     if objType == CUaccessPolicyWindow_v1:
 *         return sizeof(ccuda.CUaccessPolicyWindow_v1)
 *     if objType == CUaccessPolicyWindow:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUaccessPolicyWindow)
 *     if objType == CUDA_KERNEL_NODE_PARAMS_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33786, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33787
 *         return sizeof(ccuda.CUaccessPolicyWindow_v1)
 *     if objType == CUaccessPolicyWindow:
 *         return sizeof(ccuda.CUaccessPolicyWindow)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_KERNEL_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUaccessPolicyWindow))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33786
 *     if objType == CUaccessPolicyWindow_v1:
 *         return sizeof(ccuda.CUaccessPolicyWindow_v1)
 *     if objType == CUaccessPolicyWindow:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUaccessPolicyWindow)
 *     if objType == CUDA_KERNEL_NODE_PARAMS_v1:
 */
  }

  /* "cuda/cuda.pyx":33788
 *     if objType == CUaccessPolicyWindow:
 *         return sizeof(ccuda.CUaccessPolicyWindow)
 *     if objType == CUDA_KERNEL_NODE_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_v1)
 *     if objType == CUDA_KERNEL_NODE_PARAMS:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33788, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33789
 *         return sizeof(ccuda.CUaccessPolicyWindow)
 *     if objType == CUDA_KERNEL_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_KERNEL_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_KERNEL_NODE_PARAMS_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33788
 *     if objType == CUaccessPolicyWindow:
 *         return sizeof(ccuda.CUaccessPolicyWindow)
 *     if objType == CUDA_KERNEL_NODE_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_v1)
 *     if objType == CUDA_KERNEL_NODE_PARAMS:
 */
  }

  /* "cuda/cuda.pyx":33790
 *     if objType == CUDA_KERNEL_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_v1)
 *     if objType == CUDA_KERNEL_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS)
 *     if objType == CUDA_MEMSET_NODE_PARAMS_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33790, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33791
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_v1)
 *     if objType == CUDA_KERNEL_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEMSET_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_KERNEL_NODE_PARAMS))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33790
 *     if objType == CUDA_KERNEL_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS_v1)
 *     if objType == CUDA_KERNEL_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS)
 *     if objType == CUDA_MEMSET_NODE_PARAMS_v1:
 */
  }

  /* "cuda/cuda.pyx":33792
 *     if objType == CUDA_KERNEL_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS)
 *     if objType == CUDA_MEMSET_NODE_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_v1)
 *     if objType == CUDA_MEMSET_NODE_PARAMS:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33792, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33793
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS)
 *     if objType == CUDA_MEMSET_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEMSET_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_MEMSET_NODE_PARAMS_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33792
 *     if objType == CUDA_KERNEL_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_KERNEL_NODE_PARAMS)
 *     if objType == CUDA_MEMSET_NODE_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_v1)
 *     if objType == CUDA_MEMSET_NODE_PARAMS:
 */
  }

  /* "cuda/cuda.pyx":33794
 *     if objType == CUDA_MEMSET_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_v1)
 *     if objType == CUDA_MEMSET_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS)
 *     if objType == CUDA_HOST_NODE_PARAMS_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33794, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33795
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_v1)
 *     if objType == CUDA_MEMSET_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_HOST_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_MEMSET_NODE_PARAMS))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33794
 *     if objType == CUDA_MEMSET_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS_v1)
 *     if objType == CUDA_MEMSET_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS)
 *     if objType == CUDA_HOST_NODE_PARAMS_v1:
 */
  }

  /* "cuda/cuda.pyx":33796
 *     if objType == CUDA_MEMSET_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS)
 *     if objType == CUDA_HOST_NODE_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_v1)
 *     if objType == CUDA_HOST_NODE_PARAMS:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33796, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33797
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS)
 *     if objType == CUDA_HOST_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_HOST_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_HOST_NODE_PARAMS_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33796
 *     if objType == CUDA_MEMSET_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_MEMSET_NODE_PARAMS)
 *     if objType == CUDA_HOST_NODE_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_v1)
 *     if objType == CUDA_HOST_NODE_PARAMS:
 */
  }

  /* "cuda/cuda.pyx":33798
 *     if objType == CUDA_HOST_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_v1)
 *     if objType == CUDA_HOST_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS)
 *     if objType == CUlaunchAttributeValue:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33798, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33799
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_v1)
 *     if objType == CUDA_HOST_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS)             # <<<<<<<<<<<<<<
 *     if objType == CUlaunchAttributeValue:
 *         return sizeof(ccuda.CUlaunchAttributeValue)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_HOST_NODE_PARAMS))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33798
 *     if objType == CUDA_HOST_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS_v1)
 *     if objType == CUDA_HOST_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS)
 *     if objType == CUlaunchAttributeValue:
 */
  }

  /* "cuda/cuda.pyx":33800
 *     if objType == CUDA_HOST_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS)
 *     if objType == CUlaunchAttributeValue:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlaunchAttributeValue)
 *     if objType == CUlaunchAttribute:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33800, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33800, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33801
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS)
 *     if objType == CUlaunchAttributeValue:
 *         return sizeof(ccuda.CUlaunchAttributeValue)             # <<<<<<<<<<<<<<
 *     if objType == CUlaunchAttribute:
 *         return sizeof(ccuda.CUlaunchAttribute)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUlaunchAttributeValue))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33800
 *     if objType == CUDA_HOST_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_HOST_NODE_PARAMS)
 *     if objType == CUlaunchAttributeValue:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlaunchAttributeValue)
 *     if objType == CUlaunchAttribute:
 */
  }

  /* "cuda/cuda.pyx":33802
 *     if objType == CUlaunchAttributeValue:
 *         return sizeof(ccuda.CUlaunchAttributeValue)
 *     if objType == CUlaunchAttribute:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlaunchAttribute)
 *     if objType == CUlaunchConfig:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUlaunchAttribute), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33802, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33803
 *         return sizeof(ccuda.CUlaunchAttributeValue)
 *     if objType == CUlaunchAttribute:
 *         return sizeof(ccuda.CUlaunchAttribute)             # <<<<<<<<<<<<<<
 *     if objType == CUlaunchConfig:
 *         return sizeof(ccuda.CUlaunchConfig)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUlaunchAttribute))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33802
 *     if objType == CUlaunchAttributeValue:
 *         return sizeof(ccuda.CUlaunchAttributeValue)
 *     if objType == CUlaunchAttribute:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlaunchAttribute)
 *     if objType == CUlaunchConfig:
 */
  }

  /* "cuda/cuda.pyx":33804
 *     if objType == CUlaunchAttribute:
 *         return sizeof(ccuda.CUlaunchAttribute)
 *     if objType == CUlaunchConfig:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlaunchConfig)
 *     if objType == CUkernelNodeAttrValue_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUlaunchConfig), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33804, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33805
 *         return sizeof(ccuda.CUlaunchAttribute)
 *     if objType == CUlaunchConfig:
 *         return sizeof(ccuda.CUlaunchConfig)             # <<<<<<<<<<<<<<
 *     if objType == CUkernelNodeAttrValue_v1:
 *         return sizeof(ccuda.CUkernelNodeAttrValue_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUlaunchConfig))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33804
 *     if objType == CUlaunchAttribute:
 *         return sizeof(ccuda.CUlaunchAttribute)
 *     if objType == CUlaunchConfig:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUlaunchConfig)
 *     if objType == CUkernelNodeAttrValue_v1:
 */
  }

  /* "cuda/cuda.pyx":33806
 *     if objType == CUlaunchConfig:
 *         return sizeof(ccuda.CUlaunchConfig)
 *     if objType == CUkernelNodeAttrValue_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUkernelNodeAttrValue_v1)
 *     if objType == CUkernelNodeAttrValue:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUkernelNodeAttrValue_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33806, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33807
 *         return sizeof(ccuda.CUlaunchConfig)
 *     if objType == CUkernelNodeAttrValue_v1:
 *         return sizeof(ccuda.CUkernelNodeAttrValue_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUkernelNodeAttrValue:
 *         return sizeof(ccuda.CUkernelNodeAttrValue)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUkernelNodeAttrValue_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33806
 *     if objType == CUlaunchConfig:
 *         return sizeof(ccuda.CUlaunchConfig)
 *     if objType == CUkernelNodeAttrValue_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUkernelNodeAttrValue_v1)
 *     if objType == CUkernelNodeAttrValue:
 */
  }

  /* "cuda/cuda.pyx":33808
 *     if objType == CUkernelNodeAttrValue_v1:
 *         return sizeof(ccuda.CUkernelNodeAttrValue_v1)
 *     if objType == CUkernelNodeAttrValue:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUkernelNodeAttrValue)
 *     if objType == CUstreamAttrValue_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUkernelNodeAttrValue), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33808, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33809
 *         return sizeof(ccuda.CUkernelNodeAttrValue_v1)
 *     if objType == CUkernelNodeAttrValue:
 *         return sizeof(ccuda.CUkernelNodeAttrValue)             # <<<<<<<<<<<<<<
 *     if objType == CUstreamAttrValue_v1:
 *         return sizeof(ccuda.CUstreamAttrValue_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUkernelNodeAttrValue))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33808
 *     if objType == CUkernelNodeAttrValue_v1:
 *         return sizeof(ccuda.CUkernelNodeAttrValue_v1)
 *     if objType == CUkernelNodeAttrValue:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUkernelNodeAttrValue)
 *     if objType == CUstreamAttrValue_v1:
 */
  }

  /* "cuda/cuda.pyx":33810
 *     if objType == CUkernelNodeAttrValue:
 *         return sizeof(ccuda.CUkernelNodeAttrValue)
 *     if objType == CUstreamAttrValue_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstreamAttrValue_v1)
 *     if objType == CUstreamAttrValue:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamAttrValue_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33810, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33811
 *         return sizeof(ccuda.CUkernelNodeAttrValue)
 *     if objType == CUstreamAttrValue_v1:
 *         return sizeof(ccuda.CUstreamAttrValue_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUstreamAttrValue:
 *         return sizeof(ccuda.CUstreamAttrValue)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUstreamAttrValue_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33810
 *     if objType == CUkernelNodeAttrValue:
 *         return sizeof(ccuda.CUkernelNodeAttrValue)
 *     if objType == CUstreamAttrValue_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstreamAttrValue_v1)
 *     if objType == CUstreamAttrValue:
 */
  }

  /* "cuda/cuda.pyx":33812
 *     if objType == CUstreamAttrValue_v1:
 *         return sizeof(ccuda.CUstreamAttrValue_v1)
 *     if objType == CUstreamAttrValue:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstreamAttrValue)
 *     if objType == CUexecAffinitySmCount_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamAttrValue), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33812, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33812, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33813
 *         return sizeof(ccuda.CUstreamAttrValue_v1)
 *     if objType == CUstreamAttrValue:
 *         return sizeof(ccuda.CUstreamAttrValue)             # <<<<<<<<<<<<<<
 *     if objType == CUexecAffinitySmCount_v1:
 *         return sizeof(ccuda.CUexecAffinitySmCount_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUstreamAttrValue))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33812
 *     if objType == CUstreamAttrValue_v1:
 *         return sizeof(ccuda.CUstreamAttrValue_v1)
 *     if objType == CUstreamAttrValue:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUstreamAttrValue)
 *     if objType == CUexecAffinitySmCount_v1:
 */
  }

  /* "cuda/cuda.pyx":33814
 *     if objType == CUstreamAttrValue:
 *         return sizeof(ccuda.CUstreamAttrValue)
 *     if objType == CUexecAffinitySmCount_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexecAffinitySmCount_v1)
 *     if objType == CUexecAffinitySmCount:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33814, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33815
 *         return sizeof(ccuda.CUstreamAttrValue)
 *     if objType == CUexecAffinitySmCount_v1:
 *         return sizeof(ccuda.CUexecAffinitySmCount_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUexecAffinitySmCount:
 *         return sizeof(ccuda.CUexecAffinitySmCount)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUexecAffinitySmCount_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33814
 *     if objType == CUstreamAttrValue:
 *         return sizeof(ccuda.CUstreamAttrValue)
 *     if objType == CUexecAffinitySmCount_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexecAffinitySmCount_v1)
 *     if objType == CUexecAffinitySmCount:
 */
  }

  /* "cuda/cuda.pyx":33816
 *     if objType == CUexecAffinitySmCount_v1:
 *         return sizeof(ccuda.CUexecAffinitySmCount_v1)
 *     if objType == CUexecAffinitySmCount:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexecAffinitySmCount)
 *     if objType == CUexecAffinityParam_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33816, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33816, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33817
 *         return sizeof(ccuda.CUexecAffinitySmCount_v1)
 *     if objType == CUexecAffinitySmCount:
 *         return sizeof(ccuda.CUexecAffinitySmCount)             # <<<<<<<<<<<<<<
 *     if objType == CUexecAffinityParam_v1:
 *         return sizeof(ccuda.CUexecAffinityParam_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUexecAffinitySmCount))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33816
 *     if objType == CUexecAffinitySmCount_v1:
 *         return sizeof(ccuda.CUexecAffinitySmCount_v1)
 *     if objType == CUexecAffinitySmCount:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexecAffinitySmCount)
 *     if objType == CUexecAffinityParam_v1:
 */
  }

  /* "cuda/cuda.pyx":33818
 *     if objType == CUexecAffinitySmCount:
 *         return sizeof(ccuda.CUexecAffinitySmCount)
 *     if objType == CUexecAffinityParam_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexecAffinityParam_v1)
 *     if objType == CUexecAffinityParam:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUexecAffinityParam_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33818, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33818, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33819
 *         return sizeof(ccuda.CUexecAffinitySmCount)
 *     if objType == CUexecAffinityParam_v1:
 *         return sizeof(ccuda.CUexecAffinityParam_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUexecAffinityParam:
 *         return sizeof(ccuda.CUexecAffinityParam)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUexecAffinityParam_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33818
 *     if objType == CUexecAffinitySmCount:
 *         return sizeof(ccuda.CUexecAffinitySmCount)
 *     if objType == CUexecAffinityParam_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexecAffinityParam_v1)
 *     if objType == CUexecAffinityParam:
 */
  }

  /* "cuda/cuda.pyx":33820
 *     if objType == CUexecAffinityParam_v1:
 *         return sizeof(ccuda.CUexecAffinityParam_v1)
 *     if objType == CUexecAffinityParam:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexecAffinityParam)
 *     if objType == CUDA_MEMCPY2D_v2:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUexecAffinityParam), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33820, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33820, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33821
 *         return sizeof(ccuda.CUexecAffinityParam_v1)
 *     if objType == CUexecAffinityParam:
 *         return sizeof(ccuda.CUexecAffinityParam)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEMCPY2D_v2:
 *         return sizeof(ccuda.CUDA_MEMCPY2D_v2)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUexecAffinityParam))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33820
 *     if objType == CUexecAffinityParam_v1:
 *         return sizeof(ccuda.CUexecAffinityParam_v1)
 *     if objType == CUexecAffinityParam:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUexecAffinityParam)
 *     if objType == CUDA_MEMCPY2D_v2:
 */
  }

  /* "cuda/cuda.pyx":33822
 *     if objType == CUexecAffinityParam:
 *         return sizeof(ccuda.CUexecAffinityParam)
 *     if objType == CUDA_MEMCPY2D_v2:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY2D_v2)
 *     if objType == CUDA_MEMCPY2D:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D_v2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33822, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33822, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33823
 *         return sizeof(ccuda.CUexecAffinityParam)
 *     if objType == CUDA_MEMCPY2D_v2:
 *         return sizeof(ccuda.CUDA_MEMCPY2D_v2)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEMCPY2D:
 *         return sizeof(ccuda.CUDA_MEMCPY2D)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_MEMCPY2D_v2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33822
 *     if objType == CUexecAffinityParam:
 *         return sizeof(ccuda.CUexecAffinityParam)
 *     if objType == CUDA_MEMCPY2D_v2:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY2D_v2)
 *     if objType == CUDA_MEMCPY2D:
 */
  }

  /* "cuda/cuda.pyx":33824
 *     if objType == CUDA_MEMCPY2D_v2:
 *         return sizeof(ccuda.CUDA_MEMCPY2D_v2)
 *     if objType == CUDA_MEMCPY2D:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY2D)
 *     if objType == CUDA_MEMCPY3D_v2:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33824, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33825
 *         return sizeof(ccuda.CUDA_MEMCPY2D_v2)
 *     if objType == CUDA_MEMCPY2D:
 *         return sizeof(ccuda.CUDA_MEMCPY2D)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEMCPY3D_v2:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_v2)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_MEMCPY2D))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33824
 *     if objType == CUDA_MEMCPY2D_v2:
 *         return sizeof(ccuda.CUDA_MEMCPY2D_v2)
 *     if objType == CUDA_MEMCPY2D:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY2D)
 *     if objType == CUDA_MEMCPY3D_v2:
 */
  }

  /* "cuda/cuda.pyx":33826
 *     if objType == CUDA_MEMCPY2D:
 *         return sizeof(ccuda.CUDA_MEMCPY2D)
 *     if objType == CUDA_MEMCPY3D_v2:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY3D_v2)
 *     if objType == CUDA_MEMCPY3D:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_v2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33826, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33826, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33827
 *         return sizeof(ccuda.CUDA_MEMCPY2D)
 *     if objType == CUDA_MEMCPY3D_v2:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_v2)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEMCPY3D:
 *         return sizeof(ccuda.CUDA_MEMCPY3D)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_MEMCPY3D_v2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33826
 *     if objType == CUDA_MEMCPY2D:
 *         return sizeof(ccuda.CUDA_MEMCPY2D)
 *     if objType == CUDA_MEMCPY3D_v2:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY3D_v2)
 *     if objType == CUDA_MEMCPY3D:
 */
  }

  /* "cuda/cuda.pyx":33828
 *     if objType == CUDA_MEMCPY3D_v2:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_v2)
 *     if objType == CUDA_MEMCPY3D:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY3D)
 *     if objType == CUDA_MEMCPY3D_PEER_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33828, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33828, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33829
 *         return sizeof(ccuda.CUDA_MEMCPY3D_v2)
 *     if objType == CUDA_MEMCPY3D:
 *         return sizeof(ccuda.CUDA_MEMCPY3D)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEMCPY3D_PEER_v1:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_MEMCPY3D))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33828
 *     if objType == CUDA_MEMCPY3D_v2:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_v2)
 *     if objType == CUDA_MEMCPY3D:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY3D)
 *     if objType == CUDA_MEMCPY3D_PEER_v1:
 */
  }

  /* "cuda/cuda.pyx":33830
 *     if objType == CUDA_MEMCPY3D:
 *         return sizeof(ccuda.CUDA_MEMCPY3D)
 *     if objType == CUDA_MEMCPY3D_PEER_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_v1)
 *     if objType == CUDA_MEMCPY3D_PEER:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33830, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33831
 *         return sizeof(ccuda.CUDA_MEMCPY3D)
 *     if objType == CUDA_MEMCPY3D_PEER_v1:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEMCPY3D_PEER:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_MEMCPY3D_PEER_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33830
 *     if objType == CUDA_MEMCPY3D:
 *         return sizeof(ccuda.CUDA_MEMCPY3D)
 *     if objType == CUDA_MEMCPY3D_PEER_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_v1)
 *     if objType == CUDA_MEMCPY3D_PEER:
 */
  }

  /* "cuda/cuda.pyx":33832
 *     if objType == CUDA_MEMCPY3D_PEER_v1:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_v1)
 *     if objType == CUDA_MEMCPY3D_PEER:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER)
 *     if objType == CUDA_ARRAY_DESCRIPTOR_v2:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33832, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33832, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33833
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_v1)
 *     if objType == CUDA_MEMCPY3D_PEER:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_ARRAY_DESCRIPTOR_v2:
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_v2)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_MEMCPY3D_PEER))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33832
 *     if objType == CUDA_MEMCPY3D_PEER_v1:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER_v1)
 *     if objType == CUDA_MEMCPY3D_PEER:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER)
 *     if objType == CUDA_ARRAY_DESCRIPTOR_v2:
 */
  }

  /* "cuda/cuda.pyx":33834
 *     if objType == CUDA_MEMCPY3D_PEER:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER)
 *     if objType == CUDA_ARRAY_DESCRIPTOR_v2:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_v2)
 *     if objType == CUDA_ARRAY_DESCRIPTOR:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33834, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33835
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER)
 *     if objType == CUDA_ARRAY_DESCRIPTOR_v2:
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_v2)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_ARRAY_DESCRIPTOR:
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_ARRAY_DESCRIPTOR_v2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33834
 *     if objType == CUDA_MEMCPY3D_PEER:
 *         return sizeof(ccuda.CUDA_MEMCPY3D_PEER)
 *     if objType == CUDA_ARRAY_DESCRIPTOR_v2:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_v2)
 *     if objType == CUDA_ARRAY_DESCRIPTOR:
 */
  }

  /* "cuda/cuda.pyx":33836
 *     if objType == CUDA_ARRAY_DESCRIPTOR_v2:
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_v2)
 *     if objType == CUDA_ARRAY_DESCRIPTOR:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_v2:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33836, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33837
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_v2)
 *     if objType == CUDA_ARRAY_DESCRIPTOR:
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_v2:
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_ARRAY_DESCRIPTOR))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33836
 *     if objType == CUDA_ARRAY_DESCRIPTOR_v2:
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR_v2)
 *     if objType == CUDA_ARRAY_DESCRIPTOR:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_v2:
 */
  }

  /* "cuda/cuda.pyx":33838
 *     if objType == CUDA_ARRAY_DESCRIPTOR:
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_v2:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33838, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33839
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_v2:
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR:
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_ARRAY3D_DESCRIPTOR_v2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33838
 *     if objType == CUDA_ARRAY_DESCRIPTOR:
 *         return sizeof(ccuda.CUDA_ARRAY_DESCRIPTOR)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_v2:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR:
 */
  }

  /* "cuda/cuda.pyx":33840
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_v2:
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33840, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33840, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33841
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR:
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_v1:
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_ARRAY3D_DESCRIPTOR))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33840
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR_v2:
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR_v2)
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_v1:
 */
  }

  /* "cuda/cuda.pyx":33842
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR:
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_v1)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33842, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33842, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33843
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_v1:
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES:
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_ARRAY_SPARSE_PROPERTIES_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33842
 *     if objType == CUDA_ARRAY3D_DESCRIPTOR:
 *         return sizeof(ccuda.CUDA_ARRAY3D_DESCRIPTOR)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_v1)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES:
 */
  }

  /* "cuda/cuda.pyx":33844
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_v1:
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_v1)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33844, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33845
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_v1)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES:
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_v1:
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_ARRAY_SPARSE_PROPERTIES))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33844
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES_v1:
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES_v1)
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_v1:
 */
  }

  /* "cuda/cuda.pyx":33846
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES:
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_v1)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33846, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33846, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33847
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_v1:
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS:
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_ARRAY_MEMORY_REQUIREMENTS_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33846
 *     if objType == CUDA_ARRAY_SPARSE_PROPERTIES:
 *         return sizeof(ccuda.CUDA_ARRAY_SPARSE_PROPERTIES)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_v1)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS:
 */
  }

  /* "cuda/cuda.pyx":33848
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_v1:
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_v1)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS)
 *     if objType == CUDA_RESOURCE_DESC_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33848, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33849
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_v1)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS:
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_RESOURCE_DESC_v1:
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_ARRAY_MEMORY_REQUIREMENTS))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33848
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_v1:
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_v1)
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS)
 *     if objType == CUDA_RESOURCE_DESC_v1:
 */
  }

  /* "cuda/cuda.pyx":33850
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS:
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS)
 *     if objType == CUDA_RESOURCE_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_v1)
 *     if objType == CUDA_RESOURCE_DESC:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33850, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33850, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33851
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS)
 *     if objType == CUDA_RESOURCE_DESC_v1:
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_RESOURCE_DESC:
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_RESOURCE_DESC_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33850
 *     if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS:
 *         return sizeof(ccuda.CUDA_ARRAY_MEMORY_REQUIREMENTS)
 *     if objType == CUDA_RESOURCE_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_v1)
 *     if objType == CUDA_RESOURCE_DESC:
 */
  }

  /* "cuda/cuda.pyx":33852
 *     if objType == CUDA_RESOURCE_DESC_v1:
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_v1)
 *     if objType == CUDA_RESOURCE_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC)
 *     if objType == CUDA_TEXTURE_DESC_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33852, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33853
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_v1)
 *     if objType == CUDA_RESOURCE_DESC:
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_TEXTURE_DESC_v1:
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_RESOURCE_DESC))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33852
 *     if objType == CUDA_RESOURCE_DESC_v1:
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC_v1)
 *     if objType == CUDA_RESOURCE_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC)
 *     if objType == CUDA_TEXTURE_DESC_v1:
 */
  }

  /* "cuda/cuda.pyx":33854
 *     if objType == CUDA_RESOURCE_DESC:
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC)
 *     if objType == CUDA_TEXTURE_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_v1)
 *     if objType == CUDA_TEXTURE_DESC:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33854, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33855
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC)
 *     if objType == CUDA_TEXTURE_DESC_v1:
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_TEXTURE_DESC:
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_TEXTURE_DESC_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33854
 *     if objType == CUDA_RESOURCE_DESC:
 *         return sizeof(ccuda.CUDA_RESOURCE_DESC)
 *     if objType == CUDA_TEXTURE_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_v1)
 *     if objType == CUDA_TEXTURE_DESC:
 */
  }

  /* "cuda/cuda.pyx":33856
 *     if objType == CUDA_TEXTURE_DESC_v1:
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_v1)
 *     if objType == CUDA_TEXTURE_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC)
 *     if objType == CUDA_RESOURCE_VIEW_DESC_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33856, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33857
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_v1)
 *     if objType == CUDA_TEXTURE_DESC:
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_RESOURCE_VIEW_DESC_v1:
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_TEXTURE_DESC))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33856
 *     if objType == CUDA_TEXTURE_DESC_v1:
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC_v1)
 *     if objType == CUDA_TEXTURE_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC)
 *     if objType == CUDA_RESOURCE_VIEW_DESC_v1:
 */
  }

  /* "cuda/cuda.pyx":33858
 *     if objType == CUDA_TEXTURE_DESC:
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC)
 *     if objType == CUDA_RESOURCE_VIEW_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_v1)
 *     if objType == CUDA_RESOURCE_VIEW_DESC:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33858, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33859
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC)
 *     if objType == CUDA_RESOURCE_VIEW_DESC_v1:
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_RESOURCE_VIEW_DESC:
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_RESOURCE_VIEW_DESC_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33858
 *     if objType == CUDA_TEXTURE_DESC:
 *         return sizeof(ccuda.CUDA_TEXTURE_DESC)
 *     if objType == CUDA_RESOURCE_VIEW_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_v1)
 *     if objType == CUDA_RESOURCE_VIEW_DESC:
 */
  }

  /* "cuda/cuda.pyx":33860
 *     if objType == CUDA_RESOURCE_VIEW_DESC_v1:
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_v1)
 *     if objType == CUDA_RESOURCE_VIEW_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33860, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33861
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_v1)
 *     if objType == CUDA_RESOURCE_VIEW_DESC:
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1:
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_RESOURCE_VIEW_DESC))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33860
 *     if objType == CUDA_RESOURCE_VIEW_DESC_v1:
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC_v1)
 *     if objType == CUDA_RESOURCE_VIEW_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1:
 */
  }

  /* "cuda/cuda.pyx":33862
 *     if objType == CUDA_RESOURCE_VIEW_DESC:
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33862, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33863
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1:
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS:
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33862
 *     if objType == CUDA_RESOURCE_VIEW_DESC:
 *         return sizeof(ccuda.CUDA_RESOURCE_VIEW_DESC)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS:
 */
  }

  /* "cuda/cuda.pyx":33864
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1:
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS)
 *     if objType == CUDA_LAUNCH_PARAMS_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33864, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33865
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS:
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_LAUNCH_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33864
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1:
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1)
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS)
 *     if objType == CUDA_LAUNCH_PARAMS_v1:
 */
  }

  /* "cuda/cuda.pyx":33866
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS:
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS)
 *     if objType == CUDA_LAUNCH_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_v1)
 *     if objType == CUDA_LAUNCH_PARAMS:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33866, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33867
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS)
 *     if objType == CUDA_LAUNCH_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_LAUNCH_PARAMS:
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_LAUNCH_PARAMS_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33866
 *     if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS:
 *         return sizeof(ccuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS)
 *     if objType == CUDA_LAUNCH_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_v1)
 *     if objType == CUDA_LAUNCH_PARAMS:
 */
  }

  /* "cuda/cuda.pyx":33868
 *     if objType == CUDA_LAUNCH_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_v1)
 *     if objType == CUDA_LAUNCH_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33868, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33868, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33869
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_v1)
 *     if objType == CUDA_LAUNCH_PARAMS:
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_LAUNCH_PARAMS))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33868
 *     if objType == CUDA_LAUNCH_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS_v1)
 *     if objType == CUDA_LAUNCH_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1:
 */
  }

  /* "cuda/cuda.pyx":33870
 *     if objType == CUDA_LAUNCH_PARAMS:
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33870, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33870, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33871
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33870
 *     if objType == CUDA_LAUNCH_PARAMS:
 *         return sizeof(ccuda.CUDA_LAUNCH_PARAMS)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC:
 */
  }

  /* "cuda/cuda.pyx":33872
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33872, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33872, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33873
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_MEMORY_HANDLE_DESC))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33872
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1:
 */
  }

  /* "cuda/cuda.pyx":33874
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33874, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33874, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33875
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33874
 *     if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC:
 */
  }

  /* "cuda/cuda.pyx":33876
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33876, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33876, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33877
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_MEMORY_BUFFER_DESC))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33876
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1:
 */
  }

  /* "cuda/cuda.pyx":33878
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33878, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33879
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33878
 *     if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC:
 */
  }

  /* "cuda/cuda.pyx":33880
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33880, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33881
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33880
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1)
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1:
 */
  }

  /* "cuda/cuda.pyx":33882
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33882, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33883
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33882
 *     if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC:
 */
  }

  /* "cuda/cuda.pyx":33884
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33884, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33884, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33885
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33884
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1:
 */
  }

  /* "cuda/cuda.pyx":33886
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33886, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33887
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33886
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS:
 */
  }

  /* "cuda/cuda.pyx":33888
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33888, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33889
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33888
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1:
 */
  }

  /* "cuda/cuda.pyx":33890
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33890, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33890, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33891
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33890
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS:
 */
  }

  /* "cuda/cuda.pyx":33892
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33892, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33892, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33893
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33892
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1)
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1:
 */
  }

  /* "cuda/cuda.pyx":33894
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33894, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33895
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33894
 *     if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS:
 *         return sizeof(ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS:
 */
  }

  /* "cuda/cuda.pyx":33896
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33896, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33896, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33897
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33896
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1)
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1:
 */
  }

  /* "cuda/cuda.pyx":33898
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33898, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33898, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33899
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33898
 *     if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS:
 */
  }

  /* "cuda/cuda.pyx":33900
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS)
 *     if objType == CUarrayMapInfo_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33900, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33900, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33901
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS)             # <<<<<<<<<<<<<<
 *     if objType == CUarrayMapInfo_v1:
 *         return sizeof(ccuda.CUarrayMapInfo_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_EXT_SEM_WAIT_NODE_PARAMS))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33900
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1:
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1)
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS)
 *     if objType == CUarrayMapInfo_v1:
 */
  }

  /* "cuda/cuda.pyx":33902
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS)
 *     if objType == CUarrayMapInfo_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUarrayMapInfo_v1)
 *     if objType == CUarrayMapInfo:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUarrayMapInfo_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33902, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33903
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS)
 *     if objType == CUarrayMapInfo_v1:
 *         return sizeof(ccuda.CUarrayMapInfo_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUarrayMapInfo:
 *         return sizeof(ccuda.CUarrayMapInfo)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUarrayMapInfo_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33902
 *     if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS)
 *     if objType == CUarrayMapInfo_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUarrayMapInfo_v1)
 *     if objType == CUarrayMapInfo:
 */
  }

  /* "cuda/cuda.pyx":33904
 *     if objType == CUarrayMapInfo_v1:
 *         return sizeof(ccuda.CUarrayMapInfo_v1)
 *     if objType == CUarrayMapInfo:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUarrayMapInfo)
 *     if objType == CUmemLocation_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUarrayMapInfo), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33904, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33904, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33905
 *         return sizeof(ccuda.CUarrayMapInfo_v1)
 *     if objType == CUarrayMapInfo:
 *         return sizeof(ccuda.CUarrayMapInfo)             # <<<<<<<<<<<<<<
 *     if objType == CUmemLocation_v1:
 *         return sizeof(ccuda.CUmemLocation_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUarrayMapInfo))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33904
 *     if objType == CUarrayMapInfo_v1:
 *         return sizeof(ccuda.CUarrayMapInfo_v1)
 *     if objType == CUarrayMapInfo:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUarrayMapInfo)
 *     if objType == CUmemLocation_v1:
 */
  }

  /* "cuda/cuda.pyx":33906
 *     if objType == CUarrayMapInfo:
 *         return sizeof(ccuda.CUarrayMapInfo)
 *     if objType == CUmemLocation_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemLocation_v1)
 *     if objType == CUmemLocation:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemLocation_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33906, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33907
 *         return sizeof(ccuda.CUarrayMapInfo)
 *     if objType == CUmemLocation_v1:
 *         return sizeof(ccuda.CUmemLocation_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUmemLocation:
 *         return sizeof(ccuda.CUmemLocation)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemLocation_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33906
 *     if objType == CUarrayMapInfo:
 *         return sizeof(ccuda.CUarrayMapInfo)
 *     if objType == CUmemLocation_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemLocation_v1)
 *     if objType == CUmemLocation:
 */
  }

  /* "cuda/cuda.pyx":33908
 *     if objType == CUmemLocation_v1:
 *         return sizeof(ccuda.CUmemLocation_v1)
 *     if objType == CUmemLocation:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemLocation)
 *     if objType == CUmemAllocationProp_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemLocation), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33908, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33908, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33909
 *         return sizeof(ccuda.CUmemLocation_v1)
 *     if objType == CUmemLocation:
 *         return sizeof(ccuda.CUmemLocation)             # <<<<<<<<<<<<<<
 *     if objType == CUmemAllocationProp_v1:
 *         return sizeof(ccuda.CUmemAllocationProp_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemLocation))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33908
 *     if objType == CUmemLocation_v1:
 *         return sizeof(ccuda.CUmemLocation_v1)
 *     if objType == CUmemLocation:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemLocation)
 *     if objType == CUmemAllocationProp_v1:
 */
  }

  /* "cuda/cuda.pyx":33910
 *     if objType == CUmemLocation:
 *         return sizeof(ccuda.CUmemLocation)
 *     if objType == CUmemAllocationProp_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemAllocationProp_v1)
 *     if objType == CUmemAllocationProp:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemAllocationProp_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33910, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33910, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33911
 *         return sizeof(ccuda.CUmemLocation)
 *     if objType == CUmemAllocationProp_v1:
 *         return sizeof(ccuda.CUmemAllocationProp_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUmemAllocationProp:
 *         return sizeof(ccuda.CUmemAllocationProp)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemAllocationProp_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33911, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33910
 *     if objType == CUmemLocation:
 *         return sizeof(ccuda.CUmemLocation)
 *     if objType == CUmemAllocationProp_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemAllocationProp_v1)
 *     if objType == CUmemAllocationProp:
 */
  }

  /* "cuda/cuda.pyx":33912
 *     if objType == CUmemAllocationProp_v1:
 *         return sizeof(ccuda.CUmemAllocationProp_v1)
 *     if objType == CUmemAllocationProp:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemAllocationProp)
 *     if objType == CUmemAccessDesc_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemAllocationProp), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33912, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33912, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33913
 *         return sizeof(ccuda.CUmemAllocationProp_v1)
 *     if objType == CUmemAllocationProp:
 *         return sizeof(ccuda.CUmemAllocationProp)             # <<<<<<<<<<<<<<
 *     if objType == CUmemAccessDesc_v1:
 *         return sizeof(ccuda.CUmemAccessDesc_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemAllocationProp))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33912
 *     if objType == CUmemAllocationProp_v1:
 *         return sizeof(ccuda.CUmemAllocationProp_v1)
 *     if objType == CUmemAllocationProp:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemAllocationProp)
 *     if objType == CUmemAccessDesc_v1:
 */
  }

  /* "cuda/cuda.pyx":33914
 *     if objType == CUmemAllocationProp:
 *         return sizeof(ccuda.CUmemAllocationProp)
 *     if objType == CUmemAccessDesc_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemAccessDesc_v1)
 *     if objType == CUmemAccessDesc:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemAccessDesc_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33914, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33915
 *         return sizeof(ccuda.CUmemAllocationProp)
 *     if objType == CUmemAccessDesc_v1:
 *         return sizeof(ccuda.CUmemAccessDesc_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUmemAccessDesc:
 *         return sizeof(ccuda.CUmemAccessDesc)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemAccessDesc_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33914
 *     if objType == CUmemAllocationProp:
 *         return sizeof(ccuda.CUmemAllocationProp)
 *     if objType == CUmemAccessDesc_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemAccessDesc_v1)
 *     if objType == CUmemAccessDesc:
 */
  }

  /* "cuda/cuda.pyx":33916
 *     if objType == CUmemAccessDesc_v1:
 *         return sizeof(ccuda.CUmemAccessDesc_v1)
 *     if objType == CUmemAccessDesc:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemAccessDesc)
 *     if objType == CUmemPoolProps_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemAccessDesc), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33916, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33916, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33917
 *         return sizeof(ccuda.CUmemAccessDesc_v1)
 *     if objType == CUmemAccessDesc:
 *         return sizeof(ccuda.CUmemAccessDesc)             # <<<<<<<<<<<<<<
 *     if objType == CUmemPoolProps_v1:
 *         return sizeof(ccuda.CUmemPoolProps_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemAccessDesc))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33916
 *     if objType == CUmemAccessDesc_v1:
 *         return sizeof(ccuda.CUmemAccessDesc_v1)
 *     if objType == CUmemAccessDesc:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemAccessDesc)
 *     if objType == CUmemPoolProps_v1:
 */
  }

  /* "cuda/cuda.pyx":33918
 *     if objType == CUmemAccessDesc:
 *         return sizeof(ccuda.CUmemAccessDesc)
 *     if objType == CUmemPoolProps_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemPoolProps_v1)
 *     if objType == CUmemPoolProps:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemPoolProps_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33918, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33918, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33919
 *         return sizeof(ccuda.CUmemAccessDesc)
 *     if objType == CUmemPoolProps_v1:
 *         return sizeof(ccuda.CUmemPoolProps_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUmemPoolProps:
 *         return sizeof(ccuda.CUmemPoolProps)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemPoolProps_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33918
 *     if objType == CUmemAccessDesc:
 *         return sizeof(ccuda.CUmemAccessDesc)
 *     if objType == CUmemPoolProps_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemPoolProps_v1)
 *     if objType == CUmemPoolProps:
 */
  }

  /* "cuda/cuda.pyx":33920
 *     if objType == CUmemPoolProps_v1:
 *         return sizeof(ccuda.CUmemPoolProps_v1)
 *     if objType == CUmemPoolProps:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemPoolProps)
 *     if objType == CUmemPoolPtrExportData_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemPoolProps), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33920, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33920, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33921
 *         return sizeof(ccuda.CUmemPoolProps_v1)
 *     if objType == CUmemPoolProps:
 *         return sizeof(ccuda.CUmemPoolProps)             # <<<<<<<<<<<<<<
 *     if objType == CUmemPoolPtrExportData_v1:
 *         return sizeof(ccuda.CUmemPoolPtrExportData_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemPoolProps))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33920
 *     if objType == CUmemPoolProps_v1:
 *         return sizeof(ccuda.CUmemPoolProps_v1)
 *     if objType == CUmemPoolProps:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemPoolProps)
 *     if objType == CUmemPoolPtrExportData_v1:
 */
  }

  /* "cuda/cuda.pyx":33922
 *     if objType == CUmemPoolProps:
 *         return sizeof(ccuda.CUmemPoolProps)
 *     if objType == CUmemPoolPtrExportData_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemPoolPtrExportData_v1)
 *     if objType == CUmemPoolPtrExportData:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33922, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33923
 *         return sizeof(ccuda.CUmemPoolProps)
 *     if objType == CUmemPoolPtrExportData_v1:
 *         return sizeof(ccuda.CUmemPoolPtrExportData_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUmemPoolPtrExportData:
 *         return sizeof(ccuda.CUmemPoolPtrExportData)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemPoolPtrExportData_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33922
 *     if objType == CUmemPoolProps:
 *         return sizeof(ccuda.CUmemPoolProps)
 *     if objType == CUmemPoolPtrExportData_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemPoolPtrExportData_v1)
 *     if objType == CUmemPoolPtrExportData:
 */
  }

  /* "cuda/cuda.pyx":33924
 *     if objType == CUmemPoolPtrExportData_v1:
 *         return sizeof(ccuda.CUmemPoolPtrExportData_v1)
 *     if objType == CUmemPoolPtrExportData:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemPoolPtrExportData)
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33924, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33925
 *         return sizeof(ccuda.CUmemPoolPtrExportData_v1)
 *     if objType == CUmemPoolPtrExportData:
 *         return sizeof(ccuda.CUmemPoolPtrExportData)             # <<<<<<<<<<<<<<
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemPoolPtrExportData))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33924
 *     if objType == CUmemPoolPtrExportData_v1:
 *         return sizeof(ccuda.CUmemPoolPtrExportData_v1)
 *     if objType == CUmemPoolPtrExportData:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemPoolPtrExportData)
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS:
 */
  }

  /* "cuda/cuda.pyx":33926
 *     if objType == CUmemPoolPtrExportData:
 *         return sizeof(ccuda.CUmemPoolPtrExportData)
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS)
 *     if objType == CUeglFrame_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33926, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33926, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33927
 *         return sizeof(ccuda.CUmemPoolPtrExportData)
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS)             # <<<<<<<<<<<<<<
 *     if objType == CUeglFrame_v1:
 *         return sizeof(ccuda.CUeglFrame_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUDA_MEM_ALLOC_NODE_PARAMS))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33926
 *     if objType == CUmemPoolPtrExportData:
 *         return sizeof(ccuda.CUmemPoolPtrExportData)
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS)
 *     if objType == CUeglFrame_v1:
 */
  }

  /* "cuda/cuda.pyx":33928
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS)
 *     if objType == CUeglFrame_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUeglFrame_v1)
 *     if objType == CUeglFrame:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUeglFrame_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33928, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33928, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33929
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS)
 *     if objType == CUeglFrame_v1:
 *         return sizeof(ccuda.CUeglFrame_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUeglFrame:
 *         return sizeof(ccuda.CUeglFrame)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_CUeglFrame_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33928
 *     if objType == CUDA_MEM_ALLOC_NODE_PARAMS:
 *         return sizeof(ccuda.CUDA_MEM_ALLOC_NODE_PARAMS)
 *     if objType == CUeglFrame_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUeglFrame_v1)
 *     if objType == CUeglFrame:
 */
  }

  /* "cuda/cuda.pyx":33930
 *     if objType == CUeglFrame_v1:
 *         return sizeof(ccuda.CUeglFrame_v1)
 *     if objType == CUeglFrame:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUeglFrame)
 *     if objType == cuuint32_t:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUeglFrame), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33930, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33930, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33931
 *         return sizeof(ccuda.CUeglFrame_v1)
 *     if objType == CUeglFrame:
 *         return sizeof(ccuda.CUeglFrame)             # <<<<<<<<<<<<<<
 *     if objType == cuuint32_t:
 *         return sizeof(ccuda.cuuint32_t)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_CUeglFrame))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33930
 *     if objType == CUeglFrame_v1:
 *         return sizeof(ccuda.CUeglFrame_v1)
 *     if objType == CUeglFrame:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUeglFrame)
 *     if objType == cuuint32_t:
 */
  }

  /* "cuda/cuda.pyx":33932
 *     if objType == CUeglFrame:
 *         return sizeof(ccuda.CUeglFrame)
 *     if objType == cuuint32_t:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.cuuint32_t)
 *     if objType == cuuint64_t:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint32_t), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33932, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33933
 *         return sizeof(ccuda.CUeglFrame)
 *     if objType == cuuint32_t:
 *         return sizeof(ccuda.cuuint32_t)             # <<<<<<<<<<<<<<
 *     if objType == cuuint64_t:
 *         return sizeof(ccuda.cuuint64_t)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(cuuint32_t))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33932
 *     if objType == CUeglFrame:
 *         return sizeof(ccuda.CUeglFrame)
 *     if objType == cuuint32_t:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.cuuint32_t)
 *     if objType == cuuint64_t:
 */
  }

  /* "cuda/cuda.pyx":33934
 *     if objType == cuuint32_t:
 *         return sizeof(ccuda.cuuint32_t)
 *     if objType == cuuint64_t:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.cuuint64_t)
 *     if objType == CUdeviceptr_v2:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33934, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33934, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33935
 *         return sizeof(ccuda.cuuint32_t)
 *     if objType == cuuint64_t:
 *         return sizeof(ccuda.cuuint64_t)             # <<<<<<<<<<<<<<
 *     if objType == CUdeviceptr_v2:
 *         return sizeof(ccuda.CUdeviceptr_v2)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(cuuint64_t))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33934
 *     if objType == cuuint32_t:
 *         return sizeof(ccuda.cuuint32_t)
 *     if objType == cuuint64_t:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.cuuint64_t)
 *     if objType == CUdeviceptr_v2:
 */
  }

  /* "cuda/cuda.pyx":33936
 *     if objType == cuuint64_t:
 *         return sizeof(ccuda.cuuint64_t)
 *     if objType == CUdeviceptr_v2:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdeviceptr_v2)
 *     if objType == CUdeviceptr:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr_v2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33936, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33937
 *         return sizeof(ccuda.cuuint64_t)
 *     if objType == CUdeviceptr_v2:
 *         return sizeof(ccuda.CUdeviceptr_v2)             # <<<<<<<<<<<<<<
 *     if objType == CUdeviceptr:
 *         return sizeof(ccuda.CUdeviceptr)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUdeviceptr_v2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33936
 *     if objType == cuuint64_t:
 *         return sizeof(ccuda.cuuint64_t)
 *     if objType == CUdeviceptr_v2:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdeviceptr_v2)
 *     if objType == CUdeviceptr:
 */
  }

  /* "cuda/cuda.pyx":33938
 *     if objType == CUdeviceptr_v2:
 *         return sizeof(ccuda.CUdeviceptr_v2)
 *     if objType == CUdeviceptr:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdeviceptr)
 *     if objType == CUdevice_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33938, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33939
 *         return sizeof(ccuda.CUdeviceptr_v2)
 *     if objType == CUdeviceptr:
 *         return sizeof(ccuda.CUdeviceptr)             # <<<<<<<<<<<<<<
 *     if objType == CUdevice_v1:
 *         return sizeof(ccuda.CUdevice_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUdeviceptr))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33938
 *     if objType == CUdeviceptr_v2:
 *         return sizeof(ccuda.CUdeviceptr_v2)
 *     if objType == CUdeviceptr:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdeviceptr)
 *     if objType == CUdevice_v1:
 */
  }

  /* "cuda/cuda.pyx":33940
 *     if objType == CUdeviceptr:
 *         return sizeof(ccuda.CUdeviceptr)
 *     if objType == CUdevice_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdevice_v1)
 *     if objType == CUdevice:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33940, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33940, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33941
 *         return sizeof(ccuda.CUdeviceptr)
 *     if objType == CUdevice_v1:
 *         return sizeof(ccuda.CUdevice_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUdevice:
 *         return sizeof(ccuda.CUdevice)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUdevice_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33940
 *     if objType == CUdeviceptr:
 *         return sizeof(ccuda.CUdeviceptr)
 *     if objType == CUdevice_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdevice_v1)
 *     if objType == CUdevice:
 */
  }

  /* "cuda/cuda.pyx":33942
 *     if objType == CUdevice_v1:
 *         return sizeof(ccuda.CUdevice_v1)
 *     if objType == CUdevice:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdevice)
 *     if objType == CUtexObject_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33942, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33942, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33943
 *         return sizeof(ccuda.CUdevice_v1)
 *     if objType == CUdevice:
 *         return sizeof(ccuda.CUdevice)             # <<<<<<<<<<<<<<
 *     if objType == CUtexObject_v1:
 *         return sizeof(ccuda.CUtexObject_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUdevice))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33942
 *     if objType == CUdevice_v1:
 *         return sizeof(ccuda.CUdevice_v1)
 *     if objType == CUdevice:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUdevice)
 *     if objType == CUtexObject_v1:
 */
  }

  /* "cuda/cuda.pyx":33944
 *     if objType == CUdevice:
 *         return sizeof(ccuda.CUdevice)
 *     if objType == CUtexObject_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUtexObject_v1)
 *     if objType == CUtexObject:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexObject_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33944, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33944, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33945
 *         return sizeof(ccuda.CUdevice)
 *     if objType == CUtexObject_v1:
 *         return sizeof(ccuda.CUtexObject_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUtexObject:
 *         return sizeof(ccuda.CUtexObject)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUtexObject_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33944
 *     if objType == CUdevice:
 *         return sizeof(ccuda.CUdevice)
 *     if objType == CUtexObject_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUtexObject_v1)
 *     if objType == CUtexObject:
 */
  }

  /* "cuda/cuda.pyx":33946
 *     if objType == CUtexObject_v1:
 *         return sizeof(ccuda.CUtexObject_v1)
 *     if objType == CUtexObject:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUtexObject)
 *     if objType == CUsurfObject_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexObject), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33946, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33946, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33947
 *         return sizeof(ccuda.CUtexObject_v1)
 *     if objType == CUtexObject:
 *         return sizeof(ccuda.CUtexObject)             # <<<<<<<<<<<<<<
 *     if objType == CUsurfObject_v1:
 *         return sizeof(ccuda.CUsurfObject_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUtexObject))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33946
 *     if objType == CUtexObject_v1:
 *         return sizeof(ccuda.CUtexObject_v1)
 *     if objType == CUtexObject:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUtexObject)
 *     if objType == CUsurfObject_v1:
 */
  }

  /* "cuda/cuda.pyx":33948
 *     if objType == CUtexObject:
 *         return sizeof(ccuda.CUtexObject)
 *     if objType == CUsurfObject_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUsurfObject_v1)
 *     if objType == CUsurfObject:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUsurfObject_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33948, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33948, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33949
 *         return sizeof(ccuda.CUtexObject)
 *     if objType == CUsurfObject_v1:
 *         return sizeof(ccuda.CUsurfObject_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUsurfObject:
 *         return sizeof(ccuda.CUsurfObject)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUsurfObject_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33948
 *     if objType == CUtexObject:
 *         return sizeof(ccuda.CUtexObject)
 *     if objType == CUsurfObject_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUsurfObject_v1)
 *     if objType == CUsurfObject:
 */
  }

  /* "cuda/cuda.pyx":33950
 *     if objType == CUsurfObject_v1:
 *         return sizeof(ccuda.CUsurfObject_v1)
 *     if objType == CUsurfObject:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUsurfObject)
 *     if objType == CUmemGenericAllocationHandle_v1:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUsurfObject), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33950, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33951
 *         return sizeof(ccuda.CUsurfObject_v1)
 *     if objType == CUsurfObject:
 *         return sizeof(ccuda.CUsurfObject)             # <<<<<<<<<<<<<<
 *     if objType == CUmemGenericAllocationHandle_v1:
 *         return sizeof(ccuda.CUmemGenericAllocationHandle_v1)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUsurfObject))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33950
 *     if objType == CUsurfObject_v1:
 *         return sizeof(ccuda.CUsurfObject_v1)
 *     if objType == CUsurfObject:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUsurfObject)
 *     if objType == CUmemGenericAllocationHandle_v1:
 */
  }

  /* "cuda/cuda.pyx":33952
 *     if objType == CUsurfObject:
 *         return sizeof(ccuda.CUsurfObject)
 *     if objType == CUmemGenericAllocationHandle_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemGenericAllocationHandle_v1)
 *     if objType == CUmemGenericAllocationHandle:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle_v1), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33952, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33952, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33953
 *         return sizeof(ccuda.CUsurfObject)
 *     if objType == CUmemGenericAllocationHandle_v1:
 *         return sizeof(ccuda.CUmemGenericAllocationHandle_v1)             # <<<<<<<<<<<<<<
 *     if objType == CUmemGenericAllocationHandle:
 *         return sizeof(ccuda.CUmemGenericAllocationHandle)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemGenericAllocationHandle_v1))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33952
 *     if objType == CUsurfObject:
 *         return sizeof(ccuda.CUsurfObject)
 *     if objType == CUmemGenericAllocationHandle_v1:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemGenericAllocationHandle_v1)
 *     if objType == CUmemGenericAllocationHandle:
 */
  }

  /* "cuda/cuda.pyx":33954
 *     if objType == CUmemGenericAllocationHandle_v1:
 *         return sizeof(ccuda.CUmemGenericAllocationHandle_v1)
 *     if objType == CUmemGenericAllocationHandle:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemGenericAllocationHandle)
 *     if objType == GLenum:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33954, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33955
 *         return sizeof(ccuda.CUmemGenericAllocationHandle_v1)
 *     if objType == CUmemGenericAllocationHandle:
 *         return sizeof(ccuda.CUmemGenericAllocationHandle)             # <<<<<<<<<<<<<<
 *     if objType == GLenum:
 *         return sizeof(ccuda.GLenum)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(CUmemGenericAllocationHandle))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33954
 *     if objType == CUmemGenericAllocationHandle_v1:
 *         return sizeof(ccuda.CUmemGenericAllocationHandle_v1)
 *     if objType == CUmemGenericAllocationHandle:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.CUmemGenericAllocationHandle)
 *     if objType == GLenum:
 */
  }

  /* "cuda/cuda.pyx":33956
 *     if objType == CUmemGenericAllocationHandle:
 *         return sizeof(ccuda.CUmemGenericAllocationHandle)
 *     if objType == GLenum:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.GLenum)
 *     if objType == GLuint:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_GLenum), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33956, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33957
 *         return sizeof(ccuda.CUmemGenericAllocationHandle)
 *     if objType == GLenum:
 *         return sizeof(ccuda.GLenum)             # <<<<<<<<<<<<<<
 *     if objType == GLuint:
 *         return sizeof(ccuda.GLuint)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_GLenum))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33956
 *     if objType == CUmemGenericAllocationHandle:
 *         return sizeof(ccuda.CUmemGenericAllocationHandle)
 *     if objType == GLenum:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.GLenum)
 *     if objType == GLuint:
 */
  }

  /* "cuda/cuda.pyx":33958
 *     if objType == GLenum:
 *         return sizeof(ccuda.GLenum)
 *     if objType == GLuint:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.GLuint)
 *     if objType == EGLint:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_GLuint), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33958, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33959
 *         return sizeof(ccuda.GLenum)
 *     if objType == GLuint:
 *         return sizeof(ccuda.GLuint)             # <<<<<<<<<<<<<<
 *     if objType == EGLint:
 *         return sizeof(ccuda.EGLint)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_GLuint))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33958
 *     if objType == GLenum:
 *         return sizeof(ccuda.GLenum)
 *     if objType == GLuint:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.GLuint)
 *     if objType == EGLint:
 */
  }

  /* "cuda/cuda.pyx":33960
 *     if objType == GLuint:
 *         return sizeof(ccuda.GLuint)
 *     if objType == EGLint:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.EGLint)
 *     if objType == VdpDevice:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_EGLint), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33960, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33960, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33961
 *         return sizeof(ccuda.GLuint)
 *     if objType == EGLint:
 *         return sizeof(ccuda.EGLint)             # <<<<<<<<<<<<<<
 *     if objType == VdpDevice:
 *         return sizeof(ccuda.VdpDevice)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_EGLint))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33960
 *     if objType == GLuint:
 *         return sizeof(ccuda.GLuint)
 *     if objType == EGLint:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.EGLint)
 *     if objType == VdpDevice:
 */
  }

  /* "cuda/cuda.pyx":33962
 *     if objType == EGLint:
 *         return sizeof(ccuda.EGLint)
 *     if objType == VdpDevice:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.VdpDevice)
 *     if objType == VdpGetProcAddress:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_VdpDevice), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33962, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33962, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33963
 *         return sizeof(ccuda.EGLint)
 *     if objType == VdpDevice:
 *         return sizeof(ccuda.VdpDevice)             # <<<<<<<<<<<<<<
 *     if objType == VdpGetProcAddress:
 *         return sizeof(ccuda.VdpGetProcAddress)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_VdpDevice))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33962
 *     if objType == EGLint:
 *         return sizeof(ccuda.EGLint)
 *     if objType == VdpDevice:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.VdpDevice)
 *     if objType == VdpGetProcAddress:
 */
  }

  /* "cuda/cuda.pyx":33964
 *     if objType == VdpDevice:
 *         return sizeof(ccuda.VdpDevice)
 *     if objType == VdpGetProcAddress:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.VdpGetProcAddress)
 *     if objType == VdpVideoSurface:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_VdpGetProcAddress), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33964, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33964, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33965
 *         return sizeof(ccuda.VdpDevice)
 *     if objType == VdpGetProcAddress:
 *         return sizeof(ccuda.VdpGetProcAddress)             # <<<<<<<<<<<<<<
 *     if objType == VdpVideoSurface:
 *         return sizeof(ccuda.VdpVideoSurface)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_VdpGetProcAddress))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33964
 *     if objType == VdpDevice:
 *         return sizeof(ccuda.VdpDevice)
 *     if objType == VdpGetProcAddress:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.VdpGetProcAddress)
 *     if objType == VdpVideoSurface:
 */
  }

  /* "cuda/cuda.pyx":33966
 *     if objType == VdpGetProcAddress:
 *         return sizeof(ccuda.VdpGetProcAddress)
 *     if objType == VdpVideoSurface:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.VdpVideoSurface)
 *     if objType == VdpOutputSurface:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_VdpVideoSurface), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33966, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33967
 *         return sizeof(ccuda.VdpGetProcAddress)
 *     if objType == VdpVideoSurface:
 *         return sizeof(ccuda.VdpVideoSurface)             # <<<<<<<<<<<<<<
 *     if objType == VdpOutputSurface:
 *         return sizeof(ccuda.VdpOutputSurface)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_VdpVideoSurface))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33966
 *     if objType == VdpGetProcAddress:
 *         return sizeof(ccuda.VdpGetProcAddress)
 *     if objType == VdpVideoSurface:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.VdpVideoSurface)
 *     if objType == VdpOutputSurface:
 */
  }

  /* "cuda/cuda.pyx":33968
 *     if objType == VdpVideoSurface:
 *         return sizeof(ccuda.VdpVideoSurface)
 *     if objType == VdpOutputSurface:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.VdpOutputSurface)
 *     raise TypeError("Unknown type: " + str(objType))
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_ptype_4cuda_4cuda_VdpOutputSurface), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33968, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 33968, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cuda/cuda.pyx":33969
 *         return sizeof(ccuda.VdpVideoSurface)
 *     if objType == VdpOutputSurface:
 *         return sizeof(ccuda.VdpOutputSurface)             # <<<<<<<<<<<<<<
 *     raise TypeError("Unknown type: " + str(objType))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(__pyx_t_4cuda_5ccuda_VdpOutputSurface))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33969, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cuda/cuda.pyx":33968
 *     if objType == VdpVideoSurface:
 *         return sizeof(ccuda.VdpVideoSurface)
 *     if objType == VdpOutputSurface:             # <<<<<<<<<<<<<<
 *         return sizeof(ccuda.VdpOutputSurface)
 *     raise TypeError("Unknown type: " + str(objType))
 */
  }

  /* "cuda/cuda.pyx":33970
 *     if objType == VdpOutputSurface:
 *         return sizeof(ccuda.VdpOutputSurface)
 *     raise TypeError("Unknown type: " + str(objType))             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_objType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_type, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 33970, __pyx_L1_error)

  /* "cuda/cuda.pyx":33615
 * 
 * @cython.embedsignature(True)
 * def sizeof(objType):             # <<<<<<<<<<<<<<
 *     """ Returns the size of provided CUDA Python structure in bytes
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda.cuda.sizeof", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_cuuint64_t")
 * cdef int __Pyx_carray_from_py_cuuint64_t(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

static int __Pyx_carray_from_py_cuuint64_t(PyObject *__pyx_v_o, cuuint64_t *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  cuuint64_t __pyx_t_11;
  char const *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_from_py_cuuint64_t", 0);
  __Pyx_TraceCall("__Pyx_carray_from_py_cuuint64_t", __pyx_f[1], 77, 0, __PYX_ERR(1, 77, __pyx_L1_error));

  /* "carray.from_py":78
 * @cname("__Pyx_carray_from_py_cuuint64_t")
 * cdef int __Pyx_carray_from_py_cuuint64_t(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length             # <<<<<<<<<<<<<<
 *     try:
 *         i = len(o)
 */
  __pyx_v_i = __pyx_v_length;

  /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_cuuint64_t(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "carray.from_py":80
 *     cdef Py_ssize_t i = length
 *     try:
 *         i = len(o)             # <<<<<<<<<<<<<<
 *     except (TypeError, OverflowError):
 *         pass
 */
      __pyx_t_4 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 80, __pyx_L3_error)
      __pyx_v_i = __pyx_t_4;

      /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_cuuint64_t(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "carray.from_py":81
 *     try:
 *         i = len(o)
 *     except (TypeError, OverflowError):             # <<<<<<<<<<<<<<
 *         pass
 *     if i == length:
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_cuuint64_t(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "carray.from_py":83
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  __pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);
  if (__pyx_t_6) {

    /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
      __pyx_t_7 = __pyx_v_o; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 84, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 84, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 84, __pyx_L1_error)
          #else
          __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 84, __pyx_L1_error)
          #else
          __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        }
      } else {
        __pyx_t_10 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_10)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 84, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_v_i = __pyx_t_4;
      __pyx_t_4 = (__pyx_t_4 + 1);

      /* "carray.from_py":85
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      __pyx_t_6 = ((__pyx_v_i >= __pyx_v_length) != 0);
      if (__pyx_t_6) {

        /* "carray.from_py":86
 *         for i, item in enumerate(o):
 *             if i >= length:
 *                 break             # <<<<<<<<<<<<<<
 *             v[i] = item
 *         else:
 */
        goto __pyx_L11_break;

        /* "carray.from_py":85
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      }

      /* "carray.from_py":87
 *             if i >= length:
 *                 break
 *             v[i] = item             # <<<<<<<<<<<<<<
 *         else:
 *             i += 1  # convert index to length
 */
      __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_item); if (unlikely((__pyx_t_11 == ((cuuint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 87, __pyx_L1_error)
      (__pyx_v_v[__pyx_v_i]) = __pyx_t_11;

      /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    }
    /*else*/ {

      /* "carray.from_py":89
 *             v[i] = item
 *         else:
 *             i += 1  # convert index to length             # <<<<<<<<<<<<<<
 *             if i == length:
 *                 return 0
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "carray.from_py":90
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      __pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);
      if (__pyx_t_6) {

        /* "carray.from_py":91
 *             i += 1  # convert index to length
 *             if i == length:
 *                 return 0             # <<<<<<<<<<<<<<
 * 
 *     PyErr_Format(
 */
        __pyx_r = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L0;

        /* "carray.from_py":90
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      }
    }

    /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    __pyx_L11_break:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "carray.from_py":83
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  }

  /* "carray.from_py":96
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 *          if i >= length else             # <<<<<<<<<<<<<<
 *          "not enough values found during array assignment, expected %zd, got %zd"),
 *         length, i)
 */
  if (((__pyx_v_i >= __pyx_v_length) != 0)) {
    __pyx_t_12 = ((char const *)"too many values found during array assignment, expected %zd");
  } else {
    __pyx_t_12 = ((char const *)"not enough values found during array assignment, expected %zd, got %zd");
  }

  /* "carray.from_py":93
 *                 return 0
 * 
 *     PyErr_Format(             # <<<<<<<<<<<<<<
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 */
  __pyx_t_7 = PyErr_Format(__pyx_builtin_IndexError, __pyx_t_12, __pyx_v_length, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_cuuint64_t")
 * cdef int __Pyx_carray_from_py_cuuint64_t(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("carray.from_py.__Pyx_carray_from_py_cuuint64_t", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":112
 * 
 * @cname("__Pyx_carray_to_py_int")
 * cdef inline list __Pyx_carray_to_py_int(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_py_int(int *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_py_int", 0);
  __Pyx_TraceCall("__Pyx_carray_to_py_int", __pyx_f[1], 112, 0, __PYX_ERR(1, 112, __pyx_L1_error));

  /* "carray.to_py":115
 *     cdef size_t i
 *     cdef object value
 *     l = PyList_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyList_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":116
 *     cdef object value
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "carray.to_py":117
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 */
    __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":118
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyList_SET_ITEM(l, i, value)
 *     return l
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":119
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)             # <<<<<<<<<<<<<<
 *     return l
 * 
 */
    PyList_SET_ITEM(__pyx_v_l, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":120
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 *     return l             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_l);
  __pyx_r = __pyx_v_l;
  goto __pyx_L0;

  /* "carray.to_py":112
 * 
 * @cname("__Pyx_carray_to_py_int")
 * cdef inline list __Pyx_carray_to_py_int(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":124
 * 
 * @cname("__Pyx_carray_to_tuple_int")
 * cdef inline tuple __Pyx_carray_to_tuple_int(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_int(int *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_tuple_int", 0);
  __Pyx_TraceCall("__Pyx_carray_to_tuple_int", __pyx_f[1], 124, 0, __PYX_ERR(1, 124, __pyx_L1_error));

  /* "carray.to_py":127
 *     cdef size_t i
 *     cdef object value
 *     t = PyTuple_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_t = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":128
 *     cdef object value
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "carray.to_py":129
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 */
    __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":130
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":131
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)             # <<<<<<<<<<<<<<
 *     return t
 */
    PyTuple_SET_ITEM(__pyx_v_t, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":132
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_t);
  __pyx_r = __pyx_v_t;
  goto __pyx_L0;

  /* "carray.to_py":124
 * 
 * @cname("__Pyx_carray_to_tuple_int")
 * cdef inline tuple __Pyx_carray_to_tuple_int(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_tuple_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_int")
 * cdef int __Pyx_carray_from_py_int(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

static int __Pyx_carray_from_py_int(PyObject *__pyx_v_o, int *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  char const *__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_from_py_int", 0);
  __Pyx_TraceCall("__Pyx_carray_from_py_int", __pyx_f[1], 77, 0, __PYX_ERR(1, 77, __pyx_L1_error));

  /* "carray.from_py":78
 * @cname("__Pyx_carray_from_py_int")
 * cdef int __Pyx_carray_from_py_int(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length             # <<<<<<<<<<<<<<
 *     try:
 *         i = len(o)
 */
  __pyx_v_i = __pyx_v_length;

  /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_int(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "carray.from_py":80
 *     cdef Py_ssize_t i = length
 *     try:
 *         i = len(o)             # <<<<<<<<<<<<<<
 *     except (TypeError, OverflowError):
 *         pass
 */
      __pyx_t_4 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 80, __pyx_L3_error)
      __pyx_v_i = __pyx_t_4;

      /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_int(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "carray.from_py":81
 *     try:
 *         i = len(o)
 *     except (TypeError, OverflowError):             # <<<<<<<<<<<<<<
 *         pass
 *     if i == length:
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_int(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "carray.from_py":83
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  __pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);
  if (__pyx_t_6) {

    /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
      __pyx_t_7 = __pyx_v_o; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 84, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 84, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 84, __pyx_L1_error)
          #else
          __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 84, __pyx_L1_error)
          #else
          __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        }
      } else {
        __pyx_t_10 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_10)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 84, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_v_i = __pyx_t_4;
      __pyx_t_4 = (__pyx_t_4 + 1);

      /* "carray.from_py":85
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      __pyx_t_6 = ((__pyx_v_i >= __pyx_v_length) != 0);
      if (__pyx_t_6) {

        /* "carray.from_py":86
 *         for i, item in enumerate(o):
 *             if i >= length:
 *                 break             # <<<<<<<<<<<<<<
 *             v[i] = item
 *         else:
 */
        goto __pyx_L11_break;

        /* "carray.from_py":85
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      }

      /* "carray.from_py":87
 *             if i >= length:
 *                 break
 *             v[i] = item             # <<<<<<<<<<<<<<
 *         else:
 *             i += 1  # convert index to length
 */
      __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_item); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 87, __pyx_L1_error)
      (__pyx_v_v[__pyx_v_i]) = __pyx_t_5;

      /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    }
    /*else*/ {

      /* "carray.from_py":89
 *             v[i] = item
 *         else:
 *             i += 1  # convert index to length             # <<<<<<<<<<<<<<
 *             if i == length:
 *                 return 0
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "carray.from_py":90
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      __pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);
      if (__pyx_t_6) {

        /* "carray.from_py":91
 *             i += 1  # convert index to length
 *             if i == length:
 *                 return 0             # <<<<<<<<<<<<<<
 * 
 *     PyErr_Format(
 */
        __pyx_r = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L0;

        /* "carray.from_py":90
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      }
    }

    /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    __pyx_L11_break:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "carray.from_py":83
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  }

  /* "carray.from_py":96
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 *          if i >= length else             # <<<<<<<<<<<<<<
 *          "not enough values found during array assignment, expected %zd, got %zd"),
 *         length, i)
 */
  if (((__pyx_v_i >= __pyx_v_length) != 0)) {
    __pyx_t_11 = ((char const *)"too many values found during array assignment, expected %zd");
  } else {
    __pyx_t_11 = ((char const *)"not enough values found during array assignment, expected %zd, got %zd");
  }

  /* "carray.from_py":93
 *                 return 0
 * 
 *     PyErr_Format(             # <<<<<<<<<<<<<<
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 */
  __pyx_t_7 = PyErr_Format(__pyx_builtin_IndexError, __pyx_t_11, __pyx_v_length, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_int")
 * cdef int __Pyx_carray_from_py_int(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("carray.from_py.__Pyx_carray_from_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":112
 * 
 * @cname("__Pyx_carray_to_py_unsigned_int")
 * cdef inline list __Pyx_carray_to_py_unsigned_int(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_py_unsigned_int(unsigned int *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_py_unsigned_int", 0);
  __Pyx_TraceCall("__Pyx_carray_to_py_unsigned_int", __pyx_f[1], 112, 0, __PYX_ERR(1, 112, __pyx_L1_error));

  /* "carray.to_py":115
 *     cdef size_t i
 *     cdef object value
 *     l = PyList_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyList_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":116
 *     cdef object value
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "carray.to_py":117
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 */
    __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":118
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyList_SET_ITEM(l, i, value)
 *     return l
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":119
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)             # <<<<<<<<<<<<<<
 *     return l
 * 
 */
    PyList_SET_ITEM(__pyx_v_l, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":120
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 *     return l             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_l);
  __pyx_r = __pyx_v_l;
  goto __pyx_L0;

  /* "carray.to_py":112
 * 
 * @cname("__Pyx_carray_to_py_unsigned_int")
 * cdef inline list __Pyx_carray_to_py_unsigned_int(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_py_unsigned_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":124
 * 
 * @cname("__Pyx_carray_to_tuple_unsigned_int")
 * cdef inline tuple __Pyx_carray_to_tuple_unsigned_int(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_unsigned_int(unsigned int *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_tuple_unsigned_int", 0);
  __Pyx_TraceCall("__Pyx_carray_to_tuple_unsigned_int", __pyx_f[1], 124, 0, __PYX_ERR(1, 124, __pyx_L1_error));

  /* "carray.to_py":127
 *     cdef size_t i
 *     cdef object value
 *     t = PyTuple_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_t = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":128
 *     cdef object value
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "carray.to_py":129
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 */
    __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":130
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":131
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)             # <<<<<<<<<<<<<<
 *     return t
 */
    PyTuple_SET_ITEM(__pyx_v_t, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":132
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_t);
  __pyx_r = __pyx_v_t;
  goto __pyx_L0;

  /* "carray.to_py":124
 * 
 * @cname("__Pyx_carray_to_tuple_unsigned_int")
 * cdef inline tuple __Pyx_carray_to_tuple_unsigned_int(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_tuple_unsigned_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_unsigned_int")
 * cdef int __Pyx_carray_from_py_unsigned_int(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

static int __Pyx_carray_from_py_unsigned_int(PyObject *__pyx_v_o, unsigned int *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  unsigned int __pyx_t_11;
  char const *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_from_py_unsigned_int", 0);
  __Pyx_TraceCall("__Pyx_carray_from_py_unsigned_int", __pyx_f[1], 77, 0, __PYX_ERR(1, 77, __pyx_L1_error));

  /* "carray.from_py":78
 * @cname("__Pyx_carray_from_py_unsigned_int")
 * cdef int __Pyx_carray_from_py_unsigned_int(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length             # <<<<<<<<<<<<<<
 *     try:
 *         i = len(o)
 */
  __pyx_v_i = __pyx_v_length;

  /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_unsigned_int(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "carray.from_py":80
 *     cdef Py_ssize_t i = length
 *     try:
 *         i = len(o)             # <<<<<<<<<<<<<<
 *     except (TypeError, OverflowError):
 *         pass
 */
      __pyx_t_4 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 80, __pyx_L3_error)
      __pyx_v_i = __pyx_t_4;

      /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_unsigned_int(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "carray.from_py":81
 *     try:
 *         i = len(o)
 *     except (TypeError, OverflowError):             # <<<<<<<<<<<<<<
 *         pass
 *     if i == length:
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_unsigned_int(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "carray.from_py":83
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  __pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);
  if (__pyx_t_6) {

    /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
      __pyx_t_7 = __pyx_v_o; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 84, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 84, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 84, __pyx_L1_error)
          #else
          __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 84, __pyx_L1_error)
          #else
          __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        }
      } else {
        __pyx_t_10 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_10)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 84, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_v_i = __pyx_t_4;
      __pyx_t_4 = (__pyx_t_4 + 1);

      /* "carray.from_py":85
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      __pyx_t_6 = ((__pyx_v_i >= __pyx_v_length) != 0);
      if (__pyx_t_6) {

        /* "carray.from_py":86
 *         for i, item in enumerate(o):
 *             if i >= length:
 *                 break             # <<<<<<<<<<<<<<
 *             v[i] = item
 *         else:
 */
        goto __pyx_L11_break;

        /* "carray.from_py":85
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      }

      /* "carray.from_py":87
 *             if i >= length:
 *                 break
 *             v[i] = item             # <<<<<<<<<<<<<<
 *         else:
 *             i += 1  # convert index to length
 */
      __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_v_item); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(1, 87, __pyx_L1_error)
      (__pyx_v_v[__pyx_v_i]) = __pyx_t_11;

      /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    }
    /*else*/ {

      /* "carray.from_py":89
 *             v[i] = item
 *         else:
 *             i += 1  # convert index to length             # <<<<<<<<<<<<<<
 *             if i == length:
 *                 return 0
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "carray.from_py":90
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      __pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);
      if (__pyx_t_6) {

        /* "carray.from_py":91
 *             i += 1  # convert index to length
 *             if i == length:
 *                 return 0             # <<<<<<<<<<<<<<
 * 
 *     PyErr_Format(
 */
        __pyx_r = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L0;

        /* "carray.from_py":90
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      }
    }

    /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    __pyx_L11_break:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "carray.from_py":83
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  }

  /* "carray.from_py":96
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 *          if i >= length else             # <<<<<<<<<<<<<<
 *          "not enough values found during array assignment, expected %zd, got %zd"),
 *         length, i)
 */
  if (((__pyx_v_i >= __pyx_v_length) != 0)) {
    __pyx_t_12 = ((char const *)"too many values found during array assignment, expected %zd");
  } else {
    __pyx_t_12 = ((char const *)"not enough values found during array assignment, expected %zd, got %zd");
  }

  /* "carray.from_py":93
 *                 return 0
 * 
 *     PyErr_Format(             # <<<<<<<<<<<<<<
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 */
  __pyx_t_7 = PyErr_Format(__pyx_builtin_IndexError, __pyx_t_12, __pyx_v_length, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_unsigned_int")
 * cdef int __Pyx_carray_from_py_unsigned_int(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("carray.from_py.__Pyx_carray_from_py_unsigned_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":112
 * 
 * @cname("__Pyx_carray_to_py_CUaddress_mode")
 * cdef inline list __Pyx_carray_to_py_CUaddress_mode(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_py_CUaddress_mode(CUaddress_mode *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_py_CUaddress_mode", 0);
  __Pyx_TraceCall("__Pyx_carray_to_py_CUaddress_mode", __pyx_f[1], 112, 0, __PYX_ERR(1, 112, __pyx_L1_error));

  /* "carray.to_py":115
 *     cdef size_t i
 *     cdef object value
 *     l = PyList_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyList_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":116
 *     cdef object value
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "carray.to_py":117
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 */
    __pyx_t_1 = __Pyx_PyInt_From_enum__CUaddress_mode_enum((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":118
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyList_SET_ITEM(l, i, value)
 *     return l
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":119
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)             # <<<<<<<<<<<<<<
 *     return l
 * 
 */
    PyList_SET_ITEM(__pyx_v_l, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":120
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 *     return l             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_l);
  __pyx_r = __pyx_v_l;
  goto __pyx_L0;

  /* "carray.to_py":112
 * 
 * @cname("__Pyx_carray_to_py_CUaddress_mode")
 * cdef inline list __Pyx_carray_to_py_CUaddress_mode(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_py_CUaddress_mode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":124
 * 
 * @cname("__Pyx_carray_to_tuple_CUaddress_mode")
 * cdef inline tuple __Pyx_carray_to_tuple_CUaddress_mode(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_CUaddress_mode(CUaddress_mode *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_tuple_CUaddress_mode", 0);
  __Pyx_TraceCall("__Pyx_carray_to_tuple_CUaddress_mode", __pyx_f[1], 124, 0, __PYX_ERR(1, 124, __pyx_L1_error));

  /* "carray.to_py":127
 *     cdef size_t i
 *     cdef object value
 *     t = PyTuple_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_t = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":128
 *     cdef object value
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "carray.to_py":129
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 */
    __pyx_t_1 = __Pyx_PyInt_From_enum__CUaddress_mode_enum((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":130
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":131
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)             # <<<<<<<<<<<<<<
 *     return t
 */
    PyTuple_SET_ITEM(__pyx_v_t, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":132
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_t);
  __pyx_r = __pyx_v_t;
  goto __pyx_L0;

  /* "carray.to_py":124
 * 
 * @cname("__Pyx_carray_to_tuple_CUaddress_mode")
 * cdef inline tuple __Pyx_carray_to_tuple_CUaddress_mode(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_tuple_CUaddress_mode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_CUaddress_mode")
 * cdef int __Pyx_carray_from_py_CUaddress_mode(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

static int __Pyx_carray_from_py_CUaddress_mode(PyObject *__pyx_v_o, CUaddress_mode *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  CUaddress_mode __pyx_t_11;
  char const *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_from_py_CUaddress_mode", 0);
  __Pyx_TraceCall("__Pyx_carray_from_py_CUaddress_mode", __pyx_f[1], 77, 0, __PYX_ERR(1, 77, __pyx_L1_error));

  /* "carray.from_py":78
 * @cname("__Pyx_carray_from_py_CUaddress_mode")
 * cdef int __Pyx_carray_from_py_CUaddress_mode(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length             # <<<<<<<<<<<<<<
 *     try:
 *         i = len(o)
 */
  __pyx_v_i = __pyx_v_length;

  /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_CUaddress_mode(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "carray.from_py":80
 *     cdef Py_ssize_t i = length
 *     try:
 *         i = len(o)             # <<<<<<<<<<<<<<
 *     except (TypeError, OverflowError):
 *         pass
 */
      __pyx_t_4 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 80, __pyx_L3_error)
      __pyx_v_i = __pyx_t_4;

      /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_CUaddress_mode(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "carray.from_py":81
 *     try:
 *         i = len(o)
 *     except (TypeError, OverflowError):             # <<<<<<<<<<<<<<
 *         pass
 *     if i == length:
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_CUaddress_mode(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "carray.from_py":83
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  __pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);
  if (__pyx_t_6) {

    /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
      __pyx_t_7 = __pyx_v_o; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 84, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 84, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 84, __pyx_L1_error)
          #else
          __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 84, __pyx_L1_error)
          #else
          __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        }
      } else {
        __pyx_t_10 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_10)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 84, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_v_i = __pyx_t_4;
      __pyx_t_4 = (__pyx_t_4 + 1);

      /* "carray.from_py":85
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      __pyx_t_6 = ((__pyx_v_i >= __pyx_v_length) != 0);
      if (__pyx_t_6) {

        /* "carray.from_py":86
 *         for i, item in enumerate(o):
 *             if i >= length:
 *                 break             # <<<<<<<<<<<<<<
 *             v[i] = item
 *         else:
 */
        goto __pyx_L11_break;

        /* "carray.from_py":85
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      }

      /* "carray.from_py":87
 *             if i >= length:
 *                 break
 *             v[i] = item             # <<<<<<<<<<<<<<
 *         else:
 *             i += 1  # convert index to length
 */
      __pyx_t_11 = ((enum CUaddress_mode_enum)__Pyx_PyInt_As_enum__CUaddress_mode_enum(__pyx_v_item)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 87, __pyx_L1_error)
      (__pyx_v_v[__pyx_v_i]) = __pyx_t_11;

      /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    }
    /*else*/ {

      /* "carray.from_py":89
 *             v[i] = item
 *         else:
 *             i += 1  # convert index to length             # <<<<<<<<<<<<<<
 *             if i == length:
 *                 return 0
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "carray.from_py":90
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      __pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);
      if (__pyx_t_6) {

        /* "carray.from_py":91
 *             i += 1  # convert index to length
 *             if i == length:
 *                 return 0             # <<<<<<<<<<<<<<
 * 
 *     PyErr_Format(
 */
        __pyx_r = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L0;

        /* "carray.from_py":90
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      }
    }

    /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    __pyx_L11_break:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "carray.from_py":83
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  }

  /* "carray.from_py":96
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 *          if i >= length else             # <<<<<<<<<<<<<<
 *          "not enough values found during array assignment, expected %zd, got %zd"),
 *         length, i)
 */
  if (((__pyx_v_i >= __pyx_v_length) != 0)) {
    __pyx_t_12 = ((char const *)"too many values found during array assignment, expected %zd");
  } else {
    __pyx_t_12 = ((char const *)"not enough values found during array assignment, expected %zd, got %zd");
  }

  /* "carray.from_py":93
 *                 return 0
 * 
 *     PyErr_Format(             # <<<<<<<<<<<<<<
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 */
  __pyx_t_7 = PyErr_Format(__pyx_builtin_IndexError, __pyx_t_12, __pyx_v_length, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_CUaddress_mode")
 * cdef int __Pyx_carray_from_py_CUaddress_mode(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("carray.from_py.__Pyx_carray_from_py_CUaddress_mode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":112
 * 
 * @cname("__Pyx_carray_to_py_float")
 * cdef inline list __Pyx_carray_to_py_float(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_py_float(float *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_py_float", 0);
  __Pyx_TraceCall("__Pyx_carray_to_py_float", __pyx_f[1], 112, 0, __PYX_ERR(1, 112, __pyx_L1_error));

  /* "carray.to_py":115
 *     cdef size_t i
 *     cdef object value
 *     l = PyList_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyList_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":116
 *     cdef object value
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "carray.to_py":117
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 */
    __pyx_t_1 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":118
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyList_SET_ITEM(l, i, value)
 *     return l
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":119
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)             # <<<<<<<<<<<<<<
 *     return l
 * 
 */
    PyList_SET_ITEM(__pyx_v_l, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":120
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 *     return l             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_l);
  __pyx_r = __pyx_v_l;
  goto __pyx_L0;

  /* "carray.to_py":112
 * 
 * @cname("__Pyx_carray_to_py_float")
 * cdef inline list __Pyx_carray_to_py_float(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_py_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":124
 * 
 * @cname("__Pyx_carray_to_tuple_float")
 * cdef inline tuple __Pyx_carray_to_tuple_float(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_float(float *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_tuple_float", 0);
  __Pyx_TraceCall("__Pyx_carray_to_tuple_float", __pyx_f[1], 124, 0, __PYX_ERR(1, 124, __pyx_L1_error));

  /* "carray.to_py":127
 *     cdef size_t i
 *     cdef object value
 *     t = PyTuple_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_t = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":128
 *     cdef object value
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "carray.to_py":129
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 */
    __pyx_t_1 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":130
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":131
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)             # <<<<<<<<<<<<<<
 *     return t
 */
    PyTuple_SET_ITEM(__pyx_v_t, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":132
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_t);
  __pyx_r = __pyx_v_t;
  goto __pyx_L0;

  /* "carray.to_py":124
 * 
 * @cname("__Pyx_carray_to_tuple_float")
 * cdef inline tuple __Pyx_carray_to_tuple_float(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_tuple_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_float")
 * cdef int __Pyx_carray_from_py_float(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

static int __Pyx_carray_from_py_float(PyObject *__pyx_v_o, float *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  float __pyx_t_11;
  char const *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_from_py_float", 0);
  __Pyx_TraceCall("__Pyx_carray_from_py_float", __pyx_f[1], 77, 0, __PYX_ERR(1, 77, __pyx_L1_error));

  /* "carray.from_py":78
 * @cname("__Pyx_carray_from_py_float")
 * cdef int __Pyx_carray_from_py_float(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length             # <<<<<<<<<<<<<<
 *     try:
 *         i = len(o)
 */
  __pyx_v_i = __pyx_v_length;

  /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_float(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "carray.from_py":80
 *     cdef Py_ssize_t i = length
 *     try:
 *         i = len(o)             # <<<<<<<<<<<<<<
 *     except (TypeError, OverflowError):
 *         pass
 */
      __pyx_t_4 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 80, __pyx_L3_error)
      __pyx_v_i = __pyx_t_4;

      /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_float(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "carray.from_py":81
 *     try:
 *         i = len(o)
 *     except (TypeError, OverflowError):             # <<<<<<<<<<<<<<
 *         pass
 *     if i == length:
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "carray.from_py":79
 * cdef int __Pyx_carray_from_py_float(object o, base_type *v, Py_ssize_t length) except -1:
 *     cdef Py_ssize_t i = length
 *     try:             # <<<<<<<<<<<<<<
 *         i = len(o)
 *     except (TypeError, OverflowError):
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "carray.from_py":83
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  __pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);
  if (__pyx_t_6) {

    /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
      __pyx_t_7 = __pyx_v_o; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 84, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 84, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 84, __pyx_L1_error)
          #else
          __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 84, __pyx_L1_error)
          #else
          __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        }
      } else {
        __pyx_t_10 = __pyx_t_9(__pyx_t_7);
        if (unlikely(!__pyx_t_10)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(1, 84, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_v_i = __pyx_t_4;
      __pyx_t_4 = (__pyx_t_4 + 1);

      /* "carray.from_py":85
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      __pyx_t_6 = ((__pyx_v_i >= __pyx_v_length) != 0);
      if (__pyx_t_6) {

        /* "carray.from_py":86
 *         for i, item in enumerate(o):
 *             if i >= length:
 *                 break             # <<<<<<<<<<<<<<
 *             v[i] = item
 *         else:
 */
        goto __pyx_L11_break;

        /* "carray.from_py":85
 *     if i == length:
 *         for i, item in enumerate(o):
 *             if i >= length:             # <<<<<<<<<<<<<<
 *                 break
 *             v[i] = item
 */
      }

      /* "carray.from_py":87
 *             if i >= length:
 *                 break
 *             v[i] = item             # <<<<<<<<<<<<<<
 *         else:
 *             i += 1  # convert index to length
 */
      __pyx_t_11 = __pyx_PyFloat_AsFloat(__pyx_v_item); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) __PYX_ERR(1, 87, __pyx_L1_error)
      (__pyx_v_v[__pyx_v_i]) = __pyx_t_11;

      /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    }
    /*else*/ {

      /* "carray.from_py":89
 *             v[i] = item
 *         else:
 *             i += 1  # convert index to length             # <<<<<<<<<<<<<<
 *             if i == length:
 *                 return 0
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "carray.from_py":90
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      __pyx_t_6 = ((__pyx_v_i == __pyx_v_length) != 0);
      if (__pyx_t_6) {

        /* "carray.from_py":91
 *             i += 1  # convert index to length
 *             if i == length:
 *                 return 0             # <<<<<<<<<<<<<<
 * 
 *     PyErr_Format(
 */
        __pyx_r = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L0;

        /* "carray.from_py":90
 *         else:
 *             i += 1  # convert index to length
 *             if i == length:             # <<<<<<<<<<<<<<
 *                 return 0
 * 
 */
      }
    }

    /* "carray.from_py":84
 *         pass
 *     if i == length:
 *         for i, item in enumerate(o):             # <<<<<<<<<<<<<<
 *             if i >= length:
 *                 break
 */
    __pyx_L11_break:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "carray.from_py":83
 *     except (TypeError, OverflowError):
 *         pass
 *     if i == length:             # <<<<<<<<<<<<<<
 *         for i, item in enumerate(o):
 *             if i >= length:
 */
  }

  /* "carray.from_py":96
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 *          if i >= length else             # <<<<<<<<<<<<<<
 *          "not enough values found during array assignment, expected %zd, got %zd"),
 *         length, i)
 */
  if (((__pyx_v_i >= __pyx_v_length) != 0)) {
    __pyx_t_12 = ((char const *)"too many values found during array assignment, expected %zd");
  } else {
    __pyx_t_12 = ((char const *)"not enough values found during array assignment, expected %zd, got %zd");
  }

  /* "carray.from_py":93
 *                 return 0
 * 
 *     PyErr_Format(             # <<<<<<<<<<<<<<
 *         IndexError,
 *         ("too many values found during array assignment, expected %zd"
 */
  __pyx_t_7 = PyErr_Format(__pyx_builtin_IndexError, __pyx_t_12, __pyx_v_length, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "carray.from_py":77
 * 
 * @cname("__Pyx_carray_from_py_float")
 * cdef int __Pyx_carray_from_py_float(object o, base_type *v, Py_ssize_t length) except -1:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = length
 *     try:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("carray.from_py.__Pyx_carray_from_py_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.from_py":45
 * 
 * @cname("__pyx_convert_vector_from_py_CUjit_option")
 * cdef vector[X] __pyx_convert_vector_from_py_CUjit_option(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef vector[X] v
 *     for item in o:
 */

static std::vector<CUjit_option>  __pyx_convert_vector_from_py_CUjit_option(PyObject *__pyx_v_o) {
  std::vector<CUjit_option>  __pyx_v_v;
  PyObject *__pyx_v_item = NULL;
  std::vector<CUjit_option>  __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  CUjit_option __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_CUjit_option", 0);
  __Pyx_TraceCall("__pyx_convert_vector_from_py_CUjit_option", __pyx_f[1], 45, 0, __PYX_ERR(1, 45, __pyx_L1_error));

  /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_CUjit_option(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 47, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "vector.from_py":48
 *     cdef vector[X] v
 *     for item in o:
 *         v.push_back(<X>item)             # <<<<<<<<<<<<<<
 *     return v
 * 
 */
    __pyx_t_5 = ((enum CUjit_option_enum)__Pyx_PyInt_As_enum__CUjit_option_enum(__pyx_v_item)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error)
    __pyx_v_v.push_back(((CUjit_option)__pyx_t_5));

    /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_CUjit_option(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vector.from_py":49
 *     for item in o:
 *         v.push_back(<X>item)
 *     return v             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  /* "vector.from_py":45
 * 
 * @cname("__pyx_convert_vector_from_py_CUjit_option")
 * cdef vector[X] __pyx_convert_vector_from_py_CUjit_option(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef vector[X] v
 *     for item in o:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_CUjit_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static std::vector<size_t>  __pyx_convert_vector_from_py_size_t(PyObject *__pyx_v_o) {
  std::vector<size_t>  __pyx_v_v;
  PyObject *__pyx_v_item = NULL;
  std::vector<size_t>  __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_size_t", 0);
  __Pyx_TraceCall("__pyx_convert_vector_from_py_size_t", __pyx_f[1], 45, 0, __PYX_ERR(1, 45, __pyx_L1_error));

  /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_size_t(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 47, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "vector.from_py":48
 *     cdef vector[X] v
 *     for item in o:
 *         v.push_back(<X>item)             # <<<<<<<<<<<<<<
 *     return v
 * 
 */
    __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_item); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error)
    __pyx_v_v.push_back(((size_t)__pyx_t_5));

    /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_size_t(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vector.from_py":49
 *     for item in o:
 *         v.push_back(<X>item)
 *     return v             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  /* "vector.from_py":45
 * 
 * @cname("__pyx_convert_vector_from_py_size_t")
 * cdef vector[X] __pyx_convert_vector_from_py_size_t(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef vector[X] v
 *     for item in o:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_size_t", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static std::vector<CUmem_range_attribute>  __pyx_convert_vector_from_py_CUmem_range_attribute(PyObject *__pyx_v_o) {
  std::vector<CUmem_range_attribute>  __pyx_v_v;
  PyObject *__pyx_v_item = NULL;
  std::vector<CUmem_range_attribute>  __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  CUmem_range_attribute __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_CUmem_range_attribute", 0);
  __Pyx_TraceCall("__pyx_convert_vector_from_py_CUmem_range_attribute", __pyx_f[1], 45, 0, __PYX_ERR(1, 45, __pyx_L1_error));

  /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_CUmem_range_attribute(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 47, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "vector.from_py":48
 *     cdef vector[X] v
 *     for item in o:
 *         v.push_back(<X>item)             # <<<<<<<<<<<<<<
 *     return v
 * 
 */
    __pyx_t_5 = ((enum CUmem_range_attribute_enum)__Pyx_PyInt_As_enum__CUmem_range_attribute_enum(__pyx_v_item)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error)
    __pyx_v_v.push_back(((CUmem_range_attribute)__pyx_t_5));

    /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_CUmem_range_attribute(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vector.from_py":49
 *     for item in o:
 *         v.push_back(<X>item)
 *     return v             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  /* "vector.from_py":45
 * 
 * @cname("__pyx_convert_vector_from_py_CUmem_range_attribute")
 * cdef vector[X] __pyx_convert_vector_from_py_CUmem_range_attribute(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef vector[X] v
 *     for item in o:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_CUmem_range_attribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static std::vector<CUpointer_attribute>  __pyx_convert_vector_from_py_CUpointer_attribute(PyObject *__pyx_v_o) {
  std::vector<CUpointer_attribute>  __pyx_v_v;
  PyObject *__pyx_v_item = NULL;
  std::vector<CUpointer_attribute>  __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  CUpointer_attribute __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_CUpointer_attribute", 0);
  __Pyx_TraceCall("__pyx_convert_vector_from_py_CUpointer_attribute", __pyx_f[1], 45, 0, __PYX_ERR(1, 45, __pyx_L1_error));

  /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_CUpointer_attribute(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 47, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 47, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 47, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "vector.from_py":48
 *     cdef vector[X] v
 *     for item in o:
 *         v.push_back(<X>item)             # <<<<<<<<<<<<<<
 *     return v
 * 
 */
    __pyx_t_5 = ((enum CUpointer_attribute_enum)__Pyx_PyInt_As_enum__CUpointer_attribute_enum(__pyx_v_item)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 48, __pyx_L1_error)
    __pyx_v_v.push_back(((CUpointer_attribute)__pyx_t_5));

    /* "vector.from_py":47
 * cdef vector[X] __pyx_convert_vector_from_py_CUpointer_attribute(object o) except *:
 *     cdef vector[X] v
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 *     return v
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vector.from_py":49
 *     for item in o:
 *         v.push_back(<X>item)
 *     return v             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  /* "vector.from_py":45
 * 
 * @cname("__pyx_convert_vector_from_py_CUpointer_attribute")
 * cdef vector[X] __pyx_convert_vector_from_py_CUpointer_attribute(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef vector[X] v
 *     for item in o:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_CUpointer_attribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_TraceReturn(Py_None, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_4cuda_4cuda_CUcontext(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_9CUcontext_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUcontext(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUcontext[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUcontext_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_9CUcontext_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUcontext_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_9CUcontext_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUcontext_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_9CUcontext_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUcontext = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_9CUcontext_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_9CUcontext_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_9CUcontext_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUcontext = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUcontext", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUcontext), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUcontext, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_9CUcontext_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUcontext, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUcontext(*args, **kwargs)\n\n\n    CUDA context\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUcontext, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_9CUcontext_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUcontext, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmodule(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_8CUmodule_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUmodule(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUmodule[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUmodule_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUmodule_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUmodule_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUmodule_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUmodule_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_8CUmodule_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUmodule = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_8CUmodule_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_8CUmodule_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_8CUmodule_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUmodule = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmodule", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmodule), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmodule, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_8CUmodule_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUmodule, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUmodule(*args, **kwargs)\n\n\n    CUDA module\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUmodule, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_8CUmodule_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmodule, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUfunction(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_10CUfunction_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUfunction(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUfunction[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_10CUfunction_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_10CUfunction_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10CUfunction_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_10CUfunction_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10CUfunction_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_10CUfunction_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUfunction = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_10CUfunction_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_10CUfunction_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_10CUfunction_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUfunction = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUfunction", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUfunction), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUfunction, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_10CUfunction_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUfunction, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUfunction(*args, **kwargs)\n\n\n    CUDA function\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUfunction, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_10CUfunction_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUfunction, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUarray(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_7CUarray_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUarray(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUarray[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUarray_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_7CUarray_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUarray_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_7CUarray_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUarray_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_7CUarray_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUarray = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_7CUarray_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_7CUarray_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_7CUarray_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUarray = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUarray", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUarray), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUarray, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_7CUarray_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUarray, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUarray(*args, **kwargs)\n\n\n    CUDA array\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUarray, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_7CUarray_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUarray, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmipmappedArray(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_16CUmipmappedArray_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUmipmappedArray(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUmipmappedArray[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUmipmappedArray_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUmipmappedArray_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUmipmappedArray_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUmipmappedArray_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUmipmappedArray_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16CUmipmappedArray_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUmipmappedArray = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_16CUmipmappedArray_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_16CUmipmappedArray_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_16CUmipmappedArray_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUmipmappedArray = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmipmappedArray", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmipmappedArray), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmipmappedArray, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_16CUmipmappedArray_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUmipmappedArray, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUmipmappedArray(*args, **kwargs)\n\n\n    CUDA mipmapped array\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUmipmappedArray, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_16CUmipmappedArray_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmipmappedArray, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUtexref(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_8CUtexref_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUtexref(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUtexref[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUtexref_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUtexref_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUtexref_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUtexref_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUtexref_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_8CUtexref_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUtexref = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_8CUtexref_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_8CUtexref_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_8CUtexref_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUtexref = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUtexref", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUtexref), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUtexref, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_8CUtexref_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUtexref, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUtexref(*args, **kwargs)\n\n\n    CUDA texture reference\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUtexref, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_8CUtexref_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUtexref, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUsurfref(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_9CUsurfref_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUsurfref(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUsurfref[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUsurfref_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_9CUsurfref_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUsurfref_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_9CUsurfref_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUsurfref_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_9CUsurfref_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUsurfref = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_9CUsurfref_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_9CUsurfref_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_9CUsurfref_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUsurfref = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUsurfref", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUsurfref), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUsurfref, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_9CUsurfref_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUsurfref, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUsurfref(*args, **kwargs)\n\n\n    CUDA surface reference\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUsurfref, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_9CUsurfref_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUsurfref, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUevent(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_7CUevent_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUevent(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUevent[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUevent_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_7CUevent_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUevent_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_7CUevent_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUevent_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_7CUevent_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUevent = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_7CUevent_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_7CUevent_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_7CUevent_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUevent = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUevent", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUevent), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUevent, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_7CUevent_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUevent, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUevent(*args, **kwargs)\n\n\n    CUDA event\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUevent, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_7CUevent_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUevent, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUstream(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_8CUstream_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUstream(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUstream[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUstream_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUstream_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUstream_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUstream_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUstream_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_8CUstream_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUstream = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_8CUstream_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_8CUstream_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_8CUstream_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUstream = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUstream", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUstream), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUstream, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_8CUstream_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUstream, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUstream(*args, **kwargs)\n\n\n    CUDA stream\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUstream, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_8CUstream_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUstream, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUgraphicsResource(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_18CUgraphicsResource_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUgraphicsResource(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUgraphicsResource[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUgraphicsResource_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_18CUgraphicsResource_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUgraphicsResource_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_18CUgraphicsResource_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUgraphicsResource_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_18CUgraphicsResource_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUgraphicsResource = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_18CUgraphicsResource_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_18CUgraphicsResource_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_18CUgraphicsResource_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUgraphicsResource = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUgraphicsResource", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUgraphicsResource), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUgraphicsResource, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_18CUgraphicsResource_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUgraphicsResource, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUgraphicsResource(*args, **kwargs)\n\n\n    CUDA graphics interop resource\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUgraphicsResource, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_18CUgraphicsResource_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUgraphicsResource, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUexternalMemory(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_16CUexternalMemory_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUexternalMemory(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUexternalMemory[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUexternalMemory_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUexternalMemory_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUexternalMemory_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUexternalMemory_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUexternalMemory_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16CUexternalMemory_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUexternalMemory = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_16CUexternalMemory_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_16CUexternalMemory_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_16CUexternalMemory_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUexternalMemory = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUexternalMemory", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUexternalMemory), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUexternalMemory, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_16CUexternalMemory_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUexternalMemory, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUexternalMemory(*args, **kwargs)\n\n\n    CUDA external memory\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUexternalMemory, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_16CUexternalMemory_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUexternalMemory, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUexternalSemaphore(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUexternalSemaphore(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUexternalSemaphore[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_19CUexternalSemaphore_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_19CUexternalSemaphore_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_19CUexternalSemaphore_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_19CUexternalSemaphore_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUexternalSemaphore = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_19CUexternalSemaphore_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_19CUexternalSemaphore_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_19CUexternalSemaphore_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUexternalSemaphore = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUexternalSemaphore", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUexternalSemaphore), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUexternalSemaphore, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_19CUexternalSemaphore_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUexternalSemaphore, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUexternalSemaphore(*args, **kwargs)\n\n\n    CUDA external semaphore\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUexternalSemaphore, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_19CUexternalSemaphore_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUexternalSemaphore, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUgraph(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_7CUgraph_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUgraph(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUgraph[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUgraph_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_7CUgraph_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUgraph_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_7CUgraph_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_7CUgraph_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_7CUgraph_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUgraph = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_7CUgraph_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_7CUgraph_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_7CUgraph_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUgraph = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUgraph", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUgraph), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUgraph, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_7CUgraph_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUgraph, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUgraph(*args, **kwargs)\n\n\n    CUDA graph\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUgraph, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_7CUgraph_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUgraph, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUgraphNode(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_11CUgraphNode_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUgraphNode(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUgraphNode[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUgraphNode_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUgraphNode_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUgraphNode_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUgraphNode_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUgraphNode_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11CUgraphNode_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUgraphNode = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_11CUgraphNode_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_11CUgraphNode_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_11CUgraphNode_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUgraphNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUgraphNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUgraphNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUgraphNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_11CUgraphNode_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUgraphNode, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUgraphNode(*args, **kwargs)\n\n\n    CUDA graph node\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUgraphNode, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_11CUgraphNode_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUgraphNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUgraphExec(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_11CUgraphExec_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUgraphExec(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUgraphExec[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUgraphExec_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUgraphExec_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUgraphExec_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUgraphExec_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUgraphExec_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11CUgraphExec_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUgraphExec = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_11CUgraphExec_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_11CUgraphExec_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_11CUgraphExec_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUgraphExec = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUgraphExec", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUgraphExec), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUgraphExec, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_11CUgraphExec_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUgraphExec, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUgraphExec(*args, **kwargs)\n\n\n    CUDA executable graph\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUgraphExec, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_11CUgraphExec_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUgraphExec, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemoryPool(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_12CUmemoryPool_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUmemoryPool(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUmemoryPool[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUmemoryPool_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUmemoryPool_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUmemoryPool_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUmemoryPool_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUmemoryPool_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_12CUmemoryPool_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUmemoryPool = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_12CUmemoryPool_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_12CUmemoryPool_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_12CUmemoryPool_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemoryPool = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemoryPool", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemoryPool), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemoryPool, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_12CUmemoryPool_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUmemoryPool, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUmemoryPool(*args, **kwargs)\n\n\n    CUDA memory pool\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUmemoryPool, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_12CUmemoryPool_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemoryPool, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUuserObject(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_12CUuserObject_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUuserObject(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUuserObject[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUuserObject_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUuserObject_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUuserObject_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUuserObject_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUuserObject_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_12CUuserObject_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUuserObject = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_12CUuserObject_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_12CUuserObject_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_12CUuserObject_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUuserObject = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUuserObject", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUuserObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUuserObject, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_12CUuserObject_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUuserObject, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUuserObject(*args, **kwargs)\n\n\n    CUDA user object for graphs\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUuserObject, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_12CUuserObject_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUuserObject, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUlinkState(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUlinkState *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUlinkState *)o);
  p->_keepalive = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_11CUlinkState_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUlinkState(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUlinkState *p = (struct __pyx_obj_4cuda_4cuda_CUlinkState *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_keepalive);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUlinkState(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUlinkState *p = (struct __pyx_obj_4cuda_4cuda_CUlinkState *)o;
  if (p->_keepalive) {
    e = (*v)(p->_keepalive, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUlinkState(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUlinkState *p = (struct __pyx_obj_4cuda_4cuda_CUlinkState *)o;
  tmp = ((PyObject*)p->_keepalive);
  p->_keepalive = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUlinkState[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUlinkState_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUlinkState_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUlinkState_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUlinkState_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUlinkState_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11CUlinkState_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUlinkState = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_11CUlinkState_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_11CUlinkState_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_11CUlinkState_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUlinkState = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUlinkState", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUlinkState), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUlinkState, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_11CUlinkState_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUlinkState, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUlinkState(*args, **kwargs)\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUlinkState, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUlinkState, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUlinkState, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_11CUlinkState_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUlinkState, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_EGLImageKHR(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_11EGLImageKHR_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_EGLImageKHR(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_EGLImageKHR[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11EGLImageKHR_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11EGLImageKHR_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11EGLImageKHR_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11EGLImageKHR_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11EGLImageKHR_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11EGLImageKHR_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_EGLImageKHR = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_11EGLImageKHR_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_11EGLImageKHR_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_11EGLImageKHR_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_EGLImageKHR = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.EGLImageKHR", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_EGLImageKHR), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_EGLImageKHR, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_11EGLImageKHR_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_EGLImageKHR, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "EGLImageKHR(*args, **kwargs)\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_EGLImageKHR, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_11EGLImageKHR_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_EGLImageKHR, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_EGLStreamKHR(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_12EGLStreamKHR_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_EGLStreamKHR(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_EGLStreamKHR[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_12EGLStreamKHR_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_12EGLStreamKHR_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12EGLStreamKHR_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_12EGLStreamKHR_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12EGLStreamKHR_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_12EGLStreamKHR_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_EGLStreamKHR = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_12EGLStreamKHR_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_12EGLStreamKHR_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_12EGLStreamKHR_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_EGLStreamKHR = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.EGLStreamKHR", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_EGLStreamKHR), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_EGLStreamKHR, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_12EGLStreamKHR_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_EGLStreamKHR, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "EGLStreamKHR(*args, **kwargs)\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_EGLStreamKHR, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_12EGLStreamKHR_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_EGLStreamKHR, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_EGLSyncKHR(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_10EGLSyncKHR_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_EGLSyncKHR(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_EGLSyncKHR[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_10EGLSyncKHR_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_10EGLSyncKHR_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10EGLSyncKHR_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_10EGLSyncKHR_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10EGLSyncKHR_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_10EGLSyncKHR_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_EGLSyncKHR = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_10EGLSyncKHR_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_10EGLSyncKHR_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_10EGLSyncKHR_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_EGLSyncKHR = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.EGLSyncKHR", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_EGLSyncKHR), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_EGLSyncKHR, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_10EGLSyncKHR_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_EGLSyncKHR, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "EGLSyncKHR(*args, **kwargs)\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_EGLSyncKHR, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_10EGLSyncKHR_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_EGLSyncKHR, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUeglStreamConnection(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUeglStreamConnection(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUeglStreamConnection[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUeglStreamConnection_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUeglStreamConnection_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUeglStreamConnection_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_21CUeglStreamConnection_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUeglStreamConnection = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_21CUeglStreamConnection_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_21CUeglStreamConnection_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_21CUeglStreamConnection_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUeglStreamConnection = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUeglStreamConnection", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUeglStreamConnection), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUeglStreamConnection, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_21CUeglStreamConnection_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUeglStreamConnection, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUeglStreamConnection(*args, **kwargs)\n\n\n    CUDA EGLSream Connection\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUeglStreamConnection, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_21CUeglStreamConnection_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUeglStreamConnection, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUhostFn(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_8CUhostFn_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUhostFn(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUhostFn[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUhostFn_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUhostFn_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUhostFn_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUhostFn_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUhostFn_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_8CUhostFn_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUhostFn = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_8CUhostFn_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_8CUhostFn_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_8CUhostFn_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUhostFn = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUhostFn", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUhostFn), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUhostFn, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_8CUhostFn_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUhostFn, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUhostFn(*args, **kwargs)\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUhostFn, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_8CUhostFn_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUhostFn, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamCallback(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_16CUstreamCallback_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUstreamCallback(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUstreamCallback[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUstreamCallback_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUstreamCallback_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUstreamCallback_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUstreamCallback_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUstreamCallback_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16CUstreamCallback_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUstreamCallback = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_16CUstreamCallback_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_16CUstreamCallback_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_16CUstreamCallback_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUstreamCallback = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUstreamCallback", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUstreamCallback), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUstreamCallback, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_16CUstreamCallback_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUstreamCallback, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUstreamCallback(*args, **kwargs)\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUstreamCallback, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_16CUstreamCallback_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUstreamCallback, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUoccupancyB2DSize(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUoccupancyB2DSize(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUoccupancyB2DSize[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_11getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_18CUoccupancyB2DSize_10getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_13__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_18CUoccupancyB2DSize_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_15__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_18CUoccupancyB2DSize_14__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUoccupancyB2DSize = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_9__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_9__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  __pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_7__index__, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUoccupancyB2DSize = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUoccupancyB2DSize", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUoccupancyB2DSize), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUoccupancyB2DSize, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUoccupancyB2DSize, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUoccupancyB2DSize(*args, **kwargs)\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUoccupancyB2DSize, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_18CUoccupancyB2DSize_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUoccupancyB2DSize, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUuuid_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_9CUuuid_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUuuid_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_9CUuuid_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_9CUuuid_st_bytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_9CUuuid_st_5bytes_1__get__(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUuuid_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUuuid_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_9CUuuid_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUuuid_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_9CUuuid_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9CUuuid_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_9CUuuid_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUuuid_st[] = {
  {(char *)"bytes", __pyx_getprop_4cuda_4cuda_9CUuuid_st_bytes, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUuuid_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUuuid_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUuuid_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUuuid_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_9CUuuid_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUuuid_st(void_ptr _ptr=0)\n\n\n    Attributes\n    ----------\n    bytes : bytes\n        < CUDA definition of UUID\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUuuid_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUuuid_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_9CUuuid_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUuuid_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUipcEventHandle_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUipcEventHandle_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_19CUipcEventHandle_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_19CUipcEventHandle_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUipcEventHandle_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_19CUipcEventHandle_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_19CUipcEventHandle_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_19CUipcEventHandle_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUipcEventHandle_st[] = {
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_19CUipcEventHandle_st_reserved, __pyx_setprop_4cuda_4cuda_19CUipcEventHandle_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUipcEventHandle_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUipcEventHandle_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUipcEventHandle_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUipcEventHandle_st(void_ptr _ptr=0)\n\n    CUDA IPC event handle\n\n    Attributes\n    ----------\n    reserved : bytes\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUipcEventHandle_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUipcEventHandle_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUipcEventHandle_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUipcMemHandle_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUipcMemHandle_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUipcMemHandle_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUipcMemHandle_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUipcMemHandle_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUipcMemHandle_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUipcMemHandle_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_17CUipcMemHandle_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUipcMemHandle_st[] = {
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_17CUipcMemHandle_st_reserved, __pyx_setprop_4cuda_4cuda_17CUipcMemHandle_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUipcMemHandle_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUipcMemHandle_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUipcMemHandle_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUipcMemHandle_st(void_ptr _ptr=0)\n\n    CUDA IPC mem handle\n\n    Attributes\n    ----------\n    reserved : bytes\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUipcMemHandle_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUipcMemHandle_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUipcMemHandle_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamMemOpWaitValueParams_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)o);
  p->_address = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  p->_value64 = ((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)Py_None); Py_INCREF(Py_None);
  p->_alias = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUstreamMemOpWaitValueParams_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *p = (struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_address);
  Py_CLEAR(p->_value64);
  Py_CLEAR(p->_alias);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUstreamMemOpWaitValueParams_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *p = (struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)o;
  if (p->_address) {
    e = (*v)(((PyObject *)p->_address), a); if (e) return e;
  }
  if (p->_value64) {
    e = (*v)(((PyObject *)p->_value64), a); if (e) return e;
  }
  if (p->_alias) {
    e = (*v)(((PyObject *)p->_alias), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUstreamMemOpWaitValueParams_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *p = (struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)o;
  tmp = ((PyObject*)p->_address);
  p->_address = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_value64);
  p->_value64 = ((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_alias);
  p->_alias = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_operation(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9operation_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_operation(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9operation_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_address(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7address_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_address(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7address_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_value64(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7value64_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_value64(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7value64_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_alias(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5alias_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_alias(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5alias_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUstreamMemOpWaitValueParams_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUstreamMemOpWaitValueParams_st[] = {
  {(char *)"operation", __pyx_getprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_operation, __pyx_setprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_operation, (char *)0, 0},
  {(char *)"address", __pyx_getprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_address, __pyx_setprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_address, (char *)0, 0},
  {(char *)"value64", __pyx_getprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_value64, __pyx_setprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_value64, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_flags, __pyx_setprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_flags, (char *)0, 0},
  {(char *)"alias", __pyx_getprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_alias, __pyx_setprop_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_alias, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUstreamMemOpWaitValueParams_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUstreamMemOpWaitValueParams_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUstreamMemOpWaitValueParams_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUstreamMemOpWaitValueParams_st(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    operation : CUstreamBatchMemOpType\n\n    address : CUdeviceptr\n\n    value64 : cuuint64_t\n\n    flags : unsigned int\n\n    alias : CUdeviceptr\n        For driver internal use. Initial value is unimportant.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUstreamMemOpWaitValueParams_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUstreamMemOpWaitValueParams_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUstreamMemOpWaitValueParams_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUstreamMemOpWaitValueParams_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUstreamMemOpWaitValueParams_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamMemOpWriteValueParams_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)o);
  p->_address = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  p->_value64 = ((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)Py_None); Py_INCREF(Py_None);
  p->_alias = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUstreamMemOpWriteValueParams_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *p = (struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_address);
  Py_CLEAR(p->_value64);
  Py_CLEAR(p->_alias);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUstreamMemOpWriteValueParams_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *p = (struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)o;
  if (p->_address) {
    e = (*v)(((PyObject *)p->_address), a); if (e) return e;
  }
  if (p->_value64) {
    e = (*v)(((PyObject *)p->_value64), a); if (e) return e;
  }
  if (p->_alias) {
    e = (*v)(((PyObject *)p->_alias), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUstreamMemOpWriteValueParams_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *p = (struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)o;
  tmp = ((PyObject*)p->_address);
  p->_address = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_value64);
  p->_value64 = ((struct __pyx_obj_4cuda_4cuda_cuuint64_t *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_alias);
  p->_alias = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_operation(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9operation_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_operation(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9operation_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_address(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7address_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_address(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7address_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_value64(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7value64_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_value64(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7value64_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_alias(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5alias_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_alias(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5alias_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUstreamMemOpWriteValueParams_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUstreamMemOpWriteValueParams_st[] = {
  {(char *)"operation", __pyx_getprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_operation, __pyx_setprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_operation, (char *)0, 0},
  {(char *)"address", __pyx_getprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_address, __pyx_setprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_address, (char *)0, 0},
  {(char *)"value64", __pyx_getprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_value64, __pyx_setprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_value64, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_flags, __pyx_setprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_flags, (char *)0, 0},
  {(char *)"alias", __pyx_getprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_alias, __pyx_setprop_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_alias, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUstreamMemOpWriteValueParams_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUstreamMemOpWriteValueParams_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUstreamMemOpWriteValueParams_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUstreamMemOpWriteValueParams_st(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    operation : CUstreamBatchMemOpType\n\n    address : CUdeviceptr\n\n    value64 : cuuint64_t\n\n    flags : unsigned int\n\n    alias : CUdeviceptr\n        For driver internal use. Initial value is unimportant.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUstreamMemOpWriteValueParams_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUstreamMemOpWriteValueParams_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUstreamMemOpWriteValueParams_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUstreamMemOpWriteValueParams_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUstreamMemOpWriteValueParams_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_operation(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9operation_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_operation(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9operation_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st[] = {
  {(char *)"operation", __pyx_getprop_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_operation, __pyx_setprop_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_operation, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_flags, __pyx_setprop_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_flags, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUstreamMemOpFlushRemoteWritesParams_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUstreamMemOpFlushRemoteWritesParams_st(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    operation : CUstreamBatchMemOpType\n\n    flags : unsigned int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_operation(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9operation_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_operation(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9operation_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st[] = {
  {(char *)"operation", __pyx_getprop_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_operation, __pyx_setprop_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_operation, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_flags, __pyx_setprop_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_flags, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUstreamMemOpMemoryBarrierParams_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUstreamMemOpMemoryBarrierParams_st(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    operation : CUstreamBatchMemOpType\n        < Only supported in the _v2 API\n    flags : unsigned int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamBatchMemOpParams_union(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)o);
  p->_waitValue = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)Py_None); Py_INCREF(Py_None);
  p->_writeValue = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)Py_None); Py_INCREF(Py_None);
  p->_flushRemoteWrites = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)Py_None); Py_INCREF(Py_None);
  p->_memoryBarrier = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUstreamBatchMemOpParams_union(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *p = (struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_waitValue);
  Py_CLEAR(p->_writeValue);
  Py_CLEAR(p->_flushRemoteWrites);
  Py_CLEAR(p->_memoryBarrier);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUstreamBatchMemOpParams_union(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *p = (struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)o;
  if (p->_waitValue) {
    e = (*v)(((PyObject *)p->_waitValue), a); if (e) return e;
  }
  if (p->_writeValue) {
    e = (*v)(((PyObject *)p->_writeValue), a); if (e) return e;
  }
  if (p->_flushRemoteWrites) {
    e = (*v)(((PyObject *)p->_flushRemoteWrites), a); if (e) return e;
  }
  if (p->_memoryBarrier) {
    e = (*v)(((PyObject *)p->_memoryBarrier), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUstreamBatchMemOpParams_union(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *p = (struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union *)o;
  tmp = ((PyObject*)p->_waitValue);
  p->_waitValue = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWaitValueParams_st *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_writeValue);
  p->_writeValue = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpWriteValueParams_st *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_flushRemoteWrites);
  p->_flushRemoteWrites = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_memoryBarrier);
  p->_memoryBarrier = ((struct __pyx_obj_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_operation(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9operation_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_operation(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9operation_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_waitValue(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9waitValue_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_waitValue(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9waitValue_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_writeValue(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10writeValue_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_writeValue(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10writeValue_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_flushRemoteWrites(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_17flushRemoteWrites_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_flushRemoteWrites(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_17flushRemoteWrites_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_memoryBarrier(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13memoryBarrier_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_memoryBarrier(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13memoryBarrier_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_pad(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3pad_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_pad(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3pad_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUstreamBatchMemOpParams_union[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_30CUstreamBatchMemOpParams_union_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_30CUstreamBatchMemOpParams_union_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_30CUstreamBatchMemOpParams_union_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUstreamBatchMemOpParams_union[] = {
  {(char *)"operation", __pyx_getprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_operation, __pyx_setprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_operation, (char *)0, 0},
  {(char *)"waitValue", __pyx_getprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_waitValue, __pyx_setprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_waitValue, (char *)0, 0},
  {(char *)"writeValue", __pyx_getprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_writeValue, __pyx_setprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_writeValue, (char *)0, 0},
  {(char *)"flushRemoteWrites", __pyx_getprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_flushRemoteWrites, __pyx_setprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_flushRemoteWrites, (char *)0, 0},
  {(char *)"memoryBarrier", __pyx_getprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_memoryBarrier, __pyx_setprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_memoryBarrier, (char *)0, 0},
  {(char *)"pad", __pyx_getprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_pad, __pyx_setprop_4cuda_4cuda_30CUstreamBatchMemOpParams_union_pad, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_union = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUstreamBatchMemOpParams_union", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_union), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUstreamBatchMemOpParams_union, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUstreamBatchMemOpParams_union(void_ptr _ptr=0)\n\n    Per-operation parameters for cuStreamBatchMemOp\n\n    Attributes\n    ----------\n    operation : CUstreamBatchMemOpType\n\n    waitValue : CUstreamMemOpWaitValueParams_st\n\n    writeValue : CUstreamMemOpWriteValueParams_st\n\n    flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st\n\n    memoryBarrier : CUstreamMemOpMemoryBarrierParams_st\n\n    pad : List[cuuint64_t]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUstreamBatchMemOpParams_union, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUstreamBatchMemOpParams_union, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUstreamBatchMemOpParams_union, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUstreamBatchMemOpParams_union, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUstreamBatchMemOpParams_union, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)o);
  p->_ctx = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_ctx);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)o;
  if (p->_ctx) {
    e = (*v)(((PyObject *)p->_ctx), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st *)o;
  tmp = ((PyObject*)p->_ctx);
  p->_ctx = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_ctx(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3ctx_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_ctx(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3ctx_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_count(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5count_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_count(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5count_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_paramArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10paramArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_paramArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10paramArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st[] = {
  {(char *)"ctx", __pyx_getprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_ctx, __pyx_setprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_ctx, (char *)0, 0},
  {(char *)"count", __pyx_getprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_count, __pyx_setprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_count, (char *)0, 0},
  {(char *)"paramArray", __pyx_getprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_paramArray, __pyx_setprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_paramArray, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_flags, __pyx_setprop_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_flags, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_BATCH_MEM_OP_NODE_PARAMS_st(void_ptr _ptr=0)\n\n\n    Attributes\n    ----------\n    ctx : CUcontext\n\n    count : unsigned int\n\n    paramArray : CUstreamBatchMemOpParams\n\n    flags : unsigned int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUdevprop_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_12CUdevprop_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUdevprop_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_12CUdevprop_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_12CUdevprop_st_maxThreadsPerBlock(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_12CUdevprop_st_18maxThreadsPerBlock_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_12CUdevprop_st_maxThreadsPerBlock(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_12CUdevprop_st_18maxThreadsPerBlock_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_12CUdevprop_st_maxThreadsDim(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_12CUdevprop_st_13maxThreadsDim_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_12CUdevprop_st_maxThreadsDim(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_12CUdevprop_st_13maxThreadsDim_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_12CUdevprop_st_maxGridSize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_12CUdevprop_st_11maxGridSize_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_12CUdevprop_st_maxGridSize(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_12CUdevprop_st_11maxGridSize_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_12CUdevprop_st_sharedMemPerBlock(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_12CUdevprop_st_17sharedMemPerBlock_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_12CUdevprop_st_sharedMemPerBlock(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_12CUdevprop_st_17sharedMemPerBlock_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_12CUdevprop_st_totalConstantMemory(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_12CUdevprop_st_19totalConstantMemory_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_12CUdevprop_st_totalConstantMemory(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_12CUdevprop_st_19totalConstantMemory_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_12CUdevprop_st_SIMDWidth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_12CUdevprop_st_9SIMDWidth_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_12CUdevprop_st_SIMDWidth(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_12CUdevprop_st_9SIMDWidth_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_12CUdevprop_st_memPitch(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_12CUdevprop_st_8memPitch_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_12CUdevprop_st_memPitch(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_12CUdevprop_st_8memPitch_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_12CUdevprop_st_regsPerBlock(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_12CUdevprop_st_12regsPerBlock_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_12CUdevprop_st_regsPerBlock(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_12CUdevprop_st_12regsPerBlock_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_12CUdevprop_st_clockRate(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_12CUdevprop_st_9clockRate_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_12CUdevprop_st_clockRate(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_12CUdevprop_st_9clockRate_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_12CUdevprop_st_textureAlign(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_12CUdevprop_st_12textureAlign_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_12CUdevprop_st_textureAlign(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_12CUdevprop_st_12textureAlign_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUdevprop_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUdevprop_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUdevprop_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUdevprop_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUdevprop_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUdevprop_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_12CUdevprop_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUdevprop_st[] = {
  {(char *)"maxThreadsPerBlock", __pyx_getprop_4cuda_4cuda_12CUdevprop_st_maxThreadsPerBlock, __pyx_setprop_4cuda_4cuda_12CUdevprop_st_maxThreadsPerBlock, (char *)0, 0},
  {(char *)"maxThreadsDim", __pyx_getprop_4cuda_4cuda_12CUdevprop_st_maxThreadsDim, __pyx_setprop_4cuda_4cuda_12CUdevprop_st_maxThreadsDim, (char *)0, 0},
  {(char *)"maxGridSize", __pyx_getprop_4cuda_4cuda_12CUdevprop_st_maxGridSize, __pyx_setprop_4cuda_4cuda_12CUdevprop_st_maxGridSize, (char *)0, 0},
  {(char *)"sharedMemPerBlock", __pyx_getprop_4cuda_4cuda_12CUdevprop_st_sharedMemPerBlock, __pyx_setprop_4cuda_4cuda_12CUdevprop_st_sharedMemPerBlock, (char *)0, 0},
  {(char *)"totalConstantMemory", __pyx_getprop_4cuda_4cuda_12CUdevprop_st_totalConstantMemory, __pyx_setprop_4cuda_4cuda_12CUdevprop_st_totalConstantMemory, (char *)0, 0},
  {(char *)"SIMDWidth", __pyx_getprop_4cuda_4cuda_12CUdevprop_st_SIMDWidth, __pyx_setprop_4cuda_4cuda_12CUdevprop_st_SIMDWidth, (char *)0, 0},
  {(char *)"memPitch", __pyx_getprop_4cuda_4cuda_12CUdevprop_st_memPitch, __pyx_setprop_4cuda_4cuda_12CUdevprop_st_memPitch, (char *)0, 0},
  {(char *)"regsPerBlock", __pyx_getprop_4cuda_4cuda_12CUdevprop_st_regsPerBlock, __pyx_setprop_4cuda_4cuda_12CUdevprop_st_regsPerBlock, (char *)0, 0},
  {(char *)"clockRate", __pyx_getprop_4cuda_4cuda_12CUdevprop_st_clockRate, __pyx_setprop_4cuda_4cuda_12CUdevprop_st_clockRate, (char *)0, 0},
  {(char *)"textureAlign", __pyx_getprop_4cuda_4cuda_12CUdevprop_st_textureAlign, __pyx_setprop_4cuda_4cuda_12CUdevprop_st_textureAlign, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUdevprop_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUdevprop_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUdevprop_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUdevprop_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_12CUdevprop_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUdevprop_st(void_ptr _ptr=0)\n\n    Legacy device properties\n\n    Attributes\n    ----------\n    maxThreadsPerBlock : int\n        Maximum number of threads per block\n    maxThreadsDim : List[int]\n        Maximum size of each dimension of a block\n    maxGridSize : List[int]\n        Maximum size of each dimension of a grid\n    sharedMemPerBlock : int\n        Shared memory available per block in bytes\n    totalConstantMemory : int\n        Constant memory available on device in bytes\n    SIMDWidth : int\n        Warp size in threads\n    memPitch : int\n        Maximum pitch in bytes allowed by memory copies\n    regsPerBlock : int\n        32-bit registers available per block\n    clockRate : int\n        Clock frequency in kilohertz\n    textureAlign : int\n        Alignment requirement for textures\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUdevprop_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUdevprop_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_12CUdevprop_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUdevprop_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUaccessPolicyWindow_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)o);
  p->_cbase_ptr = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUaccessPolicyWindow_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *p = (struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_cbase_ptr);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUaccessPolicyWindow_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *p = (struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)o;
  if (p->_cbase_ptr) {
    e = (*v)(((PyObject *)p->_cbase_ptr), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUaccessPolicyWindow_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *p = (struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st *)o;
  tmp = ((PyObject*)p->_cbase_ptr);
  p->_cbase_ptr = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_23CUaccessPolicyWindow_st_base_ptr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8base_ptr_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_23CUaccessPolicyWindow_st_base_ptr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8base_ptr_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_23CUaccessPolicyWindow_st_num_bytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_9num_bytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_23CUaccessPolicyWindow_st_num_bytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_9num_bytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_23CUaccessPolicyWindow_st_hitRatio(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8hitRatio_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_23CUaccessPolicyWindow_st_hitRatio(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8hitRatio_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_23CUaccessPolicyWindow_st_hitProp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_7hitProp_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_23CUaccessPolicyWindow_st_hitProp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_7hitProp_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_23CUaccessPolicyWindow_st_missProp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8missProp_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_23CUaccessPolicyWindow_st_missProp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_8missProp_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUaccessPolicyWindow_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_23CUaccessPolicyWindow_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_23CUaccessPolicyWindow_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_23CUaccessPolicyWindow_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUaccessPolicyWindow_st[] = {
  {(char *)"base_ptr", __pyx_getprop_4cuda_4cuda_23CUaccessPolicyWindow_st_base_ptr, __pyx_setprop_4cuda_4cuda_23CUaccessPolicyWindow_st_base_ptr, (char *)0, 0},
  {(char *)"num_bytes", __pyx_getprop_4cuda_4cuda_23CUaccessPolicyWindow_st_num_bytes, __pyx_setprop_4cuda_4cuda_23CUaccessPolicyWindow_st_num_bytes, (char *)0, 0},
  {(char *)"hitRatio", __pyx_getprop_4cuda_4cuda_23CUaccessPolicyWindow_st_hitRatio, __pyx_setprop_4cuda_4cuda_23CUaccessPolicyWindow_st_hitRatio, (char *)0, 0},
  {(char *)"hitProp", __pyx_getprop_4cuda_4cuda_23CUaccessPolicyWindow_st_hitProp, __pyx_setprop_4cuda_4cuda_23CUaccessPolicyWindow_st_hitProp, (char *)0, 0},
  {(char *)"missProp", __pyx_getprop_4cuda_4cuda_23CUaccessPolicyWindow_st_missProp, __pyx_setprop_4cuda_4cuda_23CUaccessPolicyWindow_st_missProp, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUaccessPolicyWindow_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUaccessPolicyWindow_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUaccessPolicyWindow_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUaccessPolicyWindow_st(void_ptr _ptr=0)\n\n    Specifies an access policy for a window, a contiguous extent of\n    memory beginning at base_ptr and ending at base_ptr + num_bytes.\n    num_bytes is limited by\n    CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into\n    many segments and assign segments such that: sum of \"hit segments\"\n    / window == approx. ratio. sum of \"miss segments\" / window ==\n    approx 1-ratio. Segments and ratio specifications are fitted to the\n    capabilities of the architecture. Accesses in a hit segment apply\n    the hitProp access policy. Accesses in a miss segment apply the\n    missProp access policy.\n\n    Attributes\n    ----------\n    base_ptr : Any\n        Starting address of the access policy window. CUDA driver may align\n        it.\n    num_bytes : size_t\n        Size in bytes of the window policy. CUDA driver may restrict the\n        maximum size and alignment.\n    hitRatio : float\n        hitRatio specifies percentage of lines assigned hitProp, rest are\n        assigned missProp.\n    hitProp : CUaccessProperty\n        CUaccessProperty set for hit.\n    missProp : CUaccessProperty\n        CUaccessProperty set for miss. Must be either NORMAL or STREAMING\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUaccessPolicyWindow_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUaccessPolicyWindow_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUaccessPolicyWindow_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUaccessPolicyWindow_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUaccessPolicyWindow_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)o);
  p->_func = ((struct __pyx_obj_4cuda_4cuda_CUfunction *)Py_None); Py_INCREF(Py_None);
  p->_ckernelParams = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperKernelParams *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_func);
  Py_CLEAR(p->_ckernelParams);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)o;
  if (p->_func) {
    e = (*v)(((PyObject *)p->_func), a); if (e) return e;
  }
  if (p->_ckernelParams) {
    e = (*v)(((PyObject *)p->_ckernelParams), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st *)o;
  tmp = ((PyObject*)p->_func);
  p->_func = ((struct __pyx_obj_4cuda_4cuda_CUfunction *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_ckernelParams);
  p->_ckernelParams = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperKernelParams *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_func(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4func_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_func(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_4func_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_gridDimX(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimX_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_gridDimX(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimX_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_gridDimY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_gridDimY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_gridDimZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimZ_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_gridDimZ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_8gridDimZ_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_blockDimX(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimX_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_blockDimX(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimX_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_blockDimY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_blockDimY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_blockDimZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimZ_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_blockDimZ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9blockDimZ_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_sharedMemBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_14sharedMemBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_sharedMemBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_14sharedMemBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_kernelParams(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12kernelParams_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_kernelParams(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12kernelParams_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_extra(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5extra_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_extra(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_5extra_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st[] = {
  {(char *)"func", __pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_func, __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_func, (char *)0, 0},
  {(char *)"gridDimX", __pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_gridDimX, __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_gridDimX, (char *)0, 0},
  {(char *)"gridDimY", __pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_gridDimY, __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_gridDimY, (char *)0, 0},
  {(char *)"gridDimZ", __pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_gridDimZ, __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_gridDimZ, (char *)0, 0},
  {(char *)"blockDimX", __pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_blockDimX, __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_blockDimX, (char *)0, 0},
  {(char *)"blockDimY", __pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_blockDimY, __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_blockDimY, (char *)0, 0},
  {(char *)"blockDimZ", __pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_blockDimZ, __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_blockDimZ, (char *)0, 0},
  {(char *)"sharedMemBytes", __pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_sharedMemBytes, __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_sharedMemBytes, (char *)0, 0},
  {(char *)"kernelParams", __pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_kernelParams, __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_kernelParams, (char *)0, 0},
  {(char *)"extra", __pyx_getprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_extra, __pyx_setprop_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_extra, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_KERNEL_NODE_PARAMS_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_KERNEL_NODE_PARAMS_st(void_ptr _ptr=0)\n\n    GPU kernel node parameters\n\n    Attributes\n    ----------\n    func : CUfunction\n        Kernel to launch\n    gridDimX : unsigned int\n        Width of grid in blocks\n    gridDimY : unsigned int\n        Height of grid in blocks\n    gridDimZ : unsigned int\n        Depth of grid in blocks\n    blockDimX : unsigned int\n        X dimension of each thread block\n    blockDimY : unsigned int\n        Y dimension of each thread block\n    blockDimZ : unsigned int\n        Z dimension of each thread block\n    sharedMemBytes : unsigned int\n        Dynamic shared-memory size per thread block in bytes\n    kernelParams : Any\n        Array of pointers to kernel parameters\n    extra : Any\n        Extra options\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)o);
  p->_dst = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_dst);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)o;
  if (p->_dst) {
    e = (*v)(((PyObject *)p->_dst), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st *)o;
  tmp = ((PyObject*)p->_dst);
  p->_dst = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_dst(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3dst_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_dst(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3dst_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_pitch(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5pitch_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_pitch(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5pitch_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_value(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5value_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5value_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_elementSize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11elementSize_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_elementSize(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11elementSize_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5width_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_width(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_5width_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6height_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_height(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6height_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st[] = {
  {(char *)"dst", __pyx_getprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_dst, __pyx_setprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_dst, (char *)0, 0},
  {(char *)"pitch", __pyx_getprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_pitch, __pyx_setprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_pitch, (char *)0, 0},
  {(char *)"value", __pyx_getprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_value, __pyx_setprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_value, (char *)0, 0},
  {(char *)"elementSize", __pyx_getprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_elementSize, __pyx_setprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_elementSize, (char *)0, 0},
  {(char *)"width", __pyx_getprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_width, __pyx_setprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_width, (char *)0, 0},
  {(char *)"height", __pyx_getprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_height, __pyx_setprop_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_height, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEMSET_NODE_PARAMS_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_MEMSET_NODE_PARAMS_st(void_ptr _ptr=0)\n\n    Memset node parameters\n\n    Attributes\n    ----------\n    dst : CUdeviceptr\n        Destination device pointer\n    pitch : size_t\n        Pitch of destination device pointer. Unused if height is 1\n    value : unsigned int\n        Value to be set\n    elementSize : unsigned int\n        Size of each element in bytes. Must be 1, 2, or 4.\n    width : size_t\n        Width of the row in elements\n    height : size_t\n        Number of rows\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)o);
  p->_fn = ((struct __pyx_obj_4cuda_4cuda_CUhostFn *)Py_None); Py_INCREF(Py_None);
  p->_cuserData = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_fn);
  Py_CLEAR(p->_cuserData);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)o;
  if (p->_fn) {
    e = (*v)(((PyObject *)p->_fn), a); if (e) return e;
  }
  if (p->_cuserData) {
    e = (*v)(((PyObject *)p->_cuserData), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st *)o;
  tmp = ((PyObject*)p->_fn);
  p->_fn = ((struct __pyx_obj_4cuda_4cuda_CUhostFn *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cuserData);
  p->_cuserData = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_fn(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2fn_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_fn(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_2fn_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_userData(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8userData_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_userData(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_8userData_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st[] = {
  {(char *)"fn", __pyx_getprop_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_fn, __pyx_setprop_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_fn, (char *)0, 0},
  {(char *)"userData", __pyx_getprop_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_userData, __pyx_setprop_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_userData, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_HOST_NODE_PARAMS_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_HOST_NODE_PARAMS_st(void_ptr _ptr=0)\n\n    Host node parameters\n\n    Attributes\n    ----------\n    fn : CUhostFn\n        The function to call when the node executes\n    userData : Any\n        Argument to pass to the function\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1x_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_x(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1x_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1y_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_y(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1y_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_z(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1z_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_z(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_1z_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s[] = {
  {(char *)"x", __pyx_getprop_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_x, __pyx_setprop_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_x, (char *)0, 0},
  {(char *)"y", __pyx_getprop_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_y, __pyx_setprop_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_y, (char *)0, 0},
  {(char *)"z", __pyx_getprop_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_z, __pyx_setprop_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_z, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    x : unsigned int\n\n    y : unsigned int\n\n    z : unsigned int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)o);
  p->_event = ((struct __pyx_obj_4cuda_4cuda_CUevent *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *p = (struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_event);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *p = (struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)o;
  if (p->_event) {
    e = (*v)(((PyObject *)p->_event), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *p = (struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)o;
  tmp = ((PyObject*)p->_event);
  p->_event = ((struct __pyx_obj_4cuda_4cuda_CUevent *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_event(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5event_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_event(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5event_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_triggerAtBlockStart(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_19triggerAtBlockStart_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_triggerAtBlockStart(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_19triggerAtBlockStart_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s[] = {
  {(char *)"event", __pyx_getprop_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_event, __pyx_setprop_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_event, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_flags, __pyx_setprop_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_flags, (char *)0, 0},
  {(char *)"triggerAtBlockStart", __pyx_getprop_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_triggerAtBlockStart, __pyx_setprop_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_triggerAtBlockStart, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    event : CUevent\n\n    flags : int\n\n    triggerAtBlockStart : int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUlaunchAttributeValue_union(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)o);
  p->_accessPolicyWindow = ((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow *)Py_None); Py_INCREF(Py_None);
  p->_clusterDim = ((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)Py_None); Py_INCREF(Py_None);
  p->_programmaticEvent = ((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUlaunchAttributeValue_union(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *p = (struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_accessPolicyWindow);
  Py_CLEAR(p->_clusterDim);
  Py_CLEAR(p->_programmaticEvent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUlaunchAttributeValue_union(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *p = (struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)o;
  if (p->_accessPolicyWindow) {
    e = (*v)(((PyObject *)p->_accessPolicyWindow), a); if (e) return e;
  }
  if (p->_clusterDim) {
    e = (*v)(((PyObject *)p->_clusterDim), a); if (e) return e;
  }
  if (p->_programmaticEvent) {
    e = (*v)(((PyObject *)p->_programmaticEvent), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUlaunchAttributeValue_union(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *p = (struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union *)o;
  tmp = ((PyObject*)p->_accessPolicyWindow);
  p->_accessPolicyWindow = ((struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_clusterDim);
  p->_clusterDim = ((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_programmaticEvent);
  p->_programmaticEvent = ((struct __pyx_obj_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_pad(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3pad_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_pad(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3pad_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_accessPolicyWindow(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_18accessPolicyWindow_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_accessPolicyWindow(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_18accessPolicyWindow_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_cooperative(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_11cooperative_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_cooperative(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_11cooperative_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_syncPolicy(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_10syncPolicy_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_syncPolicy(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_10syncPolicy_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_clusterDim(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_10clusterDim_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_clusterDim(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_10clusterDim_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_clusterSchedulingPolicyPreference(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_33clusterSchedulingPolicyPreference_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_clusterSchedulingPolicyPreference(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_33clusterSchedulingPolicyPreference_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_programmaticStreamSerializationAllowed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_38programmaticStreamSerializationAllowed_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_programmaticStreamSerializationAllowed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_38programmaticStreamSerializationAllowed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_programmaticEvent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_17programmaticEvent_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_programmaticEvent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_17programmaticEvent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_priority(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_8priority_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_priority(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_8priority_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUlaunchAttributeValue_union[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_28CUlaunchAttributeValue_union_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_28CUlaunchAttributeValue_union_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_28CUlaunchAttributeValue_union_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUlaunchAttributeValue_union[] = {
  {(char *)"pad", __pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_pad, __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_pad, (char *)0, 0},
  {(char *)"accessPolicyWindow", __pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_accessPolicyWindow, __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_accessPolicyWindow, (char *)0, 0},
  {(char *)"cooperative", __pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_cooperative, __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_cooperative, (char *)0, 0},
  {(char *)"syncPolicy", __pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_syncPolicy, __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_syncPolicy, (char *)0, 0},
  {(char *)"clusterDim", __pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_clusterDim, __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_clusterDim, (char *)0, 0},
  {(char *)"clusterSchedulingPolicyPreference", __pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_clusterSchedulingPolicyPreference, __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_clusterSchedulingPolicyPreference, (char *)0, 0},
  {(char *)"programmaticStreamSerializationAllowed", __pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_programmaticStreamSerializationAllowed, __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_programmaticStreamSerializationAllowed, (char *)0, 0},
  {(char *)"programmaticEvent", __pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_programmaticEvent, __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_programmaticEvent, (char *)0, 0},
  {(char *)"priority", __pyx_getprop_4cuda_4cuda_28CUlaunchAttributeValue_union_priority, __pyx_setprop_4cuda_4cuda_28CUlaunchAttributeValue_union_priority, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUlaunchAttributeValue_union = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUlaunchAttributeValue_union", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue_union), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUlaunchAttributeValue_union(void_ptr _ptr=0)\n\n\n    Attributes\n    ----------\n    pad : bytes\n        Pad to 64 bytes\n    accessPolicyWindow : CUaccessPolicyWindow\n\n    cooperative : int\n\n    syncPolicy : CUsynchronizationPolicy\n\n    clusterDim : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s\n\n    clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy\n\n    programmaticStreamSerializationAllowed : int\n\n    programmaticEvent : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s\n\n    priority : int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUlaunchAttribute_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)o);
  p->_value = ((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUlaunchAttribute_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *p = (struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_value);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUlaunchAttribute_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *p = (struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)o;
  if (p->_value) {
    e = (*v)(((PyObject *)p->_value), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUlaunchAttribute_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *p = (struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st *)o;
  tmp = ((PyObject*)p->_value);
  p->_value = ((struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_20CUlaunchAttribute_st_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_2id_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_20CUlaunchAttribute_st_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_20CUlaunchAttribute_st_value(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_5value_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_20CUlaunchAttribute_st_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_5value_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUlaunchAttribute_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_20CUlaunchAttribute_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_20CUlaunchAttribute_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_20CUlaunchAttribute_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUlaunchAttribute_st[] = {
  {(char *)"id", __pyx_getprop_4cuda_4cuda_20CUlaunchAttribute_st_id, __pyx_setprop_4cuda_4cuda_20CUlaunchAttribute_st_id, (char *)0, 0},
  {(char *)"value", __pyx_getprop_4cuda_4cuda_20CUlaunchAttribute_st_value, __pyx_setprop_4cuda_4cuda_20CUlaunchAttribute_st_value, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUlaunchAttribute_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUlaunchAttribute_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUlaunchAttribute_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUlaunchAttribute_st(void_ptr _ptr=0)\n\n\n    Attributes\n    ----------\n    id : CUlaunchAttributeID\n\n    value : CUlaunchAttributeValue\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUlaunchAttribute_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUlaunchAttribute_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUlaunchAttribute_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUlaunchAttribute_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUlaunchAttribute_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUlaunchConfig_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)o);
  p->_hStream = ((struct __pyx_obj_4cuda_4cuda_CUstream *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUlaunchConfig_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *p = (struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_hStream);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUlaunchConfig_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *p = (struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)o;
  if (p->_hStream) {
    e = (*v)(((PyObject *)p->_hStream), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUlaunchConfig_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *p = (struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st *)o;
  tmp = ((PyObject*)p->_hStream);
  p->_hStream = ((struct __pyx_obj_4cuda_4cuda_CUstream *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_gridDimX(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimX_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_gridDimX(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimX_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_gridDimY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_gridDimY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_gridDimZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimZ_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_gridDimZ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8gridDimZ_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_blockDimX(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimX_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_blockDimX(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimX_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_blockDimY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_blockDimY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_blockDimZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimZ_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_blockDimZ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9blockDimZ_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_sharedMemBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_14sharedMemBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_sharedMemBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_14sharedMemBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_hStream(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_7hStream_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_hStream(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_7hStream_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_attrs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_5attrs_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_attrs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_5attrs_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_numAttrs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8numAttrs_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_numAttrs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_8numAttrs_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUlaunchConfig_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUlaunchConfig_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUlaunchConfig_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_17CUlaunchConfig_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUlaunchConfig_st[] = {
  {(char *)"gridDimX", __pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_gridDimX, __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_gridDimX, (char *)0, 0},
  {(char *)"gridDimY", __pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_gridDimY, __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_gridDimY, (char *)0, 0},
  {(char *)"gridDimZ", __pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_gridDimZ, __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_gridDimZ, (char *)0, 0},
  {(char *)"blockDimX", __pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_blockDimX, __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_blockDimX, (char *)0, 0},
  {(char *)"blockDimY", __pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_blockDimY, __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_blockDimY, (char *)0, 0},
  {(char *)"blockDimZ", __pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_blockDimZ, __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_blockDimZ, (char *)0, 0},
  {(char *)"sharedMemBytes", __pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_sharedMemBytes, __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_sharedMemBytes, (char *)0, 0},
  {(char *)"hStream", __pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_hStream, __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_hStream, (char *)0, 0},
  {(char *)"attrs", __pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_attrs, __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_attrs, (char *)0, 0},
  {(char *)"numAttrs", __pyx_getprop_4cuda_4cuda_17CUlaunchConfig_st_numAttrs, __pyx_setprop_4cuda_4cuda_17CUlaunchConfig_st_numAttrs, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUlaunchConfig_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUlaunchConfig_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUlaunchConfig_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUlaunchConfig_st(void_ptr _ptr=0)\n\n\n    Attributes\n    ----------\n    gridDimX : unsigned int\n        Width of grid in blocks\n    gridDimY : unsigned int\n        Height of grid in blocks\n    gridDimZ : unsigned int\n        Depth of grid in blocks\n    blockDimX : unsigned int\n        X dimension of each thread block\n    blockDimY : unsigned int\n        Y dimension of each thread block\n    blockDimZ : unsigned int\n        Z dimension of each thread block\n    sharedMemBytes : unsigned int\n        Dynamic shared-memory size per thread block in bytes\n    hStream : CUstream\n        Stream identifier\n    attrs : CUlaunchAttribute\n        nullable if numAttrs == 0\n    numAttrs : unsigned int\n        number of attributes populated in attrs\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUlaunchConfig_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUlaunchConfig_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUlaunchConfig_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUlaunchConfig_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUlaunchConfig_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUexecAffinitySmCount_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUexecAffinitySmCount_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_24CUexecAffinitySmCount_st_val(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_3val_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_24CUexecAffinitySmCount_st_val(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_3val_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUexecAffinitySmCount_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_24CUexecAffinitySmCount_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_24CUexecAffinitySmCount_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_24CUexecAffinitySmCount_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUexecAffinitySmCount_st[] = {
  {(char *)"val", __pyx_getprop_4cuda_4cuda_24CUexecAffinitySmCount_st_val, __pyx_setprop_4cuda_4cuda_24CUexecAffinitySmCount_st_val, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUexecAffinitySmCount_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUexecAffinitySmCount_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUexecAffinitySmCount_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUexecAffinitySmCount_st(void_ptr _ptr=0)\n\n    Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT\n\n    Attributes\n    ----------\n    val : unsigned int\n        The number of SMs the context is limited to use.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUexecAffinitySmCount_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUexecAffinitySmCount_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUexecAffinitySmCount_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)o);
  p->_smCount = ((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *p = (struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_smCount);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *p = (struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)o;
  if (p->_smCount) {
    e = (*v)(((PyObject *)p->_smCount), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *p = (struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)o;
  tmp = ((PyObject*)p->_smCount);
  p->_smCount = ((struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_smCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7smCount_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_smCount(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7smCount_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u[] = {
  {(char *)"smCount", __pyx_getprop_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_smCount, __pyx_setprop_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_smCount, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    smCount : CUexecAffinitySmCount\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUexecAffinityParam_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)o);
  p->_param = ((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUexecAffinityParam_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *p = (struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_param);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUexecAffinityParam_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *p = (struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)o;
  if (p->_param) {
    e = (*v)(((PyObject *)p->_param), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUexecAffinityParam_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *p = (struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st *)o;
  tmp = ((PyObject*)p->_param);
  p->_param = ((struct __pyx_obj_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_22CUexecAffinityParam_st_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_4type_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_22CUexecAffinityParam_st_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_4type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_22CUexecAffinityParam_st_param(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_5param_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_22CUexecAffinityParam_st_param(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_5param_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUexecAffinityParam_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_22CUexecAffinityParam_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_22CUexecAffinityParam_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_22CUexecAffinityParam_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUexecAffinityParam_st[] = {
  {(char *)"type", __pyx_getprop_4cuda_4cuda_22CUexecAffinityParam_st_type, __pyx_setprop_4cuda_4cuda_22CUexecAffinityParam_st_type, (char *)0, 0},
  {(char *)"param", __pyx_getprop_4cuda_4cuda_22CUexecAffinityParam_st_param, __pyx_setprop_4cuda_4cuda_22CUexecAffinityParam_st_param, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUexecAffinityParam_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUexecAffinityParam_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUexecAffinityParam_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUexecAffinityParam_st(void_ptr _ptr=0)\n\n    Execution Affinity Parameters\n\n    Attributes\n    ----------\n    type : CUexecAffinityType\n\n    param : _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUexecAffinityParam_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUexecAffinityParam_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUexecAffinityParam_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUexecAffinityParam_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUexecAffinityParam_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY2D_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)o);
  p->_csrcHost = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  p->_srcDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  p->_srcArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  p->_cdstHost = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  p->_dstDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  p->_dstArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMCPY2D_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_csrcHost);
  Py_CLEAR(p->_srcDevice);
  Py_CLEAR(p->_srcArray);
  Py_CLEAR(p->_cdstHost);
  Py_CLEAR(p->_dstDevice);
  Py_CLEAR(p->_dstArray);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMCPY2D_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)o;
  if (p->_csrcHost) {
    e = (*v)(((PyObject *)p->_csrcHost), a); if (e) return e;
  }
  if (p->_srcDevice) {
    e = (*v)(((PyObject *)p->_srcDevice), a); if (e) return e;
  }
  if (p->_srcArray) {
    e = (*v)(((PyObject *)p->_srcArray), a); if (e) return e;
  }
  if (p->_cdstHost) {
    e = (*v)(((PyObject *)p->_cdstHost), a); if (e) return e;
  }
  if (p->_dstDevice) {
    e = (*v)(((PyObject *)p->_dstDevice), a); if (e) return e;
  }
  if (p->_dstArray) {
    e = (*v)(((PyObject *)p->_dstArray), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_MEMCPY2D_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st *)o;
  tmp = ((PyObject*)p->_csrcHost);
  p->_csrcHost = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_srcDevice);
  p->_srcDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_srcArray);
  p->_srcArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cdstHost);
  p->_cdstHost = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_dstDevice);
  p->_dstDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_dstArray);
  p->_dstArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcXInBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11srcXInBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcXInBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11srcXInBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_4srcY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_4srcY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcMemoryType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13srcMemoryType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcMemoryType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13srcMemoryType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcHost(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7srcHost_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcHost(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7srcHost_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcDevice(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9srcDevice_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcDevice(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9srcDevice_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcPitch(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcPitch_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcPitch(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8srcPitch_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstXInBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11dstXInBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstXInBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11dstXInBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_4dstY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_4dstY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstMemoryType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13dstMemoryType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstMemoryType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13dstMemoryType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstHost(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7dstHost_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstHost(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7dstHost_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstDevice(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9dstDevice_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstDevice(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9dstDevice_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstPitch(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstPitch_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstPitch(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_8dstPitch_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_WidthInBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_12WidthInBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_WidthInBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_12WidthInBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_Height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_6Height_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_Height(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_6Height_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_MEMCPY2D_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY2D_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY2D_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY2D_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_MEMCPY2D_st[] = {
  {(char *)"srcXInBytes", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcXInBytes, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcXInBytes, (char *)0, 0},
  {(char *)"srcY", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcY, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcY, (char *)0, 0},
  {(char *)"srcMemoryType", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcMemoryType, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcMemoryType, (char *)0, 0},
  {(char *)"srcHost", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcHost, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcHost, (char *)0, 0},
  {(char *)"srcDevice", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcDevice, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcDevice, (char *)0, 0},
  {(char *)"srcArray", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcArray, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcArray, (char *)0, 0},
  {(char *)"srcPitch", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcPitch, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_srcPitch, (char *)0, 0},
  {(char *)"dstXInBytes", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstXInBytes, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstXInBytes, (char *)0, 0},
  {(char *)"dstY", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstY, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstY, (char *)0, 0},
  {(char *)"dstMemoryType", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstMemoryType, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstMemoryType, (char *)0, 0},
  {(char *)"dstHost", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstHost, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstHost, (char *)0, 0},
  {(char *)"dstDevice", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstDevice, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstDevice, (char *)0, 0},
  {(char *)"dstArray", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstArray, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstArray, (char *)0, 0},
  {(char *)"dstPitch", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstPitch, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_dstPitch, (char *)0, 0},
  {(char *)"WidthInBytes", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_WidthInBytes, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_WidthInBytes, (char *)0, 0},
  {(char *)"Height", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_Height, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY2D_st_Height, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEMCPY2D_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMCPY2D_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_MEMCPY2D_st(void_ptr _ptr=0)\n\n    2D memory copy parameters\n\n    Attributes\n    ----------\n    srcXInBytes : size_t\n        Source X in bytes\n    srcY : size_t\n        Source Y\n    srcMemoryType : CUmemorytype\n        Source memory type (host, device, array)\n    srcHost : Any\n        Source host pointer\n    srcDevice : CUdeviceptr\n        Source device pointer\n    srcArray : CUarray\n        Source array reference\n    srcPitch : size_t\n        Source pitch (ignored when src is array)\n    dstXInBytes : size_t\n        Destination X in bytes\n    dstY : size_t\n        Destination Y\n    dstMemoryType : CUmemorytype\n        Destination memory type (host, device, array)\n    dstHost : Any\n        Destination host pointer\n    dstDevice : CUdeviceptr\n        Destination device pointer\n    dstArray : CUarray\n        Destination array reference\n    dstPitch : size_t\n        Destination pitch (ignored when dst is array)\n    WidthInBytes : size_t\n        Width of 2D memory copy in bytes\n    Height : size_t\n        Height of 2D memory copy\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMCPY2D_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEMCPY2D_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_MEMCPY2D_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_MEMCPY2D_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY2D_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)o);
  p->_csrcHost = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  p->_srcDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  p->_srcArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  p->_creserved0 = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  p->_cdstHost = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  p->_dstDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  p->_dstArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  p->_creserved1 = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMCPY3D_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_csrcHost);
  Py_CLEAR(p->_srcDevice);
  Py_CLEAR(p->_srcArray);
  Py_CLEAR(p->_creserved0);
  Py_CLEAR(p->_cdstHost);
  Py_CLEAR(p->_dstDevice);
  Py_CLEAR(p->_dstArray);
  Py_CLEAR(p->_creserved1);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMCPY3D_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)o;
  if (p->_csrcHost) {
    e = (*v)(((PyObject *)p->_csrcHost), a); if (e) return e;
  }
  if (p->_srcDevice) {
    e = (*v)(((PyObject *)p->_srcDevice), a); if (e) return e;
  }
  if (p->_srcArray) {
    e = (*v)(((PyObject *)p->_srcArray), a); if (e) return e;
  }
  if (p->_creserved0) {
    e = (*v)(((PyObject *)p->_creserved0), a); if (e) return e;
  }
  if (p->_cdstHost) {
    e = (*v)(((PyObject *)p->_cdstHost), a); if (e) return e;
  }
  if (p->_dstDevice) {
    e = (*v)(((PyObject *)p->_dstDevice), a); if (e) return e;
  }
  if (p->_dstArray) {
    e = (*v)(((PyObject *)p->_dstArray), a); if (e) return e;
  }
  if (p->_creserved1) {
    e = (*v)(((PyObject *)p->_creserved1), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_MEMCPY3D_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st *)o;
  tmp = ((PyObject*)p->_csrcHost);
  p->_csrcHost = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_srcDevice);
  p->_srcDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_srcArray);
  p->_srcArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_creserved0);
  p->_creserved0 = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cdstHost);
  p->_cdstHost = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_dstDevice);
  p->_dstDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_dstArray);
  p->_dstArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_creserved1);
  p->_creserved1 = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcXInBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11srcXInBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcXInBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11srcXInBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcZ_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcZ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4srcZ_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcLOD(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6srcLOD_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcLOD(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6srcLOD_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcMemoryType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13srcMemoryType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcMemoryType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13srcMemoryType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcHost(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7srcHost_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcHost(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7srcHost_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcDevice(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcDevice_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcDevice(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcDevice_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_reserved0(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved0_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_reserved0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved0_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcPitch(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcPitch_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcPitch(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8srcPitch_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcHeight(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcHeight_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcHeight(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9srcHeight_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstXInBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11dstXInBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstXInBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11dstXInBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstZ_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstZ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_4dstZ_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstLOD(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6dstLOD_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstLOD(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6dstLOD_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstMemoryType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13dstMemoryType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstMemoryType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13dstMemoryType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstHost(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7dstHost_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstHost(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7dstHost_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstDevice(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstDevice_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstDevice(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstDevice_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_reserved1(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved1_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_reserved1(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9reserved1_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstPitch(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstPitch_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstPitch(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_8dstPitch_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstHeight(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstHeight_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstHeight(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9dstHeight_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_WidthInBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_12WidthInBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_WidthInBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_12WidthInBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_Height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6Height_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_Height(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_6Height_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_Depth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_5Depth_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_Depth(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_5Depth_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_MEMCPY3D_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY3D_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY3D_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16CUDA_MEMCPY3D_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_MEMCPY3D_st[] = {
  {(char *)"srcXInBytes", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcXInBytes, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcXInBytes, (char *)0, 0},
  {(char *)"srcY", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcY, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcY, (char *)0, 0},
  {(char *)"srcZ", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcZ, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcZ, (char *)0, 0},
  {(char *)"srcLOD", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcLOD, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcLOD, (char *)0, 0},
  {(char *)"srcMemoryType", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcMemoryType, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcMemoryType, (char *)0, 0},
  {(char *)"srcHost", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcHost, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcHost, (char *)0, 0},
  {(char *)"srcDevice", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcDevice, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcDevice, (char *)0, 0},
  {(char *)"srcArray", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcArray, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcArray, (char *)0, 0},
  {(char *)"reserved0", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_reserved0, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_reserved0, (char *)0, 0},
  {(char *)"srcPitch", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcPitch, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcPitch, (char *)0, 0},
  {(char *)"srcHeight", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcHeight, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_srcHeight, (char *)0, 0},
  {(char *)"dstXInBytes", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstXInBytes, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstXInBytes, (char *)0, 0},
  {(char *)"dstY", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstY, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstY, (char *)0, 0},
  {(char *)"dstZ", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstZ, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstZ, (char *)0, 0},
  {(char *)"dstLOD", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstLOD, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstLOD, (char *)0, 0},
  {(char *)"dstMemoryType", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstMemoryType, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstMemoryType, (char *)0, 0},
  {(char *)"dstHost", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstHost, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstHost, (char *)0, 0},
  {(char *)"dstDevice", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstDevice, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstDevice, (char *)0, 0},
  {(char *)"dstArray", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstArray, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstArray, (char *)0, 0},
  {(char *)"reserved1", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_reserved1, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_reserved1, (char *)0, 0},
  {(char *)"dstPitch", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstPitch, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstPitch, (char *)0, 0},
  {(char *)"dstHeight", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstHeight, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_dstHeight, (char *)0, 0},
  {(char *)"WidthInBytes", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_WidthInBytes, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_WidthInBytes, (char *)0, 0},
  {(char *)"Height", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_Height, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_Height, (char *)0, 0},
  {(char *)"Depth", __pyx_getprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_Depth, __pyx_setprop_4cuda_4cuda_16CUDA_MEMCPY3D_st_Depth, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEMCPY3D_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMCPY3D_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_MEMCPY3D_st(void_ptr _ptr=0)\n\n    3D memory copy parameters\n\n    Attributes\n    ----------\n    srcXInBytes : size_t\n        Source X in bytes\n    srcY : size_t\n        Source Y\n    srcZ : size_t\n        Source Z\n    srcLOD : size_t\n        Source LOD\n    srcMemoryType : CUmemorytype\n        Source memory type (host, device, array)\n    srcHost : Any\n        Source host pointer\n    srcDevice : CUdeviceptr\n        Source device pointer\n    srcArray : CUarray\n        Source array reference\n    reserved0 : Any\n        Must be NULL\n    srcPitch : size_t\n        Source pitch (ignored when src is array)\n    srcHeight : size_t\n        Source height (ignored when src is array; may be 0 if Depth==1)\n    dstXInBytes : size_t\n        Destination X in bytes\n    dstY : size_t\n        Destination Y\n    dstZ : size_t\n        Destination Z\n    dstLOD : size_t\n        Destination LOD\n    dstMemoryType : CUmemorytype\n        Destination memory type (host, device, array)\n    dstHost : Any\n        Destination host pointer\n    dstDevice : CUdeviceptr\n        Destination device pointer\n    dstArray : CUarray\n        Destination array reference\n    reserved1 : Any\n        Must be NULL\n    dstPitch : size_t\n        Destination pitch (ignored when dst is array)\n    dstHeight : size_t\n        Destination height (ignored when dst is array; may be 0 if\n        Depth==1)\n    WidthInBytes : size_t\n        Width of 3D memory copy in bytes\n    Height : size_t\n        Height of 3D memory copy\n    Depth : size_t\n        Depth of 3D memory copy\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMCPY3D_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEMCPY3D_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_MEMCPY3D_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_MEMCPY3D_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)o);
  p->_csrcHost = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  p->_srcDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  p->_srcArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  p->_srcContext = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)Py_None); Py_INCREF(Py_None);
  p->_cdstHost = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  p->_dstDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  p->_dstArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  p->_dstContext = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_csrcHost);
  Py_CLEAR(p->_srcDevice);
  Py_CLEAR(p->_srcArray);
  Py_CLEAR(p->_srcContext);
  Py_CLEAR(p->_cdstHost);
  Py_CLEAR(p->_dstDevice);
  Py_CLEAR(p->_dstArray);
  Py_CLEAR(p->_dstContext);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)o;
  if (p->_csrcHost) {
    e = (*v)(((PyObject *)p->_csrcHost), a); if (e) return e;
  }
  if (p->_srcDevice) {
    e = (*v)(((PyObject *)p->_srcDevice), a); if (e) return e;
  }
  if (p->_srcArray) {
    e = (*v)(((PyObject *)p->_srcArray), a); if (e) return e;
  }
  if (p->_srcContext) {
    e = (*v)(((PyObject *)p->_srcContext), a); if (e) return e;
  }
  if (p->_cdstHost) {
    e = (*v)(((PyObject *)p->_cdstHost), a); if (e) return e;
  }
  if (p->_dstDevice) {
    e = (*v)(((PyObject *)p->_dstDevice), a); if (e) return e;
  }
  if (p->_dstArray) {
    e = (*v)(((PyObject *)p->_dstArray), a); if (e) return e;
  }
  if (p->_dstContext) {
    e = (*v)(((PyObject *)p->_dstContext), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st *)o;
  tmp = ((PyObject*)p->_csrcHost);
  p->_csrcHost = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_srcDevice);
  p->_srcDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_srcArray);
  p->_srcArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_srcContext);
  p->_srcContext = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cdstHost);
  p->_cdstHost = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_dstDevice);
  p->_dstDevice = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_dstArray);
  p->_dstArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_dstContext);
  p->_dstContext = ((struct __pyx_obj_4cuda_4cuda_CUcontext *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcXInBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11srcXInBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcXInBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11srcXInBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcZ_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcZ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4srcZ_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcLOD(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6srcLOD_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcLOD(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6srcLOD_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcMemoryType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13srcMemoryType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcMemoryType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13srcMemoryType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcHost(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7srcHost_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcHost(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7srcHost_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcDevice(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcDevice_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcDevice(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcDevice_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcContext(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10srcContext_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcContext(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10srcContext_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcPitch(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcPitch_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcPitch(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8srcPitch_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcHeight(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcHeight_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcHeight(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9srcHeight_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstXInBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11dstXInBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstXInBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11dstXInBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstZ_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstZ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_4dstZ_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstLOD(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6dstLOD_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstLOD(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6dstLOD_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstMemoryType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13dstMemoryType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstMemoryType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13dstMemoryType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstHost(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7dstHost_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstHost(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7dstHost_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstDevice(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstDevice_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstDevice(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstDevice_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstContext(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10dstContext_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstContext(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10dstContext_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstPitch(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstPitch_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstPitch(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_8dstPitch_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstHeight(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstHeight_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstHeight(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9dstHeight_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_WidthInBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12WidthInBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_WidthInBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12WidthInBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_Height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6Height_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_Height(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6Height_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_Depth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5Depth_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_Depth(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_5Depth_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st[] = {
  {(char *)"srcXInBytes", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcXInBytes, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcXInBytes, (char *)0, 0},
  {(char *)"srcY", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcY, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcY, (char *)0, 0},
  {(char *)"srcZ", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcZ, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcZ, (char *)0, 0},
  {(char *)"srcLOD", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcLOD, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcLOD, (char *)0, 0},
  {(char *)"srcMemoryType", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcMemoryType, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcMemoryType, (char *)0, 0},
  {(char *)"srcHost", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcHost, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcHost, (char *)0, 0},
  {(char *)"srcDevice", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcDevice, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcDevice, (char *)0, 0},
  {(char *)"srcArray", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcArray, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcArray, (char *)0, 0},
  {(char *)"srcContext", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcContext, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcContext, (char *)0, 0},
  {(char *)"srcPitch", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcPitch, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcPitch, (char *)0, 0},
  {(char *)"srcHeight", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcHeight, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_srcHeight, (char *)0, 0},
  {(char *)"dstXInBytes", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstXInBytes, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstXInBytes, (char *)0, 0},
  {(char *)"dstY", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstY, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstY, (char *)0, 0},
  {(char *)"dstZ", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstZ, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstZ, (char *)0, 0},
  {(char *)"dstLOD", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstLOD, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstLOD, (char *)0, 0},
  {(char *)"dstMemoryType", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstMemoryType, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstMemoryType, (char *)0, 0},
  {(char *)"dstHost", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstHost, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstHost, (char *)0, 0},
  {(char *)"dstDevice", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstDevice, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstDevice, (char *)0, 0},
  {(char *)"dstArray", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstArray, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstArray, (char *)0, 0},
  {(char *)"dstContext", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstContext, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstContext, (char *)0, 0},
  {(char *)"dstPitch", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstPitch, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstPitch, (char *)0, 0},
  {(char *)"dstHeight", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstHeight, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_dstHeight, (char *)0, 0},
  {(char *)"WidthInBytes", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_WidthInBytes, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_WidthInBytes, (char *)0, 0},
  {(char *)"Height", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_Height, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_Height, (char *)0, 0},
  {(char *)"Depth", __pyx_getprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_Depth, __pyx_setprop_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_Depth, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEMCPY3D_PEER_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_MEMCPY3D_PEER_st(void_ptr _ptr=0)\n\n    3D memory cross-context copy parameters\n\n    Attributes\n    ----------\n    srcXInBytes : size_t\n        Source X in bytes\n    srcY : size_t\n        Source Y\n    srcZ : size_t\n        Source Z\n    srcLOD : size_t\n        Source LOD\n    srcMemoryType : CUmemorytype\n        Source memory type (host, device, array)\n    srcHost : Any\n        Source host pointer\n    srcDevice : CUdeviceptr\n        Source device pointer\n    srcArray : CUarray\n        Source array reference\n    srcContext : CUcontext\n        Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY)\n    srcPitch : size_t\n        Source pitch (ignored when src is array)\n    srcHeight : size_t\n        Source height (ignored when src is array; may be 0 if Depth==1)\n    dstXInBytes : size_t\n        Destination X in bytes\n    dstY : size_t\n        Destination Y\n    dstZ : size_t\n        Destination Z\n    dstLOD : size_t\n        Destination LOD\n    dstMemoryType : CUmemorytype\n        Destination memory type (host, device, array)\n    dstHost : Any\n        Destination host pointer\n    dstDevice : CUdeviceptr\n        Destination device pointer\n    dstArray : CUarray\n        Destination array reference\n    dstContext : CUcontext\n        Destination context (ignored with dstMemoryType is\n        CU_MEMORYTYPE_ARRAY)\n    dstPitch : size_t\n        Destination pitch (ignored when dst is array)\n    dstHeight : size_t\n        Destination height (ignored when dst is array; may be 0 if\n        Depth==1)\n    WidthInBytes : size_t\n        Width of 3D memory copy in bytes\n    Height : size_t\n        Height of 3D memory copy\n    Depth : size_t\n        Depth of 3D memory copy\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_Width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5Width_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_Width(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_5Width_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_Height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Height_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_Height(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Height_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_Format(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Format_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_Format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6Format_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_NumChannels(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11NumChannels_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_NumChannels(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11NumChannels_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st[] = {
  {(char *)"Width", __pyx_getprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_Width, __pyx_setprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_Width, (char *)0, 0},
  {(char *)"Height", __pyx_getprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_Height, __pyx_setprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_Height, (char *)0, 0},
  {(char *)"Format", __pyx_getprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_Format, __pyx_setprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_Format, (char *)0, 0},
  {(char *)"NumChannels", __pyx_getprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_NumChannels, __pyx_setprop_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_NumChannels, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_ARRAY_DESCRIPTOR_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUDA_ARRAY_DESCRIPTOR_st(void_ptr _ptr=0)\n\n    Array descriptor\n\n    Attributes\n    ----------\n    Width : size_t\n        Width of array\n    Height : size_t\n        Height of array\n    Format : CUarray_format\n        Array format\n    NumChannels : unsigned int\n        Channels per array element\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Width_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Width(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Width_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Height_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Height(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Height_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Depth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Depth_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Depth(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Depth_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Format(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Format_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6Format_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_NumChannels(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11NumChannels_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_NumChannels(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11NumChannels_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_5Flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st[] = {
  {(char *)"Width", __pyx_getprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Width, __pyx_setprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Width, (char *)0, 0},
  {(char *)"Height", __pyx_getprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Height, __pyx_setprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Height, (char *)0, 0},
  {(char *)"Depth", __pyx_getprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Depth, __pyx_setprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Depth, (char *)0, 0},
  {(char *)"Format", __pyx_getprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Format, __pyx_setprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Format, (char *)0, 0},
  {(char *)"NumChannels", __pyx_getprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_NumChannels, __pyx_setprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_NumChannels, (char *)0, 0},
  {(char *)"Flags", __pyx_getprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Flags, __pyx_setprop_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_Flags, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUDA_ARRAY3D_DESCRIPTOR_st(void_ptr _ptr=0)\n\n    3D array descriptor\n\n    Attributes\n    ----------\n    Width : size_t\n        Width of 3D array\n    Height : size_t\n        Height of 3D array\n    Depth : size_t\n        Depth of 3D array\n    Format : CUarray_format\n        Array format\n    NumChannels : unsigned int\n        Channels per array element\n    Flags : unsigned int\n        Flags\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5width_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_width(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5width_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6height_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_height(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_6height_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_depth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5depth_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_depth(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5depth_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s[] = {
  {(char *)"width", __pyx_getprop_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_width, __pyx_setprop_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_width, (char *)0, 0},
  {(char *)"height", __pyx_getprop_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_height, __pyx_setprop_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_height, (char *)0, 0},
  {(char *)"depth", __pyx_getprop_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_depth, __pyx_setprop_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_depth, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    width : unsigned int\n\n    height : unsigned int\n\n    depth : unsigned int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)o);
  p->_tileExtent = ((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_tileExtent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)o;
  if (p->_tileExtent) {
    e = (*v)(((PyObject *)p->_tileExtent), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st *)o;
  tmp = ((PyObject*)p->_tileExtent);
  p->_tileExtent = ((struct __pyx_obj_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10tileExtent_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10tileExtent_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_miptailFirstLevel(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_17miptailFirstLevel_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_miptailFirstLevel(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_17miptailFirstLevel_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_miptailSize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11miptailSize_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_miptailSize(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11miptailSize_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st[] = {
  {(char *)"tileExtent", __pyx_getprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent, __pyx_setprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent, (char *)0, 0},
  {(char *)"miptailFirstLevel", __pyx_getprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_miptailFirstLevel, __pyx_setprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_miptailFirstLevel, (char *)0, 0},
  {(char *)"miptailSize", __pyx_getprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_miptailSize, __pyx_setprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_miptailSize, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_flags, __pyx_setprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_flags, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_reserved, __pyx_setprop_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_ARRAY_SPARSE_PROPERTIES_st(void_ptr _ptr=0)\n\n    CUDA array sparse properties\n\n    Attributes\n    ----------\n    tileExtent : _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s\n\n    miptailFirstLevel : unsigned int\n        First mip level at which the mip tail begins.\n    miptailSize : unsigned long long\n        Total size of the mip tail.\n    flags : unsigned int\n        Flags will either be zero or\n        CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4size_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_4size_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_alignment(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9alignment_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_alignment(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9alignment_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st[] = {
  {(char *)"size", __pyx_getprop_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_size, __pyx_setprop_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_size, (char *)0, 0},
  {(char *)"alignment", __pyx_getprop_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_alignment, __pyx_setprop_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_alignment, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_reserved, __pyx_setprop_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUDA_ARRAY_MEMORY_REQUIREMENTS_st(void_ptr _ptr=0)\n\n    CUDA array memory requirements\n\n    Attributes\n    ----------\n    size : size_t\n        Total required memory size\n    alignment : size_t\n        alignment requirement\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)o);
  p->_hArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_hArray);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)o;
  if (p->_hArray) {
    e = (*v)(((PyObject *)p->_hArray), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)o;
  tmp = ((PyObject*)p->_hArray);
  p->_hArray = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_hArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6hArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_hArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_6hArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s[] = {
  {(char *)"hArray", __pyx_getprop_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_hArray, __pyx_setprop_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_hArray, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    hArray : CUarray\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)o);
  p->_hMipmappedArray = ((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_hMipmappedArray);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)o;
  if (p->_hMipmappedArray) {
    e = (*v)(((PyObject *)p->_hMipmappedArray), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)o;
  tmp = ((PyObject*)p->_hMipmappedArray);
  p->_hMipmappedArray = ((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_hMipmappedArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_15hMipmappedArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_hMipmappedArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_15hMipmappedArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s[] = {
  {(char *)"hMipmappedArray", __pyx_getprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_hMipmappedArray, __pyx_setprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_hMipmappedArray, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    hMipmappedArray : CUmipmappedArray\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)o);
  p->_devPtr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_devPtr);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)o;
  if (p->_devPtr) {
    e = (*v)(((PyObject *)p->_devPtr), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)o;
  tmp = ((PyObject*)p->_devPtr);
  p->_devPtr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_devPtr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6devPtr_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_devPtr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6devPtr_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_format(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6format_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_6format_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_numChannels(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11numChannels_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_numChannels(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11numChannels_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_sizeInBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11sizeInBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_sizeInBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11sizeInBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s[] = {
  {(char *)"devPtr", __pyx_getprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_devPtr, __pyx_setprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_devPtr, (char *)0, 0},
  {(char *)"format", __pyx_getprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_format, __pyx_setprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_format, (char *)0, 0},
  {(char *)"numChannels", __pyx_getprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_numChannels, __pyx_setprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_numChannels, (char *)0, 0},
  {(char *)"sizeInBytes", __pyx_getprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_sizeInBytes, __pyx_setprop_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_sizeInBytes, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    devPtr : CUdeviceptr\n\n    format : CUarray_format\n\n    numChannels : unsigned int\n\n    sizeInBytes : size_t\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)o);
  p->_devPtr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_devPtr);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)o;
  if (p->_devPtr) {
    e = (*v)(((PyObject *)p->_devPtr), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)o;
  tmp = ((PyObject*)p->_devPtr);
  p->_devPtr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_devPtr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6devPtr_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_devPtr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6devPtr_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_format(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6format_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6format_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_numChannels(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11numChannels_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_numChannels(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11numChannels_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5width_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_width(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5width_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6height_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_height(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_6height_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_pitchInBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_12pitchInBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_pitchInBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_12pitchInBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s[] = {
  {(char *)"devPtr", __pyx_getprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_devPtr, __pyx_setprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_devPtr, (char *)0, 0},
  {(char *)"format", __pyx_getprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_format, __pyx_setprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_format, (char *)0, 0},
  {(char *)"numChannels", __pyx_getprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_numChannels, __pyx_setprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_numChannels, (char *)0, 0},
  {(char *)"width", __pyx_getprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_width, __pyx_setprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_width, (char *)0, 0},
  {(char *)"height", __pyx_getprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_height, __pyx_setprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_height, (char *)0, 0},
  {(char *)"pitchInBytes", __pyx_getprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_pitchInBytes, __pyx_setprop_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_pitchInBytes, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    devPtr : CUdeviceptr\n\n    format : CUarray_format\n\n    numChannels : unsigned int\n\n    width : size_t\n\n    height : size_t\n\n    pitchInBytes : size_t\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s[] = {
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_reserved, __pyx_setprop_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    reserved : List[int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)o);
  p->_array = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)Py_None); Py_INCREF(Py_None);
  p->_mipmap = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)Py_None); Py_INCREF(Py_None);
  p->_linear = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)Py_None); Py_INCREF(Py_None);
  p->_pitch2D = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)Py_None); Py_INCREF(Py_None);
  p->_reserved = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_array);
  Py_CLEAR(p->_mipmap);
  Py_CLEAR(p->_linear);
  Py_CLEAR(p->_pitch2D);
  Py_CLEAR(p->_reserved);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)o;
  if (p->_array) {
    e = (*v)(((PyObject *)p->_array), a); if (e) return e;
  }
  if (p->_mipmap) {
    e = (*v)(((PyObject *)p->_mipmap), a); if (e) return e;
  }
  if (p->_linear) {
    e = (*v)(((PyObject *)p->_linear), a); if (e) return e;
  }
  if (p->_pitch2D) {
    e = (*v)(((PyObject *)p->_pitch2D), a); if (e) return e;
  }
  if (p->_reserved) {
    e = (*v)(((PyObject *)p->_reserved), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)o;
  tmp = ((PyObject*)p->_array);
  p->_array = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_mipmap);
  p->_mipmap = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_linear);
  p->_linear = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_pitch2D);
  p->_pitch2D = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_reserved);
  p->_reserved = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_array(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5array_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_array(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5array_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_mipmap(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6mipmap_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_mipmap(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6mipmap_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_linear(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6linear_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_linear(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_6linear_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_pitch2D(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7pitch2D_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_pitch2D(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7pitch2D_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u[] = {
  {(char *)"array", __pyx_getprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_array, __pyx_setprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_array, (char *)0, 0},
  {(char *)"mipmap", __pyx_getprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_mipmap, __pyx_setprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_mipmap, (char *)0, 0},
  {(char *)"linear", __pyx_getprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_linear, __pyx_setprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_linear, (char *)0, 0},
  {(char *)"pitch2D", __pyx_getprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_pitch2D, __pyx_setprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_pitch2D, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_reserved, __pyx_setprop_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    array : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s\n\n    mipmap : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s\n\n    linear : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s\n\n    pitch2D : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s\n\n    reserved : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)o);
  p->_res = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_RESOURCE_DESC_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_res);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_RESOURCE_DESC_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)o;
  if (p->_res) {
    e = (*v)(((PyObject *)p->_res), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_RESOURCE_DESC_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st *)o;
  tmp = ((PyObject*)p->_res);
  p->_res = ((struct __pyx_obj_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_resType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7resType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_resType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7resType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_res(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3res_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_res(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3res_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_RESOURCE_DESC_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_RESOURCE_DESC_st[] = {
  {(char *)"resType", __pyx_getprop_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_resType, __pyx_setprop_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_resType, (char *)0, 0},
  {(char *)"res", __pyx_getprop_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_res, __pyx_setprop_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_res, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_flags, __pyx_setprop_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_flags, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_RESOURCE_DESC_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_RESOURCE_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_RESOURCE_DESC_st(void_ptr _ptr=0)\n\n    CUDA Resource descriptor\n\n    Attributes\n    ----------\n    resType : CUresourcetype\n        Resource type\n    res : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u\n\n    flags : unsigned int\n        Flags (must be zero)\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_RESOURCE_DESC_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_RESOURCE_DESC_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_RESOURCE_DESC_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_RESOURCE_DESC_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_DESC_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_TEXTURE_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_TEXTURE_DESC_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_addressMode(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11addressMode_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_addressMode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11addressMode_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_filterMode(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10filterMode_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_filterMode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10filterMode_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_maxAnisotropy(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13maxAnisotropy_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_maxAnisotropy(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13maxAnisotropy_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_mipmapFilterMode(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_16mipmapFilterMode_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_mipmapFilterMode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_16mipmapFilterMode_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_mipmapLevelBias(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_15mipmapLevelBias_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_mipmapLevelBias(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_15mipmapLevelBias_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_minMipmapLevelClamp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19minMipmapLevelClamp_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_minMipmapLevelClamp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19minMipmapLevelClamp_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_maxMipmapLevelClamp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19maxMipmapLevelClamp_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_maxMipmapLevelClamp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_19maxMipmapLevelClamp_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_borderColor(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11borderColor_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_borderColor(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11borderColor_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_TEXTURE_DESC_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_TEXTURE_DESC_st[] = {
  {(char *)"addressMode", __pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_addressMode, __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_addressMode, (char *)0, 0},
  {(char *)"filterMode", __pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_filterMode, __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_filterMode, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_flags, __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_flags, (char *)0, 0},
  {(char *)"maxAnisotropy", __pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_maxAnisotropy, __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_maxAnisotropy, (char *)0, 0},
  {(char *)"mipmapFilterMode", __pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_mipmapFilterMode, __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_mipmapFilterMode, (char *)0, 0},
  {(char *)"mipmapLevelBias", __pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_mipmapLevelBias, __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_mipmapLevelBias, (char *)0, 0},
  {(char *)"minMipmapLevelClamp", __pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_minMipmapLevelClamp, __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_minMipmapLevelClamp, (char *)0, 0},
  {(char *)"maxMipmapLevelClamp", __pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_maxMipmapLevelClamp, __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_maxMipmapLevelClamp, (char *)0, 0},
  {(char *)"borderColor", __pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_borderColor, __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_borderColor, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_reserved, __pyx_setprop_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_TEXTURE_DESC_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_TEXTURE_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUDA_TEXTURE_DESC_st(void_ptr _ptr=0)\n\n    Texture descriptor\n\n    Attributes\n    ----------\n    addressMode : List[CUaddress_mode]\n        Address modes\n    filterMode : CUfilter_mode\n        Filter mode\n    flags : unsigned int\n        Flags\n    maxAnisotropy : unsigned int\n        Maximum anisotropy ratio\n    mipmapFilterMode : CUfilter_mode\n        Mipmap filter mode\n    mipmapLevelBias : float\n        Mipmap level bias\n    minMipmapLevelClamp : float\n        Mipmap minimum level clamp\n    maxMipmapLevelClamp : float\n        Mipmap maximum level clamp\n    borderColor : List[float]\n        Border Color\n    reserved : List[int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_TEXTURE_DESC_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_TEXTURE_DESC_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_TEXTURE_DESC_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_format(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6format_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6format_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5width_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_width(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5width_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6height_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_height(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6height_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_depth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5depth_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_depth(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_5depth_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_firstMipmapLevel(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_16firstMipmapLevel_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_firstMipmapLevel(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_16firstMipmapLevel_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_lastMipmapLevel(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_15lastMipmapLevel_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_lastMipmapLevel(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_15lastMipmapLevel_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_firstLayer(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10firstLayer_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_firstLayer(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10firstLayer_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_lastLayer(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9lastLayer_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_lastLayer(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9lastLayer_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st[] = {
  {(char *)"format", __pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_format, __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_format, (char *)0, 0},
  {(char *)"width", __pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_width, __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_width, (char *)0, 0},
  {(char *)"height", __pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_height, __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_height, (char *)0, 0},
  {(char *)"depth", __pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_depth, __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_depth, (char *)0, 0},
  {(char *)"firstMipmapLevel", __pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_firstMipmapLevel, __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_firstMipmapLevel, (char *)0, 0},
  {(char *)"lastMipmapLevel", __pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_lastMipmapLevel, __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_lastMipmapLevel, (char *)0, 0},
  {(char *)"firstLayer", __pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_firstLayer, __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_firstLayer, (char *)0, 0},
  {(char *)"lastLayer", __pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_lastLayer, __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_lastLayer, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_reserved, __pyx_setprop_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_RESOURCE_VIEW_DESC_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUDA_RESOURCE_VIEW_DESC_st(void_ptr _ptr=0)\n\n    Resource view descriptor\n\n    Attributes\n    ----------\n    format : CUresourceViewFormat\n        Resource view format\n    width : size_t\n        Width of the resource view\n    height : size_t\n        Height of the resource view\n    depth : size_t\n        Depth of the resource view\n    firstMipmapLevel : unsigned int\n        First defined mipmap level\n    lastMipmapLevel : unsigned int\n        Last defined mipmap level\n    firstLayer : unsigned int\n        First layer index\n    lastLayer : unsigned int\n        Last layer index\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_p2pToken(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8p2pToken_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_p2pToken(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_8p2pToken_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_vaSpaceToken(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12vaSpaceToken_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_vaSpaceToken(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12vaSpaceToken_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st[] = {
  {(char *)"p2pToken", __pyx_getprop_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_p2pToken, __pyx_setprop_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_p2pToken, (char *)0, 0},
  {(char *)"vaSpaceToken", __pyx_getprop_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_vaSpaceToken, __pyx_setprop_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_vaSpaceToken, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st(void_ptr _ptr=0)\n\n    GPU Direct v3 tokens\n\n    Attributes\n    ----------\n    p2pToken : unsigned long long\n\n    vaSpaceToken : unsigned int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)o);
  p->_function = ((struct __pyx_obj_4cuda_4cuda_CUfunction *)Py_None); Py_INCREF(Py_None);
  p->_hStream = ((struct __pyx_obj_4cuda_4cuda_CUstream *)Py_None); Py_INCREF(Py_None);
  p->_ckernelParams = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperKernelParams *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_function);
  Py_CLEAR(p->_hStream);
  Py_CLEAR(p->_ckernelParams);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)o;
  if (p->_function) {
    e = (*v)(((PyObject *)p->_function), a); if (e) return e;
  }
  if (p->_hStream) {
    e = (*v)(((PyObject *)p->_hStream), a); if (e) return e;
  }
  if (p->_ckernelParams) {
    e = (*v)(((PyObject *)p->_ckernelParams), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st *)o;
  tmp = ((PyObject*)p->_function);
  p->_function = ((struct __pyx_obj_4cuda_4cuda_CUfunction *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_hStream);
  p->_hStream = ((struct __pyx_obj_4cuda_4cuda_CUstream *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_ckernelParams);
  p->_ckernelParams = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperKernelParams *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_function(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8function_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_function(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8function_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_gridDimX(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimX_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_gridDimX(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimX_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_gridDimY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_gridDimY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_gridDimZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimZ_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_gridDimZ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_8gridDimZ_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_blockDimX(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimX_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_blockDimX(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimX_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_blockDimY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_blockDimY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_blockDimZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimZ_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_blockDimZ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9blockDimZ_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_sharedMemBytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_14sharedMemBytes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_sharedMemBytes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_14sharedMemBytes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_hStream(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7hStream_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_hStream(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7hStream_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_kernelParams(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12kernelParams_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_kernelParams(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12kernelParams_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st[] = {
  {(char *)"function", __pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_function, __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_function, (char *)0, 0},
  {(char *)"gridDimX", __pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_gridDimX, __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_gridDimX, (char *)0, 0},
  {(char *)"gridDimY", __pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_gridDimY, __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_gridDimY, (char *)0, 0},
  {(char *)"gridDimZ", __pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_gridDimZ, __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_gridDimZ, (char *)0, 0},
  {(char *)"blockDimX", __pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_blockDimX, __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_blockDimX, (char *)0, 0},
  {(char *)"blockDimY", __pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_blockDimY, __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_blockDimY, (char *)0, 0},
  {(char *)"blockDimZ", __pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_blockDimZ, __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_blockDimZ, (char *)0, 0},
  {(char *)"sharedMemBytes", __pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_sharedMemBytes, __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_sharedMemBytes, (char *)0, 0},
  {(char *)"hStream", __pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_hStream, __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_hStream, (char *)0, 0},
  {(char *)"kernelParams", __pyx_getprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_kernelParams, __pyx_setprop_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_kernelParams, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_LAUNCH_PARAMS_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_LAUNCH_PARAMS_st(void_ptr _ptr=0)\n\n    Kernel launch parameters\n\n    Attributes\n    ----------\n    function : CUfunction\n        Kernel to launch\n    gridDimX : unsigned int\n        Width of grid in blocks\n    gridDimY : unsigned int\n        Height of grid in blocks\n    gridDimZ : unsigned int\n        Depth of grid in blocks\n    blockDimX : unsigned int\n        X dimension of each thread block\n    blockDimY : unsigned int\n        Y dimension of each thread block\n    blockDimZ : unsigned int\n        Z dimension of each thread block\n    sharedMemBytes : unsigned int\n        Dynamic shared-memory size per thread block in bytes\n    hStream : CUstream\n        Stream identifier\n    kernelParams : Any\n        Array of pointers to kernel parameters\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)o);
  p->_chandle = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  p->_cname = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_chandle);
  Py_CLEAR(p->_cname);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)o;
  if (p->_chandle) {
    e = (*v)(((PyObject *)p->_chandle), a); if (e) return e;
  }
  if (p->_cname) {
    e = (*v)(((PyObject *)p->_cname), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)o;
  tmp = ((PyObject*)p->_chandle);
  p->_chandle = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cname);
  p->_cname = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_handle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6handle_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_handle(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_6handle_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4name_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4name_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s[] = {
  {(char *)"handle", __pyx_getprop_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_handle, __pyx_setprop_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_handle, (char *)0, 0},
  {(char *)"name", __pyx_getprop_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_name, __pyx_setprop_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_name, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    handle : void\n\n    name : void\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)o);
  p->_win32 = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)Py_None); Py_INCREF(Py_None);
  p->_cnvSciBufObject = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_win32);
  Py_CLEAR(p->_cnvSciBufObject);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)o;
  if (p->_win32) {
    e = (*v)(((PyObject *)p->_win32), a); if (e) return e;
  }
  if (p->_cnvSciBufObject) {
    e = (*v)(((PyObject *)p->_cnvSciBufObject), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)o;
  tmp = ((PyObject*)p->_win32);
  p->_win32 = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cnvSciBufObject);
  p->_cnvSciBufObject = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_fd(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2fd_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_fd(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_2fd_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_win32(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5win32_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_win32(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5win32_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_nvSciBufObject(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_14nvSciBufObject_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_nvSciBufObject(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_14nvSciBufObject_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u[] = {
  {(char *)"fd", __pyx_getprop_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_fd, __pyx_setprop_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_fd, (char *)0, 0},
  {(char *)"win32", __pyx_getprop_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_win32, __pyx_setprop_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_win32, (char *)0, 0},
  {(char *)"nvSciBufObject", __pyx_getprop_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_nvSciBufObject, __pyx_setprop_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_nvSciBufObject, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    fd : int\n\n    win32 : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s\n\n    nvSciBufObject : void\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)o);
  p->_handle = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_handle);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)o;
  if (p->_handle) {
    e = (*v)(((PyObject *)p->_handle), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *)o;
  tmp = ((PyObject*)p->_handle);
  p->_handle = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4type_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6handle_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6handle_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4size_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_4size_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st[] = {
  {(char *)"type", __pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_type, __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_type, (char *)0, 0},
  {(char *)"handle", __pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle, __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle, (char *)0, 0},
  {(char *)"size", __pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_size, __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_size, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_flags, __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_flags, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_reserved, __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st(void_ptr _ptr=0)\n\n    External memory handle descriptor\n\n    Attributes\n    ----------\n    type : CUexternalMemoryHandleType\n        Type of the handle\n    handle : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u\n\n    size : unsigned long long\n        Size of the memory allocation\n    flags : unsigned int\n        Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6offset_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6offset_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4size_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_4size_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st[] = {
  {(char *)"offset", __pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_offset, __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_offset, (char *)0, 0},
  {(char *)"size", __pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_size, __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_size, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_flags, __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_flags, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_reserved, __pyx_setprop_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st(void_ptr _ptr=0)\n\n    External memory buffer descriptor\n\n    Attributes\n    ----------\n    offset : unsigned long long\n        Offset into the memory object where the buffer's base is\n    size : unsigned long long\n        Size of the buffer\n    flags : unsigned int\n        Flags reserved for future use. Must be zero.\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)o);
  p->_arrayDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_arrayDesc);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)o;
  if (p->_arrayDesc) {
    e = (*v)(((PyObject *)p->_arrayDesc), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *)o;
  tmp = ((PyObject*)p->_arrayDesc);
  p->_arrayDesc = ((struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6offset_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6offset_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_arrayDesc(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9arrayDesc_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_arrayDesc(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9arrayDesc_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_numLevels(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9numLevels_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_numLevels(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9numLevels_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st[] = {
  {(char *)"offset", __pyx_getprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_offset, __pyx_setprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_offset, (char *)0, 0},
  {(char *)"arrayDesc", __pyx_getprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_arrayDesc, __pyx_setprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_arrayDesc, (char *)0, 0},
  {(char *)"numLevels", __pyx_getprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_numLevels, __pyx_setprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_numLevels, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_reserved, __pyx_setprop_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st(void_ptr _ptr=0)\n\n    External memory mipmap descriptor\n\n    Attributes\n    ----------\n    offset : unsigned long long\n        Offset into the memory object where the base level of the mipmap\n        chain is.\n    arrayDesc : CUDA_ARRAY3D_DESCRIPTOR\n        Format, dimension and type of base level of the mipmap chain\n    numLevels : unsigned int\n        Total number of levels in the mipmap chain\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)o);
  p->_chandle = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  p->_cname = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_chandle);
  Py_CLEAR(p->_cname);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)o;
  if (p->_chandle) {
    e = (*v)(((PyObject *)p->_chandle), a); if (e) return e;
  }
  if (p->_cname) {
    e = (*v)(((PyObject *)p->_cname), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)o;
  tmp = ((PyObject*)p->_chandle);
  p->_chandle = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cname);
  p->_cname = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_handle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6handle_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_handle(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_6handle_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4name_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4name_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s[] = {
  {(char *)"handle", __pyx_getprop_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_handle, __pyx_setprop_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_handle, (char *)0, 0},
  {(char *)"name", __pyx_getprop_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_name, __pyx_setprop_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_name, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    handle : void\n\n    name : void\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)o);
  p->_win32 = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)Py_None); Py_INCREF(Py_None);
  p->_cnvSciSyncObj = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_win32);
  Py_CLEAR(p->_cnvSciSyncObj);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)o;
  if (p->_win32) {
    e = (*v)(((PyObject *)p->_win32), a); if (e) return e;
  }
  if (p->_cnvSciSyncObj) {
    e = (*v)(((PyObject *)p->_cnvSciSyncObj), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)o;
  tmp = ((PyObject*)p->_win32);
  p->_win32 = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cnvSciSyncObj);
  p->_cnvSciSyncObj = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_fd(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2fd_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_fd(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_2fd_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_win32(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5win32_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_win32(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5win32_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_nvSciSyncObj(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_12nvSciSyncObj_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_nvSciSyncObj(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_12nvSciSyncObj_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u[] = {
  {(char *)"fd", __pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_fd, __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_fd, (char *)0, 0},
  {(char *)"win32", __pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_win32, __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_win32, (char *)0, 0},
  {(char *)"nvSciSyncObj", __pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_nvSciSyncObj, __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_nvSciSyncObj, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    fd : int\n\n    win32 : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s\n\n    nvSciSyncObj : void\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)o);
  p->_handle = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_handle);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)o;
  if (p->_handle) {
    e = (*v)(((PyObject *)p->_handle), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *)o;
  tmp = ((PyObject*)p->_handle);
  p->_handle = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4type_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_4type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6handle_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6handle_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st[] = {
  {(char *)"type", __pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_type, __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_type, (char *)0, 0},
  {(char *)"handle", __pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle, __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_flags, __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_flags, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_reserved, __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st(void_ptr _ptr=0)\n\n    External semaphore handle descriptor\n\n    Attributes\n    ----------\n    type : CUexternalSemaphoreHandleType\n        Type of the handle\n    handle : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u\n\n    flags : unsigned int\n        Flags reserved for the future. Must be zero.\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_value(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5value_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5value_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s[] = {
  {(char *)"value", __pyx_getprop_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_value, __pyx_setprop_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_value, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    value : unsigned long long\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)o);
  p->_cfence = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_cfence);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)o;
  if (p->_cfence) {
    e = (*v)(((PyObject *)p->_cfence), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)o;
  tmp = ((PyObject*)p->_cfence);
  p->_cfence = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_fence(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5fence_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_fence(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5fence_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u[] = {
  {(char *)"fence", __pyx_getprop_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_fence, __pyx_setprop_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_fence, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_reserved, __pyx_setprop_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    fence : void\n\n    reserved : unsigned long long\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_key(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3key_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_key(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3key_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s[] = {
  {(char *)"key", __pyx_getprop_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_key, __pyx_setprop_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_key, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    key : unsigned long long\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)o);
  p->_fence = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *)Py_None); Py_INCREF(Py_None);
  p->_nvSciSync = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)Py_None); Py_INCREF(Py_None);
  p->_keyedMutex = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_fence);
  Py_CLEAR(p->_nvSciSync);
  Py_CLEAR(p->_keyedMutex);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)o;
  if (p->_fence) {
    e = (*v)(((PyObject *)p->_fence), a); if (e) return e;
  }
  if (p->_nvSciSync) {
    e = (*v)(((PyObject *)p->_nvSciSync), a); if (e) return e;
  }
  if (p->_keyedMutex) {
    e = (*v)(((PyObject *)p->_keyedMutex), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)o;
  tmp = ((PyObject*)p->_fence);
  p->_fence = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_nvSciSync);
  p->_nvSciSync = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_keyedMutex);
  p->_keyedMutex = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_fence(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5fence_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_fence(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5fence_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_nvSciSync(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9nvSciSync_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_nvSciSync(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9nvSciSync_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_keyedMutex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10keyedMutex_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_keyedMutex(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10keyedMutex_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s[] = {
  {(char *)"fence", __pyx_getprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_fence, __pyx_setprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_fence, (char *)0, 0},
  {(char *)"nvSciSync", __pyx_getprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_nvSciSync, __pyx_setprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_nvSciSync, (char *)0, 0},
  {(char *)"keyedMutex", __pyx_getprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_keyedMutex, __pyx_setprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_keyedMutex, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_reserved, __pyx_setprop_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    fence : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s\n\n    nvSciSync : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u\n\n    keyedMutex : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s\n\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)o);
  p->_params = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_params);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)o;
  if (p->_params) {
    e = (*v)(((PyObject *)p->_params), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *)o;
  tmp = ((PyObject*)p->_params);
  p->_params = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6params_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6params_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st[] = {
  {(char *)"params", __pyx_getprop_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params, __pyx_setprop_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_flags, __pyx_setprop_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_flags, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_reserved, __pyx_setprop_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st(void_ptr _ptr=0)\n\n    External semaphore signal parameters\n\n    Attributes\n    ----------\n    params : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s\n\n    flags : unsigned int\n        Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal\n        a CUexternalSemaphore of type\n        CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is\n        CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which\n        indicates that while signaling the CUexternalSemaphore, no memory\n        synchronization operations should be performed for any external\n        memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF.\n        For all other types of CUexternalSemaphore, flags must be zero.\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_value(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5value_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5value_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s[] = {
  {(char *)"value", __pyx_getprop_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_value, __pyx_setprop_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_value, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    value : unsigned long long\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)o);
  p->_cfence = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_cfence);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)o;
  if (p->_cfence) {
    e = (*v)(((PyObject *)p->_cfence), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)o;
  tmp = ((PyObject*)p->_cfence);
  p->_cfence = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_fence(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5fence_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_fence(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5fence_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u[] = {
  {(char *)"fence", __pyx_getprop_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_fence, __pyx_setprop_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_fence, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_reserved, __pyx_setprop_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    fence : void\n\n    reserved : unsigned long long\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_key(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3key_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_key(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3key_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_timeoutMs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9timeoutMs_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_timeoutMs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9timeoutMs_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s[] = {
  {(char *)"key", __pyx_getprop_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_key, __pyx_setprop_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_key, (char *)0, 0},
  {(char *)"timeoutMs", __pyx_getprop_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_timeoutMs, __pyx_setprop_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_timeoutMs, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    key : unsigned long long\n\n    timeoutMs : unsigned int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)o);
  p->_fence = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *)Py_None); Py_INCREF(Py_None);
  p->_nvSciSync = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)Py_None); Py_INCREF(Py_None);
  p->_keyedMutex = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_fence);
  Py_CLEAR(p->_nvSciSync);
  Py_CLEAR(p->_keyedMutex);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)o;
  if (p->_fence) {
    e = (*v)(((PyObject *)p->_fence), a); if (e) return e;
  }
  if (p->_nvSciSync) {
    e = (*v)(((PyObject *)p->_nvSciSync), a); if (e) return e;
  }
  if (p->_keyedMutex) {
    e = (*v)(((PyObject *)p->_keyedMutex), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *p = (struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)o;
  tmp = ((PyObject*)p->_fence);
  p->_fence = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_nvSciSync);
  p->_nvSciSync = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_keyedMutex);
  p->_keyedMutex = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_fence(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5fence_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_fence(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5fence_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_nvSciSync(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9nvSciSync_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_nvSciSync(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9nvSciSync_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_keyedMutex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10keyedMutex_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_keyedMutex(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10keyedMutex_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s[] = {
  {(char *)"fence", __pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_fence, __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_fence, (char *)0, 0},
  {(char *)"nvSciSync", __pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_nvSciSync, __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_nvSciSync, (char *)0, 0},
  {(char *)"keyedMutex", __pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_keyedMutex, __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_keyedMutex, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_reserved, __pyx_setprop_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    fence : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s\n\n    nvSciSync : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u\n\n    keyedMutex : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s\n\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)o);
  p->_params = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_params);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)o;
  if (p->_params) {
    e = (*v)(((PyObject *)p->_params), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *)o;
  tmp = ((PyObject*)p->_params);
  p->_params = ((struct __pyx_obj_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6params_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6params_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st[] = {
  {(char *)"params", __pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params, __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_flags, __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_flags, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_reserved, __pyx_setprop_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st(void_ptr _ptr=0)\n\n    External semaphore wait parameters\n\n    Attributes\n    ----------\n    params : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s\n\n    flags : unsigned int\n        Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on\n        a CUexternalSemaphore of type\n        CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is\n        CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates\n        that while waiting for the CUexternalSemaphore, no memory\n        synchronization operations should be performed for any external\n        memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF.\n        For all other types of CUexternalSemaphore, flags must be zero.\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_extSemArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11extSemArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_extSemArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11extSemArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_paramsArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11paramsArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_paramsArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11paramsArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_numExtSems(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10numExtSems_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_numExtSems(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10numExtSems_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st[] = {
  {(char *)"extSemArray", __pyx_getprop_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_extSemArray, __pyx_setprop_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_extSemArray, (char *)0, 0},
  {(char *)"paramsArray", __pyx_getprop_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_paramsArray, __pyx_setprop_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_paramsArray, (char *)0, 0},
  {(char *)"numExtSems", __pyx_getprop_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_numExtSems, __pyx_setprop_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_numExtSems, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st(void_ptr _ptr=0)\n\n    Semaphore signal node parameters\n\n    Attributes\n    ----------\n    extSemArray : CUexternalSemaphore\n        Array of external semaphore handles.\n    paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS\n        Array of external semaphore signal parameters.\n    numExtSems : unsigned int\n        Number of handles and parameters supplied in extSemArray and\n        paramsArray.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_extSemArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11extSemArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_extSemArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11extSemArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_paramsArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11paramsArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_paramsArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11paramsArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_numExtSems(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10numExtSems_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_numExtSems(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10numExtSems_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st[] = {
  {(char *)"extSemArray", __pyx_getprop_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_extSemArray, __pyx_setprop_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_extSemArray, (char *)0, 0},
  {(char *)"paramsArray", __pyx_getprop_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_paramsArray, __pyx_setprop_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_paramsArray, (char *)0, 0},
  {(char *)"numExtSems", __pyx_getprop_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_numExtSems, __pyx_setprop_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_numExtSems, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUDA_EXT_SEM_WAIT_NODE_PARAMS_st(void_ptr _ptr=0)\n\n    Semaphore wait node parameters\n\n    Attributes\n    ----------\n    extSemArray : CUexternalSemaphore\n        Array of external semaphore handles.\n    paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS\n        Array of external semaphore wait parameters.\n    numExtSems : unsigned int\n        Number of handles and parameters supplied in extSemArray and\n        paramsArray.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)o);
  p->_mipmap = ((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)Py_None); Py_INCREF(Py_None);
  p->_array = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *p = (struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_mipmap);
  Py_CLEAR(p->_array);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *p = (struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)o;
  if (p->_mipmap) {
    e = (*v)(((PyObject *)p->_mipmap), a); if (e) return e;
  }
  if (p->_array) {
    e = (*v)(((PyObject *)p->_array), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *p = (struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)o;
  tmp = ((PyObject*)p->_mipmap);
  p->_mipmap = ((struct __pyx_obj_4cuda_4cuda_CUmipmappedArray *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_array);
  p->_array = ((struct __pyx_obj_4cuda_4cuda_CUarray *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_mipmap(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6mipmap_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_mipmap(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_6mipmap_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_array(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5array_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_array(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5array_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u[] = {
  {(char *)"mipmap", __pyx_getprop_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_mipmap, __pyx_setprop_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_mipmap, (char *)0, 0},
  {(char *)"array", __pyx_getprop_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_array, __pyx_setprop_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_array, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    mipmap : CUmipmappedArray\n\n    array : CUarray\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_level(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5level_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5level_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_layer(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5layer_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_layer(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5layer_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_offsetX(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetX_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_offsetX(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetX_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_offsetY(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetY_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_offsetY(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetY_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_offsetZ(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetZ_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_offsetZ(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7offsetZ_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_extentWidth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentWidth_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_extentWidth(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentWidth_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_extentHeight(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_12extentHeight_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_extentHeight(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_12extentHeight_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_extentDepth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentDepth_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_extentDepth(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11extentDepth_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s[] = {
  {(char *)"level", __pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_level, __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_level, (char *)0, 0},
  {(char *)"layer", __pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_layer, __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_layer, (char *)0, 0},
  {(char *)"offsetX", __pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_offsetX, __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_offsetX, (char *)0, 0},
  {(char *)"offsetY", __pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_offsetY, __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_offsetY, (char *)0, 0},
  {(char *)"offsetZ", __pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_offsetZ, __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_offsetZ, (char *)0, 0},
  {(char *)"extentWidth", __pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_extentWidth, __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_extentWidth, (char *)0, 0},
  {(char *)"extentHeight", __pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_extentHeight, __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_extentHeight, (char *)0, 0},
  {(char *)"extentDepth", __pyx_getprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_extentDepth, __pyx_setprop_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_extentDepth, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    level : unsigned int\n\n    layer : unsigned int\n\n    offsetX : unsigned int\n\n    offsetY : unsigned int\n\n    offsetZ : unsigned int\n\n    extentWidth : unsigned int\n\n    extentHeight : unsigned int\n\n    extentDepth : unsigned int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_layer(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5layer_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_layer(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5layer_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6offset_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_6offset_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4size_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_size(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4size_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s[] = {
  {(char *)"layer", __pyx_getprop_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_layer, __pyx_setprop_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_layer, (char *)0, 0},
  {(char *)"offset", __pyx_getprop_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_offset, __pyx_setprop_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_offset, (char *)0, 0},
  {(char *)"size", __pyx_getprop_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_size, __pyx_setprop_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_size, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    layer : unsigned int\n\n    offset : unsigned long long\n\n    size : unsigned long long\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)o);
  p->_sparseLevel = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)Py_None); Py_INCREF(Py_None);
  p->_miptail = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *p = (struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_sparseLevel);
  Py_CLEAR(p->_miptail);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *p = (struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)o;
  if (p->_sparseLevel) {
    e = (*v)(((PyObject *)p->_sparseLevel), a); if (e) return e;
  }
  if (p->_miptail) {
    e = (*v)(((PyObject *)p->_miptail), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *p = (struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)o;
  tmp = ((PyObject*)p->_sparseLevel);
  p->_sparseLevel = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_miptail);
  p->_miptail = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_sparseLevel(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11sparseLevel_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_sparseLevel(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11sparseLevel_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_miptail(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7miptail_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_miptail(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7miptail_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u[] = {
  {(char *)"sparseLevel", __pyx_getprop_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_sparseLevel, __pyx_setprop_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_sparseLevel, (char *)0, 0},
  {(char *)"miptail", __pyx_getprop_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_miptail, __pyx_setprop_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_miptail, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    sparseLevel : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s\n\n    miptail : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)o);
  p->_memHandle = ((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *p = (struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_memHandle);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *p = (struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)o;
  if (p->_memHandle) {
    e = (*v)(((PyObject *)p->_memHandle), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *p = (struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)o;
  tmp = ((PyObject*)p->_memHandle);
  p->_memHandle = ((struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_memHandle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9memHandle_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_memHandle(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9memHandle_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u[] = {
  {(char *)"memHandle", __pyx_getprop_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_memHandle, __pyx_setprop_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_memHandle, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    memHandle : CUmemGenericAllocationHandle\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUarrayMapInfo_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)o);
  p->_resource = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)Py_None); Py_INCREF(Py_None);
  p->_subresource = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)Py_None); Py_INCREF(Py_None);
  p->_memHandle = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUarrayMapInfo_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *p = (struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_resource);
  Py_CLEAR(p->_subresource);
  Py_CLEAR(p->_memHandle);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUarrayMapInfo_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *p = (struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)o;
  if (p->_resource) {
    e = (*v)(((PyObject *)p->_resource), a); if (e) return e;
  }
  if (p->_subresource) {
    e = (*v)(((PyObject *)p->_subresource), a); if (e) return e;
  }
  if (p->_memHandle) {
    e = (*v)(((PyObject *)p->_memHandle), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUarrayMapInfo_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *p = (struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st *)o;
  tmp = ((PyObject*)p->_resource);
  p->_resource = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_subresource);
  p->_subresource = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_memHandle);
  p->_memHandle = ((struct __pyx_obj_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_resourceType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_12resourceType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_resourceType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_12resourceType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_resource(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_8resource_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_resource(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_8resource_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_subresourceType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_15subresourceType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_subresourceType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_15subresourceType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_subresource(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_11subresource_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_subresource(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_11subresource_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_memOperationType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_16memOperationType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_memOperationType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_16memOperationType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_memHandleType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13memHandleType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_memHandleType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13memHandleType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_memHandle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_9memHandle_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_memHandle(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_9memHandle_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_6offset_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_6offset_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_deviceBitMask(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13deviceBitMask_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_deviceBitMask(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13deviceBitMask_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUarrayMapInfo_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUarrayMapInfo_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUarrayMapInfo_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_17CUarrayMapInfo_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUarrayMapInfo_st[] = {
  {(char *)"resourceType", __pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_resourceType, __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_resourceType, (char *)0, 0},
  {(char *)"resource", __pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_resource, __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_resource, (char *)0, 0},
  {(char *)"subresourceType", __pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_subresourceType, __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_subresourceType, (char *)0, 0},
  {(char *)"subresource", __pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_subresource, __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_subresource, (char *)0, 0},
  {(char *)"memOperationType", __pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_memOperationType, __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_memOperationType, (char *)0, 0},
  {(char *)"memHandleType", __pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_memHandleType, __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_memHandleType, (char *)0, 0},
  {(char *)"memHandle", __pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_memHandle, __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_memHandle, (char *)0, 0},
  {(char *)"offset", __pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_offset, __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_offset, (char *)0, 0},
  {(char *)"deviceBitMask", __pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_deviceBitMask, __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_deviceBitMask, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_flags, __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_flags, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_17CUarrayMapInfo_st_reserved, __pyx_setprop_4cuda_4cuda_17CUarrayMapInfo_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUarrayMapInfo_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUarrayMapInfo_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUarrayMapInfo_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUarrayMapInfo_st(void_ptr _ptr=0)\n\n    Specifies the CUDA array or CUDA mipmapped array memory mapping\n    information\n\n    Attributes\n    ----------\n    resourceType : CUresourcetype\n        Resource type\n    resource : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u\n\n    subresourceType : CUarraySparseSubresourceType\n        Sparse subresource type\n    subresource : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u\n\n    memOperationType : CUmemOperationType\n        Memory operation type\n    memHandleType : CUmemHandleType\n        Memory handle type\n    memHandle : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u\n\n    offset : unsigned long long\n        Offset within mip tail  Offset within the memory\n    deviceBitMask : unsigned int\n        Device ordinal bit mask\n    flags : unsigned int\n        flags for future use, must be zero now.\n    reserved : List[unsigned int]\n        Reserved for future use, must be zero now.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUarrayMapInfo_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUarrayMapInfo_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUarrayMapInfo_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUarrayMapInfo_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUarrayMapInfo_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemLocation_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_16CUmemLocation_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUmemLocation_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_16CUmemLocation_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUmemLocation_st_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUmemLocation_st_4type_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUmemLocation_st_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUmemLocation_st_4type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_16CUmemLocation_st_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_16CUmemLocation_st_2id_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_16CUmemLocation_st_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_16CUmemLocation_st_2id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUmemLocation_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUmemLocation_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUmemLocation_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUmemLocation_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16CUmemLocation_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16CUmemLocation_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16CUmemLocation_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUmemLocation_st[] = {
  {(char *)"type", __pyx_getprop_4cuda_4cuda_16CUmemLocation_st_type, __pyx_setprop_4cuda_4cuda_16CUmemLocation_st_type, (char *)0, 0},
  {(char *)"id", __pyx_getprop_4cuda_4cuda_16CUmemLocation_st_id, __pyx_setprop_4cuda_4cuda_16CUmemLocation_st_id, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemLocation_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemLocation_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemLocation_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemLocation_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_16CUmemLocation_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUmemLocation_st(void_ptr _ptr=0)\n\n    Specifies a memory location.\n\n    Attributes\n    ----------\n    type : CUmemLocationType\n        Specifies the location type, which modifies the meaning of id.\n    id : int\n        identifier for a given this location's CUmemLocationType.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUmemLocation_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUmemLocation_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_16CUmemLocation_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemLocation_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_compressionType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_15compressionType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_compressionType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_15compressionType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_gpuDirectRDMACapable(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_20gpuDirectRDMACapable_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_gpuDirectRDMACapable(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_20gpuDirectRDMACapable_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_usage(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5usage_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_usage(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5usage_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s[] = {
  {(char *)"compressionType", __pyx_getprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_compressionType, __pyx_setprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_compressionType, (char *)0, 0},
  {(char *)"gpuDirectRDMACapable", __pyx_getprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_gpuDirectRDMACapable, __pyx_setprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_gpuDirectRDMACapable, (char *)0, 0},
  {(char *)"usage", __pyx_getprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_usage, __pyx_setprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_usage, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_reserved, __pyx_setprop_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    compressionType : unsigned char\n\n    gpuDirectRDMACapable : unsigned char\n\n    usage : unsigned short\n\n    reserved : unsigned char\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemAllocationProp_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)o);
  p->_location = ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)Py_None); Py_INCREF(Py_None);
  p->_cwin32HandleMetaData = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  p->_allocFlags = ((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUmemAllocationProp_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *p = (struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_location);
  Py_CLEAR(p->_cwin32HandleMetaData);
  Py_CLEAR(p->_allocFlags);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUmemAllocationProp_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *p = (struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)o;
  if (p->_location) {
    e = (*v)(((PyObject *)p->_location), a); if (e) return e;
  }
  if (p->_cwin32HandleMetaData) {
    e = (*v)(((PyObject *)p->_cwin32HandleMetaData), a); if (e) return e;
  }
  if (p->_allocFlags) {
    e = (*v)(((PyObject *)p->_allocFlags), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUmemAllocationProp_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *p = (struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st *)o;
  tmp = ((PyObject*)p->_location);
  p->_location = ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cwin32HandleMetaData);
  p->_cwin32HandleMetaData = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_allocFlags);
  p->_allocFlags = ((struct __pyx_obj_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_22CUmemAllocationProp_st_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_4type_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_22CUmemAllocationProp_st_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_4type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_22CUmemAllocationProp_st_requestedHandleTypes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_20requestedHandleTypes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_22CUmemAllocationProp_st_requestedHandleTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_20requestedHandleTypes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_22CUmemAllocationProp_st_location(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_8location_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_22CUmemAllocationProp_st_location(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_8location_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_22CUmemAllocationProp_st_win32HandleMetaData(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_19win32HandleMetaData_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_22CUmemAllocationProp_st_win32HandleMetaData(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_19win32HandleMetaData_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_22CUmemAllocationProp_st_allocFlags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_10allocFlags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_22CUmemAllocationProp_st_allocFlags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_10allocFlags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUmemAllocationProp_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_22CUmemAllocationProp_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_22CUmemAllocationProp_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_22CUmemAllocationProp_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUmemAllocationProp_st[] = {
  {(char *)"type", __pyx_getprop_4cuda_4cuda_22CUmemAllocationProp_st_type, __pyx_setprop_4cuda_4cuda_22CUmemAllocationProp_st_type, (char *)0, 0},
  {(char *)"requestedHandleTypes", __pyx_getprop_4cuda_4cuda_22CUmemAllocationProp_st_requestedHandleTypes, __pyx_setprop_4cuda_4cuda_22CUmemAllocationProp_st_requestedHandleTypes, (char *)0, 0},
  {(char *)"location", __pyx_getprop_4cuda_4cuda_22CUmemAllocationProp_st_location, __pyx_setprop_4cuda_4cuda_22CUmemAllocationProp_st_location, (char *)0, 0},
  {(char *)"win32HandleMetaData", __pyx_getprop_4cuda_4cuda_22CUmemAllocationProp_st_win32HandleMetaData, __pyx_setprop_4cuda_4cuda_22CUmemAllocationProp_st_win32HandleMetaData, (char *)0, 0},
  {(char *)"allocFlags", __pyx_getprop_4cuda_4cuda_22CUmemAllocationProp_st_allocFlags, __pyx_setprop_4cuda_4cuda_22CUmemAllocationProp_st_allocFlags, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemAllocationProp_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemAllocationProp_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemAllocationProp_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUmemAllocationProp_st(void_ptr _ptr=0)\n\n    Specifies the allocation properties for a allocation.\n\n    Attributes\n    ----------\n    type : CUmemAllocationType\n        Allocation type\n    requestedHandleTypes : CUmemAllocationHandleType\n        requested CUmemAllocationHandleType\n    location : CUmemLocation\n        Location of allocation\n    win32HandleMetaData : Any\n        Windows-specific POBJECT_ATTRIBUTES required when\n        CU_MEM_HANDLE_TYPE_WIN32 is specified. This object atributes\n        structure includes security attributes that define the scope of\n        which exported allocations may be tranferred to other processes. In\n        all other cases, this field is required to be zero.\n    allocFlags : _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUmemAllocationProp_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUmemAllocationProp_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUmemAllocationProp_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUmemAllocationProp_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemAllocationProp_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemAccessDesc_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)o);
  p->_location = ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUmemAccessDesc_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *p = (struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_location);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUmemAccessDesc_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *p = (struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)o;
  if (p->_location) {
    e = (*v)(((PyObject *)p->_location), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUmemAccessDesc_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *p = (struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st *)o;
  tmp = ((PyObject*)p->_location);
  p->_location = ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_18CUmemAccessDesc_st_location(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_8location_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_18CUmemAccessDesc_st_location(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_8location_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_18CUmemAccessDesc_st_flags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_5flags_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_18CUmemAccessDesc_st_flags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_5flags_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUmemAccessDesc_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_18CUmemAccessDesc_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_18CUmemAccessDesc_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_18CUmemAccessDesc_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUmemAccessDesc_st[] = {
  {(char *)"location", __pyx_getprop_4cuda_4cuda_18CUmemAccessDesc_st_location, __pyx_setprop_4cuda_4cuda_18CUmemAccessDesc_st_location, (char *)0, 0},
  {(char *)"flags", __pyx_getprop_4cuda_4cuda_18CUmemAccessDesc_st_flags, __pyx_setprop_4cuda_4cuda_18CUmemAccessDesc_st_flags, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemAccessDesc_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemAccessDesc_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemAccessDesc_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUmemAccessDesc_st(void_ptr _ptr=0)\n\n    Memory access descriptor\n\n    Attributes\n    ----------\n    location : CUmemLocation\n        Location on which the request is to change it's accessibility\n    flags : CUmemAccess_flags\n        ::CUmemProt accessibility flags to set on the request\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUmemAccessDesc_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUmemAccessDesc_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUmemAccessDesc_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUmemAccessDesc_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemAccessDesc_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemPoolProps_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)o);
  p->_location = ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)Py_None); Py_INCREF(Py_None);
  p->_cwin32SecurityAttributes = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUmemPoolProps_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *p = (struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_location);
  Py_CLEAR(p->_cwin32SecurityAttributes);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUmemPoolProps_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *p = (struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)o;
  if (p->_location) {
    e = (*v)(((PyObject *)p->_location), a); if (e) return e;
  }
  if (p->_cwin32SecurityAttributes) {
    e = (*v)(((PyObject *)p->_cwin32SecurityAttributes), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUmemPoolProps_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *p = (struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st *)o;
  tmp = ((PyObject*)p->_location);
  p->_location = ((struct __pyx_obj_4cuda_4cuda_CUmemLocation *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cwin32SecurityAttributes);
  p->_cwin32SecurityAttributes = ((struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUmemPoolProps_st_allocType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_9allocType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUmemPoolProps_st_allocType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_9allocType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUmemPoolProps_st_handleTypes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_11handleTypes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUmemPoolProps_st_handleTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_11handleTypes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUmemPoolProps_st_location(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_8location_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUmemPoolProps_st_location(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_8location_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUmemPoolProps_st_win32SecurityAttributes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_23win32SecurityAttributes_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUmemPoolProps_st_win32SecurityAttributes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_23win32SecurityAttributes_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_17CUmemPoolProps_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_17CUmemPoolProps_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUmemPoolProps_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUmemPoolProps_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_17CUmemPoolProps_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_17CUmemPoolProps_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUmemPoolProps_st[] = {
  {(char *)"allocType", __pyx_getprop_4cuda_4cuda_17CUmemPoolProps_st_allocType, __pyx_setprop_4cuda_4cuda_17CUmemPoolProps_st_allocType, (char *)0, 0},
  {(char *)"handleTypes", __pyx_getprop_4cuda_4cuda_17CUmemPoolProps_st_handleTypes, __pyx_setprop_4cuda_4cuda_17CUmemPoolProps_st_handleTypes, (char *)0, 0},
  {(char *)"location", __pyx_getprop_4cuda_4cuda_17CUmemPoolProps_st_location, __pyx_setprop_4cuda_4cuda_17CUmemPoolProps_st_location, (char *)0, 0},
  {(char *)"win32SecurityAttributes", __pyx_getprop_4cuda_4cuda_17CUmemPoolProps_st_win32SecurityAttributes, __pyx_setprop_4cuda_4cuda_17CUmemPoolProps_st_win32SecurityAttributes, (char *)0, 0},
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_17CUmemPoolProps_st_reserved, __pyx_setprop_4cuda_4cuda_17CUmemPoolProps_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemPoolProps_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemPoolProps_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemPoolProps_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUmemPoolProps_st(void_ptr _ptr=0)\n\n    Specifies the properties of allocations made from the pool.\n\n    Attributes\n    ----------\n    allocType : CUmemAllocationType\n        Allocation type. Currently must be specified as\n        CU_MEM_ALLOCATION_TYPE_PINNED\n    handleTypes : CUmemAllocationHandleType\n        Handle types that will be supported by allocations from the pool.\n    location : CUmemLocation\n        Location where allocations should reside.\n    win32SecurityAttributes : Any\n        Windows-specific LPSECURITYATTRIBUTES required when\n        CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute\n        defines the scope of which exported allocations may be tranferred\n        to other processes. In all other cases, this field is required to\n        be zero.\n    reserved : bytes\n        reserved for future use, must be 0\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUmemPoolProps_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUmemPoolProps_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUmemPoolProps_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUmemPoolProps_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemPoolProps_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemPoolPtrExportData_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUmemPoolPtrExportData_st(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_25CUmemPoolPtrExportData_st_reserved(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_8reserved_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_25CUmemPoolPtrExportData_st_reserved(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_8reserved_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUmemPoolPtrExportData_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_25CUmemPoolPtrExportData_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_25CUmemPoolPtrExportData_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_25CUmemPoolPtrExportData_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUmemPoolPtrExportData_st[] = {
  {(char *)"reserved", __pyx_getprop_4cuda_4cuda_25CUmemPoolPtrExportData_st_reserved, __pyx_setprop_4cuda_4cuda_25CUmemPoolPtrExportData_st_reserved, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemPoolPtrExportData_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemPoolPtrExportData_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "CUmemPoolPtrExportData_st(void_ptr _ptr=0)\n\n    Opaque data for exporting a pool allocation\n\n    Attributes\n    ----------\n    reserved : bytes\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUmemPoolPtrExportData_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUmemPoolPtrExportData_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemPoolPtrExportData_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)o);
  p->_poolProps = ((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps *)Py_None); Py_INCREF(Py_None);
  p->_dptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_poolProps);
  Py_CLEAR(p->_dptr);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)o;
  if (p->_poolProps) {
    e = (*v)(((PyObject *)p->_poolProps), a); if (e) return e;
  }
  if (p->_dptr) {
    e = (*v)(((PyObject *)p->_dptr), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *p = (struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st *)o;
  tmp = ((PyObject*)p->_poolProps);
  p->_poolProps = ((struct __pyx_obj_4cuda_4cuda_CUmemPoolProps *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_dptr);
  p->_dptr = ((struct __pyx_obj_4cuda_4cuda_CUdeviceptr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_poolProps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9poolProps_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_poolProps(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9poolProps_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_accessDescs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11accessDescs_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_accessDescs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11accessDescs_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_accessDescCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_15accessDescCount_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_accessDescCount(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_15accessDescCount_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_bytesize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8bytesize_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_bytesize(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_8bytesize_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_dptr(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4dptr_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_dptr(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_4dptr_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st[] = {
  {(char *)"poolProps", __pyx_getprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_poolProps, __pyx_setprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_poolProps, (char *)0, 0},
  {(char *)"accessDescs", __pyx_getprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_accessDescs, __pyx_setprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_accessDescs, (char *)0, 0},
  {(char *)"accessDescCount", __pyx_getprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_accessDescCount, __pyx_setprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_accessDescCount, (char *)0, 0},
  {(char *)"bytesize", __pyx_getprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_bytesize, __pyx_setprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_bytesize, (char *)0, 0},
  {(char *)"dptr", __pyx_getprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_dptr, __pyx_setprop_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_dptr, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUDA_MEM_ALLOC_NODE_PARAMS_st(void_ptr _ptr=0)\n\n    Memory allocation node parameters\n\n    Attributes\n    ----------\n    poolProps : CUmemPoolProps\n        in: location where the allocation should reside (specified in\n        ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is\n        not supported.\n    accessDescs : CUmemAccessDesc\n        in: array of memory access descriptors. Used to describe peer GPU\n        access\n    accessDescCount : size_t\n        in: number of memory access descriptors. Must not exceed the number\n        of GPUs.\n    bytesize : size_t\n        in: size in bytes of the requested allocation\n    dptr : CUdeviceptr\n        out: address of the allocation returned by CUDA\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_pArray(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pArray_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_pArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pArray_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_pPitch(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pPitch_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_pPitch(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_6pPitch_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_5getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_4getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_9__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_11__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u[] = {
  {(char *)"pArray", __pyx_getprop_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_pArray, __pyx_setprop_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_pArray, (char *)0, 0},
  {(char *)"pPitch", __pyx_getprop_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_pPitch, __pyx_setprop_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_pPitch, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda._CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u(void_ptr _ptr)\n\n\n    Attributes\n    ----------\n    pArray : List[CUarray]\n\n    pPitch : List[void]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUeglFrame_st(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)o);
  p->_frame = ((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4cuda_4cuda_13CUeglFrame_st_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUeglFrame_st(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *p = (struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_frame);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_4cuda_4cuda_CUeglFrame_st(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *p = (struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)o;
  if (p->_frame) {
    e = (*v)(((PyObject *)p->_frame), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda_CUeglFrame_st(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *p = (struct __pyx_obj_4cuda_4cuda_CUeglFrame_st *)o;
  tmp = ((PyObject*)p->_frame);
  p->_frame = ((struct __pyx_obj_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_4cuda_4cuda_13CUeglFrame_st_frame(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5frame_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_frame(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5frame_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_13CUeglFrame_st_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5width_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_width(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5width_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_13CUeglFrame_st_height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_6height_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_height(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_6height_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_13CUeglFrame_st_depth(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5depth_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_depth(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5depth_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_13CUeglFrame_st_pitch(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5pitch_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_pitch(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_5pitch_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_13CUeglFrame_st_planeCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_10planeCount_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_planeCount(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_10planeCount_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_13CUeglFrame_st_numChannels(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_11numChannels_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_numChannels(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_11numChannels_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_13CUeglFrame_st_frameType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_9frameType_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_frameType(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_9frameType_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_13CUeglFrame_st_eglColorFormat(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_14eglColorFormat_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_eglColorFormat(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_14eglColorFormat_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_4cuda_4cuda_13CUeglFrame_st_cuFormat(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_8cuFormat_1__get__(o);
}

static int __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_cuFormat(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_4cuda_4cuda_13CUeglFrame_st_8cuFormat_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUeglFrame_st[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_13CUeglFrame_st_7getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_13CUeglFrame_st_6getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_13CUeglFrame_st_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_13CUeglFrame_st_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_13CUeglFrame_st_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_13CUeglFrame_st_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4cuda_4cuda_CUeglFrame_st[] = {
  {(char *)"frame", __pyx_getprop_4cuda_4cuda_13CUeglFrame_st_frame, __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_frame, (char *)0, 0},
  {(char *)"width", __pyx_getprop_4cuda_4cuda_13CUeglFrame_st_width, __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_width, (char *)0, 0},
  {(char *)"height", __pyx_getprop_4cuda_4cuda_13CUeglFrame_st_height, __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_height, (char *)0, 0},
  {(char *)"depth", __pyx_getprop_4cuda_4cuda_13CUeglFrame_st_depth, __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_depth, (char *)0, 0},
  {(char *)"pitch", __pyx_getprop_4cuda_4cuda_13CUeglFrame_st_pitch, __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_pitch, (char *)0, 0},
  {(char *)"planeCount", __pyx_getprop_4cuda_4cuda_13CUeglFrame_st_planeCount, __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_planeCount, (char *)0, 0},
  {(char *)"numChannels", __pyx_getprop_4cuda_4cuda_13CUeglFrame_st_numChannels, __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_numChannels, (char *)0, 0},
  {(char *)"frameType", __pyx_getprop_4cuda_4cuda_13CUeglFrame_st_frameType, __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_frameType, (char *)0, 0},
  {(char *)"eglColorFormat", __pyx_getprop_4cuda_4cuda_13CUeglFrame_st_eglColorFormat, __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_eglColorFormat, (char *)0, 0},
  {(char *)"cuFormat", __pyx_getprop_4cuda_4cuda_13CUeglFrame_st_cuFormat, __pyx_setprop_4cuda_4cuda_13CUeglFrame_st_cuFormat, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUeglFrame_st = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUeglFrame_st", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUeglFrame_st), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUeglFrame_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_13CUeglFrame_st_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "CUeglFrame_st(void_ptr _ptr=0)\n\n    CUDA EGLFrame structure Descriptor - structure defining one frame\n    of EGL.  Each frame may contain one or more planes depending on\n    whether the surface * is Multiplanar or not.\n\n    Attributes\n    ----------\n    frame : _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u\n\n    width : unsigned int\n        Width of first plane\n    height : unsigned int\n        Height of first plane\n    depth : unsigned int\n        Depth of first plane\n    pitch : unsigned int\n        Pitch of first plane\n    planeCount : unsigned int\n        Number of planes\n    numChannels : unsigned int\n        Number of channels for the plane\n    frameType : CUeglFrameType\n        Array or Pitch\n    eglColorFormat : CUeglColorFormat\n        CUDA EGL Color Format\n    cuFormat : CUarray_format\n        CUDA Array Format\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUeglFrame_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUeglFrame_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUeglFrame_st, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_4cuda_4cuda_CUeglFrame_st, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_4cuda_4cuda_13CUeglFrame_st_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUeglFrame_st, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUuuid(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUuuid_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUuuid = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUuuid", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUuuid), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUuuid_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_9CUuuid_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    Attributes\n    ----------\n    bytes : bytes\n        < CUDA definition of UUID\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_9CUuuid_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUuuid, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUipcEventHandle_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUipcEventHandle_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUipcEventHandle_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUipcEventHandle_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUipcEventHandle_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    CUDA IPC event handle\n\n    Attributes\n    ----------\n    reserved : bytes\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUipcEventHandle_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUipcEventHandle(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUipcEventHandle_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUipcEventHandle = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUipcEventHandle", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUipcEventHandle), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUipcEventHandle_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    CUDA IPC event handle\n\n    Attributes\n    ----------\n    reserved : bytes\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_19CUipcEventHandle_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUipcEventHandle, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUipcMemHandle_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUipcMemHandle_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUipcMemHandle_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUipcMemHandle_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUipcMemHandle_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    CUDA IPC mem handle\n\n    Attributes\n    ----------\n    reserved : bytes\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUipcMemHandle_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUipcMemHandle(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUipcMemHandle_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUipcMemHandle = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUipcMemHandle", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUipcMemHandle), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUipcMemHandle_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    CUDA IPC mem handle\n\n    Attributes\n    ----------\n    reserved : bytes\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUipcMemHandle_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUipcMemHandle, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamBatchMemOpParams_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUstreamBatchMemOpParams_union(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUstreamBatchMemOpParams_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUstreamBatchMemOpParams_union, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Per-operation parameters for cuStreamBatchMemOp\n\n    Attributes\n    ----------\n    operation : CUstreamBatchMemOpType\n\n    waitValue : CUstreamMemOpWaitValueParams_st\n\n    writeValue : CUstreamMemOpWriteValueParams_st\n\n    flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st\n\n    memoryBarrier : CUstreamMemOpMemoryBarrierParams_st\n\n    pad : List[cuuint64_t]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUstreamBatchMemOpParams_union, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUstreamBatchMemOpParams_union, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUstreamBatchMemOpParams_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamBatchMemOpParams(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUstreamBatchMemOpParams_union(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUstreamBatchMemOpParams", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUstreamBatchMemOpParams), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUstreamBatchMemOpParams_union, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Per-operation parameters for cuStreamBatchMemOp\n\n    Attributes\n    ----------\n    operation : CUstreamBatchMemOpType\n\n    waitValue : CUstreamMemOpWaitValueParams_st\n\n    writeValue : CUstreamMemOpWriteValueParams_st\n\n    flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st\n\n    memoryBarrier : CUstreamMemOpMemoryBarrierParams_st\n\n    pad : List[cuuint64_t]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUstreamBatchMemOpParams_union, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUstreamBatchMemOpParams_union, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_30CUstreamBatchMemOpParams_union_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUstreamBatchMemOpParams, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_BATCH_MEM_OP_NODE_PARAMS", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n\n    Attributes\n    ----------\n    ctx : CUcontext\n\n    count : unsigned int\n\n    paramArray : CUstreamBatchMemOpParams\n\n    flags : unsigned int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUdevprop_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUdevprop_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUdevprop_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUdevprop_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUdevprop_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUdevprop_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_12CUdevprop_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Legacy device properties\n\n    Attributes\n    ----------\n    maxThreadsPerBlock : int\n        Maximum number of threads per block\n    maxThreadsDim : List[int]\n        Maximum size of each dimension of a block\n    maxGridSize : List[int]\n        Maximum size of each dimension of a grid\n    sharedMemPerBlock : int\n        Shared memory available per block in bytes\n    totalConstantMemory : int\n        Constant memory available on device in bytes\n    SIMDWidth : int\n        Warp size in threads\n    memPitch : int\n        Maximum pitch in bytes allowed by memory copies\n    regsPerBlock : int\n        32-bit registers available per block\n    clockRate : int\n        Clock frequency in kilohertz\n    textureAlign : int\n        Alignment requirement for textures\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_12CUdevprop_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUdevprop_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUdevprop(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUdevprop_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUdevprop = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUdevprop", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUdevprop), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUdevprop_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_12CUdevprop_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Legacy device properties\n\n    Attributes\n    ----------\n    maxThreadsPerBlock : int\n        Maximum number of threads per block\n    maxThreadsDim : List[int]\n        Maximum size of each dimension of a block\n    maxGridSize : List[int]\n        Maximum size of each dimension of a grid\n    sharedMemPerBlock : int\n        Shared memory available per block in bytes\n    totalConstantMemory : int\n        Constant memory available on device in bytes\n    SIMDWidth : int\n        Warp size in threads\n    memPitch : int\n        Maximum pitch in bytes allowed by memory copies\n    regsPerBlock : int\n        32-bit registers available per block\n    clockRate : int\n        Clock frequency in kilohertz\n    textureAlign : int\n        Alignment requirement for textures\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_12CUdevprop_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUdevprop, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUaccessPolicyWindow_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUaccessPolicyWindow_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUaccessPolicyWindow_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUaccessPolicyWindow_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUaccessPolicyWindow_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Specifies an access policy for a window, a contiguous extent of\n    memory beginning at base_ptr and ending at base_ptr + num_bytes.\n    num_bytes is limited by\n    CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into\n    many segments and assign segments such that: sum of \"hit segments\"\n    / window == approx. ratio. sum of \"miss segments\" / window ==\n    approx 1-ratio. Segments and ratio specifications are fitted to the\n    capabilities of the architecture. Accesses in a hit segment apply\n    the hitProp access policy. Accesses in a miss segment apply the\n    missProp access policy.\n\n    Attributes\n    ----------\n    base_ptr : Any\n        Starting address of the access policy window. CUDA driver may align\n        it.\n    num_bytes : size_t\n        Size in bytes of the window policy. CUDA driver may restrict the\n        maximum size and alignment.\n    hitRatio : float\n        hitRatio specifies percentage of lines assigned hitProp, rest are\n        assigned missProp.\n    hitProp : CUaccessProperty\n        CUaccessProperty set for hit.\n    missProp : CUaccessProperty\n        CUaccessProperty set for miss. Must be either NORMAL or STREAMING\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUaccessPolicyWindow_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUaccessPolicyWindow_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUaccessPolicyWindow_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUaccessPolicyWindow(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUaccessPolicyWindow_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUaccessPolicyWindow = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUaccessPolicyWindow", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUaccessPolicyWindow), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUaccessPolicyWindow_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Specifies an access policy for a window, a contiguous extent of\n    memory beginning at base_ptr and ending at base_ptr + num_bytes.\n    num_bytes is limited by\n    CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into\n    many segments and assign segments such that: sum of \"hit segments\"\n    / window == approx. ratio. sum of \"miss segments\" / window ==\n    approx 1-ratio. Segments and ratio specifications are fitted to the\n    capabilities of the architecture. Accesses in a hit segment apply\n    the hitProp access policy. Accesses in a miss segment apply the\n    missProp access policy.\n\n    Attributes\n    ----------\n    base_ptr : Any\n        Starting address of the access policy window. CUDA driver may align\n        it.\n    num_bytes : size_t\n        Size in bytes of the window policy. CUDA driver may restrict the\n        maximum size and alignment.\n    hitRatio : float\n        hitRatio specifies percentage of lines assigned hitProp, rest are\n        assigned missProp.\n    hitProp : CUaccessProperty\n        CUaccessProperty set for hit.\n    missProp : CUaccessProperty\n        CUaccessProperty set for miss. Must be either NORMAL or STREAMING\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUaccessPolicyWindow_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUaccessPolicyWindow_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_23CUaccessPolicyWindow_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUaccessPolicyWindow, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_KERNEL_NODE_PARAMS_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    GPU kernel node parameters\n\n    Attributes\n    ----------\n    func : CUfunction\n        Kernel to launch\n    gridDimX : unsigned int\n        Width of grid in blocks\n    gridDimY : unsigned int\n        Height of grid in blocks\n    gridDimZ : unsigned int\n        Depth of grid in blocks\n    blockDimX : unsigned int\n        X dimension of each thread block\n    blockDimY : unsigned int\n        Y dimension of each thread block\n    blockDimZ : unsigned int\n        Z dimension of each thread block\n    sharedMemBytes : unsigned int\n        Dynamic shared-memory size per thread block in bytes\n    kernelParams : Any\n        Array of pointers to kernel parameters\n    extra : Any\n        Extra options\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_KERNEL_NODE_PARAMS", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    GPU kernel node parameters\n\n    Attributes\n    ----------\n    func : CUfunction\n        Kernel to launch\n    gridDimX : unsigned int\n        Width of grid in blocks\n    gridDimY : unsigned int\n        Height of grid in blocks\n    gridDimZ : unsigned int\n        Depth of grid in blocks\n    blockDimX : unsigned int\n        X dimension of each thread block\n    blockDimY : unsigned int\n        Y dimension of each thread block\n    blockDimZ : unsigned int\n        Z dimension of each thread block\n    sharedMemBytes : unsigned int\n        Dynamic shared-memory size per thread block in bytes\n    kernelParams : Any\n        Array of pointers to kernel parameters\n    extra : Any\n        Extra options\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEMSET_NODE_PARAMS_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Memset node parameters\n\n    Attributes\n    ----------\n    dst : CUdeviceptr\n        Destination device pointer\n    pitch : size_t\n        Pitch of destination device pointer. Unused if height is 1\n    value : unsigned int\n        Value to be set\n    elementSize : unsigned int\n        Size of each element in bytes. Must be 1, 2, or 4.\n    width : size_t\n        Width of the row in elements\n    height : size_t\n        Number of rows\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEMSET_NODE_PARAMS", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Memset node parameters\n\n    Attributes\n    ----------\n    dst : CUdeviceptr\n        Destination device pointer\n    pitch : size_t\n        Pitch of destination device pointer. Unused if height is 1\n    value : unsigned int\n        Value to be set\n    elementSize : unsigned int\n        Size of each element in bytes. Must be 1, 2, or 4.\n    width : size_t\n        Width of the row in elements\n    height : size_t\n        Number of rows\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_HOST_NODE_PARAMS_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Host node parameters\n\n    Attributes\n    ----------\n    fn : CUhostFn\n        The function to call when the node executes\n    userData : Any\n        Argument to pass to the function\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_HOST_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_HOST_NODE_PARAMS", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_HOST_NODE_PARAMS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Host node parameters\n\n    Attributes\n    ----------\n    fn : CUhostFn\n        The function to call when the node executes\n    userData : Any\n        Argument to pass to the function\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_HOST_NODE_PARAMS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUlaunchAttributeValue(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUlaunchAttributeValue_union(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUlaunchAttributeValue = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUlaunchAttributeValue", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUlaunchAttributeValue), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n\n    Attributes\n    ----------\n    pad : bytes\n        Pad to 64 bytes\n    accessPolicyWindow : CUaccessPolicyWindow\n\n    cooperative : int\n\n    syncPolicy : CUsynchronizationPolicy\n\n    clusterDim : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s\n\n    clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy\n\n    programmaticStreamSerializationAllowed : int\n\n    programmaticEvent : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s\n\n    priority : int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUlaunchAttributeValue, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUlaunchAttribute(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUlaunchAttribute_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUlaunchAttribute = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUlaunchAttribute", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUlaunchAttribute), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUlaunchAttribute_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n\n    Attributes\n    ----------\n    id : CUlaunchAttributeID\n\n    value : CUlaunchAttributeValue\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUlaunchAttribute_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUlaunchAttribute_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_20CUlaunchAttribute_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUlaunchAttribute, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUlaunchConfig(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUlaunchConfig_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUlaunchConfig = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUlaunchConfig", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUlaunchConfig), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUlaunchConfig_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n\n    Attributes\n    ----------\n    gridDimX : unsigned int\n        Width of grid in blocks\n    gridDimY : unsigned int\n        Height of grid in blocks\n    gridDimZ : unsigned int\n        Depth of grid in blocks\n    blockDimX : unsigned int\n        X dimension of each thread block\n    blockDimY : unsigned int\n        Y dimension of each thread block\n    blockDimZ : unsigned int\n        Z dimension of each thread block\n    sharedMemBytes : unsigned int\n        Dynamic shared-memory size per thread block in bytes\n    hStream : CUstream\n        Stream identifier\n    attrs : CUlaunchAttribute\n        nullable if numAttrs == 0\n    numAttrs : unsigned int\n        number of attributes populated in attrs\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUlaunchConfig_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUlaunchConfig_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUlaunchConfig_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUlaunchConfig, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUkernelNodeAttrValue_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUlaunchAttributeValue_union(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUkernelNodeAttrValue_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUkernelNodeAttrValue_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUkernelNodeAttrValue_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n\n    Attributes\n    ----------\n    pad : bytes\n        Pad to 64 bytes\n    accessPolicyWindow : CUaccessPolicyWindow\n\n    cooperative : int\n\n    syncPolicy : CUsynchronizationPolicy\n\n    clusterDim : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s\n\n    clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy\n\n    programmaticStreamSerializationAllowed : int\n\n    programmaticEvent : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s\n\n    priority : int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUkernelNodeAttrValue_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUkernelNodeAttrValue(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUlaunchAttributeValue_union(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUkernelNodeAttrValue = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUkernelNodeAttrValue", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUkernelNodeAttrValue), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n\n    Attributes\n    ----------\n    pad : bytes\n        Pad to 64 bytes\n    accessPolicyWindow : CUaccessPolicyWindow\n\n    cooperative : int\n\n    syncPolicy : CUsynchronizationPolicy\n\n    clusterDim : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s\n\n    clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy\n\n    programmaticStreamSerializationAllowed : int\n\n    programmaticEvent : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s\n\n    priority : int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUkernelNodeAttrValue, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamAttrValue_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUlaunchAttributeValue_union(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUstreamAttrValue_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUstreamAttrValue_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUstreamAttrValue_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n\n    Attributes\n    ----------\n    pad : bytes\n        Pad to 64 bytes\n    accessPolicyWindow : CUaccessPolicyWindow\n\n    cooperative : int\n\n    syncPolicy : CUsynchronizationPolicy\n\n    clusterDim : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s\n\n    clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy\n\n    programmaticStreamSerializationAllowed : int\n\n    programmaticEvent : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s\n\n    priority : int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUstreamAttrValue_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUstreamAttrValue(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUlaunchAttributeValue_union(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUstreamAttrValue = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUstreamAttrValue", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUstreamAttrValue), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n\n    Attributes\n    ----------\n    pad : bytes\n        Pad to 64 bytes\n    accessPolicyWindow : CUaccessPolicyWindow\n\n    cooperative : int\n\n    syncPolicy : CUsynchronizationPolicy\n\n    clusterDim : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s\n\n    clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy\n\n    programmaticStreamSerializationAllowed : int\n\n    programmaticEvent : _CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s\n\n    priority : int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUlaunchAttributeValue_union, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_28CUlaunchAttributeValue_union_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUstreamAttrValue, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUexecAffinitySmCount_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUexecAffinitySmCount_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUexecAffinitySmCount_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUexecAffinitySmCount_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUexecAffinitySmCount_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT\n\n    Attributes\n    ----------\n    val : unsigned int\n        The number of SMs the context is limited to use.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUexecAffinitySmCount_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUexecAffinitySmCount(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUexecAffinitySmCount_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUexecAffinitySmCount = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUexecAffinitySmCount", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUexecAffinitySmCount), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUexecAffinitySmCount_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT\n\n    Attributes\n    ----------\n    val : unsigned int\n        The number of SMs the context is limited to use.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_24CUexecAffinitySmCount_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUexecAffinitySmCount, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUexecAffinityParam_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUexecAffinityParam_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUexecAffinityParam_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUexecAffinityParam_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUexecAffinityParam_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Execution Affinity Parameters\n\n    Attributes\n    ----------\n    type : CUexecAffinityType\n\n    param : _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUexecAffinityParam_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUexecAffinityParam_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUexecAffinityParam_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUexecAffinityParam(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUexecAffinityParam_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUexecAffinityParam = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUexecAffinityParam", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUexecAffinityParam), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUexecAffinityParam_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Execution Affinity Parameters\n\n    Attributes\n    ----------\n    type : CUexecAffinityType\n\n    param : _CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUexecAffinityParam_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUexecAffinityParam_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_22CUexecAffinityParam_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUexecAffinityParam, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY2D_v2(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY2D_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_v2 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEMCPY2D_v2", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D_v2), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMCPY2D_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    2D memory copy parameters\n\n    Attributes\n    ----------\n    srcXInBytes : size_t\n        Source X in bytes\n    srcY : size_t\n        Source Y\n    srcMemoryType : CUmemorytype\n        Source memory type (host, device, array)\n    srcHost : Any\n        Source host pointer\n    srcDevice : CUdeviceptr\n        Source device pointer\n    srcArray : CUarray\n        Source array reference\n    srcPitch : size_t\n        Source pitch (ignored when src is array)\n    dstXInBytes : size_t\n        Destination X in bytes\n    dstY : size_t\n        Destination Y\n    dstMemoryType : CUmemorytype\n        Destination memory type (host, device, array)\n    dstHost : Any\n        Destination host pointer\n    dstDevice : CUdeviceptr\n        Destination device pointer\n    dstArray : CUarray\n        Destination array reference\n    dstPitch : size_t\n        Destination pitch (ignored when dst is array)\n    WidthInBytes : size_t\n        Width of 2D memory copy in bytes\n    Height : size_t\n        Height of 2D memory copy\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMCPY2D_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEMCPY2D_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY2D_v2, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY2D(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY2D_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEMCPY2D", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY2D), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMCPY2D_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    2D memory copy parameters\n\n    Attributes\n    ----------\n    srcXInBytes : size_t\n        Source X in bytes\n    srcY : size_t\n        Source Y\n    srcMemoryType : CUmemorytype\n        Source memory type (host, device, array)\n    srcHost : Any\n        Source host pointer\n    srcDevice : CUdeviceptr\n        Source device pointer\n    srcArray : CUarray\n        Source array reference\n    srcPitch : size_t\n        Source pitch (ignored when src is array)\n    dstXInBytes : size_t\n        Destination X in bytes\n    dstY : size_t\n        Destination Y\n    dstMemoryType : CUmemorytype\n        Destination memory type (host, device, array)\n    dstHost : Any\n        Destination host pointer\n    dstDevice : CUdeviceptr\n        Destination device pointer\n    dstArray : CUarray\n        Destination array reference\n    dstPitch : size_t\n        Destination pitch (ignored when dst is array)\n    WidthInBytes : size_t\n        Width of 2D memory copy in bytes\n    Height : size_t\n        Height of 2D memory copy\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMCPY2D_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEMCPY2D_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY2D_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY2D, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_v2(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_v2 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEMCPY3D_v2", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_v2), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMCPY3D_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    3D memory copy parameters\n\n    Attributes\n    ----------\n    srcXInBytes : size_t\n        Source X in bytes\n    srcY : size_t\n        Source Y\n    srcZ : size_t\n        Source Z\n    srcLOD : size_t\n        Source LOD\n    srcMemoryType : CUmemorytype\n        Source memory type (host, device, array)\n    srcHost : Any\n        Source host pointer\n    srcDevice : CUdeviceptr\n        Source device pointer\n    srcArray : CUarray\n        Source array reference\n    reserved0 : Any\n        Must be NULL\n    srcPitch : size_t\n        Source pitch (ignored when src is array)\n    srcHeight : size_t\n        Source height (ignored when src is array; may be 0 if Depth==1)\n    dstXInBytes : size_t\n        Destination X in bytes\n    dstY : size_t\n        Destination Y\n    dstZ : size_t\n        Destination Z\n    dstLOD : size_t\n        Destination LOD\n    dstMemoryType : CUmemorytype\n        Destination memory type (host, device, array)\n    dstHost : Any\n        Destination host pointer\n    dstDevice : CUdeviceptr\n        Destination device pointer\n    dstArray : CUarray\n        Destination array reference\n    reserved1 : Any\n        Must be NULL\n    dstPitch : size_t\n        Destination pitch (ignored when dst is array)\n    dstHeight : size_t\n        Destination height (ignored when dst is array; may be 0 if\n        Depth==1)\n    WidthInBytes : size_t\n        Width of 3D memory copy in bytes\n    Height : size_t\n        Height of 3D memory copy\n    Depth : size_t\n        Depth of 3D memory copy\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMCPY3D_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEMCPY3D_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_v2, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEMCPY3D", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMCPY3D_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    3D memory copy parameters\n\n    Attributes\n    ----------\n    srcXInBytes : size_t\n        Source X in bytes\n    srcY : size_t\n        Source Y\n    srcZ : size_t\n        Source Z\n    srcLOD : size_t\n        Source LOD\n    srcMemoryType : CUmemorytype\n        Source memory type (host, device, array)\n    srcHost : Any\n        Source host pointer\n    srcDevice : CUdeviceptr\n        Source device pointer\n    srcArray : CUarray\n        Source array reference\n    reserved0 : Any\n        Must be NULL\n    srcPitch : size_t\n        Source pitch (ignored when src is array)\n    srcHeight : size_t\n        Source height (ignored when src is array; may be 0 if Depth==1)\n    dstXInBytes : size_t\n        Destination X in bytes\n    dstY : size_t\n        Destination Y\n    dstZ : size_t\n        Destination Z\n    dstLOD : size_t\n        Destination LOD\n    dstMemoryType : CUmemorytype\n        Destination memory type (host, device, array)\n    dstHost : Any\n        Destination host pointer\n    dstDevice : CUdeviceptr\n        Destination device pointer\n    dstArray : CUarray\n        Destination array reference\n    reserved1 : Any\n        Must be NULL\n    dstPitch : size_t\n        Destination pitch (ignored when dst is array)\n    dstHeight : size_t\n        Destination height (ignored when dst is array; may be 0 if\n        Depth==1)\n    WidthInBytes : size_t\n        Width of 3D memory copy in bytes\n    Height : size_t\n        Height of 3D memory copy\n    Depth : size_t\n        Depth of 3D memory copy\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMCPY3D_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEMCPY3D_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_16CUDA_MEMCPY3D_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEMCPY3D_PEER_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    3D memory cross-context copy parameters\n\n    Attributes\n    ----------\n    srcXInBytes : size_t\n        Source X in bytes\n    srcY : size_t\n        Source Y\n    srcZ : size_t\n        Source Z\n    srcLOD : size_t\n        Source LOD\n    srcMemoryType : CUmemorytype\n        Source memory type (host, device, array)\n    srcHost : Any\n        Source host pointer\n    srcDevice : CUdeviceptr\n        Source device pointer\n    srcArray : CUarray\n        Source array reference\n    srcContext : CUcontext\n        Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY)\n    srcPitch : size_t\n        Source pitch (ignored when src is array)\n    srcHeight : size_t\n        Source height (ignored when src is array; may be 0 if Depth==1)\n    dstXInBytes : size_t\n        Destination X in bytes\n    dstY : size_t\n        Destination Y\n    dstZ : size_t\n        Destination Z\n    dstLOD : size_t\n        Destination LOD\n    dstMemoryType : CUmemorytype\n        Destination memory type (host, device, array)\n    dstHost : Any\n        Destination host pointer\n    dstDevice : CUdeviceptr\n        Destination device pointer\n    dstArray : CUarray\n        Destination array reference\n    dstContext : CUcontext\n        Destination context (ignored with dstMemoryType is\n        CU_MEMORYTYPE_ARRAY)\n    dstPitch : size_t\n        Destination pitch (ignored when dst is array)\n    dstHeight : size_t\n        Destination height (ignored when dst is array; may be 0 if\n        Depth==1)\n    WidthInBytes : size_t\n        Width of 3D memory copy in bytes\n    Height : size_t\n        Height of 3D memory copy\n    Depth : size_t\n        Depth of 3D memory copy\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_PEER(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEMCPY3D_PEER", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEMCPY3D_PEER), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    3D memory cross-context copy parameters\n\n    Attributes\n    ----------\n    srcXInBytes : size_t\n        Source X in bytes\n    srcY : size_t\n        Source Y\n    srcZ : size_t\n        Source Z\n    srcLOD : size_t\n        Source LOD\n    srcMemoryType : CUmemorytype\n        Source memory type (host, device, array)\n    srcHost : Any\n        Source host pointer\n    srcDevice : CUdeviceptr\n        Source device pointer\n    srcArray : CUarray\n        Source array reference\n    srcContext : CUcontext\n        Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY)\n    srcPitch : size_t\n        Source pitch (ignored when src is array)\n    srcHeight : size_t\n        Source height (ignored when src is array; may be 0 if Depth==1)\n    dstXInBytes : size_t\n        Destination X in bytes\n    dstY : size_t\n        Destination Y\n    dstZ : size_t\n        Destination Z\n    dstLOD : size_t\n        Destination LOD\n    dstMemoryType : CUmemorytype\n        Destination memory type (host, device, array)\n    dstHost : Any\n        Destination host pointer\n    dstDevice : CUdeviceptr\n        Destination device pointer\n    dstArray : CUarray\n        Destination array reference\n    dstContext : CUcontext\n        Destination context (ignored with dstMemoryType is\n        CU_MEMORYTYPE_ARRAY)\n    dstPitch : size_t\n        Destination pitch (ignored when dst is array)\n    dstHeight : size_t\n        Destination height (ignored when dst is array; may be 0 if\n        Depth==1)\n    WidthInBytes : size_t\n        Width of 3D memory copy in bytes\n    Height : size_t\n        Height of 3D memory copy\n    Depth : size_t\n        Depth of 3D memory copy\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEMCPY3D_PEER, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_ARRAY_DESCRIPTOR_v2", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Array descriptor\n\n    Attributes\n    ----------\n    Width : size_t\n        Width of array\n    Height : size_t\n        Height of array\n    Format : CUarray_format\n        Array format\n    NumChannels : unsigned int\n        Channels per array element\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_ARRAY_DESCRIPTOR", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Array descriptor\n\n    Attributes\n    ----------\n    Width : size_t\n        Width of array\n    Height : size_t\n        Height of array\n    Format : CUarray_format\n        Array format\n    NumChannels : unsigned int\n        Channels per array element\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR_v2", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    3D array descriptor\n\n    Attributes\n    ----------\n    Width : size_t\n        Width of 3D array\n    Height : size_t\n        Height of 3D array\n    Depth : size_t\n        Depth of 3D array\n    Format : CUarray_format\n        Array format\n    NumChannels : unsigned int\n        Channels per array element\n    Flags : unsigned int\n        Flags\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_ARRAY3D_DESCRIPTOR", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    3D array descriptor\n\n    Attributes\n    ----------\n    Width : size_t\n        Width of 3D array\n    Height : size_t\n        Height of 3D array\n    Depth : size_t\n        Depth of 3D array\n    Format : CUarray_format\n        Array format\n    NumChannels : unsigned int\n        Channels per array element\n    Flags : unsigned int\n        Flags\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    CUDA array sparse properties\n\n    Attributes\n    ----------\n    tileExtent : _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s\n\n    miptailFirstLevel : unsigned int\n        First mip level at which the mip tail begins.\n    miptailSize : unsigned long long\n        Total size of the mip tail.\n    flags : unsigned int\n        Flags will either be zero or\n        CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_ARRAY_SPARSE_PROPERTIES", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    CUDA array sparse properties\n\n    Attributes\n    ----------\n    tileExtent : _CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s\n\n    miptailFirstLevel : unsigned int\n        First mip level at which the mip tail begins.\n    miptailSize : unsigned long long\n        Total size of the mip tail.\n    flags : unsigned int\n        Flags will either be zero or\n        CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    CUDA array memory requirements\n\n    Attributes\n    ----------\n    size : size_t\n        Total required memory size\n    alignment : size_t\n        alignment requirement\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_ARRAY_MEMORY_REQUIREMENTS", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    CUDA array memory requirements\n\n    Attributes\n    ----------\n    size : size_t\n        Total required memory size\n    alignment : size_t\n        alignment requirement\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_RESOURCE_DESC_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_RESOURCE_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    CUDA Resource descriptor\n\n    Attributes\n    ----------\n    resType : CUresourcetype\n        Resource type\n    res : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u\n\n    flags : unsigned int\n        Flags (must be zero)\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_RESOURCE_DESC_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_RESOURCE_DESC_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_DESC_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_DESC(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_RESOURCE_DESC", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_DESC), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_RESOURCE_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    CUDA Resource descriptor\n\n    Attributes\n    ----------\n    resType : CUresourcetype\n        Resource type\n    res : _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u\n\n    flags : unsigned int\n        Flags (must be zero)\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_RESOURCE_DESC_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_RESOURCE_DESC_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_DESC, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_TEXTURE_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_TEXTURE_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_TEXTURE_DESC_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_TEXTURE_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Texture descriptor\n\n    Attributes\n    ----------\n    addressMode : List[CUaddress_mode]\n        Address modes\n    filterMode : CUfilter_mode\n        Filter mode\n    flags : unsigned int\n        Flags\n    maxAnisotropy : unsigned int\n        Maximum anisotropy ratio\n    mipmapFilterMode : CUfilter_mode\n        Mipmap filter mode\n    mipmapLevelBias : float\n        Mipmap level bias\n    minMipmapLevelClamp : float\n        Mipmap minimum level clamp\n    maxMipmapLevelClamp : float\n        Mipmap maximum level clamp\n    borderColor : List[float]\n        Border Color\n    reserved : List[int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_TEXTURE_DESC_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_TEXTURE_DESC(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_TEXTURE_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_TEXTURE_DESC", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_TEXTURE_DESC), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_TEXTURE_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Texture descriptor\n\n    Attributes\n    ----------\n    addressMode : List[CUaddress_mode]\n        Address modes\n    filterMode : CUfilter_mode\n        Filter mode\n    flags : unsigned int\n        Flags\n    maxAnisotropy : unsigned int\n        Maximum anisotropy ratio\n    mipmapFilterMode : CUfilter_mode\n        Mipmap filter mode\n    mipmapLevelBias : float\n        Mipmap level bias\n    minMipmapLevelClamp : float\n        Mipmap minimum level clamp\n    maxMipmapLevelClamp : float\n        Mipmap maximum level clamp\n    borderColor : List[float]\n        Border Color\n    reserved : List[int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_TEXTURE_DESC, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_RESOURCE_VIEW_DESC_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Resource view descriptor\n\n    Attributes\n    ----------\n    format : CUresourceViewFormat\n        Resource view format\n    width : size_t\n        Width of the resource view\n    height : size_t\n        Height of the resource view\n    depth : size_t\n        Depth of the resource view\n    firstMipmapLevel : unsigned int\n        First defined mipmap level\n    lastMipmapLevel : unsigned int\n        Last defined mipmap level\n    firstLayer : unsigned int\n        First layer index\n    lastLayer : unsigned int\n        Last layer index\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_RESOURCE_VIEW_DESC", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Resource view descriptor\n\n    Attributes\n    ----------\n    format : CUresourceViewFormat\n        Resource view format\n    width : size_t\n        Width of the resource view\n    height : size_t\n        Height of the resource view\n    depth : size_t\n        Depth of the resource view\n    firstMipmapLevel : unsigned int\n        First defined mipmap level\n    lastMipmapLevel : unsigned int\n        Last defined mipmap level\n    firstLayer : unsigned int\n        First layer index\n    lastLayer : unsigned int\n        Last layer index\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    GPU Direct v3 tokens\n\n    Attributes\n    ----------\n    p2pToken : unsigned long long\n\n    vaSpaceToken : unsigned int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    GPU Direct v3 tokens\n\n    Attributes\n    ----------\n    p2pToken : unsigned long long\n\n    vaSpaceToken : unsigned int\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_LAUNCH_PARAMS_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Kernel launch parameters\n\n    Attributes\n    ----------\n    function : CUfunction\n        Kernel to launch\n    gridDimX : unsigned int\n        Width of grid in blocks\n    gridDimY : unsigned int\n        Height of grid in blocks\n    gridDimZ : unsigned int\n        Depth of grid in blocks\n    blockDimX : unsigned int\n        X dimension of each thread block\n    blockDimY : unsigned int\n        Y dimension of each thread block\n    blockDimZ : unsigned int\n        Z dimension of each thread block\n    sharedMemBytes : unsigned int\n        Dynamic shared-memory size per thread block in bytes\n    hStream : CUstream\n        Stream identifier\n    kernelParams : Any\n        Array of pointers to kernel parameters\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_LAUNCH_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_LAUNCH_PARAMS", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_LAUNCH_PARAMS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Kernel launch parameters\n\n    Attributes\n    ----------\n    function : CUfunction\n        Kernel to launch\n    gridDimX : unsigned int\n        Width of grid in blocks\n    gridDimY : unsigned int\n        Height of grid in blocks\n    gridDimZ : unsigned int\n        Depth of grid in blocks\n    blockDimX : unsigned int\n        X dimension of each thread block\n    blockDimY : unsigned int\n        Y dimension of each thread block\n    blockDimZ : unsigned int\n        Z dimension of each thread block\n    sharedMemBytes : unsigned int\n        Dynamic shared-memory size per thread block in bytes\n    hStream : CUstream\n        Stream identifier\n    kernelParams : Any\n        Array of pointers to kernel parameters\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_LAUNCH_PARAMS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    External memory handle descriptor\n\n    Attributes\n    ----------\n    type : CUexternalMemoryHandleType\n        Type of the handle\n    handle : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u\n\n    size : unsigned long long\n        Size of the memory allocation\n    flags : unsigned int\n        Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_MEMORY_HANDLE_DESC", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    External memory handle descriptor\n\n    Attributes\n    ----------\n    type : CUexternalMemoryHandleType\n        Type of the handle\n    handle : _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u\n\n    size : unsigned long long\n        Size of the memory allocation\n    flags : unsigned int\n        Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    External memory buffer descriptor\n\n    Attributes\n    ----------\n    offset : unsigned long long\n        Offset into the memory object where the buffer's base is\n    size : unsigned long long\n        Size of the buffer\n    flags : unsigned int\n        Flags reserved for future use. Must be zero.\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_MEMORY_BUFFER_DESC", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    External memory buffer descriptor\n\n    Attributes\n    ----------\n    offset : unsigned long long\n        Offset into the memory object where the buffer's base is\n    size : unsigned long long\n        Size of the buffer\n    flags : unsigned int\n        Flags reserved for future use. Must be zero.\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    External memory mipmap descriptor\n\n    Attributes\n    ----------\n    offset : unsigned long long\n        Offset into the memory object where the base level of the mipmap\n        chain is.\n    arrayDesc : CUDA_ARRAY3D_DESCRIPTOR\n        Format, dimension and type of base level of the mipmap chain\n    numLevels : unsigned int\n        Total number of levels in the mipmap chain\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    External memory mipmap descriptor\n\n    Attributes\n    ----------\n    offset : unsigned long long\n        Offset into the memory object where the base level of the mipmap\n        chain is.\n    arrayDesc : CUDA_ARRAY3D_DESCRIPTOR\n        Format, dimension and type of base level of the mipmap chain\n    numLevels : unsigned int\n        Total number of levels in the mipmap chain\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    External semaphore handle descriptor\n\n    Attributes\n    ----------\n    type : CUexternalSemaphoreHandleType\n        Type of the handle\n    handle : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u\n\n    flags : unsigned int\n        Flags reserved for the future. Must be zero.\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    External semaphore handle descriptor\n\n    Attributes\n    ----------\n    type : CUexternalSemaphoreHandleType\n        Type of the handle\n    handle : _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u\n\n    flags : unsigned int\n        Flags reserved for the future. Must be zero.\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    External semaphore signal parameters\n\n    Attributes\n    ----------\n    params : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s\n\n    flags : unsigned int\n        Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal\n        a CUexternalSemaphore of type\n        CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is\n        CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which\n        indicates that while signaling the CUexternalSemaphore, no memory\n        synchronization operations should be performed for any external\n        memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF.\n        For all other types of CUexternalSemaphore, flags must be zero.\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    External semaphore signal parameters\n\n    Attributes\n    ----------\n    params : _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s\n\n    flags : unsigned int\n        Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal\n        a CUexternalSemaphore of type\n        CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is\n        CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which\n        indicates that while signaling the CUexternalSemaphore, no memory\n        synchronization operations should be performed for any external\n        memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF.\n        For all other types of CUexternalSemaphore, flags must be zero.\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    External semaphore wait parameters\n\n    Attributes\n    ----------\n    params : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s\n\n    flags : unsigned int\n        Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on\n        a CUexternalSemaphore of type\n        CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is\n        CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates\n        that while waiting for the CUexternalSemaphore, no memory\n        synchronization operations should be performed for any external\n        memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF.\n        For all other types of CUexternalSemaphore, flags must be zero.\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    External semaphore wait parameters\n\n    Attributes\n    ----------\n    params : _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s\n\n    flags : unsigned int\n        Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on\n        a CUexternalSemaphore of type\n        CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is\n        CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates\n        that while waiting for the CUexternalSemaphore, no memory\n        synchronization operations should be performed for any external\n        memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF.\n        For all other types of CUexternalSemaphore, flags must be zero.\n    reserved : List[unsigned int]\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Semaphore signal node parameters\n\n    Attributes\n    ----------\n    extSemArray : CUexternalSemaphore\n        Array of external semaphore handles.\n    paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS\n        Array of external semaphore signal parameters.\n    numExtSems : unsigned int\n        Number of handles and parameters supplied in extSemArray and\n        paramsArray.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Semaphore signal node parameters\n\n    Attributes\n    ----------\n    extSemArray : CUexternalSemaphore\n        Array of external semaphore handles.\n    paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS\n        Array of external semaphore signal parameters.\n    numExtSems : unsigned int\n        Number of handles and parameters supplied in extSemArray and\n        paramsArray.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Semaphore wait node parameters\n\n    Attributes\n    ----------\n    extSemArray : CUexternalSemaphore\n        Array of external semaphore handles.\n    paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS\n        Array of external semaphore wait parameters.\n    numExtSems : unsigned int\n        Number of handles and parameters supplied in extSemArray and\n        paramsArray.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_EXT_SEM_WAIT_NODE_PARAMS", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Semaphore wait node parameters\n\n    Attributes\n    ----------\n    extSemArray : CUexternalSemaphore\n        Array of external semaphore handles.\n    paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS\n        Array of external semaphore wait parameters.\n    numExtSems : unsigned int\n        Number of handles and parameters supplied in extSemArray and\n        paramsArray.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUarrayMapInfo_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUarrayMapInfo_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUarrayMapInfo_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUarrayMapInfo_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUarrayMapInfo_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Specifies the CUDA array or CUDA mipmapped array memory mapping\n    information\n\n    Attributes\n    ----------\n    resourceType : CUresourcetype\n        Resource type\n    resource : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u\n\n    subresourceType : CUarraySparseSubresourceType\n        Sparse subresource type\n    subresource : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u\n\n    memOperationType : CUmemOperationType\n        Memory operation type\n    memHandleType : CUmemHandleType\n        Memory handle type\n    memHandle : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u\n\n    offset : unsigned long long\n        Offset within mip tail  Offset within the memory\n    deviceBitMask : unsigned int\n        Device ordinal bit mask\n    flags : unsigned int\n        flags for future use, must be zero now.\n    reserved : List[unsigned int]\n        Reserved for future use, must be zero now.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUarrayMapInfo_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUarrayMapInfo_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUarrayMapInfo_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUarrayMapInfo(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUarrayMapInfo_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUarrayMapInfo = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUarrayMapInfo", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUarrayMapInfo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUarrayMapInfo_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Specifies the CUDA array or CUDA mipmapped array memory mapping\n    information\n\n    Attributes\n    ----------\n    resourceType : CUresourcetype\n        Resource type\n    resource : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u\n\n    subresourceType : CUarraySparseSubresourceType\n        Sparse subresource type\n    subresource : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u\n\n    memOperationType : CUmemOperationType\n        Memory operation type\n    memHandleType : CUmemHandleType\n        Memory handle type\n    memHandle : _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u\n\n    offset : unsigned long long\n        Offset within mip tail  Offset within the memory\n    deviceBitMask : unsigned int\n        Device ordinal bit mask\n    flags : unsigned int\n        flags for future use, must be zero now.\n    reserved : List[unsigned int]\n        Reserved for future use, must be zero now.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUarrayMapInfo_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUarrayMapInfo_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUarrayMapInfo_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUarrayMapInfo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemLocation_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUmemLocation_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemLocation_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemLocation_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemLocation_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemLocation_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_16CUmemLocation_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Specifies a memory location.\n\n    Attributes\n    ----------\n    type : CUmemLocationType\n        Specifies the location type, which modifies the meaning of id.\n    id : int\n        identifier for a given this location's CUmemLocationType.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_16CUmemLocation_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemLocation_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemLocation(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUmemLocation_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemLocation = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemLocation", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemLocation), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemLocation_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_16CUmemLocation_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Specifies a memory location.\n\n    Attributes\n    ----------\n    type : CUmemLocationType\n        Specifies the location type, which modifies the meaning of id.\n    id : int\n        identifier for a given this location's CUmemLocationType.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_16CUmemLocation_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemLocation, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemAllocationProp_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUmemAllocationProp_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemAllocationProp_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemAllocationProp_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemAllocationProp_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Specifies the allocation properties for a allocation.\n\n    Attributes\n    ----------\n    type : CUmemAllocationType\n        Allocation type\n    requestedHandleTypes : CUmemAllocationHandleType\n        requested CUmemAllocationHandleType\n    location : CUmemLocation\n        Location of allocation\n    win32HandleMetaData : Any\n        Windows-specific POBJECT_ATTRIBUTES required when\n        CU_MEM_HANDLE_TYPE_WIN32 is specified. This object atributes\n        structure includes security attributes that define the scope of\n        which exported allocations may be tranferred to other processes. In\n        all other cases, this field is required to be zero.\n    allocFlags : _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUmemAllocationProp_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUmemAllocationProp_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemAllocationProp_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemAllocationProp(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUmemAllocationProp_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemAllocationProp = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemAllocationProp", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemAllocationProp), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemAllocationProp_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Specifies the allocation properties for a allocation.\n\n    Attributes\n    ----------\n    type : CUmemAllocationType\n        Allocation type\n    requestedHandleTypes : CUmemAllocationHandleType\n        requested CUmemAllocationHandleType\n    location : CUmemLocation\n        Location of allocation\n    win32HandleMetaData : Any\n        Windows-specific POBJECT_ATTRIBUTES required when\n        CU_MEM_HANDLE_TYPE_WIN32 is specified. This object atributes\n        structure includes security attributes that define the scope of\n        which exported allocations may be tranferred to other processes. In\n        all other cases, this field is required to be zero.\n    allocFlags : _CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUmemAllocationProp_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUmemAllocationProp_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_22CUmemAllocationProp_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemAllocationProp, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemAccessDesc_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUmemAccessDesc_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemAccessDesc_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemAccessDesc_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemAccessDesc_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Memory access descriptor\n\n    Attributes\n    ----------\n    location : CUmemLocation\n        Location on which the request is to change it's accessibility\n    flags : CUmemAccess_flags\n        ::CUmemProt accessibility flags to set on the request\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUmemAccessDesc_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUmemAccessDesc_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemAccessDesc_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemAccessDesc(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUmemAccessDesc_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemAccessDesc = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemAccessDesc", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemAccessDesc), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemAccessDesc_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Memory access descriptor\n\n    Attributes\n    ----------\n    location : CUmemLocation\n        Location on which the request is to change it's accessibility\n    flags : CUmemAccess_flags\n        ::CUmemProt accessibility flags to set on the request\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUmemAccessDesc_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUmemAccessDesc_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_18CUmemAccessDesc_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemAccessDesc, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemPoolProps_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUmemPoolProps_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemPoolProps_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemPoolProps_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemPoolProps_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Specifies the properties of allocations made from the pool.\n\n    Attributes\n    ----------\n    allocType : CUmemAllocationType\n        Allocation type. Currently must be specified as\n        CU_MEM_ALLOCATION_TYPE_PINNED\n    handleTypes : CUmemAllocationHandleType\n        Handle types that will be supported by allocations from the pool.\n    location : CUmemLocation\n        Location where allocations should reside.\n    win32SecurityAttributes : Any\n        Windows-specific LPSECURITYATTRIBUTES required when\n        CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute\n        defines the scope of which exported allocations may be tranferred\n        to other processes. In all other cases, this field is required to\n        be zero.\n    reserved : bytes\n        reserved for future use, must be 0\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUmemPoolProps_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUmemPoolProps_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemPoolProps_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemPoolProps(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUmemPoolProps_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemPoolProps = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemPoolProps", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemPoolProps), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemPoolProps_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Specifies the properties of allocations made from the pool.\n\n    Attributes\n    ----------\n    allocType : CUmemAllocationType\n        Allocation type. Currently must be specified as\n        CU_MEM_ALLOCATION_TYPE_PINNED\n    handleTypes : CUmemAllocationHandleType\n        Handle types that will be supported by allocations from the pool.\n    location : CUmemLocation\n        Location where allocations should reside.\n    win32SecurityAttributes : Any\n        Windows-specific LPSECURITYATTRIBUTES required when\n        CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute\n        defines the scope of which exported allocations may be tranferred\n        to other processes. In all other cases, this field is required to\n        be zero.\n    reserved : bytes\n        reserved for future use, must be 0\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUmemPoolProps_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUmemPoolProps_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_17CUmemPoolProps_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemPoolProps, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemPoolPtrExportData_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUmemPoolPtrExportData_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemPoolPtrExportData_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemPoolPtrExportData_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Opaque data for exporting a pool allocation\n\n    Attributes\n    ----------\n    reserved : bytes\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemPoolPtrExportData_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemPoolPtrExportData(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUmemPoolPtrExportData_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemPoolPtrExportData", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemPoolPtrExportData), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemPoolPtrExportData_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Opaque data for exporting a pool allocation\n\n    Attributes\n    ----------\n    reserved : bytes\n\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_25CUmemPoolPtrExportData_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemPoolPtrExportData, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUDA_MEM_ALLOC_NODE_PARAMS", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    Memory allocation node parameters\n\n    Attributes\n    ----------\n    poolProps : CUmemPoolProps\n        in: location where the allocation should reside (specified in\n        ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is\n        not supported.\n    accessDescs : CUmemAccessDesc\n        in: array of memory access descriptors. Used to describe peer GPU\n        access\n    accessDescCount : size_t\n        in: number of memory access descriptors. Must not exceed the number\n        of GPUs.\n    bytesize : size_t\n        in: size in bytes of the requested allocation\n    dptr : CUdeviceptr\n        out: address of the allocation returned by CUDA\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUeglFrame_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUeglFrame_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUeglFrame_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUeglFrame_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUeglFrame_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUeglFrame_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_13CUeglFrame_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    CUDA EGLFrame structure Descriptor - structure defining one frame\n    of EGL.  Each frame may contain one or more planes depending on\n    whether the surface * is Multiplanar or not.\n\n    Attributes\n    ----------\n    frame : _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u\n\n    width : unsigned int\n        Width of first plane\n    height : unsigned int\n        Height of first plane\n    depth : unsigned int\n        Depth of first plane\n    pitch : unsigned int\n        Pitch of first plane\n    planeCount : unsigned int\n        Number of planes\n    numChannels : unsigned int\n        Number of channels for the plane\n    frameType : CUeglFrameType\n        Array or Pitch\n    eglColorFormat : CUeglColorFormat\n        CUDA EGL Color Format\n    cuFormat : CUarray_format\n        CUDA Array Format\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUeglFrame_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUeglFrame_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_13CUeglFrame_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUeglFrame_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUeglFrame(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_4cuda_4cuda_CUeglFrame_st(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyTypeObject __pyx_type_4cuda_4cuda_CUeglFrame = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUeglFrame", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUeglFrame), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUeglFrame_st, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_13CUeglFrame_st_9__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    CUDA EGLFrame structure Descriptor - structure defining one frame\n    of EGL.  Each frame may contain one or more planes depending on\n    whether the surface * is Multiplanar or not.\n\n    Attributes\n    ----------\n    frame : _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u\n\n    width : unsigned int\n        Width of first plane\n    height : unsigned int\n        Height of first plane\n    depth : unsigned int\n        Depth of first plane\n    pitch : unsigned int\n        Pitch of first plane\n    planeCount : unsigned int\n        Number of planes\n    numChannels : unsigned int\n        Number of channels for the plane\n    frameType : CUeglFrameType\n        Array or Pitch\n    eglColorFormat : CUeglColorFormat\n        CUDA EGL Color Format\n    cuFormat : CUarray_format\n        CUDA Array Format\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda_CUeglFrame_st, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda_CUeglFrame_st, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_4cuda_4cuda_13CUeglFrame_st_3__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUeglFrame, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_cuuint32_t(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_10cuuint32_t_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_cuuint32_t(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_10cuuint32_t_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_cuuint32_t[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_10cuuint32_t_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_10cuuint32_t_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10cuuint32_t_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_10cuuint32_t_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10cuuint32_t_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_10cuuint32_t_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_cuuint32_t = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_10cuuint32_t_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_10cuuint32_t_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_cuuint32_t = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.cuuint32_t", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_cuuint32_t), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_cuuint32_t, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_10cuuint32_t_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_cuuint32_t, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_cuuint32_t, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_cuuint32_t, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_cuuint64_t(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_10cuuint64_t_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_cuuint64_t(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_10cuuint64_t_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_cuuint64_t[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_10cuuint64_t_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_10cuuint64_t_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10cuuint64_t_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_10cuuint64_t_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_10cuuint64_t_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_10cuuint64_t_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_cuuint64_t = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_10cuuint64_t_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_10cuuint64_t_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_cuuint64_t = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.cuuint64_t", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_cuuint64_t), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_cuuint64_t, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_10cuuint64_t_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_cuuint64_t, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_cuuint64_t, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_cuuint64_t, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUdeviceptr_v2(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUdeviceptr_v2(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUdeviceptr_v2[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_14CUdeviceptr_v2_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_14CUdeviceptr_v2_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_14CUdeviceptr_v2_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUdeviceptr_v2 = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUdeviceptr_v2 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUdeviceptr_v2", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUdeviceptr_v2), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUdeviceptr_v2, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_14CUdeviceptr_v2_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUdeviceptr_v2, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    CUDA device pointer CUdeviceptr is defined as an unsigned integer type whose size matches the size of a pointer on the target platform.\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUdeviceptr_v2, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUdeviceptr_v2, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUdeviceptr(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_11CUdeviceptr_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUdeviceptr(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_11CUdeviceptr_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUdeviceptr[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUdeviceptr_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUdeviceptr_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUdeviceptr_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUdeviceptr_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUdeviceptr_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11CUdeviceptr_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUdeviceptr = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_11CUdeviceptr_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_11CUdeviceptr_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUdeviceptr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUdeviceptr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUdeviceptr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUdeviceptr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_11CUdeviceptr_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUdeviceptr, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    CUDA device pointer\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUdeviceptr, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUdeviceptr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUdevice_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_11CUdevice_v1_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUdevice_v1(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_11CUdevice_v1_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUdevice_v1[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUdevice_v1_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUdevice_v1_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUdevice_v1_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUdevice_v1_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUdevice_v1_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11CUdevice_v1_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUdevice_v1 = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_11CUdevice_v1_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_11CUdevice_v1_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUdevice_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUdevice_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUdevice_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUdevice_v1, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_11CUdevice_v1_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUdevice_v1, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    CUDA device\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUdevice_v1, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUdevice_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUdevice(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_8CUdevice_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUdevice(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_8CUdevice_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUdevice[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUdevice_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUdevice_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUdevice_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_8CUdevice_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_8CUdevice_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_8CUdevice_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUdevice = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_8CUdevice_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_8CUdevice_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUdevice = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUdevice", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUdevice), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUdevice, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_8CUdevice_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUdevice, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    CUDA device\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUdevice, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUdevice, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUtexObject_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_14CUtexObject_v1_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUtexObject_v1(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_14CUtexObject_v1_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUtexObject_v1[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_14CUtexObject_v1_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_14CUtexObject_v1_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_14CUtexObject_v1_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_14CUtexObject_v1_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_14CUtexObject_v1_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_14CUtexObject_v1_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUtexObject_v1 = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_14CUtexObject_v1_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_14CUtexObject_v1_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUtexObject_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUtexObject_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUtexObject_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUtexObject_v1, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_14CUtexObject_v1_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUtexObject_v1, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    An opaque value that represents a CUDA texture object\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUtexObject_v1, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUtexObject_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUtexObject(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_11CUtexObject_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUtexObject(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_11CUtexObject_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUtexObject[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUtexObject_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUtexObject_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUtexObject_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_11CUtexObject_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_11CUtexObject_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_11CUtexObject_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUtexObject = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_11CUtexObject_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_11CUtexObject_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUtexObject = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUtexObject", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUtexObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUtexObject, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_11CUtexObject_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUtexObject, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    An opaque value that represents a CUDA texture object\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUtexObject, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUtexObject, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUsurfObject_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUsurfObject_v1(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_15CUsurfObject_v1_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUsurfObject_v1[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_15CUsurfObject_v1_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_15CUsurfObject_v1_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_15CUsurfObject_v1_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_15CUsurfObject_v1_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUsurfObject_v1 = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_15CUsurfObject_v1_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_15CUsurfObject_v1_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUsurfObject_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUsurfObject_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUsurfObject_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUsurfObject_v1, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_15CUsurfObject_v1_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUsurfObject_v1, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    An opaque value that represents a CUDA surface object\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUsurfObject_v1, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUsurfObject_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUsurfObject(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_12CUsurfObject_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUsurfObject(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_12CUsurfObject_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUsurfObject[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUsurfObject_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUsurfObject_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUsurfObject_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_12CUsurfObject_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_12CUsurfObject_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_12CUsurfObject_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUsurfObject = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_12CUsurfObject_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_12CUsurfObject_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUsurfObject = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUsurfObject", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUsurfObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUsurfObject, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_12CUsurfObject_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUsurfObject, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    An opaque value that represents a CUDA surface object\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUsurfObject, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUsurfObject, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemGenericAllocationHandle_v1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUmemGenericAllocationHandle_v1(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUmemGenericAllocationHandle_v1[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUmemGenericAllocationHandle_v1 = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle_v1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemGenericAllocationHandle_v1", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle_v1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemGenericAllocationHandle_v1, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUmemGenericAllocationHandle_v1, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUmemGenericAllocationHandle_v1, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemGenericAllocationHandle_v1, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_CUmemGenericAllocationHandle(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_CUmemGenericAllocationHandle(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_CUmemGenericAllocationHandle[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_28CUmemGenericAllocationHandle_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_28CUmemGenericAllocationHandle_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_28CUmemGenericAllocationHandle_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CUmemGenericAllocationHandle = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.CUmemGenericAllocationHandle", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_CUmemGenericAllocationHandle), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_CUmemGenericAllocationHandle, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_28CUmemGenericAllocationHandle_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CUmemGenericAllocationHandle, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_CUmemGenericAllocationHandle, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_CUmemGenericAllocationHandle, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_GLenum(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_6GLenum_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_GLenum(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_6GLenum_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_GLenum[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_6GLenum_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_6GLenum_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_6GLenum_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_6GLenum_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_6GLenum_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_6GLenum_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_GLenum = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_6GLenum_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_6GLenum_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_GLenum = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.GLenum", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_GLenum), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_GLenum, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_6GLenum_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_GLenum, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_GLenum, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_GLenum, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_GLuint(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_6GLuint_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_GLuint(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_6GLuint_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_GLuint[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_6GLuint_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_6GLuint_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_6GLuint_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_6GLuint_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_6GLuint_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_6GLuint_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_GLuint = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_6GLuint_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_6GLuint_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_GLuint = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.GLuint", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_GLuint), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_GLuint, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_6GLuint_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_GLuint, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_GLuint, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_GLuint, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_EGLint(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_6EGLint_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_EGLint(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_6EGLint_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_EGLint[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_6EGLint_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_6EGLint_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_6EGLint_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_6EGLint_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_6EGLint_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_6EGLint_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_EGLint = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_6EGLint_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_6EGLint_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_EGLint = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.EGLint", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_EGLint), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_EGLint, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_6EGLint_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_EGLint, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_EGLint, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_EGLint, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_VdpDevice(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_9VdpDevice_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_VdpDevice(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_9VdpDevice_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_VdpDevice[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_9VdpDevice_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_9VdpDevice_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9VdpDevice_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_9VdpDevice_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_9VdpDevice_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_9VdpDevice_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_VdpDevice = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_9VdpDevice_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_9VdpDevice_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_VdpDevice = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.VdpDevice", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_VdpDevice), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_VdpDevice, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_9VdpDevice_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_VdpDevice, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_VdpDevice, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_VdpDevice, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_VdpGetProcAddress(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_VdpGetProcAddress(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_17VdpGetProcAddress_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_VdpGetProcAddress[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_17VdpGetProcAddress_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_17VdpGetProcAddress_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_17VdpGetProcAddress_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_17VdpGetProcAddress_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_VdpGetProcAddress = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_17VdpGetProcAddress_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_17VdpGetProcAddress_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_VdpGetProcAddress = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.VdpGetProcAddress", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_VdpGetProcAddress), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_VdpGetProcAddress, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_17VdpGetProcAddress_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_VdpGetProcAddress, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_VdpGetProcAddress, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_VdpGetProcAddress, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_VdpVideoSurface(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_15VdpVideoSurface_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_VdpVideoSurface(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_15VdpVideoSurface_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_VdpVideoSurface[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_15VdpVideoSurface_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_15VdpVideoSurface_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_15VdpVideoSurface_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_15VdpVideoSurface_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_15VdpVideoSurface_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_15VdpVideoSurface_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_VdpVideoSurface = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_15VdpVideoSurface_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_15VdpVideoSurface_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_VdpVideoSurface = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.VdpVideoSurface", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_VdpVideoSurface), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_VdpVideoSurface, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_15VdpVideoSurface_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_VdpVideoSurface, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_VdpVideoSurface, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_VdpVideoSurface, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_4cuda_4cuda_VdpOutputSurface(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4cuda_4cuda_16VdpOutputSurface_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4cuda_4cuda_VdpOutputSurface(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4cuda_4cuda_16VdpOutputSurface_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_4cuda_4cuda_VdpOutputSurface[] = {
  {"getPtr", (PyCFunction)__pyx_pw_4cuda_4cuda_16VdpOutputSurface_9getPtr, METH_NOARGS, __pyx_doc_4cuda_4cuda_16VdpOutputSurface_8getPtr},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16VdpOutputSurface_11__reduce_cython__, METH_NOARGS, __pyx_doc_4cuda_4cuda_16VdpOutputSurface_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_4cuda_4cuda_16VdpOutputSurface_13__setstate_cython__, METH_O, __pyx_doc_4cuda_4cuda_16VdpOutputSurface_12__setstate_cython__},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_VdpOutputSurface = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  __pyx_pw_4cuda_4cuda_16VdpOutputSurface_7__int__, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  __pyx_pw_4cuda_4cuda_16VdpOutputSurface_7__int__, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_4cuda_4cuda_VdpOutputSurface = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.VdpOutputSurface", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda_VdpOutputSurface), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda_VdpOutputSurface, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_4cuda_4cuda_16VdpOutputSurface_5__repr__, /*tp_repr*/
  &__pyx_tp_as_number_VdpOutputSurface, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n\n    Methods\n    -------\n    getPtr()\n        Get memory address of class instance\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4cuda_4cuda_VdpOutputSurface, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda_VdpOutputSurface, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *__pyx_freelist_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_paramsArray);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3[__pyx_freecount_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *)o;
  if (p->__pyx_v_paramsArray) {
    e = (*v)(p->__pyx_v_paramsArray, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 *)o;
  tmp = ((PyObject*)p->__pyx_v_paramsArray);
  p->__pyx_v_paramsArray = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct__cuCtxCreate_v3", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_1_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_1_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_1_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_1_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_1_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_1_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_1_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_1_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_options);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *)o;
  if (p->__pyx_v_options) {
    e = (*v)(p->__pyx_v_options, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx *)o;
  tmp = ((PyObject*)p->__pyx_v_options);
  p->__pyx_v_options = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_2_cuModuleLoadDataEx", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_3_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_3_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_3_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_3_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_3_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_3_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_3_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_3_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_3_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_3_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_3_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_3_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_options);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *)o;
  if (p->__pyx_v_options) {
    e = (*v)(p->__pyx_v_options, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate *)o;
  tmp = ((PyObject*)p->__pyx_v_options);
  p->__pyx_v_options = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_4_cuLinkCreate", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_5_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_5_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_5_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_5_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_5_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_5_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_5_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_5_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_5_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_5_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_5_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_5_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_options);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *)o;
  if (p->__pyx_v_options) {
    e = (*v)(p->__pyx_v_options, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData *)o;
  tmp = ((PyObject*)p->__pyx_v_options);
  p->__pyx_v_options = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_6_cuLinkAddData", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_7_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_7_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_7_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_7_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_7_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_7_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_7_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_7_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_7_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_7_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_7_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_7_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_7_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_7_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_options);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *)o;
  if (p->__pyx_v_options) {
    e = (*v)(p->__pyx_v_options, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile *)o;
  tmp = ((PyObject*)p->__pyx_v_options);
  p->__pyx_v_options = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_8_cuLinkAddFile", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_9_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_9_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_9_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_9_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_9_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_9_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_9_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_9_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_9_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_9_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_9_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_9_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_9_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_9_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_9_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_9_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_9_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_mapInfoList);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *)o;
  if (p->__pyx_v_mapInfoList) {
    e = (*v)(p->__pyx_v_mapInfoList, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync *)o;
  tmp = ((PyObject*)p->__pyx_v_mapInfoList);
  p->__pyx_v_mapInfoList = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_10_cuMemMapArrayAsync", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_11_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_11_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_11_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_11_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_11_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_11_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_11_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_11_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_11_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_11_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_11_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_11_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_11_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_11_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_11_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_11_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_11_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_desc);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *)o;
  if (p->__pyx_v_desc) {
    e = (*v)(p->__pyx_v_desc, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess *)o;
  tmp = ((PyObject*)p->__pyx_v_desc);
  p->__pyx_v_desc = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_12_cuMemSetAccess", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_13_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_13_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_13_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_13_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_13_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_13_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_13_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_13_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_13_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_13_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_13_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_13_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_13_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_13_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_13_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_13_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_13_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_map);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *)o;
  if (p->__pyx_v_map) {
    e = (*v)(p->__pyx_v_map, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess *)o;
  tmp = ((PyObject*)p->__pyx_v_map);
  p->__pyx_v_map = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_14_cuMemPoolSetAccess", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_15_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_15_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_15_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_15_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_15_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_15_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_15_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_15_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_15_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_15_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_15_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_15_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_15_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_15_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_15_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_15_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_15_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_attributes);
  Py_CLEAR(p->__pyx_v_dataSizes);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *)o;
  if (p->__pyx_v_attributes) {
    e = (*v)(p->__pyx_v_attributes, a); if (e) return e;
  }
  if (p->__pyx_v_dataSizes) {
    e = (*v)(p->__pyx_v_dataSizes, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes *)o;
  tmp = ((PyObject*)p->__pyx_v_attributes);
  p->__pyx_v_attributes = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_dataSizes);
  p->__pyx_v_dataSizes = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_16_cuMemRangeGetAttributes", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_17_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_17_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_17_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_17_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_17_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_17_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_17_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_17_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_17_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_17_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_17_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_17_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_17_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_17_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_17_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_17_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_17_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_18_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_18_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_18_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_18_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_18_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_18_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_18_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_18_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_18_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_18_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_18_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_18_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_18_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_18_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_18_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_18_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_18_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_attributes);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *)o;
  if (p->__pyx_v_attributes) {
    e = (*v)(p->__pyx_v_attributes, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes *)o;
  tmp = ((PyObject*)p->__pyx_v_attributes);
  p->__pyx_v_attributes = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_19_cuPointerGetAttributes", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_20_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_20_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_20_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_20_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_20_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_20_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_20_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_20_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_20_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_20_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_20_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_20_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_20_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_20_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_20_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_20_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_20_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_21_cuStreamUpdateCaptureDependencies", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_22_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_22_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_22_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_22_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_22_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_22_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_22_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_22_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_22_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_22_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_22_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_22_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_22_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_22_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_22_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_22_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_22_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_extSemArray);
  Py_CLEAR(p->__pyx_v_paramsArray);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *)o;
  if (p->__pyx_v_extSemArray) {
    e = (*v)(p->__pyx_v_extSemArray, a); if (e) return e;
  }
  if (p->__pyx_v_paramsArray) {
    e = (*v)(p->__pyx_v_paramsArray, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync *)o;
  tmp = ((PyObject*)p->__pyx_v_extSemArray);
  p->__pyx_v_extSemArray = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_paramsArray);
  p->__pyx_v_paramsArray = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_23_cuSignalExternalSemaphoresAsync", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_24_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_24_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_24_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_24_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_24_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_24_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_24_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_24_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_24_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_24_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_24_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_24_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_24_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_24_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_24_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_24_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_24_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_25_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_25_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_25_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_25_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_25_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_25_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_25_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_25_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_25_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_25_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_25_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_25_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_25_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_25_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_25_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_25_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_25_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_extSemArray);
  Py_CLEAR(p->__pyx_v_paramsArray);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *)o;
  if (p->__pyx_v_extSemArray) {
    e = (*v)(p->__pyx_v_extSemArray, a); if (e) return e;
  }
  if (p->__pyx_v_paramsArray) {
    e = (*v)(p->__pyx_v_paramsArray, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync *)o;
  tmp = ((PyObject*)p->__pyx_v_extSemArray);
  p->__pyx_v_extSemArray = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_paramsArray);
  p->__pyx_v_paramsArray = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_26_cuWaitExternalSemaphoresAsync", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_27_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_27_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_27_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_27_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_27_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_27_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_27_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_27_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_27_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_27_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_27_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_27_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_27_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_27_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_27_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_27_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_27_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_28_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_28_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_28_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_28_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_28_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_28_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_28_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_28_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_28_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_28_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_28_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_28_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_28_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_28_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_28_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_28_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_28_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_paramArray);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *)o;
  if (p->__pyx_v_paramArray) {
    e = (*v)(p->__pyx_v_paramArray, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp *)o;
  tmp = ((PyObject*)p->__pyx_v_paramArray);
  p->__pyx_v_paramArray = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_29_cuStreamBatchMemOp", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_30_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_30_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_30_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_30_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_30_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_30_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_30_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_30_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_30_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_30_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_30_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_30_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_30_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_30_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_30_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_30_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_30_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_paramArray);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *)o;
  if (p->__pyx_v_paramArray) {
    e = (*v)(p->__pyx_v_paramArray, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 *)o;
  tmp = ((PyObject*)p->__pyx_v_paramArray);
  p->__pyx_v_paramArray = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_31_cuStreamBatchMemOp_v2", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_32_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_32_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_32_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_32_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_32_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_32_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_32_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_32_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_32_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_32_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_32_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_32_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_32_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_32_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_32_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_32_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_32_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_launchParamsList);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *)o;
  if (p->__pyx_v_launchParamsList) {
    e = (*v)(p->__pyx_v_launchParamsList, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice *)o;
  tmp = ((PyObject*)p->__pyx_v_launchParamsList);
  p->__pyx_v_launchParamsList = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_34_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_34_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_34_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_34_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_34_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_34_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_34_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_34_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_34_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_34_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_34_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_34_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_34_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_34_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_34_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_34_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_34_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_35_cuGraphAddKernelNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_36_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_36_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_36_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_36_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_36_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_36_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_36_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_36_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_36_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_36_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_36_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_36_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_36_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_36_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_36_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_36_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_36_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_37_cuGraphAddMemcpyNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_38_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_38_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_38_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_38_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_38_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_38_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_38_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_38_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_38_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_38_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_38_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_38_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_38_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_38_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_38_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_38_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_38_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_39_cuGraphAddMemsetNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_40_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_40_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_40_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_40_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_40_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_40_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_40_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_40_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_40_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_40_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_40_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_40_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_40_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_40_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_40_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_40_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_40_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_41_cuGraphAddHostNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_42_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_42_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_42_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_42_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_42_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_42_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_42_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_42_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_42_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_42_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_42_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_42_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_42_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_42_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_42_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_42_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_42_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_43_cuGraphAddChildGraphNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_44_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_44_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_44_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_44_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_44_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_44_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_44_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_44_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_44_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_44_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_44_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_44_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_44_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_44_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_44_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_44_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_44_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_45_cuGraphAddEmptyNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_46_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_46_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_46_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_46_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_46_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_46_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_46_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_46_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_46_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_46_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_46_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_46_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_46_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_46_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_46_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_46_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_46_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_47_cuGraphAddEventRecordNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_48_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_48_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_48_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_48_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_48_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_48_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_48_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_48_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_48_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_48_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_48_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_48_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_48_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_48_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_48_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_48_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_48_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_49_cuGraphAddEventWaitNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_50_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_50_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_50_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_50_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_50_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_50_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_50_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_50_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_50_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_50_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_50_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_50_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_50_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_50_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_50_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_50_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_50_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_52_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_52_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_52_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_52_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_52_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_52_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_52_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_52_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_52_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_52_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_52_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_52_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_52_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_52_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_52_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_52_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_52_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_54_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_54_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_54_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_54_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_54_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_54_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_54_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_54_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_54_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_54_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_54_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_54_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_54_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_54_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_54_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_54_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_54_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_55_cuGraphAddBatchMemOpNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_56_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_56_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_56_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_56_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_56_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_56_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_56_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_56_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_56_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_56_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_56_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_56_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_56_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_56_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_56_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_56_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_56_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_57_cuGraphAddMemAllocNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_58_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_58_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_58_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_58_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_58_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_58_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_58_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_58_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_58_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_58_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_58_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_58_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_58_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_58_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_58_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_58_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_58_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dependencies);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *)o;
  if (p->__pyx_v_dependencies) {
    e = (*v)(p->__pyx_v_dependencies, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode *)o;
  tmp = ((PyObject*)p->__pyx_v_dependencies);
  p->__pyx_v_dependencies = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_59_cuGraphAddMemFreeNode", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_60_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_60_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_60_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_60_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_60_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_60_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_60_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_60_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_60_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_60_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_60_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_60_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_60_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_60_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_60_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_60_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_60_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_from_);
  Py_CLEAR(p->__pyx_v_to);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *)o;
  if (p->__pyx_v_from_) {
    e = (*v)(p->__pyx_v_from_, a); if (e) return e;
  }
  if (p->__pyx_v_to) {
    e = (*v)(p->__pyx_v_to, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies *)o;
  tmp = ((PyObject*)p->__pyx_v_from_);
  p->__pyx_v_from_ = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_to);
  p->__pyx_v_to = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_61_cuGraphAddDependencies", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_62_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_62_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_62_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_62_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_62_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_62_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_62_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_62_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_62_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_62_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_62_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_62_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_62_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_62_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_62_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_62_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_62_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_63_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_63_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_63_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_63_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_63_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_63_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_63_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_63_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_63_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_63_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_63_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_63_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_63_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_63_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_63_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_63_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_63_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_from_);
  Py_CLEAR(p->__pyx_v_to);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *)o;
  if (p->__pyx_v_from_) {
    e = (*v)(p->__pyx_v_from_, a); if (e) return e;
  }
  if (p->__pyx_v_to) {
    e = (*v)(p->__pyx_v_to, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies *)o;
  tmp = ((PyObject*)p->__pyx_v_from_);
  p->__pyx_v_from_ = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_to);
  p->__pyx_v_to = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_64_cuGraphRemoveDependencies", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies, /*tp_traverse*/
  __pyx_tp_clear_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_65_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_65_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_65_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_65_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_65_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_65_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_65_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_65_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_65_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_65_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_65_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_65_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_65_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_65_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_65_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_65_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_65_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr *__pyx_freelist_4cuda_4cuda___pyx_scope_struct_66_genexpr[8];
static int __pyx_freecount_4cuda_4cuda___pyx_scope_struct_66_genexpr = 0;

static PyObject *__pyx_tp_new_4cuda_4cuda___pyx_scope_struct_66_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_66_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr)))) {
    o = (PyObject*)__pyx_freelist_4cuda_4cuda___pyx_scope_struct_66_genexpr[--__pyx_freecount_4cuda_4cuda___pyx_scope_struct_66_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_66_genexpr(PyObject *o) {
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v__x);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_4cuda_4cuda___pyx_scope_struct_66_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr)))) {
    __pyx_freelist_4cuda_4cuda___pyx_scope_struct_66_genexpr[__pyx_freecount_4cuda_4cuda___pyx_scope_struct_66_genexpr++] = ((struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_66_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr *p = (struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v__x) {
    e = (*v)(p->__pyx_v__x, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_4cuda_4cuda___pyx_scope_struct_66_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "cuda.cuda.__pyx_scope_struct_66_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_4cuda_4cuda___pyx_scope_struct_66_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4cuda_4cuda___pyx_scope_struct_66_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4cuda_4cuda___pyx_scope_struct_66_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4cuda_4cuda___pyx_scope_struct_66_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

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_cuda(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_cuda},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "cuda",
    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_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
  {&__pyx_kp_s_Access_flags_that_specify_the_l, __pyx_k_Access_flags_that_specify_the_l, sizeof(__pyx_k_Access_flags_that_specify_the_l), 0, 0, 1, 0},
  {&__pyx_n_s_Any, __pyx_k_Any, sizeof(__pyx_k_Any), 0, 0, 1, 1},
  {&__pyx_kp_u_Argument_attributes_is_not_insta, __pyx_k_Argument_attributes_is_not_insta, sizeof(__pyx_k_Argument_attributes_is_not_insta), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_attributes_is_not_insta_2, __pyx_k_Argument_attributes_is_not_insta_2, sizeof(__pyx_k_Argument_attributes_is_not_insta_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_conn_is_not_instance_of, __pyx_k_Argument_conn_is_not_instance_of, sizeof(__pyx_k_Argument_conn_is_not_instance_of), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_dataSizes_is_not_instan, __pyx_k_Argument_dataSizes_is_not_instan, sizeof(__pyx_k_Argument_dataSizes_is_not_instan), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_dependencies_is_not_ins, __pyx_k_Argument_dependencies_is_not_ins, sizeof(__pyx_k_Argument_dependencies_is_not_ins), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_desc_is_not_instance_of, __pyx_k_Argument_desc_is_not_instance_of, sizeof(__pyx_k_Argument_desc_is_not_instance_of), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_extSemArray_is_not_inst, __pyx_k_Argument_extSemArray_is_not_inst, sizeof(__pyx_k_Argument_extSemArray_is_not_inst), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_from__is_not_instance_o, __pyx_k_Argument_from__is_not_instance_o, sizeof(__pyx_k_Argument_from__is_not_instance_o), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_launchParamsList_is_not, __pyx_k_Argument_launchParamsList_is_not, sizeof(__pyx_k_Argument_launchParamsList_is_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_mapInfoList_is_not_inst, __pyx_k_Argument_mapInfoList_is_not_inst, sizeof(__pyx_k_Argument_mapInfoList_is_not_inst), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_map_is_not_instance_of, __pyx_k_Argument_map_is_not_instance_of, sizeof(__pyx_k_Argument_map_is_not_instance_of), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_options_is_not_instance, __pyx_k_Argument_options_is_not_instance, sizeof(__pyx_k_Argument_options_is_not_instance), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_pCudaResource_is_not_in, __pyx_k_Argument_pCudaResource_is_not_in, sizeof(__pyx_k_Argument_pCudaResource_is_not_in), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_pStream_is_not_instance, __pyx_k_Argument_pStream_is_not_instance, sizeof(__pyx_k_Argument_pStream_is_not_instance), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_paramArray_is_not_insta, __pyx_k_Argument_paramArray_is_not_insta, sizeof(__pyx_k_Argument_paramArray_is_not_insta), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_paramsArray_is_not_inst, __pyx_k_Argument_paramsArray_is_not_inst, sizeof(__pyx_k_Argument_paramsArray_is_not_inst), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_paramsArray_is_not_inst_2, __pyx_k_Argument_paramsArray_is_not_inst_2, sizeof(__pyx_k_Argument_paramsArray_is_not_inst_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_paramsArray_is_not_inst_3, __pyx_k_Argument_paramsArray_is_not_inst_3, sizeof(__pyx_k_Argument_paramsArray_is_not_inst_3), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_resources_is_not_instan, __pyx_k_Argument_resources_is_not_instan, sizeof(__pyx_k_Argument_resources_is_not_instan), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_to_is_not_instance_of_t, __pyx_k_Argument_to_is_not_instance_of_t, sizeof(__pyx_k_Argument_to_is_not_instance_of_t), 0, 1, 0, 0},
  {&__pyx_kp_u_Argument_vdpGetProcAddress_is_no, __pyx_k_Argument_vdpGetProcAddress_is_no, sizeof(__pyx_k_Argument_vdpGetProcAddress_is_no), 0, 1, 0, 0},
  {&__pyx_kp_s_Array_formats, __pyx_k_Array_formats, sizeof(__pyx_k_Array_formats), 0, 0, 1, 0},
  {&__pyx_kp_s_Array_indices_for_cube_faces, __pyx_k_Array_indices_for_cube_faces, sizeof(__pyx_k_Array_indices_for_cube_faces), 0, 0, 1, 0},
  {&__pyx_kp_s_Bitmasks_for_py_obj_CU_DEVICE_A, __pyx_k_Bitmasks_for_py_obj_CU_DEVICE_A, sizeof(__pyx_k_Bitmasks_for_py_obj_CU_DEVICE_A), 0, 0, 1, 0},
  {&__pyx_n_s_ByteCount, __pyx_k_ByteCount, sizeof(__pyx_k_ByteCount), 0, 0, 1, 1},
  {&__pyx_n_s_ByteOffset, __pyx_k_ByteOffset, sizeof(__pyx_k_ByteOffset), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_2DARRAY, __pyx_k_CUDA_ARRAY3D_2DARRAY, sizeof(__pyx_k_CUDA_ARRAY3D_2DARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_COLOR_ATTACHMENT, __pyx_k_CUDA_ARRAY3D_COLOR_ATTACHMENT, sizeof(__pyx_k_CUDA_ARRAY3D_COLOR_ATTACHMENT), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_CUBEMAP, __pyx_k_CUDA_ARRAY3D_CUBEMAP, sizeof(__pyx_k_CUDA_ARRAY3D_CUBEMAP), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_DEFERRED_MAPPING, __pyx_k_CUDA_ARRAY3D_DEFERRED_MAPPING, sizeof(__pyx_k_CUDA_ARRAY3D_DEFERRED_MAPPING), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_DEPTH_TEXTURE, __pyx_k_CUDA_ARRAY3D_DEPTH_TEXTURE, sizeof(__pyx_k_CUDA_ARRAY3D_DEPTH_TEXTURE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR, __pyx_k_CUDA_ARRAY3D_DESCRIPTOR, sizeof(__pyx_k_CUDA_ARRAY3D_DESCRIPTOR), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_ARRAY3D_DESCRIPTOR, __pyx_k_CUDA_ARRAY3D_DESCRIPTOR, sizeof(__pyx_k_CUDA_ARRAY3D_DESCRIPTOR), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_st, __pyx_k_CUDA_ARRAY3D_DESCRIPTOR_st, sizeof(__pyx_k_CUDA_ARRAY3D_DESCRIPTOR_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_st___red, __pyx_k_CUDA_ARRAY3D_DESCRIPTOR_st___red, sizeof(__pyx_k_CUDA_ARRAY3D_DESCRIPTOR_st___red), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_st___set, __pyx_k_CUDA_ARRAY3D_DESCRIPTOR_st___set, sizeof(__pyx_k_CUDA_ARRAY3D_DESCRIPTOR_st___set), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_st_getPt, __pyx_k_CUDA_ARRAY3D_DESCRIPTOR_st_getPt, sizeof(__pyx_k_CUDA_ARRAY3D_DESCRIPTOR_st_getPt), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_v2, __pyx_k_CUDA_ARRAY3D_DESCRIPTOR_v2, sizeof(__pyx_k_CUDA_ARRAY3D_DESCRIPTOR_v2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_LAYERED, __pyx_k_CUDA_ARRAY3D_LAYERED, sizeof(__pyx_k_CUDA_ARRAY3D_LAYERED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_SPARSE, __pyx_k_CUDA_ARRAY3D_SPARSE, sizeof(__pyx_k_CUDA_ARRAY3D_SPARSE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_SURFACE_LDST, __pyx_k_CUDA_ARRAY3D_SURFACE_LDST, sizeof(__pyx_k_CUDA_ARRAY3D_SURFACE_LDST), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY3D_TEXTURE_GATHER, __pyx_k_CUDA_ARRAY3D_TEXTURE_GATHER, sizeof(__pyx_k_CUDA_ARRAY3D_TEXTURE_GATHER), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_DESCRIPTOR, __pyx_k_CUDA_ARRAY_DESCRIPTOR, sizeof(__pyx_k_CUDA_ARRAY_DESCRIPTOR), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_ARRAY_DESCRIPTOR, __pyx_k_CUDA_ARRAY_DESCRIPTOR, sizeof(__pyx_k_CUDA_ARRAY_DESCRIPTOR), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_ARRAY_DESCRIPTOR_st, __pyx_k_CUDA_ARRAY_DESCRIPTOR_st, sizeof(__pyx_k_CUDA_ARRAY_DESCRIPTOR_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_DESCRIPTOR_st___reduc, __pyx_k_CUDA_ARRAY_DESCRIPTOR_st___reduc, sizeof(__pyx_k_CUDA_ARRAY_DESCRIPTOR_st___reduc), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_DESCRIPTOR_st___setst, __pyx_k_CUDA_ARRAY_DESCRIPTOR_st___setst, sizeof(__pyx_k_CUDA_ARRAY_DESCRIPTOR_st___setst), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_DESCRIPTOR_st_getPtr, __pyx_k_CUDA_ARRAY_DESCRIPTOR_st_getPtr, sizeof(__pyx_k_CUDA_ARRAY_DESCRIPTOR_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_DESCRIPTOR_v2, __pyx_k_CUDA_ARRAY_DESCRIPTOR_v2, sizeof(__pyx_k_CUDA_ARRAY_DESCRIPTOR_v2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS, __pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS, sizeof(__pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_s, __pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_s, sizeof(__pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_s), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_2, __pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_2, sizeof(__pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_3, __pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_3, sizeof(__pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_4, __pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_4, sizeof(__pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_v, __pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_v, sizeof(__pyx_k_CUDA_ARRAY_MEMORY_REQUIREMENTS_v), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES, __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES, sizeof(__pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_st, __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_st, sizeof(__pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_st_2, __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_st_2, sizeof(__pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_st_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_st_3, __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_st_3, sizeof(__pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_st_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_st_4, __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_st_4, sizeof(__pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_st_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1, __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1, sizeof(__pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1_2, __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1_2, sizeof(__pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1_3, __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1_3, sizeof(__pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1_4, __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1_4, sizeof(__pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1_5, __pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1_5, sizeof(__pyx_k_CUDA_ARRAY_SPARSE_PROPERTIES_v1_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS, __pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS, sizeof(__pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_BATCH_MEM_OP_NODE_PARAMS, __pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS, sizeof(__pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS_st, __pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS_st, sizeof(__pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_2, __pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_2, sizeof(__pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3, __pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3, sizeof(__pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_4, __pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_4, sizeof(__pyx_k_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_COOPERATIVE_LAUNCH_MULTI_DE, __pyx_k_CUDA_COOPERATIVE_LAUNCH_MULTI_DE, sizeof(__pyx_k_CUDA_COOPERATIVE_LAUNCH_MULTI_DE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_COOPERATIVE_LAUNCH_MULTI_DE_2, __pyx_k_CUDA_COOPERATIVE_LAUNCH_MULTI_DE_2, sizeof(__pyx_k_CUDA_COOPERATIVE_LAUNCH_MULTI_DE_2), 0, 0, 1, 1},
  {&__pyx_kp_s_CUDA_EGL_Color_Format_The_diffe, __pyx_k_CUDA_EGL_Color_Format_The_diffe, sizeof(__pyx_k_CUDA_EGL_Color_Format_The_diffe), 0, 0, 1, 0},
  {&__pyx_n_s_CUDA_EGL_INFINITE_TIMEOUT, __pyx_k_CUDA_EGL_INFINITE_TIMEOUT, sizeof(__pyx_k_CUDA_EGL_INFINITE_TIMEOUT), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_ALREADY_ACQUIRED, __pyx_k_CUDA_ERROR_ALREADY_ACQUIRED, sizeof(__pyx_k_CUDA_ERROR_ALREADY_ACQUIRED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_ALREADY_MAPPED, __pyx_k_CUDA_ERROR_ALREADY_MAPPED, sizeof(__pyx_k_CUDA_ERROR_ALREADY_MAPPED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_ARRAY_IS_MAPPED, __pyx_k_CUDA_ERROR_ARRAY_IS_MAPPED, sizeof(__pyx_k_CUDA_ERROR_ARRAY_IS_MAPPED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_ASSERT, __pyx_k_CUDA_ERROR_ASSERT, sizeof(__pyx_k_CUDA_ERROR_ASSERT), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_CAPTURED_EVENT, __pyx_k_CUDA_ERROR_CAPTURED_EVENT, sizeof(__pyx_k_CUDA_ERROR_CAPTURED_EVENT), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_COMPAT_NOT_SUPPORTED, __pyx_k_CUDA_ERROR_COMPAT_NOT_SUPPORTED, sizeof(__pyx_k_CUDA_ERROR_COMPAT_NOT_SUPPORTED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_CONTEXT_ALREADY_CURRE, __pyx_k_CUDA_ERROR_CONTEXT_ALREADY_CURRE, sizeof(__pyx_k_CUDA_ERROR_CONTEXT_ALREADY_CURRE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_CONTEXT_ALREADY_IN_US, __pyx_k_CUDA_ERROR_CONTEXT_ALREADY_IN_US, sizeof(__pyx_k_CUDA_ERROR_CONTEXT_ALREADY_IN_US), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_CONTEXT_IS_DESTROYED, __pyx_k_CUDA_ERROR_CONTEXT_IS_DESTROYED, sizeof(__pyx_k_CUDA_ERROR_CONTEXT_IS_DESTROYED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_COOPERATIVE_LAUNCH_TO, __pyx_k_CUDA_ERROR_COOPERATIVE_LAUNCH_TO, sizeof(__pyx_k_CUDA_ERROR_COOPERATIVE_LAUNCH_TO), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_DEINITIALIZED, __pyx_k_CUDA_ERROR_DEINITIALIZED, sizeof(__pyx_k_CUDA_ERROR_DEINITIALIZED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_DEVICE_NOT_LICENSED, __pyx_k_CUDA_ERROR_DEVICE_NOT_LICENSED, sizeof(__pyx_k_CUDA_ERROR_DEVICE_NOT_LICENSED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_DEVICE_UNAVAILABLE, __pyx_k_CUDA_ERROR_DEVICE_UNAVAILABLE, sizeof(__pyx_k_CUDA_ERROR_DEVICE_UNAVAILABLE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_ECC_UNCORRECTABLE, __pyx_k_CUDA_ERROR_ECC_UNCORRECTABLE, sizeof(__pyx_k_CUDA_ERROR_ECC_UNCORRECTABLE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_EXTERNAL_DEVICE, __pyx_k_CUDA_ERROR_EXTERNAL_DEVICE, sizeof(__pyx_k_CUDA_ERROR_EXTERNAL_DEVICE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_FILE_NOT_FOUND, __pyx_k_CUDA_ERROR_FILE_NOT_FOUND, sizeof(__pyx_k_CUDA_ERROR_FILE_NOT_FOUND), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_GRAPH_EXEC_UPDATE_FAI, __pyx_k_CUDA_ERROR_GRAPH_EXEC_UPDATE_FAI, sizeof(__pyx_k_CUDA_ERROR_GRAPH_EXEC_UPDATE_FAI), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_HARDWARE_STACK_ERROR, __pyx_k_CUDA_ERROR_HARDWARE_STACK_ERROR, sizeof(__pyx_k_CUDA_ERROR_HARDWARE_STACK_ERROR), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_HOST_MEMORY_ALREADY_R, __pyx_k_CUDA_ERROR_HOST_MEMORY_ALREADY_R, sizeof(__pyx_k_CUDA_ERROR_HOST_MEMORY_ALREADY_R), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_HOST_MEMORY_NOT_REGIS, __pyx_k_CUDA_ERROR_HOST_MEMORY_NOT_REGIS, sizeof(__pyx_k_CUDA_ERROR_HOST_MEMORY_NOT_REGIS), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_ILLEGAL_ADDRESS, __pyx_k_CUDA_ERROR_ILLEGAL_ADDRESS, sizeof(__pyx_k_CUDA_ERROR_ILLEGAL_ADDRESS), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_ILLEGAL_INSTRUCTION, __pyx_k_CUDA_ERROR_ILLEGAL_INSTRUCTION, sizeof(__pyx_k_CUDA_ERROR_ILLEGAL_INSTRUCTION), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_ILLEGAL_STATE, __pyx_k_CUDA_ERROR_ILLEGAL_STATE, sizeof(__pyx_k_CUDA_ERROR_ILLEGAL_STATE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_INVALID_ADDRESS_SPACE, __pyx_k_CUDA_ERROR_INVALID_ADDRESS_SPACE, sizeof(__pyx_k_CUDA_ERROR_INVALID_ADDRESS_SPACE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_INVALID_CLUSTER_SIZE, __pyx_k_CUDA_ERROR_INVALID_CLUSTER_SIZE, sizeof(__pyx_k_CUDA_ERROR_INVALID_CLUSTER_SIZE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_INVALID_CONTEXT, __pyx_k_CUDA_ERROR_INVALID_CONTEXT, sizeof(__pyx_k_CUDA_ERROR_INVALID_CONTEXT), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_INVALID_DEVICE, __pyx_k_CUDA_ERROR_INVALID_DEVICE, sizeof(__pyx_k_CUDA_ERROR_INVALID_DEVICE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_INVALID_GRAPHICS_CONT, __pyx_k_CUDA_ERROR_INVALID_GRAPHICS_CONT, sizeof(__pyx_k_CUDA_ERROR_INVALID_GRAPHICS_CONT), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_INVALID_HANDLE, __pyx_k_CUDA_ERROR_INVALID_HANDLE, sizeof(__pyx_k_CUDA_ERROR_INVALID_HANDLE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_INVALID_IMAGE, __pyx_k_CUDA_ERROR_INVALID_IMAGE, sizeof(__pyx_k_CUDA_ERROR_INVALID_IMAGE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_INVALID_PC, __pyx_k_CUDA_ERROR_INVALID_PC, sizeof(__pyx_k_CUDA_ERROR_INVALID_PC), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_INVALID_PTX, __pyx_k_CUDA_ERROR_INVALID_PTX, sizeof(__pyx_k_CUDA_ERROR_INVALID_PTX), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_INVALID_SOURCE, __pyx_k_CUDA_ERROR_INVALID_SOURCE, sizeof(__pyx_k_CUDA_ERROR_INVALID_SOURCE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_INVALID_VALUE, __pyx_k_CUDA_ERROR_INVALID_VALUE, sizeof(__pyx_k_CUDA_ERROR_INVALID_VALUE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_JIT_COMPILATION_DISAB, __pyx_k_CUDA_ERROR_JIT_COMPILATION_DISAB, sizeof(__pyx_k_CUDA_ERROR_JIT_COMPILATION_DISAB), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_JIT_COMPILER_NOT_FOUN, __pyx_k_CUDA_ERROR_JIT_COMPILER_NOT_FOUN, sizeof(__pyx_k_CUDA_ERROR_JIT_COMPILER_NOT_FOUN), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_LAUNCH_FAILED, __pyx_k_CUDA_ERROR_LAUNCH_FAILED, sizeof(__pyx_k_CUDA_ERROR_LAUNCH_FAILED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_LAUNCH_INCOMPATIBLE_T, __pyx_k_CUDA_ERROR_LAUNCH_INCOMPATIBLE_T, sizeof(__pyx_k_CUDA_ERROR_LAUNCH_INCOMPATIBLE_T), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_LAUNCH_OUT_OF_RESOURC, __pyx_k_CUDA_ERROR_LAUNCH_OUT_OF_RESOURC, sizeof(__pyx_k_CUDA_ERROR_LAUNCH_OUT_OF_RESOURC), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_LAUNCH_TIMEOUT, __pyx_k_CUDA_ERROR_LAUNCH_TIMEOUT, sizeof(__pyx_k_CUDA_ERROR_LAUNCH_TIMEOUT), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_MAP_FAILED, __pyx_k_CUDA_ERROR_MAP_FAILED, sizeof(__pyx_k_CUDA_ERROR_MAP_FAILED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_MISALIGNED_ADDRESS, __pyx_k_CUDA_ERROR_MISALIGNED_ADDRESS, sizeof(__pyx_k_CUDA_ERROR_MISALIGNED_ADDRESS), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_MPS_CLIENT_TERMINATED, __pyx_k_CUDA_ERROR_MPS_CLIENT_TERMINATED, sizeof(__pyx_k_CUDA_ERROR_MPS_CLIENT_TERMINATED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_MPS_CONNECTION_FAILED, __pyx_k_CUDA_ERROR_MPS_CONNECTION_FAILED, sizeof(__pyx_k_CUDA_ERROR_MPS_CONNECTION_FAILED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_MPS_MAX_CLIENTS_REACH, __pyx_k_CUDA_ERROR_MPS_MAX_CLIENTS_REACH, sizeof(__pyx_k_CUDA_ERROR_MPS_MAX_CLIENTS_REACH), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_MPS_MAX_CONNECTIONS_R, __pyx_k_CUDA_ERROR_MPS_MAX_CONNECTIONS_R, sizeof(__pyx_k_CUDA_ERROR_MPS_MAX_CONNECTIONS_R), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_MPS_RPC_FAILURE, __pyx_k_CUDA_ERROR_MPS_RPC_FAILURE, sizeof(__pyx_k_CUDA_ERROR_MPS_RPC_FAILURE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_MPS_SERVER_NOT_READY, __pyx_k_CUDA_ERROR_MPS_SERVER_NOT_READY, sizeof(__pyx_k_CUDA_ERROR_MPS_SERVER_NOT_READY), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_NOT_FOUND, __pyx_k_CUDA_ERROR_NOT_FOUND, sizeof(__pyx_k_CUDA_ERROR_NOT_FOUND), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_NOT_INITIALIZED, __pyx_k_CUDA_ERROR_NOT_INITIALIZED, sizeof(__pyx_k_CUDA_ERROR_NOT_INITIALIZED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_NOT_MAPPED, __pyx_k_CUDA_ERROR_NOT_MAPPED, sizeof(__pyx_k_CUDA_ERROR_NOT_MAPPED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_NOT_MAPPED_AS_ARRAY, __pyx_k_CUDA_ERROR_NOT_MAPPED_AS_ARRAY, sizeof(__pyx_k_CUDA_ERROR_NOT_MAPPED_AS_ARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_NOT_MAPPED_AS_POINTER, __pyx_k_CUDA_ERROR_NOT_MAPPED_AS_POINTER, sizeof(__pyx_k_CUDA_ERROR_NOT_MAPPED_AS_POINTER), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_NOT_PERMITTED, __pyx_k_CUDA_ERROR_NOT_PERMITTED, sizeof(__pyx_k_CUDA_ERROR_NOT_PERMITTED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_NOT_READY, __pyx_k_CUDA_ERROR_NOT_READY, sizeof(__pyx_k_CUDA_ERROR_NOT_READY), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_NOT_SUPPORTED, __pyx_k_CUDA_ERROR_NOT_SUPPORTED, sizeof(__pyx_k_CUDA_ERROR_NOT_SUPPORTED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_NO_BINARY_FOR_GPU, __pyx_k_CUDA_ERROR_NO_BINARY_FOR_GPU, sizeof(__pyx_k_CUDA_ERROR_NO_BINARY_FOR_GPU), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_NO_DEVICE, __pyx_k_CUDA_ERROR_NO_DEVICE, sizeof(__pyx_k_CUDA_ERROR_NO_DEVICE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_NVLINK_UNCORRECTABLE, __pyx_k_CUDA_ERROR_NVLINK_UNCORRECTABLE, sizeof(__pyx_k_CUDA_ERROR_NVLINK_UNCORRECTABLE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_OPERATING_SYSTEM, __pyx_k_CUDA_ERROR_OPERATING_SYSTEM, sizeof(__pyx_k_CUDA_ERROR_OPERATING_SYSTEM), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_OUT_OF_MEMORY, __pyx_k_CUDA_ERROR_OUT_OF_MEMORY, sizeof(__pyx_k_CUDA_ERROR_OUT_OF_MEMORY), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_PEER_ACCESS_ALREADY_E, __pyx_k_CUDA_ERROR_PEER_ACCESS_ALREADY_E, sizeof(__pyx_k_CUDA_ERROR_PEER_ACCESS_ALREADY_E), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_PEER_ACCESS_NOT_ENABL, __pyx_k_CUDA_ERROR_PEER_ACCESS_NOT_ENABL, sizeof(__pyx_k_CUDA_ERROR_PEER_ACCESS_NOT_ENABL), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_PEER_ACCESS_UNSUPPORT, __pyx_k_CUDA_ERROR_PEER_ACCESS_UNSUPPORT, sizeof(__pyx_k_CUDA_ERROR_PEER_ACCESS_UNSUPPORT), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_PRIMARY_CONTEXT_ACTIV, __pyx_k_CUDA_ERROR_PRIMARY_CONTEXT_ACTIV, sizeof(__pyx_k_CUDA_ERROR_PRIMARY_CONTEXT_ACTIV), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_PROFILER_ALREADY_STAR, __pyx_k_CUDA_ERROR_PROFILER_ALREADY_STAR, sizeof(__pyx_k_CUDA_ERROR_PROFILER_ALREADY_STAR), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_PROFILER_ALREADY_STOP, __pyx_k_CUDA_ERROR_PROFILER_ALREADY_STOP, sizeof(__pyx_k_CUDA_ERROR_PROFILER_ALREADY_STOP), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_PROFILER_DISABLED, __pyx_k_CUDA_ERROR_PROFILER_DISABLED, sizeof(__pyx_k_CUDA_ERROR_PROFILER_DISABLED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_PROFILER_NOT_INITIALI, __pyx_k_CUDA_ERROR_PROFILER_NOT_INITIALI, sizeof(__pyx_k_CUDA_ERROR_PROFILER_NOT_INITIALI), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_SHARED_OBJECT_INIT_FA, __pyx_k_CUDA_ERROR_SHARED_OBJECT_INIT_FA, sizeof(__pyx_k_CUDA_ERROR_SHARED_OBJECT_INIT_FA), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_SHARED_OBJECT_SYMBOL, __pyx_k_CUDA_ERROR_SHARED_OBJECT_SYMBOL, sizeof(__pyx_k_CUDA_ERROR_SHARED_OBJECT_SYMBOL), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_IMPLIC, __pyx_k_CUDA_ERROR_STREAM_CAPTURE_IMPLIC, sizeof(__pyx_k_CUDA_ERROR_STREAM_CAPTURE_IMPLIC), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_INVALI, __pyx_k_CUDA_ERROR_STREAM_CAPTURE_INVALI, sizeof(__pyx_k_CUDA_ERROR_STREAM_CAPTURE_INVALI), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_ISOLAT, __pyx_k_CUDA_ERROR_STREAM_CAPTURE_ISOLAT, sizeof(__pyx_k_CUDA_ERROR_STREAM_CAPTURE_ISOLAT), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_MERGE, __pyx_k_CUDA_ERROR_STREAM_CAPTURE_MERGE, sizeof(__pyx_k_CUDA_ERROR_STREAM_CAPTURE_MERGE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_UNJOIN, __pyx_k_CUDA_ERROR_STREAM_CAPTURE_UNJOIN, sizeof(__pyx_k_CUDA_ERROR_STREAM_CAPTURE_UNJOIN), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_UNMATC, __pyx_k_CUDA_ERROR_STREAM_CAPTURE_UNMATC, sizeof(__pyx_k_CUDA_ERROR_STREAM_CAPTURE_UNMATC), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_UNSUPP, __pyx_k_CUDA_ERROR_STREAM_CAPTURE_UNSUPP, sizeof(__pyx_k_CUDA_ERROR_STREAM_CAPTURE_UNSUPP), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_WRONG, __pyx_k_CUDA_ERROR_STREAM_CAPTURE_WRONG, sizeof(__pyx_k_CUDA_ERROR_STREAM_CAPTURE_WRONG), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_STUB_LIBRARY, __pyx_k_CUDA_ERROR_STUB_LIBRARY, sizeof(__pyx_k_CUDA_ERROR_STUB_LIBRARY), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_SYSTEM_DRIVER_MISMATC, __pyx_k_CUDA_ERROR_SYSTEM_DRIVER_MISMATC, sizeof(__pyx_k_CUDA_ERROR_SYSTEM_DRIVER_MISMATC), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_SYSTEM_NOT_READY, __pyx_k_CUDA_ERROR_SYSTEM_NOT_READY, sizeof(__pyx_k_CUDA_ERROR_SYSTEM_NOT_READY), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_TIMEOUT, __pyx_k_CUDA_ERROR_TIMEOUT, sizeof(__pyx_k_CUDA_ERROR_TIMEOUT), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_TOO_MANY_PEERS, __pyx_k_CUDA_ERROR_TOO_MANY_PEERS, sizeof(__pyx_k_CUDA_ERROR_TOO_MANY_PEERS), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_UNKNOWN, __pyx_k_CUDA_ERROR_UNKNOWN, sizeof(__pyx_k_CUDA_ERROR_UNKNOWN), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_UNMAP_FAILED, __pyx_k_CUDA_ERROR_UNMAP_FAILED, sizeof(__pyx_k_CUDA_ERROR_UNMAP_FAILED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_UNSUPPORTED_EXEC_AFFI, __pyx_k_CUDA_ERROR_UNSUPPORTED_EXEC_AFFI, sizeof(__pyx_k_CUDA_ERROR_UNSUPPORTED_EXEC_AFFI), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_UNSUPPORTED_LIMIT, __pyx_k_CUDA_ERROR_UNSUPPORTED_LIMIT, sizeof(__pyx_k_CUDA_ERROR_UNSUPPORTED_LIMIT), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_ERROR_UNSUPPORTED_PTX_VERSI, __pyx_k_CUDA_ERROR_UNSUPPORTED_PTX_VERSI, sizeof(__pyx_k_CUDA_ERROR_UNSUPPORTED_PTX_VERSI), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC, __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_2, __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_2, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_3, __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_3, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_3), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_3, __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_3, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_3), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_4, __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_4, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_5, __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_5, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_6, __pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_6, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_DEDICATED, __pyx_k_CUDA_EXTERNAL_MEMORY_DEDICATED, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_DEDICATED), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_2, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_2, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_3, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_3, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_3), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_3, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_3, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_3), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_4, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_4, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_5, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_5, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_6, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_6, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_2, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_2, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_3, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_3, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_4, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_4, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_5, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_5, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_6, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_6, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_7, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_7, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_7), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_8, __pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_8, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_HANDLE_DES_8), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A, __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_2, __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_2, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_3, __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_3, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_3), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_3, __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_3, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_3), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_4, __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_4, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_5, __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_5, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_6, __pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_6, sizeof(__pyx_k_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_2, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_2, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_3, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_3, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_4, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_4, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_5, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_5, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_6, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_6, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_7, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_7, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_7), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_8, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_8, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_8), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_2, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_2, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_3, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_3, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_3), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_3, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_3, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_3), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_4, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_4, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_5, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_5, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_6, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_6, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_10, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_10, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_10), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_11, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_11, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_11), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_12, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_12, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_12), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_13, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_13, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_13), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_14, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_14, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_14), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_15, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_15, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_15), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_16, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_16, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_16), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_2, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_2, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_3, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_3, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_4, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_4, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_5, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_5, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_6, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_6, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_7, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_7, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_7), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_8, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_8, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_8), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_9, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_9, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_9), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_2, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_2, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_3, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_3, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_4, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_4, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_5, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_5, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_6, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_6, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_S, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_S, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_S), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_2, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_2, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_3, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_3, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_4, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_4, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_5, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_5, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_6, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_6, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_10, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_10, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_10), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_11, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_11, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_11), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_12, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_12, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_12), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_13, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_13, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_13), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_14, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_14, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_14), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_15, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_15, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_15), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_16, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_16, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_16), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_2, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_2, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_3, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_3, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_4, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_4, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_5, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_5, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_6, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_6, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_7, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_7, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_7), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_8, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_8, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_8), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_9, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_9, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_9), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKI, __pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKI, sizeof(__pyx_k_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKI), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS, __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS, sizeof(__pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_2, __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_2, sizeof(__pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3, __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3, sizeof(__pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3, __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3, sizeof(__pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_4, __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_4, sizeof(__pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_5, __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_5, sizeof(__pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_6, __pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_6, sizeof(__pyx_k_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS, __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS, sizeof(__pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_EXT_SEM_WAIT_NODE_PARAMS, __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS, sizeof(__pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st, __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st, sizeof(__pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_2, __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_2, sizeof(__pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_3, __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_3, sizeof(__pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_4, __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_4, sizeof(__pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1, __pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1, sizeof(__pyx_k_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1), 0, 0, 1, 1},
  {&__pyx_kp_s_CUDA_EglFrame_type_array_or_poi, __pyx_k_CUDA_EglFrame_type_array_or_poi, sizeof(__pyx_k_CUDA_EglFrame_type_array_or_poi), 0, 0, 1, 0},
  {&__pyx_n_s_CUDA_GRAPH_INSTANTIATE_FLAG_AUTO, __pyx_k_CUDA_GRAPH_INSTANTIATE_FLAG_AUTO, sizeof(__pyx_k_CUDA_GRAPH_INSTANTIATE_FLAG_AUTO), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_GRAPH_INSTANTIATE_FLAG_USE, __pyx_k_CUDA_GRAPH_INSTANTIATE_FLAG_USE, sizeof(__pyx_k_CUDA_GRAPH_INSTANTIATE_FLAG_USE), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_HOST_NODE_PARAMS, __pyx_k_CUDA_HOST_NODE_PARAMS, sizeof(__pyx_k_CUDA_HOST_NODE_PARAMS), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_HOST_NODE_PARAMS, __pyx_k_CUDA_HOST_NODE_PARAMS, sizeof(__pyx_k_CUDA_HOST_NODE_PARAMS), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_HOST_NODE_PARAMS_st, __pyx_k_CUDA_HOST_NODE_PARAMS_st, sizeof(__pyx_k_CUDA_HOST_NODE_PARAMS_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_HOST_NODE_PARAMS_st___reduc, __pyx_k_CUDA_HOST_NODE_PARAMS_st___reduc, sizeof(__pyx_k_CUDA_HOST_NODE_PARAMS_st___reduc), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_HOST_NODE_PARAMS_st___setst, __pyx_k_CUDA_HOST_NODE_PARAMS_st___setst, sizeof(__pyx_k_CUDA_HOST_NODE_PARAMS_st___setst), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_HOST_NODE_PARAMS_st_getPtr, __pyx_k_CUDA_HOST_NODE_PARAMS_st_getPtr, sizeof(__pyx_k_CUDA_HOST_NODE_PARAMS_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_HOST_NODE_PARAMS_v1, __pyx_k_CUDA_HOST_NODE_PARAMS_v1, sizeof(__pyx_k_CUDA_HOST_NODE_PARAMS_v1), 0, 0, 1, 1},
  {&__pyx_kp_s_CUDA_Ipc_Mem_Flags, __pyx_k_CUDA_Ipc_Mem_Flags, sizeof(__pyx_k_CUDA_Ipc_Mem_Flags), 0, 0, 1, 0},
  {&__pyx_n_s_CUDA_KERNEL_NODE_PARAMS, __pyx_k_CUDA_KERNEL_NODE_PARAMS, sizeof(__pyx_k_CUDA_KERNEL_NODE_PARAMS), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_KERNEL_NODE_PARAMS, __pyx_k_CUDA_KERNEL_NODE_PARAMS, sizeof(__pyx_k_CUDA_KERNEL_NODE_PARAMS), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_KERNEL_NODE_PARAMS_st, __pyx_k_CUDA_KERNEL_NODE_PARAMS_st, sizeof(__pyx_k_CUDA_KERNEL_NODE_PARAMS_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_KERNEL_NODE_PARAMS_st___red, __pyx_k_CUDA_KERNEL_NODE_PARAMS_st___red, sizeof(__pyx_k_CUDA_KERNEL_NODE_PARAMS_st___red), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_KERNEL_NODE_PARAMS_st___set, __pyx_k_CUDA_KERNEL_NODE_PARAMS_st___set, sizeof(__pyx_k_CUDA_KERNEL_NODE_PARAMS_st___set), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_KERNEL_NODE_PARAMS_st_getPt, __pyx_k_CUDA_KERNEL_NODE_PARAMS_st_getPt, sizeof(__pyx_k_CUDA_KERNEL_NODE_PARAMS_st_getPt), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_KERNEL_NODE_PARAMS_v1, __pyx_k_CUDA_KERNEL_NODE_PARAMS_v1, sizeof(__pyx_k_CUDA_KERNEL_NODE_PARAMS_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_LAUNCH_PARAMS, __pyx_k_CUDA_LAUNCH_PARAMS, sizeof(__pyx_k_CUDA_LAUNCH_PARAMS), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_LAUNCH_PARAMS_st, __pyx_k_CUDA_LAUNCH_PARAMS_st, sizeof(__pyx_k_CUDA_LAUNCH_PARAMS_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_LAUNCH_PARAMS_st___reduce_c, __pyx_k_CUDA_LAUNCH_PARAMS_st___reduce_c, sizeof(__pyx_k_CUDA_LAUNCH_PARAMS_st___reduce_c), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_LAUNCH_PARAMS_st___setstate, __pyx_k_CUDA_LAUNCH_PARAMS_st___setstate, sizeof(__pyx_k_CUDA_LAUNCH_PARAMS_st___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_LAUNCH_PARAMS_st_getPtr, __pyx_k_CUDA_LAUNCH_PARAMS_st_getPtr, sizeof(__pyx_k_CUDA_LAUNCH_PARAMS_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_LAUNCH_PARAMS_v1, __pyx_k_CUDA_LAUNCH_PARAMS_v1, sizeof(__pyx_k_CUDA_LAUNCH_PARAMS_v1), 0, 0, 1, 1},
  {&__pyx_kp_s_CUDA_Lazy_Loading_status, __pyx_k_CUDA_Lazy_Loading_status, sizeof(__pyx_k_CUDA_Lazy_Loading_status), 0, 0, 1, 0},
  {&__pyx_n_s_CUDA_MEMCPY2D, __pyx_k_CUDA_MEMCPY2D, sizeof(__pyx_k_CUDA_MEMCPY2D), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_MEMCPY2D, __pyx_k_CUDA_MEMCPY2D, sizeof(__pyx_k_CUDA_MEMCPY2D), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_MEMCPY2D_st, __pyx_k_CUDA_MEMCPY2D_st, sizeof(__pyx_k_CUDA_MEMCPY2D_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY2D_st___reduce_cython, __pyx_k_CUDA_MEMCPY2D_st___reduce_cython, sizeof(__pyx_k_CUDA_MEMCPY2D_st___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY2D_st___setstate_cyth, __pyx_k_CUDA_MEMCPY2D_st___setstate_cyth, sizeof(__pyx_k_CUDA_MEMCPY2D_st___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY2D_st_getPtr, __pyx_k_CUDA_MEMCPY2D_st_getPtr, sizeof(__pyx_k_CUDA_MEMCPY2D_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY2D_v2, __pyx_k_CUDA_MEMCPY2D_v2, sizeof(__pyx_k_CUDA_MEMCPY2D_v2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY3D, __pyx_k_CUDA_MEMCPY3D, sizeof(__pyx_k_CUDA_MEMCPY3D), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_MEMCPY3D, __pyx_k_CUDA_MEMCPY3D, sizeof(__pyx_k_CUDA_MEMCPY3D), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_MEMCPY3D_PEER, __pyx_k_CUDA_MEMCPY3D_PEER, sizeof(__pyx_k_CUDA_MEMCPY3D_PEER), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_MEMCPY3D_PEER, __pyx_k_CUDA_MEMCPY3D_PEER, sizeof(__pyx_k_CUDA_MEMCPY3D_PEER), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_MEMCPY3D_PEER_st, __pyx_k_CUDA_MEMCPY3D_PEER_st, sizeof(__pyx_k_CUDA_MEMCPY3D_PEER_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY3D_PEER_st___reduce_c, __pyx_k_CUDA_MEMCPY3D_PEER_st___reduce_c, sizeof(__pyx_k_CUDA_MEMCPY3D_PEER_st___reduce_c), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY3D_PEER_st___setstate, __pyx_k_CUDA_MEMCPY3D_PEER_st___setstate, sizeof(__pyx_k_CUDA_MEMCPY3D_PEER_st___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY3D_PEER_st_getPtr, __pyx_k_CUDA_MEMCPY3D_PEER_st_getPtr, sizeof(__pyx_k_CUDA_MEMCPY3D_PEER_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY3D_PEER_v1, __pyx_k_CUDA_MEMCPY3D_PEER_v1, sizeof(__pyx_k_CUDA_MEMCPY3D_PEER_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY3D_st, __pyx_k_CUDA_MEMCPY3D_st, sizeof(__pyx_k_CUDA_MEMCPY3D_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY3D_st___reduce_cython, __pyx_k_CUDA_MEMCPY3D_st___reduce_cython, sizeof(__pyx_k_CUDA_MEMCPY3D_st___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY3D_st___setstate_cyth, __pyx_k_CUDA_MEMCPY3D_st___setstate_cyth, sizeof(__pyx_k_CUDA_MEMCPY3D_st___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY3D_st_getPtr, __pyx_k_CUDA_MEMCPY3D_st_getPtr, sizeof(__pyx_k_CUDA_MEMCPY3D_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMCPY3D_v2, __pyx_k_CUDA_MEMCPY3D_v2, sizeof(__pyx_k_CUDA_MEMCPY3D_v2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMSET_NODE_PARAMS, __pyx_k_CUDA_MEMSET_NODE_PARAMS, sizeof(__pyx_k_CUDA_MEMSET_NODE_PARAMS), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_MEMSET_NODE_PARAMS, __pyx_k_CUDA_MEMSET_NODE_PARAMS, sizeof(__pyx_k_CUDA_MEMSET_NODE_PARAMS), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_MEMSET_NODE_PARAMS_st, __pyx_k_CUDA_MEMSET_NODE_PARAMS_st, sizeof(__pyx_k_CUDA_MEMSET_NODE_PARAMS_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMSET_NODE_PARAMS_st___red, __pyx_k_CUDA_MEMSET_NODE_PARAMS_st___red, sizeof(__pyx_k_CUDA_MEMSET_NODE_PARAMS_st___red), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMSET_NODE_PARAMS_st___set, __pyx_k_CUDA_MEMSET_NODE_PARAMS_st___set, sizeof(__pyx_k_CUDA_MEMSET_NODE_PARAMS_st___set), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMSET_NODE_PARAMS_st_getPt, __pyx_k_CUDA_MEMSET_NODE_PARAMS_st_getPt, sizeof(__pyx_k_CUDA_MEMSET_NODE_PARAMS_st_getPt), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEMSET_NODE_PARAMS_v1, __pyx_k_CUDA_MEMSET_NODE_PARAMS_v1, sizeof(__pyx_k_CUDA_MEMSET_NODE_PARAMS_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS, __pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS, sizeof(__pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_MEM_ALLOC_NODE_PARAMS, __pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS, sizeof(__pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS_st, __pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS_st, sizeof(__pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS_st_2, __pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS_st_2, sizeof(__pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS_st_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS_st_3, __pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS_st_3, sizeof(__pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS_st_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS_st_ge, __pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS_st_ge, sizeof(__pyx_k_CUDA_MEM_ALLOC_NODE_PARAMS_st_ge), 0, 0, 1, 1},
  {&__pyx_kp_s_CUDA_Mem_Attach_Flags, __pyx_k_CUDA_Mem_Attach_Flags, sizeof(__pyx_k_CUDA_Mem_Attach_Flags), 0, 0, 1, 0},
  {&__pyx_n_s_CUDA_NVSCISYNC_ATTR_SIGNAL, __pyx_k_CUDA_NVSCISYNC_ATTR_SIGNAL, sizeof(__pyx_k_CUDA_NVSCISYNC_ATTR_SIGNAL), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_NVSCISYNC_ATTR_WAIT, __pyx_k_CUDA_NVSCISYNC_ATTR_WAIT, sizeof(__pyx_k_CUDA_NVSCISYNC_ATTR_WAIT), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_POINTER_ATTRIBUTE_ACCESS_FL, __pyx_k_CUDA_POINTER_ATTRIBUTE_ACCESS_FL, sizeof(__pyx_k_CUDA_POINTER_ATTRIBUTE_ACCESS_FL), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN, __pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN, sizeof(__pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_2, __pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_2, sizeof(__pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_3, __pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_3, sizeof(__pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_4, __pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_4, sizeof(__pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_5, __pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_5, sizeof(__pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_6, __pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_6, sizeof(__pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC, __pyx_k_CUDA_RESOURCE_DESC, sizeof(__pyx_k_CUDA_RESOURCE_DESC), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_RESOURCE_DESC, __pyx_k_CUDA_RESOURCE_DESC, sizeof(__pyx_k_CUDA_RESOURCE_DESC), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_st, __pyx_k_CUDA_RESOURCE_DESC_st, sizeof(__pyx_k_CUDA_RESOURCE_DESC_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_st___reduce_c, __pyx_k_CUDA_RESOURCE_DESC_st___reduce_c, sizeof(__pyx_k_CUDA_RESOURCE_DESC_st___reduce_c), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_st___setstate, __pyx_k_CUDA_RESOURCE_DESC_st___setstate, sizeof(__pyx_k_CUDA_RESOURCE_DESC_st___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_st_getPtr, __pyx_k_CUDA_RESOURCE_DESC_st_getPtr, sizeof(__pyx_k_CUDA_RESOURCE_DESC_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1, __pyx_k_CUDA_RESOURCE_DESC_v1, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_10, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_10, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_10), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_11, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_11, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_11), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_12, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_12, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_12), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_13, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_13, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_13), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_14, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_14, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_14), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_15, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_15, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_15), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_16, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_16, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_16), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_17, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_17, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_17), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_18, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_18, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_18), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_19, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_19, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_19), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_2, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_2, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_20, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_20, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_20), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_21, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_21, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_21), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_22, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_22, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_22), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_23, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_23, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_23), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_24, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_24, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_24), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_3, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_3, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_4, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_4, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_5, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_5, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_6, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_6, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_7, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_7, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_7), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_8, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_8, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_8), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_9, __pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_9, sizeof(__pyx_k_CUDA_RESOURCE_DESC_v1_CUDA_RESO_9), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_VIEW_DESC, __pyx_k_CUDA_RESOURCE_VIEW_DESC, sizeof(__pyx_k_CUDA_RESOURCE_VIEW_DESC), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_RESOURCE_VIEW_DESC, __pyx_k_CUDA_RESOURCE_VIEW_DESC, sizeof(__pyx_k_CUDA_RESOURCE_VIEW_DESC), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_RESOURCE_VIEW_DESC_st, __pyx_k_CUDA_RESOURCE_VIEW_DESC_st, sizeof(__pyx_k_CUDA_RESOURCE_VIEW_DESC_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_VIEW_DESC_st___red, __pyx_k_CUDA_RESOURCE_VIEW_DESC_st___red, sizeof(__pyx_k_CUDA_RESOURCE_VIEW_DESC_st___red), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_VIEW_DESC_st___set, __pyx_k_CUDA_RESOURCE_VIEW_DESC_st___set, sizeof(__pyx_k_CUDA_RESOURCE_VIEW_DESC_st___set), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_VIEW_DESC_st_getPt, __pyx_k_CUDA_RESOURCE_VIEW_DESC_st_getPt, sizeof(__pyx_k_CUDA_RESOURCE_VIEW_DESC_st_getPt), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_RESOURCE_VIEW_DESC_v1, __pyx_k_CUDA_RESOURCE_VIEW_DESC_v1, sizeof(__pyx_k_CUDA_RESOURCE_VIEW_DESC_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_SUCCESS, __pyx_k_CUDA_SUCCESS, sizeof(__pyx_k_CUDA_SUCCESS), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_TEXTURE_DESC, __pyx_k_CUDA_TEXTURE_DESC, sizeof(__pyx_k_CUDA_TEXTURE_DESC), 0, 0, 1, 1},
  {&__pyx_n_u_CUDA_TEXTURE_DESC, __pyx_k_CUDA_TEXTURE_DESC, sizeof(__pyx_k_CUDA_TEXTURE_DESC), 0, 1, 0, 1},
  {&__pyx_n_s_CUDA_TEXTURE_DESC_st, __pyx_k_CUDA_TEXTURE_DESC_st, sizeof(__pyx_k_CUDA_TEXTURE_DESC_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_TEXTURE_DESC_st___reduce_cy, __pyx_k_CUDA_TEXTURE_DESC_st___reduce_cy, sizeof(__pyx_k_CUDA_TEXTURE_DESC_st___reduce_cy), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_TEXTURE_DESC_st___setstate, __pyx_k_CUDA_TEXTURE_DESC_st___setstate, sizeof(__pyx_k_CUDA_TEXTURE_DESC_st___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_TEXTURE_DESC_st_getPtr, __pyx_k_CUDA_TEXTURE_DESC_st_getPtr, sizeof(__pyx_k_CUDA_TEXTURE_DESC_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_TEXTURE_DESC_v1, __pyx_k_CUDA_TEXTURE_DESC_v1, sizeof(__pyx_k_CUDA_TEXTURE_DESC_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUDA_VERSION, __pyx_k_CUDA_VERSION, sizeof(__pyx_k_CUDA_VERSION), 0, 0, 1, 1},
  {&__pyx_kp_s_CUDA_devices_corresponding_to_a, __pyx_k_CUDA_devices_corresponding_to_a, sizeof(__pyx_k_CUDA_devices_corresponding_to_a), 0, 0, 1, 0},
  {&__pyx_kp_s_CUDA_memory_pool_attributes, __pyx_k_CUDA_memory_pool_attributes, sizeof(__pyx_k_CUDA_memory_pool_attributes), 0, 0, 1, 0},
  {&__pyx_n_s_CUGLDeviceList, __pyx_k_CUGLDeviceList, sizeof(__pyx_k_CUGLDeviceList), 0, 0, 1, 1},
  {&__pyx_n_s_CUGLmap_flags, __pyx_k_CUGLmap_flags, sizeof(__pyx_k_CUGLmap_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUGPUDirectRDMAWritesOrdering, __pyx_k_CUGPUDirectRDMAWritesOrdering, sizeof(__pyx_k_CUGPUDirectRDMAWritesOrdering), 0, 0, 1, 1},
  {&__pyx_n_s_CU_ACCESS_PROPERTY_NORMAL, __pyx_k_CU_ACCESS_PROPERTY_NORMAL, sizeof(__pyx_k_CU_ACCESS_PROPERTY_NORMAL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_ACCESS_PROPERTY_PERSISTING, __pyx_k_CU_ACCESS_PROPERTY_PERSISTING, sizeof(__pyx_k_CU_ACCESS_PROPERTY_PERSISTING), 0, 0, 1, 1},
  {&__pyx_n_s_CU_ACCESS_PROPERTY_STREAMING, __pyx_k_CU_ACCESS_PROPERTY_STREAMING, sizeof(__pyx_k_CU_ACCESS_PROPERTY_STREAMING), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC1_UNORM, __pyx_k_CU_AD_FORMAT_BC1_UNORM, sizeof(__pyx_k_CU_AD_FORMAT_BC1_UNORM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC1_UNORM_SRGB, __pyx_k_CU_AD_FORMAT_BC1_UNORM_SRGB, sizeof(__pyx_k_CU_AD_FORMAT_BC1_UNORM_SRGB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC2_UNORM, __pyx_k_CU_AD_FORMAT_BC2_UNORM, sizeof(__pyx_k_CU_AD_FORMAT_BC2_UNORM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC2_UNORM_SRGB, __pyx_k_CU_AD_FORMAT_BC2_UNORM_SRGB, sizeof(__pyx_k_CU_AD_FORMAT_BC2_UNORM_SRGB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC3_UNORM, __pyx_k_CU_AD_FORMAT_BC3_UNORM, sizeof(__pyx_k_CU_AD_FORMAT_BC3_UNORM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC3_UNORM_SRGB, __pyx_k_CU_AD_FORMAT_BC3_UNORM_SRGB, sizeof(__pyx_k_CU_AD_FORMAT_BC3_UNORM_SRGB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC4_SNORM, __pyx_k_CU_AD_FORMAT_BC4_SNORM, sizeof(__pyx_k_CU_AD_FORMAT_BC4_SNORM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC4_UNORM, __pyx_k_CU_AD_FORMAT_BC4_UNORM, sizeof(__pyx_k_CU_AD_FORMAT_BC4_UNORM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC5_SNORM, __pyx_k_CU_AD_FORMAT_BC5_SNORM, sizeof(__pyx_k_CU_AD_FORMAT_BC5_SNORM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC5_UNORM, __pyx_k_CU_AD_FORMAT_BC5_UNORM, sizeof(__pyx_k_CU_AD_FORMAT_BC5_UNORM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC6H_SF16, __pyx_k_CU_AD_FORMAT_BC6H_SF16, sizeof(__pyx_k_CU_AD_FORMAT_BC6H_SF16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC6H_UF16, __pyx_k_CU_AD_FORMAT_BC6H_UF16, sizeof(__pyx_k_CU_AD_FORMAT_BC6H_UF16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC7_UNORM, __pyx_k_CU_AD_FORMAT_BC7_UNORM, sizeof(__pyx_k_CU_AD_FORMAT_BC7_UNORM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_BC7_UNORM_SRGB, __pyx_k_CU_AD_FORMAT_BC7_UNORM_SRGB, sizeof(__pyx_k_CU_AD_FORMAT_BC7_UNORM_SRGB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_FLOAT, __pyx_k_CU_AD_FORMAT_FLOAT, sizeof(__pyx_k_CU_AD_FORMAT_FLOAT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_HALF, __pyx_k_CU_AD_FORMAT_HALF, sizeof(__pyx_k_CU_AD_FORMAT_HALF), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_NV12, __pyx_k_CU_AD_FORMAT_NV12, sizeof(__pyx_k_CU_AD_FORMAT_NV12), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_SIGNED_INT16, __pyx_k_CU_AD_FORMAT_SIGNED_INT16, sizeof(__pyx_k_CU_AD_FORMAT_SIGNED_INT16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_SIGNED_INT32, __pyx_k_CU_AD_FORMAT_SIGNED_INT32, sizeof(__pyx_k_CU_AD_FORMAT_SIGNED_INT32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_SIGNED_INT8, __pyx_k_CU_AD_FORMAT_SIGNED_INT8, sizeof(__pyx_k_CU_AD_FORMAT_SIGNED_INT8), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_SNORM_INT16X1, __pyx_k_CU_AD_FORMAT_SNORM_INT16X1, sizeof(__pyx_k_CU_AD_FORMAT_SNORM_INT16X1), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_SNORM_INT16X2, __pyx_k_CU_AD_FORMAT_SNORM_INT16X2, sizeof(__pyx_k_CU_AD_FORMAT_SNORM_INT16X2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_SNORM_INT16X4, __pyx_k_CU_AD_FORMAT_SNORM_INT16X4, sizeof(__pyx_k_CU_AD_FORMAT_SNORM_INT16X4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_SNORM_INT8X1, __pyx_k_CU_AD_FORMAT_SNORM_INT8X1, sizeof(__pyx_k_CU_AD_FORMAT_SNORM_INT8X1), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_SNORM_INT8X2, __pyx_k_CU_AD_FORMAT_SNORM_INT8X2, sizeof(__pyx_k_CU_AD_FORMAT_SNORM_INT8X2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_SNORM_INT8X4, __pyx_k_CU_AD_FORMAT_SNORM_INT8X4, sizeof(__pyx_k_CU_AD_FORMAT_SNORM_INT8X4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_UNORM_INT16X1, __pyx_k_CU_AD_FORMAT_UNORM_INT16X1, sizeof(__pyx_k_CU_AD_FORMAT_UNORM_INT16X1), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_UNORM_INT16X2, __pyx_k_CU_AD_FORMAT_UNORM_INT16X2, sizeof(__pyx_k_CU_AD_FORMAT_UNORM_INT16X2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_UNORM_INT16X4, __pyx_k_CU_AD_FORMAT_UNORM_INT16X4, sizeof(__pyx_k_CU_AD_FORMAT_UNORM_INT16X4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_UNORM_INT8X1, __pyx_k_CU_AD_FORMAT_UNORM_INT8X1, sizeof(__pyx_k_CU_AD_FORMAT_UNORM_INT8X1), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_UNORM_INT8X2, __pyx_k_CU_AD_FORMAT_UNORM_INT8X2, sizeof(__pyx_k_CU_AD_FORMAT_UNORM_INT8X2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_UNORM_INT8X4, __pyx_k_CU_AD_FORMAT_UNORM_INT8X4, sizeof(__pyx_k_CU_AD_FORMAT_UNORM_INT8X4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_UNSIGNED_INT16, __pyx_k_CU_AD_FORMAT_UNSIGNED_INT16, sizeof(__pyx_k_CU_AD_FORMAT_UNSIGNED_INT16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_UNSIGNED_INT32, __pyx_k_CU_AD_FORMAT_UNSIGNED_INT32, sizeof(__pyx_k_CU_AD_FORMAT_UNSIGNED_INT32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_AD_FORMAT_UNSIGNED_INT8, __pyx_k_CU_AD_FORMAT_UNSIGNED_INT8, sizeof(__pyx_k_CU_AD_FORMAT_UNSIGNED_INT8), 0, 0, 1, 1},
  {&__pyx_n_s_CU_ARRAY_SPARSE_PROPERTIES_SINGL, __pyx_k_CU_ARRAY_SPARSE_PROPERTIES_SINGL, sizeof(__pyx_k_CU_ARRAY_SPARSE_PROPERTIES_SINGL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE, __pyx_k_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE, sizeof(__pyx_k_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_2, __pyx_k_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_2, sizeof(__pyx_k_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CLUSTER_SCHEDULING_POLICY_DEF, __pyx_k_CU_CLUSTER_SCHEDULING_POLICY_DEF, sizeof(__pyx_k_CU_CLUSTER_SCHEDULING_POLICY_DEF), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CLUSTER_SCHEDULING_POLICY_LOA, __pyx_k_CU_CLUSTER_SCHEDULING_POLICY_LOA, sizeof(__pyx_k_CU_CLUSTER_SCHEDULING_POLICY_LOA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CLUSTER_SCHEDULING_POLICY_SPR, __pyx_k_CU_CLUSTER_SCHEDULING_POLICY_SPR, sizeof(__pyx_k_CU_CLUSTER_SCHEDULING_POLICY_SPR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_COMPUTEMODE_DEFAULT, __pyx_k_CU_COMPUTEMODE_DEFAULT, sizeof(__pyx_k_CU_COMPUTEMODE_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_COMPUTEMODE_EXCLUSIVE_PROCESS, __pyx_k_CU_COMPUTEMODE_EXCLUSIVE_PROCESS, sizeof(__pyx_k_CU_COMPUTEMODE_EXCLUSIVE_PROCESS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_COMPUTEMODE_PROHIBITED, __pyx_k_CU_COMPUTEMODE_PROHIBITED, sizeof(__pyx_k_CU_COMPUTEMODE_PROHIBITED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CTX_BLOCKING_SYNC, __pyx_k_CU_CTX_BLOCKING_SYNC, sizeof(__pyx_k_CU_CTX_BLOCKING_SYNC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CTX_FLAGS_MASK, __pyx_k_CU_CTX_FLAGS_MASK, sizeof(__pyx_k_CU_CTX_FLAGS_MASK), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CTX_LMEM_RESIZE_TO_MAX, __pyx_k_CU_CTX_LMEM_RESIZE_TO_MAX, sizeof(__pyx_k_CU_CTX_LMEM_RESIZE_TO_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CTX_MAP_HOST, __pyx_k_CU_CTX_MAP_HOST, sizeof(__pyx_k_CU_CTX_MAP_HOST), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CTX_SCHED_AUTO, __pyx_k_CU_CTX_SCHED_AUTO, sizeof(__pyx_k_CU_CTX_SCHED_AUTO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CTX_SCHED_BLOCKING_SYNC, __pyx_k_CU_CTX_SCHED_BLOCKING_SYNC, sizeof(__pyx_k_CU_CTX_SCHED_BLOCKING_SYNC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CTX_SCHED_MASK, __pyx_k_CU_CTX_SCHED_MASK, sizeof(__pyx_k_CU_CTX_SCHED_MASK), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CTX_SCHED_SPIN, __pyx_k_CU_CTX_SCHED_SPIN, sizeof(__pyx_k_CU_CTX_SCHED_SPIN), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CTX_SCHED_YIELD, __pyx_k_CU_CTX_SCHED_YIELD, sizeof(__pyx_k_CU_CTX_SCHED_YIELD), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CUBEMAP_FACE_NEGATIVE_X, __pyx_k_CU_CUBEMAP_FACE_NEGATIVE_X, sizeof(__pyx_k_CU_CUBEMAP_FACE_NEGATIVE_X), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CUBEMAP_FACE_NEGATIVE_Y, __pyx_k_CU_CUBEMAP_FACE_NEGATIVE_Y, sizeof(__pyx_k_CU_CUBEMAP_FACE_NEGATIVE_Y), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CUBEMAP_FACE_NEGATIVE_Z, __pyx_k_CU_CUBEMAP_FACE_NEGATIVE_Z, sizeof(__pyx_k_CU_CUBEMAP_FACE_NEGATIVE_Z), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CUBEMAP_FACE_POSITIVE_X, __pyx_k_CU_CUBEMAP_FACE_POSITIVE_X, sizeof(__pyx_k_CU_CUBEMAP_FACE_POSITIVE_X), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CUBEMAP_FACE_POSITIVE_Y, __pyx_k_CU_CUBEMAP_FACE_POSITIVE_Y, sizeof(__pyx_k_CU_CUBEMAP_FACE_POSITIVE_Y), 0, 0, 1, 1},
  {&__pyx_n_s_CU_CUBEMAP_FACE_POSITIVE_Z, __pyx_k_CU_CUBEMAP_FACE_POSITIVE_Z, sizeof(__pyx_k_CU_CUBEMAP_FACE_POSITIVE_Z), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE, __pyx_k_CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_FLUSH_RE, __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_FLUSH_RE, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CAN_FLUSH_RE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST, __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GA, __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GA, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_64_B, __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_64_B, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_64_B), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_64_B_2, __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_64_B_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_64_B_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_HOST, __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_HOST, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_HOST), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE, __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE_2, __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE_3, __pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE_3, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CLOCK_RATE, __pyx_k_CU_DEVICE_ATTRIBUTE_CLOCK_RATE, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CLOCK_RATE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CLUSTER_LAUN, __pyx_k_CU_DEVICE_ATTRIBUTE_CLUSTER_LAUN, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CLUSTER_LAUN), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPA, __pyx_k_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPA, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPA_2, __pyx_k_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPA_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPA_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_COMPUTE_MODE, __pyx_k_CU_DEVICE_ATTRIBUTE_COMPUTE_MODE, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_COMPUTE_MODE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_COMPUTE_PREE, __pyx_k_CU_DEVICE_ATTRIBUTE_COMPUTE_PREE, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_COMPUTE_PREE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CONCURRENT_K, __pyx_k_CU_DEVICE_ATTRIBUTE_CONCURRENT_K, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CONCURRENT_K), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_CONCURRENT_M, __pyx_k_CU_DEVICE_ATTRIBUTE_CONCURRENT_M, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_CONCURRENT_M), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_COOPERATIVE, __pyx_k_CU_DEVICE_ATTRIBUTE_COOPERATIVE, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_COOPERATIVE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_COOPERATIVE_2, __pyx_k_CU_DEVICE_ATTRIBUTE_COOPERATIVE_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_COOPERATIVE_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_DEFERRED_MAP, __pyx_k_CU_DEVICE_ATTRIBUTE_DEFERRED_MAP, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_DEFERRED_MAP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_DIRECT_MANAG, __pyx_k_CU_DEVICE_ATTRIBUTE_DIRECT_MANAG, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_DIRECT_MANAG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPP, __pyx_k_CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPP, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_ECC_ENABLED, __pyx_k_CU_DEVICE_ATTRIBUTE_ECC_ENABLED, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_ECC_ENABLED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_GENERIC_COMP, __pyx_k_CU_DEVICE_ATTRIBUTE_GENERIC_COMP, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_GENERIC_COMP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CA, __pyx_k_CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CA, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_GLOBAL_MEMOR, __pyx_k_CU_DEVICE_ATTRIBUTE_GLOBAL_MEMOR, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_GLOBAL_MEMOR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R, __pyx_k_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_2, __pyx_k_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_3, __pyx_k_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_3, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_4, __pyx_k_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_4, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, __pyx_k_CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_GPU_OVERLAP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE, __pyx_k_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_2, __pyx_k_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_3, __pyx_k_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_3, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_HOST_NATIVE, __pyx_k_CU_DEVICE_ATTRIBUTE_HOST_NATIVE, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_HOST_NATIVE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_HOST_REGISTE, __pyx_k_CU_DEVICE_ATTRIBUTE_HOST_REGISTE, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_HOST_REGISTE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_INTEGRATED, __pyx_k_CU_DEVICE_ATTRIBUTE_INTEGRATED, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_INTEGRATED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_KERNEL_EXEC, __pyx_k_CU_DEVICE_ATTRIBUTE_KERNEL_EXEC, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_KERNEL_EXEC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZ, __pyx_k_CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZ, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZ), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_LOCAL_L1_CAC, __pyx_k_CU_DEVICE_ATTRIBUTE_LOCAL_L1_CAC, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_LOCAL_L1_CAC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MANAGED_MEMO, __pyx_k_CU_DEVICE_ATTRIBUTE_MANAGED_MEMO, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MANAGED_MEMO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_10, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_10, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_10), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_11, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_11, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_11), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_12, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_12, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_12), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_13, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_13, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_13), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_14, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_14, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_14), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_2, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_3, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_3, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_4, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_4, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_5, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_5, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_5), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_6, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_6, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_6), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_7, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_7, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_7), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_8, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_8, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_8), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_9, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_9, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_9), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_10, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_10, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_10), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_11, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_11, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_11), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_12, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_12, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_12), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_13, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_13, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_13), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_14, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_14, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_14), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_15, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_15, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_15), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_16, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_16, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_17, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_17, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_17), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_18, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_18, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_18), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_19, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_19, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_19), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_2, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_20, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_20, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_20), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_21, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_21, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_21), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_22, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_22, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_22), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_23, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_23, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_23), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_24, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_24, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_24), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_25, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_25, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_25), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_26, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_26, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_26), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_27, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_27, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_27), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_28, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_28, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_28), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_29, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_29, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_29), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_3, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_3, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_4, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_4, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_5, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_5, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_5), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_6, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_6, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_6), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_7, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_7, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_7), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_8, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_8, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_8), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_9, __pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_9, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_9), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_ACCESS_P, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_ACCESS_P, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_ACCESS_P), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_P, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_P, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_P), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI_2, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI_3, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI_3, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_2, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_3, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_3, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_PERSISTI, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_PERSISTI, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_PERSISTI), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_PITCH, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_PITCH, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_PITCH), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_REGISTER, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_REGISTER, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_REGISTER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_REGISTER_2, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_REGISTER_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_REGISTER_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M_2, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M_3, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M_3, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_THREADS, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_THREADS, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_THREADS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_THREADS_2, __pyx_k_CU_DEVICE_ATTRIBUTE_MAX_THREADS_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MAX_THREADS_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK, __pyx_k_CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MEMORY_POOLS, __pyx_k_CU_DEVICE_ATTRIBUTE_MEMORY_POOLS, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MEMORY_POOLS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPP, __pyx_k_CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPP, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MULTIPROCESS, __pyx_k_CU_DEVICE_ATTRIBUTE_MULTIPROCESS, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MULTIPROCESS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BO, __pyx_k_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BO, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BO_2, __pyx_k_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BO_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BO_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEM, __pyx_k_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEM, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEM_2, __pyx_k_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEM_2, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEM_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, __pyx_k_CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_PCI_BUS_ID), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_PCI_DEVICE_I, __pyx_k_CU_DEVICE_ATTRIBUTE_PCI_DEVICE_I, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_PCI_DEVICE_I), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_I, __pyx_k_CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_I, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_I), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_READ_ONLY_HO, __pyx_k_CU_DEVICE_ATTRIBUTE_READ_ONLY_HO, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_READ_ONLY_HO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_REGISTERS_PE, __pyx_k_CU_DEVICE_ATTRIBUTE_REGISTERS_PE, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_REGISTERS_PE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_RESERVED_SHA, __pyx_k_CU_DEVICE_ATTRIBUTE_RESERVED_SHA, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_RESERVED_SHA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_SHARED_MEMOR, __pyx_k_CU_DEVICE_ATTRIBUTE_SHARED_MEMOR, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_SHARED_MEMOR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_SINGLE_TO_DO, __pyx_k_CU_DEVICE_ATTRIBUTE_SINGLE_TO_DO, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_SINGLE_TO_DO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_SPARSE_CUDA, __pyx_k_CU_DEVICE_ATTRIBUTE_SPARSE_CUDA, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_SPARSE_CUDA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_STREAM_PRIOR, __pyx_k_CU_DEVICE_ATTRIBUTE_STREAM_PRIOR, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_STREAM_PRIOR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_SURFACE_ALIG, __pyx_k_CU_DEVICE_ATTRIBUTE_SURFACE_ALIG, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_SURFACE_ALIG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_TCC_DRIVER, __pyx_k_CU_DEVICE_ATTRIBUTE_TCC_DRIVER, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_TCC_DRIVER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_TEXTURE_ALIG, __pyx_k_CU_DEVICE_ATTRIBUTE_TEXTURE_ALIG, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_TEXTURE_ALIG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_TEXTURE_PITC, __pyx_k_CU_DEVICE_ATTRIBUTE_TEXTURE_PITC, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_TEXTURE_PITC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_TIMELINE_SEM, __pyx_k_CU_DEVICE_ATTRIBUTE_TIMELINE_SEM, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_TIMELINE_SEM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_TOTAL_CONSTA, __pyx_k_CU_DEVICE_ATTRIBUTE_TOTAL_CONSTA, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_TOTAL_CONSTA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_UNIFIED_ADDR, __pyx_k_CU_DEVICE_ATTRIBUTE_UNIFIED_ADDR, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_UNIFIED_ADDR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDR, __pyx_k_CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDR, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMO, __pyx_k_CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMO, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_ATTRIBUTE_WARP_SIZE, __pyx_k_CU_DEVICE_ATTRIBUTE_WARP_SIZE, sizeof(__pyx_k_CU_DEVICE_ATTRIBUTE_WARP_SIZE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_CPU, __pyx_k_CU_DEVICE_CPU, sizeof(__pyx_k_CU_DEVICE_CPU), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_INVALID, __pyx_k_CU_DEVICE_INVALID, sizeof(__pyx_k_CU_DEVICE_INVALID), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_A, __pyx_k_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_A, sizeof(__pyx_k_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_A), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_S, __pyx_k_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_S, sizeof(__pyx_k_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_S), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARR, __pyx_k_CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARR, sizeof(__pyx_k_CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_NATIVE_A, __pyx_k_CU_DEVICE_P2P_ATTRIBUTE_NATIVE_A, sizeof(__pyx_k_CU_DEVICE_P2P_ATTRIBUTE_NATIVE_A), 0, 0, 1, 1},
  {&__pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_PERFORMA, __pyx_k_CU_DEVICE_P2P_ATTRIBUTE_PERFORMA, sizeof(__pyx_k_CU_DEVICE_P2P_ATTRIBUTE_PERFORMA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_A, __pyx_k_CU_EGL_COLOR_FORMAT_A, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_A), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_ABGR, __pyx_k_CU_EGL_COLOR_FORMAT_ABGR, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_ABGR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_ARGB, __pyx_k_CU_EGL_COLOR_FORMAT_ARGB, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_ARGB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_AYUV, __pyx_k_CU_EGL_COLOR_FORMAT_AYUV, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_AYUV), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_AYUV_ER, __pyx_k_CU_EGL_COLOR_FORMAT_AYUV_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_AYUV_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_BGGR, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_BGGR, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_BGGR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_CCCC, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_CCCC, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_CCCC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_GBRG, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_GBRG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_GBRG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_GRBG, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_GRBG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_GRBG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_RGGB, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_RGGB, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER10_RGGB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_BCCR, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_BCCR, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_BCCR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_BGGR, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_BGGR, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_BGGR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_CBRC, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_CBRC, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_CBRC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_CCCC, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_CCCC, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_CCCC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_CRBC, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_CRBC, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_CRBC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_GBRG, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_GBRG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_GBRG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_GRBG, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_GRBG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_GRBG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_RCCB, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_RCCB, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_RCCB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_RGGB, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_RGGB, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER12_RGGB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER14_BGGR, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER14_BGGR, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER14_BGGR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER14_GBRG, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER14_GBRG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER14_GBRG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER14_GRBG, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER14_GRBG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER14_GRBG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER14_RGGB, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER14_RGGB, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER14_RGGB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER20_BGGR, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER20_BGGR, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER20_BGGR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER20_GBRG, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER20_GBRG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER20_GBRG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER20_GRBG, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER20_GRBG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER20_GRBG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER20_RGGB, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER20_RGGB, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER20_RGGB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_BCCR, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_BCCR, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER_BCCR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_BGGR, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_BGGR, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER_BGGR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_CBRC, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_CBRC, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER_CBRC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_CRBC, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_CRBC, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER_CRBC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_GBRG, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_GBRG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER_GBRG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_GRBG, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_GRBG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER_GRBG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_ISP_BG, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_ISP_BG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER_ISP_BG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_ISP_GB, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_ISP_GB, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER_ISP_GB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_ISP_GR, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_ISP_GR, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER_ISP_GR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_ISP_RG, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_ISP_RG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER_ISP_RG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_RCCB, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_RCCB, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER_RCCB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_RGGB, __pyx_k_CU_EGL_COLOR_FORMAT_BAYER_RGGB, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BAYER_RGGB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BGR, __pyx_k_CU_EGL_COLOR_FORMAT_BGR, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BGR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_BGRA, __pyx_k_CU_EGL_COLOR_FORMAT_BGRA, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_BGRA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_L, __pyx_k_CU_EGL_COLOR_FORMAT_L, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_L), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_MAX, __pyx_k_CU_EGL_COLOR_FORMAT_MAX, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_R, __pyx_k_CU_EGL_COLOR_FORMAT_R, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_R), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_RG, __pyx_k_CU_EGL_COLOR_FORMAT_RG, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_RG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_RGB, __pyx_k_CU_EGL_COLOR_FORMAT_RGB, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_RGB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_RGBA, __pyx_k_CU_EGL_COLOR_FORMAT_RGBA, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_RGBA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_UYVY_422, __pyx_k_CU_EGL_COLOR_FORMAT_UYVY_422, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_UYVY_422), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_UYVY_ER, __pyx_k_CU_EGL_COLOR_FORMAT_UYVY_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_UYVY_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_VYUY, __pyx_k_CU_EGL_COLOR_FORMAT_VYUY, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_VYUY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_VYUY_ER, __pyx_k_CU_EGL_COLOR_FORMAT_VYUY_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_VYUY_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y, __pyx_k_CU_EGL_COLOR_FORMAT_Y, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42, __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_2, __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_3, __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_3, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_4, __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_4, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_5, __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_5, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_5), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_6, __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_6, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_6), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_7, __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_7, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_7), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_8, __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_8, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_42_8), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_44, __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_44, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_44), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_44_2, __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_44_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_44_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_44_3, __pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_44_3, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10V10U10_44_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10_709_ER, __pyx_k_CU_EGL_COLOR_FORMAT_Y10_709_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10_709_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y10_ER, __pyx_k_CU_EGL_COLOR_FORMAT_Y10_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y10_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_42, __pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_42, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_42), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_42_2, __pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_42_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_42_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_42_3, __pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_42_3, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_42_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_44, __pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_44, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_44), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_44_2, __pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_44_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_44_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_44_3, __pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_44_3, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y12V12U12_44_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12_709_ER, __pyx_k_CU_EGL_COLOR_FORMAT_Y12_709_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y12_709_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y12_ER, __pyx_k_CU_EGL_COLOR_FORMAT_Y12_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y12_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV, __pyx_k_CU_EGL_COLOR_FORMAT_YUV, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_PLANA, __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_PLANA, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV420_PLANA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_PLANA_2, __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_PLANA_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV420_PLANA_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_PLANA_3, __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_PLANA_3, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV420_PLANA_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_PLANA_4, __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_PLANA_4, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV420_PLANA_4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_SEMIP, __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_SEMIP, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV420_SEMIP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_2, __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_3, __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_3, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_4, __pyx_k_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_4, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV422_PLANA, __pyx_k_CU_EGL_COLOR_FORMAT_YUV422_PLANA, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV422_PLANA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV422_PLANA_2, __pyx_k_CU_EGL_COLOR_FORMAT_YUV422_PLANA_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV422_PLANA_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV422_SEMIP, __pyx_k_CU_EGL_COLOR_FORMAT_YUV422_SEMIP, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV422_SEMIP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV422_SEMIP_2, __pyx_k_CU_EGL_COLOR_FORMAT_YUV422_SEMIP_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV422_SEMIP_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV444_PLANA, __pyx_k_CU_EGL_COLOR_FORMAT_YUV444_PLANA, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV444_PLANA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV444_PLANA_2, __pyx_k_CU_EGL_COLOR_FORMAT_YUV444_PLANA_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV444_PLANA_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV444_SEMIP, __pyx_k_CU_EGL_COLOR_FORMAT_YUV444_SEMIP, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV444_SEMIP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV444_SEMIP_2, __pyx_k_CU_EGL_COLOR_FORMAT_YUV444_SEMIP_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV444_SEMIP_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUVA, __pyx_k_CU_EGL_COLOR_FORMAT_YUVA, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUVA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUVA_ER, __pyx_k_CU_EGL_COLOR_FORMAT_YUVA_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUVA_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUV_ER, __pyx_k_CU_EGL_COLOR_FORMAT_YUV_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUV_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUYV_422, __pyx_k_CU_EGL_COLOR_FORMAT_YUYV_422, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUYV_422), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YUYV_ER, __pyx_k_CU_EGL_COLOR_FORMAT_YUYV_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YUYV_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_PLANA, __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_PLANA, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU420_PLANA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_PLANA_2, __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_PLANA_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU420_PLANA_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_PLANA_3, __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_PLANA_3, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU420_PLANA_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_PLANA_4, __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_PLANA_4, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU420_PLANA_4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_SEMIP, __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_SEMIP, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU420_SEMIP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_2, __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_3, __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_3, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_4, __pyx_k_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_4, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU422_PLANA, __pyx_k_CU_EGL_COLOR_FORMAT_YVU422_PLANA, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU422_PLANA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU422_PLANA_2, __pyx_k_CU_EGL_COLOR_FORMAT_YVU422_PLANA_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU422_PLANA_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU422_SEMIP, __pyx_k_CU_EGL_COLOR_FORMAT_YVU422_SEMIP, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU422_SEMIP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU422_SEMIP_2, __pyx_k_CU_EGL_COLOR_FORMAT_YVU422_SEMIP_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU422_SEMIP_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU444_PLANA, __pyx_k_CU_EGL_COLOR_FORMAT_YVU444_PLANA, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU444_PLANA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU444_PLANA_2, __pyx_k_CU_EGL_COLOR_FORMAT_YVU444_PLANA_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU444_PLANA_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU444_SEMIP, __pyx_k_CU_EGL_COLOR_FORMAT_YVU444_SEMIP, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU444_SEMIP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVU444_SEMIP_2, __pyx_k_CU_EGL_COLOR_FORMAT_YVU444_SEMIP_2, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVU444_SEMIP_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVYU, __pyx_k_CU_EGL_COLOR_FORMAT_YVYU, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVYU), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_YVYU_ER, __pyx_k_CU_EGL_COLOR_FORMAT_YVYU_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_YVYU_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y_709_ER, __pyx_k_CU_EGL_COLOR_FORMAT_Y_709_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y_709_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_COLOR_FORMAT_Y_ER, __pyx_k_CU_EGL_COLOR_FORMAT_Y_ER, sizeof(__pyx_k_CU_EGL_COLOR_FORMAT_Y_ER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_FRAME_TYPE_ARRAY, __pyx_k_CU_EGL_FRAME_TYPE_ARRAY, sizeof(__pyx_k_CU_EGL_FRAME_TYPE_ARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_FRAME_TYPE_PITCH, __pyx_k_CU_EGL_FRAME_TYPE_PITCH, sizeof(__pyx_k_CU_EGL_FRAME_TYPE_PITCH), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_RESOURCE_LOCATION_SYSMEM, __pyx_k_CU_EGL_RESOURCE_LOCATION_SYSMEM, sizeof(__pyx_k_CU_EGL_RESOURCE_LOCATION_SYSMEM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EGL_RESOURCE_LOCATION_VIDMEM, __pyx_k_CU_EGL_RESOURCE_LOCATION_VIDMEM, sizeof(__pyx_k_CU_EGL_RESOURCE_LOCATION_VIDMEM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EVENT_BLOCKING_SYNC, __pyx_k_CU_EVENT_BLOCKING_SYNC, sizeof(__pyx_k_CU_EVENT_BLOCKING_SYNC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EVENT_DEFAULT, __pyx_k_CU_EVENT_DEFAULT, sizeof(__pyx_k_CU_EVENT_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EVENT_DISABLE_TIMING, __pyx_k_CU_EVENT_DISABLE_TIMING, sizeof(__pyx_k_CU_EVENT_DISABLE_TIMING), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EVENT_INTERPROCESS, __pyx_k_CU_EVENT_INTERPROCESS, sizeof(__pyx_k_CU_EVENT_INTERPROCESS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EVENT_RECORD_DEFAULT, __pyx_k_CU_EVENT_RECORD_DEFAULT, sizeof(__pyx_k_CU_EVENT_RECORD_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EVENT_RECORD_EXTERNAL, __pyx_k_CU_EVENT_RECORD_EXTERNAL, sizeof(__pyx_k_CU_EVENT_RECORD_EXTERNAL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EVENT_SCHED_AUTO, __pyx_k_CU_EVENT_SCHED_AUTO, sizeof(__pyx_k_CU_EVENT_SCHED_AUTO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EVENT_SCHED_BLOCKING_SYNC, __pyx_k_CU_EVENT_SCHED_BLOCKING_SYNC, sizeof(__pyx_k_CU_EVENT_SCHED_BLOCKING_SYNC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EVENT_SCHED_SPIN, __pyx_k_CU_EVENT_SCHED_SPIN, sizeof(__pyx_k_CU_EVENT_SCHED_SPIN), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EVENT_SCHED_YIELD, __pyx_k_CU_EVENT_SCHED_YIELD, sizeof(__pyx_k_CU_EVENT_SCHED_YIELD), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EVENT_WAIT_DEFAULT, __pyx_k_CU_EVENT_WAIT_DEFAULT, sizeof(__pyx_k_CU_EVENT_WAIT_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EVENT_WAIT_EXTERNAL, __pyx_k_CU_EVENT_WAIT_EXTERNAL, sizeof(__pyx_k_CU_EVENT_WAIT_EXTERNAL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXEC_AFFINITY_TYPE_MAX, __pyx_k_CU_EXEC_AFFINITY_TYPE_MAX, sizeof(__pyx_k_CU_EXEC_AFFINITY_TYPE_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXEC_AFFINITY_TYPE_SM_COUNT, __pyx_k_CU_EXEC_AFFINITY_TYPE_SM_COUNT, sizeof(__pyx_k_CU_EXEC_AFFINITY_TYPE_SM_COUNT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D, __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D, sizeof(__pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_2, __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_2, sizeof(__pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_3, __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_3, sizeof(__pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_4, __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_4, sizeof(__pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_N, __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_N, sizeof(__pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_N), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O, __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O, sizeof(__pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O_2, __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O_2, sizeof(__pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O_3, __pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O_3, sizeof(__pyx_k_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP, __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP, sizeof(__pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_10, __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_10, sizeof(__pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_10), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_2, __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_2, sizeof(__pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_3, __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_3, sizeof(__pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_4, __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_4, sizeof(__pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_5, __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_5, sizeof(__pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_5), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_6, __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_6, sizeof(__pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_6), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_7, __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_7, sizeof(__pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_7), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_8, __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_8, sizeof(__pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_8), 0, 0, 1, 1},
  {&__pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_9, __pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_9, sizeof(__pyx_k_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_9), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES, __pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES, sizeof(__pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_2, __pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_2, sizeof(__pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_3, __pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_3, sizeof(__pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_4, __pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_4, sizeof(__pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_5, __pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_5, sizeof(__pyx_k_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_5), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_BINARY_VERSION, __pyx_k_CU_FUNC_ATTRIBUTE_BINARY_VERSION, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_BINARY_VERSION), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_CACHE_MODE_CA, __pyx_k_CU_FUNC_ATTRIBUTE_CACHE_MODE_CA, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_CACHE_MODE_CA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDU, __pyx_k_CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDU, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDU), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_M, __pyx_k_CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_M, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_M), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_CONST_SIZE_BYT, __pyx_k_CU_FUNC_ATTRIBUTE_CONST_SIZE_BYT, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_CONST_SIZE_BYT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYT, __pyx_k_CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYT, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_MAX, __pyx_k_CU_FUNC_ATTRIBUTE_MAX, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SH, __pyx_k_CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SH, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SH), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_MAX_THREADS_PE, __pyx_k_CU_FUNC_ATTRIBUTE_MAX_THREADS_PE, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_MAX_THREADS_PE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_NON_PORTABLE_C, __pyx_k_CU_FUNC_ATTRIBUTE_NON_PORTABLE_C, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_NON_PORTABLE_C), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_NUM_REGS, __pyx_k_CU_FUNC_ATTRIBUTE_NUM_REGS, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_NUM_REGS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_PREFERRED_SHAR, __pyx_k_CU_FUNC_ATTRIBUTE_PREFERRED_SHAR, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_PREFERRED_SHAR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_PTX_VERSION, __pyx_k_CU_FUNC_ATTRIBUTE_PTX_VERSION, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_PTX_VERSION), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST, __pyx_k_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST_2, __pyx_k_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST_2, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST_3, __pyx_k_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST_3, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_ATTRIBUTE_SHARED_SIZE_BY, __pyx_k_CU_FUNC_ATTRIBUTE_SHARED_SIZE_BY, sizeof(__pyx_k_CU_FUNC_ATTRIBUTE_SHARED_SIZE_BY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_CACHE_PREFER_EQUAL, __pyx_k_CU_FUNC_CACHE_PREFER_EQUAL, sizeof(__pyx_k_CU_FUNC_CACHE_PREFER_EQUAL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_CACHE_PREFER_L1, __pyx_k_CU_FUNC_CACHE_PREFER_L1, sizeof(__pyx_k_CU_FUNC_CACHE_PREFER_L1), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_CACHE_PREFER_NONE, __pyx_k_CU_FUNC_CACHE_PREFER_NONE, sizeof(__pyx_k_CU_FUNC_CACHE_PREFER_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_FUNC_CACHE_PREFER_SHARED, __pyx_k_CU_FUNC_CACHE_PREFER_SHARED, sizeof(__pyx_k_CU_FUNC_CACHE_PREFER_SHARED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GET_PROC_ADDRESS_DEFAULT, __pyx_k_CU_GET_PROC_ADDRESS_DEFAULT, sizeof(__pyx_k_CU_GET_PROC_ADDRESS_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GET_PROC_ADDRESS_LEGACY_STREA, __pyx_k_CU_GET_PROC_ADDRESS_LEGACY_STREA, sizeof(__pyx_k_CU_GET_PROC_ADDRESS_LEGACY_STREA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GET_PROC_ADDRESS_PER_THREAD_D, __pyx_k_CU_GET_PROC_ADDRESS_PER_THREAD_D, sizeof(__pyx_k_CU_GET_PROC_ADDRESS_PER_THREAD_D), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GL_DEVICE_LIST_ALL, __pyx_k_CU_GL_DEVICE_LIST_ALL, sizeof(__pyx_k_CU_GL_DEVICE_LIST_ALL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GL_DEVICE_LIST_CURRENT_FRAME, __pyx_k_CU_GL_DEVICE_LIST_CURRENT_FRAME, sizeof(__pyx_k_CU_GL_DEVICE_LIST_CURRENT_FRAME), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GL_DEVICE_LIST_NEXT_FRAME, __pyx_k_CU_GL_DEVICE_LIST_NEXT_FRAME, sizeof(__pyx_k_CU_GL_DEVICE_LIST_NEXT_FRAME), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GL_MAP_RESOURCE_FLAGS_NONE, __pyx_k_CU_GL_MAP_RESOURCE_FLAGS_NONE, sizeof(__pyx_k_CU_GL_MAP_RESOURCE_FLAGS_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GL_MAP_RESOURCE_FLAGS_READ_ON, __pyx_k_CU_GL_MAP_RESOURCE_FLAGS_READ_ON, sizeof(__pyx_k_CU_GL_MAP_RESOURCE_FLAGS_READ_ON), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GL_MAP_RESOURCE_FLAGS_WRITE_D, __pyx_k_CU_GL_MAP_RESOURCE_FLAGS_WRITE_D, sizeof(__pyx_k_CU_GL_MAP_RESOURCE_FLAGS_WRITE_D), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GPU_DIRECT_RDMA_WRITES_ORDERI, __pyx_k_CU_GPU_DIRECT_RDMA_WRITES_ORDERI, sizeof(__pyx_k_CU_GPU_DIRECT_RDMA_WRITES_ORDERI), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GPU_DIRECT_RDMA_WRITES_ORDERI_2, __pyx_k_CU_GPU_DIRECT_RDMA_WRITES_ORDERI_2, sizeof(__pyx_k_CU_GPU_DIRECT_RDMA_WRITES_ORDERI_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GPU_DIRECT_RDMA_WRITES_ORDERI_3, __pyx_k_CU_GPU_DIRECT_RDMA_WRITES_ORDERI_3, sizeof(__pyx_k_CU_GPU_DIRECT_RDMA_WRITES_ORDERI_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPHICS_MAP_RESOURCE_FLAGS_N, __pyx_k_CU_GRAPHICS_MAP_RESOURCE_FLAGS_N, sizeof(__pyx_k_CU_GRAPHICS_MAP_RESOURCE_FLAGS_N), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPHICS_MAP_RESOURCE_FLAGS_R, __pyx_k_CU_GRAPHICS_MAP_RESOURCE_FLAGS_R, sizeof(__pyx_k_CU_GRAPHICS_MAP_RESOURCE_FLAGS_R), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPHICS_MAP_RESOURCE_FLAGS_W, __pyx_k_CU_GRAPHICS_MAP_RESOURCE_FLAGS_W, sizeof(__pyx_k_CU_GRAPHICS_MAP_RESOURCE_FLAGS_W), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_NONE, __pyx_k_CU_GRAPHICS_REGISTER_FLAGS_NONE, sizeof(__pyx_k_CU_GRAPHICS_REGISTER_FLAGS_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_READ, __pyx_k_CU_GRAPHICS_REGISTER_FLAGS_READ, sizeof(__pyx_k_CU_GRAPHICS_REGISTER_FLAGS_READ), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_SURFA, __pyx_k_CU_GRAPHICS_REGISTER_FLAGS_SURFA, sizeof(__pyx_k_CU_GRAPHICS_REGISTER_FLAGS_SURFA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_TEXTU, __pyx_k_CU_GRAPHICS_REGISTER_FLAGS_TEXTU, sizeof(__pyx_k_CU_GRAPHICS_REGISTER_FLAGS_TEXTU), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_WRITE, __pyx_k_CU_GRAPHICS_REGISTER_FLAGS_WRITE, sizeof(__pyx_k_CU_GRAPHICS_REGISTER_FLAGS_WRITE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_M, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_M, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_M), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_N, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_N, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_N), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEM, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEM, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEM_2, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEM_2, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEM_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NO, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NO, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_2, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_2, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALL, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALL, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FRE, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FRE, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FRE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE, __pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE, sizeof(__pyx_k_CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR, __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR, sizeof(__pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_ATTRI, __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_ATTRI, sizeof(__pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_ATTRI), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_FUNCT, __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_FUNCT, sizeof(__pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_FUNCT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_NODE, __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_NODE, sizeof(__pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_NODE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_NOT_S, __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_NOT_S, sizeof(__pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_NOT_S), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_PARAM, __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_PARAM, sizeof(__pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_PARAM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_TOPOL, __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_TOPOL, sizeof(__pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_TOPOL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_UNSUP, __pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_UNSUP, sizeof(__pyx_k_CU_GRAPH_EXEC_UPDATE_ERROR_UNSUP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_EXEC_UPDATE_SUCCESS, __pyx_k_CU_GRAPH_EXEC_UPDATE_SUCCESS, sizeof(__pyx_k_CU_GRAPH_EXEC_UPDATE_SUCCESS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_MEM_ATTR_RESERVED_MEM_C, __pyx_k_CU_GRAPH_MEM_ATTR_RESERVED_MEM_C, sizeof(__pyx_k_CU_GRAPH_MEM_ATTR_RESERVED_MEM_C), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_MEM_ATTR_RESERVED_MEM_H, __pyx_k_CU_GRAPH_MEM_ATTR_RESERVED_MEM_H, sizeof(__pyx_k_CU_GRAPH_MEM_ATTR_RESERVED_MEM_H), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_MEM_ATTR_USED_MEM_CURRE, __pyx_k_CU_GRAPH_MEM_ATTR_USED_MEM_CURRE, sizeof(__pyx_k_CU_GRAPH_MEM_ATTR_USED_MEM_CURRE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, __pyx_k_CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, sizeof(__pyx_k_CU_GRAPH_MEM_ATTR_USED_MEM_HIGH), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_BATCH_MEM_OP, __pyx_k_CU_GRAPH_NODE_TYPE_BATCH_MEM_OP, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_BATCH_MEM_OP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_EMPTY, __pyx_k_CU_GRAPH_NODE_TYPE_EMPTY, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_EMPTY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_EVENT_RECORD, __pyx_k_CU_GRAPH_NODE_TYPE_EVENT_RECORD, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_EVENT_RECORD), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIG, __pyx_k_CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIG, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAI, __pyx_k_CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAI, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAI), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_GRAPH, __pyx_k_CU_GRAPH_NODE_TYPE_GRAPH, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_GRAPH), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_HOST, __pyx_k_CU_GRAPH_NODE_TYPE_HOST, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_HOST), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_KERNEL, __pyx_k_CU_GRAPH_NODE_TYPE_KERNEL, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_KERNEL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_MEMCPY, __pyx_k_CU_GRAPH_NODE_TYPE_MEMCPY, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_MEMCPY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_MEMSET, __pyx_k_CU_GRAPH_NODE_TYPE_MEMSET, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_MEMSET), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_MEM_ALLOC, __pyx_k_CU_GRAPH_NODE_TYPE_MEM_ALLOC, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_MEM_ALLOC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_MEM_FREE, __pyx_k_CU_GRAPH_NODE_TYPE_MEM_FREE, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_MEM_FREE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_NODE_TYPE_WAIT_EVENT, __pyx_k_CU_GRAPH_NODE_TYPE_WAIT_EVENT, sizeof(__pyx_k_CU_GRAPH_NODE_TYPE_WAIT_EVENT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_GRAPH_USER_OBJECT_MOVE, __pyx_k_CU_GRAPH_USER_OBJECT_MOVE, sizeof(__pyx_k_CU_GRAPH_USER_OBJECT_MOVE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_IPC_HANDLE_SIZE, __pyx_k_CU_IPC_HANDLE_SIZE, sizeof(__pyx_k_CU_IPC_HANDLE_SIZE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_IPC_MEM_LAZY_ENABLE_PEER_ACCE, __pyx_k_CU_IPC_MEM_LAZY_ENABLE_PEER_ACCE, sizeof(__pyx_k_CU_IPC_MEM_LAZY_ENABLE_PEER_ACCE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_CACHE_MODE, __pyx_k_CU_JIT_CACHE_MODE, sizeof(__pyx_k_CU_JIT_CACHE_MODE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_CACHE_OPTION_CA, __pyx_k_CU_JIT_CACHE_OPTION_CA, sizeof(__pyx_k_CU_JIT_CACHE_OPTION_CA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_CACHE_OPTION_CG, __pyx_k_CU_JIT_CACHE_OPTION_CG, sizeof(__pyx_k_CU_JIT_CACHE_OPTION_CG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_CACHE_OPTION_NONE, __pyx_k_CU_JIT_CACHE_OPTION_NONE, sizeof(__pyx_k_CU_JIT_CACHE_OPTION_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_ERROR_LOG_BUFFER, __pyx_k_CU_JIT_ERROR_LOG_BUFFER, sizeof(__pyx_k_CU_JIT_ERROR_LOG_BUFFER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_ERROR_LOG_BUFFER_SIZE_BYT, __pyx_k_CU_JIT_ERROR_LOG_BUFFER_SIZE_BYT, sizeof(__pyx_k_CU_JIT_ERROR_LOG_BUFFER_SIZE_BYT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_FALLBACK_STRATEGY, __pyx_k_CU_JIT_FALLBACK_STRATEGY, sizeof(__pyx_k_CU_JIT_FALLBACK_STRATEGY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_FAST_COMPILE, __pyx_k_CU_JIT_FAST_COMPILE, sizeof(__pyx_k_CU_JIT_FAST_COMPILE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_FMA, __pyx_k_CU_JIT_FMA, sizeof(__pyx_k_CU_JIT_FMA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_FTZ, __pyx_k_CU_JIT_FTZ, sizeof(__pyx_k_CU_JIT_FTZ), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_GENERATE_DEBUG_INFO, __pyx_k_CU_JIT_GENERATE_DEBUG_INFO, sizeof(__pyx_k_CU_JIT_GENERATE_DEBUG_INFO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_GENERATE_LINE_INFO, __pyx_k_CU_JIT_GENERATE_LINE_INFO, sizeof(__pyx_k_CU_JIT_GENERATE_LINE_INFO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_GLOBAL_SYMBOL_ADDRESSES, __pyx_k_CU_JIT_GLOBAL_SYMBOL_ADDRESSES, sizeof(__pyx_k_CU_JIT_GLOBAL_SYMBOL_ADDRESSES), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_GLOBAL_SYMBOL_COUNT, __pyx_k_CU_JIT_GLOBAL_SYMBOL_COUNT, sizeof(__pyx_k_CU_JIT_GLOBAL_SYMBOL_COUNT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_GLOBAL_SYMBOL_NAMES, __pyx_k_CU_JIT_GLOBAL_SYMBOL_NAMES, sizeof(__pyx_k_CU_JIT_GLOBAL_SYMBOL_NAMES), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_INFO_LOG_BUFFER, __pyx_k_CU_JIT_INFO_LOG_BUFFER, sizeof(__pyx_k_CU_JIT_INFO_LOG_BUFFER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_INFO_LOG_BUFFER_SIZE_BYTE, __pyx_k_CU_JIT_INFO_LOG_BUFFER_SIZE_BYTE, sizeof(__pyx_k_CU_JIT_INFO_LOG_BUFFER_SIZE_BYTE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_INPUT_CUBIN, __pyx_k_CU_JIT_INPUT_CUBIN, sizeof(__pyx_k_CU_JIT_INPUT_CUBIN), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_INPUT_FATBINARY, __pyx_k_CU_JIT_INPUT_FATBINARY, sizeof(__pyx_k_CU_JIT_INPUT_FATBINARY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_INPUT_LIBRARY, __pyx_k_CU_JIT_INPUT_LIBRARY, sizeof(__pyx_k_CU_JIT_INPUT_LIBRARY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_INPUT_NVVM, __pyx_k_CU_JIT_INPUT_NVVM, sizeof(__pyx_k_CU_JIT_INPUT_NVVM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_INPUT_OBJECT, __pyx_k_CU_JIT_INPUT_OBJECT, sizeof(__pyx_k_CU_JIT_INPUT_OBJECT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_INPUT_PTX, __pyx_k_CU_JIT_INPUT_PTX, sizeof(__pyx_k_CU_JIT_INPUT_PTX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_LOG_VERBOSE, __pyx_k_CU_JIT_LOG_VERBOSE, sizeof(__pyx_k_CU_JIT_LOG_VERBOSE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_LTO, __pyx_k_CU_JIT_LTO, sizeof(__pyx_k_CU_JIT_LTO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_MAX_REGISTERS, __pyx_k_CU_JIT_MAX_REGISTERS, sizeof(__pyx_k_CU_JIT_MAX_REGISTERS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_NEW_SM3X_OPT, __pyx_k_CU_JIT_NEW_SM3X_OPT, sizeof(__pyx_k_CU_JIT_NEW_SM3X_OPT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_NUM_INPUT_TYPES, __pyx_k_CU_JIT_NUM_INPUT_TYPES, sizeof(__pyx_k_CU_JIT_NUM_INPUT_TYPES), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_NUM_OPTIONS, __pyx_k_CU_JIT_NUM_OPTIONS, sizeof(__pyx_k_CU_JIT_NUM_OPTIONS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_OPTIMIZATION_LEVEL, __pyx_k_CU_JIT_OPTIMIZATION_LEVEL, sizeof(__pyx_k_CU_JIT_OPTIMIZATION_LEVEL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_OPTIMIZE_UNUSED_DEVICE_VA, __pyx_k_CU_JIT_OPTIMIZE_UNUSED_DEVICE_VA, sizeof(__pyx_k_CU_JIT_OPTIMIZE_UNUSED_DEVICE_VA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_PREC_DIV, __pyx_k_CU_JIT_PREC_DIV, sizeof(__pyx_k_CU_JIT_PREC_DIV), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_PREC_SQRT, __pyx_k_CU_JIT_PREC_SQRT, sizeof(__pyx_k_CU_JIT_PREC_SQRT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_REFERENCED_KERNEL_COUNT, __pyx_k_CU_JIT_REFERENCED_KERNEL_COUNT, sizeof(__pyx_k_CU_JIT_REFERENCED_KERNEL_COUNT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_REFERENCED_KERNEL_NAMES, __pyx_k_CU_JIT_REFERENCED_KERNEL_NAMES, sizeof(__pyx_k_CU_JIT_REFERENCED_KERNEL_NAMES), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_REFERENCED_VARIABLE_COUNT, __pyx_k_CU_JIT_REFERENCED_VARIABLE_COUNT, sizeof(__pyx_k_CU_JIT_REFERENCED_VARIABLE_COUNT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_REFERENCED_VARIABLE_NAMES, __pyx_k_CU_JIT_REFERENCED_VARIABLE_NAMES, sizeof(__pyx_k_CU_JIT_REFERENCED_VARIABLE_NAMES), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_TARGET, __pyx_k_CU_JIT_TARGET, sizeof(__pyx_k_CU_JIT_TARGET), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_TARGET_FROM_CUCONTEXT, __pyx_k_CU_JIT_TARGET_FROM_CUCONTEXT, sizeof(__pyx_k_CU_JIT_TARGET_FROM_CUCONTEXT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_THREADS_PER_BLOCK, __pyx_k_CU_JIT_THREADS_PER_BLOCK, sizeof(__pyx_k_CU_JIT_THREADS_PER_BLOCK), 0, 0, 1, 1},
  {&__pyx_n_s_CU_JIT_WALL_TIME, __pyx_k_CU_JIT_WALL_TIME, sizeof(__pyx_k_CU_JIT_WALL_TIME), 0, 0, 1, 1},
  {&__pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_ACCESS, __pyx_k_CU_KERNEL_NODE_ATTRIBUTE_ACCESS, sizeof(__pyx_k_CU_KERNEL_NODE_ATTRIBUTE_ACCESS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER, __pyx_k_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER, sizeof(__pyx_k_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_2, __pyx_k_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_2, sizeof(__pyx_k_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_COOPERA, __pyx_k_CU_KERNEL_NODE_ATTRIBUTE_COOPERA, sizeof(__pyx_k_CU_KERNEL_NODE_ATTRIBUTE_COOPERA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_PRIORIT, __pyx_k_CU_KERNEL_NODE_ATTRIBUTE_PRIORIT, sizeof(__pyx_k_CU_KERNEL_NODE_ATTRIBUTE_PRIORIT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_ATTRIBUTE_ACCESS_POLIC, __pyx_k_CU_LAUNCH_ATTRIBUTE_ACCESS_POLIC, sizeof(__pyx_k_CU_LAUNCH_ATTRIBUTE_ACCESS_POLIC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_ATTRIBUTE_CLUSTER_DIME, __pyx_k_CU_LAUNCH_ATTRIBUTE_CLUSTER_DIME, sizeof(__pyx_k_CU_LAUNCH_ATTRIBUTE_CLUSTER_DIME), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHE, __pyx_k_CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHE, sizeof(__pyx_k_CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_ATTRIBUTE_COOPERATIVE, __pyx_k_CU_LAUNCH_ATTRIBUTE_COOPERATIVE, sizeof(__pyx_k_CU_LAUNCH_ATTRIBUTE_COOPERATIVE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_ATTRIBUTE_IGNORE, __pyx_k_CU_LAUNCH_ATTRIBUTE_IGNORE, sizeof(__pyx_k_CU_LAUNCH_ATTRIBUTE_IGNORE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_ATTRIBUTE_PRIORITY, __pyx_k_CU_LAUNCH_ATTRIBUTE_PRIORITY, sizeof(__pyx_k_CU_LAUNCH_ATTRIBUTE_PRIORITY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC, __pyx_k_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC, sizeof(__pyx_k_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_2, __pyx_k_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_2, sizeof(__pyx_k_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_ATTRIBUTE_SYNCHRONIZAT, __pyx_k_CU_LAUNCH_ATTRIBUTE_SYNCHRONIZAT, sizeof(__pyx_k_CU_LAUNCH_ATTRIBUTE_SYNCHRONIZAT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_PARAM_BUFFER_POINTER, __pyx_k_CU_LAUNCH_PARAM_BUFFER_POINTER, sizeof(__pyx_k_CU_LAUNCH_PARAM_BUFFER_POINTER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_PARAM_BUFFER_POINTER_A, __pyx_k_CU_LAUNCH_PARAM_BUFFER_POINTER_A, sizeof(__pyx_k_CU_LAUNCH_PARAM_BUFFER_POINTER_A), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_PARAM_BUFFER_SIZE, __pyx_k_CU_LAUNCH_PARAM_BUFFER_SIZE, sizeof(__pyx_k_CU_LAUNCH_PARAM_BUFFER_SIZE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_I, __pyx_k_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_I, sizeof(__pyx_k_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_I), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_PARAM_END, __pyx_k_CU_LAUNCH_PARAM_END, sizeof(__pyx_k_CU_LAUNCH_PARAM_END), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LAUNCH_PARAM_END_AS_INT, __pyx_k_CU_LAUNCH_PARAM_END_AS_INT, sizeof(__pyx_k_CU_LAUNCH_PARAM_END_AS_INT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LIMIT_DEV_RUNTIME_PENDING_LAU, __pyx_k_CU_LIMIT_DEV_RUNTIME_PENDING_LAU, sizeof(__pyx_k_CU_LIMIT_DEV_RUNTIME_PENDING_LAU), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH, __pyx_k_CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH, sizeof(__pyx_k_CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LIMIT_MALLOC_HEAP_SIZE, __pyx_k_CU_LIMIT_MALLOC_HEAP_SIZE, sizeof(__pyx_k_CU_LIMIT_MALLOC_HEAP_SIZE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LIMIT_MAX, __pyx_k_CU_LIMIT_MAX, sizeof(__pyx_k_CU_LIMIT_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LIMIT_MAX_L2_FETCH_GRANULARIT, __pyx_k_CU_LIMIT_MAX_L2_FETCH_GRANULARIT, sizeof(__pyx_k_CU_LIMIT_MAX_L2_FETCH_GRANULARIT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LIMIT_PERSISTING_L2_CACHE_SIZ, __pyx_k_CU_LIMIT_PERSISTING_L2_CACHE_SIZ, sizeof(__pyx_k_CU_LIMIT_PERSISTING_L2_CACHE_SIZ), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LIMIT_PRINTF_FIFO_SIZE, __pyx_k_CU_LIMIT_PRINTF_FIFO_SIZE, sizeof(__pyx_k_CU_LIMIT_PRINTF_FIFO_SIZE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_LIMIT_STACK_SIZE, __pyx_k_CU_LIMIT_STACK_SIZE, sizeof(__pyx_k_CU_LIMIT_STACK_SIZE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMHOSTALLOC_DEVICEMAP, __pyx_k_CU_MEMHOSTALLOC_DEVICEMAP, sizeof(__pyx_k_CU_MEMHOSTALLOC_DEVICEMAP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMHOSTALLOC_PORTABLE, __pyx_k_CU_MEMHOSTALLOC_PORTABLE, sizeof(__pyx_k_CU_MEMHOSTALLOC_PORTABLE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMHOSTALLOC_WRITECOMBINED, __pyx_k_CU_MEMHOSTALLOC_WRITECOMBINED, sizeof(__pyx_k_CU_MEMHOSTALLOC_WRITECOMBINED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMHOSTREGISTER_DEVICEMAP, __pyx_k_CU_MEMHOSTREGISTER_DEVICEMAP, sizeof(__pyx_k_CU_MEMHOSTREGISTER_DEVICEMAP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMHOSTREGISTER_IOMEMORY, __pyx_k_CU_MEMHOSTREGISTER_IOMEMORY, sizeof(__pyx_k_CU_MEMHOSTREGISTER_IOMEMORY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMHOSTREGISTER_PORTABLE, __pyx_k_CU_MEMHOSTREGISTER_PORTABLE, sizeof(__pyx_k_CU_MEMHOSTREGISTER_PORTABLE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMHOSTREGISTER_READ_ONLY, __pyx_k_CU_MEMHOSTREGISTER_READ_ONLY, sizeof(__pyx_k_CU_MEMHOSTREGISTER_READ_ONLY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMORYTYPE_ARRAY, __pyx_k_CU_MEMORYTYPE_ARRAY, sizeof(__pyx_k_CU_MEMORYTYPE_ARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMORYTYPE_DEVICE, __pyx_k_CU_MEMORYTYPE_DEVICE, sizeof(__pyx_k_CU_MEMORYTYPE_DEVICE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMORYTYPE_HOST, __pyx_k_CU_MEMORYTYPE_HOST, sizeof(__pyx_k_CU_MEMORYTYPE_HOST), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMORYTYPE_UNIFIED, __pyx_k_CU_MEMORYTYPE_UNIFIED, sizeof(__pyx_k_CU_MEMORYTYPE_UNIFIED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMPOOL_ATTR_RELEASE_THRESHOL, __pyx_k_CU_MEMPOOL_ATTR_RELEASE_THRESHOL, sizeof(__pyx_k_CU_MEMPOOL_ATTR_RELEASE_THRESHOL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMPOOL_ATTR_RESERVED_MEM_CUR, __pyx_k_CU_MEMPOOL_ATTR_RESERVED_MEM_CUR, sizeof(__pyx_k_CU_MEMPOOL_ATTR_RESERVED_MEM_CUR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMPOOL_ATTR_RESERVED_MEM_HIG, __pyx_k_CU_MEMPOOL_ATTR_RESERVED_MEM_HIG, sizeof(__pyx_k_CU_MEMPOOL_ATTR_RESERVED_MEM_HIG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMPOOL_ATTR_REUSE_ALLOW_INTE, __pyx_k_CU_MEMPOOL_ATTR_REUSE_ALLOW_INTE, sizeof(__pyx_k_CU_MEMPOOL_ATTR_REUSE_ALLOW_INTE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPO, __pyx_k_CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPO, sizeof(__pyx_k_CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVE, __pyx_k_CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVE, sizeof(__pyx_k_CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMPOOL_ATTR_USED_MEM_CURRENT, __pyx_k_CU_MEMPOOL_ATTR_USED_MEM_CURRENT, sizeof(__pyx_k_CU_MEMPOOL_ATTR_USED_MEM_CURRENT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEMPOOL_ATTR_USED_MEM_HIGH, __pyx_k_CU_MEMPOOL_ATTR_USED_MEM_HIGH, sizeof(__pyx_k_CU_MEMPOOL_ATTR_USED_MEM_HIGH), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ACCESS_FLAGS_PROT_MAX, __pyx_k_CU_MEM_ACCESS_FLAGS_PROT_MAX, sizeof(__pyx_k_CU_MEM_ACCESS_FLAGS_PROT_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ACCESS_FLAGS_PROT_NONE, __pyx_k_CU_MEM_ACCESS_FLAGS_PROT_NONE, sizeof(__pyx_k_CU_MEM_ACCESS_FLAGS_PROT_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ACCESS_FLAGS_PROT_READ, __pyx_k_CU_MEM_ACCESS_FLAGS_PROT_READ, sizeof(__pyx_k_CU_MEM_ACCESS_FLAGS_PROT_READ), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ACCESS_FLAGS_PROT_READWRI, __pyx_k_CU_MEM_ACCESS_FLAGS_PROT_READWRI, sizeof(__pyx_k_CU_MEM_ACCESS_FLAGS_PROT_READWRI), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ADVISE_SET_ACCESSED_BY, __pyx_k_CU_MEM_ADVISE_SET_ACCESSED_BY, sizeof(__pyx_k_CU_MEM_ADVISE_SET_ACCESSED_BY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ADVISE_SET_PREFERRED_LOCA, __pyx_k_CU_MEM_ADVISE_SET_PREFERRED_LOCA, sizeof(__pyx_k_CU_MEM_ADVISE_SET_PREFERRED_LOCA), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ADVISE_SET_READ_MOSTLY, __pyx_k_CU_MEM_ADVISE_SET_READ_MOSTLY, sizeof(__pyx_k_CU_MEM_ADVISE_SET_READ_MOSTLY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ADVISE_UNSET_ACCESSED_BY, __pyx_k_CU_MEM_ADVISE_UNSET_ACCESSED_BY, sizeof(__pyx_k_CU_MEM_ADVISE_UNSET_ACCESSED_BY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ADVISE_UNSET_PREFERRED_LO, __pyx_k_CU_MEM_ADVISE_UNSET_PREFERRED_LO, sizeof(__pyx_k_CU_MEM_ADVISE_UNSET_PREFERRED_LO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ADVISE_UNSET_READ_MOSTLY, __pyx_k_CU_MEM_ADVISE_UNSET_READ_MOSTLY, sizeof(__pyx_k_CU_MEM_ADVISE_UNSET_READ_MOSTLY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ALLOCATION_COMP_GENERIC, __pyx_k_CU_MEM_ALLOCATION_COMP_GENERIC, sizeof(__pyx_k_CU_MEM_ALLOCATION_COMP_GENERIC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ALLOCATION_COMP_NONE, __pyx_k_CU_MEM_ALLOCATION_COMP_NONE, sizeof(__pyx_k_CU_MEM_ALLOCATION_COMP_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ALLOCATION_TYPE_INVALID, __pyx_k_CU_MEM_ALLOCATION_TYPE_INVALID, sizeof(__pyx_k_CU_MEM_ALLOCATION_TYPE_INVALID), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ALLOCATION_TYPE_MAX, __pyx_k_CU_MEM_ALLOCATION_TYPE_MAX, sizeof(__pyx_k_CU_MEM_ALLOCATION_TYPE_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ALLOCATION_TYPE_PINNED, __pyx_k_CU_MEM_ALLOCATION_TYPE_PINNED, sizeof(__pyx_k_CU_MEM_ALLOCATION_TYPE_PINNED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ALLOC_GRANULARITY_MINIMUM, __pyx_k_CU_MEM_ALLOC_GRANULARITY_MINIMUM, sizeof(__pyx_k_CU_MEM_ALLOC_GRANULARITY_MINIMUM), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ALLOC_GRANULARITY_RECOMME, __pyx_k_CU_MEM_ALLOC_GRANULARITY_RECOMME, sizeof(__pyx_k_CU_MEM_ALLOC_GRANULARITY_RECOMME), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ATTACH_GLOBAL, __pyx_k_CU_MEM_ATTACH_GLOBAL, sizeof(__pyx_k_CU_MEM_ATTACH_GLOBAL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ATTACH_HOST, __pyx_k_CU_MEM_ATTACH_HOST, sizeof(__pyx_k_CU_MEM_ATTACH_HOST), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_ATTACH_SINGLE, __pyx_k_CU_MEM_ATTACH_SINGLE, sizeof(__pyx_k_CU_MEM_ATTACH_SINGLE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_CREATE_USAGE_TILE_POOL, __pyx_k_CU_MEM_CREATE_USAGE_TILE_POOL, sizeof(__pyx_k_CU_MEM_CREATE_USAGE_TILE_POOL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_HANDLE_TYPE_GENERIC, __pyx_k_CU_MEM_HANDLE_TYPE_GENERIC, sizeof(__pyx_k_CU_MEM_HANDLE_TYPE_GENERIC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_HANDLE_TYPE_MAX, __pyx_k_CU_MEM_HANDLE_TYPE_MAX, sizeof(__pyx_k_CU_MEM_HANDLE_TYPE_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_HANDLE_TYPE_NONE, __pyx_k_CU_MEM_HANDLE_TYPE_NONE, sizeof(__pyx_k_CU_MEM_HANDLE_TYPE_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_HANDLE_TYPE_POSIX_FILE_DE, __pyx_k_CU_MEM_HANDLE_TYPE_POSIX_FILE_DE, sizeof(__pyx_k_CU_MEM_HANDLE_TYPE_POSIX_FILE_DE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_HANDLE_TYPE_WIN32, __pyx_k_CU_MEM_HANDLE_TYPE_WIN32, sizeof(__pyx_k_CU_MEM_HANDLE_TYPE_WIN32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_HANDLE_TYPE_WIN32_KMT, __pyx_k_CU_MEM_HANDLE_TYPE_WIN32_KMT, sizeof(__pyx_k_CU_MEM_HANDLE_TYPE_WIN32_KMT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_LOCATION_TYPE_DEVICE, __pyx_k_CU_MEM_LOCATION_TYPE_DEVICE, sizeof(__pyx_k_CU_MEM_LOCATION_TYPE_DEVICE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_LOCATION_TYPE_INVALID, __pyx_k_CU_MEM_LOCATION_TYPE_INVALID, sizeof(__pyx_k_CU_MEM_LOCATION_TYPE_INVALID), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_LOCATION_TYPE_MAX, __pyx_k_CU_MEM_LOCATION_TYPE_MAX, sizeof(__pyx_k_CU_MEM_LOCATION_TYPE_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_OPERATION_TYPE_MAP, __pyx_k_CU_MEM_OPERATION_TYPE_MAP, sizeof(__pyx_k_CU_MEM_OPERATION_TYPE_MAP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_OPERATION_TYPE_UNMAP, __pyx_k_CU_MEM_OPERATION_TYPE_UNMAP, sizeof(__pyx_k_CU_MEM_OPERATION_TYPE_UNMAP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_RANGE_ATTRIBUTE_ACCESSED, __pyx_k_CU_MEM_RANGE_ATTRIBUTE_ACCESSED, sizeof(__pyx_k_CU_MEM_RANGE_ATTRIBUTE_ACCESSED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_RANGE_ATTRIBUTE_LAST_PREF, __pyx_k_CU_MEM_RANGE_ATTRIBUTE_LAST_PREF, sizeof(__pyx_k_CU_MEM_RANGE_ATTRIBUTE_LAST_PREF), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_RANGE_ATTRIBUTE_PREFERRED, __pyx_k_CU_MEM_RANGE_ATTRIBUTE_PREFERRED, sizeof(__pyx_k_CU_MEM_RANGE_ATTRIBUTE_PREFERRED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_RANGE_ATTRIBUTE_READ_MOST, __pyx_k_CU_MEM_RANGE_ATTRIBUTE_READ_MOST, sizeof(__pyx_k_CU_MEM_RANGE_ATTRIBUTE_READ_MOST), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF, __pyx_k_CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF, sizeof(__pyx_k_CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MEM_RANGE_HANDLE_TYPE_MAX, __pyx_k_CU_MEM_RANGE_HANDLE_TYPE_MAX, sizeof(__pyx_k_CU_MEM_RANGE_HANDLE_TYPE_MAX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MODULE_EAGER_LOADING, __pyx_k_CU_MODULE_EAGER_LOADING, sizeof(__pyx_k_CU_MODULE_EAGER_LOADING), 0, 0, 1, 1},
  {&__pyx_n_s_CU_MODULE_LAZY_LOADING, __pyx_k_CU_MODULE_LAZY_LOADING, sizeof(__pyx_k_CU_MODULE_LAZY_LOADING), 0, 0, 1, 1},
  {&__pyx_n_s_CU_OCCUPANCY_DEFAULT, __pyx_k_CU_OCCUPANCY_DEFAULT, sizeof(__pyx_k_CU_OCCUPANCY_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_OCCUPANCY_DISABLE_CACHING_OVE, __pyx_k_CU_OCCUPANCY_DISABLE_CACHING_OVE, sizeof(__pyx_k_CU_OCCUPANCY_DISABLE_CACHING_OVE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_OUT_CSV, __pyx_k_CU_OUT_CSV, sizeof(__pyx_k_CU_OUT_CSV), 0, 0, 1, 1},
  {&__pyx_n_s_CU_OUT_KEY_VALUE_PAIR, __pyx_k_CU_OUT_KEY_VALUE_PAIR, sizeof(__pyx_k_CU_OUT_KEY_VALUE_PAIR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_PARAM_TR_DEFAULT, __pyx_k_CU_PARAM_TR_DEFAULT, sizeof(__pyx_k_CU_PARAM_TR_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_ACCESS_FLAG, __pyx_k_CU_POINTER_ATTRIBUTE_ACCESS_FLAG, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_ACCESS_FLAG), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_2, __pyx_k_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_2, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_3, __pyx_k_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_3, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_4, __pyx_k_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_4, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_ALLOWED_HAN, __pyx_k_CU_POINTER_ATTRIBUTE_ALLOWED_HAN, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_ALLOWED_HAN), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_BUFFER_ID, __pyx_k_CU_POINTER_ATTRIBUTE_BUFFER_ID, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_BUFFER_ID), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_CONTEXT, __pyx_k_CU_POINTER_ATTRIBUTE_CONTEXT, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_CONTEXT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_DEVICE_ORDI, __pyx_k_CU_POINTER_ATTRIBUTE_DEVICE_ORDI, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_DEVICE_ORDI), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_DEVICE_POIN, __pyx_k_CU_POINTER_ATTRIBUTE_DEVICE_POIN, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_DEVICE_POIN), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_HOST_POINTE, __pyx_k_CU_POINTER_ATTRIBUTE_HOST_POINTE, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_HOST_POINTE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_IS_GPU_DIRE, __pyx_k_CU_POINTER_ATTRIBUTE_IS_GPU_DIRE, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_IS_GPU_DIRE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_IS_LEGACY_C, __pyx_k_CU_POINTER_ATTRIBUTE_IS_LEGACY_C, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_IS_LEGACY_C), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_IS_MANAGED, __pyx_k_CU_POINTER_ATTRIBUTE_IS_MANAGED, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_IS_MANAGED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_MAPPED, __pyx_k_CU_POINTER_ATTRIBUTE_MAPPED, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_MAPPED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_MAPPING_BAS, __pyx_k_CU_POINTER_ATTRIBUTE_MAPPING_BAS, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_MAPPING_BAS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_MAPPING_SIZ, __pyx_k_CU_POINTER_ATTRIBUTE_MAPPING_SIZ, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_MAPPING_SIZ), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_MEMORY_BLOC, __pyx_k_CU_POINTER_ATTRIBUTE_MEMORY_BLOC, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_MEMORY_BLOC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_MEMORY_TYPE, __pyx_k_CU_POINTER_ATTRIBUTE_MEMORY_TYPE, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_MEMORY_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_MEMPOOL_HAN, __pyx_k_CU_POINTER_ATTRIBUTE_MEMPOOL_HAN, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_MEMPOOL_HAN), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_P2P_TOKENS, __pyx_k_CU_POINTER_ATTRIBUTE_P2P_TOKENS, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_P2P_TOKENS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_RANGE_SIZE, __pyx_k_CU_POINTER_ATTRIBUTE_RANGE_SIZE, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_RANGE_SIZE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_RANGE_START, __pyx_k_CU_POINTER_ATTRIBUTE_RANGE_START, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_RANGE_START), 0, 0, 1, 1},
  {&__pyx_n_s_CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, __pyx_k_CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, sizeof(__pyx_k_CU_POINTER_ATTRIBUTE_SYNC_MEMOPS), 0, 0, 1, 1},
  {&__pyx_n_s_CU_PREFER_BINARY, __pyx_k_CU_PREFER_BINARY, sizeof(__pyx_k_CU_PREFER_BINARY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_PREFER_PTX, __pyx_k_CU_PREFER_PTX, sizeof(__pyx_k_CU_PREFER_PTX), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RESOURCE_TYPE_ARRAY, __pyx_k_CU_RESOURCE_TYPE_ARRAY, sizeof(__pyx_k_CU_RESOURCE_TYPE_ARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RESOURCE_TYPE_LINEAR, __pyx_k_CU_RESOURCE_TYPE_LINEAR, sizeof(__pyx_k_CU_RESOURCE_TYPE_LINEAR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RESOURCE_TYPE_MIPMAPPED_ARRAY, __pyx_k_CU_RESOURCE_TYPE_MIPMAPPED_ARRAY, sizeof(__pyx_k_CU_RESOURCE_TYPE_MIPMAPPED_ARRAY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RESOURCE_TYPE_PITCH2D, __pyx_k_CU_RESOURCE_TYPE_PITCH2D, sizeof(__pyx_k_CU_RESOURCE_TYPE_PITCH2D), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_1X16, __pyx_k_CU_RES_VIEW_FORMAT_FLOAT_1X16, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_FLOAT_1X16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_1X32, __pyx_k_CU_RES_VIEW_FORMAT_FLOAT_1X32, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_FLOAT_1X32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_2X16, __pyx_k_CU_RES_VIEW_FORMAT_FLOAT_2X16, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_FLOAT_2X16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_2X32, __pyx_k_CU_RES_VIEW_FORMAT_FLOAT_2X32, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_FLOAT_2X32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_4X16, __pyx_k_CU_RES_VIEW_FORMAT_FLOAT_4X16, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_FLOAT_4X16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_4X32, __pyx_k_CU_RES_VIEW_FORMAT_FLOAT_4X32, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_FLOAT_4X32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_NONE, __pyx_k_CU_RES_VIEW_FORMAT_NONE, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_SIGNED_BC4, __pyx_k_CU_RES_VIEW_FORMAT_SIGNED_BC4, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_SIGNED_BC4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_SIGNED_BC5, __pyx_k_CU_RES_VIEW_FORMAT_SIGNED_BC5, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_SIGNED_BC5), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_SIGNED_BC6H, __pyx_k_CU_RES_VIEW_FORMAT_SIGNED_BC6H, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_SIGNED_BC6H), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_1X16, __pyx_k_CU_RES_VIEW_FORMAT_SINT_1X16, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_SINT_1X16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_1X32, __pyx_k_CU_RES_VIEW_FORMAT_SINT_1X32, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_SINT_1X32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_1X8, __pyx_k_CU_RES_VIEW_FORMAT_SINT_1X8, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_SINT_1X8), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_2X16, __pyx_k_CU_RES_VIEW_FORMAT_SINT_2X16, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_SINT_2X16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_2X32, __pyx_k_CU_RES_VIEW_FORMAT_SINT_2X32, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_SINT_2X32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_2X8, __pyx_k_CU_RES_VIEW_FORMAT_SINT_2X8, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_SINT_2X8), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_4X16, __pyx_k_CU_RES_VIEW_FORMAT_SINT_4X16, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_SINT_4X16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_4X32, __pyx_k_CU_RES_VIEW_FORMAT_SINT_4X32, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_SINT_4X32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_SINT_4X8, __pyx_k_CU_RES_VIEW_FORMAT_SINT_4X8, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_SINT_4X8), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_1X16, __pyx_k_CU_RES_VIEW_FORMAT_UINT_1X16, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UINT_1X16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_1X32, __pyx_k_CU_RES_VIEW_FORMAT_UINT_1X32, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UINT_1X32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_1X8, __pyx_k_CU_RES_VIEW_FORMAT_UINT_1X8, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UINT_1X8), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_2X16, __pyx_k_CU_RES_VIEW_FORMAT_UINT_2X16, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UINT_2X16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_2X32, __pyx_k_CU_RES_VIEW_FORMAT_UINT_2X32, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UINT_2X32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_2X8, __pyx_k_CU_RES_VIEW_FORMAT_UINT_2X8, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UINT_2X8), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_4X16, __pyx_k_CU_RES_VIEW_FORMAT_UINT_4X16, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UINT_4X16), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_4X32, __pyx_k_CU_RES_VIEW_FORMAT_UINT_4X32, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UINT_4X32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UINT_4X8, __pyx_k_CU_RES_VIEW_FORMAT_UINT_4X8, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UINT_4X8), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC1, __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC1, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC1), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC2, __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC2, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC2), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC3, __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC3, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC3), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC4, __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC4, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC4), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC5, __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC5, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC5), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC6H, __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC6H, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC6H), 0, 0, 1, 1},
  {&__pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC7, __pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC7, sizeof(__pyx_k_CU_RES_VIEW_FORMAT_UNSIGNED_BC7), 0, 0, 1, 1},
  {&__pyx_n_s_CU_SHAREDMEM_CARVEOUT_DEFAULT, __pyx_k_CU_SHAREDMEM_CARVEOUT_DEFAULT, sizeof(__pyx_k_CU_SHAREDMEM_CARVEOUT_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_SHAREDMEM_CARVEOUT_MAX_L1, __pyx_k_CU_SHAREDMEM_CARVEOUT_MAX_L1, sizeof(__pyx_k_CU_SHAREDMEM_CARVEOUT_MAX_L1), 0, 0, 1, 1},
  {&__pyx_n_s_CU_SHAREDMEM_CARVEOUT_MAX_SHARED, __pyx_k_CU_SHAREDMEM_CARVEOUT_MAX_SHARED, sizeof(__pyx_k_CU_SHAREDMEM_CARVEOUT_MAX_SHARED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_SHARED_MEM_CONFIG_DEFAULT_BAN, __pyx_k_CU_SHARED_MEM_CONFIG_DEFAULT_BAN, sizeof(__pyx_k_CU_SHARED_MEM_CONFIG_DEFAULT_BAN), 0, 0, 1, 1},
  {&__pyx_n_s_CU_SHARED_MEM_CONFIG_EIGHT_BYTE, __pyx_k_CU_SHARED_MEM_CONFIG_EIGHT_BYTE, sizeof(__pyx_k_CU_SHARED_MEM_CONFIG_EIGHT_BYTE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_SHARED_MEM_CONFIG_FOUR_BYTE_B, __pyx_k_CU_SHARED_MEM_CONFIG_FOUR_BYTE_B, sizeof(__pyx_k_CU_SHARED_MEM_CONFIG_FOUR_BYTE_B), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_ADD_CAPTURE_DEPENDENCI, __pyx_k_CU_STREAM_ADD_CAPTURE_DEPENDENCI, sizeof(__pyx_k_CU_STREAM_ADD_CAPTURE_DEPENDENCI), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_ATTRIBUTE_ACCESS_POLIC, __pyx_k_CU_STREAM_ATTRIBUTE_ACCESS_POLIC, sizeof(__pyx_k_CU_STREAM_ATTRIBUTE_ACCESS_POLIC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_ATTRIBUTE_SYNCHRONIZAT, __pyx_k_CU_STREAM_ATTRIBUTE_SYNCHRONIZAT, sizeof(__pyx_k_CU_STREAM_ATTRIBUTE_SYNCHRONIZAT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_CAPTURE_MODE_GLOBAL, __pyx_k_CU_STREAM_CAPTURE_MODE_GLOBAL, sizeof(__pyx_k_CU_STREAM_CAPTURE_MODE_GLOBAL), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_CAPTURE_MODE_RELAXED, __pyx_k_CU_STREAM_CAPTURE_MODE_RELAXED, sizeof(__pyx_k_CU_STREAM_CAPTURE_MODE_RELAXED), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_CAPTURE_MODE_THREAD_LO, __pyx_k_CU_STREAM_CAPTURE_MODE_THREAD_LO, sizeof(__pyx_k_CU_STREAM_CAPTURE_MODE_THREAD_LO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_CAPTURE_STATUS_ACTIVE, __pyx_k_CU_STREAM_CAPTURE_STATUS_ACTIVE, sizeof(__pyx_k_CU_STREAM_CAPTURE_STATUS_ACTIVE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_CAPTURE_STATUS_INVALID, __pyx_k_CU_STREAM_CAPTURE_STATUS_INVALID, sizeof(__pyx_k_CU_STREAM_CAPTURE_STATUS_INVALID), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_CAPTURE_STATUS_NONE, __pyx_k_CU_STREAM_CAPTURE_STATUS_NONE, sizeof(__pyx_k_CU_STREAM_CAPTURE_STATUS_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_DEFAULT, __pyx_k_CU_STREAM_DEFAULT, sizeof(__pyx_k_CU_STREAM_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_LEGACY, __pyx_k_CU_STREAM_LEGACY, sizeof(__pyx_k_CU_STREAM_LEGACY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_MEMORY_BARRIER_TYPE_GP, __pyx_k_CU_STREAM_MEMORY_BARRIER_TYPE_GP, sizeof(__pyx_k_CU_STREAM_MEMORY_BARRIER_TYPE_GP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_MEMORY_BARRIER_TYPE_SY, __pyx_k_CU_STREAM_MEMORY_BARRIER_TYPE_SY, sizeof(__pyx_k_CU_STREAM_MEMORY_BARRIER_TYPE_SY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_MEM_OP_BARRIER, __pyx_k_CU_STREAM_MEM_OP_BARRIER, sizeof(__pyx_k_CU_STREAM_MEM_OP_BARRIER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_MEM_OP_FLUSH_REMOTE_WR, __pyx_k_CU_STREAM_MEM_OP_FLUSH_REMOTE_WR, sizeof(__pyx_k_CU_STREAM_MEM_OP_FLUSH_REMOTE_WR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_MEM_OP_WAIT_VALUE_32, __pyx_k_CU_STREAM_MEM_OP_WAIT_VALUE_32, sizeof(__pyx_k_CU_STREAM_MEM_OP_WAIT_VALUE_32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_MEM_OP_WAIT_VALUE_64, __pyx_k_CU_STREAM_MEM_OP_WAIT_VALUE_64, sizeof(__pyx_k_CU_STREAM_MEM_OP_WAIT_VALUE_64), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_MEM_OP_WRITE_VALUE_32, __pyx_k_CU_STREAM_MEM_OP_WRITE_VALUE_32, sizeof(__pyx_k_CU_STREAM_MEM_OP_WRITE_VALUE_32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_MEM_OP_WRITE_VALUE_64, __pyx_k_CU_STREAM_MEM_OP_WRITE_VALUE_64, sizeof(__pyx_k_CU_STREAM_MEM_OP_WRITE_VALUE_64), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_NON_BLOCKING, __pyx_k_CU_STREAM_NON_BLOCKING, sizeof(__pyx_k_CU_STREAM_NON_BLOCKING), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_PER_THREAD, __pyx_k_CU_STREAM_PER_THREAD, sizeof(__pyx_k_CU_STREAM_PER_THREAD), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_SET_CAPTURE_DEPENDENCI, __pyx_k_CU_STREAM_SET_CAPTURE_DEPENDENCI, sizeof(__pyx_k_CU_STREAM_SET_CAPTURE_DEPENDENCI), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_WAIT_VALUE_AND, __pyx_k_CU_STREAM_WAIT_VALUE_AND, sizeof(__pyx_k_CU_STREAM_WAIT_VALUE_AND), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_WAIT_VALUE_EQ, __pyx_k_CU_STREAM_WAIT_VALUE_EQ, sizeof(__pyx_k_CU_STREAM_WAIT_VALUE_EQ), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_WAIT_VALUE_FLUSH, __pyx_k_CU_STREAM_WAIT_VALUE_FLUSH, sizeof(__pyx_k_CU_STREAM_WAIT_VALUE_FLUSH), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_WAIT_VALUE_GEQ, __pyx_k_CU_STREAM_WAIT_VALUE_GEQ, sizeof(__pyx_k_CU_STREAM_WAIT_VALUE_GEQ), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_WAIT_VALUE_NOR, __pyx_k_CU_STREAM_WAIT_VALUE_NOR, sizeof(__pyx_k_CU_STREAM_WAIT_VALUE_NOR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_WRITE_VALUE_DEFAULT, __pyx_k_CU_STREAM_WRITE_VALUE_DEFAULT, sizeof(__pyx_k_CU_STREAM_WRITE_VALUE_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_STREAM_WRITE_VALUE_NO_MEMORY, __pyx_k_CU_STREAM_WRITE_VALUE_NO_MEMORY, sizeof(__pyx_k_CU_STREAM_WRITE_VALUE_NO_MEMORY), 0, 0, 1, 1},
  {&__pyx_n_s_CU_SYNC_POLICY_AUTO, __pyx_k_CU_SYNC_POLICY_AUTO, sizeof(__pyx_k_CU_SYNC_POLICY_AUTO), 0, 0, 1, 1},
  {&__pyx_n_s_CU_SYNC_POLICY_BLOCKING_SYNC, __pyx_k_CU_SYNC_POLICY_BLOCKING_SYNC, sizeof(__pyx_k_CU_SYNC_POLICY_BLOCKING_SYNC), 0, 0, 1, 1},
  {&__pyx_n_s_CU_SYNC_POLICY_SPIN, __pyx_k_CU_SYNC_POLICY_SPIN, sizeof(__pyx_k_CU_SYNC_POLICY_SPIN), 0, 0, 1, 1},
  {&__pyx_n_s_CU_SYNC_POLICY_YIELD, __pyx_k_CU_SYNC_POLICY_YIELD, sizeof(__pyx_k_CU_SYNC_POLICY_YIELD), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_30, __pyx_k_CU_TARGET_COMPUTE_30, sizeof(__pyx_k_CU_TARGET_COMPUTE_30), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_32, __pyx_k_CU_TARGET_COMPUTE_32, sizeof(__pyx_k_CU_TARGET_COMPUTE_32), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_35, __pyx_k_CU_TARGET_COMPUTE_35, sizeof(__pyx_k_CU_TARGET_COMPUTE_35), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_37, __pyx_k_CU_TARGET_COMPUTE_37, sizeof(__pyx_k_CU_TARGET_COMPUTE_37), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_50, __pyx_k_CU_TARGET_COMPUTE_50, sizeof(__pyx_k_CU_TARGET_COMPUTE_50), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_52, __pyx_k_CU_TARGET_COMPUTE_52, sizeof(__pyx_k_CU_TARGET_COMPUTE_52), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_53, __pyx_k_CU_TARGET_COMPUTE_53, sizeof(__pyx_k_CU_TARGET_COMPUTE_53), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_60, __pyx_k_CU_TARGET_COMPUTE_60, sizeof(__pyx_k_CU_TARGET_COMPUTE_60), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_61, __pyx_k_CU_TARGET_COMPUTE_61, sizeof(__pyx_k_CU_TARGET_COMPUTE_61), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_62, __pyx_k_CU_TARGET_COMPUTE_62, sizeof(__pyx_k_CU_TARGET_COMPUTE_62), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_70, __pyx_k_CU_TARGET_COMPUTE_70, sizeof(__pyx_k_CU_TARGET_COMPUTE_70), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_72, __pyx_k_CU_TARGET_COMPUTE_72, sizeof(__pyx_k_CU_TARGET_COMPUTE_72), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_75, __pyx_k_CU_TARGET_COMPUTE_75, sizeof(__pyx_k_CU_TARGET_COMPUTE_75), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_80, __pyx_k_CU_TARGET_COMPUTE_80, sizeof(__pyx_k_CU_TARGET_COMPUTE_80), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_86, __pyx_k_CU_TARGET_COMPUTE_86, sizeof(__pyx_k_CU_TARGET_COMPUTE_86), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_87, __pyx_k_CU_TARGET_COMPUTE_87, sizeof(__pyx_k_CU_TARGET_COMPUTE_87), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TARGET_COMPUTE_89, __pyx_k_CU_TARGET_COMPUTE_89, sizeof(__pyx_k_CU_TARGET_COMPUTE_89), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TRSA_OVERRIDE_FORMAT, __pyx_k_CU_TRSA_OVERRIDE_FORMAT, sizeof(__pyx_k_CU_TRSA_OVERRIDE_FORMAT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TRSF_DISABLE_TRILINEAR_OPTIMI, __pyx_k_CU_TRSF_DISABLE_TRILINEAR_OPTIMI, sizeof(__pyx_k_CU_TRSF_DISABLE_TRILINEAR_OPTIMI), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TRSF_NORMALIZED_COORDINATES, __pyx_k_CU_TRSF_NORMALIZED_COORDINATES, sizeof(__pyx_k_CU_TRSF_NORMALIZED_COORDINATES), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TRSF_READ_AS_INTEGER, __pyx_k_CU_TRSF_READ_AS_INTEGER, sizeof(__pyx_k_CU_TRSF_READ_AS_INTEGER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TRSF_SEAMLESS_CUBEMAP, __pyx_k_CU_TRSF_SEAMLESS_CUBEMAP, sizeof(__pyx_k_CU_TRSF_SEAMLESS_CUBEMAP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TRSF_SRGB, __pyx_k_CU_TRSF_SRGB, sizeof(__pyx_k_CU_TRSF_SRGB), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TR_ADDRESS_MODE_BORDER, __pyx_k_CU_TR_ADDRESS_MODE_BORDER, sizeof(__pyx_k_CU_TR_ADDRESS_MODE_BORDER), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TR_ADDRESS_MODE_CLAMP, __pyx_k_CU_TR_ADDRESS_MODE_CLAMP, sizeof(__pyx_k_CU_TR_ADDRESS_MODE_CLAMP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TR_ADDRESS_MODE_MIRROR, __pyx_k_CU_TR_ADDRESS_MODE_MIRROR, sizeof(__pyx_k_CU_TR_ADDRESS_MODE_MIRROR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TR_ADDRESS_MODE_WRAP, __pyx_k_CU_TR_ADDRESS_MODE_WRAP, sizeof(__pyx_k_CU_TR_ADDRESS_MODE_WRAP), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TR_FILTER_MODE_LINEAR, __pyx_k_CU_TR_FILTER_MODE_LINEAR, sizeof(__pyx_k_CU_TR_FILTER_MODE_LINEAR), 0, 0, 1, 1},
  {&__pyx_n_s_CU_TR_FILTER_MODE_POINT, __pyx_k_CU_TR_FILTER_MODE_POINT, sizeof(__pyx_k_CU_TR_FILTER_MODE_POINT), 0, 0, 1, 1},
  {&__pyx_n_s_CU_USER_OBJECT_NO_DESTRUCTOR_SYN, __pyx_k_CU_USER_OBJECT_NO_DESTRUCTOR_SYN, sizeof(__pyx_k_CU_USER_OBJECT_NO_DESTRUCTOR_SYN), 0, 0, 1, 1},
  {&__pyx_n_s_CUaccessPolicyWindow, __pyx_k_CUaccessPolicyWindow, sizeof(__pyx_k_CUaccessPolicyWindow), 0, 0, 1, 1},
  {&__pyx_n_s_CUaccessPolicyWindow_st, __pyx_k_CUaccessPolicyWindow_st, sizeof(__pyx_k_CUaccessPolicyWindow_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUaccessPolicyWindow_st___reduce, __pyx_k_CUaccessPolicyWindow_st___reduce, sizeof(__pyx_k_CUaccessPolicyWindow_st___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_CUaccessPolicyWindow_st___setsta, __pyx_k_CUaccessPolicyWindow_st___setsta, sizeof(__pyx_k_CUaccessPolicyWindow_st___setsta), 0, 0, 1, 1},
  {&__pyx_n_s_CUaccessPolicyWindow_st_getPtr, __pyx_k_CUaccessPolicyWindow_st_getPtr, sizeof(__pyx_k_CUaccessPolicyWindow_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUaccessPolicyWindow_v1, __pyx_k_CUaccessPolicyWindow_v1, sizeof(__pyx_k_CUaccessPolicyWindow_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUaccessProperty, __pyx_k_CUaccessProperty, sizeof(__pyx_k_CUaccessProperty), 0, 0, 1, 1},
  {&__pyx_n_s_CUaddress_mode, __pyx_k_CUaddress_mode, sizeof(__pyx_k_CUaddress_mode), 0, 0, 1, 1},
  {&__pyx_kp_u_CUarray, __pyx_k_CUarray, sizeof(__pyx_k_CUarray), 0, 1, 0, 0},
  {&__pyx_n_s_CUarrayMapInfo, __pyx_k_CUarrayMapInfo, sizeof(__pyx_k_CUarrayMapInfo), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_st, __pyx_k_CUarrayMapInfo_st, sizeof(__pyx_k_CUarrayMapInfo_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_st___reduce_cytho, __pyx_k_CUarrayMapInfo_st___reduce_cytho, sizeof(__pyx_k_CUarrayMapInfo_st___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_st___setstate_cyt, __pyx_k_CUarrayMapInfo_st___setstate_cyt, sizeof(__pyx_k_CUarrayMapInfo_st___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_st_getPtr, __pyx_k_CUarrayMapInfo_st_getPtr, sizeof(__pyx_k_CUarrayMapInfo_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1, __pyx_k_CUarrayMapInfo_v1, sizeof(__pyx_k_CUarrayMapInfo_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_10, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_10, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_10), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_11, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_11, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_11), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_12, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_12, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_12), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_13, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_13, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_13), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_14, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_14, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_14), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_15, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_15, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_15), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_16, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_16, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_16), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_17, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_17, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_17), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_18, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_18, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_18), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_19, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_19, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_19), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_2, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_2, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_20, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_20, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_20), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_3, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_3, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_4, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_4, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_5, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_5, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_6, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_6, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_7, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_7, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_7), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_8, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_8, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_8), 0, 0, 1, 1},
  {&__pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_9, __pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_9, sizeof(__pyx_k_CUarrayMapInfo_v1_CUarrayMapInf_9), 0, 0, 1, 1},
  {&__pyx_n_s_CUarraySparseSubresourceType, __pyx_k_CUarraySparseSubresourceType, sizeof(__pyx_k_CUarraySparseSubresourceType), 0, 0, 1, 1},
  {&__pyx_n_s_CUarray_2, __pyx_k_CUarray_2, sizeof(__pyx_k_CUarray_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUarray___reduce_cython, __pyx_k_CUarray___reduce_cython, sizeof(__pyx_k_CUarray___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUarray___setstate_cython, __pyx_k_CUarray___setstate_cython, sizeof(__pyx_k_CUarray___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUarray_cubemap_face, __pyx_k_CUarray_cubemap_face, sizeof(__pyx_k_CUarray_cubemap_face), 0, 0, 1, 1},
  {&__pyx_n_s_CUarray_format, __pyx_k_CUarray_format, sizeof(__pyx_k_CUarray_format), 0, 0, 1, 1},
  {&__pyx_n_s_CUarray_getPtr, __pyx_k_CUarray_getPtr, sizeof(__pyx_k_CUarray_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUclusterSchedulingPolicy, __pyx_k_CUclusterSchedulingPolicy, sizeof(__pyx_k_CUclusterSchedulingPolicy), 0, 0, 1, 1},
  {&__pyx_n_s_CUcomputemode, __pyx_k_CUcomputemode, sizeof(__pyx_k_CUcomputemode), 0, 0, 1, 1},
  {&__pyx_kp_u_CUcontext, __pyx_k_CUcontext, sizeof(__pyx_k_CUcontext), 0, 1, 0, 0},
  {&__pyx_n_s_CUcontext_2, __pyx_k_CUcontext_2, sizeof(__pyx_k_CUcontext_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUcontext___reduce_cython, __pyx_k_CUcontext___reduce_cython, sizeof(__pyx_k_CUcontext___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUcontext___setstate_cython, __pyx_k_CUcontext___setstate_cython, sizeof(__pyx_k_CUcontext___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUcontext_getPtr, __pyx_k_CUcontext_getPtr, sizeof(__pyx_k_CUcontext_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUctx_flags, __pyx_k_CUctx_flags, sizeof(__pyx_k_CUctx_flags), 0, 0, 1, 1},
  {&__pyx_kp_u_CUdevice, __pyx_k_CUdevice, sizeof(__pyx_k_CUdevice), 0, 1, 0, 0},
  {&__pyx_n_s_CUdevice_2, __pyx_k_CUdevice_2, sizeof(__pyx_k_CUdevice_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevice_P2PAttribute, __pyx_k_CUdevice_P2PAttribute, sizeof(__pyx_k_CUdevice_P2PAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevice___reduce_cython, __pyx_k_CUdevice___reduce_cython, sizeof(__pyx_k_CUdevice___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevice___setstate_cython, __pyx_k_CUdevice___setstate_cython, sizeof(__pyx_k_CUdevice___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevice_attribute, __pyx_k_CUdevice_attribute, sizeof(__pyx_k_CUdevice_attribute), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevice_getPtr, __pyx_k_CUdevice_getPtr, sizeof(__pyx_k_CUdevice_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUdevice_v1, __pyx_k_CUdevice_v1, sizeof(__pyx_k_CUdevice_v1), 0, 1, 0, 0},
  {&__pyx_n_s_CUdevice_v1_2, __pyx_k_CUdevice_v1_2, sizeof(__pyx_k_CUdevice_v1_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevice_v1___reduce_cython, __pyx_k_CUdevice_v1___reduce_cython, sizeof(__pyx_k_CUdevice_v1___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevice_v1___setstate_cython, __pyx_k_CUdevice_v1___setstate_cython, sizeof(__pyx_k_CUdevice_v1___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevice_v1_getPtr, __pyx_k_CUdevice_v1_getPtr, sizeof(__pyx_k_CUdevice_v1_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUdeviceptr, __pyx_k_CUdeviceptr, sizeof(__pyx_k_CUdeviceptr), 0, 1, 0, 0},
  {&__pyx_n_s_CUdeviceptr_2, __pyx_k_CUdeviceptr_2, sizeof(__pyx_k_CUdeviceptr_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUdeviceptr___reduce_cython, __pyx_k_CUdeviceptr___reduce_cython, sizeof(__pyx_k_CUdeviceptr___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUdeviceptr___setstate_cython, __pyx_k_CUdeviceptr___setstate_cython, sizeof(__pyx_k_CUdeviceptr___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUdeviceptr_getPtr, __pyx_k_CUdeviceptr_getPtr, sizeof(__pyx_k_CUdeviceptr_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUdeviceptr_v2, __pyx_k_CUdeviceptr_v2, sizeof(__pyx_k_CUdeviceptr_v2), 0, 1, 0, 0},
  {&__pyx_n_s_CUdeviceptr_v2_2, __pyx_k_CUdeviceptr_v2_2, sizeof(__pyx_k_CUdeviceptr_v2_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUdeviceptr_v2___reduce_cython, __pyx_k_CUdeviceptr_v2___reduce_cython, sizeof(__pyx_k_CUdeviceptr_v2___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUdeviceptr_v2___setstate_cython, __pyx_k_CUdeviceptr_v2___setstate_cython, sizeof(__pyx_k_CUdeviceptr_v2___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUdeviceptr_v2_getPtr, __pyx_k_CUdeviceptr_v2_getPtr, sizeof(__pyx_k_CUdeviceptr_v2_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevprop, __pyx_k_CUdevprop, sizeof(__pyx_k_CUdevprop), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevprop_st, __pyx_k_CUdevprop_st, sizeof(__pyx_k_CUdevprop_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevprop_st___reduce_cython, __pyx_k_CUdevprop_st___reduce_cython, sizeof(__pyx_k_CUdevprop_st___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevprop_st___setstate_cython, __pyx_k_CUdevprop_st___setstate_cython, sizeof(__pyx_k_CUdevprop_st___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevprop_st_getPtr, __pyx_k_CUdevprop_st_getPtr, sizeof(__pyx_k_CUdevprop_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUdevprop_v1, __pyx_k_CUdevprop_v1, sizeof(__pyx_k_CUdevprop_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUdriverProcAddress_flags, __pyx_k_CUdriverProcAddress_flags, sizeof(__pyx_k_CUdriverProcAddress_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglColorFormat, __pyx_k_CUeglColorFormat, sizeof(__pyx_k_CUeglColorFormat), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglFrame, __pyx_k_CUeglFrame, sizeof(__pyx_k_CUeglFrame), 0, 0, 1, 1},
  {&__pyx_n_u_CUeglFrame, __pyx_k_CUeglFrame, sizeof(__pyx_k_CUeglFrame), 0, 1, 0, 1},
  {&__pyx_n_s_CUeglFrameType, __pyx_k_CUeglFrameType, sizeof(__pyx_k_CUeglFrameType), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglFrame_st, __pyx_k_CUeglFrame_st, sizeof(__pyx_k_CUeglFrame_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglFrame_st___reduce_cython, __pyx_k_CUeglFrame_st___reduce_cython, sizeof(__pyx_k_CUeglFrame_st___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglFrame_st___setstate_cython, __pyx_k_CUeglFrame_st___setstate_cython, sizeof(__pyx_k_CUeglFrame_st___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglFrame_st_getPtr, __pyx_k_CUeglFrame_st_getPtr, sizeof(__pyx_k_CUeglFrame_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglFrame_v1, __pyx_k_CUeglFrame_v1, sizeof(__pyx_k_CUeglFrame_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglFrame_v1_CUeglFrame_v1_CUe, __pyx_k_CUeglFrame_v1_CUeglFrame_v1_CUe, sizeof(__pyx_k_CUeglFrame_v1_CUeglFrame_v1_CUe), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglFrame_v1_CUeglFrame_v1_CUe_2, __pyx_k_CUeglFrame_v1_CUeglFrame_v1_CUe_2, sizeof(__pyx_k_CUeglFrame_v1_CUeglFrame_v1_CUe_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglFrame_v1_CUeglFrame_v1_CUe_3, __pyx_k_CUeglFrame_v1_CUeglFrame_v1_CUe_3, sizeof(__pyx_k_CUeglFrame_v1_CUeglFrame_v1_CUe_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglFrame_v1_CUeglFrame_v1_CUe_4, __pyx_k_CUeglFrame_v1_CUeglFrame_v1_CUe_4, sizeof(__pyx_k_CUeglFrame_v1_CUeglFrame_v1_CUe_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglResourceLocationFlags, __pyx_k_CUeglResourceLocationFlags, sizeof(__pyx_k_CUeglResourceLocationFlags), 0, 0, 1, 1},
  {&__pyx_kp_u_CUeglStreamConnection, __pyx_k_CUeglStreamConnection, sizeof(__pyx_k_CUeglStreamConnection), 0, 1, 0, 0},
  {&__pyx_n_s_CUeglStreamConnection_2, __pyx_k_CUeglStreamConnection_2, sizeof(__pyx_k_CUeglStreamConnection_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglStreamConnection___reduce_c, __pyx_k_CUeglStreamConnection___reduce_c, sizeof(__pyx_k_CUeglStreamConnection___reduce_c), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglStreamConnection___setstate, __pyx_k_CUeglStreamConnection___setstate, sizeof(__pyx_k_CUeglStreamConnection___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_CUeglStreamConnection_getPtr, __pyx_k_CUeglStreamConnection_getPtr, sizeof(__pyx_k_CUeglStreamConnection_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUevent, __pyx_k_CUevent, sizeof(__pyx_k_CUevent), 0, 1, 0, 0},
  {&__pyx_n_s_CUevent_2, __pyx_k_CUevent_2, sizeof(__pyx_k_CUevent_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUevent___reduce_cython, __pyx_k_CUevent___reduce_cython, sizeof(__pyx_k_CUevent___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUevent___setstate_cython, __pyx_k_CUevent___setstate_cython, sizeof(__pyx_k_CUevent___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUevent_flags, __pyx_k_CUevent_flags, sizeof(__pyx_k_CUevent_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUevent_getPtr, __pyx_k_CUevent_getPtr, sizeof(__pyx_k_CUevent_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUevent_record_flags, __pyx_k_CUevent_record_flags, sizeof(__pyx_k_CUevent_record_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUevent_sched_flags, __pyx_k_CUevent_sched_flags, sizeof(__pyx_k_CUevent_sched_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUevent_wait_flags, __pyx_k_CUevent_wait_flags, sizeof(__pyx_k_CUevent_wait_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinityParam, __pyx_k_CUexecAffinityParam, sizeof(__pyx_k_CUexecAffinityParam), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinityParam_st, __pyx_k_CUexecAffinityParam_st, sizeof(__pyx_k_CUexecAffinityParam_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinityParam_st___reduce, __pyx_k_CUexecAffinityParam_st___reduce, sizeof(__pyx_k_CUexecAffinityParam_st___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinityParam_st___setstat, __pyx_k_CUexecAffinityParam_st___setstat, sizeof(__pyx_k_CUexecAffinityParam_st___setstat), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinityParam_st_getPtr, __pyx_k_CUexecAffinityParam_st_getPtr, sizeof(__pyx_k_CUexecAffinityParam_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinityParam_v1, __pyx_k_CUexecAffinityParam_v1, sizeof(__pyx_k_CUexecAffinityParam_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinityParam_v1_CUexecAf, __pyx_k_CUexecAffinityParam_v1_CUexecAf, sizeof(__pyx_k_CUexecAffinityParam_v1_CUexecAf), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinityParam_v1_CUexecAf_2, __pyx_k_CUexecAffinityParam_v1_CUexecAf_2, sizeof(__pyx_k_CUexecAffinityParam_v1_CUexecAf_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinityParam_v1_CUexecAf_3, __pyx_k_CUexecAffinityParam_v1_CUexecAf_3, sizeof(__pyx_k_CUexecAffinityParam_v1_CUexecAf_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinityParam_v1_CUexecAf_4, __pyx_k_CUexecAffinityParam_v1_CUexecAf_4, sizeof(__pyx_k_CUexecAffinityParam_v1_CUexecAf_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinitySmCount, __pyx_k_CUexecAffinitySmCount, sizeof(__pyx_k_CUexecAffinitySmCount), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinitySmCount_st, __pyx_k_CUexecAffinitySmCount_st, sizeof(__pyx_k_CUexecAffinitySmCount_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinitySmCount_st___reduc, __pyx_k_CUexecAffinitySmCount_st___reduc, sizeof(__pyx_k_CUexecAffinitySmCount_st___reduc), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinitySmCount_st___setst, __pyx_k_CUexecAffinitySmCount_st___setst, sizeof(__pyx_k_CUexecAffinitySmCount_st___setst), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinitySmCount_st_getPtr, __pyx_k_CUexecAffinitySmCount_st_getPtr, sizeof(__pyx_k_CUexecAffinitySmCount_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinitySmCount_v1, __pyx_k_CUexecAffinitySmCount_v1, sizeof(__pyx_k_CUexecAffinitySmCount_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUexecAffinityType, __pyx_k_CUexecAffinityType, sizeof(__pyx_k_CUexecAffinityType), 0, 0, 1, 1},
  {&__pyx_kp_u_CUexternalMemory, __pyx_k_CUexternalMemory, sizeof(__pyx_k_CUexternalMemory), 0, 1, 0, 0},
  {&__pyx_n_s_CUexternalMemoryHandleType, __pyx_k_CUexternalMemoryHandleType, sizeof(__pyx_k_CUexternalMemoryHandleType), 0, 0, 1, 1},
  {&__pyx_n_s_CUexternalMemory_2, __pyx_k_CUexternalMemory_2, sizeof(__pyx_k_CUexternalMemory_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUexternalMemory___reduce_cython, __pyx_k_CUexternalMemory___reduce_cython, sizeof(__pyx_k_CUexternalMemory___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUexternalMemory___setstate_cyth, __pyx_k_CUexternalMemory___setstate_cyth, sizeof(__pyx_k_CUexternalMemory___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_CUexternalMemory_getPtr, __pyx_k_CUexternalMemory_getPtr, sizeof(__pyx_k_CUexternalMemory_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUexternalSemaphore, __pyx_k_CUexternalSemaphore, sizeof(__pyx_k_CUexternalSemaphore), 0, 1, 0, 0},
  {&__pyx_n_s_CUexternalSemaphoreHandleType, __pyx_k_CUexternalSemaphoreHandleType, sizeof(__pyx_k_CUexternalSemaphoreHandleType), 0, 0, 1, 1},
  {&__pyx_n_s_CUexternalSemaphore_2, __pyx_k_CUexternalSemaphore_2, sizeof(__pyx_k_CUexternalSemaphore_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUexternalSemaphore___reduce_cyt, __pyx_k_CUexternalSemaphore___reduce_cyt, sizeof(__pyx_k_CUexternalSemaphore___reduce_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_CUexternalSemaphore___setstate_c, __pyx_k_CUexternalSemaphore___setstate_c, sizeof(__pyx_k_CUexternalSemaphore___setstate_c), 0, 0, 1, 1},
  {&__pyx_n_s_CUexternalSemaphore_getPtr, __pyx_k_CUexternalSemaphore_getPtr, sizeof(__pyx_k_CUexternalSemaphore_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUfilter_mode, __pyx_k_CUfilter_mode, sizeof(__pyx_k_CUfilter_mode), 0, 0, 1, 1},
  {&__pyx_n_s_CUflushGPUDirectRDMAWritesOption, __pyx_k_CUflushGPUDirectRDMAWritesOption, sizeof(__pyx_k_CUflushGPUDirectRDMAWritesOption), 0, 0, 1, 1},
  {&__pyx_n_s_CUflushGPUDirectRDMAWritesScope, __pyx_k_CUflushGPUDirectRDMAWritesScope, sizeof(__pyx_k_CUflushGPUDirectRDMAWritesScope), 0, 0, 1, 1},
  {&__pyx_n_s_CUflushGPUDirectRDMAWritesTarget, __pyx_k_CUflushGPUDirectRDMAWritesTarget, sizeof(__pyx_k_CUflushGPUDirectRDMAWritesTarget), 0, 0, 1, 1},
  {&__pyx_n_s_CUfunc_cache, __pyx_k_CUfunc_cache, sizeof(__pyx_k_CUfunc_cache), 0, 0, 1, 1},
  {&__pyx_kp_u_CUfunction, __pyx_k_CUfunction, sizeof(__pyx_k_CUfunction), 0, 1, 0, 0},
  {&__pyx_n_s_CUfunction_2, __pyx_k_CUfunction_2, sizeof(__pyx_k_CUfunction_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUfunction___reduce_cython, __pyx_k_CUfunction___reduce_cython, sizeof(__pyx_k_CUfunction___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUfunction___setstate_cython, __pyx_k_CUfunction___setstate_cython, sizeof(__pyx_k_CUfunction___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUfunction_attribute, __pyx_k_CUfunction_attribute, sizeof(__pyx_k_CUfunction_attribute), 0, 0, 1, 1},
  {&__pyx_n_s_CUfunction_getPtr, __pyx_k_CUfunction_getPtr, sizeof(__pyx_k_CUfunction_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUgraph, __pyx_k_CUgraph, sizeof(__pyx_k_CUgraph), 0, 1, 0, 0},
  {&__pyx_n_s_CUgraphDebugDot_flags, __pyx_k_CUgraphDebugDot_flags, sizeof(__pyx_k_CUgraphDebugDot_flags), 0, 0, 1, 1},
  {&__pyx_kp_u_CUgraphExec, __pyx_k_CUgraphExec, sizeof(__pyx_k_CUgraphExec), 0, 1, 0, 0},
  {&__pyx_n_s_CUgraphExecUpdateResult, __pyx_k_CUgraphExecUpdateResult, sizeof(__pyx_k_CUgraphExecUpdateResult), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphExec_2, __pyx_k_CUgraphExec_2, sizeof(__pyx_k_CUgraphExec_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphExec___reduce_cython, __pyx_k_CUgraphExec___reduce_cython, sizeof(__pyx_k_CUgraphExec___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphExec___setstate_cython, __pyx_k_CUgraphExec___setstate_cython, sizeof(__pyx_k_CUgraphExec___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphExec_getPtr, __pyx_k_CUgraphExec_getPtr, sizeof(__pyx_k_CUgraphExec_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphInstantiate_flags, __pyx_k_CUgraphInstantiate_flags, sizeof(__pyx_k_CUgraphInstantiate_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphMem_attribute, __pyx_k_CUgraphMem_attribute, sizeof(__pyx_k_CUgraphMem_attribute), 0, 0, 1, 1},
  {&__pyx_kp_u_CUgraphNode, __pyx_k_CUgraphNode, sizeof(__pyx_k_CUgraphNode), 0, 1, 0, 0},
  {&__pyx_n_s_CUgraphNodeType, __pyx_k_CUgraphNodeType, sizeof(__pyx_k_CUgraphNodeType), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphNode_2, __pyx_k_CUgraphNode_2, sizeof(__pyx_k_CUgraphNode_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphNode___reduce_cython, __pyx_k_CUgraphNode___reduce_cython, sizeof(__pyx_k_CUgraphNode___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphNode___setstate_cython, __pyx_k_CUgraphNode___setstate_cython, sizeof(__pyx_k_CUgraphNode___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphNode_getPtr, __pyx_k_CUgraphNode_getPtr, sizeof(__pyx_k_CUgraphNode_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraph_2, __pyx_k_CUgraph_2, sizeof(__pyx_k_CUgraph_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraph___reduce_cython, __pyx_k_CUgraph___reduce_cython, sizeof(__pyx_k_CUgraph___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraph___setstate_cython, __pyx_k_CUgraph___setstate_cython, sizeof(__pyx_k_CUgraph___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraph_getPtr, __pyx_k_CUgraph_getPtr, sizeof(__pyx_k_CUgraph_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphicsMapResourceFlags, __pyx_k_CUgraphicsMapResourceFlags, sizeof(__pyx_k_CUgraphicsMapResourceFlags), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphicsRegisterFlags, __pyx_k_CUgraphicsRegisterFlags, sizeof(__pyx_k_CUgraphicsRegisterFlags), 0, 0, 1, 1},
  {&__pyx_kp_u_CUgraphicsResource, __pyx_k_CUgraphicsResource, sizeof(__pyx_k_CUgraphicsResource), 0, 1, 0, 0},
  {&__pyx_n_s_CUgraphicsResource_2, __pyx_k_CUgraphicsResource_2, sizeof(__pyx_k_CUgraphicsResource_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphicsResource___reduce_cyth, __pyx_k_CUgraphicsResource___reduce_cyth, sizeof(__pyx_k_CUgraphicsResource___reduce_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphicsResource___setstate_cy, __pyx_k_CUgraphicsResource___setstate_cy, sizeof(__pyx_k_CUgraphicsResource___setstate_cy), 0, 0, 1, 1},
  {&__pyx_n_s_CUgraphicsResource_getPtr, __pyx_k_CUgraphicsResource_getPtr, sizeof(__pyx_k_CUgraphicsResource_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUhostFn, __pyx_k_CUhostFn, sizeof(__pyx_k_CUhostFn), 0, 1, 0, 0},
  {&__pyx_n_s_CUhostFn_2, __pyx_k_CUhostFn_2, sizeof(__pyx_k_CUhostFn_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUhostFn___reduce_cython, __pyx_k_CUhostFn___reduce_cython, sizeof(__pyx_k_CUhostFn___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUhostFn___setstate_cython, __pyx_k_CUhostFn___setstate_cython, sizeof(__pyx_k_CUhostFn___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUhostFn_getPtr, __pyx_k_CUhostFn_getPtr, sizeof(__pyx_k_CUhostFn_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUipcEventHandle, __pyx_k_CUipcEventHandle, sizeof(__pyx_k_CUipcEventHandle), 0, 0, 1, 1},
  {&__pyx_n_u_CUipcEventHandle, __pyx_k_CUipcEventHandle, sizeof(__pyx_k_CUipcEventHandle), 0, 1, 0, 1},
  {&__pyx_n_s_CUipcEventHandle_st, __pyx_k_CUipcEventHandle_st, sizeof(__pyx_k_CUipcEventHandle_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUipcEventHandle_st___reduce_cyt, __pyx_k_CUipcEventHandle_st___reduce_cyt, sizeof(__pyx_k_CUipcEventHandle_st___reduce_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_CUipcEventHandle_st___setstate_c, __pyx_k_CUipcEventHandle_st___setstate_c, sizeof(__pyx_k_CUipcEventHandle_st___setstate_c), 0, 0, 1, 1},
  {&__pyx_n_s_CUipcEventHandle_st_getPtr, __pyx_k_CUipcEventHandle_st_getPtr, sizeof(__pyx_k_CUipcEventHandle_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUipcEventHandle_v1, __pyx_k_CUipcEventHandle_v1, sizeof(__pyx_k_CUipcEventHandle_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUipcMemHandle, __pyx_k_CUipcMemHandle, sizeof(__pyx_k_CUipcMemHandle), 0, 0, 1, 1},
  {&__pyx_n_u_CUipcMemHandle, __pyx_k_CUipcMemHandle, sizeof(__pyx_k_CUipcMemHandle), 0, 1, 0, 1},
  {&__pyx_n_s_CUipcMemHandle_st, __pyx_k_CUipcMemHandle_st, sizeof(__pyx_k_CUipcMemHandle_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUipcMemHandle_st___reduce_cytho, __pyx_k_CUipcMemHandle_st___reduce_cytho, sizeof(__pyx_k_CUipcMemHandle_st___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_CUipcMemHandle_st___setstate_cyt, __pyx_k_CUipcMemHandle_st___setstate_cyt, sizeof(__pyx_k_CUipcMemHandle_st___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_CUipcMemHandle_st_getPtr, __pyx_k_CUipcMemHandle_st_getPtr, sizeof(__pyx_k_CUipcMemHandle_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUipcMemHandle_v1, __pyx_k_CUipcMemHandle_v1, sizeof(__pyx_k_CUipcMemHandle_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUipcMem_flags, __pyx_k_CUipcMem_flags, sizeof(__pyx_k_CUipcMem_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUjitInputType, __pyx_k_CUjitInputType, sizeof(__pyx_k_CUjitInputType), 0, 0, 1, 1},
  {&__pyx_n_s_CUjit_cacheMode, __pyx_k_CUjit_cacheMode, sizeof(__pyx_k_CUjit_cacheMode), 0, 0, 1, 1},
  {&__pyx_n_s_CUjit_fallback, __pyx_k_CUjit_fallback, sizeof(__pyx_k_CUjit_fallback), 0, 0, 1, 1},
  {&__pyx_n_s_CUjit_option, __pyx_k_CUjit_option, sizeof(__pyx_k_CUjit_option), 0, 0, 1, 1},
  {&__pyx_n_s_CUjit_target, __pyx_k_CUjit_target, sizeof(__pyx_k_CUjit_target), 0, 0, 1, 1},
  {&__pyx_n_s_CUkernelNodeAttrID, __pyx_k_CUkernelNodeAttrID, sizeof(__pyx_k_CUkernelNodeAttrID), 0, 0, 1, 1},
  {&__pyx_n_s_CUkernelNodeAttrValue, __pyx_k_CUkernelNodeAttrValue, sizeof(__pyx_k_CUkernelNodeAttrValue), 0, 0, 1, 1},
  {&__pyx_n_u_CUkernelNodeAttrValue, __pyx_k_CUkernelNodeAttrValue, sizeof(__pyx_k_CUkernelNodeAttrValue), 0, 1, 0, 1},
  {&__pyx_n_s_CUkernelNodeAttrValue_v1, __pyx_k_CUkernelNodeAttrValue_v1, sizeof(__pyx_k_CUkernelNodeAttrValue_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttribute, __pyx_k_CUlaunchAttribute, sizeof(__pyx_k_CUlaunchAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeID, __pyx_k_CUlaunchAttributeID, sizeof(__pyx_k_CUlaunchAttributeID), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue, __pyx_k_CUlaunchAttributeValue, sizeof(__pyx_k_CUlaunchAttributeValue), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue_CUlaunch, __pyx_k_CUlaunchAttributeValue_CUlaunch, sizeof(__pyx_k_CUlaunchAttributeValue_CUlaunch), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue_CUlaunch_2, __pyx_k_CUlaunchAttributeValue_CUlaunch_2, sizeof(__pyx_k_CUlaunchAttributeValue_CUlaunch_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue_CUlaunch_3, __pyx_k_CUlaunchAttributeValue_CUlaunch_3, sizeof(__pyx_k_CUlaunchAttributeValue_CUlaunch_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue_CUlaunch_4, __pyx_k_CUlaunchAttributeValue_CUlaunch_4, sizeof(__pyx_k_CUlaunchAttributeValue_CUlaunch_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue_CUlaunch_5, __pyx_k_CUlaunchAttributeValue_CUlaunch_5, sizeof(__pyx_k_CUlaunchAttributeValue_CUlaunch_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue_CUlaunch_6, __pyx_k_CUlaunchAttributeValue_CUlaunch_6, sizeof(__pyx_k_CUlaunchAttributeValue_CUlaunch_6), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue_CUlaunch_7, __pyx_k_CUlaunchAttributeValue_CUlaunch_7, sizeof(__pyx_k_CUlaunchAttributeValue_CUlaunch_7), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue_CUlaunch_8, __pyx_k_CUlaunchAttributeValue_CUlaunch_8, sizeof(__pyx_k_CUlaunchAttributeValue_CUlaunch_8), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue_union, __pyx_k_CUlaunchAttributeValue_union, sizeof(__pyx_k_CUlaunchAttributeValue_union), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue_union___r, __pyx_k_CUlaunchAttributeValue_union___r, sizeof(__pyx_k_CUlaunchAttributeValue_union___r), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue_union___s, __pyx_k_CUlaunchAttributeValue_union___s, sizeof(__pyx_k_CUlaunchAttributeValue_union___s), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttributeValue_union_get, __pyx_k_CUlaunchAttributeValue_union_get, sizeof(__pyx_k_CUlaunchAttributeValue_union_get), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttribute_st, __pyx_k_CUlaunchAttribute_st, sizeof(__pyx_k_CUlaunchAttribute_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttribute_st___reduce_cy, __pyx_k_CUlaunchAttribute_st___reduce_cy, sizeof(__pyx_k_CUlaunchAttribute_st___reduce_cy), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttribute_st___setstate, __pyx_k_CUlaunchAttribute_st___setstate, sizeof(__pyx_k_CUlaunchAttribute_st___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchAttribute_st_getPtr, __pyx_k_CUlaunchAttribute_st_getPtr, sizeof(__pyx_k_CUlaunchAttribute_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchConfig, __pyx_k_CUlaunchConfig, sizeof(__pyx_k_CUlaunchConfig), 0, 0, 1, 1},
  {&__pyx_n_u_CUlaunchConfig, __pyx_k_CUlaunchConfig, sizeof(__pyx_k_CUlaunchConfig), 0, 1, 0, 1},
  {&__pyx_n_s_CUlaunchConfig_st, __pyx_k_CUlaunchConfig_st, sizeof(__pyx_k_CUlaunchConfig_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchConfig_st___reduce_cytho, __pyx_k_CUlaunchConfig_st___reduce_cytho, sizeof(__pyx_k_CUlaunchConfig_st___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchConfig_st___setstate_cyt, __pyx_k_CUlaunchConfig_st___setstate_cyt, sizeof(__pyx_k_CUlaunchConfig_st___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_CUlaunchConfig_st_getPtr, __pyx_k_CUlaunchConfig_st_getPtr, sizeof(__pyx_k_CUlaunchConfig_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUlimit, __pyx_k_CUlimit, sizeof(__pyx_k_CUlimit), 0, 0, 1, 1},
  {&__pyx_kp_u_CUlinkState, __pyx_k_CUlinkState, sizeof(__pyx_k_CUlinkState), 0, 1, 0, 0},
  {&__pyx_n_s_CUlinkState_2, __pyx_k_CUlinkState_2, sizeof(__pyx_k_CUlinkState_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUlinkState___reduce_cython, __pyx_k_CUlinkState___reduce_cython, sizeof(__pyx_k_CUlinkState___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUlinkState___setstate_cython, __pyx_k_CUlinkState___setstate_cython, sizeof(__pyx_k_CUlinkState___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUlinkState_getPtr, __pyx_k_CUlinkState_getPtr, sizeof(__pyx_k_CUlinkState_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAccessDesc, __pyx_k_CUmemAccessDesc, sizeof(__pyx_k_CUmemAccessDesc), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAccessDesc_st, __pyx_k_CUmemAccessDesc_st, sizeof(__pyx_k_CUmemAccessDesc_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAccessDesc_st___reduce_cyth, __pyx_k_CUmemAccessDesc_st___reduce_cyth, sizeof(__pyx_k_CUmemAccessDesc_st___reduce_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAccessDesc_st___setstate_cy, __pyx_k_CUmemAccessDesc_st___setstate_cy, sizeof(__pyx_k_CUmemAccessDesc_st___setstate_cy), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAccessDesc_st_getPtr, __pyx_k_CUmemAccessDesc_st_getPtr, sizeof(__pyx_k_CUmemAccessDesc_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAccessDesc_v1, __pyx_k_CUmemAccessDesc_v1, sizeof(__pyx_k_CUmemAccessDesc_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAccess_flags, __pyx_k_CUmemAccess_flags, sizeof(__pyx_k_CUmemAccess_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationCompType, __pyx_k_CUmemAllocationCompType, sizeof(__pyx_k_CUmemAllocationCompType), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationGranularity_flags, __pyx_k_CUmemAllocationGranularity_flags, sizeof(__pyx_k_CUmemAllocationGranularity_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationHandleType, __pyx_k_CUmemAllocationHandleType, sizeof(__pyx_k_CUmemAllocationHandleType), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationProp, __pyx_k_CUmemAllocationProp, sizeof(__pyx_k_CUmemAllocationProp), 0, 0, 1, 1},
  {&__pyx_n_u_CUmemAllocationProp, __pyx_k_CUmemAllocationProp, sizeof(__pyx_k_CUmemAllocationProp), 0, 1, 0, 1},
  {&__pyx_n_s_CUmemAllocationProp_st, __pyx_k_CUmemAllocationProp_st, sizeof(__pyx_k_CUmemAllocationProp_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationProp_st___reduce, __pyx_k_CUmemAllocationProp_st___reduce, sizeof(__pyx_k_CUmemAllocationProp_st___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationProp_st___setstat, __pyx_k_CUmemAllocationProp_st___setstat, sizeof(__pyx_k_CUmemAllocationProp_st___setstat), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationProp_st_getPtr, __pyx_k_CUmemAllocationProp_st_getPtr, sizeof(__pyx_k_CUmemAllocationProp_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationProp_v1, __pyx_k_CUmemAllocationProp_v1, sizeof(__pyx_k_CUmemAllocationProp_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationProp_v1_CUmemAll, __pyx_k_CUmemAllocationProp_v1_CUmemAll, sizeof(__pyx_k_CUmemAllocationProp_v1_CUmemAll), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationProp_v1_CUmemAll_2, __pyx_k_CUmemAllocationProp_v1_CUmemAll_2, sizeof(__pyx_k_CUmemAllocationProp_v1_CUmemAll_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationProp_v1_CUmemAll_3, __pyx_k_CUmemAllocationProp_v1_CUmemAll_3, sizeof(__pyx_k_CUmemAllocationProp_v1_CUmemAll_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationProp_v1_CUmemAll_4, __pyx_k_CUmemAllocationProp_v1_CUmemAll_4, sizeof(__pyx_k_CUmemAllocationProp_v1_CUmemAll_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAllocationType, __pyx_k_CUmemAllocationType, sizeof(__pyx_k_CUmemAllocationType), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemAttach_flags, __pyx_k_CUmemAttach_flags, sizeof(__pyx_k_CUmemAttach_flags), 0, 0, 1, 1},
  {&__pyx_kp_u_CUmemGenericAllocationHandle, __pyx_k_CUmemGenericAllocationHandle, sizeof(__pyx_k_CUmemGenericAllocationHandle), 0, 1, 0, 0},
  {&__pyx_n_s_CUmemGenericAllocationHandle_2, __pyx_k_CUmemGenericAllocationHandle_2, sizeof(__pyx_k_CUmemGenericAllocationHandle_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemGenericAllocationHandle___r, __pyx_k_CUmemGenericAllocationHandle___r, sizeof(__pyx_k_CUmemGenericAllocationHandle___r), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemGenericAllocationHandle___s, __pyx_k_CUmemGenericAllocationHandle___s, sizeof(__pyx_k_CUmemGenericAllocationHandle___s), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemGenericAllocationHandle_get, __pyx_k_CUmemGenericAllocationHandle_get, sizeof(__pyx_k_CUmemGenericAllocationHandle_get), 0, 0, 1, 1},
  {&__pyx_kp_u_CUmemGenericAllocationHandle_v1, __pyx_k_CUmemGenericAllocationHandle_v1, sizeof(__pyx_k_CUmemGenericAllocationHandle_v1), 0, 1, 0, 0},
  {&__pyx_n_s_CUmemGenericAllocationHandle_v1_2, __pyx_k_CUmemGenericAllocationHandle_v1_2, sizeof(__pyx_k_CUmemGenericAllocationHandle_v1_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemGenericAllocationHandle_v1_3, __pyx_k_CUmemGenericAllocationHandle_v1_3, sizeof(__pyx_k_CUmemGenericAllocationHandle_v1_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemGenericAllocationHandle_v1_4, __pyx_k_CUmemGenericAllocationHandle_v1_4, sizeof(__pyx_k_CUmemGenericAllocationHandle_v1_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemGenericAllocationHandle_v1_5, __pyx_k_CUmemGenericAllocationHandle_v1_5, sizeof(__pyx_k_CUmemGenericAllocationHandle_v1_5), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemHandleType, __pyx_k_CUmemHandleType, sizeof(__pyx_k_CUmemHandleType), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemLocation, __pyx_k_CUmemLocation, sizeof(__pyx_k_CUmemLocation), 0, 0, 1, 1},
  {&__pyx_n_u_CUmemLocation, __pyx_k_CUmemLocation, sizeof(__pyx_k_CUmemLocation), 0, 1, 0, 1},
  {&__pyx_n_s_CUmemLocationType, __pyx_k_CUmemLocationType, sizeof(__pyx_k_CUmemLocationType), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemLocation_st, __pyx_k_CUmemLocation_st, sizeof(__pyx_k_CUmemLocation_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemLocation_st___reduce_cython, __pyx_k_CUmemLocation_st___reduce_cython, sizeof(__pyx_k_CUmemLocation_st___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemLocation_st___setstate_cyth, __pyx_k_CUmemLocation_st___setstate_cyth, sizeof(__pyx_k_CUmemLocation_st___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemLocation_st_getPtr, __pyx_k_CUmemLocation_st_getPtr, sizeof(__pyx_k_CUmemLocation_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemLocation_v1, __pyx_k_CUmemLocation_v1, sizeof(__pyx_k_CUmemLocation_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemOperationType, __pyx_k_CUmemOperationType, sizeof(__pyx_k_CUmemOperationType), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemPoolProps, __pyx_k_CUmemPoolProps, sizeof(__pyx_k_CUmemPoolProps), 0, 0, 1, 1},
  {&__pyx_n_u_CUmemPoolProps, __pyx_k_CUmemPoolProps, sizeof(__pyx_k_CUmemPoolProps), 0, 1, 0, 1},
  {&__pyx_n_s_CUmemPoolProps_st, __pyx_k_CUmemPoolProps_st, sizeof(__pyx_k_CUmemPoolProps_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemPoolProps_st___reduce_cytho, __pyx_k_CUmemPoolProps_st___reduce_cytho, sizeof(__pyx_k_CUmemPoolProps_st___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemPoolProps_st___setstate_cyt, __pyx_k_CUmemPoolProps_st___setstate_cyt, sizeof(__pyx_k_CUmemPoolProps_st___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemPoolProps_st_getPtr, __pyx_k_CUmemPoolProps_st_getPtr, sizeof(__pyx_k_CUmemPoolProps_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemPoolProps_v1, __pyx_k_CUmemPoolProps_v1, sizeof(__pyx_k_CUmemPoolProps_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemPoolPtrExportData, __pyx_k_CUmemPoolPtrExportData, sizeof(__pyx_k_CUmemPoolPtrExportData), 0, 0, 1, 1},
  {&__pyx_n_u_CUmemPoolPtrExportData, __pyx_k_CUmemPoolPtrExportData, sizeof(__pyx_k_CUmemPoolPtrExportData), 0, 1, 0, 1},
  {&__pyx_n_s_CUmemPoolPtrExportData_st, __pyx_k_CUmemPoolPtrExportData_st, sizeof(__pyx_k_CUmemPoolPtrExportData_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemPoolPtrExportData_st___redu, __pyx_k_CUmemPoolPtrExportData_st___redu, sizeof(__pyx_k_CUmemPoolPtrExportData_st___redu), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemPoolPtrExportData_st___sets, __pyx_k_CUmemPoolPtrExportData_st___sets, sizeof(__pyx_k_CUmemPoolPtrExportData_st___sets), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemPoolPtrExportData_st_getPtr, __pyx_k_CUmemPoolPtrExportData_st_getPtr, sizeof(__pyx_k_CUmemPoolPtrExportData_st_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemPoolPtrExportData_v1, __pyx_k_CUmemPoolPtrExportData_v1, sizeof(__pyx_k_CUmemPoolPtrExportData_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemPool_attribute, __pyx_k_CUmemPool_attribute, sizeof(__pyx_k_CUmemPool_attribute), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemRangeHandleType, __pyx_k_CUmemRangeHandleType, sizeof(__pyx_k_CUmemRangeHandleType), 0, 0, 1, 1},
  {&__pyx_n_s_CUmem_advise, __pyx_k_CUmem_advise, sizeof(__pyx_k_CUmem_advise), 0, 0, 1, 1},
  {&__pyx_n_s_CUmem_range_attribute, __pyx_k_CUmem_range_attribute, sizeof(__pyx_k_CUmem_range_attribute), 0, 0, 1, 1},
  {&__pyx_kp_u_CUmemoryPool, __pyx_k_CUmemoryPool, sizeof(__pyx_k_CUmemoryPool), 0, 1, 0, 0},
  {&__pyx_n_s_CUmemoryPool_2, __pyx_k_CUmemoryPool_2, sizeof(__pyx_k_CUmemoryPool_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemoryPool___reduce_cython, __pyx_k_CUmemoryPool___reduce_cython, sizeof(__pyx_k_CUmemoryPool___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemoryPool___setstate_cython, __pyx_k_CUmemoryPool___setstate_cython, sizeof(__pyx_k_CUmemoryPool___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemoryPool_getPtr, __pyx_k_CUmemoryPool_getPtr, sizeof(__pyx_k_CUmemoryPool_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUmemorytype, __pyx_k_CUmemorytype, sizeof(__pyx_k_CUmemorytype), 0, 0, 1, 1},
  {&__pyx_kp_u_CUmipmappedArray, __pyx_k_CUmipmappedArray, sizeof(__pyx_k_CUmipmappedArray), 0, 1, 0, 0},
  {&__pyx_n_s_CUmipmappedArray_2, __pyx_k_CUmipmappedArray_2, sizeof(__pyx_k_CUmipmappedArray_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUmipmappedArray___reduce_cython, __pyx_k_CUmipmappedArray___reduce_cython, sizeof(__pyx_k_CUmipmappedArray___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUmipmappedArray___setstate_cyth, __pyx_k_CUmipmappedArray___setstate_cyth, sizeof(__pyx_k_CUmipmappedArray___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_CUmipmappedArray_getPtr, __pyx_k_CUmipmappedArray_getPtr, sizeof(__pyx_k_CUmipmappedArray_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUmodule, __pyx_k_CUmodule, sizeof(__pyx_k_CUmodule), 0, 1, 0, 0},
  {&__pyx_n_s_CUmoduleLoadingMode, __pyx_k_CUmoduleLoadingMode, sizeof(__pyx_k_CUmoduleLoadingMode), 0, 0, 1, 1},
  {&__pyx_n_s_CUmodule_2, __pyx_k_CUmodule_2, sizeof(__pyx_k_CUmodule_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUmodule___reduce_cython, __pyx_k_CUmodule___reduce_cython, sizeof(__pyx_k_CUmodule___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUmodule___setstate_cython, __pyx_k_CUmodule___setstate_cython, sizeof(__pyx_k_CUmodule___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUmodule_getPtr, __pyx_k_CUmodule_getPtr, sizeof(__pyx_k_CUmodule_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUoccupancyB2DSize, __pyx_k_CUoccupancyB2DSize, sizeof(__pyx_k_CUoccupancyB2DSize), 0, 1, 0, 0},
  {&__pyx_n_s_CUoccupancyB2DSize_2, __pyx_k_CUoccupancyB2DSize_2, sizeof(__pyx_k_CUoccupancyB2DSize_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUoccupancyB2DSize___reduce_cyth, __pyx_k_CUoccupancyB2DSize___reduce_cyth, sizeof(__pyx_k_CUoccupancyB2DSize___reduce_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_CUoccupancyB2DSize___setstate_cy, __pyx_k_CUoccupancyB2DSize___setstate_cy, sizeof(__pyx_k_CUoccupancyB2DSize___setstate_cy), 0, 0, 1, 1},
  {&__pyx_n_s_CUoccupancyB2DSize_getPtr, __pyx_k_CUoccupancyB2DSize_getPtr, sizeof(__pyx_k_CUoccupancyB2DSize_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUoccupancy_flags, __pyx_k_CUoccupancy_flags, sizeof(__pyx_k_CUoccupancy_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUoutput_mode, __pyx_k_CUoutput_mode, sizeof(__pyx_k_CUoutput_mode), 0, 0, 1, 1},
  {&__pyx_n_s_CUpointer_attribute, __pyx_k_CUpointer_attribute, sizeof(__pyx_k_CUpointer_attribute), 0, 0, 1, 1},
  {&__pyx_n_s_CUresourceViewFormat, __pyx_k_CUresourceViewFormat, sizeof(__pyx_k_CUresourceViewFormat), 0, 0, 1, 1},
  {&__pyx_n_s_CUresourcetype, __pyx_k_CUresourcetype, sizeof(__pyx_k_CUresourcetype), 0, 0, 1, 1},
  {&__pyx_n_s_CUresult, __pyx_k_CUresult, sizeof(__pyx_k_CUresult), 0, 0, 1, 1},
  {&__pyx_n_s_CUshared_carveout, __pyx_k_CUshared_carveout, sizeof(__pyx_k_CUshared_carveout), 0, 0, 1, 1},
  {&__pyx_n_s_CUsharedconfig, __pyx_k_CUsharedconfig, sizeof(__pyx_k_CUsharedconfig), 0, 0, 1, 1},
  {&__pyx_kp_u_CUstream, __pyx_k_CUstream, sizeof(__pyx_k_CUstream), 0, 1, 0, 0},
  {&__pyx_n_s_CUstreamAttrID, __pyx_k_CUstreamAttrID, sizeof(__pyx_k_CUstreamAttrID), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamAttrValue, __pyx_k_CUstreamAttrValue, sizeof(__pyx_k_CUstreamAttrValue), 0, 0, 1, 1},
  {&__pyx_n_u_CUstreamAttrValue, __pyx_k_CUstreamAttrValue, sizeof(__pyx_k_CUstreamAttrValue), 0, 1, 0, 1},
  {&__pyx_n_s_CUstreamAttrValue_v1, __pyx_k_CUstreamAttrValue_v1, sizeof(__pyx_k_CUstreamAttrValue_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamBatchMemOpParams, __pyx_k_CUstreamBatchMemOpParams, sizeof(__pyx_k_CUstreamBatchMemOpParams), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamBatchMemOpParams_union, __pyx_k_CUstreamBatchMemOpParams_union, sizeof(__pyx_k_CUstreamBatchMemOpParams_union), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamBatchMemOpParams_union_2, __pyx_k_CUstreamBatchMemOpParams_union_2, sizeof(__pyx_k_CUstreamBatchMemOpParams_union_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamBatchMemOpParams_union_3, __pyx_k_CUstreamBatchMemOpParams_union_3, sizeof(__pyx_k_CUstreamBatchMemOpParams_union_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamBatchMemOpParams_union_g, __pyx_k_CUstreamBatchMemOpParams_union_g, sizeof(__pyx_k_CUstreamBatchMemOpParams_union_g), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamBatchMemOpParams_v1, __pyx_k_CUstreamBatchMemOpParams_v1, sizeof(__pyx_k_CUstreamBatchMemOpParams_v1), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamBatchMemOpType, __pyx_k_CUstreamBatchMemOpType, sizeof(__pyx_k_CUstreamBatchMemOpType), 0, 0, 1, 1},
  {&__pyx_kp_u_CUstreamCallback, __pyx_k_CUstreamCallback, sizeof(__pyx_k_CUstreamCallback), 0, 1, 0, 0},
  {&__pyx_n_s_CUstreamCallback_2, __pyx_k_CUstreamCallback_2, sizeof(__pyx_k_CUstreamCallback_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamCallback___reduce_cython, __pyx_k_CUstreamCallback___reduce_cython, sizeof(__pyx_k_CUstreamCallback___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamCallback___setstate_cyth, __pyx_k_CUstreamCallback___setstate_cyth, sizeof(__pyx_k_CUstreamCallback___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamCallback_getPtr, __pyx_k_CUstreamCallback_getPtr, sizeof(__pyx_k_CUstreamCallback_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamCaptureMode, __pyx_k_CUstreamCaptureMode, sizeof(__pyx_k_CUstreamCaptureMode), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamCaptureStatus, __pyx_k_CUstreamCaptureStatus, sizeof(__pyx_k_CUstreamCaptureStatus), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpFlushRemoteWritesPa, __pyx_k_CUstreamMemOpFlushRemoteWritesPa, sizeof(__pyx_k_CUstreamMemOpFlushRemoteWritesPa), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpFlushRemoteWritesPa_2, __pyx_k_CUstreamMemOpFlushRemoteWritesPa_2, sizeof(__pyx_k_CUstreamMemOpFlushRemoteWritesPa_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpFlushRemoteWritesPa_3, __pyx_k_CUstreamMemOpFlushRemoteWritesPa_3, sizeof(__pyx_k_CUstreamMemOpFlushRemoteWritesPa_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpFlushRemoteWritesPa_4, __pyx_k_CUstreamMemOpFlushRemoteWritesPa_4, sizeof(__pyx_k_CUstreamMemOpFlushRemoteWritesPa_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpMemoryBarrierParams, __pyx_k_CUstreamMemOpMemoryBarrierParams, sizeof(__pyx_k_CUstreamMemOpMemoryBarrierParams), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpMemoryBarrierParams_2, __pyx_k_CUstreamMemOpMemoryBarrierParams_2, sizeof(__pyx_k_CUstreamMemOpMemoryBarrierParams_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpMemoryBarrierParams_3, __pyx_k_CUstreamMemOpMemoryBarrierParams_3, sizeof(__pyx_k_CUstreamMemOpMemoryBarrierParams_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpMemoryBarrierParams_4, __pyx_k_CUstreamMemOpMemoryBarrierParams_4, sizeof(__pyx_k_CUstreamMemOpMemoryBarrierParams_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpWaitValueParams_st, __pyx_k_CUstreamMemOpWaitValueParams_st, sizeof(__pyx_k_CUstreamMemOpWaitValueParams_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpWaitValueParams_st_2, __pyx_k_CUstreamMemOpWaitValueParams_st_2, sizeof(__pyx_k_CUstreamMemOpWaitValueParams_st_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpWaitValueParams_st_3, __pyx_k_CUstreamMemOpWaitValueParams_st_3, sizeof(__pyx_k_CUstreamMemOpWaitValueParams_st_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpWaitValueParams_st_4, __pyx_k_CUstreamMemOpWaitValueParams_st_4, sizeof(__pyx_k_CUstreamMemOpWaitValueParams_st_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpWriteValueParams_st, __pyx_k_CUstreamMemOpWriteValueParams_st, sizeof(__pyx_k_CUstreamMemOpWriteValueParams_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpWriteValueParams_st_2, __pyx_k_CUstreamMemOpWriteValueParams_st_2, sizeof(__pyx_k_CUstreamMemOpWriteValueParams_st_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpWriteValueParams_st_3, __pyx_k_CUstreamMemOpWriteValueParams_st_3, sizeof(__pyx_k_CUstreamMemOpWriteValueParams_st_3), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemOpWriteValueParams_st_4, __pyx_k_CUstreamMemOpWriteValueParams_st_4, sizeof(__pyx_k_CUstreamMemOpWriteValueParams_st_4), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamMemoryBarrier_flags, __pyx_k_CUstreamMemoryBarrier_flags, sizeof(__pyx_k_CUstreamMemoryBarrier_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamUpdateCaptureDependencie, __pyx_k_CUstreamUpdateCaptureDependencie, sizeof(__pyx_k_CUstreamUpdateCaptureDependencie), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamWaitValue_flags, __pyx_k_CUstreamWaitValue_flags, sizeof(__pyx_k_CUstreamWaitValue_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUstreamWriteValue_flags, __pyx_k_CUstreamWriteValue_flags, sizeof(__pyx_k_CUstreamWriteValue_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUstream_2, __pyx_k_CUstream_2, sizeof(__pyx_k_CUstream_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUstream___reduce_cython, __pyx_k_CUstream___reduce_cython, sizeof(__pyx_k_CUstream___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUstream___setstate_cython, __pyx_k_CUstream___setstate_cython, sizeof(__pyx_k_CUstream___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUstream_flags, __pyx_k_CUstream_flags, sizeof(__pyx_k_CUstream_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUstream_getPtr, __pyx_k_CUstream_getPtr, sizeof(__pyx_k_CUstream_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUsurfObject, __pyx_k_CUsurfObject, sizeof(__pyx_k_CUsurfObject), 0, 1, 0, 0},
  {&__pyx_n_s_CUsurfObject_2, __pyx_k_CUsurfObject_2, sizeof(__pyx_k_CUsurfObject_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUsurfObject___reduce_cython, __pyx_k_CUsurfObject___reduce_cython, sizeof(__pyx_k_CUsurfObject___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUsurfObject___setstate_cython, __pyx_k_CUsurfObject___setstate_cython, sizeof(__pyx_k_CUsurfObject___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUsurfObject_getPtr, __pyx_k_CUsurfObject_getPtr, sizeof(__pyx_k_CUsurfObject_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUsurfObject_v1, __pyx_k_CUsurfObject_v1, sizeof(__pyx_k_CUsurfObject_v1), 0, 1, 0, 0},
  {&__pyx_n_s_CUsurfObject_v1_2, __pyx_k_CUsurfObject_v1_2, sizeof(__pyx_k_CUsurfObject_v1_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUsurfObject_v1___reduce_cython, __pyx_k_CUsurfObject_v1___reduce_cython, sizeof(__pyx_k_CUsurfObject_v1___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUsurfObject_v1___setstate_cytho, __pyx_k_CUsurfObject_v1___setstate_cytho, sizeof(__pyx_k_CUsurfObject_v1___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_CUsurfObject_v1_getPtr, __pyx_k_CUsurfObject_v1_getPtr, sizeof(__pyx_k_CUsurfObject_v1_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUsurfref, __pyx_k_CUsurfref, sizeof(__pyx_k_CUsurfref), 0, 1, 0, 0},
  {&__pyx_n_s_CUsurfref_2, __pyx_k_CUsurfref_2, sizeof(__pyx_k_CUsurfref_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUsurfref___reduce_cython, __pyx_k_CUsurfref___reduce_cython, sizeof(__pyx_k_CUsurfref___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUsurfref___setstate_cython, __pyx_k_CUsurfref___setstate_cython, sizeof(__pyx_k_CUsurfref___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUsurfref_getPtr, __pyx_k_CUsurfref_getPtr, sizeof(__pyx_k_CUsurfref_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUsynchronizationPolicy, __pyx_k_CUsynchronizationPolicy, sizeof(__pyx_k_CUsynchronizationPolicy), 0, 0, 1, 1},
  {&__pyx_kp_u_CUtexObject, __pyx_k_CUtexObject, sizeof(__pyx_k_CUtexObject), 0, 1, 0, 0},
  {&__pyx_n_s_CUtexObject_2, __pyx_k_CUtexObject_2, sizeof(__pyx_k_CUtexObject_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUtexObject___reduce_cython, __pyx_k_CUtexObject___reduce_cython, sizeof(__pyx_k_CUtexObject___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUtexObject___setstate_cython, __pyx_k_CUtexObject___setstate_cython, sizeof(__pyx_k_CUtexObject___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUtexObject_getPtr, __pyx_k_CUtexObject_getPtr, sizeof(__pyx_k_CUtexObject_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUtexObject_v1, __pyx_k_CUtexObject_v1, sizeof(__pyx_k_CUtexObject_v1), 0, 1, 0, 0},
  {&__pyx_n_s_CUtexObject_v1_2, __pyx_k_CUtexObject_v1_2, sizeof(__pyx_k_CUtexObject_v1_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUtexObject_v1___reduce_cython, __pyx_k_CUtexObject_v1___reduce_cython, sizeof(__pyx_k_CUtexObject_v1___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUtexObject_v1___setstate_cython, __pyx_k_CUtexObject_v1___setstate_cython, sizeof(__pyx_k_CUtexObject_v1___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUtexObject_v1_getPtr, __pyx_k_CUtexObject_v1_getPtr, sizeof(__pyx_k_CUtexObject_v1_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUtexref, __pyx_k_CUtexref, sizeof(__pyx_k_CUtexref), 0, 1, 0, 0},
  {&__pyx_n_s_CUtexref_2, __pyx_k_CUtexref_2, sizeof(__pyx_k_CUtexref_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUtexref___reduce_cython, __pyx_k_CUtexref___reduce_cython, sizeof(__pyx_k_CUtexref___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUtexref___setstate_cython, __pyx_k_CUtexref___setstate_cython, sizeof(__pyx_k_CUtexref___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUtexref_getPtr, __pyx_k_CUtexref_getPtr, sizeof(__pyx_k_CUtexref_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_CUuserObject, __pyx_k_CUuserObject, sizeof(__pyx_k_CUuserObject), 0, 1, 0, 0},
  {&__pyx_n_s_CUuserObjectRetain_flags, __pyx_k_CUuserObjectRetain_flags, sizeof(__pyx_k_CUuserObjectRetain_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUuserObject_2, __pyx_k_CUuserObject_2, sizeof(__pyx_k_CUuserObject_2), 0, 0, 1, 1},
  {&__pyx_n_s_CUuserObject___reduce_cython, __pyx_k_CUuserObject___reduce_cython, sizeof(__pyx_k_CUuserObject___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUuserObject___setstate_cython, __pyx_k_CUuserObject___setstate_cython, sizeof(__pyx_k_CUuserObject___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUuserObject_flags, __pyx_k_CUuserObject_flags, sizeof(__pyx_k_CUuserObject_flags), 0, 0, 1, 1},
  {&__pyx_n_s_CUuserObject_getPtr, __pyx_k_CUuserObject_getPtr, sizeof(__pyx_k_CUuserObject_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_CUuuid, __pyx_k_CUuuid, sizeof(__pyx_k_CUuuid), 0, 0, 1, 1},
  {&__pyx_n_u_CUuuid, __pyx_k_CUuuid, sizeof(__pyx_k_CUuuid), 0, 1, 0, 1},
  {&__pyx_n_s_CUuuid_st, __pyx_k_CUuuid_st, sizeof(__pyx_k_CUuuid_st), 0, 0, 1, 1},
  {&__pyx_n_s_CUuuid_st___reduce_cython, __pyx_k_CUuuid_st___reduce_cython, sizeof(__pyx_k_CUuuid_st___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUuuid_st___setstate_cython, __pyx_k_CUuuid_st___setstate_cython, sizeof(__pyx_k_CUuuid_st___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CUuuid_st_getPtr, __pyx_k_CUuuid_st_getPtr, sizeof(__pyx_k_CUuuid_st_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_s_Caching_modes_for_dlcm, __pyx_k_Caching_modes_for_dlcm, sizeof(__pyx_k_Caching_modes_for_dlcm), 0, 0, 1, 0},
  {&__pyx_kp_s_Cluster_scheduling_policies_The, __pyx_k_Cluster_scheduling_policies_The, sizeof(__pyx_k_Cluster_scheduling_policies_The), 0, 0, 1, 0},
  {&__pyx_kp_s_Compute_Modes, __pyx_k_Compute_Modes, sizeof(__pyx_k_Compute_Modes), 0, 0, 1, 0},
  {&__pyx_kp_s_Context_creation_flags, __pyx_k_Context_creation_flags, sizeof(__pyx_k_Context_creation_flags), 0, 0, 1, 0},
  {&__pyx_kp_s_Cubin_matching_fallback_strateg, __pyx_k_Cubin_matching_fallback_strateg, sizeof(__pyx_k_Cubin_matching_fallback_strateg), 0, 0, 1, 0},
  {&__pyx_kp_s_Defines_the_allocation_types_av, __pyx_k_Defines_the_allocation_types_av, sizeof(__pyx_k_Defines_the_allocation_types_av), 0, 0, 1, 0},
  {&__pyx_kp_u_Depth, __pyx_k_Depth, sizeof(__pyx_k_Depth), 0, 1, 0, 0},
  {&__pyx_n_s_Depth_2, __pyx_k_Depth_2, sizeof(__pyx_k_Depth_2), 0, 0, 1, 1},
  {&__pyx_kp_s_Device_code_formats, __pyx_k_Device_code_formats, sizeof(__pyx_k_Device_code_formats), 0, 0, 1, 0},
  {&__pyx_kp_s_Device_properties, __pyx_k_Device_properties, sizeof(__pyx_k_Device_properties), 0, 0, 1, 0},
  {&__pyx_kp_u_EGLImageKHR, __pyx_k_EGLImageKHR, sizeof(__pyx_k_EGLImageKHR), 0, 1, 0, 0},
  {&__pyx_n_s_EGLImageKHR_2, __pyx_k_EGLImageKHR_2, sizeof(__pyx_k_EGLImageKHR_2), 0, 0, 1, 1},
  {&__pyx_n_s_EGLImageKHR___reduce_cython, __pyx_k_EGLImageKHR___reduce_cython, sizeof(__pyx_k_EGLImageKHR___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_EGLImageKHR___setstate_cython, __pyx_k_EGLImageKHR___setstate_cython, sizeof(__pyx_k_EGLImageKHR___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_EGLImageKHR_getPtr, __pyx_k_EGLImageKHR_getPtr, sizeof(__pyx_k_EGLImageKHR_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_EGLStreamKHR, __pyx_k_EGLStreamKHR, sizeof(__pyx_k_EGLStreamKHR), 0, 1, 0, 0},
  {&__pyx_n_s_EGLStreamKHR_2, __pyx_k_EGLStreamKHR_2, sizeof(__pyx_k_EGLStreamKHR_2), 0, 0, 1, 1},
  {&__pyx_n_s_EGLStreamKHR___reduce_cython, __pyx_k_EGLStreamKHR___reduce_cython, sizeof(__pyx_k_EGLStreamKHR___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_EGLStreamKHR___setstate_cython, __pyx_k_EGLStreamKHR___setstate_cython, sizeof(__pyx_k_EGLStreamKHR___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_EGLStreamKHR_getPtr, __pyx_k_EGLStreamKHR_getPtr, sizeof(__pyx_k_EGLStreamKHR_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_EGLSyncKHR, __pyx_k_EGLSyncKHR, sizeof(__pyx_k_EGLSyncKHR), 0, 1, 0, 0},
  {&__pyx_n_s_EGLSyncKHR_2, __pyx_k_EGLSyncKHR_2, sizeof(__pyx_k_EGLSyncKHR_2), 0, 0, 1, 1},
  {&__pyx_n_s_EGLSyncKHR___reduce_cython, __pyx_k_EGLSyncKHR___reduce_cython, sizeof(__pyx_k_EGLSyncKHR___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_EGLSyncKHR___setstate_cython, __pyx_k_EGLSyncKHR___setstate_cython, sizeof(__pyx_k_EGLSyncKHR___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_EGLSyncKHR_getPtr, __pyx_k_EGLSyncKHR_getPtr, sizeof(__pyx_k_EGLSyncKHR_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_EGLint, __pyx_k_EGLint, sizeof(__pyx_k_EGLint), 0, 1, 0, 0},
  {&__pyx_n_s_EGLint_2, __pyx_k_EGLint_2, sizeof(__pyx_k_EGLint_2), 0, 0, 1, 1},
  {&__pyx_n_s_EGLint___reduce_cython, __pyx_k_EGLint___reduce_cython, sizeof(__pyx_k_EGLint___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_EGLint___setstate_cython, __pyx_k_EGLint___setstate_cython, sizeof(__pyx_k_EGLint___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_EGLint_getPtr, __pyx_k_EGLint_getPtr, sizeof(__pyx_k_EGLint_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_ElementSizeBytes, __pyx_k_ElementSizeBytes, sizeof(__pyx_k_ElementSizeBytes), 0, 0, 1, 1},
  {&__pyx_kp_s_Error_codes, __pyx_k_Error_codes, sizeof(__pyx_k_Error_codes), 0, 0, 1, 0},
  {&__pyx_kp_s_Event_creation_flags, __pyx_k_Event_creation_flags, sizeof(__pyx_k_Event_creation_flags), 0, 0, 1, 0},
  {&__pyx_kp_s_Event_record_flags, __pyx_k_Event_record_flags, sizeof(__pyx_k_Event_record_flags), 0, 0, 1, 0},
  {&__pyx_kp_s_Event_sched_flags, __pyx_k_Event_sched_flags, sizeof(__pyx_k_Event_sched_flags), 0, 0, 1, 0},
  {&__pyx_kp_s_Event_wait_flags, __pyx_k_Event_wait_flags, sizeof(__pyx_k_Event_wait_flags), 0, 0, 1, 0},
  {&__pyx_kp_s_Execution_Affinity_Types, __pyx_k_Execution_Affinity_Types, sizeof(__pyx_k_Execution_Affinity_Types), 0, 0, 1, 0},
  {&__pyx_kp_s_External_memory_handle_types, __pyx_k_External_memory_handle_types, sizeof(__pyx_k_External_memory_handle_types), 0, 0, 1, 0},
  {&__pyx_kp_s_External_semaphore_handle_types, __pyx_k_External_semaphore_handle_types, sizeof(__pyx_k_External_semaphore_handle_types), 0, 0, 1, 0},
  {&__pyx_kp_u_Failed_to_allocate_length_x_size, __pyx_k_Failed_to_allocate_length_x_size, sizeof(__pyx_k_Failed_to_allocate_length_x_size), 0, 1, 0, 0},
  {&__pyx_kp_s_Flag_for_requesting_different_o, __pyx_k_Flag_for_requesting_different_o, sizeof(__pyx_k_Flag_for_requesting_different_o), 0, 0, 1, 0},
  {&__pyx_kp_u_Flags, __pyx_k_Flags, sizeof(__pyx_k_Flags), 0, 1, 0, 0},
  {&__pyx_n_s_Flags_2, __pyx_k_Flags_2, sizeof(__pyx_k_Flags_2), 0, 0, 1, 1},
  {&__pyx_kp_s_Flags_for_instantiating_a_graph, __pyx_k_Flags_for_instantiating_a_graph, sizeof(__pyx_k_Flags_for_instantiating_a_graph), 0, 0, 1, 0},
  {&__pyx_kp_s_Flags_for_mapping_and_unmapping, __pyx_k_Flags_for_mapping_and_unmapping, sizeof(__pyx_k_Flags_for_mapping_and_unmapping), 0, 0, 1, 0},
  {&__pyx_kp_s_Flags_for_py_obj_cuStreamMemory, __pyx_k_Flags_for_py_obj_cuStreamMemory, sizeof(__pyx_k_Flags_for_py_obj_cuStreamMemory), 0, 0, 1, 0},
  {&__pyx_kp_s_Flags_for_py_obj_cuStreamUpdate, __pyx_k_Flags_for_py_obj_cuStreamUpdate, sizeof(__pyx_k_Flags_for_py_obj_cuStreamUpdate), 0, 0, 1, 0},
  {&__pyx_kp_s_Flags_for_py_obj_cuStreamWaitVa, __pyx_k_Flags_for_py_obj_cuStreamWaitVa, sizeof(__pyx_k_Flags_for_py_obj_cuStreamWaitVa), 0, 0, 1, 0},
  {&__pyx_kp_s_Flags_for_py_obj_cuStreamWriteV, __pyx_k_Flags_for_py_obj_cuStreamWriteV, sizeof(__pyx_k_Flags_for_py_obj_cuStreamWriteV), 0, 0, 1, 0},
  {&__pyx_kp_s_Flags_for_retaining_user_object, __pyx_k_Flags_for_retaining_user_object, sizeof(__pyx_k_Flags_for_retaining_user_object), 0, 0, 1, 0},
  {&__pyx_kp_s_Flags_for_specifying_particular, __pyx_k_Flags_for_specifying_particular, sizeof(__pyx_k_Flags_for_specifying_particular), 0, 0, 1, 0},
  {&__pyx_kp_s_Flags_for_user_objects_for_grap, __pyx_k_Flags_for_user_objects_for_grap, sizeof(__pyx_k_Flags_for_user_objects_for_grap), 0, 0, 1, 0},
  {&__pyx_kp_s_Flags_to_map_or_unmap_a_resourc, __pyx_k_Flags_to_map_or_unmap_a_resourc, sizeof(__pyx_k_Flags_to_map_or_unmap_a_resourc), 0, 0, 1, 0},
  {&__pyx_kp_s_Flags_to_register_a_graphics_re, __pyx_k_Flags_to_register_a_graphics_re, sizeof(__pyx_k_Flags_to_register_a_graphics_re), 0, 0, 1, 0},
  {&__pyx_kp_s_Flags_to_specify_search_options, __pyx_k_Flags_to_specify_search_options, sizeof(__pyx_k_Flags_to_specify_search_options), 0, 0, 1, 0},
  {&__pyx_kp_u_Format, __pyx_k_Format, sizeof(__pyx_k_Format), 0, 1, 0, 0},
  {&__pyx_n_s_Format_2, __pyx_k_Format_2, sizeof(__pyx_k_Format_2), 0, 0, 1, 1},
  {&__pyx_kp_s_Function_cache_configurations, __pyx_k_Function_cache_configurations, sizeof(__pyx_k_Function_cache_configurations), 0, 0, 1, 0},
  {&__pyx_kp_s_Function_properties, __pyx_k_Function_properties, sizeof(__pyx_k_Function_properties), 0, 0, 1, 0},
  {&__pyx_kp_u_GLenum, __pyx_k_GLenum, sizeof(__pyx_k_GLenum), 0, 1, 0, 0},
  {&__pyx_n_s_GLenum_2, __pyx_k_GLenum_2, sizeof(__pyx_k_GLenum_2), 0, 0, 1, 1},
  {&__pyx_n_s_GLenum___reduce_cython, __pyx_k_GLenum___reduce_cython, sizeof(__pyx_k_GLenum___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_GLenum___setstate_cython, __pyx_k_GLenum___setstate_cython, sizeof(__pyx_k_GLenum___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_GLenum_getPtr, __pyx_k_GLenum_getPtr, sizeof(__pyx_k_GLenum_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_GLuint, __pyx_k_GLuint, sizeof(__pyx_k_GLuint), 0, 1, 0, 0},
  {&__pyx_n_s_GLuint_2, __pyx_k_GLuint_2, sizeof(__pyx_k_GLuint_2), 0, 0, 1, 1},
  {&__pyx_n_s_GLuint___reduce_cython, __pyx_k_GLuint___reduce_cython, sizeof(__pyx_k_GLuint___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_GLuint___setstate_cython, __pyx_k_GLuint___setstate_cython, sizeof(__pyx_k_GLuint___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_GLuint_getPtr, __pyx_k_GLuint_getPtr, sizeof(__pyx_k_GLuint_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_s_Graph_node_types, __pyx_k_Graph_node_types, sizeof(__pyx_k_Graph_node_types), 0, 0, 1, 0},
  {&__pyx_kp_u_Height, __pyx_k_Height, sizeof(__pyx_k_Height), 0, 1, 0, 0},
  {&__pyx_n_s_Height_2, __pyx_k_Height_2, sizeof(__pyx_k_Height_2), 0, 0, 1, 1},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_n_s_IntEnum, __pyx_k_IntEnum, sizeof(__pyx_k_IntEnum), 0, 0, 1, 1},
  {&__pyx_kp_s_Limits, __pyx_k_Limits, sizeof(__pyx_k_Limits), 0, 0, 1, 0},
  {&__pyx_n_s_List, __pyx_k_List, sizeof(__pyx_k_List), 0, 0, 1, 1},
  {&__pyx_kp_u_List_is_too_small, __pyx_k_List_is_too_small, sizeof(__pyx_k_List_is_too_small), 0, 1, 0, 0},
  {&__pyx_n_s_MAX_PLANES, __pyx_k_MAX_PLANES, sizeof(__pyx_k_MAX_PLANES), 0, 0, 1, 1},
  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {&__pyx_kp_s_Memory_advise_values, __pyx_k_Memory_advise_values, sizeof(__pyx_k_Memory_advise_values), 0, 0, 1, 0},
  {&__pyx_kp_s_Memory_handle_types, __pyx_k_Memory_handle_types, sizeof(__pyx_k_Memory_handle_types), 0, 0, 1, 0},
  {&__pyx_kp_s_Memory_operation_types, __pyx_k_Memory_operation_types, sizeof(__pyx_k_Memory_operation_types), 0, 0, 1, 0},
  {&__pyx_kp_s_Memory_types, __pyx_k_Memory_types, sizeof(__pyx_k_Memory_types), 0, 0, 1, 0},
  {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1},
  {&__pyx_n_s_NVCL_CTX_SCHED_AUTO, __pyx_k_NVCL_CTX_SCHED_AUTO, sizeof(__pyx_k_NVCL_CTX_SCHED_AUTO), 0, 0, 1, 1},
  {&__pyx_n_s_NVCL_CTX_SCHED_BLOCKING_SYNC, __pyx_k_NVCL_CTX_SCHED_BLOCKING_SYNC, sizeof(__pyx_k_NVCL_CTX_SCHED_BLOCKING_SYNC), 0, 0, 1, 1},
  {&__pyx_n_s_NVCL_CTX_SCHED_SPIN, __pyx_k_NVCL_CTX_SCHED_SPIN, sizeof(__pyx_k_NVCL_CTX_SCHED_SPIN), 0, 0, 1, 1},
  {&__pyx_n_s_NVCL_CTX_SCHED_YIELD, __pyx_k_NVCL_CTX_SCHED_YIELD, sizeof(__pyx_k_NVCL_CTX_SCHED_YIELD), 0, 0, 1, 1},
  {&__pyx_n_s_NVCL_EVENT_SCHED_AUTO, __pyx_k_NVCL_EVENT_SCHED_AUTO, sizeof(__pyx_k_NVCL_EVENT_SCHED_AUTO), 0, 0, 1, 1},
  {&__pyx_n_s_NVCL_EVENT_SCHED_BLOCKING_SYNC, __pyx_k_NVCL_EVENT_SCHED_BLOCKING_SYNC, sizeof(__pyx_k_NVCL_EVENT_SCHED_BLOCKING_SYNC), 0, 0, 1, 1},
  {&__pyx_n_s_NVCL_EVENT_SCHED_SPIN, __pyx_k_NVCL_EVENT_SCHED_SPIN, sizeof(__pyx_k_NVCL_EVENT_SCHED_SPIN), 0, 0, 1, 1},
  {&__pyx_n_s_NVCL_EVENT_SCHED_YIELD, __pyx_k_NVCL_EVENT_SCHED_YIELD, sizeof(__pyx_k_NVCL_EVENT_SCHED_YIELD), 0, 0, 1, 1},
  {&__pyx_kp_s_NVCL_context_scheduling_flags, __pyx_k_NVCL_context_scheduling_flags, sizeof(__pyx_k_NVCL_context_scheduling_flags), 0, 0, 1, 0},
  {&__pyx_kp_s_NVCL_event_scheduling_flags, __pyx_k_NVCL_event_scheduling_flags, sizeof(__pyx_k_NVCL_event_scheduling_flags), 0, 0, 1, 0},
  {&__pyx_kp_u_NumChannels, __pyx_k_NumChannels, sizeof(__pyx_k_NumChannels), 0, 1, 0, 0},
  {&__pyx_n_s_NumChannels_2, __pyx_k_NumChannels_2, sizeof(__pyx_k_NumChannels_2), 0, 0, 1, 1},
  {&__pyx_n_s_NumPackedComponents, __pyx_k_NumPackedComponents, sizeof(__pyx_k_NumPackedComponents), 0, 0, 1, 1},
  {&__pyx_kp_s_Occupancy_calculator_flag, __pyx_k_Occupancy_calculator_flag, sizeof(__pyx_k_Occupancy_calculator_flag), 0, 0, 1, 0},
  {&__pyx_kp_s_Online_compilation_targets, __pyx_k_Online_compilation_targets, sizeof(__pyx_k_Online_compilation_targets), 0, 0, 1, 0},
  {&__pyx_kp_s_Online_compiler_and_linker_opti, __pyx_k_Online_compiler_and_linker_opti, sizeof(__pyx_k_Online_compiler_and_linker_opti), 0, 0, 1, 0},
  {&__pyx_kp_s_Operations_for_py_obj_cuStreamB, __pyx_k_Operations_for_py_obj_cuStreamB, sizeof(__pyx_k_Operations_for_py_obj_cuStreamB), 0, 0, 1, 0},
  {&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1},
  {&__pyx_kp_s_P2P_Attributes, __pyx_k_P2P_Attributes, sizeof(__pyx_k_P2P_Attributes), 0, 0, 1, 0},
  {&__pyx_n_s_Pitch, __pyx_k_Pitch, sizeof(__pyx_k_Pitch), 0, 0, 1, 1},
  {&__pyx_kp_s_Platform_native_ordering_for_GP, __pyx_k_Platform_native_ordering_for_GP, sizeof(__pyx_k_Platform_native_ordering_for_GP), 0, 0, 1, 0},
  {&__pyx_kp_s_Pointer_information, __pyx_k_Pointer_information, sizeof(__pyx_k_Pointer_information), 0, 0, 1, 0},
  {&__pyx_kp_s_Possible_modes_for_stream_captu, __pyx_k_Possible_modes_for_stream_captu, sizeof(__pyx_k_Possible_modes_for_stream_captu), 0, 0, 1, 0},
  {&__pyx_kp_s_Possible_stream_capture_statuse, __pyx_k_Possible_stream_capture_statuse, sizeof(__pyx_k_Possible_stream_capture_statuse), 0, 0, 1, 0},
  {&__pyx_kp_s_Profiler_Output_Modes, __pyx_k_Profiler_Output_Modes, sizeof(__pyx_k_Profiler_Output_Modes), 0, 0, 1, 0},
  {&__pyx_kp_s_Resource_location_flags_sysmem, __pyx_k_Resource_location_flags_sysmem, sizeof(__pyx_k_Resource_location_flags_sysmem), 0, 0, 1, 0},
  {&__pyx_kp_s_Resource_types, __pyx_k_Resource_types, sizeof(__pyx_k_Resource_types), 0, 0, 1, 0},
  {&__pyx_kp_s_Resource_view_format, __pyx_k_Resource_view_format, sizeof(__pyx_k_Resource_view_format), 0, 0, 1, 0},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_kp_u_SIMDWidth, __pyx_k_SIMDWidth, sizeof(__pyx_k_SIMDWidth), 0, 1, 0, 0},
  {&__pyx_n_s_SIMDWidth_2, __pyx_k_SIMDWidth_2, sizeof(__pyx_k_SIMDWidth_2), 0, 0, 1, 1},
  {&__pyx_kp_s_Shared_memory_carveout_configur, __pyx_k_Shared_memory_carveout_configur, sizeof(__pyx_k_Shared_memory_carveout_configur), 0, 0, 1, 0},
  {&__pyx_kp_s_Shared_memory_configurations, __pyx_k_Shared_memory_configurations, sizeof(__pyx_k_Shared_memory_configurations), 0, 0, 1, 0},
  {&__pyx_kp_s_Sparse_subresource_types, __pyx_k_Sparse_subresource_types, sizeof(__pyx_k_Sparse_subresource_types), 0, 0, 1, 0},
  {&__pyx_kp_s_Specifies_compression_attribute, __pyx_k_Specifies_compression_attribute, sizeof(__pyx_k_Specifies_compression_attribute), 0, 0, 1, 0},
  {&__pyx_kp_s_Specifies_performance_hint_with, __pyx_k_Specifies_performance_hint_with, sizeof(__pyx_k_Specifies_performance_hint_with), 0, 0, 1, 0},
  {&__pyx_kp_s_Specifies_the_handle_type_for_a, __pyx_k_Specifies_the_handle_type_for_a, sizeof(__pyx_k_Specifies_the_handle_type_for_a), 0, 0, 1, 0},
  {&__pyx_kp_s_Specifies_the_memory_protection, __pyx_k_Specifies_the_memory_protection, sizeof(__pyx_k_Specifies_the_memory_protection), 0, 0, 1, 0},
  {&__pyx_kp_s_Specifies_the_type_of_location, __pyx_k_Specifies_the_type_of_location, sizeof(__pyx_k_Specifies_the_type_of_location), 0, 0, 1, 0},
  {&__pyx_kp_s_Stream_creation_flags, __pyx_k_Stream_creation_flags, sizeof(__pyx_k_Stream_creation_flags), 0, 0, 1, 0},
  {&__pyx_kp_s_Texture_reference_addressing_mo, __pyx_k_Texture_reference_addressing_mo, sizeof(__pyx_k_Texture_reference_addressing_mo), 0, 0, 1, 0},
  {&__pyx_kp_s_Texture_reference_filtering_mod, __pyx_k_Texture_reference_filtering_mod, sizeof(__pyx_k_Texture_reference_filtering_mod), 0, 0, 1, 0},
  {&__pyx_kp_s_The_additional_write_options_fo, __pyx_k_The_additional_write_options_fo, sizeof(__pyx_k_The_additional_write_options_fo), 0, 0, 1, 0},
  {&__pyx_kp_s_The_scopes_for_py_obj_cuFlushGP, __pyx_k_The_scopes_for_py_obj_cuFlushGP, sizeof(__pyx_k_The_scopes_for_py_obj_cuFlushGP), 0, 0, 1, 0},
  {&__pyx_kp_s_The_targets_for_py_obj_cuFlushG, __pyx_k_The_targets_for_py_obj_cuFlushG, sizeof(__pyx_k_The_targets_for_py_obj_cuFlushG), 0, 0, 1, 0},
  {&__pyx_n_s_Tuple, __pyx_k_Tuple, sizeof(__pyx_k_Tuple), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_kp_u_Unknown_type, __pyx_k_Unknown_type, sizeof(__pyx_k_Unknown_type), 0, 1, 0, 0},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_kp_u_VdpDevice, __pyx_k_VdpDevice, sizeof(__pyx_k_VdpDevice), 0, 1, 0, 0},
  {&__pyx_n_s_VdpDevice_2, __pyx_k_VdpDevice_2, sizeof(__pyx_k_VdpDevice_2), 0, 0, 1, 1},
  {&__pyx_n_s_VdpDevice___reduce_cython, __pyx_k_VdpDevice___reduce_cython, sizeof(__pyx_k_VdpDevice___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_VdpDevice___setstate_cython, __pyx_k_VdpDevice___setstate_cython, sizeof(__pyx_k_VdpDevice___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_VdpDevice_getPtr, __pyx_k_VdpDevice_getPtr, sizeof(__pyx_k_VdpDevice_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_VdpGetProcAddress, __pyx_k_VdpGetProcAddress, sizeof(__pyx_k_VdpGetProcAddress), 0, 1, 0, 0},
  {&__pyx_n_s_VdpGetProcAddress_2, __pyx_k_VdpGetProcAddress_2, sizeof(__pyx_k_VdpGetProcAddress_2), 0, 0, 1, 1},
  {&__pyx_n_s_VdpGetProcAddress___reduce_cytho, __pyx_k_VdpGetProcAddress___reduce_cytho, sizeof(__pyx_k_VdpGetProcAddress___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_VdpGetProcAddress___setstate_cyt, __pyx_k_VdpGetProcAddress___setstate_cyt, sizeof(__pyx_k_VdpGetProcAddress___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_VdpGetProcAddress_getPtr, __pyx_k_VdpGetProcAddress_getPtr, sizeof(__pyx_k_VdpGetProcAddress_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_VdpOutputSurface, __pyx_k_VdpOutputSurface, sizeof(__pyx_k_VdpOutputSurface), 0, 1, 0, 0},
  {&__pyx_n_s_VdpOutputSurface_2, __pyx_k_VdpOutputSurface_2, sizeof(__pyx_k_VdpOutputSurface_2), 0, 0, 1, 1},
  {&__pyx_n_s_VdpOutputSurface___reduce_cython, __pyx_k_VdpOutputSurface___reduce_cython, sizeof(__pyx_k_VdpOutputSurface___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_VdpOutputSurface___setstate_cyth, __pyx_k_VdpOutputSurface___setstate_cyth, sizeof(__pyx_k_VdpOutputSurface___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_VdpOutputSurface_getPtr, __pyx_k_VdpOutputSurface_getPtr, sizeof(__pyx_k_VdpOutputSurface_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_VdpVideoSurface, __pyx_k_VdpVideoSurface, sizeof(__pyx_k_VdpVideoSurface), 0, 1, 0, 0},
  {&__pyx_n_s_VdpVideoSurface_2, __pyx_k_VdpVideoSurface_2, sizeof(__pyx_k_VdpVideoSurface_2), 0, 0, 1, 1},
  {&__pyx_n_s_VdpVideoSurface___reduce_cython, __pyx_k_VdpVideoSurface___reduce_cython, sizeof(__pyx_k_VdpVideoSurface___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_VdpVideoSurface___setstate_cytho, __pyx_k_VdpVideoSurface___setstate_cytho, sizeof(__pyx_k_VdpVideoSurface___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_VdpVideoSurface_getPtr, __pyx_k_VdpVideoSurface_getPtr, sizeof(__pyx_k_VdpVideoSurface_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_Width, __pyx_k_Width, sizeof(__pyx_k_Width), 0, 1, 0, 0},
  {&__pyx_kp_u_WidthInBytes, __pyx_k_WidthInBytes, sizeof(__pyx_k_WidthInBytes), 0, 1, 0, 0},
  {&__pyx_n_s_WidthInBytes_2, __pyx_k_WidthInBytes_2, sizeof(__pyx_k_WidthInBytes_2), 0, 0, 1, 1},
  {&__pyx_n_s_Width_2, __pyx_k_Width_2, sizeof(__pyx_k_Width_2), 0, 0, 1, 1},
  {&__pyx_kp_s__1015, __pyx_k__1015, sizeof(__pyx_k__1015), 0, 0, 1, 0},
  {&__pyx_kp_u__128, __pyx_k__128, sizeof(__pyx_k__128), 0, 1, 0, 0},
  {&__pyx_kp_u__129, __pyx_k__129, sizeof(__pyx_k__129), 0, 1, 0, 0},
  {&__pyx_kp_u__165, __pyx_k__165, sizeof(__pyx_k__165), 0, 1, 0, 0},
  {&__pyx_n_u__166, __pyx_k__166, sizeof(__pyx_k__166), 0, 1, 0, 1},
  {&__pyx_kp_b__613, __pyx_k__613, sizeof(__pyx_k__613), 0, 0, 0, 0},
  {&__pyx_kp_u__660, __pyx_k__660, sizeof(__pyx_k__660), 0, 1, 0, 0},
  {&__pyx_kp_u_accessDescCount, __pyx_k_accessDescCount, sizeof(__pyx_k_accessDescCount), 0, 1, 0, 0},
  {&__pyx_n_s_accessDescCount_2, __pyx_k_accessDescCount_2, sizeof(__pyx_k_accessDescCount_2), 0, 0, 1, 1},
  {&__pyx_kp_u_accessDescs, __pyx_k_accessDescs, sizeof(__pyx_k_accessDescs), 0, 1, 0, 0},
  {&__pyx_n_s_accessDescs_2, __pyx_k_accessDescs_2, sizeof(__pyx_k_accessDescs_2), 0, 0, 1, 1},
  {&__pyx_kp_u_accessPolicyWindow, __pyx_k_accessPolicyWindow, sizeof(__pyx_k_accessPolicyWindow), 0, 1, 0, 0},
  {&__pyx_n_s_accessPolicyWindow_2, __pyx_k_accessPolicyWindow_2, sizeof(__pyx_k_accessPolicyWindow_2), 0, 0, 1, 1},
  {&__pyx_n_s_active, __pyx_k_active, sizeof(__pyx_k_active), 0, 0, 1, 1},
  {&__pyx_n_s_addr, __pyx_k_addr, sizeof(__pyx_k_addr), 0, 0, 1, 1},
  {&__pyx_kp_u_address, __pyx_k_address, sizeof(__pyx_k_address), 0, 1, 0, 0},
  {&__pyx_kp_u_addressMode, __pyx_k_addressMode, sizeof(__pyx_k_addressMode), 0, 1, 0, 0},
  {&__pyx_n_s_addressMode_2, __pyx_k_addressMode_2, sizeof(__pyx_k_addressMode_2), 0, 0, 1, 1},
  {&__pyx_n_s_address_2, __pyx_k_address_2, sizeof(__pyx_k_address_2), 0, 0, 1, 1},
  {&__pyx_n_s_advice, __pyx_k_advice, sizeof(__pyx_k_advice), 0, 0, 1, 1},
  {&__pyx_kp_u_alias, __pyx_k_alias, sizeof(__pyx_k_alias), 0, 1, 0, 0},
  {&__pyx_n_s_alias_2, __pyx_k_alias_2, sizeof(__pyx_k_alias_2), 0, 0, 1, 1},
  {&__pyx_kp_u_alignment, __pyx_k_alignment, sizeof(__pyx_k_alignment), 0, 1, 0, 0},
  {&__pyx_n_s_alignment_2, __pyx_k_alignment_2, sizeof(__pyx_k_alignment_2), 0, 0, 1, 1},
  {&__pyx_kp_u_allocFlags, __pyx_k_allocFlags, sizeof(__pyx_k_allocFlags), 0, 1, 0, 0},
  {&__pyx_n_s_allocFlags_2, __pyx_k_allocFlags_2, sizeof(__pyx_k_allocFlags_2), 0, 0, 1, 1},
  {&__pyx_kp_u_allocType, __pyx_k_allocType, sizeof(__pyx_k_allocType), 0, 1, 0, 0},
  {&__pyx_n_s_allocType_2, __pyx_k_allocType_2, sizeof(__pyx_k_allocType_2), 0, 0, 1, 1},
  {&__pyx_n_s_am, __pyx_k_am, sizeof(__pyx_k_am), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_kp_u_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 1, 0, 0},
  {&__pyx_kp_u_arrayDesc, __pyx_k_arrayDesc, sizeof(__pyx_k_arrayDesc), 0, 1, 0, 0},
  {&__pyx_n_s_arrayDesc_2, __pyx_k_arrayDesc_2, sizeof(__pyx_k_arrayDesc_2), 0, 0, 1, 1},
  {&__pyx_n_s_arrayIndex, __pyx_k_arrayIndex, sizeof(__pyx_k_arrayIndex), 0, 0, 1, 1},
  {&__pyx_n_s_array_2, __pyx_k_array_2, sizeof(__pyx_k_array_2), 0, 0, 1, 1},
  {&__pyx_kp_u_array_3, __pyx_k_array_3, sizeof(__pyx_k_array_3), 0, 1, 0, 0},
  {&__pyx_n_s_attr, __pyx_k_attr, sizeof(__pyx_k_attr), 0, 0, 1, 1},
  {&__pyx_n_s_attrib, __pyx_k_attrib, sizeof(__pyx_k_attrib), 0, 0, 1, 1},
  {&__pyx_n_s_attribute, __pyx_k_attribute, sizeof(__pyx_k_attribute), 0, 0, 1, 1},
  {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1},
  {&__pyx_kp_u_attrs, __pyx_k_attrs, sizeof(__pyx_k_attrs), 0, 1, 0, 0},
  {&__pyx_n_s_attrs_2, __pyx_k_attrs_2, sizeof(__pyx_k_attrs_2), 0, 0, 1, 1},
  {&__pyx_kp_u_base_ptr, __pyx_k_base_ptr, sizeof(__pyx_k_base_ptr), 0, 1, 0, 0},
  {&__pyx_n_s_base_ptr_2, __pyx_k_base_ptr_2, sizeof(__pyx_k_base_ptr_2), 0, 0, 1, 1},
  {&__pyx_n_s_bias, __pyx_k_bias, sizeof(__pyx_k_bias), 0, 0, 1, 1},
  {&__pyx_kp_u_blockDimX, __pyx_k_blockDimX, sizeof(__pyx_k_blockDimX), 0, 1, 0, 0},
  {&__pyx_n_s_blockDimX_2, __pyx_k_blockDimX_2, sizeof(__pyx_k_blockDimX_2), 0, 0, 1, 1},
  {&__pyx_kp_u_blockDimY, __pyx_k_blockDimY, sizeof(__pyx_k_blockDimY), 0, 1, 0, 0},
  {&__pyx_n_s_blockDimY_2, __pyx_k_blockDimY_2, sizeof(__pyx_k_blockDimY_2), 0, 0, 1, 1},
  {&__pyx_kp_u_blockDimZ, __pyx_k_blockDimZ, sizeof(__pyx_k_blockDimZ), 0, 1, 0, 0},
  {&__pyx_n_s_blockDimZ_2, __pyx_k_blockDimZ_2, sizeof(__pyx_k_blockDimZ_2), 0, 0, 1, 1},
  {&__pyx_n_s_blockSize, __pyx_k_blockSize, sizeof(__pyx_k_blockSize), 0, 0, 1, 1},
  {&__pyx_n_s_blockSizeLimit, __pyx_k_blockSizeLimit, sizeof(__pyx_k_blockSizeLimit), 0, 0, 1, 1},
  {&__pyx_n_s_blockSizeToDynamicSMemSize, __pyx_k_blockSizeToDynamicSMemSize, sizeof(__pyx_k_blockSizeToDynamicSMemSize), 0, 0, 1, 1},
  {&__pyx_kp_u_borderColor, __pyx_k_borderColor, sizeof(__pyx_k_borderColor), 0, 1, 0, 0},
  {&__pyx_n_s_borderColor_2, __pyx_k_borderColor_2, sizeof(__pyx_k_borderColor_2), 0, 0, 1, 1},
  {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1},
  {&__pyx_n_s_bufferDesc, __pyx_k_bufferDesc, sizeof(__pyx_k_bufferDesc), 0, 0, 1, 1},
  {&__pyx_n_s_bufferSize, __pyx_k_bufferSize, sizeof(__pyx_k_bufferSize), 0, 0, 1, 1},
  {&__pyx_kp_u_bytes, __pyx_k_bytes, sizeof(__pyx_k_bytes), 0, 1, 0, 0},
  {&__pyx_n_s_bytes_2, __pyx_k_bytes_2, sizeof(__pyx_k_bytes_2), 0, 0, 1, 1},
  {&__pyx_kp_u_bytesize, __pyx_k_bytesize, sizeof(__pyx_k_bytesize), 0, 1, 0, 0},
  {&__pyx_n_s_bytesize_2, __pyx_k_bytesize_2, sizeof(__pyx_k_bytesize_2), 0, 0, 1, 1},
  {&__pyx_n_s_caddr, __pyx_k_caddr, sizeof(__pyx_k_caddr), 0, 0, 1, 1},
  {&__pyx_n_s_caddr_ptr, __pyx_k_caddr_ptr, sizeof(__pyx_k_caddr_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cadvice, __pyx_k_cadvice, sizeof(__pyx_k_cadvice), 0, 0, 1, 1},
  {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
  {&__pyx_n_s_cam, __pyx_k_cam, sizeof(__pyx_k_cam), 0, 0, 1, 1},
  {&__pyx_n_s_canAccessPeer, __pyx_k_canAccessPeer, sizeof(__pyx_k_canAccessPeer), 0, 0, 1, 1},
  {&__pyx_n_s_captureStatus, __pyx_k_captureStatus, sizeof(__pyx_k_captureStatus), 0, 0, 1, 1},
  {&__pyx_n_s_captureStatus_out, __pyx_k_captureStatus_out, sizeof(__pyx_k_captureStatus_out), 0, 0, 1, 1},
  {&__pyx_n_s_carray, __pyx_k_carray, sizeof(__pyx_k_carray), 0, 0, 1, 1},
  {&__pyx_n_s_cattr, __pyx_k_cattr, sizeof(__pyx_k_cattr), 0, 0, 1, 1},
  {&__pyx_n_s_cattrib, __pyx_k_cattrib, sizeof(__pyx_k_cattrib), 0, 0, 1, 1},
  {&__pyx_n_s_cattribute, __pyx_k_cattribute, sizeof(__pyx_k_cattribute), 0, 0, 1, 1},
  {&__pyx_n_s_cattributes, __pyx_k_cattributes, sizeof(__pyx_k_cattributes), 0, 0, 1, 1},
  {&__pyx_n_s_cblockSizeToDynamicSMemSize, __pyx_k_cblockSizeToDynamicSMemSize, sizeof(__pyx_k_cblockSizeToDynamicSMemSize), 0, 0, 1, 1},
  {&__pyx_n_s_cbuffer, __pyx_k_cbuffer, sizeof(__pyx_k_cbuffer), 0, 0, 1, 1},
  {&__pyx_n_s_cbufferDesc_ptr, __pyx_k_cbufferDesc_ptr, sizeof(__pyx_k_cbufferDesc_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_ccallback, __pyx_k_ccallback, sizeof(__pyx_k_ccallback), 0, 0, 1, 1},
  {&__pyx_n_s_cchildGraph, __pyx_k_cchildGraph, sizeof(__pyx_k_cchildGraph), 0, 0, 1, 1},
  {&__pyx_n_s_cconfig, __pyx_k_cconfig, sizeof(__pyx_k_cconfig), 0, 0, 1, 1},
  {&__pyx_n_s_cconfig_ptr, __pyx_k_cconfig_ptr, sizeof(__pyx_k_cconfig_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cconn, __pyx_k_cconn, sizeof(__pyx_k_cconn), 0, 0, 1, 1},
  {&__pyx_n_s_ccopyParams_ptr, __pyx_k_ccopyParams_ptr, sizeof(__pyx_k_ccopyParams_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cctx, __pyx_k_cctx, sizeof(__pyx_k_cctx), 0, 0, 1, 1},
  {&__pyx_n_s_cdata, __pyx_k_cdata, sizeof(__pyx_k_cdata), 0, 0, 1, 1},
  {&__pyx_n_s_cdataSizes, __pyx_k_cdataSizes, sizeof(__pyx_k_cdataSizes), 0, 0, 1, 1},
  {&__pyx_n_s_cdata_ptr, __pyx_k_cdata_ptr, sizeof(__pyx_k_cdata_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cdependencies, __pyx_k_cdependencies, sizeof(__pyx_k_cdependencies), 0, 0, 1, 1},
  {&__pyx_n_s_cdependencies_out, __pyx_k_cdependencies_out, sizeof(__pyx_k_cdependencies_out), 0, 0, 1, 1},
  {&__pyx_n_s_cdependentNodes, __pyx_k_cdependentNodes, sizeof(__pyx_k_cdependentNodes), 0, 0, 1, 1},
  {&__pyx_n_s_cdesc, __pyx_k_cdesc, sizeof(__pyx_k_cdesc), 0, 0, 1, 1},
  {&__pyx_n_s_cdesc_ptr, __pyx_k_cdesc_ptr, sizeof(__pyx_k_cdesc_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cdestroy, __pyx_k_cdestroy, sizeof(__pyx_k_cdestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cdev, __pyx_k_cdev, sizeof(__pyx_k_cdev), 0, 0, 1, 1},
  {&__pyx_n_s_cdevPtr, __pyx_k_cdevPtr, sizeof(__pyx_k_cdevPtr), 0, 0, 1, 1},
  {&__pyx_n_s_cdevice, __pyx_k_cdevice, sizeof(__pyx_k_cdevice), 0, 0, 1, 1},
  {&__pyx_n_s_cdeviceList, __pyx_k_cdeviceList, sizeof(__pyx_k_cdeviceList), 0, 0, 1, 1},
  {&__pyx_n_s_cdptr, __pyx_k_cdptr, sizeof(__pyx_k_cdptr), 0, 0, 1, 1},
  {&__pyx_n_s_cdst, __pyx_k_cdst, sizeof(__pyx_k_cdst), 0, 0, 1, 1},
  {&__pyx_n_s_cdstArray, __pyx_k_cdstArray, sizeof(__pyx_k_cdstArray), 0, 0, 1, 1},
  {&__pyx_n_s_cdstContext, __pyx_k_cdstContext, sizeof(__pyx_k_cdstContext), 0, 0, 1, 1},
  {&__pyx_n_s_cdstDevice, __pyx_k_cdstDevice, sizeof(__pyx_k_cdstDevice), 0, 0, 1, 1},
  {&__pyx_n_s_cdstHost, __pyx_k_cdstHost, sizeof(__pyx_k_cdstHost), 0, 0, 1, 1},
  {&__pyx_n_s_cdstHost_ptr, __pyx_k_cdstHost_ptr, sizeof(__pyx_k_cdstHost_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_ceglSync, __pyx_k_ceglSync, sizeof(__pyx_k_ceglSync), 0, 0, 1, 1},
  {&__pyx_n_s_ceglframe_ptr, __pyx_k_ceglframe_ptr, sizeof(__pyx_k_ceglframe_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cerror, __pyx_k_cerror, sizeof(__pyx_k_cerror), 0, 0, 1, 1},
  {&__pyx_n_s_cevent, __pyx_k_cevent, sizeof(__pyx_k_cevent), 0, 0, 1, 1},
  {&__pyx_n_s_cextMem, __pyx_k_cextMem, sizeof(__pyx_k_cextMem), 0, 0, 1, 1},
  {&__pyx_n_s_cextSem, __pyx_k_cextSem, sizeof(__pyx_k_cextSem), 0, 0, 1, 1},
  {&__pyx_n_s_cextSemArray, __pyx_k_cextSemArray, sizeof(__pyx_k_cextSemArray), 0, 0, 1, 1},
  {&__pyx_n_s_cf, __pyx_k_cf, sizeof(__pyx_k_cf), 0, 0, 1, 1},
  {&__pyx_n_s_cfatCubin, __pyx_k_cfatCubin, sizeof(__pyx_k_cfatCubin), 0, 0, 1, 1},
  {&__pyx_n_s_cfatCubin_ptr, __pyx_k_cfatCubin_ptr, sizeof(__pyx_k_cfatCubin_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cflags, __pyx_k_cflags, sizeof(__pyx_k_cflags), 0, 0, 1, 1},
  {&__pyx_n_s_cfm, __pyx_k_cfm, sizeof(__pyx_k_cfm), 0, 0, 1, 1},
  {&__pyx_n_s_cfmt, __pyx_k_cfmt, sizeof(__pyx_k_cfmt), 0, 0, 1, 1},
  {&__pyx_n_s_cfn, __pyx_k_cfn, sizeof(__pyx_k_cfn), 0, 0, 1, 1},
  {&__pyx_n_s_cfrom, __pyx_k_cfrom, sizeof(__pyx_k_cfrom), 0, 0, 1, 1},
  {&__pyx_n_s_cfunc, __pyx_k_cfunc, sizeof(__pyx_k_cfunc), 0, 0, 1, 1},
  {&__pyx_n_s_cgraph, __pyx_k_cgraph, sizeof(__pyx_k_cgraph), 0, 0, 1, 1},
  {&__pyx_n_s_chArray, __pyx_k_chArray, sizeof(__pyx_k_chArray), 0, 0, 1, 1},
  {&__pyx_n_s_chClonedGraph, __pyx_k_chClonedGraph, sizeof(__pyx_k_chClonedGraph), 0, 0, 1, 1},
  {&__pyx_n_s_chEnd, __pyx_k_chEnd, sizeof(__pyx_k_chEnd), 0, 0, 1, 1},
  {&__pyx_n_s_chEvent, __pyx_k_chEvent, sizeof(__pyx_k_chEvent), 0, 0, 1, 1},
  {&__pyx_n_s_chGraph, __pyx_k_chGraph, sizeof(__pyx_k_chGraph), 0, 0, 1, 1},
  {&__pyx_n_s_chGraphExec, __pyx_k_chGraphExec, sizeof(__pyx_k_chGraphExec), 0, 0, 1, 1},
  {&__pyx_n_s_chMipmappedArray, __pyx_k_chMipmappedArray, sizeof(__pyx_k_chMipmappedArray), 0, 0, 1, 1},
  {&__pyx_n_s_chNode, __pyx_k_chNode, sizeof(__pyx_k_chNode), 0, 0, 1, 1},
  {&__pyx_n_s_chOriginalNode, __pyx_k_chOriginalNode, sizeof(__pyx_k_chOriginalNode), 0, 0, 1, 1},
  {&__pyx_n_s_chStart, __pyx_k_chStart, sizeof(__pyx_k_chStart), 0, 0, 1, 1},
  {&__pyx_n_s_chStream, __pyx_k_chStream, sizeof(__pyx_k_chStream), 0, 0, 1, 1},
  {&__pyx_n_s_chSurfRef, __pyx_k_chSurfRef, sizeof(__pyx_k_chSurfRef), 0, 0, 1, 1},
  {&__pyx_n_s_chTexRef, __pyx_k_chTexRef, sizeof(__pyx_k_chTexRef), 0, 0, 1, 1},
  {&__pyx_n_s_chandle, __pyx_k_chandle, sizeof(__pyx_k_chandle), 0, 0, 1, 1},
  {&__pyx_n_s_chandleType, __pyx_k_chandleType, sizeof(__pyx_k_chandleType), 0, 0, 1, 1},
  {&__pyx_n_s_chandle_out, __pyx_k_chandle_out, sizeof(__pyx_k_chandle_out), 0, 0, 1, 1},
  {&__pyx_n_s_chandle_out_ptr, __pyx_k_chandle_out_ptr, sizeof(__pyx_k_chandle_out_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_chandle_ptr, __pyx_k_chandle_ptr, sizeof(__pyx_k_chandle_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cheight, __pyx_k_cheight, sizeof(__pyx_k_cheight), 0, 0, 1, 1},
  {&__pyx_n_s_chfunc, __pyx_k_chfunc, sizeof(__pyx_k_chfunc), 0, 0, 1, 1},
  {&__pyx_n_s_childGraph, __pyx_k_childGraph, sizeof(__pyx_k_childGraph), 0, 0, 1, 1},
  {&__pyx_n_s_chmod, __pyx_k_chmod, sizeof(__pyx_k_chmod), 0, 0, 1, 1},
  {&__pyx_n_s_cimage, __pyx_k_cimage, sizeof(__pyx_k_cimage), 0, 0, 1, 1},
  {&__pyx_n_s_cimage_ptr, __pyx_k_cimage_ptr, sizeof(__pyx_k_cimage_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_ckernelParams, __pyx_k_ckernelParams, sizeof(__pyx_k_ckernelParams), 0, 0, 1, 1},
  {&__pyx_n_s_cl_context_flags, __pyx_k_cl_context_flags, sizeof(__pyx_k_cl_context_flags), 0, 0, 1, 1},
  {&__pyx_n_s_cl_event_flags, __pyx_k_cl_event_flags, sizeof(__pyx_k_cl_event_flags), 0, 0, 1, 1},
  {&__pyx_n_s_claunchParamsList, __pyx_k_claunchParamsList, sizeof(__pyx_k_claunchParamsList), 0, 0, 1, 1},
  {&__pyx_n_s_climit, __pyx_k_climit, sizeof(__pyx_k_climit), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_clocation_ptr, __pyx_k_clocation_ptr, sizeof(__pyx_k_clocation_ptr), 0, 0, 1, 1},
  {&__pyx_kp_u_clockRate, __pyx_k_clockRate, sizeof(__pyx_k_clockRate), 0, 1, 0, 0},
  {&__pyx_n_s_clockRate_2, __pyx_k_clockRate_2, sizeof(__pyx_k_clockRate_2), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_kp_u_clusterDim, __pyx_k_clusterDim, sizeof(__pyx_k_clusterDim), 0, 1, 0, 0},
  {&__pyx_n_s_clusterDim_2, __pyx_k_clusterDim_2, sizeof(__pyx_k_clusterDim_2), 0, 0, 1, 1},
  {&__pyx_kp_u_clusterSchedulingPolicyPreferenc, __pyx_k_clusterSchedulingPolicyPreferenc, sizeof(__pyx_k_clusterSchedulingPolicyPreferenc), 0, 1, 0, 0},
  {&__pyx_n_s_clusterSchedulingPolicyPreferenc_2, __pyx_k_clusterSchedulingPolicyPreferenc_2, sizeof(__pyx_k_clusterSchedulingPolicyPreferenc_2), 0, 0, 1, 1},
  {&__pyx_n_s_clusterSize, __pyx_k_clusterSize, sizeof(__pyx_k_clusterSize), 0, 0, 1, 1},
  {&__pyx_n_s_cmap, __pyx_k_cmap, sizeof(__pyx_k_cmap), 0, 0, 1, 1},
  {&__pyx_n_s_cmapInfoList, __pyx_k_cmapInfoList, sizeof(__pyx_k_cmapInfoList), 0, 0, 1, 1},
  {&__pyx_n_s_cmemHandleDesc_ptr, __pyx_k_cmemHandleDesc_ptr, sizeof(__pyx_k_cmemHandleDesc_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cmemPool, __pyx_k_cmemPool, sizeof(__pyx_k_cmemPool), 0, 0, 1, 1},
  {&__pyx_n_s_cmemsetParams_ptr, __pyx_k_cmemsetParams_ptr, sizeof(__pyx_k_cmemsetParams_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cmipmap, __pyx_k_cmipmap, sizeof(__pyx_k_cmipmap), 0, 0, 1, 1},
  {&__pyx_n_s_cmipmapDesc_ptr, __pyx_k_cmipmapDesc_ptr, sizeof(__pyx_k_cmipmapDesc_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cmode, __pyx_k_cmode, sizeof(__pyx_k_cmode), 0, 0, 1, 1},
  {&__pyx_n_s_cnodeParams_ptr, __pyx_k_cnodeParams_ptr, sizeof(__pyx_k_cnodeParams_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cnodes, __pyx_k_cnodes, sizeof(__pyx_k_cnodes), 0, 0, 1, 1},
  {&__pyx_n_s_cnvSciSyncAttrList, __pyx_k_cnvSciSyncAttrList, sizeof(__pyx_k_cnvSciSyncAttrList), 0, 0, 1, 1},
  {&__pyx_n_s_cnvSciSyncAttrList_ptr, __pyx_k_cnvSciSyncAttrList_ptr, sizeof(__pyx_k_cnvSciSyncAttrList_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cobject, __pyx_k_cobject, sizeof(__pyx_k_cobject), 0, 0, 1, 1},
  {&__pyx_kp_u_compressionType, __pyx_k_compressionType, sizeof(__pyx_k_compressionType), 0, 1, 0, 0},
  {&__pyx_n_s_compressionType_2, __pyx_k_compressionType_2, sizeof(__pyx_k_compressionType_2), 0, 0, 1, 1},
  {&__pyx_n_s_config, __pyx_k_config, sizeof(__pyx_k_config), 0, 0, 1, 1},
  {&__pyx_n_s_configFile, __pyx_k_configFile, sizeof(__pyx_k_configFile), 0, 0, 1, 1},
  {&__pyx_n_s_conn, __pyx_k_conn, sizeof(__pyx_k_conn), 0, 0, 1, 1},
  {&__pyx_kp_u_cooperative, __pyx_k_cooperative, sizeof(__pyx_k_cooperative), 0, 1, 0, 0},
  {&__pyx_n_s_cooperative_2, __pyx_k_cooperative_2, sizeof(__pyx_k_cooperative_2), 0, 0, 1, 1},
  {&__pyx_n_s_coption, __pyx_k_coption, sizeof(__pyx_k_coption), 0, 0, 1, 1},
  {&__pyx_n_s_coptions, __pyx_k_coptions, sizeof(__pyx_k_coptions), 0, 0, 1, 1},
  {&__pyx_n_s_copyParams, __pyx_k_copyParams, sizeof(__pyx_k_copyParams), 0, 0, 1, 1},
  {&__pyx_n_s_coriginalGraph, __pyx_k_coriginalGraph, sizeof(__pyx_k_coriginalGraph), 0, 0, 1, 1},
  {&__pyx_n_s_cosHandle, __pyx_k_cosHandle, sizeof(__pyx_k_cosHandle), 0, 0, 1, 1},
  {&__pyx_n_s_cosHandle_ptr, __pyx_k_cosHandle_ptr, sizeof(__pyx_k_cosHandle_ptr), 0, 0, 1, 1},
  {&__pyx_kp_u_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 1, 0, 0},
  {&__pyx_n_s_count_2, __pyx_k_count_2, sizeof(__pyx_k_count_2), 0, 0, 1, 1},
  {&__pyx_n_s_coutputMode, __pyx_k_coutputMode, sizeof(__pyx_k_coutputMode), 0, 0, 1, 1},
  {&__pyx_n_s_cp, __pyx_k_cp, sizeof(__pyx_k_cp), 0, 0, 1, 1},
  {&__pyx_n_s_cpAllocateArray_ptr, __pyx_k_cpAllocateArray_ptr, sizeof(__pyx_k_cpAllocateArray_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cpCopy_ptr, __pyx_k_cpCopy_ptr, sizeof(__pyx_k_cpCopy_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cpCudaDevices, __pyx_k_cpCudaDevices, sizeof(__pyx_k_cpCudaDevices), 0, 0, 1, 1},
  {&__pyx_n_s_cpCudaResource, __pyx_k_cpCudaResource, sizeof(__pyx_k_cpCudaResource), 0, 0, 1, 1},
  {&__pyx_n_s_cpExportTableId_ptr, __pyx_k_cpExportTableId_ptr, sizeof(__pyx_k_cpExportTableId_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cpMipmappedArrayDesc_ptr, __pyx_k_cpMipmappedArrayDesc_ptr, sizeof(__pyx_k_cpMipmappedArrayDesc_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cpResDesc_ptr, __pyx_k_cpResDesc_ptr, sizeof(__pyx_k_cpResDesc_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cpResViewDesc_ptr, __pyx_k_cpResViewDesc_ptr, sizeof(__pyx_k_cpResViewDesc_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cpStream, __pyx_k_cpStream, sizeof(__pyx_k_cpStream), 0, 0, 1, 1},
  {&__pyx_n_s_cpTexDesc_ptr, __pyx_k_cpTexDesc_ptr, sizeof(__pyx_k_cpTexDesc_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cp_ptr, __pyx_k_cp_ptr, sizeof(__pyx_k_cp_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cparamArray, __pyx_k_cparamArray, sizeof(__pyx_k_cparamArray), 0, 0, 1, 1},
  {&__pyx_n_s_cparamsArray, __pyx_k_cparamsArray, sizeof(__pyx_k_cparamsArray), 0, 0, 1, 1},
  {&__pyx_n_s_cpeerContext, __pyx_k_cpeerContext, sizeof(__pyx_k_cpeerContext), 0, 0, 1, 1},
  {&__pyx_n_s_cpeerDev, __pyx_k_cpeerDev, sizeof(__pyx_k_cpeerDev), 0, 0, 1, 1},
  {&__pyx_n_s_cpformat, __pyx_k_cpformat, sizeof(__pyx_k_cpformat), 0, 0, 1, 1},
  {&__pyx_n_s_cpool, __pyx_k_cpool, sizeof(__pyx_k_cpool), 0, 0, 1, 1},
  {&__pyx_n_s_cpoolProps_ptr, __pyx_k_cpoolProps_ptr, sizeof(__pyx_k_cpoolProps_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cprop_ptr, __pyx_k_cprop_ptr, sizeof(__pyx_k_cprop_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cptr, __pyx_k_cptr, sizeof(__pyx_k_cptr), 0, 0, 1, 1},
  {&__pyx_n_s_cptr_ptr, __pyx_k_cptr_ptr, sizeof(__pyx_k_cptr_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cresource, __pyx_k_cresource, sizeof(__pyx_k_cresource), 0, 0, 1, 1},
  {&__pyx_n_s_cresources, __pyx_k_cresources, sizeof(__pyx_k_cresources), 0, 0, 1, 1},
  {&__pyx_n_s_crootNodes, __pyx_k_crootNodes, sizeof(__pyx_k_crootNodes), 0, 0, 1, 1},
  {&__pyx_n_s_cscope, __pyx_k_cscope, sizeof(__pyx_k_cscope), 0, 0, 1, 1},
  {&__pyx_n_s_csemHandleDesc_ptr, __pyx_k_csemHandleDesc_ptr, sizeof(__pyx_k_csemHandleDesc_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cshHandleType, __pyx_k_cshHandleType, sizeof(__pyx_k_cshHandleType), 0, 0, 1, 1},
  {&__pyx_n_s_cshareData_ptr, __pyx_k_cshareData_ptr, sizeof(__pyx_k_cshareData_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cshareableHandle, __pyx_k_cshareableHandle, sizeof(__pyx_k_cshareableHandle), 0, 0, 1, 1},
  {&__pyx_n_s_cshareableHandle_ptr, __pyx_k_cshareableHandle_ptr, sizeof(__pyx_k_cshareableHandle_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_csrc, __pyx_k_csrc, sizeof(__pyx_k_csrc), 0, 0, 1, 1},
  {&__pyx_n_s_csrcArray, __pyx_k_csrcArray, sizeof(__pyx_k_csrcArray), 0, 0, 1, 1},
  {&__pyx_n_s_csrcContext, __pyx_k_csrcContext, sizeof(__pyx_k_csrcContext), 0, 0, 1, 1},
  {&__pyx_n_s_csrcDevice, __pyx_k_csrcDevice, sizeof(__pyx_k_csrcDevice), 0, 0, 1, 1},
  {&__pyx_n_s_csrcHost, __pyx_k_csrcHost, sizeof(__pyx_k_csrcHost), 0, 0, 1, 1},
  {&__pyx_n_s_csrcHost_ptr, __pyx_k_csrcHost_ptr, sizeof(__pyx_k_csrcHost_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cstate, __pyx_k_cstate, sizeof(__pyx_k_cstate), 0, 0, 1, 1},
  {&__pyx_n_s_cstream, __pyx_k_cstream, sizeof(__pyx_k_cstream), 0, 0, 1, 1},
  {&__pyx_n_s_csurfObject, __pyx_k_csurfObject, sizeof(__pyx_k_csurfObject), 0, 0, 1, 1},
  {&__pyx_n_s_ctarget, __pyx_k_ctarget, sizeof(__pyx_k_ctarget), 0, 0, 1, 1},
  {&__pyx_n_s_ctexObject, __pyx_k_ctexObject, sizeof(__pyx_k_ctexObject), 0, 0, 1, 1},
  {&__pyx_n_s_cto, __pyx_k_cto, sizeof(__pyx_k_cto), 0, 0, 1, 1},
  {&__pyx_kp_u_ctx, __pyx_k_ctx, sizeof(__pyx_k_ctx), 0, 1, 0, 0},
  {&__pyx_n_s_ctx_2, __pyx_k_ctx_2, sizeof(__pyx_k_ctx_2), 0, 0, 1, 1},
  {&__pyx_n_s_ctypename, __pyx_k_ctypename, sizeof(__pyx_k_ctypename), 0, 0, 1, 1},
  {&__pyx_n_s_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1},
  {&__pyx_n_s_cuArray3DCreate, __pyx_k_cuArray3DCreate, sizeof(__pyx_k_cuArray3DCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuArray3DGetDescriptor, __pyx_k_cuArray3DGetDescriptor, sizeof(__pyx_k_cuArray3DGetDescriptor), 0, 0, 1, 1},
  {&__pyx_n_s_cuArrayCreate, __pyx_k_cuArrayCreate, sizeof(__pyx_k_cuArrayCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuArrayDestroy, __pyx_k_cuArrayDestroy, sizeof(__pyx_k_cuArrayDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cuArrayGetDescriptor, __pyx_k_cuArrayGetDescriptor, sizeof(__pyx_k_cuArrayGetDescriptor), 0, 0, 1, 1},
  {&__pyx_n_s_cuArrayGetMemoryRequirements, __pyx_k_cuArrayGetMemoryRequirements, sizeof(__pyx_k_cuArrayGetMemoryRequirements), 0, 0, 1, 1},
  {&__pyx_n_s_cuArrayGetPlane, __pyx_k_cuArrayGetPlane, sizeof(__pyx_k_cuArrayGetPlane), 0, 0, 1, 1},
  {&__pyx_n_s_cuArrayGetSparseProperties, __pyx_k_cuArrayGetSparseProperties, sizeof(__pyx_k_cuArrayGetSparseProperties), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxAttach, __pyx_k_cuCtxAttach, sizeof(__pyx_k_cuCtxAttach), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxCreate, __pyx_k_cuCtxCreate, sizeof(__pyx_k_cuCtxCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxCreate_v3, __pyx_k_cuCtxCreate_v3, sizeof(__pyx_k_cuCtxCreate_v3), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxCreate_v3_locals_genexpr, __pyx_k_cuCtxCreate_v3_locals_genexpr, sizeof(__pyx_k_cuCtxCreate_v3_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxDestroy, __pyx_k_cuCtxDestroy, sizeof(__pyx_k_cuCtxDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxDetach, __pyx_k_cuCtxDetach, sizeof(__pyx_k_cuCtxDetach), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxDisablePeerAccess, __pyx_k_cuCtxDisablePeerAccess, sizeof(__pyx_k_cuCtxDisablePeerAccess), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxEnablePeerAccess, __pyx_k_cuCtxEnablePeerAccess, sizeof(__pyx_k_cuCtxEnablePeerAccess), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxGetApiVersion, __pyx_k_cuCtxGetApiVersion, sizeof(__pyx_k_cuCtxGetApiVersion), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxGetCacheConfig, __pyx_k_cuCtxGetCacheConfig, sizeof(__pyx_k_cuCtxGetCacheConfig), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxGetCurrent, __pyx_k_cuCtxGetCurrent, sizeof(__pyx_k_cuCtxGetCurrent), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxGetDevice, __pyx_k_cuCtxGetDevice, sizeof(__pyx_k_cuCtxGetDevice), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxGetExecAffinity, __pyx_k_cuCtxGetExecAffinity, sizeof(__pyx_k_cuCtxGetExecAffinity), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxGetFlags, __pyx_k_cuCtxGetFlags, sizeof(__pyx_k_cuCtxGetFlags), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxGetLimit, __pyx_k_cuCtxGetLimit, sizeof(__pyx_k_cuCtxGetLimit), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxGetSharedMemConfig, __pyx_k_cuCtxGetSharedMemConfig, sizeof(__pyx_k_cuCtxGetSharedMemConfig), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxGetStreamPriorityRange, __pyx_k_cuCtxGetStreamPriorityRange, sizeof(__pyx_k_cuCtxGetStreamPriorityRange), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxPopCurrent, __pyx_k_cuCtxPopCurrent, sizeof(__pyx_k_cuCtxPopCurrent), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxPushCurrent, __pyx_k_cuCtxPushCurrent, sizeof(__pyx_k_cuCtxPushCurrent), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxResetPersistingL2Cache, __pyx_k_cuCtxResetPersistingL2Cache, sizeof(__pyx_k_cuCtxResetPersistingL2Cache), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxSetCacheConfig, __pyx_k_cuCtxSetCacheConfig, sizeof(__pyx_k_cuCtxSetCacheConfig), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxSetCurrent, __pyx_k_cuCtxSetCurrent, sizeof(__pyx_k_cuCtxSetCurrent), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxSetLimit, __pyx_k_cuCtxSetLimit, sizeof(__pyx_k_cuCtxSetLimit), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxSetSharedMemConfig, __pyx_k_cuCtxSetSharedMemConfig, sizeof(__pyx_k_cuCtxSetSharedMemConfig), 0, 0, 1, 1},
  {&__pyx_n_s_cuCtxSynchronize, __pyx_k_cuCtxSynchronize, sizeof(__pyx_k_cuCtxSynchronize), 0, 0, 1, 1},
  {&__pyx_n_s_cuDestroyExternalMemory, __pyx_k_cuDestroyExternalMemory, sizeof(__pyx_k_cuDestroyExternalMemory), 0, 0, 1, 1},
  {&__pyx_n_s_cuDestroyExternalSemaphore, __pyx_k_cuDestroyExternalSemaphore, sizeof(__pyx_k_cuDestroyExternalSemaphore), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceCanAccessPeer, __pyx_k_cuDeviceCanAccessPeer, sizeof(__pyx_k_cuDeviceCanAccessPeer), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceComputeCapability, __pyx_k_cuDeviceComputeCapability, sizeof(__pyx_k_cuDeviceComputeCapability), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGet, __pyx_k_cuDeviceGet, sizeof(__pyx_k_cuDeviceGet), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetAttribute, __pyx_k_cuDeviceGetAttribute, sizeof(__pyx_k_cuDeviceGetAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetByPCIBusId, __pyx_k_cuDeviceGetByPCIBusId, sizeof(__pyx_k_cuDeviceGetByPCIBusId), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetCount, __pyx_k_cuDeviceGetCount, sizeof(__pyx_k_cuDeviceGetCount), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetDefaultMemPool, __pyx_k_cuDeviceGetDefaultMemPool, sizeof(__pyx_k_cuDeviceGetDefaultMemPool), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetExecAffinitySupport, __pyx_k_cuDeviceGetExecAffinitySupport, sizeof(__pyx_k_cuDeviceGetExecAffinitySupport), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetGraphMemAttribute, __pyx_k_cuDeviceGetGraphMemAttribute, sizeof(__pyx_k_cuDeviceGetGraphMemAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetLuid, __pyx_k_cuDeviceGetLuid, sizeof(__pyx_k_cuDeviceGetLuid), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetMemPool, __pyx_k_cuDeviceGetMemPool, sizeof(__pyx_k_cuDeviceGetMemPool), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetName, __pyx_k_cuDeviceGetName, sizeof(__pyx_k_cuDeviceGetName), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetNvSciSyncAttributes, __pyx_k_cuDeviceGetNvSciSyncAttributes, sizeof(__pyx_k_cuDeviceGetNvSciSyncAttributes), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetP2PAttribute, __pyx_k_cuDeviceGetP2PAttribute, sizeof(__pyx_k_cuDeviceGetP2PAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetPCIBusId, __pyx_k_cuDeviceGetPCIBusId, sizeof(__pyx_k_cuDeviceGetPCIBusId), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetProperties, __pyx_k_cuDeviceGetProperties, sizeof(__pyx_k_cuDeviceGetProperties), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetTexture1DLinearMaxWid, __pyx_k_cuDeviceGetTexture1DLinearMaxWid, sizeof(__pyx_k_cuDeviceGetTexture1DLinearMaxWid), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetUuid, __pyx_k_cuDeviceGetUuid, sizeof(__pyx_k_cuDeviceGetUuid), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGetUuid_v2, __pyx_k_cuDeviceGetUuid_v2, sizeof(__pyx_k_cuDeviceGetUuid_v2), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceGraphMemTrim, __pyx_k_cuDeviceGraphMemTrim, sizeof(__pyx_k_cuDeviceGraphMemTrim), 0, 0, 1, 1},
  {&__pyx_n_s_cuDevicePrimaryCtxGetState, __pyx_k_cuDevicePrimaryCtxGetState, sizeof(__pyx_k_cuDevicePrimaryCtxGetState), 0, 0, 1, 1},
  {&__pyx_n_s_cuDevicePrimaryCtxRelease, __pyx_k_cuDevicePrimaryCtxRelease, sizeof(__pyx_k_cuDevicePrimaryCtxRelease), 0, 0, 1, 1},
  {&__pyx_n_s_cuDevicePrimaryCtxReset, __pyx_k_cuDevicePrimaryCtxReset, sizeof(__pyx_k_cuDevicePrimaryCtxReset), 0, 0, 1, 1},
  {&__pyx_n_s_cuDevicePrimaryCtxRetain, __pyx_k_cuDevicePrimaryCtxRetain, sizeof(__pyx_k_cuDevicePrimaryCtxRetain), 0, 0, 1, 1},
  {&__pyx_n_s_cuDevicePrimaryCtxSetFlags, __pyx_k_cuDevicePrimaryCtxSetFlags, sizeof(__pyx_k_cuDevicePrimaryCtxSetFlags), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceSetGraphMemAttribute, __pyx_k_cuDeviceSetGraphMemAttribute, sizeof(__pyx_k_cuDeviceSetGraphMemAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceSetMemPool, __pyx_k_cuDeviceSetMemPool, sizeof(__pyx_k_cuDeviceSetMemPool), 0, 0, 1, 1},
  {&__pyx_n_s_cuDeviceTotalMem, __pyx_k_cuDeviceTotalMem, sizeof(__pyx_k_cuDeviceTotalMem), 0, 0, 1, 1},
  {&__pyx_n_s_cuDriverGetVersion, __pyx_k_cuDriverGetVersion, sizeof(__pyx_k_cuDriverGetVersion), 0, 0, 1, 1},
  {&__pyx_n_s_cuEGLStreamConsumerAcquireFrame, __pyx_k_cuEGLStreamConsumerAcquireFrame, sizeof(__pyx_k_cuEGLStreamConsumerAcquireFrame), 0, 0, 1, 1},
  {&__pyx_n_s_cuEGLStreamConsumerConnect, __pyx_k_cuEGLStreamConsumerConnect, sizeof(__pyx_k_cuEGLStreamConsumerConnect), 0, 0, 1, 1},
  {&__pyx_n_s_cuEGLStreamConsumerConnectWithFl, __pyx_k_cuEGLStreamConsumerConnectWithFl, sizeof(__pyx_k_cuEGLStreamConsumerConnectWithFl), 0, 0, 1, 1},
  {&__pyx_n_s_cuEGLStreamConsumerDisconnect, __pyx_k_cuEGLStreamConsumerDisconnect, sizeof(__pyx_k_cuEGLStreamConsumerDisconnect), 0, 0, 1, 1},
  {&__pyx_n_s_cuEGLStreamConsumerReleaseFrame, __pyx_k_cuEGLStreamConsumerReleaseFrame, sizeof(__pyx_k_cuEGLStreamConsumerReleaseFrame), 0, 0, 1, 1},
  {&__pyx_n_s_cuEGLStreamProducerConnect, __pyx_k_cuEGLStreamProducerConnect, sizeof(__pyx_k_cuEGLStreamProducerConnect), 0, 0, 1, 1},
  {&__pyx_n_s_cuEGLStreamProducerDisconnect, __pyx_k_cuEGLStreamProducerDisconnect, sizeof(__pyx_k_cuEGLStreamProducerDisconnect), 0, 0, 1, 1},
  {&__pyx_n_s_cuEGLStreamProducerPresentFrame, __pyx_k_cuEGLStreamProducerPresentFrame, sizeof(__pyx_k_cuEGLStreamProducerPresentFrame), 0, 0, 1, 1},
  {&__pyx_n_s_cuEGLStreamProducerReturnFrame, __pyx_k_cuEGLStreamProducerReturnFrame, sizeof(__pyx_k_cuEGLStreamProducerReturnFrame), 0, 0, 1, 1},
  {&__pyx_n_s_cuEventCreate, __pyx_k_cuEventCreate, sizeof(__pyx_k_cuEventCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuEventCreateFromEGLSync, __pyx_k_cuEventCreateFromEGLSync, sizeof(__pyx_k_cuEventCreateFromEGLSync), 0, 0, 1, 1},
  {&__pyx_n_s_cuEventDestroy, __pyx_k_cuEventDestroy, sizeof(__pyx_k_cuEventDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cuEventElapsedTime, __pyx_k_cuEventElapsedTime, sizeof(__pyx_k_cuEventElapsedTime), 0, 0, 1, 1},
  {&__pyx_n_s_cuEventQuery, __pyx_k_cuEventQuery, sizeof(__pyx_k_cuEventQuery), 0, 0, 1, 1},
  {&__pyx_n_s_cuEventRecord, __pyx_k_cuEventRecord, sizeof(__pyx_k_cuEventRecord), 0, 0, 1, 1},
  {&__pyx_n_s_cuEventRecordWithFlags, __pyx_k_cuEventRecordWithFlags, sizeof(__pyx_k_cuEventRecordWithFlags), 0, 0, 1, 1},
  {&__pyx_n_s_cuEventSynchronize, __pyx_k_cuEventSynchronize, sizeof(__pyx_k_cuEventSynchronize), 0, 0, 1, 1},
  {&__pyx_n_s_cuExternalMemoryGetMappedBuffer, __pyx_k_cuExternalMemoryGetMappedBuffer, sizeof(__pyx_k_cuExternalMemoryGetMappedBuffer), 0, 0, 1, 1},
  {&__pyx_n_s_cuExternalMemoryGetMappedMipmapp, __pyx_k_cuExternalMemoryGetMappedMipmapp, sizeof(__pyx_k_cuExternalMemoryGetMappedMipmapp), 0, 0, 1, 1},
  {&__pyx_n_s_cuFlushGPUDirectRDMAWrites, __pyx_k_cuFlushGPUDirectRDMAWrites, sizeof(__pyx_k_cuFlushGPUDirectRDMAWrites), 0, 0, 1, 1},
  {&__pyx_kp_u_cuFormat, __pyx_k_cuFormat, sizeof(__pyx_k_cuFormat), 0, 1, 0, 0},
  {&__pyx_n_s_cuFormat_2, __pyx_k_cuFormat_2, sizeof(__pyx_k_cuFormat_2), 0, 0, 1, 1},
  {&__pyx_n_s_cuFuncGetAttribute, __pyx_k_cuFuncGetAttribute, sizeof(__pyx_k_cuFuncGetAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuFuncGetModule, __pyx_k_cuFuncGetModule, sizeof(__pyx_k_cuFuncGetModule), 0, 0, 1, 1},
  {&__pyx_n_s_cuFuncSetAttribute, __pyx_k_cuFuncSetAttribute, sizeof(__pyx_k_cuFuncSetAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuFuncSetBlockShape, __pyx_k_cuFuncSetBlockShape, sizeof(__pyx_k_cuFuncSetBlockShape), 0, 0, 1, 1},
  {&__pyx_n_s_cuFuncSetCacheConfig, __pyx_k_cuFuncSetCacheConfig, sizeof(__pyx_k_cuFuncSetCacheConfig), 0, 0, 1, 1},
  {&__pyx_n_s_cuFuncSetSharedMemConfig, __pyx_k_cuFuncSetSharedMemConfig, sizeof(__pyx_k_cuFuncSetSharedMemConfig), 0, 0, 1, 1},
  {&__pyx_n_s_cuFuncSetSharedSize, __pyx_k_cuFuncSetSharedSize, sizeof(__pyx_k_cuFuncSetSharedSize), 0, 0, 1, 1},
  {&__pyx_n_s_cuGLGetDevices, __pyx_k_cuGLGetDevices, sizeof(__pyx_k_cuGLGetDevices), 0, 0, 1, 1},
  {&__pyx_n_s_cuGetErrorName, __pyx_k_cuGetErrorName, sizeof(__pyx_k_cuGetErrorName), 0, 0, 1, 1},
  {&__pyx_n_s_cuGetErrorString, __pyx_k_cuGetErrorString, sizeof(__pyx_k_cuGetErrorString), 0, 0, 1, 1},
  {&__pyx_n_s_cuGetExportTable, __pyx_k_cuGetExportTable, sizeof(__pyx_k_cuGetExportTable), 0, 0, 1, 1},
  {&__pyx_n_s_cuGetProcAddress, __pyx_k_cuGetProcAddress, sizeof(__pyx_k_cuGetProcAddress), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddBatchMemOpNode, __pyx_k_cuGraphAddBatchMemOpNode, sizeof(__pyx_k_cuGraphAddBatchMemOpNode), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddBatchMemOpNode_locals, __pyx_k_cuGraphAddBatchMemOpNode_locals, sizeof(__pyx_k_cuGraphAddBatchMemOpNode_locals), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddChildGraphNode, __pyx_k_cuGraphAddChildGraphNode, sizeof(__pyx_k_cuGraphAddChildGraphNode), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddChildGraphNode_locals, __pyx_k_cuGraphAddChildGraphNode_locals, sizeof(__pyx_k_cuGraphAddChildGraphNode_locals), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddDependencies, __pyx_k_cuGraphAddDependencies, sizeof(__pyx_k_cuGraphAddDependencies), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddDependencies_locals_ge, __pyx_k_cuGraphAddDependencies_locals_ge, sizeof(__pyx_k_cuGraphAddDependencies_locals_ge), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddEmptyNode, __pyx_k_cuGraphAddEmptyNode, sizeof(__pyx_k_cuGraphAddEmptyNode), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddEmptyNode_locals_genex, __pyx_k_cuGraphAddEmptyNode_locals_genex, sizeof(__pyx_k_cuGraphAddEmptyNode_locals_genex), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddEventRecordNode, __pyx_k_cuGraphAddEventRecordNode, sizeof(__pyx_k_cuGraphAddEventRecordNode), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddEventRecordNode_locals, __pyx_k_cuGraphAddEventRecordNode_locals, sizeof(__pyx_k_cuGraphAddEventRecordNode_locals), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddEventWaitNode, __pyx_k_cuGraphAddEventWaitNode, sizeof(__pyx_k_cuGraphAddEventWaitNode), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddEventWaitNode_locals_g, __pyx_k_cuGraphAddEventWaitNode_locals_g, sizeof(__pyx_k_cuGraphAddEventWaitNode_locals_g), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddExternalSemaphoresSign, __pyx_k_cuGraphAddExternalSemaphoresSign, sizeof(__pyx_k_cuGraphAddExternalSemaphoresSign), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddExternalSemaphoresSign_2, __pyx_k_cuGraphAddExternalSemaphoresSign_2, sizeof(__pyx_k_cuGraphAddExternalSemaphoresSign_2), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddExternalSemaphoresWait, __pyx_k_cuGraphAddExternalSemaphoresWait, sizeof(__pyx_k_cuGraphAddExternalSemaphoresWait), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddExternalSemaphoresWait_2, __pyx_k_cuGraphAddExternalSemaphoresWait_2, sizeof(__pyx_k_cuGraphAddExternalSemaphoresWait_2), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddHostNode, __pyx_k_cuGraphAddHostNode, sizeof(__pyx_k_cuGraphAddHostNode), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddHostNode_locals_genexp, __pyx_k_cuGraphAddHostNode_locals_genexp, sizeof(__pyx_k_cuGraphAddHostNode_locals_genexp), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddKernelNode, __pyx_k_cuGraphAddKernelNode, sizeof(__pyx_k_cuGraphAddKernelNode), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddKernelNode_locals_gene, __pyx_k_cuGraphAddKernelNode_locals_gene, sizeof(__pyx_k_cuGraphAddKernelNode_locals_gene), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddMemAllocNode, __pyx_k_cuGraphAddMemAllocNode, sizeof(__pyx_k_cuGraphAddMemAllocNode), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddMemAllocNode_locals_ge, __pyx_k_cuGraphAddMemAllocNode_locals_ge, sizeof(__pyx_k_cuGraphAddMemAllocNode_locals_ge), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddMemFreeNode, __pyx_k_cuGraphAddMemFreeNode, sizeof(__pyx_k_cuGraphAddMemFreeNode), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddMemFreeNode_locals_gen, __pyx_k_cuGraphAddMemFreeNode_locals_gen, sizeof(__pyx_k_cuGraphAddMemFreeNode_locals_gen), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddMemcpyNode, __pyx_k_cuGraphAddMemcpyNode, sizeof(__pyx_k_cuGraphAddMemcpyNode), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddMemcpyNode_locals_gene, __pyx_k_cuGraphAddMemcpyNode_locals_gene, sizeof(__pyx_k_cuGraphAddMemcpyNode_locals_gene), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddMemsetNode, __pyx_k_cuGraphAddMemsetNode, sizeof(__pyx_k_cuGraphAddMemsetNode), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphAddMemsetNode_locals_gene, __pyx_k_cuGraphAddMemsetNode_locals_gene, sizeof(__pyx_k_cuGraphAddMemsetNode_locals_gene), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphBatchMemOpNodeGetParams, __pyx_k_cuGraphBatchMemOpNodeGetParams, sizeof(__pyx_k_cuGraphBatchMemOpNodeGetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphBatchMemOpNodeSetParams, __pyx_k_cuGraphBatchMemOpNodeSetParams, sizeof(__pyx_k_cuGraphBatchMemOpNodeSetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphChildGraphNodeGetGraph, __pyx_k_cuGraphChildGraphNodeGetGraph, sizeof(__pyx_k_cuGraphChildGraphNodeGetGraph), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphClone, __pyx_k_cuGraphClone, sizeof(__pyx_k_cuGraphClone), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphCreate, __pyx_k_cuGraphCreate, sizeof(__pyx_k_cuGraphCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphDebugDotPrint, __pyx_k_cuGraphDebugDotPrint, sizeof(__pyx_k_cuGraphDebugDotPrint), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphDestroy, __pyx_k_cuGraphDestroy, sizeof(__pyx_k_cuGraphDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphDestroyNode, __pyx_k_cuGraphDestroyNode, sizeof(__pyx_k_cuGraphDestroyNode), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphEventRecordNodeGetEvent, __pyx_k_cuGraphEventRecordNodeGetEvent, sizeof(__pyx_k_cuGraphEventRecordNodeGetEvent), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphEventRecordNodeSetEvent, __pyx_k_cuGraphEventRecordNodeSetEvent, sizeof(__pyx_k_cuGraphEventRecordNodeSetEvent), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphEventWaitNodeGetEvent, __pyx_k_cuGraphEventWaitNodeGetEvent, sizeof(__pyx_k_cuGraphEventWaitNodeGetEvent), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphEventWaitNodeSetEvent, __pyx_k_cuGraphEventWaitNodeSetEvent, sizeof(__pyx_k_cuGraphEventWaitNodeSetEvent), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExecBatchMemOpNodeSetPara, __pyx_k_cuGraphExecBatchMemOpNodeSetPara, sizeof(__pyx_k_cuGraphExecBatchMemOpNodeSetPara), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExecChildGraphNodeSetPara, __pyx_k_cuGraphExecChildGraphNodeSetPara, sizeof(__pyx_k_cuGraphExecChildGraphNodeSetPara), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExecDestroy, __pyx_k_cuGraphExecDestroy, sizeof(__pyx_k_cuGraphExecDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExecEventRecordNodeSetEve, __pyx_k_cuGraphExecEventRecordNodeSetEve, sizeof(__pyx_k_cuGraphExecEventRecordNodeSetEve), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExecEventWaitNodeSetEvent, __pyx_k_cuGraphExecEventWaitNodeSetEvent, sizeof(__pyx_k_cuGraphExecEventWaitNodeSetEvent), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExecExternalSemaphoresSig, __pyx_k_cuGraphExecExternalSemaphoresSig, sizeof(__pyx_k_cuGraphExecExternalSemaphoresSig), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExecExternalSemaphoresWai, __pyx_k_cuGraphExecExternalSemaphoresWai, sizeof(__pyx_k_cuGraphExecExternalSemaphoresWai), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExecHostNodeSetParams, __pyx_k_cuGraphExecHostNodeSetParams, sizeof(__pyx_k_cuGraphExecHostNodeSetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExecKernelNodeSetParams, __pyx_k_cuGraphExecKernelNodeSetParams, sizeof(__pyx_k_cuGraphExecKernelNodeSetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExecMemcpyNodeSetParams, __pyx_k_cuGraphExecMemcpyNodeSetParams, sizeof(__pyx_k_cuGraphExecMemcpyNodeSetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExecMemsetNodeSetParams, __pyx_k_cuGraphExecMemsetNodeSetParams, sizeof(__pyx_k_cuGraphExecMemsetNodeSetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExecUpdate, __pyx_k_cuGraphExecUpdate, sizeof(__pyx_k_cuGraphExecUpdate), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExternalSemaphoresSignalN, __pyx_k_cuGraphExternalSemaphoresSignalN, sizeof(__pyx_k_cuGraphExternalSemaphoresSignalN), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExternalSemaphoresSignalN_2, __pyx_k_cuGraphExternalSemaphoresSignalN_2, sizeof(__pyx_k_cuGraphExternalSemaphoresSignalN_2), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExternalSemaphoresWaitNod, __pyx_k_cuGraphExternalSemaphoresWaitNod, sizeof(__pyx_k_cuGraphExternalSemaphoresWaitNod), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphExternalSemaphoresWaitNod_2, __pyx_k_cuGraphExternalSemaphoresWaitNod_2, sizeof(__pyx_k_cuGraphExternalSemaphoresWaitNod_2), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphGetEdges, __pyx_k_cuGraphGetEdges, sizeof(__pyx_k_cuGraphGetEdges), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphGetNodes, __pyx_k_cuGraphGetNodes, sizeof(__pyx_k_cuGraphGetNodes), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphGetRootNodes, __pyx_k_cuGraphGetRootNodes, sizeof(__pyx_k_cuGraphGetRootNodes), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphHostNodeGetParams, __pyx_k_cuGraphHostNodeGetParams, sizeof(__pyx_k_cuGraphHostNodeGetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphHostNodeSetParams, __pyx_k_cuGraphHostNodeSetParams, sizeof(__pyx_k_cuGraphHostNodeSetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphInstantiate, __pyx_k_cuGraphInstantiate, sizeof(__pyx_k_cuGraphInstantiate), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphInstantiateWithFlags, __pyx_k_cuGraphInstantiateWithFlags, sizeof(__pyx_k_cuGraphInstantiateWithFlags), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphKernelNodeCopyAttributes, __pyx_k_cuGraphKernelNodeCopyAttributes, sizeof(__pyx_k_cuGraphKernelNodeCopyAttributes), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphKernelNodeGetAttribute, __pyx_k_cuGraphKernelNodeGetAttribute, sizeof(__pyx_k_cuGraphKernelNodeGetAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphKernelNodeGetParams, __pyx_k_cuGraphKernelNodeGetParams, sizeof(__pyx_k_cuGraphKernelNodeGetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphKernelNodeSetAttribute, __pyx_k_cuGraphKernelNodeSetAttribute, sizeof(__pyx_k_cuGraphKernelNodeSetAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphKernelNodeSetParams, __pyx_k_cuGraphKernelNodeSetParams, sizeof(__pyx_k_cuGraphKernelNodeSetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphLaunch, __pyx_k_cuGraphLaunch, sizeof(__pyx_k_cuGraphLaunch), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphMemAllocNodeGetParams, __pyx_k_cuGraphMemAllocNodeGetParams, sizeof(__pyx_k_cuGraphMemAllocNodeGetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphMemFreeNodeGetParams, __pyx_k_cuGraphMemFreeNodeGetParams, sizeof(__pyx_k_cuGraphMemFreeNodeGetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphMemcpyNodeGetParams, __pyx_k_cuGraphMemcpyNodeGetParams, sizeof(__pyx_k_cuGraphMemcpyNodeGetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphMemcpyNodeSetParams, __pyx_k_cuGraphMemcpyNodeSetParams, sizeof(__pyx_k_cuGraphMemcpyNodeSetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphMemsetNodeGetParams, __pyx_k_cuGraphMemsetNodeGetParams, sizeof(__pyx_k_cuGraphMemsetNodeGetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphMemsetNodeSetParams, __pyx_k_cuGraphMemsetNodeSetParams, sizeof(__pyx_k_cuGraphMemsetNodeSetParams), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphNodeFindInClone, __pyx_k_cuGraphNodeFindInClone, sizeof(__pyx_k_cuGraphNodeFindInClone), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphNodeGetDependencies, __pyx_k_cuGraphNodeGetDependencies, sizeof(__pyx_k_cuGraphNodeGetDependencies), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphNodeGetDependentNodes, __pyx_k_cuGraphNodeGetDependentNodes, sizeof(__pyx_k_cuGraphNodeGetDependentNodes), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphNodeGetEnabled, __pyx_k_cuGraphNodeGetEnabled, sizeof(__pyx_k_cuGraphNodeGetEnabled), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphNodeGetType, __pyx_k_cuGraphNodeGetType, sizeof(__pyx_k_cuGraphNodeGetType), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphNodeSetEnabled, __pyx_k_cuGraphNodeSetEnabled, sizeof(__pyx_k_cuGraphNodeSetEnabled), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphReleaseUserObject, __pyx_k_cuGraphReleaseUserObject, sizeof(__pyx_k_cuGraphReleaseUserObject), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphRemoveDependencies, __pyx_k_cuGraphRemoveDependencies, sizeof(__pyx_k_cuGraphRemoveDependencies), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphRemoveDependencies_locals, __pyx_k_cuGraphRemoveDependencies_locals, sizeof(__pyx_k_cuGraphRemoveDependencies_locals), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphRetainUserObject, __pyx_k_cuGraphRetainUserObject, sizeof(__pyx_k_cuGraphRetainUserObject), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphUpload, __pyx_k_cuGraphUpload, sizeof(__pyx_k_cuGraphUpload), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsEGLRegisterImage, __pyx_k_cuGraphicsEGLRegisterImage, sizeof(__pyx_k_cuGraphicsEGLRegisterImage), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsGLRegisterBuffer, __pyx_k_cuGraphicsGLRegisterBuffer, sizeof(__pyx_k_cuGraphicsGLRegisterBuffer), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsGLRegisterImage, __pyx_k_cuGraphicsGLRegisterImage, sizeof(__pyx_k_cuGraphicsGLRegisterImage), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsMapResources, __pyx_k_cuGraphicsMapResources, sizeof(__pyx_k_cuGraphicsMapResources), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsResourceGetMappedEglFr, __pyx_k_cuGraphicsResourceGetMappedEglFr, sizeof(__pyx_k_cuGraphicsResourceGetMappedEglFr), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsResourceGetMappedMipma, __pyx_k_cuGraphicsResourceGetMappedMipma, sizeof(__pyx_k_cuGraphicsResourceGetMappedMipma), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsResourceGetMappedPoint, __pyx_k_cuGraphicsResourceGetMappedPoint, sizeof(__pyx_k_cuGraphicsResourceGetMappedPoint), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsResourceSetMapFlags, __pyx_k_cuGraphicsResourceSetMapFlags, sizeof(__pyx_k_cuGraphicsResourceSetMapFlags), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsSubResourceGetMappedAr, __pyx_k_cuGraphicsSubResourceGetMappedAr, sizeof(__pyx_k_cuGraphicsSubResourceGetMappedAr), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsUnmapResources, __pyx_k_cuGraphicsUnmapResources, sizeof(__pyx_k_cuGraphicsUnmapResources), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsUnregisterResource, __pyx_k_cuGraphicsUnregisterResource, sizeof(__pyx_k_cuGraphicsUnregisterResource), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsVDPAURegisterOutputSur, __pyx_k_cuGraphicsVDPAURegisterOutputSur, sizeof(__pyx_k_cuGraphicsVDPAURegisterOutputSur), 0, 0, 1, 1},
  {&__pyx_n_s_cuGraphicsVDPAURegisterVideoSurf, __pyx_k_cuGraphicsVDPAURegisterVideoSurf, sizeof(__pyx_k_cuGraphicsVDPAURegisterVideoSurf), 0, 0, 1, 1},
  {&__pyx_n_s_cuImportExternalMemory, __pyx_k_cuImportExternalMemory, sizeof(__pyx_k_cuImportExternalMemory), 0, 0, 1, 1},
  {&__pyx_n_s_cuImportExternalSemaphore, __pyx_k_cuImportExternalSemaphore, sizeof(__pyx_k_cuImportExternalSemaphore), 0, 0, 1, 1},
  {&__pyx_n_s_cuInit, __pyx_k_cuInit, sizeof(__pyx_k_cuInit), 0, 0, 1, 1},
  {&__pyx_n_s_cuIpcCloseMemHandle, __pyx_k_cuIpcCloseMemHandle, sizeof(__pyx_k_cuIpcCloseMemHandle), 0, 0, 1, 1},
  {&__pyx_n_s_cuIpcGetEventHandle, __pyx_k_cuIpcGetEventHandle, sizeof(__pyx_k_cuIpcGetEventHandle), 0, 0, 1, 1},
  {&__pyx_n_s_cuIpcGetMemHandle, __pyx_k_cuIpcGetMemHandle, sizeof(__pyx_k_cuIpcGetMemHandle), 0, 0, 1, 1},
  {&__pyx_n_s_cuIpcOpenEventHandle, __pyx_k_cuIpcOpenEventHandle, sizeof(__pyx_k_cuIpcOpenEventHandle), 0, 0, 1, 1},
  {&__pyx_n_s_cuIpcOpenMemHandle, __pyx_k_cuIpcOpenMemHandle, sizeof(__pyx_k_cuIpcOpenMemHandle), 0, 0, 1, 1},
  {&__pyx_n_s_cuLaunch, __pyx_k_cuLaunch, sizeof(__pyx_k_cuLaunch), 0, 0, 1, 1},
  {&__pyx_n_s_cuLaunchCooperativeKernel, __pyx_k_cuLaunchCooperativeKernel, sizeof(__pyx_k_cuLaunchCooperativeKernel), 0, 0, 1, 1},
  {&__pyx_n_s_cuLaunchCooperativeKernelMultiDe, __pyx_k_cuLaunchCooperativeKernelMultiDe, sizeof(__pyx_k_cuLaunchCooperativeKernelMultiDe), 0, 0, 1, 1},
  {&__pyx_n_s_cuLaunchCooperativeKernelMultiDe_2, __pyx_k_cuLaunchCooperativeKernelMultiDe_2, sizeof(__pyx_k_cuLaunchCooperativeKernelMultiDe_2), 0, 0, 1, 1},
  {&__pyx_n_s_cuLaunchGrid, __pyx_k_cuLaunchGrid, sizeof(__pyx_k_cuLaunchGrid), 0, 0, 1, 1},
  {&__pyx_n_s_cuLaunchGridAsync, __pyx_k_cuLaunchGridAsync, sizeof(__pyx_k_cuLaunchGridAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuLaunchHostFunc, __pyx_k_cuLaunchHostFunc, sizeof(__pyx_k_cuLaunchHostFunc), 0, 0, 1, 1},
  {&__pyx_n_s_cuLaunchKernel, __pyx_k_cuLaunchKernel, sizeof(__pyx_k_cuLaunchKernel), 0, 0, 1, 1},
  {&__pyx_n_s_cuLaunchKernelEx, __pyx_k_cuLaunchKernelEx, sizeof(__pyx_k_cuLaunchKernelEx), 0, 0, 1, 1},
  {&__pyx_n_s_cuLinkAddData, __pyx_k_cuLinkAddData, sizeof(__pyx_k_cuLinkAddData), 0, 0, 1, 1},
  {&__pyx_n_s_cuLinkAddData_locals_genexpr, __pyx_k_cuLinkAddData_locals_genexpr, sizeof(__pyx_k_cuLinkAddData_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_cuLinkAddFile, __pyx_k_cuLinkAddFile, sizeof(__pyx_k_cuLinkAddFile), 0, 0, 1, 1},
  {&__pyx_n_s_cuLinkAddFile_locals_genexpr, __pyx_k_cuLinkAddFile_locals_genexpr, sizeof(__pyx_k_cuLinkAddFile_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_cuLinkComplete, __pyx_k_cuLinkComplete, sizeof(__pyx_k_cuLinkComplete), 0, 0, 1, 1},
  {&__pyx_n_s_cuLinkCreate, __pyx_k_cuLinkCreate, sizeof(__pyx_k_cuLinkCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuLinkCreate_locals_genexpr, __pyx_k_cuLinkCreate_locals_genexpr, sizeof(__pyx_k_cuLinkCreate_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_cuLinkDestroy, __pyx_k_cuLinkDestroy, sizeof(__pyx_k_cuLinkDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemAddressFree, __pyx_k_cuMemAddressFree, sizeof(__pyx_k_cuMemAddressFree), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemAddressReserve, __pyx_k_cuMemAddressReserve, sizeof(__pyx_k_cuMemAddressReserve), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemAdvise, __pyx_k_cuMemAdvise, sizeof(__pyx_k_cuMemAdvise), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemAlloc, __pyx_k_cuMemAlloc, sizeof(__pyx_k_cuMemAlloc), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemAllocAsync, __pyx_k_cuMemAllocAsync, sizeof(__pyx_k_cuMemAllocAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemAllocFromPoolAsync, __pyx_k_cuMemAllocFromPoolAsync, sizeof(__pyx_k_cuMemAllocFromPoolAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemAllocHost, __pyx_k_cuMemAllocHost, sizeof(__pyx_k_cuMemAllocHost), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemAllocManaged, __pyx_k_cuMemAllocManaged, sizeof(__pyx_k_cuMemAllocManaged), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemAllocPitch, __pyx_k_cuMemAllocPitch, sizeof(__pyx_k_cuMemAllocPitch), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemCreate, __pyx_k_cuMemCreate, sizeof(__pyx_k_cuMemCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemExportToShareableHandle, __pyx_k_cuMemExportToShareableHandle, sizeof(__pyx_k_cuMemExportToShareableHandle), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemFree, __pyx_k_cuMemFree, sizeof(__pyx_k_cuMemFree), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemFreeAsync, __pyx_k_cuMemFreeAsync, sizeof(__pyx_k_cuMemFreeAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemFreeHost, __pyx_k_cuMemFreeHost, sizeof(__pyx_k_cuMemFreeHost), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemGetAccess, __pyx_k_cuMemGetAccess, sizeof(__pyx_k_cuMemGetAccess), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemGetAddressRange, __pyx_k_cuMemGetAddressRange, sizeof(__pyx_k_cuMemGetAddressRange), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemGetAllocationGranularity, __pyx_k_cuMemGetAllocationGranularity, sizeof(__pyx_k_cuMemGetAllocationGranularity), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemGetAllocationPropertiesFrom, __pyx_k_cuMemGetAllocationPropertiesFrom, sizeof(__pyx_k_cuMemGetAllocationPropertiesFrom), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemGetHandleForAddressRange, __pyx_k_cuMemGetHandleForAddressRange, sizeof(__pyx_k_cuMemGetHandleForAddressRange), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemGetInfo, __pyx_k_cuMemGetInfo, sizeof(__pyx_k_cuMemGetInfo), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemHostAlloc, __pyx_k_cuMemHostAlloc, sizeof(__pyx_k_cuMemHostAlloc), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemHostGetDevicePointer, __pyx_k_cuMemHostGetDevicePointer, sizeof(__pyx_k_cuMemHostGetDevicePointer), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemHostGetFlags, __pyx_k_cuMemHostGetFlags, sizeof(__pyx_k_cuMemHostGetFlags), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemHostRegister, __pyx_k_cuMemHostRegister, sizeof(__pyx_k_cuMemHostRegister), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemHostUnregister, __pyx_k_cuMemHostUnregister, sizeof(__pyx_k_cuMemHostUnregister), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemImportFromShareableHandle, __pyx_k_cuMemImportFromShareableHandle, sizeof(__pyx_k_cuMemImportFromShareableHandle), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemMap, __pyx_k_cuMemMap, sizeof(__pyx_k_cuMemMap), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemMapArrayAsync, __pyx_k_cuMemMapArrayAsync, sizeof(__pyx_k_cuMemMapArrayAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemMapArrayAsync_locals_genexp, __pyx_k_cuMemMapArrayAsync_locals_genexp, sizeof(__pyx_k_cuMemMapArrayAsync_locals_genexp), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPoolCreate, __pyx_k_cuMemPoolCreate, sizeof(__pyx_k_cuMemPoolCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPoolDestroy, __pyx_k_cuMemPoolDestroy, sizeof(__pyx_k_cuMemPoolDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPoolExportPointer, __pyx_k_cuMemPoolExportPointer, sizeof(__pyx_k_cuMemPoolExportPointer), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPoolExportToShareableHandle, __pyx_k_cuMemPoolExportToShareableHandle, sizeof(__pyx_k_cuMemPoolExportToShareableHandle), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPoolGetAccess, __pyx_k_cuMemPoolGetAccess, sizeof(__pyx_k_cuMemPoolGetAccess), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPoolGetAttribute, __pyx_k_cuMemPoolGetAttribute, sizeof(__pyx_k_cuMemPoolGetAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPoolImportFromShareableHand, __pyx_k_cuMemPoolImportFromShareableHand, sizeof(__pyx_k_cuMemPoolImportFromShareableHand), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPoolImportPointer, __pyx_k_cuMemPoolImportPointer, sizeof(__pyx_k_cuMemPoolImportPointer), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPoolSetAccess, __pyx_k_cuMemPoolSetAccess, sizeof(__pyx_k_cuMemPoolSetAccess), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPoolSetAccess_locals_genexp, __pyx_k_cuMemPoolSetAccess_locals_genexp, sizeof(__pyx_k_cuMemPoolSetAccess_locals_genexp), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPoolSetAttribute, __pyx_k_cuMemPoolSetAttribute, sizeof(__pyx_k_cuMemPoolSetAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPoolTrimTo, __pyx_k_cuMemPoolTrimTo, sizeof(__pyx_k_cuMemPoolTrimTo), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemPrefetchAsync, __pyx_k_cuMemPrefetchAsync, sizeof(__pyx_k_cuMemPrefetchAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemRangeGetAttribute, __pyx_k_cuMemRangeGetAttribute, sizeof(__pyx_k_cuMemRangeGetAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemRangeGetAttributes, __pyx_k_cuMemRangeGetAttributes, sizeof(__pyx_k_cuMemRangeGetAttributes), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemRangeGetAttributes_locals_g, __pyx_k_cuMemRangeGetAttributes_locals_g, sizeof(__pyx_k_cuMemRangeGetAttributes_locals_g), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemRelease, __pyx_k_cuMemRelease, sizeof(__pyx_k_cuMemRelease), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemRetainAllocationHandle, __pyx_k_cuMemRetainAllocationHandle, sizeof(__pyx_k_cuMemRetainAllocationHandle), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemSetAccess, __pyx_k_cuMemSetAccess, sizeof(__pyx_k_cuMemSetAccess), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemSetAccess_locals_genexpr, __pyx_k_cuMemSetAccess_locals_genexpr, sizeof(__pyx_k_cuMemSetAccess_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemUnmap, __pyx_k_cuMemUnmap, sizeof(__pyx_k_cuMemUnmap), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpy, __pyx_k_cuMemcpy, sizeof(__pyx_k_cuMemcpy), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpy2D, __pyx_k_cuMemcpy2D, sizeof(__pyx_k_cuMemcpy2D), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpy2DAsync, __pyx_k_cuMemcpy2DAsync, sizeof(__pyx_k_cuMemcpy2DAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpy2DUnaligned, __pyx_k_cuMemcpy2DUnaligned, sizeof(__pyx_k_cuMemcpy2DUnaligned), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpy3D, __pyx_k_cuMemcpy3D, sizeof(__pyx_k_cuMemcpy3D), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpy3DAsync, __pyx_k_cuMemcpy3DAsync, sizeof(__pyx_k_cuMemcpy3DAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpy3DPeer, __pyx_k_cuMemcpy3DPeer, sizeof(__pyx_k_cuMemcpy3DPeer), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpy3DPeerAsync, __pyx_k_cuMemcpy3DPeerAsync, sizeof(__pyx_k_cuMemcpy3DPeerAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyAsync, __pyx_k_cuMemcpyAsync, sizeof(__pyx_k_cuMemcpyAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyAtoA, __pyx_k_cuMemcpyAtoA, sizeof(__pyx_k_cuMemcpyAtoA), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyAtoD, __pyx_k_cuMemcpyAtoD, sizeof(__pyx_k_cuMemcpyAtoD), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyAtoH, __pyx_k_cuMemcpyAtoH, sizeof(__pyx_k_cuMemcpyAtoH), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyAtoHAsync, __pyx_k_cuMemcpyAtoHAsync, sizeof(__pyx_k_cuMemcpyAtoHAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyDtoA, __pyx_k_cuMemcpyDtoA, sizeof(__pyx_k_cuMemcpyDtoA), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyDtoD, __pyx_k_cuMemcpyDtoD, sizeof(__pyx_k_cuMemcpyDtoD), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyDtoDAsync, __pyx_k_cuMemcpyDtoDAsync, sizeof(__pyx_k_cuMemcpyDtoDAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyDtoH, __pyx_k_cuMemcpyDtoH, sizeof(__pyx_k_cuMemcpyDtoH), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyDtoHAsync, __pyx_k_cuMemcpyDtoHAsync, sizeof(__pyx_k_cuMemcpyDtoHAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyHtoA, __pyx_k_cuMemcpyHtoA, sizeof(__pyx_k_cuMemcpyHtoA), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyHtoAAsync, __pyx_k_cuMemcpyHtoAAsync, sizeof(__pyx_k_cuMemcpyHtoAAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyHtoD, __pyx_k_cuMemcpyHtoD, sizeof(__pyx_k_cuMemcpyHtoD), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyHtoDAsync, __pyx_k_cuMemcpyHtoDAsync, sizeof(__pyx_k_cuMemcpyHtoDAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyPeer, __pyx_k_cuMemcpyPeer, sizeof(__pyx_k_cuMemcpyPeer), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemcpyPeerAsync, __pyx_k_cuMemcpyPeerAsync, sizeof(__pyx_k_cuMemcpyPeerAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemsetD16, __pyx_k_cuMemsetD16, sizeof(__pyx_k_cuMemsetD16), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemsetD16Async, __pyx_k_cuMemsetD16Async, sizeof(__pyx_k_cuMemsetD16Async), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemsetD2D16, __pyx_k_cuMemsetD2D16, sizeof(__pyx_k_cuMemsetD2D16), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemsetD2D16Async, __pyx_k_cuMemsetD2D16Async, sizeof(__pyx_k_cuMemsetD2D16Async), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemsetD2D32, __pyx_k_cuMemsetD2D32, sizeof(__pyx_k_cuMemsetD2D32), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemsetD2D32Async, __pyx_k_cuMemsetD2D32Async, sizeof(__pyx_k_cuMemsetD2D32Async), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemsetD2D8, __pyx_k_cuMemsetD2D8, sizeof(__pyx_k_cuMemsetD2D8), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemsetD2D8Async, __pyx_k_cuMemsetD2D8Async, sizeof(__pyx_k_cuMemsetD2D8Async), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemsetD32, __pyx_k_cuMemsetD32, sizeof(__pyx_k_cuMemsetD32), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemsetD32Async, __pyx_k_cuMemsetD32Async, sizeof(__pyx_k_cuMemsetD32Async), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemsetD8, __pyx_k_cuMemsetD8, sizeof(__pyx_k_cuMemsetD8), 0, 0, 1, 1},
  {&__pyx_n_s_cuMemsetD8Async, __pyx_k_cuMemsetD8Async, sizeof(__pyx_k_cuMemsetD8Async), 0, 0, 1, 1},
  {&__pyx_n_s_cuMipmappedArrayCreate, __pyx_k_cuMipmappedArrayCreate, sizeof(__pyx_k_cuMipmappedArrayCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuMipmappedArrayDestroy, __pyx_k_cuMipmappedArrayDestroy, sizeof(__pyx_k_cuMipmappedArrayDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cuMipmappedArrayGetLevel, __pyx_k_cuMipmappedArrayGetLevel, sizeof(__pyx_k_cuMipmappedArrayGetLevel), 0, 0, 1, 1},
  {&__pyx_n_s_cuMipmappedArrayGetMemoryRequire, __pyx_k_cuMipmappedArrayGetMemoryRequire, sizeof(__pyx_k_cuMipmappedArrayGetMemoryRequire), 0, 0, 1, 1},
  {&__pyx_n_s_cuMipmappedArrayGetSparsePropert, __pyx_k_cuMipmappedArrayGetSparsePropert, sizeof(__pyx_k_cuMipmappedArrayGetSparsePropert), 0, 0, 1, 1},
  {&__pyx_n_s_cuModuleGetFunction, __pyx_k_cuModuleGetFunction, sizeof(__pyx_k_cuModuleGetFunction), 0, 0, 1, 1},
  {&__pyx_n_s_cuModuleGetGlobal, __pyx_k_cuModuleGetGlobal, sizeof(__pyx_k_cuModuleGetGlobal), 0, 0, 1, 1},
  {&__pyx_n_s_cuModuleGetLoadingMode, __pyx_k_cuModuleGetLoadingMode, sizeof(__pyx_k_cuModuleGetLoadingMode), 0, 0, 1, 1},
  {&__pyx_n_s_cuModuleGetSurfRef, __pyx_k_cuModuleGetSurfRef, sizeof(__pyx_k_cuModuleGetSurfRef), 0, 0, 1, 1},
  {&__pyx_n_s_cuModuleGetTexRef, __pyx_k_cuModuleGetTexRef, sizeof(__pyx_k_cuModuleGetTexRef), 0, 0, 1, 1},
  {&__pyx_n_s_cuModuleLoad, __pyx_k_cuModuleLoad, sizeof(__pyx_k_cuModuleLoad), 0, 0, 1, 1},
  {&__pyx_n_s_cuModuleLoadData, __pyx_k_cuModuleLoadData, sizeof(__pyx_k_cuModuleLoadData), 0, 0, 1, 1},
  {&__pyx_n_s_cuModuleLoadDataEx, __pyx_k_cuModuleLoadDataEx, sizeof(__pyx_k_cuModuleLoadDataEx), 0, 0, 1, 1},
  {&__pyx_n_s_cuModuleLoadDataEx_locals_genexp, __pyx_k_cuModuleLoadDataEx_locals_genexp, sizeof(__pyx_k_cuModuleLoadDataEx_locals_genexp), 0, 0, 1, 1},
  {&__pyx_n_s_cuModuleLoadFatBinary, __pyx_k_cuModuleLoadFatBinary, sizeof(__pyx_k_cuModuleLoadFatBinary), 0, 0, 1, 1},
  {&__pyx_n_s_cuModuleUnload, __pyx_k_cuModuleUnload, sizeof(__pyx_k_cuModuleUnload), 0, 0, 1, 1},
  {&__pyx_n_s_cuOccupancyAvailableDynamicSMemP, __pyx_k_cuOccupancyAvailableDynamicSMemP, sizeof(__pyx_k_cuOccupancyAvailableDynamicSMemP), 0, 0, 1, 1},
  {&__pyx_n_s_cuOccupancyMaxActiveBlocksPerMul, __pyx_k_cuOccupancyMaxActiveBlocksPerMul, sizeof(__pyx_k_cuOccupancyMaxActiveBlocksPerMul), 0, 0, 1, 1},
  {&__pyx_n_s_cuOccupancyMaxActiveBlocksPerMul_2, __pyx_k_cuOccupancyMaxActiveBlocksPerMul_2, sizeof(__pyx_k_cuOccupancyMaxActiveBlocksPerMul_2), 0, 0, 1, 1},
  {&__pyx_n_s_cuOccupancyMaxActiveClusters, __pyx_k_cuOccupancyMaxActiveClusters, sizeof(__pyx_k_cuOccupancyMaxActiveClusters), 0, 0, 1, 1},
  {&__pyx_n_s_cuOccupancyMaxPotentialBlockSize, __pyx_k_cuOccupancyMaxPotentialBlockSize, sizeof(__pyx_k_cuOccupancyMaxPotentialBlockSize), 0, 0, 1, 1},
  {&__pyx_n_s_cuOccupancyMaxPotentialBlockSize_2, __pyx_k_cuOccupancyMaxPotentialBlockSize_2, sizeof(__pyx_k_cuOccupancyMaxPotentialBlockSize_2), 0, 0, 1, 1},
  {&__pyx_n_s_cuOccupancyMaxPotentialClusterSi, __pyx_k_cuOccupancyMaxPotentialClusterSi, sizeof(__pyx_k_cuOccupancyMaxPotentialClusterSi), 0, 0, 1, 1},
  {&__pyx_n_s_cuParamSetSize, __pyx_k_cuParamSetSize, sizeof(__pyx_k_cuParamSetSize), 0, 0, 1, 1},
  {&__pyx_n_s_cuParamSetTexRef, __pyx_k_cuParamSetTexRef, sizeof(__pyx_k_cuParamSetTexRef), 0, 0, 1, 1},
  {&__pyx_n_s_cuParamSetf, __pyx_k_cuParamSetf, sizeof(__pyx_k_cuParamSetf), 0, 0, 1, 1},
  {&__pyx_n_s_cuParamSeti, __pyx_k_cuParamSeti, sizeof(__pyx_k_cuParamSeti), 0, 0, 1, 1},
  {&__pyx_n_s_cuParamSetv, __pyx_k_cuParamSetv, sizeof(__pyx_k_cuParamSetv), 0, 0, 1, 1},
  {&__pyx_n_s_cuPointerGetAttribute, __pyx_k_cuPointerGetAttribute, sizeof(__pyx_k_cuPointerGetAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuPointerGetAttributes, __pyx_k_cuPointerGetAttributes, sizeof(__pyx_k_cuPointerGetAttributes), 0, 0, 1, 1},
  {&__pyx_n_s_cuPointerGetAttributes_locals_ge, __pyx_k_cuPointerGetAttributes_locals_ge, sizeof(__pyx_k_cuPointerGetAttributes_locals_ge), 0, 0, 1, 1},
  {&__pyx_n_s_cuPointerSetAttribute, __pyx_k_cuPointerSetAttribute, sizeof(__pyx_k_cuPointerSetAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuProfilerInitialize, __pyx_k_cuProfilerInitialize, sizeof(__pyx_k_cuProfilerInitialize), 0, 0, 1, 1},
  {&__pyx_n_s_cuProfilerStart, __pyx_k_cuProfilerStart, sizeof(__pyx_k_cuProfilerStart), 0, 0, 1, 1},
  {&__pyx_n_s_cuProfilerStop, __pyx_k_cuProfilerStop, sizeof(__pyx_k_cuProfilerStop), 0, 0, 1, 1},
  {&__pyx_n_s_cuSignalExternalSemaphoresAsync, __pyx_k_cuSignalExternalSemaphoresAsync, sizeof(__pyx_k_cuSignalExternalSemaphoresAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuSignalExternalSemaphoresAsync_2, __pyx_k_cuSignalExternalSemaphoresAsync_2, sizeof(__pyx_k_cuSignalExternalSemaphoresAsync_2), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamAddCallback, __pyx_k_cuStreamAddCallback, sizeof(__pyx_k_cuStreamAddCallback), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamAttachMemAsync, __pyx_k_cuStreamAttachMemAsync, sizeof(__pyx_k_cuStreamAttachMemAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamBatchMemOp, __pyx_k_cuStreamBatchMemOp, sizeof(__pyx_k_cuStreamBatchMemOp), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamBatchMemOp_locals_genexp, __pyx_k_cuStreamBatchMemOp_locals_genexp, sizeof(__pyx_k_cuStreamBatchMemOp_locals_genexp), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamBatchMemOp_v2, __pyx_k_cuStreamBatchMemOp_v2, sizeof(__pyx_k_cuStreamBatchMemOp_v2), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamBatchMemOp_v2_locals_gen, __pyx_k_cuStreamBatchMemOp_v2_locals_gen, sizeof(__pyx_k_cuStreamBatchMemOp_v2_locals_gen), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamBeginCapture, __pyx_k_cuStreamBeginCapture, sizeof(__pyx_k_cuStreamBeginCapture), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamCopyAttributes, __pyx_k_cuStreamCopyAttributes, sizeof(__pyx_k_cuStreamCopyAttributes), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamCreate, __pyx_k_cuStreamCreate, sizeof(__pyx_k_cuStreamCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamCreateWithPriority, __pyx_k_cuStreamCreateWithPriority, sizeof(__pyx_k_cuStreamCreateWithPriority), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamDestroy, __pyx_k_cuStreamDestroy, sizeof(__pyx_k_cuStreamDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamEndCapture, __pyx_k_cuStreamEndCapture, sizeof(__pyx_k_cuStreamEndCapture), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamGetAttribute, __pyx_k_cuStreamGetAttribute, sizeof(__pyx_k_cuStreamGetAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamGetCaptureInfo, __pyx_k_cuStreamGetCaptureInfo, sizeof(__pyx_k_cuStreamGetCaptureInfo), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamGetCaptureInfo_v2, __pyx_k_cuStreamGetCaptureInfo_v2, sizeof(__pyx_k_cuStreamGetCaptureInfo_v2), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamGetCtx, __pyx_k_cuStreamGetCtx, sizeof(__pyx_k_cuStreamGetCtx), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamGetFlags, __pyx_k_cuStreamGetFlags, sizeof(__pyx_k_cuStreamGetFlags), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamGetPriority, __pyx_k_cuStreamGetPriority, sizeof(__pyx_k_cuStreamGetPriority), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamIsCapturing, __pyx_k_cuStreamIsCapturing, sizeof(__pyx_k_cuStreamIsCapturing), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamQuery, __pyx_k_cuStreamQuery, sizeof(__pyx_k_cuStreamQuery), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamSetAttribute, __pyx_k_cuStreamSetAttribute, sizeof(__pyx_k_cuStreamSetAttribute), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamSynchronize, __pyx_k_cuStreamSynchronize, sizeof(__pyx_k_cuStreamSynchronize), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamUpdateCaptureDependencie, __pyx_k_cuStreamUpdateCaptureDependencie, sizeof(__pyx_k_cuStreamUpdateCaptureDependencie), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamUpdateCaptureDependencie_2, __pyx_k_cuStreamUpdateCaptureDependencie_2, sizeof(__pyx_k_cuStreamUpdateCaptureDependencie_2), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamWaitEvent, __pyx_k_cuStreamWaitEvent, sizeof(__pyx_k_cuStreamWaitEvent), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamWaitValue32, __pyx_k_cuStreamWaitValue32, sizeof(__pyx_k_cuStreamWaitValue32), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamWaitValue32_v2, __pyx_k_cuStreamWaitValue32_v2, sizeof(__pyx_k_cuStreamWaitValue32_v2), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamWaitValue64, __pyx_k_cuStreamWaitValue64, sizeof(__pyx_k_cuStreamWaitValue64), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamWaitValue64_v2, __pyx_k_cuStreamWaitValue64_v2, sizeof(__pyx_k_cuStreamWaitValue64_v2), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamWriteValue32, __pyx_k_cuStreamWriteValue32, sizeof(__pyx_k_cuStreamWriteValue32), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamWriteValue32_v2, __pyx_k_cuStreamWriteValue32_v2, sizeof(__pyx_k_cuStreamWriteValue32_v2), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamWriteValue64, __pyx_k_cuStreamWriteValue64, sizeof(__pyx_k_cuStreamWriteValue64), 0, 0, 1, 1},
  {&__pyx_n_s_cuStreamWriteValue64_v2, __pyx_k_cuStreamWriteValue64_v2, sizeof(__pyx_k_cuStreamWriteValue64_v2), 0, 0, 1, 1},
  {&__pyx_n_s_cuSurfObjectCreate, __pyx_k_cuSurfObjectCreate, sizeof(__pyx_k_cuSurfObjectCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuSurfObjectDestroy, __pyx_k_cuSurfObjectDestroy, sizeof(__pyx_k_cuSurfObjectDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cuSurfObjectGetResourceDesc, __pyx_k_cuSurfObjectGetResourceDesc, sizeof(__pyx_k_cuSurfObjectGetResourceDesc), 0, 0, 1, 1},
  {&__pyx_n_s_cuSurfRefGetArray, __pyx_k_cuSurfRefGetArray, sizeof(__pyx_k_cuSurfRefGetArray), 0, 0, 1, 1},
  {&__pyx_n_s_cuSurfRefSetArray, __pyx_k_cuSurfRefSetArray, sizeof(__pyx_k_cuSurfRefSetArray), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexObjectCreate, __pyx_k_cuTexObjectCreate, sizeof(__pyx_k_cuTexObjectCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexObjectDestroy, __pyx_k_cuTexObjectDestroy, sizeof(__pyx_k_cuTexObjectDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexObjectGetResourceDesc, __pyx_k_cuTexObjectGetResourceDesc, sizeof(__pyx_k_cuTexObjectGetResourceDesc), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexObjectGetResourceViewDesc, __pyx_k_cuTexObjectGetResourceViewDesc, sizeof(__pyx_k_cuTexObjectGetResourceViewDesc), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexObjectGetTextureDesc, __pyx_k_cuTexObjectGetTextureDesc, sizeof(__pyx_k_cuTexObjectGetTextureDesc), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefCreate, __pyx_k_cuTexRefCreate, sizeof(__pyx_k_cuTexRefCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefDestroy, __pyx_k_cuTexRefDestroy, sizeof(__pyx_k_cuTexRefDestroy), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefGetAddress, __pyx_k_cuTexRefGetAddress, sizeof(__pyx_k_cuTexRefGetAddress), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefGetAddressMode, __pyx_k_cuTexRefGetAddressMode, sizeof(__pyx_k_cuTexRefGetAddressMode), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefGetArray, __pyx_k_cuTexRefGetArray, sizeof(__pyx_k_cuTexRefGetArray), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefGetBorderColor, __pyx_k_cuTexRefGetBorderColor, sizeof(__pyx_k_cuTexRefGetBorderColor), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefGetFilterMode, __pyx_k_cuTexRefGetFilterMode, sizeof(__pyx_k_cuTexRefGetFilterMode), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefGetFlags, __pyx_k_cuTexRefGetFlags, sizeof(__pyx_k_cuTexRefGetFlags), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefGetFormat, __pyx_k_cuTexRefGetFormat, sizeof(__pyx_k_cuTexRefGetFormat), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefGetMaxAnisotropy, __pyx_k_cuTexRefGetMaxAnisotropy, sizeof(__pyx_k_cuTexRefGetMaxAnisotropy), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefGetMipmapFilterMode, __pyx_k_cuTexRefGetMipmapFilterMode, sizeof(__pyx_k_cuTexRefGetMipmapFilterMode), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefGetMipmapLevelBias, __pyx_k_cuTexRefGetMipmapLevelBias, sizeof(__pyx_k_cuTexRefGetMipmapLevelBias), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefGetMipmapLevelClamp, __pyx_k_cuTexRefGetMipmapLevelClamp, sizeof(__pyx_k_cuTexRefGetMipmapLevelClamp), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefGetMipmappedArray, __pyx_k_cuTexRefGetMipmappedArray, sizeof(__pyx_k_cuTexRefGetMipmappedArray), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetAddress, __pyx_k_cuTexRefSetAddress, sizeof(__pyx_k_cuTexRefSetAddress), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetAddress2D, __pyx_k_cuTexRefSetAddress2D, sizeof(__pyx_k_cuTexRefSetAddress2D), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetAddressMode, __pyx_k_cuTexRefSetAddressMode, sizeof(__pyx_k_cuTexRefSetAddressMode), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetArray, __pyx_k_cuTexRefSetArray, sizeof(__pyx_k_cuTexRefSetArray), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetBorderColor, __pyx_k_cuTexRefSetBorderColor, sizeof(__pyx_k_cuTexRefSetBorderColor), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetFilterMode, __pyx_k_cuTexRefSetFilterMode, sizeof(__pyx_k_cuTexRefSetFilterMode), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetFlags, __pyx_k_cuTexRefSetFlags, sizeof(__pyx_k_cuTexRefSetFlags), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetFormat, __pyx_k_cuTexRefSetFormat, sizeof(__pyx_k_cuTexRefSetFormat), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetMaxAnisotropy, __pyx_k_cuTexRefSetMaxAnisotropy, sizeof(__pyx_k_cuTexRefSetMaxAnisotropy), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetMipmapFilterMode, __pyx_k_cuTexRefSetMipmapFilterMode, sizeof(__pyx_k_cuTexRefSetMipmapFilterMode), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetMipmapLevelBias, __pyx_k_cuTexRefSetMipmapLevelBias, sizeof(__pyx_k_cuTexRefSetMipmapLevelBias), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetMipmapLevelClamp, __pyx_k_cuTexRefSetMipmapLevelClamp, sizeof(__pyx_k_cuTexRefSetMipmapLevelClamp), 0, 0, 1, 1},
  {&__pyx_n_s_cuTexRefSetMipmappedArray, __pyx_k_cuTexRefSetMipmappedArray, sizeof(__pyx_k_cuTexRefSetMipmappedArray), 0, 0, 1, 1},
  {&__pyx_n_s_cuThreadExchangeStreamCaptureMod, __pyx_k_cuThreadExchangeStreamCaptureMod, sizeof(__pyx_k_cuThreadExchangeStreamCaptureMod), 0, 0, 1, 1},
  {&__pyx_n_s_cuUserObjectCreate, __pyx_k_cuUserObjectCreate, sizeof(__pyx_k_cuUserObjectCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuUserObjectRelease, __pyx_k_cuUserObjectRelease, sizeof(__pyx_k_cuUserObjectRelease), 0, 0, 1, 1},
  {&__pyx_n_s_cuUserObjectRetain, __pyx_k_cuUserObjectRetain, sizeof(__pyx_k_cuUserObjectRetain), 0, 0, 1, 1},
  {&__pyx_n_s_cuVDPAUCtxCreate, __pyx_k_cuVDPAUCtxCreate, sizeof(__pyx_k_cuVDPAUCtxCreate), 0, 0, 1, 1},
  {&__pyx_n_s_cuVDPAUGetDevice, __pyx_k_cuVDPAUGetDevice, sizeof(__pyx_k_cuVDPAUGetDevice), 0, 0, 1, 1},
  {&__pyx_n_s_cuWaitExternalSemaphoresAsync, __pyx_k_cuWaitExternalSemaphoresAsync, sizeof(__pyx_k_cuWaitExternalSemaphoresAsync), 0, 0, 1, 1},
  {&__pyx_n_s_cuWaitExternalSemaphoresAsync_lo, __pyx_k_cuWaitExternalSemaphoresAsync_lo, sizeof(__pyx_k_cuWaitExternalSemaphoresAsync_lo), 0, 0, 1, 1},
  {&__pyx_n_s_cubinOut, __pyx_k_cubinOut, sizeof(__pyx_k_cubinOut), 0, 0, 1, 1},
  {&__pyx_n_s_cudaDeviceCount, __pyx_k_cudaDeviceCount, sizeof(__pyx_k_cudaDeviceCount), 0, 0, 1, 1},
  {&__pyx_n_s_cudaVersion, __pyx_k_cudaVersion, sizeof(__pyx_k_cudaVersion), 0, 0, 1, 1},
  {&__pyx_n_s_cuda_cuda, __pyx_k_cuda_cuda, sizeof(__pyx_k_cuda_cuda), 0, 0, 1, 1},
  {&__pyx_kp_s_cuda_cuda_pyx, __pyx_k_cuda_cuda_pyx, sizeof(__pyx_k_cuda_cuda_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_cuserData, __pyx_k_cuserData, sizeof(__pyx_k_cuserData), 0, 0, 1, 1},
  {&__pyx_n_s_cuserData_ptr, __pyx_k_cuserData_ptr, sizeof(__pyx_k_cuserData_ptr), 0, 0, 1, 1},
  {&__pyx_kp_u_cuuint32_t, __pyx_k_cuuint32_t, sizeof(__pyx_k_cuuint32_t), 0, 1, 0, 0},
  {&__pyx_n_s_cuuint32_t_2, __pyx_k_cuuint32_t_2, sizeof(__pyx_k_cuuint32_t_2), 0, 0, 1, 1},
  {&__pyx_n_s_cuuint32_t___reduce_cython, __pyx_k_cuuint32_t___reduce_cython, sizeof(__pyx_k_cuuint32_t___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_cuuint32_t___setstate_cython, __pyx_k_cuuint32_t___setstate_cython, sizeof(__pyx_k_cuuint32_t___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_cuuint32_t_getPtr, __pyx_k_cuuint32_t_getPtr, sizeof(__pyx_k_cuuint32_t_getPtr), 0, 0, 1, 1},
  {&__pyx_kp_u_cuuint64_t, __pyx_k_cuuint64_t, sizeof(__pyx_k_cuuint64_t), 0, 1, 0, 0},
  {&__pyx_n_s_cuuint64_t_2, __pyx_k_cuuint64_t_2, sizeof(__pyx_k_cuuint64_t_2), 0, 0, 1, 1},
  {&__pyx_n_s_cuuint64_t___reduce_cython, __pyx_k_cuuint64_t___reduce_cython, sizeof(__pyx_k_cuuint64_t___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_cuuint64_t___setstate_cython, __pyx_k_cuuint64_t___setstate_cython, sizeof(__pyx_k_cuuint64_t___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_cuuint64_t_getPtr, __pyx_k_cuuint64_t_getPtr, sizeof(__pyx_k_cuuint64_t_getPtr), 0, 0, 1, 1},
  {&__pyx_n_s_cvalue, __pyx_k_cvalue, sizeof(__pyx_k_cvalue), 0, 0, 1, 1},
  {&__pyx_n_s_cvalue_ptr, __pyx_k_cvalue_ptr, sizeof(__pyx_k_cvalue_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cvdpDevice, __pyx_k_cvdpDevice, sizeof(__pyx_k_cvdpDevice), 0, 0, 1, 1},
  {&__pyx_n_s_cvdpGetProcAddress, __pyx_k_cvdpGetProcAddress, sizeof(__pyx_k_cvdpGetProcAddress), 0, 0, 1, 1},
  {&__pyx_n_s_cvdpSurface, __pyx_k_cvdpSurface, sizeof(__pyx_k_cvdpSurface), 0, 0, 1, 1},
  {&__pyx_n_s_cvoidStarHelper_ptr, __pyx_k_cvoidStarHelper_ptr, sizeof(__pyx_k_cvoidStarHelper_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_cwidth, __pyx_k_cwidth, sizeof(__pyx_k_cwidth), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_dataSize, __pyx_k_dataSize, sizeof(__pyx_k_dataSize), 0, 0, 1, 1},
  {&__pyx_n_s_dataSizes, __pyx_k_dataSizes, sizeof(__pyx_k_dataSizes), 0, 0, 1, 1},
  {&__pyx_n_s_dependencies, __pyx_k_dependencies, sizeof(__pyx_k_dependencies), 0, 0, 1, 1},
  {&__pyx_kp_u_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 1, 0, 0},
  {&__pyx_n_s_depth_2, __pyx_k_depth_2, sizeof(__pyx_k_depth_2), 0, 0, 1, 1},
  {&__pyx_n_s_desc, __pyx_k_desc, sizeof(__pyx_k_desc), 0, 0, 1, 1},
  {&__pyx_n_s_destroy, __pyx_k_destroy, sizeof(__pyx_k_destroy), 0, 0, 1, 1},
  {&__pyx_n_s_dev, __pyx_k_dev, sizeof(__pyx_k_dev), 0, 0, 1, 1},
  {&__pyx_kp_u_devPtr, __pyx_k_devPtr, sizeof(__pyx_k_devPtr), 0, 1, 0, 0},
  {&__pyx_n_s_devPtr_2, __pyx_k_devPtr_2, sizeof(__pyx_k_devPtr_2), 0, 0, 1, 1},
  {&__pyx_n_s_device, __pyx_k_device, sizeof(__pyx_k_device), 0, 0, 1, 1},
  {&__pyx_kp_u_deviceBitMask, __pyx_k_deviceBitMask, sizeof(__pyx_k_deviceBitMask), 0, 1, 0, 0},
  {&__pyx_n_s_deviceBitMask_2, __pyx_k_deviceBitMask_2, sizeof(__pyx_k_deviceBitMask_2), 0, 0, 1, 1},
  {&__pyx_n_s_deviceList, __pyx_k_deviceList, sizeof(__pyx_k_deviceList), 0, 0, 1, 1},
  {&__pyx_n_s_deviceNodeMask, __pyx_k_deviceNodeMask, sizeof(__pyx_k_deviceNodeMask), 0, 0, 1, 1},
  {&__pyx_n_s_dim, __pyx_k_dim, sizeof(__pyx_k_dim), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_kp_u_dptr, __pyx_k_dptr, sizeof(__pyx_k_dptr), 0, 1, 0, 0},
  {&__pyx_n_s_dptr_2, __pyx_k_dptr_2, sizeof(__pyx_k_dptr_2), 0, 0, 1, 1},
  {&__pyx_n_s_dptr_out, __pyx_k_dptr_out, sizeof(__pyx_k_dptr_out), 0, 0, 1, 1},
  {&__pyx_n_s_driverVersion, __pyx_k_driverVersion, sizeof(__pyx_k_driverVersion), 0, 0, 1, 1},
  {&__pyx_kp_u_dst, __pyx_k_dst, sizeof(__pyx_k_dst), 0, 1, 0, 0},
  {&__pyx_kp_u_dstArray, __pyx_k_dstArray, sizeof(__pyx_k_dstArray), 0, 1, 0, 0},
  {&__pyx_n_s_dstArray_2, __pyx_k_dstArray_2, sizeof(__pyx_k_dstArray_2), 0, 0, 1, 1},
  {&__pyx_kp_u_dstContext, __pyx_k_dstContext, sizeof(__pyx_k_dstContext), 0, 1, 0, 0},
  {&__pyx_n_s_dstContext_2, __pyx_k_dstContext_2, sizeof(__pyx_k_dstContext_2), 0, 0, 1, 1},
  {&__pyx_kp_u_dstDevice, __pyx_k_dstDevice, sizeof(__pyx_k_dstDevice), 0, 1, 0, 0},
  {&__pyx_n_s_dstDevice_2, __pyx_k_dstDevice_2, sizeof(__pyx_k_dstDevice_2), 0, 0, 1, 1},
  {&__pyx_kp_u_dstHeight, __pyx_k_dstHeight, sizeof(__pyx_k_dstHeight), 0, 1, 0, 0},
  {&__pyx_n_s_dstHeight_2, __pyx_k_dstHeight_2, sizeof(__pyx_k_dstHeight_2), 0, 0, 1, 1},
  {&__pyx_kp_u_dstHost, __pyx_k_dstHost, sizeof(__pyx_k_dstHost), 0, 1, 0, 0},
  {&__pyx_n_s_dstHost_2, __pyx_k_dstHost_2, sizeof(__pyx_k_dstHost_2), 0, 0, 1, 1},
  {&__pyx_kp_u_dstLOD, __pyx_k_dstLOD, sizeof(__pyx_k_dstLOD), 0, 1, 0, 0},
  {&__pyx_n_s_dstLOD_2, __pyx_k_dstLOD_2, sizeof(__pyx_k_dstLOD_2), 0, 0, 1, 1},
  {&__pyx_kp_u_dstMemoryType, __pyx_k_dstMemoryType, sizeof(__pyx_k_dstMemoryType), 0, 1, 0, 0},
  {&__pyx_n_s_dstMemoryType_2, __pyx_k_dstMemoryType_2, sizeof(__pyx_k_dstMemoryType_2), 0, 0, 1, 1},
  {&__pyx_n_s_dstOffset, __pyx_k_dstOffset, sizeof(__pyx_k_dstOffset), 0, 0, 1, 1},
  {&__pyx_kp_u_dstPitch, __pyx_k_dstPitch, sizeof(__pyx_k_dstPitch), 0, 1, 0, 0},
  {&__pyx_n_s_dstPitch_2, __pyx_k_dstPitch_2, sizeof(__pyx_k_dstPitch_2), 0, 0, 1, 1},
  {&__pyx_kp_u_dstXInBytes, __pyx_k_dstXInBytes, sizeof(__pyx_k_dstXInBytes), 0, 1, 0, 0},
  {&__pyx_n_s_dstXInBytes_2, __pyx_k_dstXInBytes_2, sizeof(__pyx_k_dstXInBytes_2), 0, 0, 1, 1},
  {&__pyx_kp_u_dstY, __pyx_k_dstY, sizeof(__pyx_k_dstY), 0, 1, 0, 0},
  {&__pyx_n_s_dstY_2, __pyx_k_dstY_2, sizeof(__pyx_k_dstY_2), 0, 0, 1, 1},
  {&__pyx_kp_u_dstZ, __pyx_k_dstZ, sizeof(__pyx_k_dstZ), 0, 1, 0, 0},
  {&__pyx_n_s_dstZ_2, __pyx_k_dstZ_2, sizeof(__pyx_k_dstZ_2), 0, 0, 1, 1},
  {&__pyx_n_s_dst_2, __pyx_k_dst_2, sizeof(__pyx_k_dst_2), 0, 0, 1, 1},
  {&__pyx_n_s_dynamicSMemSize, __pyx_k_dynamicSMemSize, sizeof(__pyx_k_dynamicSMemSize), 0, 0, 1, 1},
  {&__pyx_n_s_dynamicSmemSize, __pyx_k_dynamicSmemSize, sizeof(__pyx_k_dynamicSmemSize), 0, 0, 1, 1},
  {&__pyx_kp_u_eglColorFormat, __pyx_k_eglColorFormat, sizeof(__pyx_k_eglColorFormat), 0, 1, 0, 0},
  {&__pyx_n_s_eglColorFormat_2, __pyx_k_eglColorFormat_2, sizeof(__pyx_k_eglColorFormat_2), 0, 0, 1, 1},
  {&__pyx_n_s_eglFrame, __pyx_k_eglFrame, sizeof(__pyx_k_eglFrame), 0, 0, 1, 1},
  {&__pyx_n_s_eglSync, __pyx_k_eglSync, sizeof(__pyx_k_eglSync), 0, 0, 1, 1},
  {&__pyx_n_s_eglframe, __pyx_k_eglframe, sizeof(__pyx_k_eglframe), 0, 0, 1, 1},
  {&__pyx_kp_u_elementSize, __pyx_k_elementSize, sizeof(__pyx_k_elementSize), 0, 1, 0, 0},
  {&__pyx_n_s_elementSize_2, __pyx_k_elementSize_2, sizeof(__pyx_k_elementSize_2), 0, 0, 1, 1},
  {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1},
  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
  {&__pyx_kp_u_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 1, 0, 0},
  {&__pyx_n_s_event_2, __pyx_k_event_2, sizeof(__pyx_k_event_2), 0, 0, 1, 1},
  {&__pyx_n_s_event_out, __pyx_k_event_out, sizeof(__pyx_k_event_out), 0, 0, 1, 1},
  {&__pyx_n_s_extMem, __pyx_k_extMem, sizeof(__pyx_k_extMem), 0, 0, 1, 1},
  {&__pyx_n_s_extMem_out, __pyx_k_extMem_out, sizeof(__pyx_k_extMem_out), 0, 0, 1, 1},
  {&__pyx_n_s_extSem, __pyx_k_extSem, sizeof(__pyx_k_extSem), 0, 0, 1, 1},
  {&__pyx_kp_u_extSemArray, __pyx_k_extSemArray, sizeof(__pyx_k_extSemArray), 0, 1, 0, 0},
  {&__pyx_n_s_extSemArray_2, __pyx_k_extSemArray_2, sizeof(__pyx_k_extSemArray_2), 0, 0, 1, 1},
  {&__pyx_n_s_extSem_out, __pyx_k_extSem_out, sizeof(__pyx_k_extSem_out), 0, 0, 1, 1},
  {&__pyx_kp_u_extentDepth, __pyx_k_extentDepth, sizeof(__pyx_k_extentDepth), 0, 1, 0, 0},
  {&__pyx_n_s_extentDepth_2, __pyx_k_extentDepth_2, sizeof(__pyx_k_extentDepth_2), 0, 0, 1, 1},
  {&__pyx_kp_u_extentHeight, __pyx_k_extentHeight, sizeof(__pyx_k_extentHeight), 0, 1, 0, 0},
  {&__pyx_n_s_extentHeight_2, __pyx_k_extentHeight_2, sizeof(__pyx_k_extentHeight_2), 0, 0, 1, 1},
  {&__pyx_kp_u_extentWidth, __pyx_k_extentWidth, sizeof(__pyx_k_extentWidth), 0, 1, 0, 0},
  {&__pyx_n_s_extentWidth_2, __pyx_k_extentWidth_2, sizeof(__pyx_k_extentWidth_2), 0, 0, 1, 1},
  {&__pyx_kp_u_extra, __pyx_k_extra, sizeof(__pyx_k_extra), 0, 1, 0, 0},
  {&__pyx_n_s_extra_2, __pyx_k_extra_2, sizeof(__pyx_k_extra_2), 0, 0, 1, 1},
  {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
  {&__pyx_n_s_fatCubin, __pyx_k_fatCubin, sizeof(__pyx_k_fatCubin), 0, 0, 1, 1},
  {&__pyx_kp_u_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 1, 0, 0},
  {&__pyx_n_s_fd_2, __pyx_k_fd_2, sizeof(__pyx_k_fd_2), 0, 0, 1, 1},
  {&__pyx_kp_u_fence, __pyx_k_fence, sizeof(__pyx_k_fence), 0, 1, 0, 0},
  {&__pyx_n_s_fence_2, __pyx_k_fence_2, sizeof(__pyx_k_fence_2), 0, 0, 1, 1},
  {&__pyx_kp_u_fence_3, __pyx_k_fence_3, sizeof(__pyx_k_fence_3), 0, 1, 0, 0},
  {&__pyx_kp_u_filterMode, __pyx_k_filterMode, sizeof(__pyx_k_filterMode), 0, 1, 0, 0},
  {&__pyx_n_s_filterMode_2, __pyx_k_filterMode_2, sizeof(__pyx_k_filterMode_2), 0, 0, 1, 1},
  {&__pyx_kp_u_firstLayer, __pyx_k_firstLayer, sizeof(__pyx_k_firstLayer), 0, 1, 0, 0},
  {&__pyx_n_s_firstLayer_2, __pyx_k_firstLayer_2, sizeof(__pyx_k_firstLayer_2), 0, 0, 1, 1},
  {&__pyx_kp_u_firstMipmapLevel, __pyx_k_firstMipmapLevel, sizeof(__pyx_k_firstMipmapLevel), 0, 1, 0, 0},
  {&__pyx_n_s_firstMipmapLevel_2, __pyx_k_firstMipmapLevel_2, sizeof(__pyx_k_firstMipmapLevel_2), 0, 0, 1, 1},
  {&__pyx_kp_u_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 1, 0, 0},
  {&__pyx_n_s_flags_2, __pyx_k_flags_2, sizeof(__pyx_k_flags_2), 0, 0, 1, 1},
  {&__pyx_kp_u_flushRemoteWrites, __pyx_k_flushRemoteWrites, sizeof(__pyx_k_flushRemoteWrites), 0, 1, 0, 0},
  {&__pyx_n_s_flushRemoteWrites_2, __pyx_k_flushRemoteWrites_2, sizeof(__pyx_k_flushRemoteWrites_2), 0, 0, 1, 1},
  {&__pyx_n_s_fm, __pyx_k_fm, sizeof(__pyx_k_fm), 0, 0, 1, 1},
  {&__pyx_n_s_fmt, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1},
  {&__pyx_kp_u_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 1, 0, 0},
  {&__pyx_n_s_fn_2, __pyx_k_fn_2, sizeof(__pyx_k_fn_2), 0, 0, 1, 1},
  {&__pyx_n_s_fname, __pyx_k_fname, sizeof(__pyx_k_fname), 0, 0, 1, 1},
  {&__pyx_kp_u_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 1, 0, 0},
  {&__pyx_n_s_format_2, __pyx_k_format_2, sizeof(__pyx_k_format_2), 0, 0, 1, 1},
  {&__pyx_kp_u_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 1, 0, 0},
  {&__pyx_kp_u_frameType, __pyx_k_frameType, sizeof(__pyx_k_frameType), 0, 1, 0, 0},
  {&__pyx_n_s_frameType_2, __pyx_k_frameType_2, sizeof(__pyx_k_frameType_2), 0, 0, 1, 1},
  {&__pyx_n_s_frame_2, __pyx_k_frame_2, sizeof(__pyx_k_frame_2), 0, 0, 1, 1},
  {&__pyx_n_s_free, __pyx_k_free, sizeof(__pyx_k_free), 0, 0, 1, 1},
  {&__pyx_n_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 1},
  {&__pyx_kp_u_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 1, 0, 0},
  {&__pyx_n_s_func_2, __pyx_k_func_2, sizeof(__pyx_k_func_2), 0, 0, 1, 1},
  {&__pyx_kp_u_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 1, 0, 0},
  {&__pyx_n_s_function_2, __pyx_k_function_2, sizeof(__pyx_k_function_2), 0, 0, 1, 1},
  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_getPtr, __pyx_k_getPtr, sizeof(__pyx_k_getPtr), 0, 0, 1, 1},
  {&__pyx_n_u_getPtr, __pyx_k_getPtr, sizeof(__pyx_k_getPtr), 0, 1, 0, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_kp_u_gpuDirectRDMACapable, __pyx_k_gpuDirectRDMACapable, sizeof(__pyx_k_gpuDirectRDMACapable), 0, 1, 0, 0},
  {&__pyx_n_s_gpuDirectRDMACapable_2, __pyx_k_gpuDirectRDMACapable_2, sizeof(__pyx_k_gpuDirectRDMACapable_2), 0, 0, 1, 1},
  {&__pyx_n_s_granularity, __pyx_k_granularity, sizeof(__pyx_k_granularity), 0, 0, 1, 1},
  {&__pyx_n_s_graph, __pyx_k_graph, sizeof(__pyx_k_graph), 0, 0, 1, 1},
  {&__pyx_n_s_graph_length, __pyx_k_graph_length, sizeof(__pyx_k_graph_length), 0, 0, 1, 1},
  {&__pyx_n_s_graph_out, __pyx_k_graph_out, sizeof(__pyx_k_graph_out), 0, 0, 1, 1},
  {&__pyx_n_s_greatestPriority, __pyx_k_greatestPriority, sizeof(__pyx_k_greatestPriority), 0, 0, 1, 1},
  {&__pyx_kp_u_gridDimX, __pyx_k_gridDimX, sizeof(__pyx_k_gridDimX), 0, 1, 0, 0},
  {&__pyx_n_s_gridDimX_2, __pyx_k_gridDimX_2, sizeof(__pyx_k_gridDimX_2), 0, 0, 1, 1},
  {&__pyx_kp_u_gridDimY, __pyx_k_gridDimY, sizeof(__pyx_k_gridDimY), 0, 1, 0, 0},
  {&__pyx_n_s_gridDimY_2, __pyx_k_gridDimY_2, sizeof(__pyx_k_gridDimY_2), 0, 0, 1, 1},
  {&__pyx_kp_u_gridDimZ, __pyx_k_gridDimZ, sizeof(__pyx_k_gridDimZ), 0, 1, 0, 0},
  {&__pyx_n_s_gridDimZ_2, __pyx_k_gridDimZ_2, sizeof(__pyx_k_gridDimZ_2), 0, 0, 1, 1},
  {&__pyx_n_s_grid_height, __pyx_k_grid_height, sizeof(__pyx_k_grid_height), 0, 0, 1, 1},
  {&__pyx_n_s_grid_width, __pyx_k_grid_width, sizeof(__pyx_k_grid_width), 0, 0, 1, 1},
  {&__pyx_kp_u_hArray, __pyx_k_hArray, sizeof(__pyx_k_hArray), 0, 1, 0, 0},
  {&__pyx_n_s_hArray_2, __pyx_k_hArray_2, sizeof(__pyx_k_hArray_2), 0, 0, 1, 1},
  {&__pyx_n_s_hClonedGraph, __pyx_k_hClonedGraph, sizeof(__pyx_k_hClonedGraph), 0, 0, 1, 1},
  {&__pyx_n_s_hEnd, __pyx_k_hEnd, sizeof(__pyx_k_hEnd), 0, 0, 1, 1},
  {&__pyx_n_s_hErrorNode_out, __pyx_k_hErrorNode_out, sizeof(__pyx_k_hErrorNode_out), 0, 0, 1, 1},
  {&__pyx_n_s_hEvent, __pyx_k_hEvent, sizeof(__pyx_k_hEvent), 0, 0, 1, 1},
  {&__pyx_n_s_hGraph, __pyx_k_hGraph, sizeof(__pyx_k_hGraph), 0, 0, 1, 1},
  {&__pyx_n_s_hGraphExec, __pyx_k_hGraphExec, sizeof(__pyx_k_hGraphExec), 0, 0, 1, 1},
  {&__pyx_kp_u_hMipmappedArray, __pyx_k_hMipmappedArray, sizeof(__pyx_k_hMipmappedArray), 0, 1, 0, 0},
  {&__pyx_n_s_hMipmappedArray_2, __pyx_k_hMipmappedArray_2, sizeof(__pyx_k_hMipmappedArray_2), 0, 0, 1, 1},
  {&__pyx_n_s_hNode, __pyx_k_hNode, sizeof(__pyx_k_hNode), 0, 0, 1, 1},
  {&__pyx_n_s_hOriginalNode, __pyx_k_hOriginalNode, sizeof(__pyx_k_hOriginalNode), 0, 0, 1, 1},
  {&__pyx_n_s_hStart, __pyx_k_hStart, sizeof(__pyx_k_hStart), 0, 0, 1, 1},
  {&__pyx_kp_u_hStream, __pyx_k_hStream, sizeof(__pyx_k_hStream), 0, 1, 0, 0},
  {&__pyx_n_s_hStream_2, __pyx_k_hStream_2, sizeof(__pyx_k_hStream_2), 0, 0, 1, 1},
  {&__pyx_n_s_hSurfRef, __pyx_k_hSurfRef, sizeof(__pyx_k_hSurfRef), 0, 0, 1, 1},
  {&__pyx_n_s_hTexRef, __pyx_k_hTexRef, sizeof(__pyx_k_hTexRef), 0, 0, 1, 1},
  {&__pyx_kp_u_handle, __pyx_k_handle, sizeof(__pyx_k_handle), 0, 1, 0, 0},
  {&__pyx_n_s_handleType, __pyx_k_handleType, sizeof(__pyx_k_handleType), 0, 0, 1, 1},
  {&__pyx_kp_u_handleTypes, __pyx_k_handleTypes, sizeof(__pyx_k_handleTypes), 0, 1, 0, 0},
  {&__pyx_n_s_handleTypes_2, __pyx_k_handleTypes_2, sizeof(__pyx_k_handleTypes_2), 0, 0, 1, 1},
  {&__pyx_n_s_handle_2, __pyx_k_handle_2, sizeof(__pyx_k_handle_2), 0, 0, 1, 1},
  {&__pyx_kp_u_handle_3, __pyx_k_handle_3, sizeof(__pyx_k_handle_3), 0, 1, 0, 0},
  {&__pyx_kp_u_height, __pyx_k_height, sizeof(__pyx_k_height), 0, 1, 0, 0},
  {&__pyx_n_s_height_2, __pyx_k_height_2, sizeof(__pyx_k_height_2), 0, 0, 1, 1},
  {&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1},
  {&__pyx_n_s_hfunc, __pyx_k_hfunc, sizeof(__pyx_k_hfunc), 0, 0, 1, 1},
  {&__pyx_kp_u_hitProp, __pyx_k_hitProp, sizeof(__pyx_k_hitProp), 0, 1, 0, 0},
  {&__pyx_n_s_hitProp_2, __pyx_k_hitProp_2, sizeof(__pyx_k_hitProp_2), 0, 0, 1, 1},
  {&__pyx_kp_u_hitRatio, __pyx_k_hitRatio, sizeof(__pyx_k_hitRatio), 0, 1, 0, 0},
  {&__pyx_n_s_hitRatio_2, __pyx_k_hitRatio_2, sizeof(__pyx_k_hitRatio_2), 0, 0, 1, 1},
  {&__pyx_n_s_hmod, __pyx_k_hmod, sizeof(__pyx_k_hmod), 0, 0, 1, 1},
  {&__pyx_kp_u_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 1, 0, 0},
  {&__pyx_n_s_id_2, __pyx_k_id_2, sizeof(__pyx_k_id_2), 0, 0, 1, 1},
  {&__pyx_n_s_id_out, __pyx_k_id_out, sizeof(__pyx_k_id_out), 0, 0, 1, 1},
  {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1},
  {&__pyx_n_s_image, __pyx_k_image, sizeof(__pyx_k_image), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_init_value, __pyx_k_init_value, sizeof(__pyx_k_init_value), 0, 0, 1, 1},
  {&__pyx_n_s_initialRefcount, __pyx_k_initialRefcount, sizeof(__pyx_k_initialRefcount), 0, 0, 1, 1},
  {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1},
  {&__pyx_n_s_isEnabled, __pyx_k_isEnabled, sizeof(__pyx_k_isEnabled), 0, 0, 1, 1},
  {&__pyx_n_s_is_getter, __pyx_k_is_getter, sizeof(__pyx_k_is_getter), 0, 0, 1, 1},
  {&__pyx_kp_u_kernelParams, __pyx_k_kernelParams, sizeof(__pyx_k_kernelParams), 0, 1, 0, 0},
  {&__pyx_n_s_kernelParams_2, __pyx_k_kernelParams_2, sizeof(__pyx_k_kernelParams_2), 0, 0, 1, 1},
  {&__pyx_kp_u_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 1, 0, 0},
  {&__pyx_n_s_key_2, __pyx_k_key_2, sizeof(__pyx_k_key_2), 0, 0, 1, 1},
  {&__pyx_kp_u_keyedMutex, __pyx_k_keyedMutex, sizeof(__pyx_k_keyedMutex), 0, 1, 0, 0},
  {&__pyx_n_s_keyedMutex_2, __pyx_k_keyedMutex_2, sizeof(__pyx_k_keyedMutex_2), 0, 0, 1, 1},
  {&__pyx_kp_u_lastLayer, __pyx_k_lastLayer, sizeof(__pyx_k_lastLayer), 0, 1, 0, 0},
  {&__pyx_n_s_lastLayer_2, __pyx_k_lastLayer_2, sizeof(__pyx_k_lastLayer_2), 0, 0, 1, 1},
  {&__pyx_kp_u_lastMipmapLevel, __pyx_k_lastMipmapLevel, sizeof(__pyx_k_lastMipmapLevel), 0, 1, 0, 0},
  {&__pyx_n_s_lastMipmapLevel_2, __pyx_k_lastMipmapLevel_2, sizeof(__pyx_k_lastMipmapLevel_2), 0, 0, 1, 1},
  {&__pyx_n_s_launchParamsList, __pyx_k_launchParamsList, sizeof(__pyx_k_launchParamsList), 0, 0, 1, 1},
  {&__pyx_kp_u_layer, __pyx_k_layer, sizeof(__pyx_k_layer), 0, 1, 0, 0},
  {&__pyx_n_s_layer_2, __pyx_k_layer_2, sizeof(__pyx_k_layer_2), 0, 0, 1, 1},
  {&__pyx_n_s_leastPriority, __pyx_k_leastPriority, sizeof(__pyx_k_leastPriority), 0, 0, 1, 1},
  {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
  {&__pyx_kp_u_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 1, 0, 0},
  {&__pyx_n_s_level_2, __pyx_k_level_2, sizeof(__pyx_k_level_2), 0, 0, 1, 1},
  {&__pyx_n_s_limit, __pyx_k_limit, sizeof(__pyx_k_limit), 0, 0, 1, 1},
  {&__pyx_kp_u_linear, __pyx_k_linear, sizeof(__pyx_k_linear), 0, 1, 0, 0},
  {&__pyx_n_s_linear_2, __pyx_k_linear_2, sizeof(__pyx_k_linear_2), 0, 0, 1, 1},
  {&__pyx_kp_u_location, __pyx_k_location, sizeof(__pyx_k_location), 0, 1, 0, 0},
  {&__pyx_n_s_location_2, __pyx_k_location_2, sizeof(__pyx_k_location_2), 0, 0, 1, 1},
  {&__pyx_n_s_logBuffer, __pyx_k_logBuffer, sizeof(__pyx_k_logBuffer), 0, 0, 1, 1},
  {&__pyx_n_s_luid, __pyx_k_luid, sizeof(__pyx_k_luid), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1},
  {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
  {&__pyx_n_s_mapInfoList, __pyx_k_mapInfoList, sizeof(__pyx_k_mapInfoList), 0, 0, 1, 1},
  {&__pyx_n_s_maxAniso, __pyx_k_maxAniso, sizeof(__pyx_k_maxAniso), 0, 0, 1, 1},
  {&__pyx_kp_u_maxAnisotropy, __pyx_k_maxAnisotropy, sizeof(__pyx_k_maxAnisotropy), 0, 1, 0, 0},
  {&__pyx_n_s_maxAnisotropy_2, __pyx_k_maxAnisotropy_2, sizeof(__pyx_k_maxAnisotropy_2), 0, 0, 1, 1},
  {&__pyx_kp_u_maxGridSize, __pyx_k_maxGridSize, sizeof(__pyx_k_maxGridSize), 0, 1, 0, 0},
  {&__pyx_n_s_maxGridSize_2, __pyx_k_maxGridSize_2, sizeof(__pyx_k_maxGridSize_2), 0, 0, 1, 1},
  {&__pyx_kp_u_maxMipmapLevelClamp, __pyx_k_maxMipmapLevelClamp, sizeof(__pyx_k_maxMipmapLevelClamp), 0, 1, 0, 0},
  {&__pyx_n_s_maxMipmapLevelClamp_2, __pyx_k_maxMipmapLevelClamp_2, sizeof(__pyx_k_maxMipmapLevelClamp_2), 0, 0, 1, 1},
  {&__pyx_kp_u_maxThreadsDim, __pyx_k_maxThreadsDim, sizeof(__pyx_k_maxThreadsDim), 0, 1, 0, 0},
  {&__pyx_n_s_maxThreadsDim_2, __pyx_k_maxThreadsDim_2, sizeof(__pyx_k_maxThreadsDim_2), 0, 0, 1, 1},
  {&__pyx_kp_u_maxThreadsPerBlock, __pyx_k_maxThreadsPerBlock, sizeof(__pyx_k_maxThreadsPerBlock), 0, 1, 0, 0},
  {&__pyx_n_s_maxThreadsPerBlock_2, __pyx_k_maxThreadsPerBlock_2, sizeof(__pyx_k_maxThreadsPerBlock_2), 0, 0, 1, 1},
  {&__pyx_n_s_maxWidthInElements, __pyx_k_maxWidthInElements, sizeof(__pyx_k_maxWidthInElements), 0, 0, 1, 1},
  {&__pyx_kp_u_memHandle, __pyx_k_memHandle, sizeof(__pyx_k_memHandle), 0, 1, 0, 0},
  {&__pyx_n_s_memHandleDesc, __pyx_k_memHandleDesc, sizeof(__pyx_k_memHandleDesc), 0, 0, 1, 1},
  {&__pyx_kp_u_memHandleType, __pyx_k_memHandleType, sizeof(__pyx_k_memHandleType), 0, 1, 0, 0},
  {&__pyx_n_s_memHandleType_2, __pyx_k_memHandleType_2, sizeof(__pyx_k_memHandleType_2), 0, 0, 1, 1},
  {&__pyx_n_s_memHandle_2, __pyx_k_memHandle_2, sizeof(__pyx_k_memHandle_2), 0, 0, 1, 1},
  {&__pyx_kp_u_memHandle_3, __pyx_k_memHandle_3, sizeof(__pyx_k_memHandle_3), 0, 1, 0, 0},
  {&__pyx_kp_u_memOperationType, __pyx_k_memOperationType, sizeof(__pyx_k_memOperationType), 0, 1, 0, 0},
  {&__pyx_n_s_memOperationType_2, __pyx_k_memOperationType_2, sizeof(__pyx_k_memOperationType_2), 0, 0, 1, 1},
  {&__pyx_kp_u_memPitch, __pyx_k_memPitch, sizeof(__pyx_k_memPitch), 0, 1, 0, 0},
  {&__pyx_n_s_memPitch_2, __pyx_k_memPitch_2, sizeof(__pyx_k_memPitch_2), 0, 0, 1, 1},
  {&__pyx_n_s_memPool, __pyx_k_memPool, sizeof(__pyx_k_memPool), 0, 0, 1, 1},
  {&__pyx_kp_u_memoryBarrier, __pyx_k_memoryBarrier, sizeof(__pyx_k_memoryBarrier), 0, 1, 0, 0},
  {&__pyx_n_s_memoryBarrier_2, __pyx_k_memoryBarrier_2, sizeof(__pyx_k_memoryBarrier_2), 0, 0, 1, 1},
  {&__pyx_n_s_memoryRequirements, __pyx_k_memoryRequirements, sizeof(__pyx_k_memoryRequirements), 0, 0, 1, 1},
  {&__pyx_n_s_memsetParams, __pyx_k_memsetParams, sizeof(__pyx_k_memsetParams), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_minBytesToKeep, __pyx_k_minBytesToKeep, sizeof(__pyx_k_minBytesToKeep), 0, 0, 1, 1},
  {&__pyx_n_s_minGridSize, __pyx_k_minGridSize, sizeof(__pyx_k_minGridSize), 0, 0, 1, 1},
  {&__pyx_kp_u_minMipmapLevelClamp, __pyx_k_minMipmapLevelClamp, sizeof(__pyx_k_minMipmapLevelClamp), 0, 1, 0, 0},
  {&__pyx_n_s_minMipmapLevelClamp_2, __pyx_k_minMipmapLevelClamp_2, sizeof(__pyx_k_minMipmapLevelClamp_2), 0, 0, 1, 1},
  {&__pyx_n_s_minor, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 0, 1, 1},
  {&__pyx_n_s_mipLevel, __pyx_k_mipLevel, sizeof(__pyx_k_mipLevel), 0, 0, 1, 1},
  {&__pyx_kp_u_mipmap, __pyx_k_mipmap, sizeof(__pyx_k_mipmap), 0, 1, 0, 0},
  {&__pyx_n_s_mipmapDesc, __pyx_k_mipmapDesc, sizeof(__pyx_k_mipmapDesc), 0, 0, 1, 1},
  {&__pyx_kp_u_mipmapFilterMode, __pyx_k_mipmapFilterMode, sizeof(__pyx_k_mipmapFilterMode), 0, 1, 0, 0},
  {&__pyx_n_s_mipmapFilterMode_2, __pyx_k_mipmapFilterMode_2, sizeof(__pyx_k_mipmapFilterMode_2), 0, 0, 1, 1},
  {&__pyx_kp_u_mipmapLevelBias, __pyx_k_mipmapLevelBias, sizeof(__pyx_k_mipmapLevelBias), 0, 1, 0, 0},
  {&__pyx_n_s_mipmapLevelBias_2, __pyx_k_mipmapLevelBias_2, sizeof(__pyx_k_mipmapLevelBias_2), 0, 0, 1, 1},
  {&__pyx_n_s_mipmap_2, __pyx_k_mipmap_2, sizeof(__pyx_k_mipmap_2), 0, 0, 1, 1},
  {&__pyx_kp_u_mipmap_3, __pyx_k_mipmap_3, sizeof(__pyx_k_mipmap_3), 0, 1, 0, 0},
  {&__pyx_kp_u_miptail, __pyx_k_miptail, sizeof(__pyx_k_miptail), 0, 1, 0, 0},
  {&__pyx_kp_u_miptailFirstLevel, __pyx_k_miptailFirstLevel, sizeof(__pyx_k_miptailFirstLevel), 0, 1, 0, 0},
  {&__pyx_n_s_miptailFirstLevel_2, __pyx_k_miptailFirstLevel_2, sizeof(__pyx_k_miptailFirstLevel_2), 0, 0, 1, 1},
  {&__pyx_kp_u_miptailSize, __pyx_k_miptailSize, sizeof(__pyx_k_miptailSize), 0, 1, 0, 0},
  {&__pyx_n_s_miptailSize_2, __pyx_k_miptailSize_2, sizeof(__pyx_k_miptailSize_2), 0, 0, 1, 1},
  {&__pyx_n_s_miptail_2, __pyx_k_miptail_2, sizeof(__pyx_k_miptail_2), 0, 0, 1, 1},
  {&__pyx_kp_u_missProp, __pyx_k_missProp, sizeof(__pyx_k_missProp), 0, 1, 0, 0},
  {&__pyx_n_s_missProp_2, __pyx_k_missProp_2, sizeof(__pyx_k_missProp_2), 0, 0, 1, 1},
  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_module_2, __pyx_k_module_2, sizeof(__pyx_k_module_2), 0, 0, 1, 1},
  {&__pyx_kp_u_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 1, 0, 0},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_name_3, __pyx_k_name_3, sizeof(__pyx_k_name_3), 0, 0, 1, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_nodeParams, __pyx_k_nodeParams, sizeof(__pyx_k_nodeParams), 0, 0, 1, 1},
  {&__pyx_n_s_nodeParams_out, __pyx_k_nodeParams_out, sizeof(__pyx_k_nodeParams_out), 0, 0, 1, 1},
  {&__pyx_kp_u_not_enough_values_found_during_a, __pyx_k_not_enough_values_found_during_a, sizeof(__pyx_k_not_enough_values_found_during_a), 0, 1, 0, 0},
  {&__pyx_n_s_numAttributes, __pyx_k_numAttributes, sizeof(__pyx_k_numAttributes), 0, 0, 1, 1},
  {&__pyx_kp_u_numAttrs, __pyx_k_numAttrs, sizeof(__pyx_k_numAttrs), 0, 1, 0, 0},
  {&__pyx_n_s_numAttrs_2, __pyx_k_numAttrs_2, sizeof(__pyx_k_numAttrs_2), 0, 0, 1, 1},
  {&__pyx_n_s_numBlocks, __pyx_k_numBlocks, sizeof(__pyx_k_numBlocks), 0, 0, 1, 1},
  {&__pyx_kp_u_numChannels, __pyx_k_numChannels, sizeof(__pyx_k_numChannels), 0, 1, 0, 0},
  {&__pyx_n_s_numChannels_2, __pyx_k_numChannels_2, sizeof(__pyx_k_numChannels_2), 0, 0, 1, 1},
  {&__pyx_n_s_numClusters, __pyx_k_numClusters, sizeof(__pyx_k_numClusters), 0, 0, 1, 1},
  {&__pyx_n_s_numDependencies, __pyx_k_numDependencies, sizeof(__pyx_k_numDependencies), 0, 0, 1, 1},
  {&__pyx_n_s_numDependencies_out, __pyx_k_numDependencies_out, sizeof(__pyx_k_numDependencies_out), 0, 0, 1, 1},
  {&__pyx_n_s_numDependentNodes, __pyx_k_numDependentNodes, sizeof(__pyx_k_numDependentNodes), 0, 0, 1, 1},
  {&__pyx_n_s_numDevices, __pyx_k_numDevices, sizeof(__pyx_k_numDevices), 0, 0, 1, 1},
  {&__pyx_n_s_numEdges, __pyx_k_numEdges, sizeof(__pyx_k_numEdges), 0, 0, 1, 1},
  {&__pyx_kp_u_numExtSems, __pyx_k_numExtSems, sizeof(__pyx_k_numExtSems), 0, 1, 0, 0},
  {&__pyx_n_s_numExtSems_2, __pyx_k_numExtSems_2, sizeof(__pyx_k_numExtSems_2), 0, 0, 1, 1},
  {&__pyx_kp_u_numLevels, __pyx_k_numLevels, sizeof(__pyx_k_numLevels), 0, 1, 0, 0},
  {&__pyx_n_s_numLevels_2, __pyx_k_numLevels_2, sizeof(__pyx_k_numLevels_2), 0, 0, 1, 1},
  {&__pyx_n_s_numMipmapLevels, __pyx_k_numMipmapLevels, sizeof(__pyx_k_numMipmapLevels), 0, 0, 1, 1},
  {&__pyx_n_s_numNodes, __pyx_k_numNodes, sizeof(__pyx_k_numNodes), 0, 0, 1, 1},
  {&__pyx_n_s_numOptions, __pyx_k_numOptions, sizeof(__pyx_k_numOptions), 0, 0, 1, 1},
  {&__pyx_n_s_numParams, __pyx_k_numParams, sizeof(__pyx_k_numParams), 0, 0, 1, 1},
  {&__pyx_n_s_numRootNodes, __pyx_k_numRootNodes, sizeof(__pyx_k_numRootNodes), 0, 0, 1, 1},
  {&__pyx_kp_u_num_bytes, __pyx_k_num_bytes, sizeof(__pyx_k_num_bytes), 0, 1, 0, 0},
  {&__pyx_n_s_num_bytes_2, __pyx_k_num_bytes_2, sizeof(__pyx_k_num_bytes_2), 0, 0, 1, 1},
  {&__pyx_n_s_numbytes, __pyx_k_numbytes, sizeof(__pyx_k_numbytes), 0, 0, 1, 1},
  {&__pyx_kp_u_nvSciBufObject, __pyx_k_nvSciBufObject, sizeof(__pyx_k_nvSciBufObject), 0, 1, 0, 0},
  {&__pyx_n_s_nvSciBufObject_2, __pyx_k_nvSciBufObject_2, sizeof(__pyx_k_nvSciBufObject_2), 0, 0, 1, 1},
  {&__pyx_kp_u_nvSciSync, __pyx_k_nvSciSync, sizeof(__pyx_k_nvSciSync), 0, 1, 0, 0},
  {&__pyx_n_s_nvSciSyncAttrList, __pyx_k_nvSciSyncAttrList, sizeof(__pyx_k_nvSciSyncAttrList), 0, 0, 1, 1},
  {&__pyx_kp_u_nvSciSyncObj, __pyx_k_nvSciSyncObj, sizeof(__pyx_k_nvSciSyncObj), 0, 1, 0, 0},
  {&__pyx_n_s_nvSciSyncObj_2, __pyx_k_nvSciSyncObj_2, sizeof(__pyx_k_nvSciSyncObj_2), 0, 0, 1, 1},
  {&__pyx_n_s_nvSciSync_2, __pyx_k_nvSciSync_2, sizeof(__pyx_k_nvSciSync_2), 0, 0, 1, 1},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_objType, __pyx_k_objType, sizeof(__pyx_k_objType), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_object_out, __pyx_k_object_out, sizeof(__pyx_k_object_out), 0, 0, 1, 1},
  {&__pyx_kp_u_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 1, 0, 0},
  {&__pyx_kp_u_offsetX, __pyx_k_offsetX, sizeof(__pyx_k_offsetX), 0, 1, 0, 0},
  {&__pyx_n_s_offsetX_2, __pyx_k_offsetX_2, sizeof(__pyx_k_offsetX_2), 0, 0, 1, 1},
  {&__pyx_kp_u_offsetY, __pyx_k_offsetY, sizeof(__pyx_k_offsetY), 0, 1, 0, 0},
  {&__pyx_n_s_offsetY_2, __pyx_k_offsetY_2, sizeof(__pyx_k_offsetY_2), 0, 0, 1, 1},
  {&__pyx_kp_u_offsetZ, __pyx_k_offsetZ, sizeof(__pyx_k_offsetZ), 0, 1, 0, 0},
  {&__pyx_n_s_offsetZ_2, __pyx_k_offsetZ_2, sizeof(__pyx_k_offsetZ_2), 0, 0, 1, 1},
  {&__pyx_n_s_offset_2, __pyx_k_offset_2, sizeof(__pyx_k_offset_2), 0, 0, 1, 1},
  {&__pyx_kp_u_operation, __pyx_k_operation, sizeof(__pyx_k_operation), 0, 1, 0, 0},
  {&__pyx_n_s_operation_2, __pyx_k_operation_2, sizeof(__pyx_k_operation_2), 0, 0, 1, 1},
  {&__pyx_n_s_option, __pyx_k_option, sizeof(__pyx_k_option), 0, 0, 1, 1},
  {&__pyx_n_s_optionValues, __pyx_k_optionValues, sizeof(__pyx_k_optionValues), 0, 0, 1, 1},
  {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 1},
  {&__pyx_n_s_ordinal, __pyx_k_ordinal, sizeof(__pyx_k_ordinal), 0, 0, 1, 1},
  {&__pyx_n_s_originalGraph, __pyx_k_originalGraph, sizeof(__pyx_k_originalGraph), 0, 0, 1, 1},
  {&__pyx_n_s_osHandle, __pyx_k_osHandle, sizeof(__pyx_k_osHandle), 0, 0, 1, 1},
  {&__pyx_n_s_outputFile, __pyx_k_outputFile, sizeof(__pyx_k_outputFile), 0, 0, 1, 1},
  {&__pyx_n_s_outputMode, __pyx_k_outputMode, sizeof(__pyx_k_outputMode), 0, 0, 1, 1},
  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
  {&__pyx_kp_u_p2pToken, __pyx_k_p2pToken, sizeof(__pyx_k_p2pToken), 0, 1, 0, 0},
  {&__pyx_n_s_p2pToken_2, __pyx_k_p2pToken_2, sizeof(__pyx_k_p2pToken_2), 0, 0, 1, 1},
  {&__pyx_n_s_pAllocateArray, __pyx_k_pAllocateArray, sizeof(__pyx_k_pAllocateArray), 0, 0, 1, 1},
  {&__pyx_kp_u_pArray, __pyx_k_pArray, sizeof(__pyx_k_pArray), 0, 1, 0, 0},
  {&__pyx_n_s_pArrayDescriptor, __pyx_k_pArrayDescriptor, sizeof(__pyx_k_pArrayDescriptor), 0, 0, 1, 1},
  {&__pyx_n_s_pArray_2, __pyx_k_pArray_2, sizeof(__pyx_k_pArray_2), 0, 0, 1, 1},
  {&__pyx_n_s_pBorderColor, __pyx_k_pBorderColor, sizeof(__pyx_k_pBorderColor), 0, 0, 1, 1},
  {&__pyx_n_s_pConfig, __pyx_k_pConfig, sizeof(__pyx_k_pConfig), 0, 0, 1, 1},
  {&__pyx_n_s_pCopy, __pyx_k_pCopy, sizeof(__pyx_k_pCopy), 0, 0, 1, 1},
  {&__pyx_n_s_pCtx, __pyx_k_pCtx, sizeof(__pyx_k_pCtx), 0, 0, 1, 1},
  {&__pyx_n_s_pCudaDeviceCount, __pyx_k_pCudaDeviceCount, sizeof(__pyx_k_pCudaDeviceCount), 0, 0, 1, 1},
  {&__pyx_n_s_pCudaResource, __pyx_k_pCudaResource, sizeof(__pyx_k_pCudaResource), 0, 0, 1, 1},
  {&__pyx_n_s_pDevPtr, __pyx_k_pDevPtr, sizeof(__pyx_k_pDevPtr), 0, 0, 1, 1},
  {&__pyx_n_s_pDevice, __pyx_k_pDevice, sizeof(__pyx_k_pDevice), 0, 0, 1, 1},
  {&__pyx_n_s_pExecAffinity, __pyx_k_pExecAffinity, sizeof(__pyx_k_pExecAffinity), 0, 0, 1, 1},
  {&__pyx_n_s_pExportTableId, __pyx_k_pExportTableId, sizeof(__pyx_k_pExportTableId), 0, 0, 1, 1},
  {&__pyx_n_s_pFlags, __pyx_k_pFlags, sizeof(__pyx_k_pFlags), 0, 0, 1, 1},
  {&__pyx_n_s_pFormat, __pyx_k_pFormat, sizeof(__pyx_k_pFormat), 0, 0, 1, 1},
  {&__pyx_n_s_pHandle, __pyx_k_pHandle, sizeof(__pyx_k_pHandle), 0, 0, 1, 1},
  {&__pyx_n_s_pLevelArray, __pyx_k_pLevelArray, sizeof(__pyx_k_pLevelArray), 0, 0, 1, 1},
  {&__pyx_n_s_pMilliseconds, __pyx_k_pMilliseconds, sizeof(__pyx_k_pMilliseconds), 0, 0, 1, 1},
  {&__pyx_n_s_pMipmappedArray, __pyx_k_pMipmappedArray, sizeof(__pyx_k_pMipmappedArray), 0, 0, 1, 1},
  {&__pyx_n_s_pMipmappedArrayDesc, __pyx_k_pMipmappedArrayDesc, sizeof(__pyx_k_pMipmappedArrayDesc), 0, 0, 1, 1},
  {&__pyx_n_s_pNumChannels, __pyx_k_pNumChannels, sizeof(__pyx_k_pNumChannels), 0, 0, 1, 1},
  {&__pyx_kp_u_pPitch, __pyx_k_pPitch, sizeof(__pyx_k_pPitch), 0, 1, 0, 0},
  {&__pyx_n_s_pPitch_2, __pyx_k_pPitch_2, sizeof(__pyx_k_pPitch_2), 0, 0, 1, 1},
  {&__pyx_n_s_pPlaneArray, __pyx_k_pPlaneArray, sizeof(__pyx_k_pPlaneArray), 0, 0, 1, 1},
  {&__pyx_n_s_pResDesc, __pyx_k_pResDesc, sizeof(__pyx_k_pResDesc), 0, 0, 1, 1},
  {&__pyx_n_s_pResViewDesc, __pyx_k_pResViewDesc, sizeof(__pyx_k_pResViewDesc), 0, 0, 1, 1},
  {&__pyx_n_s_pSize, __pyx_k_pSize, sizeof(__pyx_k_pSize), 0, 0, 1, 1},
  {&__pyx_n_s_pStr, __pyx_k_pStr, sizeof(__pyx_k_pStr), 0, 0, 1, 1},
  {&__pyx_n_s_pStream, __pyx_k_pStream, sizeof(__pyx_k_pStream), 0, 0, 1, 1},
  {&__pyx_n_s_pSurfObject, __pyx_k_pSurfObject, sizeof(__pyx_k_pSurfObject), 0, 0, 1, 1},
  {&__pyx_n_s_pSurfRef, __pyx_k_pSurfRef, sizeof(__pyx_k_pSurfRef), 0, 0, 1, 1},
  {&__pyx_n_s_pTexDesc, __pyx_k_pTexDesc, sizeof(__pyx_k_pTexDesc), 0, 0, 1, 1},
  {&__pyx_n_s_pTexObject, __pyx_k_pTexObject, sizeof(__pyx_k_pTexObject), 0, 0, 1, 1},
  {&__pyx_n_s_pTexRef, __pyx_k_pTexRef, sizeof(__pyx_k_pTexRef), 0, 0, 1, 1},
  {&__pyx_kp_u_pad, __pyx_k_pad, sizeof(__pyx_k_pad), 0, 1, 0, 0},
  {&__pyx_n_s_pad_2, __pyx_k_pad_2, sizeof(__pyx_k_pad_2), 0, 0, 1, 1},
  {&__pyx_kp_u_pad_length_must_be_64_is, __pyx_k_pad_length_must_be_64_is, sizeof(__pyx_k_pad_length_must_be_64_is), 0, 1, 0, 0},
  {&__pyx_n_s_paddr, __pyx_k_paddr, sizeof(__pyx_k_paddr), 0, 0, 1, 1},
  {&__pyx_n_s_pam, __pyx_k_pam, sizeof(__pyx_k_pam), 0, 0, 1, 1},
  {&__pyx_kp_u_param, __pyx_k_param, sizeof(__pyx_k_param), 0, 1, 0, 0},
  {&__pyx_kp_u_paramArray, __pyx_k_paramArray, sizeof(__pyx_k_paramArray), 0, 1, 0, 0},
  {&__pyx_n_s_paramArray_2, __pyx_k_paramArray_2, sizeof(__pyx_k_paramArray_2), 0, 0, 1, 1},
  {&__pyx_n_s_param_2, __pyx_k_param_2, sizeof(__pyx_k_param_2), 0, 0, 1, 1},
  {&__pyx_kp_u_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 1, 0, 0},
  {&__pyx_kp_u_paramsArray, __pyx_k_paramsArray, sizeof(__pyx_k_paramsArray), 0, 1, 0, 0},
  {&__pyx_n_s_paramsArray_2, __pyx_k_paramsArray_2, sizeof(__pyx_k_paramsArray_2), 0, 0, 1, 1},
  {&__pyx_n_s_params_2, __pyx_k_params_2, sizeof(__pyx_k_params_2), 0, 0, 1, 1},
  {&__pyx_n_s_params_out, __pyx_k_params_out, sizeof(__pyx_k_params_out), 0, 0, 1, 1},
  {&__pyx_n_s_parray, __pyx_k_parray, sizeof(__pyx_k_parray), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_pbase, __pyx_k_pbase, sizeof(__pyx_k_pbase), 0, 0, 1, 1},
  {&__pyx_n_s_pbias, __pyx_k_pbias, sizeof(__pyx_k_pbias), 0, 0, 1, 1},
  {&__pyx_n_s_pblockSizeToDynamicSMemSize, __pyx_k_pblockSizeToDynamicSMemSize, sizeof(__pyx_k_pblockSizeToDynamicSMemSize), 0, 0, 1, 1},
  {&__pyx_n_s_pbuffer, __pyx_k_pbuffer, sizeof(__pyx_k_pbuffer), 0, 0, 1, 1},
  {&__pyx_n_s_pcallback, __pyx_k_pcallback, sizeof(__pyx_k_pcallback), 0, 0, 1, 1},
  {&__pyx_n_s_pchildGraph, __pyx_k_pchildGraph, sizeof(__pyx_k_pchildGraph), 0, 0, 1, 1},
  {&__pyx_n_s_pciBusId, __pyx_k_pciBusId, sizeof(__pyx_k_pciBusId), 0, 0, 1, 1},
  {&__pyx_n_s_pconfig, __pyx_k_pconfig, sizeof(__pyx_k_pconfig), 0, 0, 1, 1},
  {&__pyx_n_s_pconn, __pyx_k_pconn, sizeof(__pyx_k_pconn), 0, 0, 1, 1},
  {&__pyx_n_s_pctx, __pyx_k_pctx, sizeof(__pyx_k_pctx), 0, 0, 1, 1},
  {&__pyx_n_s_pdestroy, __pyx_k_pdestroy, sizeof(__pyx_k_pdestroy), 0, 0, 1, 1},
  {&__pyx_n_s_pdev, __pyx_k_pdev, sizeof(__pyx_k_pdev), 0, 0, 1, 1},
  {&__pyx_n_s_pdevPtr, __pyx_k_pdevPtr, sizeof(__pyx_k_pdevPtr), 0, 0, 1, 1},
  {&__pyx_n_s_pdevice, __pyx_k_pdevice, sizeof(__pyx_k_pdevice), 0, 0, 1, 1},
  {&__pyx_n_s_pdptr, __pyx_k_pdptr, sizeof(__pyx_k_pdptr), 0, 0, 1, 1},
  {&__pyx_n_s_pdst, __pyx_k_pdst, sizeof(__pyx_k_pdst), 0, 0, 1, 1},
  {&__pyx_n_s_pdstArray, __pyx_k_pdstArray, sizeof(__pyx_k_pdstArray), 0, 0, 1, 1},
  {&__pyx_n_s_pdstContext, __pyx_k_pdstContext, sizeof(__pyx_k_pdstContext), 0, 0, 1, 1},
  {&__pyx_n_s_pdstDevice, __pyx_k_pdstDevice, sizeof(__pyx_k_pdstDevice), 0, 0, 1, 1},
  {&__pyx_n_s_peerContext, __pyx_k_peerContext, sizeof(__pyx_k_peerContext), 0, 0, 1, 1},
  {&__pyx_n_s_peerDev, __pyx_k_peerDev, sizeof(__pyx_k_peerDev), 0, 0, 1, 1},
  {&__pyx_n_s_peglSync, __pyx_k_peglSync, sizeof(__pyx_k_peglSync), 0, 0, 1, 1},
  {&__pyx_n_s_pevent, __pyx_k_pevent, sizeof(__pyx_k_pevent), 0, 0, 1, 1},
  {&__pyx_n_s_pextMem, __pyx_k_pextMem, sizeof(__pyx_k_pextMem), 0, 0, 1, 1},
  {&__pyx_n_s_pextSem, __pyx_k_pextSem, sizeof(__pyx_k_pextSem), 0, 0, 1, 1},
  {&__pyx_n_s_pf, __pyx_k_pf, sizeof(__pyx_k_pf), 0, 0, 1, 1},
  {&__pyx_n_s_pflags, __pyx_k_pflags, sizeof(__pyx_k_pflags), 0, 0, 1, 1},
  {&__pyx_n_s_pfm, __pyx_k_pfm, sizeof(__pyx_k_pfm), 0, 0, 1, 1},
  {&__pyx_n_s_pfn, __pyx_k_pfn, sizeof(__pyx_k_pfn), 0, 0, 1, 1},
  {&__pyx_n_s_pformat, __pyx_k_pformat, sizeof(__pyx_k_pformat), 0, 0, 1, 1},
  {&__pyx_n_s_pfunc, __pyx_k_pfunc, sizeof(__pyx_k_pfunc), 0, 0, 1, 1},
  {&__pyx_n_s_pgraph, __pyx_k_pgraph, sizeof(__pyx_k_pgraph), 0, 0, 1, 1},
  {&__pyx_n_s_phArray, __pyx_k_phArray, sizeof(__pyx_k_phArray), 0, 0, 1, 1},
  {&__pyx_n_s_phClonedGraph, __pyx_k_phClonedGraph, sizeof(__pyx_k_phClonedGraph), 0, 0, 1, 1},
  {&__pyx_n_s_phEnd, __pyx_k_phEnd, sizeof(__pyx_k_phEnd), 0, 0, 1, 1},
  {&__pyx_n_s_phErrorNode, __pyx_k_phErrorNode, sizeof(__pyx_k_phErrorNode), 0, 0, 1, 1},
  {&__pyx_n_s_phEvent, __pyx_k_phEvent, sizeof(__pyx_k_phEvent), 0, 0, 1, 1},
  {&__pyx_n_s_phGraph, __pyx_k_phGraph, sizeof(__pyx_k_phGraph), 0, 0, 1, 1},
  {&__pyx_n_s_phGraphClone, __pyx_k_phGraphClone, sizeof(__pyx_k_phGraphClone), 0, 0, 1, 1},
  {&__pyx_n_s_phGraphExec, __pyx_k_phGraphExec, sizeof(__pyx_k_phGraphExec), 0, 0, 1, 1},
  {&__pyx_n_s_phGraphNode, __pyx_k_phGraphNode, sizeof(__pyx_k_phGraphNode), 0, 0, 1, 1},
  {&__pyx_n_s_phMipmappedArray, __pyx_k_phMipmappedArray, sizeof(__pyx_k_phMipmappedArray), 0, 0, 1, 1},
  {&__pyx_n_s_phNode, __pyx_k_phNode, sizeof(__pyx_k_phNode), 0, 0, 1, 1},
  {&__pyx_n_s_phOriginalNode, __pyx_k_phOriginalNode, sizeof(__pyx_k_phOriginalNode), 0, 0, 1, 1},
  {&__pyx_n_s_phStart, __pyx_k_phStart, sizeof(__pyx_k_phStart), 0, 0, 1, 1},
  {&__pyx_n_s_phStream, __pyx_k_phStream, sizeof(__pyx_k_phStream), 0, 0, 1, 1},
  {&__pyx_n_s_phSurfRef, __pyx_k_phSurfRef, sizeof(__pyx_k_phSurfRef), 0, 0, 1, 1},
  {&__pyx_n_s_phTexRef, __pyx_k_phTexRef, sizeof(__pyx_k_phTexRef), 0, 0, 1, 1},
  {&__pyx_n_s_phandle, __pyx_k_phandle, sizeof(__pyx_k_phandle), 0, 0, 1, 1},
  {&__pyx_n_s_pheight, __pyx_k_pheight, sizeof(__pyx_k_pheight), 0, 0, 1, 1},
  {&__pyx_n_s_phfunc, __pyx_k_phfunc, sizeof(__pyx_k_phfunc), 0, 0, 1, 1},
  {&__pyx_n_s_phmod, __pyx_k_phmod, sizeof(__pyx_k_phmod), 0, 0, 1, 1},
  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
  {&__pyx_n_s_pimage, __pyx_k_pimage, sizeof(__pyx_k_pimage), 0, 0, 1, 1},
  {&__pyx_kp_u_pitch, __pyx_k_pitch, sizeof(__pyx_k_pitch), 0, 1, 0, 0},
  {&__pyx_kp_u_pitch2D, __pyx_k_pitch2D, sizeof(__pyx_k_pitch2D), 0, 1, 0, 0},
  {&__pyx_n_s_pitch2D_2, __pyx_k_pitch2D_2, sizeof(__pyx_k_pitch2D_2), 0, 0, 1, 1},
  {&__pyx_kp_u_pitchInBytes, __pyx_k_pitchInBytes, sizeof(__pyx_k_pitchInBytes), 0, 1, 0, 0},
  {&__pyx_n_s_pitchInBytes_2, __pyx_k_pitchInBytes_2, sizeof(__pyx_k_pitchInBytes_2), 0, 0, 1, 1},
  {&__pyx_n_s_pitch_2, __pyx_k_pitch_2, sizeof(__pyx_k_pitch_2), 0, 0, 1, 1},
  {&__pyx_kp_u_planeCount, __pyx_k_planeCount, sizeof(__pyx_k_planeCount), 0, 1, 0, 0},
  {&__pyx_n_s_planeCount_2, __pyx_k_planeCount_2, sizeof(__pyx_k_planeCount_2), 0, 0, 1, 1},
  {&__pyx_n_s_planeIdx, __pyx_k_planeIdx, sizeof(__pyx_k_planeIdx), 0, 0, 1, 1},
  {&__pyx_n_s_pmaxAniso, __pyx_k_pmaxAniso, sizeof(__pyx_k_pmaxAniso), 0, 0, 1, 1},
  {&__pyx_n_s_pmaxMipmapLevelClamp, __pyx_k_pmaxMipmapLevelClamp, sizeof(__pyx_k_pmaxMipmapLevelClamp), 0, 0, 1, 1},
  {&__pyx_n_s_pmemPool, __pyx_k_pmemPool, sizeof(__pyx_k_pmemPool), 0, 0, 1, 1},
  {&__pyx_n_s_pminMipmapLevelClamp, __pyx_k_pminMipmapLevelClamp, sizeof(__pyx_k_pminMipmapLevelClamp), 0, 0, 1, 1},
  {&__pyx_n_s_pmipmap, __pyx_k_pmipmap, sizeof(__pyx_k_pmipmap), 0, 0, 1, 1},
  {&__pyx_n_s_pobject, __pyx_k_pobject, sizeof(__pyx_k_pobject), 0, 0, 1, 1},
  {&__pyx_n_s_pool, __pyx_k_pool, sizeof(__pyx_k_pool), 0, 0, 1, 1},
  {&__pyx_kp_u_poolProps, __pyx_k_poolProps, sizeof(__pyx_k_poolProps), 0, 1, 0, 0},
  {&__pyx_n_s_poolProps_2, __pyx_k_poolProps_2, sizeof(__pyx_k_poolProps_2), 0, 0, 1, 1},
  {&__pyx_n_s_pool_out, __pyx_k_pool_out, sizeof(__pyx_k_pool_out), 0, 0, 1, 1},
  {&__pyx_n_s_poriginalGraph, __pyx_k_poriginalGraph, sizeof(__pyx_k_poriginalGraph), 0, 0, 1, 1},
  {&__pyx_n_s_pp, __pyx_k_pp, sizeof(__pyx_k_pp), 0, 0, 1, 1},
  {&__pyx_n_s_ppCudaResource, __pyx_k_ppCudaResource, sizeof(__pyx_k_ppCudaResource), 0, 0, 1, 1},
  {&__pyx_n_s_ppExportTable, __pyx_k_ppExportTable, sizeof(__pyx_k_ppExportTable), 0, 0, 1, 1},
  {&__pyx_n_s_ppStream, __pyx_k_ppStream, sizeof(__pyx_k_ppStream), 0, 0, 1, 1},
  {&__pyx_n_s_ppeerContext, __pyx_k_ppeerContext, sizeof(__pyx_k_ppeerContext), 0, 0, 1, 1},
  {&__pyx_n_s_ppeerDev, __pyx_k_ppeerDev, sizeof(__pyx_k_ppeerDev), 0, 0, 1, 1},
  {&__pyx_n_s_ppool, __pyx_k_ppool, sizeof(__pyx_k_ppool), 0, 0, 1, 1},
  {&__pyx_n_s_pptr, __pyx_k_pptr, sizeof(__pyx_k_pptr), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_presource, __pyx_k_presource, sizeof(__pyx_k_presource), 0, 0, 1, 1},
  {&__pyx_n_s_presources, __pyx_k_presources, sizeof(__pyx_k_presources), 0, 0, 1, 1},
  {&__pyx_kp_u_priority, __pyx_k_priority, sizeof(__pyx_k_priority), 0, 1, 0, 0},
  {&__pyx_n_s_priority_2, __pyx_k_priority_2, sizeof(__pyx_k_priority_2), 0, 0, 1, 1},
  {&__pyx_kp_u_programmaticEvent, __pyx_k_programmaticEvent, sizeof(__pyx_k_programmaticEvent), 0, 1, 0, 0},
  {&__pyx_n_s_programmaticEvent_2, __pyx_k_programmaticEvent_2, sizeof(__pyx_k_programmaticEvent_2), 0, 0, 1, 1},
  {&__pyx_kp_u_programmaticStreamSerializationA, __pyx_k_programmaticStreamSerializationA, sizeof(__pyx_k_programmaticStreamSerializationA), 0, 1, 0, 0},
  {&__pyx_n_s_programmaticStreamSerializationA_2, __pyx_k_programmaticStreamSerializationA_2, sizeof(__pyx_k_programmaticStreamSerializationA_2), 0, 0, 1, 1},
  {&__pyx_n_s_prop, __pyx_k_prop, sizeof(__pyx_k_prop), 0, 0, 1, 1},
  {&__pyx_n_s_psize, __pyx_k_psize, sizeof(__pyx_k_psize), 0, 0, 1, 1},
  {&__pyx_n_s_psrc, __pyx_k_psrc, sizeof(__pyx_k_psrc), 0, 0, 1, 1},
  {&__pyx_n_s_psrcArray, __pyx_k_psrcArray, sizeof(__pyx_k_psrcArray), 0, 0, 1, 1},
  {&__pyx_n_s_psrcContext, __pyx_k_psrcContext, sizeof(__pyx_k_psrcContext), 0, 0, 1, 1},
  {&__pyx_n_s_psrcDevice, __pyx_k_psrcDevice, sizeof(__pyx_k_psrcDevice), 0, 0, 1, 1},
  {&__pyx_n_s_pstate, __pyx_k_pstate, sizeof(__pyx_k_pstate), 0, 0, 1, 1},
  {&__pyx_n_s_pstream, __pyx_k_pstream, sizeof(__pyx_k_pstream), 0, 0, 1, 1},
  {&__pyx_n_s_psurfObject, __pyx_k_psurfObject, sizeof(__pyx_k_psurfObject), 0, 0, 1, 1},
  {&__pyx_n_s_ptarget, __pyx_k_ptarget, sizeof(__pyx_k_ptarget), 0, 0, 1, 1},
  {&__pyx_n_s_ptexObject, __pyx_k_ptexObject, sizeof(__pyx_k_ptexObject), 0, 0, 1, 1},
  {&__pyx_n_s_ptr, __pyx_k_ptr, sizeof(__pyx_k_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_ptr_2, __pyx_k_ptr_2, sizeof(__pyx_k_ptr_2), 0, 0, 1, 1},
  {&__pyx_n_s_ptr_out, __pyx_k_ptr_out, sizeof(__pyx_k_ptr_out), 0, 0, 1, 1},
  {&__pyx_n_s_pvalue, __pyx_k_pvalue, sizeof(__pyx_k_pvalue), 0, 0, 1, 1},
  {&__pyx_n_s_pvdpDevice, __pyx_k_pvdpDevice, sizeof(__pyx_k_pvdpDevice), 0, 0, 1, 1},
  {&__pyx_n_s_pvdpGetProcAddress, __pyx_k_pvdpGetProcAddress, sizeof(__pyx_k_pvdpGetProcAddress), 0, 0, 1, 1},
  {&__pyx_n_s_pvdpSurface, __pyx_k_pvdpSurface, sizeof(__pyx_k_pvdpSurface), 0, 0, 1, 1},
  {&__pyx_n_s_pwidth, __pyx_k_pwidth, sizeof(__pyx_k_pwidth), 0, 0, 1, 1},
  {&__pyx_n_s_pyObj, __pyx_k_pyObj, sizeof(__pyx_k_pyObj), 0, 0, 1, 1},
  {&__pyx_n_s_pyattributes, __pyx_k_pyattributes, sizeof(__pyx_k_pyattributes), 0, 0, 1, 1},
  {&__pyx_n_s_pydataSizes, __pyx_k_pydataSizes, sizeof(__pyx_k_pydataSizes), 0, 0, 1, 1},
  {&__pyx_n_s_pydependencies, __pyx_k_pydependencies, sizeof(__pyx_k_pydependencies), 0, 0, 1, 1},
  {&__pyx_n_s_pydependencies_out, __pyx_k_pydependencies_out, sizeof(__pyx_k_pydependencies_out), 0, 0, 1, 1},
  {&__pyx_n_s_pydependentNodes, __pyx_k_pydependentNodes, sizeof(__pyx_k_pydependentNodes), 0, 0, 1, 1},
  {&__pyx_n_s_pyfrom, __pyx_k_pyfrom, sizeof(__pyx_k_pyfrom), 0, 0, 1, 1},
  {&__pyx_n_s_pylist, __pyx_k_pylist, sizeof(__pyx_k_pylist), 0, 0, 1, 1},
  {&__pyx_n_s_pyname, __pyx_k_pyname, sizeof(__pyx_k_pyname), 0, 0, 1, 1},
  {&__pyx_n_s_pynodes, __pyx_k_pynodes, sizeof(__pyx_k_pynodes), 0, 0, 1, 1},
  {&__pyx_n_s_pyoptionValues, __pyx_k_pyoptionValues, sizeof(__pyx_k_pyoptionValues), 0, 0, 1, 1},
  {&__pyx_n_s_pyoptions, __pyx_k_pyoptions, sizeof(__pyx_k_pyoptions), 0, 0, 1, 1},
  {&__pyx_n_s_pypCudaDevices, __pyx_k_pypCudaDevices, sizeof(__pyx_k_pypCudaDevices), 0, 0, 1, 1},
  {&__pyx_n_s_pypciBusId, __pyx_k_pypciBusId, sizeof(__pyx_k_pypciBusId), 0, 0, 1, 1},
  {&__pyx_n_s_pyrootNodes, __pyx_k_pyrootNodes, sizeof(__pyx_k_pyrootNodes), 0, 0, 1, 1},
  {&__pyx_n_s_pyto, __pyx_k_pyto, sizeof(__pyx_k_pyto), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_kp_u_regsPerBlock, __pyx_k_regsPerBlock, sizeof(__pyx_k_regsPerBlock), 0, 1, 0, 0},
  {&__pyx_n_s_regsPerBlock_2, __pyx_k_regsPerBlock_2, sizeof(__pyx_k_regsPerBlock_2), 0, 0, 1, 1},
  {&__pyx_kp_u_requestedHandleTypes, __pyx_k_requestedHandleTypes, sizeof(__pyx_k_requestedHandleTypes), 0, 1, 0, 0},
  {&__pyx_n_s_requestedHandleTypes_2, __pyx_k_requestedHandleTypes_2, sizeof(__pyx_k_requestedHandleTypes_2), 0, 0, 1, 1},
  {&__pyx_kp_u_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 1, 0, 0},
  {&__pyx_kp_u_resType, __pyx_k_resType, sizeof(__pyx_k_resType), 0, 1, 0, 0},
  {&__pyx_n_s_resType_2, __pyx_k_resType_2, sizeof(__pyx_k_resType_2), 0, 0, 1, 1},
  {&__pyx_n_s_res_2, __pyx_k_res_2, sizeof(__pyx_k_res_2), 0, 0, 1, 1},
  {&__pyx_kp_u_reserved, __pyx_k_reserved, sizeof(__pyx_k_reserved), 0, 1, 0, 0},
  {&__pyx_kp_u_reserved0, __pyx_k_reserved0, sizeof(__pyx_k_reserved0), 0, 1, 0, 0},
  {&__pyx_n_s_reserved0_2, __pyx_k_reserved0_2, sizeof(__pyx_k_reserved0_2), 0, 0, 1, 1},
  {&__pyx_kp_u_reserved1, __pyx_k_reserved1, sizeof(__pyx_k_reserved1), 0, 1, 0, 0},
  {&__pyx_n_s_reserved1_2, __pyx_k_reserved1_2, sizeof(__pyx_k_reserved1_2), 0, 0, 1, 1},
  {&__pyx_n_s_reserved_2, __pyx_k_reserved_2, sizeof(__pyx_k_reserved_2), 0, 0, 1, 1},
  {&__pyx_kp_u_reserved_3, __pyx_k_reserved_3, sizeof(__pyx_k_reserved_3), 0, 1, 0, 0},
  {&__pyx_kp_u_reserved_length_must_be_4_is, __pyx_k_reserved_length_must_be_4_is, sizeof(__pyx_k_reserved_length_must_be_4_is), 0, 1, 0, 0},
  {&__pyx_kp_u_reserved_length_must_be_64_is, __pyx_k_reserved_length_must_be_64_is, sizeof(__pyx_k_reserved_length_must_be_64_is), 0, 1, 0, 0},
  {&__pyx_kp_u_resource, __pyx_k_resource, sizeof(__pyx_k_resource), 0, 1, 0, 0},
  {&__pyx_kp_u_resourceType, __pyx_k_resourceType, sizeof(__pyx_k_resourceType), 0, 1, 0, 0},
  {&__pyx_n_s_resourceType_2, __pyx_k_resourceType_2, sizeof(__pyx_k_resourceType_2), 0, 0, 1, 1},
  {&__pyx_n_s_resource_2, __pyx_k_resource_2, sizeof(__pyx_k_resource_2), 0, 0, 1, 1},
  {&__pyx_n_s_resources, __pyx_k_resources, sizeof(__pyx_k_resources), 0, 0, 1, 1},
  {&__pyx_n_s_scope, __pyx_k_scope, sizeof(__pyx_k_scope), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_semHandleDesc, __pyx_k_semHandleDesc, sizeof(__pyx_k_semHandleDesc), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_shHandleType, __pyx_k_shHandleType, sizeof(__pyx_k_shHandleType), 0, 0, 1, 1},
  {&__pyx_n_s_shareData, __pyx_k_shareData, sizeof(__pyx_k_shareData), 0, 0, 1, 1},
  {&__pyx_n_s_shareData_out, __pyx_k_shareData_out, sizeof(__pyx_k_shareData_out), 0, 0, 1, 1},
  {&__pyx_kp_u_sharedMemBytes, __pyx_k_sharedMemBytes, sizeof(__pyx_k_sharedMemBytes), 0, 1, 0, 0},
  {&__pyx_n_s_sharedMemBytes_2, __pyx_k_sharedMemBytes_2, sizeof(__pyx_k_sharedMemBytes_2), 0, 0, 1, 1},
  {&__pyx_kp_u_sharedMemPerBlock, __pyx_k_sharedMemPerBlock, sizeof(__pyx_k_sharedMemPerBlock), 0, 1, 0, 0},
  {&__pyx_n_s_sharedMemPerBlock_2, __pyx_k_sharedMemPerBlock_2, sizeof(__pyx_k_sharedMemPerBlock_2), 0, 0, 1, 1},
  {&__pyx_kp_u_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 1, 0, 0},
  {&__pyx_kp_u_sizeInBytes, __pyx_k_sizeInBytes, sizeof(__pyx_k_sizeInBytes), 0, 1, 0, 0},
  {&__pyx_n_s_sizeInBytes_2, __pyx_k_sizeInBytes_2, sizeof(__pyx_k_sizeInBytes_2), 0, 0, 1, 1},
  {&__pyx_n_s_sizeOut, __pyx_k_sizeOut, sizeof(__pyx_k_sizeOut), 0, 0, 1, 1},
  {&__pyx_n_s_size_2, __pyx_k_size_2, sizeof(__pyx_k_size_2), 0, 0, 1, 1},
  {&__pyx_n_s_sizeof, __pyx_k_sizeof, sizeof(__pyx_k_sizeof), 0, 0, 1, 1},
  {&__pyx_kp_u_smCount, __pyx_k_smCount, sizeof(__pyx_k_smCount), 0, 1, 0, 0},
  {&__pyx_n_s_smCount_2, __pyx_k_smCount_2, sizeof(__pyx_k_smCount_2), 0, 0, 1, 1},
  {&__pyx_kp_u_sparseLevel, __pyx_k_sparseLevel, sizeof(__pyx_k_sparseLevel), 0, 1, 0, 0},
  {&__pyx_n_s_sparseLevel_2, __pyx_k_sparseLevel_2, sizeof(__pyx_k_sparseLevel_2), 0, 0, 1, 1},
  {&__pyx_n_s_sparseProperties, __pyx_k_sparseProperties, sizeof(__pyx_k_sparseProperties), 0, 0, 1, 1},
  {&__pyx_n_s_src, __pyx_k_src, sizeof(__pyx_k_src), 0, 0, 1, 1},
  {&__pyx_kp_u_srcArray, __pyx_k_srcArray, sizeof(__pyx_k_srcArray), 0, 1, 0, 0},
  {&__pyx_n_s_srcArray_2, __pyx_k_srcArray_2, sizeof(__pyx_k_srcArray_2), 0, 0, 1, 1},
  {&__pyx_kp_u_srcContext, __pyx_k_srcContext, sizeof(__pyx_k_srcContext), 0, 1, 0, 0},
  {&__pyx_n_s_srcContext_2, __pyx_k_srcContext_2, sizeof(__pyx_k_srcContext_2), 0, 0, 1, 1},
  {&__pyx_kp_u_srcDevice, __pyx_k_srcDevice, sizeof(__pyx_k_srcDevice), 0, 1, 0, 0},
  {&__pyx_n_s_srcDevice_2, __pyx_k_srcDevice_2, sizeof(__pyx_k_srcDevice_2), 0, 0, 1, 1},
  {&__pyx_kp_u_srcHeight, __pyx_k_srcHeight, sizeof(__pyx_k_srcHeight), 0, 1, 0, 0},
  {&__pyx_n_s_srcHeight_2, __pyx_k_srcHeight_2, sizeof(__pyx_k_srcHeight_2), 0, 0, 1, 1},
  {&__pyx_kp_u_srcHost, __pyx_k_srcHost, sizeof(__pyx_k_srcHost), 0, 1, 0, 0},
  {&__pyx_n_s_srcHost_2, __pyx_k_srcHost_2, sizeof(__pyx_k_srcHost_2), 0, 0, 1, 1},
  {&__pyx_kp_u_srcLOD, __pyx_k_srcLOD, sizeof(__pyx_k_srcLOD), 0, 1, 0, 0},
  {&__pyx_n_s_srcLOD_2, __pyx_k_srcLOD_2, sizeof(__pyx_k_srcLOD_2), 0, 0, 1, 1},
  {&__pyx_kp_u_srcMemoryType, __pyx_k_srcMemoryType, sizeof(__pyx_k_srcMemoryType), 0, 1, 0, 0},
  {&__pyx_n_s_srcMemoryType_2, __pyx_k_srcMemoryType_2, sizeof(__pyx_k_srcMemoryType_2), 0, 0, 1, 1},
  {&__pyx_n_s_srcOffset, __pyx_k_srcOffset, sizeof(__pyx_k_srcOffset), 0, 0, 1, 1},
  {&__pyx_kp_u_srcPitch, __pyx_k_srcPitch, sizeof(__pyx_k_srcPitch), 0, 1, 0, 0},
  {&__pyx_n_s_srcPitch_2, __pyx_k_srcPitch_2, sizeof(__pyx_k_srcPitch_2), 0, 0, 1, 1},
  {&__pyx_kp_u_srcXInBytes, __pyx_k_srcXInBytes, sizeof(__pyx_k_srcXInBytes), 0, 1, 0, 0},
  {&__pyx_n_s_srcXInBytes_2, __pyx_k_srcXInBytes_2, sizeof(__pyx_k_srcXInBytes_2), 0, 0, 1, 1},
  {&__pyx_kp_u_srcY, __pyx_k_srcY, sizeof(__pyx_k_srcY), 0, 1, 0, 0},
  {&__pyx_n_s_srcY_2, __pyx_k_srcY_2, sizeof(__pyx_k_srcY_2), 0, 0, 1, 1},
  {&__pyx_kp_u_srcZ, __pyx_k_srcZ, sizeof(__pyx_k_srcZ), 0, 1, 0, 0},
  {&__pyx_n_s_srcZ_2, __pyx_k_srcZ_2, sizeof(__pyx_k_srcZ_2), 0, 0, 1, 1},
  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_n_s_stateOut, __pyx_k_stateOut, sizeof(__pyx_k_stateOut), 0, 0, 1, 1},
  {&__pyx_n_s_stream, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_kp_u_subresource, __pyx_k_subresource, sizeof(__pyx_k_subresource), 0, 1, 0, 0},
  {&__pyx_kp_u_subresourceType, __pyx_k_subresourceType, sizeof(__pyx_k_subresourceType), 0, 1, 0, 0},
  {&__pyx_n_s_subresourceType_2, __pyx_k_subresourceType_2, sizeof(__pyx_k_subresourceType_2), 0, 0, 1, 1},
  {&__pyx_n_s_subresource_2, __pyx_k_subresource_2, sizeof(__pyx_k_subresource_2), 0, 0, 1, 1},
  {&__pyx_n_s_surfObject, __pyx_k_surfObject, sizeof(__pyx_k_surfObject), 0, 0, 1, 1},
  {&__pyx_n_s_symbol, __pyx_k_symbol, sizeof(__pyx_k_symbol), 0, 0, 1, 1},
  {&__pyx_kp_u_syncPolicy, __pyx_k_syncPolicy, sizeof(__pyx_k_syncPolicy), 0, 1, 0, 0},
  {&__pyx_n_s_syncPolicy_2, __pyx_k_syncPolicy_2, sizeof(__pyx_k_syncPolicy_2), 0, 0, 1, 1},
  {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_texObject, __pyx_k_texObject, sizeof(__pyx_k_texObject), 0, 0, 1, 1},
  {&__pyx_kp_u_textureAlign, __pyx_k_textureAlign, sizeof(__pyx_k_textureAlign), 0, 1, 0, 0},
  {&__pyx_n_s_textureAlign_2, __pyx_k_textureAlign_2, sizeof(__pyx_k_textureAlign_2), 0, 0, 1, 1},
  {&__pyx_n_s_texunit, __pyx_k_texunit, sizeof(__pyx_k_texunit), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_kp_u_tileExtent, __pyx_k_tileExtent, sizeof(__pyx_k_tileExtent), 0, 1, 0, 0},
  {&__pyx_n_s_tileExtent_2, __pyx_k_tileExtent_2, sizeof(__pyx_k_tileExtent_2), 0, 0, 1, 1},
  {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
  {&__pyx_kp_u_timeoutMs, __pyx_k_timeoutMs, sizeof(__pyx_k_timeoutMs), 0, 1, 0, 0},
  {&__pyx_n_s_timeoutMs_2, __pyx_k_timeoutMs_2, sizeof(__pyx_k_timeoutMs_2), 0, 0, 1, 1},
  {&__pyx_n_s_to, __pyx_k_to, sizeof(__pyx_k_to), 0, 0, 1, 1},
  {&__pyx_n_s_total, __pyx_k_total, sizeof(__pyx_k_total), 0, 0, 1, 1},
  {&__pyx_kp_u_totalConstantMemory, __pyx_k_totalConstantMemory, sizeof(__pyx_k_totalConstantMemory), 0, 1, 0, 0},
  {&__pyx_n_s_totalConstantMemory_2, __pyx_k_totalConstantMemory_2, sizeof(__pyx_k_totalConstantMemory_2), 0, 0, 1, 1},
  {&__pyx_kp_u_triggerAtBlockStart, __pyx_k_triggerAtBlockStart, sizeof(__pyx_k_triggerAtBlockStart), 0, 1, 0, 0},
  {&__pyx_n_s_triggerAtBlockStart_2, __pyx_k_triggerAtBlockStart_2, sizeof(__pyx_k_triggerAtBlockStart_2), 0, 0, 1, 1},
  {&__pyx_kp_u_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 1, 0, 0},
  {&__pyx_n_s_type_2, __pyx_k_type_2, sizeof(__pyx_k_type_2), 0, 0, 1, 1},
  {&__pyx_n_s_typename, __pyx_k_typename, sizeof(__pyx_k_typename), 0, 0, 1, 1},
  {&__pyx_n_s_typing, __pyx_k_typing, sizeof(__pyx_k_typing), 0, 0, 1, 1},
  {&__pyx_n_s_uc, __pyx_k_uc, sizeof(__pyx_k_uc), 0, 0, 1, 1},
  {&__pyx_n_s_ui, __pyx_k_ui, sizeof(__pyx_k_ui), 0, 0, 1, 1},
  {&__pyx_n_s_updateResult_out, __pyx_k_updateResult_out, sizeof(__pyx_k_updateResult_out), 0, 0, 1, 1},
  {&__pyx_n_s_us, __pyx_k_us, sizeof(__pyx_k_us), 0, 0, 1, 1},
  {&__pyx_kp_u_usage, __pyx_k_usage, sizeof(__pyx_k_usage), 0, 1, 0, 0},
  {&__pyx_n_s_usage_2, __pyx_k_usage_2, sizeof(__pyx_k_usage_2), 0, 0, 1, 1},
  {&__pyx_kp_u_userData, __pyx_k_userData, sizeof(__pyx_k_userData), 0, 1, 0, 0},
  {&__pyx_n_s_userData_2, __pyx_k_userData_2, sizeof(__pyx_k_userData_2), 0, 0, 1, 1},
  {&__pyx_n_s_uuid, __pyx_k_uuid, sizeof(__pyx_k_uuid), 0, 0, 1, 1},
  {&__pyx_kp_u_vaSpaceToken, __pyx_k_vaSpaceToken, sizeof(__pyx_k_vaSpaceToken), 0, 1, 0, 0},
  {&__pyx_n_s_vaSpaceToken_2, __pyx_k_vaSpaceToken_2, sizeof(__pyx_k_vaSpaceToken_2), 0, 0, 1, 1},
  {&__pyx_kp_u_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 1, 0, 0},
  {&__pyx_n_s_val_2, __pyx_k_val_2, sizeof(__pyx_k_val_2), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_kp_u_value64, __pyx_k_value64, sizeof(__pyx_k_value64), 0, 1, 0, 0},
  {&__pyx_n_s_value64_2, __pyx_k_value64_2, sizeof(__pyx_k_value64_2), 0, 0, 1, 1},
  {&__pyx_kp_u_value_2, __pyx_k_value_2, sizeof(__pyx_k_value_2), 0, 1, 0, 0},
  {&__pyx_kp_u_value_3, __pyx_k_value_3, sizeof(__pyx_k_value_3), 0, 1, 0, 0},
  {&__pyx_n_s_value_out, __pyx_k_value_out, sizeof(__pyx_k_value_out), 0, 0, 1, 1},
  {&__pyx_n_s_vdpDevice, __pyx_k_vdpDevice, sizeof(__pyx_k_vdpDevice), 0, 0, 1, 1},
  {&__pyx_n_s_vdpGetProcAddress, __pyx_k_vdpGetProcAddress, sizeof(__pyx_k_vdpGetProcAddress), 0, 0, 1, 1},
  {&__pyx_n_s_vdpSurface, __pyx_k_vdpSurface, sizeof(__pyx_k_vdpSurface), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_s_voidStarHelper, __pyx_k_voidStarHelper, sizeof(__pyx_k_voidStarHelper), 0, 0, 1, 1},
  {&__pyx_kp_u_waitValue, __pyx_k_waitValue, sizeof(__pyx_k_waitValue), 0, 1, 0, 0},
  {&__pyx_n_s_waitValue_2, __pyx_k_waitValue_2, sizeof(__pyx_k_waitValue_2), 0, 0, 1, 1},
  {&__pyx_kp_u_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 1, 0, 0},
  {&__pyx_n_s_width_2, __pyx_k_width_2, sizeof(__pyx_k_width_2), 0, 0, 1, 1},
  {&__pyx_kp_u_win32, __pyx_k_win32, sizeof(__pyx_k_win32), 0, 1, 0, 0},
  {&__pyx_kp_u_win32HandleMetaData, __pyx_k_win32HandleMetaData, sizeof(__pyx_k_win32HandleMetaData), 0, 1, 0, 0},
  {&__pyx_n_s_win32HandleMetaData_2, __pyx_k_win32HandleMetaData_2, sizeof(__pyx_k_win32HandleMetaData_2), 0, 0, 1, 1},
  {&__pyx_kp_u_win32SecurityAttributes, __pyx_k_win32SecurityAttributes, sizeof(__pyx_k_win32SecurityAttributes), 0, 1, 0, 0},
  {&__pyx_n_s_win32SecurityAttributes_2, __pyx_k_win32SecurityAttributes_2, sizeof(__pyx_k_win32SecurityAttributes_2), 0, 0, 1, 1},
  {&__pyx_n_s_win32_2, __pyx_k_win32_2, sizeof(__pyx_k_win32_2), 0, 0, 1, 1},
  {&__pyx_kp_u_writeValue, __pyx_k_writeValue, sizeof(__pyx_k_writeValue), 0, 1, 0, 0},
  {&__pyx_n_s_writeValue_2, __pyx_k_writeValue_2, sizeof(__pyx_k_writeValue_2), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_n_u_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 1, 0, 1},
  {&__pyx_kp_u_x_2, __pyx_k_x_2, sizeof(__pyx_k_x_2), 0, 1, 0, 0},
  {&__pyx_kp_u_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 1, 0, 0},
  {&__pyx_n_s_y_2, __pyx_k_y_2, sizeof(__pyx_k_y_2), 0, 0, 1, 1},
  {&__pyx_kp_u_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 1, 0, 0},
  {&__pyx_n_s_z_2, __pyx_k_z_2, sizeof(__pyx_k_z_2), 0, 0, 1, 1},
  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 3701, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 4444, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 4446, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 4982, __pyx_L1_error)
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 4995, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 10596, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 13862, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 13865, __pyx_L1_error)
  __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s_OverflowError); if (!__pyx_builtin_OverflowError) __PYX_ERR(1, 81, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__104 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__106 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__114 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__116 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__119 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__121 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__124 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__126 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__131 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__133 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__136 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__138 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__141 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__143 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__146 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__148 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__151 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__153 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__156 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__158 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__161 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__163 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__168 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__170 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__173 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__175 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__178 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__180 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__183 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__185 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__188 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__190 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__193 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__195 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__198 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__200 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__200);
  __Pyx_GIVEREF(__pyx_tuple__200);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__203 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__205 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__208 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__210 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__213 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__215 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__218 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__220 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__220);
  __Pyx_GIVEREF(__pyx_tuple__220);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__223 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__225 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__228 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__230 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__233 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__235 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__238 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__240 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__243 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__245 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__248 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__250 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__253 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__255 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__258 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__260 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__263 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__265 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__268 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__270 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__270);
  __Pyx_GIVEREF(__pyx_tuple__270);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__273 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__273);
  __Pyx_GIVEREF(__pyx_tuple__273);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__275 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__275);
  __Pyx_GIVEREF(__pyx_tuple__275);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__278 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__278);
  __Pyx_GIVEREF(__pyx_tuple__278);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__280 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__280);
  __Pyx_GIVEREF(__pyx_tuple__280);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__283 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__285 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__285);
  __Pyx_GIVEREF(__pyx_tuple__285);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__288 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__288);
  __Pyx_GIVEREF(__pyx_tuple__288);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__290 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__290);
  __Pyx_GIVEREF(__pyx_tuple__290);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__293 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__293);
  __Pyx_GIVEREF(__pyx_tuple__293);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__295 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__295);
  __Pyx_GIVEREF(__pyx_tuple__295);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__298 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__298);
  __Pyx_GIVEREF(__pyx_tuple__298);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__300 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__300);
  __Pyx_GIVEREF(__pyx_tuple__300);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__303 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__303);
  __Pyx_GIVEREF(__pyx_tuple__303);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__305 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__305);
  __Pyx_GIVEREF(__pyx_tuple__305);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__308 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__308);
  __Pyx_GIVEREF(__pyx_tuple__308);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__310 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__310);
  __Pyx_GIVEREF(__pyx_tuple__310);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__313 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__313);
  __Pyx_GIVEREF(__pyx_tuple__313);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__315 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__315);
  __Pyx_GIVEREF(__pyx_tuple__315);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__318 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__318);
  __Pyx_GIVEREF(__pyx_tuple__318);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__320 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__323 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__323);
  __Pyx_GIVEREF(__pyx_tuple__323);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__325 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__325);
  __Pyx_GIVEREF(__pyx_tuple__325);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__328 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__328);
  __Pyx_GIVEREF(__pyx_tuple__328);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__330 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__330);
  __Pyx_GIVEREF(__pyx_tuple__330);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__333 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__333);
  __Pyx_GIVEREF(__pyx_tuple__333);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__335 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__335);
  __Pyx_GIVEREF(__pyx_tuple__335);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__338 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__338);
  __Pyx_GIVEREF(__pyx_tuple__338);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__340 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__340);
  __Pyx_GIVEREF(__pyx_tuple__340);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__343 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__343);
  __Pyx_GIVEREF(__pyx_tuple__343);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__345 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__345);
  __Pyx_GIVEREF(__pyx_tuple__345);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__348 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__348);
  __Pyx_GIVEREF(__pyx_tuple__348);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__350 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__353 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__353)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__353);
  __Pyx_GIVEREF(__pyx_tuple__353);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__355 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__355)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__355);
  __Pyx_GIVEREF(__pyx_tuple__355);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__358 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__358)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__358);
  __Pyx_GIVEREF(__pyx_tuple__358);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__360 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__363 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__363)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__363);
  __Pyx_GIVEREF(__pyx_tuple__363);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__365 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__365);
  __Pyx_GIVEREF(__pyx_tuple__365);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__368 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__368)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__368);
  __Pyx_GIVEREF(__pyx_tuple__368);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__370 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__370)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__370);
  __Pyx_GIVEREF(__pyx_tuple__370);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__373 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__373);
  __Pyx_GIVEREF(__pyx_tuple__373);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__375 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__375);
  __Pyx_GIVEREF(__pyx_tuple__375);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__378 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__378)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__378);
  __Pyx_GIVEREF(__pyx_tuple__378);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__380 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__380)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__380);
  __Pyx_GIVEREF(__pyx_tuple__380);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__383 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__383)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__383);
  __Pyx_GIVEREF(__pyx_tuple__383);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__385 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__385)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__385);
  __Pyx_GIVEREF(__pyx_tuple__385);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__388 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__388)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__388);
  __Pyx_GIVEREF(__pyx_tuple__388);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__390 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__390)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__390);
  __Pyx_GIVEREF(__pyx_tuple__390);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__393 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__393)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__393);
  __Pyx_GIVEREF(__pyx_tuple__393);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__395 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__395)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__395);
  __Pyx_GIVEREF(__pyx_tuple__395);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__398 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__398)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__398);
  __Pyx_GIVEREF(__pyx_tuple__398);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__400 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__400)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__400);
  __Pyx_GIVEREF(__pyx_tuple__400);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__403 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__403)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__403);
  __Pyx_GIVEREF(__pyx_tuple__403);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__405 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__405)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__405);
  __Pyx_GIVEREF(__pyx_tuple__405);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__408 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__408)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__408);
  __Pyx_GIVEREF(__pyx_tuple__408);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__410 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__410)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__410);
  __Pyx_GIVEREF(__pyx_tuple__410);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__413 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__413)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__413);
  __Pyx_GIVEREF(__pyx_tuple__413);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__415 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__415)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__415);
  __Pyx_GIVEREF(__pyx_tuple__415);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__418 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__418)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__418);
  __Pyx_GIVEREF(__pyx_tuple__418);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__420 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__420)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__420);
  __Pyx_GIVEREF(__pyx_tuple__420);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__423 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__423)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__423);
  __Pyx_GIVEREF(__pyx_tuple__423);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__425 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__425)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__425);
  __Pyx_GIVEREF(__pyx_tuple__425);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__428 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__428)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__428);
  __Pyx_GIVEREF(__pyx_tuple__428);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__430 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__430)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__430);
  __Pyx_GIVEREF(__pyx_tuple__430);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__433 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__433)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__433);
  __Pyx_GIVEREF(__pyx_tuple__433);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__435 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__435)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__435);
  __Pyx_GIVEREF(__pyx_tuple__435);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__438 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__438)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__438);
  __Pyx_GIVEREF(__pyx_tuple__438);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__440 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__440)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__440);
  __Pyx_GIVEREF(__pyx_tuple__440);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__443 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__443)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__443);
  __Pyx_GIVEREF(__pyx_tuple__443);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__445 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__445)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__445);
  __Pyx_GIVEREF(__pyx_tuple__445);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__448 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__448)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__448);
  __Pyx_GIVEREF(__pyx_tuple__448);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__450 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__450)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__450);
  __Pyx_GIVEREF(__pyx_tuple__450);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__453 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__453)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__453);
  __Pyx_GIVEREF(__pyx_tuple__453);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__455 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__455)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__455);
  __Pyx_GIVEREF(__pyx_tuple__455);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__458 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__458)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__458);
  __Pyx_GIVEREF(__pyx_tuple__458);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__460 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__460)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__460);
  __Pyx_GIVEREF(__pyx_tuple__460);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__463 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__463)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__463);
  __Pyx_GIVEREF(__pyx_tuple__463);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__465 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__465)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__465);
  __Pyx_GIVEREF(__pyx_tuple__465);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__468 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__468)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__468);
  __Pyx_GIVEREF(__pyx_tuple__468);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__470 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__470)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__470);
  __Pyx_GIVEREF(__pyx_tuple__470);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__473 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__473)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__473);
  __Pyx_GIVEREF(__pyx_tuple__473);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__475 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__475)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__475);
  __Pyx_GIVEREF(__pyx_tuple__475);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__478 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__478)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__478);
  __Pyx_GIVEREF(__pyx_tuple__478);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__480 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__480)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__480);
  __Pyx_GIVEREF(__pyx_tuple__480);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__483 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__483)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__483);
  __Pyx_GIVEREF(__pyx_tuple__483);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__485 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__485)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__485);
  __Pyx_GIVEREF(__pyx_tuple__485);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__488 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__488)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__488);
  __Pyx_GIVEREF(__pyx_tuple__488);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__490 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__490)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__490);
  __Pyx_GIVEREF(__pyx_tuple__490);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__493 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__493)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__493);
  __Pyx_GIVEREF(__pyx_tuple__493);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__495 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__495)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__495);
  __Pyx_GIVEREF(__pyx_tuple__495);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__498 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__498)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__498);
  __Pyx_GIVEREF(__pyx_tuple__498);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__500 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__500)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__500);
  __Pyx_GIVEREF(__pyx_tuple__500);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__503 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__503)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__503);
  __Pyx_GIVEREF(__pyx_tuple__503);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__505 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__505)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__505);
  __Pyx_GIVEREF(__pyx_tuple__505);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__508 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__508)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__508);
  __Pyx_GIVEREF(__pyx_tuple__508);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__510 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__510)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__510);
  __Pyx_GIVEREF(__pyx_tuple__510);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__513 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__513)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__513);
  __Pyx_GIVEREF(__pyx_tuple__513);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__515 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__515)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__515);
  __Pyx_GIVEREF(__pyx_tuple__515);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__518 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__518)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__518);
  __Pyx_GIVEREF(__pyx_tuple__518);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__520 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__520)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__520);
  __Pyx_GIVEREF(__pyx_tuple__520);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__523 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__523)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__523);
  __Pyx_GIVEREF(__pyx_tuple__523);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__525 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__525)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__525);
  __Pyx_GIVEREF(__pyx_tuple__525);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__528 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__528)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__528);
  __Pyx_GIVEREF(__pyx_tuple__528);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__530 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__530)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__530);
  __Pyx_GIVEREF(__pyx_tuple__530);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__533 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__533)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__533);
  __Pyx_GIVEREF(__pyx_tuple__533);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__535 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__535)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__535);
  __Pyx_GIVEREF(__pyx_tuple__535);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__538 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__538)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__538);
  __Pyx_GIVEREF(__pyx_tuple__538);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__540 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__540)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__540);
  __Pyx_GIVEREF(__pyx_tuple__540);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__543 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__543)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__543);
  __Pyx_GIVEREF(__pyx_tuple__543);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__545 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__545)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__545);
  __Pyx_GIVEREF(__pyx_tuple__545);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__548 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__548)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__548);
  __Pyx_GIVEREF(__pyx_tuple__548);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__550 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__550)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__550);
  __Pyx_GIVEREF(__pyx_tuple__550);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__553 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__553)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__553);
  __Pyx_GIVEREF(__pyx_tuple__553);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__555 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__555)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__555);
  __Pyx_GIVEREF(__pyx_tuple__555);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__558 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__558)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__558);
  __Pyx_GIVEREF(__pyx_tuple__558);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__560 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__560)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__560);
  __Pyx_GIVEREF(__pyx_tuple__560);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__563 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__563)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__563);
  __Pyx_GIVEREF(__pyx_tuple__563);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__565 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__565)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__565);
  __Pyx_GIVEREF(__pyx_tuple__565);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__568 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__568)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__568);
  __Pyx_GIVEREF(__pyx_tuple__568);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__570 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__570)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__570);
  __Pyx_GIVEREF(__pyx_tuple__570);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__573 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__573)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__573);
  __Pyx_GIVEREF(__pyx_tuple__573);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__575 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__575)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__575);
  __Pyx_GIVEREF(__pyx_tuple__575);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__578 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__578)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__578);
  __Pyx_GIVEREF(__pyx_tuple__578);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__580 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__580)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__580);
  __Pyx_GIVEREF(__pyx_tuple__580);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__583 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__583)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__583);
  __Pyx_GIVEREF(__pyx_tuple__583);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__585 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__585)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__585);
  __Pyx_GIVEREF(__pyx_tuple__585);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__588 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__588)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__588);
  __Pyx_GIVEREF(__pyx_tuple__588);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__590 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__590)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__590);
  __Pyx_GIVEREF(__pyx_tuple__590);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__593 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__593)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__593);
  __Pyx_GIVEREF(__pyx_tuple__593);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__595 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__595)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__595);
  __Pyx_GIVEREF(__pyx_tuple__595);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__598 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__598)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__598);
  __Pyx_GIVEREF(__pyx_tuple__598);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__600 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__600)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__600);
  __Pyx_GIVEREF(__pyx_tuple__600);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__603 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__603)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__603);
  __Pyx_GIVEREF(__pyx_tuple__603);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__605 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__605)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__605);
  __Pyx_GIVEREF(__pyx_tuple__605);

  /* "cuda/cuda.pyx":12942
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUexecAffinityParam)) for _x in paramsArray):
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUexecAffinityParam]")             # <<<<<<<<<<<<<<
 * 
 *     cdef CUcontext pctx = CUcontext()
 */
  __pyx_tuple__635 = PyTuple_Pack(1, __pyx_kp_u_Argument_paramsArray_is_not_inst); if (unlikely(!__pyx_tuple__635)) __PYX_ERR(0, 12942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__635);
  __Pyx_GIVEREF(__pyx_tuple__635);

  /* "cuda/cuda.pyx":13857
 *     options = [] if options is None else options
 *     if not all(isinstance(_x, (CUjit_option)) for _x in options):
 *         raise TypeError("Argument 'options' is not instance of type (expected List[ccuda.CUjit_option]")             # <<<<<<<<<<<<<<
 * 
 *     cdef CUmodule module = CUmodule()
 */
  __pyx_tuple__659 = PyTuple_Pack(1, __pyx_kp_u_Argument_options_is_not_instance); if (unlikely(!__pyx_tuple__659)) __PYX_ERR(0, 13857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__659);
  __Pyx_GIVEREF(__pyx_tuple__659);

  /* "cuda/cuda.pyx":18891
 *     mapInfoList = [] if mapInfoList is None else mapInfoList
 *     if not all(isinstance(_x, (CUarrayMapInfo)) for _x in mapInfoList):
 *         raise TypeError("Argument 'mapInfoList' is not instance of type (expected List[ccuda.CUarrayMapInfo]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUarrayMapInfo* cmapInfoList = NULL
 */
  __pyx_tuple__749 = PyTuple_Pack(1, __pyx_kp_u_Argument_mapInfoList_is_not_inst); if (unlikely(!__pyx_tuple__749)) __PYX_ERR(0, 18891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__749);
  __Pyx_GIVEREF(__pyx_tuple__749);

  /* "cuda/cuda.pyx":18986
 *     desc = [] if desc is None else desc
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in desc):
 *         raise TypeError("Argument 'desc' is not instance of type (expected List[ccuda.CUmemAccessDesc]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUdeviceptr cptr
 */
  __pyx_tuple__752 = PyTuple_Pack(1, __pyx_kp_u_Argument_desc_is_not_instance_of); if (unlikely(!__pyx_tuple__752)) __PYX_ERR(0, 18986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__752);
  __Pyx_GIVEREF(__pyx_tuple__752);

  /* "cuda/cuda.pyx":19570
 *     map = [] if map is None else map
 *     if not all(isinstance(_x, (CUmemAccessDesc)) for _x in map):
 *         raise TypeError("Argument 'map' is not instance of type (expected List[ccuda.CUmemAccessDesc]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUmemoryPool cpool
 */
  __pyx_tuple__765 = PyTuple_Pack(1, __pyx_kp_u_Argument_map_is_not_instance_of); if (unlikely(!__pyx_tuple__765)) __PYX_ERR(0, 19570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__765);
  __Pyx_GIVEREF(__pyx_tuple__765);

  /* "cuda/cuda.pyx":20612
 *     attributes = [] if attributes is None else attributes
 *     if not all(isinstance(_x, (CUmem_range_attribute)) for _x in attributes):
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUmem_range_attribute]")             # <<<<<<<<<<<<<<
 * 
 *     if not all(isinstance(_x, (int)) for _x in dataSizes):
 */
  __pyx_tuple__779 = PyTuple_Pack(1, __pyx_kp_u_Argument_attributes_is_not_insta); if (unlikely(!__pyx_tuple__779)) __PYX_ERR(0, 20612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__779);
  __Pyx_GIVEREF(__pyx_tuple__779);

  /* "cuda/cuda.pyx":20615
 * 
 *     if not all(isinstance(_x, (int)) for _x in dataSizes):
 *         raise TypeError("Argument 'dataSizes' is not instance of type (expected List[int]")             # <<<<<<<<<<<<<<
 * 
 *     pylist = [utils.HelperCUmem_range_attribute(pyattributes, pydataSizes) for (pyattributes, pydataSizes) in zip(attributes, dataSizes)]
 */
  __pyx_tuple__780 = PyTuple_Pack(1, __pyx_kp_u_Argument_dataSizes_is_not_instan); if (unlikely(!__pyx_tuple__780)) __PYX_ERR(0, 20615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__780);
  __Pyx_GIVEREF(__pyx_tuple__780);

  /* "cuda/cuda.pyx":20760
 *     attributes = [] if attributes is None else attributes
 *     if not all(isinstance(_x, (CUpointer_attribute)) for _x in attributes):
 *         raise TypeError("Argument 'attributes' is not instance of type (expected List[ccuda.CUpointer_attribute]")             # <<<<<<<<<<<<<<
 * 
 *     if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes))
 */
  __pyx_tuple__783 = PyTuple_Pack(1, __pyx_kp_u_Argument_attributes_is_not_insta_2); if (unlikely(!__pyx_tuple__783)) __PYX_ERR(0, 20760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__783);
  __Pyx_GIVEREF(__pyx_tuple__783);

  /* "cuda/cuda.pyx":21558
 *     dependencies = [] if dependencies is None else dependencies
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in dependencies):
 *         raise TypeError("Argument 'dependencies' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream chStream
 */
  __pyx_tuple__798 = PyTuple_Pack(1, __pyx_kp_u_Argument_dependencies_is_not_ins); if (unlikely(!__pyx_tuple__798)) __PYX_ERR(0, 21558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__798);
  __Pyx_GIVEREF(__pyx_tuple__798);

  /* "cuda/cuda.pyx":22862
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) for _x in paramsArray):
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS]")             # <<<<<<<<<<<<<<
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray
 */
  __pyx_tuple__819 = PyTuple_Pack(1, __pyx_kp_u_Argument_paramsArray_is_not_inst_2); if (unlikely(!__pyx_tuple__819)) __PYX_ERR(0, 22862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__819);
  __Pyx_GIVEREF(__pyx_tuple__819);

  /* "cuda/cuda.pyx":22866
 *     extSemArray = [] if extSemArray is None else extSemArray
 *     if not all(isinstance(_x, (CUexternalSemaphore)) for _x in extSemArray):
 *         raise TypeError("Argument 'extSemArray' is not instance of type (expected List[ccuda.CUexternalSemaphore]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUexternalSemaphore* cextSemArray = NULL
 */
  __pyx_tuple__820 = PyTuple_Pack(1, __pyx_kp_u_Argument_extSemArray_is_not_inst); if (unlikely(!__pyx_tuple__820)) __PYX_ERR(0, 22866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__820);
  __Pyx_GIVEREF(__pyx_tuple__820);

  /* "cuda/cuda.pyx":22990
 *     paramsArray = [] if paramsArray is None else paramsArray
 *     if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) for _x in paramsArray):
 *         raise TypeError("Argument 'paramsArray' is not instance of type (expected List[ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS]")             # <<<<<<<<<<<<<<
 * 
 *     extSemArray = [] if extSemArray is None else extSemArray
 */
  __pyx_tuple__822 = PyTuple_Pack(1, __pyx_kp_u_Argument_paramsArray_is_not_inst_3); if (unlikely(!__pyx_tuple__822)) __PYX_ERR(0, 22990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__822);
  __Pyx_GIVEREF(__pyx_tuple__822);

  /* "cuda/cuda.pyx":23398
 *     paramArray = [] if paramArray is None else paramArray
 *     if not all(isinstance(_x, (CUstreamBatchMemOpParams)) for _x in paramArray):
 *         raise TypeError("Argument 'paramArray' is not instance of type (expected List[ccuda.CUstreamBatchMemOpParams]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUstream cstream
 */
  __pyx_tuple__829 = PyTuple_Pack(1, __pyx_kp_u_Argument_paramArray_is_not_insta); if (unlikely(!__pyx_tuple__829)) __PYX_ERR(0, 23398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__829);
  __Pyx_GIVEREF(__pyx_tuple__829);

  /* "cuda/cuda.pyx":24685
 *     launchParamsList = [] if launchParamsList is None else launchParamsList
 *     if not all(isinstance(_x, (CUDA_LAUNCH_PARAMS)) for _x in launchParamsList):
 *         raise TypeError("Argument 'launchParamsList' is not instance of type (expected List[ccuda.CUDA_LAUNCH_PARAMS]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUDA_LAUNCH_PARAMS* claunchParamsList = NULL
 */
  __pyx_tuple__844 = PyTuple_Pack(1, __pyx_kp_u_Argument_launchParamsList_is_not); if (unlikely(!__pyx_tuple__844)) __PYX_ERR(0, 24685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__844);
  __Pyx_GIVEREF(__pyx_tuple__844);

  /* "cuda/cuda.pyx":27822
 *     to = [] if to is None else to
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in to):
 *         raise TypeError("Argument 'to' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     from_ = [] if from_ is None else from_
 */
  __pyx_tuple__904 = PyTuple_Pack(1, __pyx_kp_u_Argument_to_is_not_instance_of_t); if (unlikely(!__pyx_tuple__904)) __PYX_ERR(0, 27822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__904);
  __Pyx_GIVEREF(__pyx_tuple__904);

  /* "cuda/cuda.pyx":27826
 *     from_ = [] if from_ is None else from_
 *     if not all(isinstance(_x, (CUgraphNode)) for _x in from_):
 *         raise TypeError("Argument 'from_' is not instance of type (expected List[ccuda.CUgraphNode]")             # <<<<<<<<<<<<<<
 * 
 *     cdef ccuda.CUgraph chGraph
 */
  __pyx_tuple__905 = PyTuple_Pack(1, __pyx_kp_u_Argument_from__is_not_instance_o); if (unlikely(!__pyx_tuple__905)) __PYX_ERR(0, 27826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__905);
  __Pyx_GIVEREF(__pyx_tuple__905);

  /* "cuda/cuda.pyx":3706
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1016 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1016)) __PYX_ERR(0, 3706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1016);
  __Pyx_GIVEREF(__pyx_tuple__1016);
  __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1016, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 3706, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 3706, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1017 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1017)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1017);
  __Pyx_GIVEREF(__pyx_tuple__1017);
  __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1017, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1018 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1018)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1018);
  __Pyx_GIVEREF(__pyx_tuple__1018);
  __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1018, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":3734
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1019 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1019)) __PYX_ERR(0, 3734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1019);
  __Pyx_GIVEREF(__pyx_tuple__1019);
  __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1019, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 3734, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 3734, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1020 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1020)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1020);
  __Pyx_GIVEREF(__pyx_tuple__1020);
  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1020, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1021 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1021)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1021);
  __Pyx_GIVEREF(__pyx_tuple__1021);
  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1021, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":3762
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1022 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1022)) __PYX_ERR(0, 3762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1022);
  __Pyx_GIVEREF(__pyx_tuple__1022);
  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1022, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 3762, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 3762, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1023 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1023)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1023);
  __Pyx_GIVEREF(__pyx_tuple__1023);
  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1023, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1024 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1024)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1024);
  __Pyx_GIVEREF(__pyx_tuple__1024);
  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1024, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":3790
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1025 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1025)) __PYX_ERR(0, 3790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1025);
  __Pyx_GIVEREF(__pyx_tuple__1025);
  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1025, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 3790, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 3790, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1026 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1026)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1026);
  __Pyx_GIVEREF(__pyx_tuple__1026);
  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1026, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1027 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1027)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1027);
  __Pyx_GIVEREF(__pyx_tuple__1027);
  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1027, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":3818
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1028 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1028)) __PYX_ERR(0, 3818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1028);
  __Pyx_GIVEREF(__pyx_tuple__1028);
  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1028, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 3818, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 3818, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1029 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1029)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1029);
  __Pyx_GIVEREF(__pyx_tuple__1029);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1029, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1030 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1030)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1030);
  __Pyx_GIVEREF(__pyx_tuple__1030);
  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1030, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":3846
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1031 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1031)) __PYX_ERR(0, 3846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1031);
  __Pyx_GIVEREF(__pyx_tuple__1031);
  __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1031, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 3846, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 3846, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1032 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1032)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1032);
  __Pyx_GIVEREF(__pyx_tuple__1032);
  __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1032, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1033 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1033)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1033);
  __Pyx_GIVEREF(__pyx_tuple__1033);
  __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1033, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":3874
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1034 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1034)) __PYX_ERR(0, 3874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1034);
  __Pyx_GIVEREF(__pyx_tuple__1034);
  __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1034, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 3874, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 3874, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1035 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1035)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1035);
  __Pyx_GIVEREF(__pyx_tuple__1035);
  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1035, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1036 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1036)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1036);
  __Pyx_GIVEREF(__pyx_tuple__1036);
  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1036, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":3902
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1037 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1037)) __PYX_ERR(0, 3902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1037);
  __Pyx_GIVEREF(__pyx_tuple__1037);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1037, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 3902, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 3902, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1038 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1038)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1038);
  __Pyx_GIVEREF(__pyx_tuple__1038);
  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1038, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1039 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1039)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1039);
  __Pyx_GIVEREF(__pyx_tuple__1039);
  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1039, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":3930
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1040 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1040)) __PYX_ERR(0, 3930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1040);
  __Pyx_GIVEREF(__pyx_tuple__1040);
  __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1040, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 3930, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 3930, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1041 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1041)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1041);
  __Pyx_GIVEREF(__pyx_tuple__1041);
  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1041, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1042 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1042)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1042);
  __Pyx_GIVEREF(__pyx_tuple__1042);
  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1042, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":3958
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1043 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1043)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1043);
  __Pyx_GIVEREF(__pyx_tuple__1043);
  __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1043, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 3958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 3958, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1044 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1044)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1044);
  __Pyx_GIVEREF(__pyx_tuple__1044);
  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1044, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1045 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1045)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1045);
  __Pyx_GIVEREF(__pyx_tuple__1045);
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1045, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":3986
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1046 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1046)) __PYX_ERR(0, 3986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1046);
  __Pyx_GIVEREF(__pyx_tuple__1046);
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1046, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 3986, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 3986, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1047 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1047)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1047);
  __Pyx_GIVEREF(__pyx_tuple__1047);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1047, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1048 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1048)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1048);
  __Pyx_GIVEREF(__pyx_tuple__1048);
  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1048, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4014
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1049 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1049)) __PYX_ERR(0, 4014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1049);
  __Pyx_GIVEREF(__pyx_tuple__1049);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1049, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4014, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 4014, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1050 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1050)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1050);
  __Pyx_GIVEREF(__pyx_tuple__1050);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1050, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1051 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1051)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1051);
  __Pyx_GIVEREF(__pyx_tuple__1051);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1051, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4042
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1052 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1052)) __PYX_ERR(0, 4042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1052);
  __Pyx_GIVEREF(__pyx_tuple__1052);
  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1052, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4042, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 4042, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1053 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1053)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1053);
  __Pyx_GIVEREF(__pyx_tuple__1053);
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1053, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1054 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1054)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1054);
  __Pyx_GIVEREF(__pyx_tuple__1054);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1054, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4070
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1055 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1055)) __PYX_ERR(0, 4070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1055);
  __Pyx_GIVEREF(__pyx_tuple__1055);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1055, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4070, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 4070, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1056 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1056)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1056);
  __Pyx_GIVEREF(__pyx_tuple__1056);
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1056, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1057 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1057)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1057);
  __Pyx_GIVEREF(__pyx_tuple__1057);
  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1057, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4098
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1058 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1058)) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1058);
  __Pyx_GIVEREF(__pyx_tuple__1058);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1058, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4098, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 4098, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1059 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1059)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1059);
  __Pyx_GIVEREF(__pyx_tuple__1059);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1059, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1060 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1060)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1060);
  __Pyx_GIVEREF(__pyx_tuple__1060);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1060, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4126
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1061 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1061)) __PYX_ERR(0, 4126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1061);
  __Pyx_GIVEREF(__pyx_tuple__1061);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1061, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4126, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 4126, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1062 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1062)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1062);
  __Pyx_GIVEREF(__pyx_tuple__1062);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1062, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1063 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1063)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1063);
  __Pyx_GIVEREF(__pyx_tuple__1063);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1063, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4154
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1064 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1064)) __PYX_ERR(0, 4154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1064);
  __Pyx_GIVEREF(__pyx_tuple__1064);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1064, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 4154, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1065 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1065)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1065);
  __Pyx_GIVEREF(__pyx_tuple__1065);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1065, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1066 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1066)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1066);
  __Pyx_GIVEREF(__pyx_tuple__1066);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1066, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4180
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1067 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1067)) __PYX_ERR(0, 4180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1067);
  __Pyx_GIVEREF(__pyx_tuple__1067);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1067, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4180, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 4180, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1068 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1068)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1068);
  __Pyx_GIVEREF(__pyx_tuple__1068);
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1068, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1069 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1069)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1069);
  __Pyx_GIVEREF(__pyx_tuple__1069);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1069, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4206
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1070 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1070)) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1070);
  __Pyx_GIVEREF(__pyx_tuple__1070);
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1070, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4206, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 4206, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1071 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1071)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1071);
  __Pyx_GIVEREF(__pyx_tuple__1071);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1071, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1072 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1072)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1072);
  __Pyx_GIVEREF(__pyx_tuple__1072);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1072, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4232
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1073 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1073)) __PYX_ERR(0, 4232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1073);
  __Pyx_GIVEREF(__pyx_tuple__1073);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1073, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 4232, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1074 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1074)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1074);
  __Pyx_GIVEREF(__pyx_tuple__1074);
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1074, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1075 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1075)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1075);
  __Pyx_GIVEREF(__pyx_tuple__1075);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1075, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4258
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1076 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1076)) __PYX_ERR(0, 4258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1076);
  __Pyx_GIVEREF(__pyx_tuple__1076);
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1076, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 4258, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1077 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1077)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1077);
  __Pyx_GIVEREF(__pyx_tuple__1077);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1077, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1078 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1078)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1078);
  __Pyx_GIVEREF(__pyx_tuple__1078);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1078, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4286
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1079 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1079)) __PYX_ERR(0, 4286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1079);
  __Pyx_GIVEREF(__pyx_tuple__1079);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1079, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4286, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 4286, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1080 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1080)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1080);
  __Pyx_GIVEREF(__pyx_tuple__1080);
  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1080, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1081 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1081)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1081);
  __Pyx_GIVEREF(__pyx_tuple__1081);
  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1081, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4312
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1082 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1082)) __PYX_ERR(0, 4312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1082);
  __Pyx_GIVEREF(__pyx_tuple__1082);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1082, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 4312, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1083 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1083)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1083);
  __Pyx_GIVEREF(__pyx_tuple__1083);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1083, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1084 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1084)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1084);
  __Pyx_GIVEREF(__pyx_tuple__1084);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1084, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4338
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1085 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1085)) __PYX_ERR(0, 4338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1085);
  __Pyx_GIVEREF(__pyx_tuple__1085);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1085, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4338, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 4338, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1086 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1086)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1086);
  __Pyx_GIVEREF(__pyx_tuple__1086);
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1086, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1087 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1087)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1087);
  __Pyx_GIVEREF(__pyx_tuple__1087);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1087, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4364
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1088 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1088)) __PYX_ERR(0, 4364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1088);
  __Pyx_GIVEREF(__pyx_tuple__1088);
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1088, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 4364, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1089 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1089)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1089);
  __Pyx_GIVEREF(__pyx_tuple__1089);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1089, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1090 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1090)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1090);
  __Pyx_GIVEREF(__pyx_tuple__1090);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1090, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4390
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1091 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1091)) __PYX_ERR(0, 4390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1091);
  __Pyx_GIVEREF(__pyx_tuple__1091);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1091, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4390, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 4390, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1092 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1092)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1092);
  __Pyx_GIVEREF(__pyx_tuple__1092);
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1092, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1093 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1093)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1093);
  __Pyx_GIVEREF(__pyx_tuple__1093);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1093, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4428
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1094 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1094)) __PYX_ERR(0, 4428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1094);
  __Pyx_GIVEREF(__pyx_tuple__1094);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1094, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4428, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 4428, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1095 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1095)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1095);
  __Pyx_GIVEREF(__pyx_tuple__1095);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1095, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1096 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1096)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1096);
  __Pyx_GIVEREF(__pyx_tuple__1096);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1096, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4480
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1097 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1097)) __PYX_ERR(0, 4480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1097);
  __Pyx_GIVEREF(__pyx_tuple__1097);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1097, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4480, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 4480, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1098 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1098)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1098);
  __Pyx_GIVEREF(__pyx_tuple__1098);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1098, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1099 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1099)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1099);
  __Pyx_GIVEREF(__pyx_tuple__1099);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1099, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4536
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].waitValue.value64)
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.alias)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1100 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1100)) __PYX_ERR(0, 4536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1100);
  __Pyx_GIVEREF(__pyx_tuple__1100);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4536, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 4536, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1101 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1101)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1101);
  __Pyx_GIVEREF(__pyx_tuple__1101);
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1102 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1102)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1102);
  __Pyx_GIVEREF(__pyx_tuple__1102);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4638
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].writeValue.value64)
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.alias)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1103 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1103)) __PYX_ERR(0, 4638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1103);
  __Pyx_GIVEREF(__pyx_tuple__1103);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4638, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 4638, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1104 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1104)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1104);
  __Pyx_GIVEREF(__pyx_tuple__1104);
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1105 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1105)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1105);
  __Pyx_GIVEREF(__pyx_tuple__1105);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4732
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1106 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1106)) __PYX_ERR(0, 4732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1106);
  __Pyx_GIVEREF(__pyx_tuple__1106);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4732, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 4732, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1107 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1107)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1107);
  __Pyx_GIVEREF(__pyx_tuple__1107);
  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1108 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1108)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1108);
  __Pyx_GIVEREF(__pyx_tuple__1108);
  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4778
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1109 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1109)) __PYX_ERR(0, 4778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1109);
  __Pyx_GIVEREF(__pyx_tuple__1109);
  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4778, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 4778, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1110 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1110)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1110);
  __Pyx_GIVEREF(__pyx_tuple__1110);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1111 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1111)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1111);
  __Pyx_GIVEREF(__pyx_tuple__1111);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4841
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1112 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1112)) __PYX_ERR(0, 4841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1112);
  __Pyx_GIVEREF(__pyx_tuple__1112);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4841, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 4841, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1113 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1113)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1113);
  __Pyx_GIVEREF(__pyx_tuple__1113);
  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1114 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1114)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1114);
  __Pyx_GIVEREF(__pyx_tuple__1114);
  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":4945
 *         if self._paramArray is not NULL:
 *             free(self._paramArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1115 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1115)) __PYX_ERR(0, 4945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1115);
  __Pyx_GIVEREF(__pyx_tuple__1115);
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 4945, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 4945, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1116 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1116)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1116);
  __Pyx_GIVEREF(__pyx_tuple__1116);
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1117 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1117)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1117);
  __Pyx_GIVEREF(__pyx_tuple__1117);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":5050
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1118 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1118)) __PYX_ERR(0, 5050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1118);
  __Pyx_GIVEREF(__pyx_tuple__1118);
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 5050, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 5050, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1119 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1119)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1119);
  __Pyx_GIVEREF(__pyx_tuple__1119);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1120 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1120)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1120);
  __Pyx_GIVEREF(__pyx_tuple__1120);
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":5184
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1121 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1121)) __PYX_ERR(0, 5184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1121);
  __Pyx_GIVEREF(__pyx_tuple__1121);
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 5184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 5184, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1122 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1122)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1122);
  __Pyx_GIVEREF(__pyx_tuple__1122);
  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1123 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1123)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1123);
  __Pyx_GIVEREF(__pyx_tuple__1123);
  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":5276
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1124 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1124)) __PYX_ERR(0, 5276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1124);
  __Pyx_GIVEREF(__pyx_tuple__1124);
  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 5276, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 5276, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1125 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1125)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1125);
  __Pyx_GIVEREF(__pyx_tuple__1125);
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1126 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1126)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1126);
  __Pyx_GIVEREF(__pyx_tuple__1126);
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":5407
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1127 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1127)) __PYX_ERR(0, 5407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1127);
  __Pyx_GIVEREF(__pyx_tuple__1127);
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 5407, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 5407, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1128 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1128)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1128);
  __Pyx_GIVEREF(__pyx_tuple__1128);
  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1129 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1129)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1129);
  __Pyx_GIVEREF(__pyx_tuple__1129);
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":5499
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1130 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1130)) __PYX_ERR(0, 5499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1130);
  __Pyx_GIVEREF(__pyx_tuple__1130);
  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 5499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 5499, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1131 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1131)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1131);
  __Pyx_GIVEREF(__pyx_tuple__1131);
  __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1132 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1132)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1132);
  __Pyx_GIVEREF(__pyx_tuple__1132);
  __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":5555
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1133 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1133)) __PYX_ERR(0, 5555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1133);
  __Pyx_GIVEREF(__pyx_tuple__1133);
  __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 5555, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(0, 5555, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1134 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1134)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1134);
  __Pyx_GIVEREF(__pyx_tuple__1134);
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1135 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1135)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1135);
  __Pyx_GIVEREF(__pyx_tuple__1135);
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":5611
 *     def __init__(self, void_ptr _ptr):
 *         self._event = CUevent(_ptr=<void_ptr>&self._ptr[0].programmaticEvent.event)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1136 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1136)) __PYX_ERR(0, 5611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1136);
  __Pyx_GIVEREF(__pyx_tuple__1136);
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 5611, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 5611, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1137 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1137)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1137);
  __Pyx_GIVEREF(__pyx_tuple__1137);
  __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1138 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1138)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1138);
  __Pyx_GIVEREF(__pyx_tuple__1138);
  __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":5694
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1139 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1139)) __PYX_ERR(0, 5694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1139);
  __Pyx_GIVEREF(__pyx_tuple__1139);
  __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 5694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 5694, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1140 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1140)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1140);
  __Pyx_GIVEREF(__pyx_tuple__1140);
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1141 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1141)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1141);
  __Pyx_GIVEREF(__pyx_tuple__1141);
  __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":5814
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1142 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1142)) __PYX_ERR(0, 5814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1142);
  __Pyx_GIVEREF(__pyx_tuple__1142);
  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 5814, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 5814, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1143 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1143)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1143);
  __Pyx_GIVEREF(__pyx_tuple__1143);
  __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1144 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1144)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1144);
  __Pyx_GIVEREF(__pyx_tuple__1144);
  __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":5886
 *         if self._attrs is not NULL:
 *             free(self._attrs)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1145 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1145)) __PYX_ERR(0, 5886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1145);
  __Pyx_GIVEREF(__pyx_tuple__1145);
  __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 5886, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(0, 5886, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1146 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1146)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1146);
  __Pyx_GIVEREF(__pyx_tuple__1146);
  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1147 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1147)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1147);
  __Pyx_GIVEREF(__pyx_tuple__1147);
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":6021
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1148 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1148)) __PYX_ERR(0, 6021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1148);
  __Pyx_GIVEREF(__pyx_tuple__1148);
  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 6021, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(0, 6021, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1149 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1149)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1149);
  __Pyx_GIVEREF(__pyx_tuple__1149);
  __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1150 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1150)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1150);
  __Pyx_GIVEREF(__pyx_tuple__1150);
  __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":6057
 *     def __init__(self, void_ptr _ptr):
 *         self._smCount = CUexecAffinitySmCount(_ptr=<void_ptr>&self._ptr[0].param.smCount)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1151 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1151)) __PYX_ERR(0, 6057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1151);
  __Pyx_GIVEREF(__pyx_tuple__1151);
  __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 6057, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(0, 6057, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1152 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1152)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1152);
  __Pyx_GIVEREF(__pyx_tuple__1152);
  __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1153 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1153)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1153);
  __Pyx_GIVEREF(__pyx_tuple__1153);
  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":6105
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1154 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1154)) __PYX_ERR(0, 6105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1154);
  __Pyx_GIVEREF(__pyx_tuple__1154);
  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 6105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(0, 6105, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1155 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1155)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1155);
  __Pyx_GIVEREF(__pyx_tuple__1155);
  __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1156 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1156)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1156);
  __Pyx_GIVEREF(__pyx_tuple__1156);
  __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":6192
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1157 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1157)) __PYX_ERR(0, 6192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1157);
  __Pyx_GIVEREF(__pyx_tuple__1157);
  __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 6192, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) __PYX_ERR(0, 6192, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1158 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1158)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1158);
  __Pyx_GIVEREF(__pyx_tuple__1158);
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1159 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1159)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1159);
  __Pyx_GIVEREF(__pyx_tuple__1159);
  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":6438
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1160 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1160)) __PYX_ERR(0, 6438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1160);
  __Pyx_GIVEREF(__pyx_tuple__1160);
  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 6438, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 6438, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1161 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1161)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1161);
  __Pyx_GIVEREF(__pyx_tuple__1161);
  __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1162 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1162)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1162);
  __Pyx_GIVEREF(__pyx_tuple__1162);
  __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":6759
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1163 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1163)) __PYX_ERR(0, 6759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1163);
  __Pyx_GIVEREF(__pyx_tuple__1163);
  __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 6759, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(0, 6759, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1164 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1164)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1164);
  __Pyx_GIVEREF(__pyx_tuple__1164);
  __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1165 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1165)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1165);
  __Pyx_GIVEREF(__pyx_tuple__1165);
  __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7047
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1166 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1166)) __PYX_ERR(0, 7047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1166);
  __Pyx_GIVEREF(__pyx_tuple__1166);
  __pyx_codeobj__256 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7047, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__256)) __PYX_ERR(0, 7047, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1167 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1167)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1167);
  __Pyx_GIVEREF(__pyx_tuple__1167);
  __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1168 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1168)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1168);
  __Pyx_GIVEREF(__pyx_tuple__1168);
  __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7123
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1169 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1169)) __PYX_ERR(0, 7123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1169);
  __Pyx_GIVEREF(__pyx_tuple__1169);
  __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(0, 7123, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1170 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1170)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1170);
  __Pyx_GIVEREF(__pyx_tuple__1170);
  __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1171 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1171)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1171);
  __Pyx_GIVEREF(__pyx_tuple__1171);
  __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7203
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1172 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1172)) __PYX_ERR(0, 7203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1172);
  __Pyx_GIVEREF(__pyx_tuple__1172);
  __pyx_codeobj__266 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7203, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__266)) __PYX_ERR(0, 7203, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1173 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1173)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1173);
  __Pyx_GIVEREF(__pyx_tuple__1173);
  __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1174 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1174)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1174);
  __Pyx_GIVEREF(__pyx_tuple__1174);
  __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7270
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1175 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1175)) __PYX_ERR(0, 7270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1175);
  __Pyx_GIVEREF(__pyx_tuple__1175);
  __pyx_codeobj__271 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7270, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__271)) __PYX_ERR(0, 7270, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1176 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1176)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1176);
  __Pyx_GIVEREF(__pyx_tuple__1176);
  __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1177 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1177)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1177);
  __Pyx_GIVEREF(__pyx_tuple__1177);
  __pyx_codeobj__274 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__274)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7352
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1178 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1178)) __PYX_ERR(0, 7352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1178);
  __Pyx_GIVEREF(__pyx_tuple__1178);
  __pyx_codeobj__276 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__276)) __PYX_ERR(0, 7352, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1179 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1179)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1179);
  __Pyx_GIVEREF(__pyx_tuple__1179);
  __pyx_codeobj__277 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__277)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1180 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1180)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1180);
  __Pyx_GIVEREF(__pyx_tuple__1180);
  __pyx_codeobj__279 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__279)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7404
 *     def __init__(self, void_ptr _ptr):
 *         self._hArray = CUarray(_ptr=<void_ptr>&self._ptr[0].res.array.hArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1181 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1181)) __PYX_ERR(0, 7404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1181);
  __Pyx_GIVEREF(__pyx_tuple__1181);
  __pyx_codeobj__281 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__281)) __PYX_ERR(0, 7404, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1182 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1182)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1182);
  __Pyx_GIVEREF(__pyx_tuple__1182);
  __pyx_codeobj__282 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__282)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1183 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1183)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1183);
  __Pyx_GIVEREF(__pyx_tuple__1183);
  __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7448
 *     def __init__(self, void_ptr _ptr):
 *         self._hMipmappedArray = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].res.mipmap.hMipmappedArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1184 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1184)) __PYX_ERR(0, 7448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1184);
  __Pyx_GIVEREF(__pyx_tuple__1184);
  __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7448, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) __PYX_ERR(0, 7448, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1185 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1185)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1185);
  __Pyx_GIVEREF(__pyx_tuple__1185);
  __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1186 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1186)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1186);
  __Pyx_GIVEREF(__pyx_tuple__1186);
  __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7498
 *     def __init__(self, void_ptr _ptr):
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.linear.devPtr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1187 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1187)) __PYX_ERR(0, 7498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1187);
  __Pyx_GIVEREF(__pyx_tuple__1187);
  __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7498, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) __PYX_ERR(0, 7498, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1188 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1188)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1188);
  __Pyx_GIVEREF(__pyx_tuple__1188);
  __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1189 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1189)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1189);
  __Pyx_GIVEREF(__pyx_tuple__1189);
  __pyx_codeobj__294 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__294)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7576
 *     def __init__(self, void_ptr _ptr):
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.pitch2D.devPtr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1190 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1190)) __PYX_ERR(0, 7576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1190);
  __Pyx_GIVEREF(__pyx_tuple__1190);
  __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7576, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(0, 7576, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1191 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1191)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1191);
  __Pyx_GIVEREF(__pyx_tuple__1191);
  __pyx_codeobj__297 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__297)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1192 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1192)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1192);
  __Pyx_GIVEREF(__pyx_tuple__1192);
  __pyx_codeobj__299 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__299)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7660
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1193 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1193)) __PYX_ERR(0, 7660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1193);
  __Pyx_GIVEREF(__pyx_tuple__1193);
  __pyx_codeobj__301 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7660, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__301)) __PYX_ERR(0, 7660, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1194 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1194)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1194);
  __Pyx_GIVEREF(__pyx_tuple__1194);
  __pyx_codeobj__302 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__302)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1195 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1195)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1195);
  __Pyx_GIVEREF(__pyx_tuple__1195);
  __pyx_codeobj__304 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__304)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7708
 *         self._pitch2D = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(_ptr=<void_ptr>self._ptr)
 *         self._reserved = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1196 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1196)) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1196);
  __Pyx_GIVEREF(__pyx_tuple__1196);
  __pyx_codeobj__306 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7708, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__306)) __PYX_ERR(0, 7708, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1197 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1197)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1197);
  __Pyx_GIVEREF(__pyx_tuple__1197);
  __pyx_codeobj__307 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__307)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1198 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1198)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1198);
  __Pyx_GIVEREF(__pyx_tuple__1198);
  __pyx_codeobj__309 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__309)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7806
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1199 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1199)) __PYX_ERR(0, 7806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1199);
  __Pyx_GIVEREF(__pyx_tuple__1199);
  __pyx_codeobj__311 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7806, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__311)) __PYX_ERR(0, 7806, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1200 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1200)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1200);
  __Pyx_GIVEREF(__pyx_tuple__1200);
  __pyx_codeobj__312 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__312)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1201 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1201)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1201);
  __Pyx_GIVEREF(__pyx_tuple__1201);
  __pyx_codeobj__314 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__314)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":7886
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1202 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1202)) __PYX_ERR(0, 7886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1202);
  __Pyx_GIVEREF(__pyx_tuple__1202);
  __pyx_codeobj__316 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 7886, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__316)) __PYX_ERR(0, 7886, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1203 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1203)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1203);
  __Pyx_GIVEREF(__pyx_tuple__1203);
  __pyx_codeobj__317 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__317)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1204 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1204)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1204);
  __Pyx_GIVEREF(__pyx_tuple__1204);
  __pyx_codeobj__319 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__319)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8015
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1205 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1205)) __PYX_ERR(0, 8015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1205);
  __Pyx_GIVEREF(__pyx_tuple__1205);
  __pyx_codeobj__321 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8015, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__321)) __PYX_ERR(0, 8015, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1206 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1206)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1206);
  __Pyx_GIVEREF(__pyx_tuple__1206);
  __pyx_codeobj__322 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__322)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1207 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1207)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1207);
  __Pyx_GIVEREF(__pyx_tuple__1207);
  __pyx_codeobj__324 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__324)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8123
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1208 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1208)) __PYX_ERR(0, 8123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1208);
  __Pyx_GIVEREF(__pyx_tuple__1208);
  __pyx_codeobj__326 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__326)) __PYX_ERR(0, 8123, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1209 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1209)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1209);
  __Pyx_GIVEREF(__pyx_tuple__1209);
  __pyx_codeobj__327 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__327)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1210 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1210)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1210);
  __Pyx_GIVEREF(__pyx_tuple__1210);
  __pyx_codeobj__329 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__329)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8192
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1211 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1211)) __PYX_ERR(0, 8192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1211);
  __Pyx_GIVEREF(__pyx_tuple__1211);
  __pyx_codeobj__331 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8192, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__331)) __PYX_ERR(0, 8192, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1212 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1212)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1212);
  __Pyx_GIVEREF(__pyx_tuple__1212);
  __pyx_codeobj__332 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__332)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1213 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1213)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1213);
  __Pyx_GIVEREF(__pyx_tuple__1213);
  __pyx_codeobj__334 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__334)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8318
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1214 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1214)) __PYX_ERR(0, 8318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1214);
  __Pyx_GIVEREF(__pyx_tuple__1214);
  __pyx_codeobj__336 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__336)) __PYX_ERR(0, 8318, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1215 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1215)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1215);
  __Pyx_GIVEREF(__pyx_tuple__1215);
  __pyx_codeobj__337 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__337)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1216 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1216)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1216);
  __Pyx_GIVEREF(__pyx_tuple__1216);
  __pyx_codeobj__339 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__339)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8366
 *     def __init__(self, void_ptr _ptr):
 *         self._win32 = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1217 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1217)) __PYX_ERR(0, 8366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1217);
  __Pyx_GIVEREF(__pyx_tuple__1217);
  __pyx_codeobj__341 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__341)) __PYX_ERR(0, 8366, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1218 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1218)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1218);
  __Pyx_GIVEREF(__pyx_tuple__1218);
  __pyx_codeobj__342 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__342)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1219 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1219)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1219);
  __Pyx_GIVEREF(__pyx_tuple__1219);
  __pyx_codeobj__344 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__344)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8436
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1220 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1220)) __PYX_ERR(0, 8436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1220);
  __Pyx_GIVEREF(__pyx_tuple__1220);
  __pyx_codeobj__346 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__346)) __PYX_ERR(0, 8436, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1221 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1221)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1221);
  __Pyx_GIVEREF(__pyx_tuple__1221);
  __pyx_codeobj__347 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__347)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1222 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1222)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1222);
  __Pyx_GIVEREF(__pyx_tuple__1222);
  __pyx_codeobj__349 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__349)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8520
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1223 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1223)) __PYX_ERR(0, 8520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1223);
  __Pyx_GIVEREF(__pyx_tuple__1223);
  __pyx_codeobj__351 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8520, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__351)) __PYX_ERR(0, 8520, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1224 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1224)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1224);
  __Pyx_GIVEREF(__pyx_tuple__1224);
  __pyx_codeobj__352 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__352)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1225 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1225)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1225);
  __Pyx_GIVEREF(__pyx_tuple__1225);
  __pyx_codeobj__354 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__354)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8593
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1226 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1226)) __PYX_ERR(0, 8593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1226);
  __Pyx_GIVEREF(__pyx_tuple__1226);
  __pyx_codeobj__356 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8593, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__356)) __PYX_ERR(0, 8593, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1227 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1227)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1227);
  __Pyx_GIVEREF(__pyx_tuple__1227);
  __pyx_codeobj__357 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__357)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1228 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1228)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1228);
  __Pyx_GIVEREF(__pyx_tuple__1228);
  __pyx_codeobj__359 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__359)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8659
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1229 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1229)) __PYX_ERR(0, 8659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1229);
  __Pyx_GIVEREF(__pyx_tuple__1229);
  __pyx_codeobj__361 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8659, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__361)) __PYX_ERR(0, 8659, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1230 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1230)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1230);
  __Pyx_GIVEREF(__pyx_tuple__1230);
  __pyx_codeobj__362 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__362)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1231 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1231)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1231);
  __Pyx_GIVEREF(__pyx_tuple__1231);
  __pyx_codeobj__364 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__364)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8707
 *     def __init__(self, void_ptr _ptr):
 *         self._win32 = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1232 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1232)) __PYX_ERR(0, 8707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1232);
  __Pyx_GIVEREF(__pyx_tuple__1232);
  __pyx_codeobj__366 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8707, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__366)) __PYX_ERR(0, 8707, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1233 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1233)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1233);
  __Pyx_GIVEREF(__pyx_tuple__1233);
  __pyx_codeobj__367 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__367)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1234 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1234)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1234);
  __Pyx_GIVEREF(__pyx_tuple__1234);
  __pyx_codeobj__369 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__369)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8775
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1235 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1235)) __PYX_ERR(0, 8775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1235);
  __Pyx_GIVEREF(__pyx_tuple__1235);
  __pyx_codeobj__371 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8775, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__371)) __PYX_ERR(0, 8775, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1236 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1236)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1236);
  __Pyx_GIVEREF(__pyx_tuple__1236);
  __pyx_codeobj__372 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__372)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1237 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1237)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1237);
  __Pyx_GIVEREF(__pyx_tuple__1237);
  __pyx_codeobj__374 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__374)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8839
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1238 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1238)) __PYX_ERR(0, 8839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1238);
  __Pyx_GIVEREF(__pyx_tuple__1238);
  __pyx_codeobj__376 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8839, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__376)) __PYX_ERR(0, 8839, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1239 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1239)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1239);
  __Pyx_GIVEREF(__pyx_tuple__1239);
  __pyx_codeobj__377 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__377)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1240 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1240)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1240);
  __Pyx_GIVEREF(__pyx_tuple__1240);
  __pyx_codeobj__379 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__379)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8877
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1241 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1241)) __PYX_ERR(0, 8877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1241);
  __Pyx_GIVEREF(__pyx_tuple__1241);
  __pyx_codeobj__381 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8877, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__381)) __PYX_ERR(0, 8877, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1242 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1242)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1242);
  __Pyx_GIVEREF(__pyx_tuple__1242);
  __pyx_codeobj__382 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__382)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1243 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1243)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1243);
  __Pyx_GIVEREF(__pyx_tuple__1243);
  __pyx_codeobj__384 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__384)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8921
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1244 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1244)) __PYX_ERR(0, 8921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1244);
  __Pyx_GIVEREF(__pyx_tuple__1244);
  __pyx_codeobj__386 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8921, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__386)) __PYX_ERR(0, 8921, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1245 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1245)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1245);
  __Pyx_GIVEREF(__pyx_tuple__1245);
  __pyx_codeobj__387 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__387)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1246 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1246)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1246);
  __Pyx_GIVEREF(__pyx_tuple__1246);
  __pyx_codeobj__389 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__389)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":8965
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1247 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1247)) __PYX_ERR(0, 8965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1247);
  __Pyx_GIVEREF(__pyx_tuple__1247);
  __pyx_codeobj__391 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 8965, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__391)) __PYX_ERR(0, 8965, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1248 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1248)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1248);
  __Pyx_GIVEREF(__pyx_tuple__1248);
  __pyx_codeobj__392 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__392)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1249 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1249)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1249);
  __Pyx_GIVEREF(__pyx_tuple__1249);
  __pyx_codeobj__394 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__394)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9054
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1250 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1250)) __PYX_ERR(0, 9054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1250);
  __Pyx_GIVEREF(__pyx_tuple__1250);
  __pyx_codeobj__396 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9054, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__396)) __PYX_ERR(0, 9054, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1251 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1251)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1251);
  __Pyx_GIVEREF(__pyx_tuple__1251);
  __pyx_codeobj__397 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__397)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1252 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1252)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1252);
  __Pyx_GIVEREF(__pyx_tuple__1252);
  __pyx_codeobj__399 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__399)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9110
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1253 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1253)) __PYX_ERR(0, 9110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1253);
  __Pyx_GIVEREF(__pyx_tuple__1253);
  __pyx_codeobj__401 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__401)) __PYX_ERR(0, 9110, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1254 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1254)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1254);
  __Pyx_GIVEREF(__pyx_tuple__1254);
  __pyx_codeobj__402 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__402)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1255 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1255)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1255);
  __Pyx_GIVEREF(__pyx_tuple__1255);
  __pyx_codeobj__404 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__404)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9148
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1256 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1256)) __PYX_ERR(0, 9148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1256);
  __Pyx_GIVEREF(__pyx_tuple__1256);
  __pyx_codeobj__406 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__406)) __PYX_ERR(0, 9148, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1257 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1257)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1257);
  __Pyx_GIVEREF(__pyx_tuple__1257);
  __pyx_codeobj__407 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__407)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1258 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1258)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1258);
  __Pyx_GIVEREF(__pyx_tuple__1258);
  __pyx_codeobj__409 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__409)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9194
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1259 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1259)) __PYX_ERR(0, 9194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1259);
  __Pyx_GIVEREF(__pyx_tuple__1259);
  __pyx_codeobj__411 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9194, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__411)) __PYX_ERR(0, 9194, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1260 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1260)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1260);
  __Pyx_GIVEREF(__pyx_tuple__1260);
  __pyx_codeobj__412 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__412)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1261 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1261)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1261);
  __Pyx_GIVEREF(__pyx_tuple__1261);
  __pyx_codeobj__414 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__414)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9246
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1262 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1262)) __PYX_ERR(0, 9246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1262);
  __Pyx_GIVEREF(__pyx_tuple__1262);
  __pyx_codeobj__416 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9246, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__416)) __PYX_ERR(0, 9246, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1263 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1263)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1263);
  __Pyx_GIVEREF(__pyx_tuple__1263);
  __pyx_codeobj__417 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__417)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1264 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1264)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1264);
  __Pyx_GIVEREF(__pyx_tuple__1264);
  __pyx_codeobj__419 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__419)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9335
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1265 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1265)) __PYX_ERR(0, 9335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1265);
  __Pyx_GIVEREF(__pyx_tuple__1265);
  __pyx_codeobj__421 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__421)) __PYX_ERR(0, 9335, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1266 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1266)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1266);
  __Pyx_GIVEREF(__pyx_tuple__1266);
  __pyx_codeobj__422 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__422)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1267 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1267)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1267);
  __Pyx_GIVEREF(__pyx_tuple__1267);
  __pyx_codeobj__424 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__424)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9405
 *         if self._paramsArray is not NULL:
 *             free(self._paramsArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1268 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1268)) __PYX_ERR(0, 9405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1268);
  __Pyx_GIVEREF(__pyx_tuple__1268);
  __pyx_codeobj__426 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9405, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__426)) __PYX_ERR(0, 9405, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1269 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1269)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1269);
  __Pyx_GIVEREF(__pyx_tuple__1269);
  __pyx_codeobj__427 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__427)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1270 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1270)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1270);
  __Pyx_GIVEREF(__pyx_tuple__1270);
  __pyx_codeobj__429 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__429)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9497
 *         if self._paramsArray is not NULL:
 *             free(self._paramsArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1271 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1271)) __PYX_ERR(0, 9497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1271);
  __Pyx_GIVEREF(__pyx_tuple__1271);
  __pyx_codeobj__431 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9497, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__431)) __PYX_ERR(0, 9497, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1272 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1272)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1272);
  __Pyx_GIVEREF(__pyx_tuple__1272);
  __pyx_codeobj__432 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1272, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__432)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1273 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1273)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1273);
  __Pyx_GIVEREF(__pyx_tuple__1273);
  __pyx_codeobj__434 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__434)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9578
 *         self._mipmap = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].resource.mipmap)
 *         self._array = CUarray(_ptr=<void_ptr>&self._ptr[0].resource.array)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1274 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1274)) __PYX_ERR(0, 9578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1274);
  __Pyx_GIVEREF(__pyx_tuple__1274);
  __pyx_codeobj__436 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__436)) __PYX_ERR(0, 9578, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1275 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1275)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1275);
  __Pyx_GIVEREF(__pyx_tuple__1275);
  __pyx_codeobj__437 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__437)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1276 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1276)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1276);
  __Pyx_GIVEREF(__pyx_tuple__1276);
  __pyx_codeobj__439 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__439)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9652
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1277 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1277)) __PYX_ERR(0, 9652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1277);
  __Pyx_GIVEREF(__pyx_tuple__1277);
  __pyx_codeobj__441 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9652, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__441)) __PYX_ERR(0, 9652, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1278 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1278)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1278);
  __Pyx_GIVEREF(__pyx_tuple__1278);
  __pyx_codeobj__442 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1278, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__442)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1279 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1279)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1279);
  __Pyx_GIVEREF(__pyx_tuple__1279);
  __pyx_codeobj__444 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__444)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9748
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1280 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1280)) __PYX_ERR(0, 9748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1280);
  __Pyx_GIVEREF(__pyx_tuple__1280);
  __pyx_codeobj__446 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9748, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__446)) __PYX_ERR(0, 9748, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1281 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1281)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1281);
  __Pyx_GIVEREF(__pyx_tuple__1281);
  __pyx_codeobj__447 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1281, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__447)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1282 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1282)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1282);
  __Pyx_GIVEREF(__pyx_tuple__1282);
  __pyx_codeobj__449 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__449)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9803
 *         self._sparseLevel = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(_ptr=<void_ptr>self._ptr)
 *         self._miptail = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1283 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1283)) __PYX_ERR(0, 9803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1283);
  __Pyx_GIVEREF(__pyx_tuple__1283);
  __pyx_codeobj__451 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9803, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__451)) __PYX_ERR(0, 9803, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1284 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1284)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1284);
  __Pyx_GIVEREF(__pyx_tuple__1284);
  __pyx_codeobj__452 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__452)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1285 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1285)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1285);
  __Pyx_GIVEREF(__pyx_tuple__1285);
  __pyx_codeobj__454 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__454)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9855
 *     def __init__(self, void_ptr _ptr):
 *         self._memHandle = CUmemGenericAllocationHandle(_ptr=<void_ptr>&self._ptr[0].memHandle.memHandle)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1286 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1286)) __PYX_ERR(0, 9855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1286);
  __Pyx_GIVEREF(__pyx_tuple__1286);
  __pyx_codeobj__456 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9855, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__456)) __PYX_ERR(0, 9855, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1287 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1287)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1287);
  __Pyx_GIVEREF(__pyx_tuple__1287);
  __pyx_codeobj__457 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1287, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__457)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1288 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1288)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1288);
  __Pyx_GIVEREF(__pyx_tuple__1288);
  __pyx_codeobj__459 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__459)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":9928
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1289 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1289)) __PYX_ERR(0, 9928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1289);
  __Pyx_GIVEREF(__pyx_tuple__1289);
  __pyx_codeobj__461 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 9928, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__461)) __PYX_ERR(0, 9928, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1290 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1290)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1290);
  __Pyx_GIVEREF(__pyx_tuple__1290);
  __pyx_codeobj__462 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__462)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1291 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1291)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1291);
  __Pyx_GIVEREF(__pyx_tuple__1291);
  __pyx_codeobj__464 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__464)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10064
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1292 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1292)) __PYX_ERR(0, 10064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1292);
  __Pyx_GIVEREF(__pyx_tuple__1292);
  __pyx_codeobj__466 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10064, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__466)) __PYX_ERR(0, 10064, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1293 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1293)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1293);
  __Pyx_GIVEREF(__pyx_tuple__1293);
  __pyx_codeobj__467 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__467)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1294 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1294)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1294);
  __Pyx_GIVEREF(__pyx_tuple__1294);
  __pyx_codeobj__469 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__469)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10114
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1295 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1295)) __PYX_ERR(0, 10114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1295);
  __Pyx_GIVEREF(__pyx_tuple__1295);
  __pyx_codeobj__471 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1295, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__471)) __PYX_ERR(0, 10114, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1296 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1296)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1296);
  __Pyx_GIVEREF(__pyx_tuple__1296);
  __pyx_codeobj__472 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__472)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1297 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1297)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1297);
  __Pyx_GIVEREF(__pyx_tuple__1297);
  __pyx_codeobj__474 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__474)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10195
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1298 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1298)) __PYX_ERR(0, 10195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1298);
  __Pyx_GIVEREF(__pyx_tuple__1298);
  __pyx_codeobj__476 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10195, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__476)) __PYX_ERR(0, 10195, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1299 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1299)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1299);
  __Pyx_GIVEREF(__pyx_tuple__1299);
  __pyx_codeobj__477 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__477)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1300 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1300)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1300);
  __Pyx_GIVEREF(__pyx_tuple__1300);
  __pyx_codeobj__479 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1300, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__479)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10279
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1301 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1301)) __PYX_ERR(0, 10279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1301);
  __Pyx_GIVEREF(__pyx_tuple__1301);
  __pyx_codeobj__481 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__481)) __PYX_ERR(0, 10279, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1302 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1302)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1302);
  __Pyx_GIVEREF(__pyx_tuple__1302);
  __pyx_codeobj__482 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1302, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__482)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1303 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1303)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1303);
  __Pyx_GIVEREF(__pyx_tuple__1303);
  __pyx_codeobj__484 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1303, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__484)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10346
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1304 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1304)) __PYX_ERR(0, 10346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1304);
  __Pyx_GIVEREF(__pyx_tuple__1304);
  __pyx_codeobj__486 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1304, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__486)) __PYX_ERR(0, 10346, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1305 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1305)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1305);
  __Pyx_GIVEREF(__pyx_tuple__1305);
  __pyx_codeobj__487 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__487)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1306 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1306)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1306);
  __Pyx_GIVEREF(__pyx_tuple__1306);
  __pyx_codeobj__489 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1306, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__489)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10426
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1307 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1307)) __PYX_ERR(0, 10426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1307);
  __Pyx_GIVEREF(__pyx_tuple__1307);
  __pyx_codeobj__491 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1307, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10426, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__491)) __PYX_ERR(0, 10426, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1308 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1308)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1308);
  __Pyx_GIVEREF(__pyx_tuple__1308);
  __pyx_codeobj__492 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1308, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__492)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1309 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1309)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1309);
  __Pyx_GIVEREF(__pyx_tuple__1309);
  __pyx_codeobj__494 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__494)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10484
 *         if self._accessDescs is not NULL:
 *             free(self._accessDescs)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1310 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1310)) __PYX_ERR(0, 10484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1310);
  __Pyx_GIVEREF(__pyx_tuple__1310);
  __pyx_codeobj__496 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1310, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__496)) __PYX_ERR(0, 10484, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1311 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1311)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1311);
  __Pyx_GIVEREF(__pyx_tuple__1311);
  __pyx_codeobj__497 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1311, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__497)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1312 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1312)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1312);
  __Pyx_GIVEREF(__pyx_tuple__1312);
  __pyx_codeobj__499 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1312, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__499)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10579
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1313 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1313)) __PYX_ERR(0, 10579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1313);
  __Pyx_GIVEREF(__pyx_tuple__1313);
  __pyx_codeobj__501 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1313, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__501)) __PYX_ERR(0, 10579, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1314 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1314)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1314);
  __Pyx_GIVEREF(__pyx_tuple__1314);
  __pyx_codeobj__502 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1314, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__502)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1315 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1315)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1315);
  __Pyx_GIVEREF(__pyx_tuple__1315);
  __pyx_codeobj__504 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1315, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__504)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10655
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_tuple__1316 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1316)) __PYX_ERR(0, 10655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1316);
  __Pyx_GIVEREF(__pyx_tuple__1316);
  __pyx_codeobj__506 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1316, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10655, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__506)) __PYX_ERR(0, 10655, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1317 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1317)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1317);
  __Pyx_GIVEREF(__pyx_tuple__1317);
  __pyx_codeobj__507 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1317, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__507)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1318 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1318)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1318);
  __Pyx_GIVEREF(__pyx_tuple__1318);
  __pyx_codeobj__509 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1318, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__509)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10771
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1319 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1319)) __PYX_ERR(0, 10771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1319);
  __Pyx_GIVEREF(__pyx_tuple__1319);
  __pyx_codeobj__511 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1319, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10771, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__511)) __PYX_ERR(0, 10771, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1320 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1320)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1320);
  __Pyx_GIVEREF(__pyx_tuple__1320);
  __pyx_codeobj__512 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1320, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__512)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1321 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1321)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1321);
  __Pyx_GIVEREF(__pyx_tuple__1321);
  __pyx_codeobj__514 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1321, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__514)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10796
 *     def __int__(self):
 *         return <uint64_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1322 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1322)) __PYX_ERR(0, 10796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1322);
  __Pyx_GIVEREF(__pyx_tuple__1322);
  __pyx_codeobj__516 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1322, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10796, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__516)) __PYX_ERR(0, 10796, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1323 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1323)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1323);
  __Pyx_GIVEREF(__pyx_tuple__1323);
  __pyx_codeobj__517 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1323, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__517)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1324 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1324)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1324);
  __Pyx_GIVEREF(__pyx_tuple__1324);
  __pyx_codeobj__519 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1324, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__519)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10823
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1325 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1325)) __PYX_ERR(0, 10823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1325);
  __Pyx_GIVEREF(__pyx_tuple__1325);
  __pyx_codeobj__521 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1325, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10823, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__521)) __PYX_ERR(0, 10823, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1326 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1326)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1326);
  __Pyx_GIVEREF(__pyx_tuple__1326);
  __pyx_codeobj__522 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__522)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1327 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1327)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1327);
  __Pyx_GIVEREF(__pyx_tuple__1327);
  __pyx_codeobj__524 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__524)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10850
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1328 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1328)) __PYX_ERR(0, 10850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1328);
  __Pyx_GIVEREF(__pyx_tuple__1328);
  __pyx_codeobj__526 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1328, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10850, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__526)) __PYX_ERR(0, 10850, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1329 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1329)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1329);
  __Pyx_GIVEREF(__pyx_tuple__1329);
  __pyx_codeobj__527 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__527)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1330 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1330)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1330);
  __Pyx_GIVEREF(__pyx_tuple__1330);
  __pyx_codeobj__529 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1330, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__529)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10877
 *     def __int__(self):
 *         return <int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1331 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1331)) __PYX_ERR(0, 10877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1331);
  __Pyx_GIVEREF(__pyx_tuple__1331);
  __pyx_codeobj__531 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1331, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10877, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__531)) __PYX_ERR(0, 10877, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1332 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1332)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1332);
  __Pyx_GIVEREF(__pyx_tuple__1332);
  __pyx_codeobj__532 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1332, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__532)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1333 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1333)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1333);
  __Pyx_GIVEREF(__pyx_tuple__1333);
  __pyx_codeobj__534 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1333, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__534)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10904
 *     def __int__(self):
 *         return <int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1334 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1334)) __PYX_ERR(0, 10904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1334);
  __Pyx_GIVEREF(__pyx_tuple__1334);
  __pyx_codeobj__536 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1334, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10904, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__536)) __PYX_ERR(0, 10904, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1335 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1335)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1335);
  __Pyx_GIVEREF(__pyx_tuple__1335);
  __pyx_codeobj__537 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1335, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__537)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1336 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1336)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1336);
  __Pyx_GIVEREF(__pyx_tuple__1336);
  __pyx_codeobj__539 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1336, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__539)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10931
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1337 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1337)) __PYX_ERR(0, 10931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1337);
  __Pyx_GIVEREF(__pyx_tuple__1337);
  __pyx_codeobj__541 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1337, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10931, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__541)) __PYX_ERR(0, 10931, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1338 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1338)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1338);
  __Pyx_GIVEREF(__pyx_tuple__1338);
  __pyx_codeobj__542 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1338, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__542)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1339 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1339)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1339);
  __Pyx_GIVEREF(__pyx_tuple__1339);
  __pyx_codeobj__544 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1339, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__544)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10958
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1340 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1340)) __PYX_ERR(0, 10958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1340);
  __Pyx_GIVEREF(__pyx_tuple__1340);
  __pyx_codeobj__546 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1340, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__546)) __PYX_ERR(0, 10958, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1341 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1341)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1341);
  __Pyx_GIVEREF(__pyx_tuple__1341);
  __pyx_codeobj__547 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1341, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__547)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1342 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1342)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1342);
  __Pyx_GIVEREF(__pyx_tuple__1342);
  __pyx_codeobj__549 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1342, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__549)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":10985
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1343 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1343)) __PYX_ERR(0, 10985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1343);
  __Pyx_GIVEREF(__pyx_tuple__1343);
  __pyx_codeobj__551 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1343, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 10985, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__551)) __PYX_ERR(0, 10985, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1344 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1344)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1344);
  __Pyx_GIVEREF(__pyx_tuple__1344);
  __pyx_codeobj__552 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1344, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__552)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1345 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1345)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1345);
  __Pyx_GIVEREF(__pyx_tuple__1345);
  __pyx_codeobj__554 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__554)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":11012
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1346 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1346)) __PYX_ERR(0, 11012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1346);
  __Pyx_GIVEREF(__pyx_tuple__1346);
  __pyx_codeobj__556 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1346, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 11012, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__556)) __PYX_ERR(0, 11012, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1347 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1347)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1347);
  __Pyx_GIVEREF(__pyx_tuple__1347);
  __pyx_codeobj__557 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1347, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__557)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1348 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1348)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1348);
  __Pyx_GIVEREF(__pyx_tuple__1348);
  __pyx_codeobj__559 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1348, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__559)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":11037
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1349 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1349)) __PYX_ERR(0, 11037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1349);
  __Pyx_GIVEREF(__pyx_tuple__1349);
  __pyx_codeobj__561 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1349, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 11037, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__561)) __PYX_ERR(0, 11037, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1350 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1350)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1350);
  __Pyx_GIVEREF(__pyx_tuple__1350);
  __pyx_codeobj__562 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1350, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__562)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1351 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1351)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1351);
  __Pyx_GIVEREF(__pyx_tuple__1351);
  __pyx_codeobj__564 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1351, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__564)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":11062
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1352 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1352)) __PYX_ERR(0, 11062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1352);
  __Pyx_GIVEREF(__pyx_tuple__1352);
  __pyx_codeobj__566 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 11062, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__566)) __PYX_ERR(0, 11062, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1353 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1353)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1353);
  __Pyx_GIVEREF(__pyx_tuple__1353);
  __pyx_codeobj__567 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1353, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__567)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1354 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1354)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1354);
  __Pyx_GIVEREF(__pyx_tuple__1354);
  __pyx_codeobj__569 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__569)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":11087
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1355 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1355)) __PYX_ERR(0, 11087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1355);
  __Pyx_GIVEREF(__pyx_tuple__1355);
  __pyx_codeobj__571 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1355, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 11087, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__571)) __PYX_ERR(0, 11087, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1356 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1356)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1356);
  __Pyx_GIVEREF(__pyx_tuple__1356);
  __pyx_codeobj__572 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1356, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__572)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1357 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1357)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1357);
  __Pyx_GIVEREF(__pyx_tuple__1357);
  __pyx_codeobj__574 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1357, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__574)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":11112
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1358 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1358)) __PYX_ERR(0, 11112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1358);
  __Pyx_GIVEREF(__pyx_tuple__1358);
  __pyx_codeobj__576 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1358, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 11112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__576)) __PYX_ERR(0, 11112, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1359 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1359)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1359);
  __Pyx_GIVEREF(__pyx_tuple__1359);
  __pyx_codeobj__577 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1359, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__577)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1360 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1360)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1360);
  __Pyx_GIVEREF(__pyx_tuple__1360);
  __pyx_codeobj__579 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1360, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__579)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":11137
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1361 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1361)) __PYX_ERR(0, 11137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1361);
  __Pyx_GIVEREF(__pyx_tuple__1361);
  __pyx_codeobj__581 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1361, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 11137, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__581)) __PYX_ERR(0, 11137, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1362 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1362)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1362);
  __Pyx_GIVEREF(__pyx_tuple__1362);
  __pyx_codeobj__582 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1362, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__582)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1363 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1363)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1363);
  __Pyx_GIVEREF(__pyx_tuple__1363);
  __pyx_codeobj__584 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1363, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__584)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":11162
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1364 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1364)) __PYX_ERR(0, 11162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1364);
  __Pyx_GIVEREF(__pyx_tuple__1364);
  __pyx_codeobj__586 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1364, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 11162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__586)) __PYX_ERR(0, 11162, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1365 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1365)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1365);
  __Pyx_GIVEREF(__pyx_tuple__1365);
  __pyx_codeobj__587 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1365, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__587)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1366 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1366)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1366);
  __Pyx_GIVEREF(__pyx_tuple__1366);
  __pyx_codeobj__589 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1366, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__589)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":11187
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1367 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1367)) __PYX_ERR(0, 11187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1367);
  __Pyx_GIVEREF(__pyx_tuple__1367);
  __pyx_codeobj__591 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 11187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__591)) __PYX_ERR(0, 11187, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1368 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1368)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1368);
  __Pyx_GIVEREF(__pyx_tuple__1368);
  __pyx_codeobj__592 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1368, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__592)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1369 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1369)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1369);
  __Pyx_GIVEREF(__pyx_tuple__1369);
  __pyx_codeobj__594 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1369, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__594)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":11212
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1370 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1370)) __PYX_ERR(0, 11212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1370);
  __Pyx_GIVEREF(__pyx_tuple__1370);
  __pyx_codeobj__596 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1370, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 11212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__596)) __PYX_ERR(0, 11212, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1371 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1371)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1371);
  __Pyx_GIVEREF(__pyx_tuple__1371);
  __pyx_codeobj__597 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1371, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__597)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1372 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1372)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1372);
  __Pyx_GIVEREF(__pyx_tuple__1372);
  __pyx_codeobj__599 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1372, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__599)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":11237
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_tuple__1373 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1373)) __PYX_ERR(0, 11237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1373);
  __Pyx_GIVEREF(__pyx_tuple__1373);
  __pyx_codeobj__601 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_getPtr, 11237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__601)) __PYX_ERR(0, 11237, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_tuple__1374 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__1374)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1374);
  __Pyx_GIVEREF(__pyx_tuple__1374);
  __pyx_codeobj__602 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1374, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__602)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__1375 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__1375)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1375);
  __Pyx_GIVEREF(__pyx_tuple__1375);
  __pyx_codeobj__604 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1375, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__604)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "cuda/cuda.pyx":11241
 * 
 * @cython.embedsignature(True)
 * def cuGetErrorString(error not None : CUresult):             # <<<<<<<<<<<<<<
 *     """ Gets the string description of an error code.
 * 
 */
  __pyx_tuple__1376 = PyTuple_Pack(4, __pyx_n_s_error, __pyx_n_s_cerror, __pyx_n_s_pStr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1376)) __PYX_ERR(0, 11241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1376);
  __Pyx_GIVEREF(__pyx_tuple__1376);
  __pyx_codeobj__606 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGetErrorString, 11241, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__606)) __PYX_ERR(0, 11241, __pyx_L1_error)

  /* "cuda/cuda.pyx":11271
 * 
 * @cython.embedsignature(True)
 * def cuGetErrorName(error not None : CUresult):             # <<<<<<<<<<<<<<
 *     """ Gets the string representation of an error code enum name.
 * 
 */
  __pyx_tuple__1377 = PyTuple_Pack(4, __pyx_n_s_error, __pyx_n_s_cerror, __pyx_n_s_pStr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1377)) __PYX_ERR(0, 11271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1377);
  __Pyx_GIVEREF(__pyx_tuple__1377);
  __pyx_codeobj__607 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1377, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGetErrorName, 11271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__607)) __PYX_ERR(0, 11271, __pyx_L1_error)

  /* "cuda/cuda.pyx":11301
 * 
 * @cython.embedsignature(True)
 * def cuInit(unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Initialize the CUDA driver API.
 * 
 */
  __pyx_tuple__1378 = PyTuple_Pack(3, __pyx_n_s_Flags_2, __pyx_n_s_Flags_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1378)) __PYX_ERR(0, 11301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1378);
  __Pyx_GIVEREF(__pyx_tuple__1378);
  __pyx_codeobj__608 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1378, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuInit, 11301, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__608)) __PYX_ERR(0, 11301, __pyx_L1_error)

  /* "cuda/cuda.pyx":11323
 * 
 * @cython.embedsignature(True)
 * def cuDriverGetVersion():             # <<<<<<<<<<<<<<
 *     """ Returns the latest CUDA version supported by driver.
 * 
 */
  __pyx_tuple__1379 = PyTuple_Pack(2, __pyx_n_s_driverVersion, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1379)) __PYX_ERR(0, 11323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1379);
  __Pyx_GIVEREF(__pyx_tuple__1379);
  __pyx_codeobj__609 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1379, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDriverGetVersion, 11323, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__609)) __PYX_ERR(0, 11323, __pyx_L1_error)

  /* "cuda/cuda.pyx":11349
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGet(int ordinal):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a compute device.
 * 
 */
  __pyx_tuple__1380 = PyTuple_Pack(4, __pyx_n_s_ordinal, __pyx_n_s_ordinal, __pyx_n_s_device, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1380)) __PYX_ERR(0, 11349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1380);
  __Pyx_GIVEREF(__pyx_tuple__1380);
  __pyx_codeobj__610 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1380, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGet, 11349, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__610)) __PYX_ERR(0, 11349, __pyx_L1_error)

  /* "cuda/cuda.pyx":11376
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetCount():             # <<<<<<<<<<<<<<
 *     """ Returns the number of compute-capable devices.
 * 
 */
  __pyx_tuple__1381 = PyTuple_Pack(2, __pyx_n_s_count_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1381)) __PYX_ERR(0, 11376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1381);
  __Pyx_GIVEREF(__pyx_tuple__1381);
  __pyx_codeobj__611 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1381, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetCount, 11376, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__611)) __PYX_ERR(0, 11376, __pyx_L1_error)

  /* "cuda/cuda.pyx":11399
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetName(int length, dev):             # <<<<<<<<<<<<<<
 *     """ Returns an identifer string for the device.
 * 
 */
  __pyx_tuple__1382 = PyTuple_Pack(7, __pyx_n_s_length, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_pyname, __pyx_n_s_name_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1382)) __PYX_ERR(0, 11399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1382);
  __Pyx_GIVEREF(__pyx_tuple__1382);
  __pyx_codeobj__612 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1382, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetName, 11399, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__612)) __PYX_ERR(0, 11399, __pyx_L1_error)

  /* "cuda/cuda.pyx":11440
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetUuid(dev):             # <<<<<<<<<<<<<<
 *     """ Return an UUID for the device.
 * 
 */
  __pyx_tuple__1383 = PyTuple_Pack(5, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_uuid, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1383)) __PYX_ERR(0, 11440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1383);
  __Pyx_GIVEREF(__pyx_tuple__1383);
  __pyx_codeobj__614 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1383, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetUuid, 11440, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__614)) __PYX_ERR(0, 11440, __pyx_L1_error)

  /* "cuda/cuda.pyx":11481
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetUuid_v2(dev):             # <<<<<<<<<<<<<<
 *     """ Return an UUID for the device (11.4+)
 * 
 */
  __pyx_tuple__1384 = PyTuple_Pack(5, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_uuid, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1384)) __PYX_ERR(0, 11481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1384);
  __Pyx_GIVEREF(__pyx_tuple__1384);
  __pyx_codeobj__615 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1384, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetUuid_v2, 11481, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__615)) __PYX_ERR(0, 11481, __pyx_L1_error)

  /* "cuda/cuda.pyx":11519
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetLuid(dev):             # <<<<<<<<<<<<<<
 *     """ Return an LUID and device node mask for the device.
 * 
 */
  __pyx_tuple__1385 = PyTuple_Pack(6, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_luid, __pyx_n_s_deviceNodeMask, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1385)) __PYX_ERR(0, 11519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1385);
  __Pyx_GIVEREF(__pyx_tuple__1385);
  __pyx_codeobj__616 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1385, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetLuid, 11519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__616)) __PYX_ERR(0, 11519, __pyx_L1_error)

  /* "cuda/cuda.pyx":11559
 * 
 * @cython.embedsignature(True)
 * def cuDeviceTotalMem(dev):             # <<<<<<<<<<<<<<
 *     """ Returns the total amount of memory on the device.
 * 
 */
  __pyx_tuple__1386 = PyTuple_Pack(5, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_numbytes, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1386)) __PYX_ERR(0, 11559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1386);
  __Pyx_GIVEREF(__pyx_tuple__1386);
  __pyx_codeobj__617 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1386, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceTotalMem, 11559, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__617)) __PYX_ERR(0, 11559, __pyx_L1_error)

  /* "cuda/cuda.pyx":11596
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetTexture1DLinearMaxWidth(pformat not None : CUarray_format, unsigned numChannels, dev):             # <<<<<<<<<<<<<<
 *     """ Returns the maximum number of elements allocatable in a 1D linear texture for a given texture element size.
 * 
 */
  __pyx_tuple__1387 = PyTuple_Pack(8, __pyx_n_s_pformat, __pyx_n_s_numChannels_2, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_maxWidthInElements, __pyx_n_s_cpformat, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1387)) __PYX_ERR(0, 11596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1387);
  __Pyx_GIVEREF(__pyx_tuple__1387);
  __pyx_codeobj__618 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1387, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetTexture1DLinearMaxWid, 11596, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__618)) __PYX_ERR(0, 11596, __pyx_L1_error)

  /* "cuda/cuda.pyx":11640
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetAttribute(attrib not None : CUdevice_attribute, dev):             # <<<<<<<<<<<<<<
 *     """ Returns information about the device.
 * 
 */
  __pyx_tuple__1388 = PyTuple_Pack(7, __pyx_n_s_attrib, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_pi, __pyx_n_s_cattrib, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1388)) __PYX_ERR(0, 11640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1388);
  __Pyx_GIVEREF(__pyx_tuple__1388);
  __pyx_codeobj__619 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1388, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetAttribute, 11640, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__619)) __PYX_ERR(0, 11640, __pyx_L1_error)

  /* "cuda/cuda.pyx":12057
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, int flags):             # <<<<<<<<<<<<<<
 *     """ Return NvSciSync attributes that this device can support.
 * 
 */
  __pyx_tuple__1389 = PyTuple_Pack(8, __pyx_n_s_nvSciSyncAttrList, __pyx_n_s_dev, __pyx_n_s_flags_2, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_cnvSciSyncAttrList, __pyx_n_s_cnvSciSyncAttrList_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1389)) __PYX_ERR(0, 12057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1389);
  __Pyx_GIVEREF(__pyx_tuple__1389);
  __pyx_codeobj__620 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1389, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetNvSciSyncAttributes, 12057, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__620)) __PYX_ERR(0, 12057, __pyx_L1_error)

  /* "cuda/cuda.pyx":12129
 * 
 * @cython.embedsignature(True)
 * def cuDeviceSetMemPool(dev, pool):             # <<<<<<<<<<<<<<
 *     """ Sets the current memory pool of a device.
 * 
 */
  __pyx_tuple__1390 = PyTuple_Pack(7, __pyx_n_s_dev, __pyx_n_s_pool, __pyx_n_s_cpool, __pyx_n_s_ppool, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1390)) __PYX_ERR(0, 12129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1390);
  __Pyx_GIVEREF(__pyx_tuple__1390);
  __pyx_codeobj__621 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1390, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceSetMemPool, 12129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__621)) __PYX_ERR(0, 12129, __pyx_L1_error)

  /* "cuda/cuda.pyx":12181
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetMemPool(dev):             # <<<<<<<<<<<<<<
 *     """ Gets the current mempool for a device.
 * 
 */
  __pyx_tuple__1391 = PyTuple_Pack(5, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_pool, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1391)) __PYX_ERR(0, 12181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1391);
  __Pyx_GIVEREF(__pyx_tuple__1391);
  __pyx_codeobj__622 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1391, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetMemPool, 12181, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__622)) __PYX_ERR(0, 12181, __pyx_L1_error)

  /* "cuda/cuda.pyx":12221
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetDefaultMemPool(dev):             # <<<<<<<<<<<<<<
 *     """ Returns the default mempool of a device.
 * 
 */
  __pyx_tuple__1392 = PyTuple_Pack(5, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_pool_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1392)) __PYX_ERR(0, 12221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1392);
  __Pyx_GIVEREF(__pyx_tuple__1392);
  __pyx_codeobj__623 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1392, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetDefaultMemPool, 12221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__623)) __PYX_ERR(0, 12221, __pyx_L1_error)

  /* "cuda/cuda.pyx":12258
 * 
 * @cython.embedsignature(True)
 * def cuFlushGPUDirectRDMAWrites(target not None : CUflushGPUDirectRDMAWritesTarget, scope not None : CUflushGPUDirectRDMAWritesScope):             # <<<<<<<<<<<<<<
 *     """ Blocks until remote writes are visible to the specified scope.
 * 
 */
  __pyx_tuple__1393 = PyTuple_Pack(5, __pyx_n_s_target, __pyx_n_s_scope, __pyx_n_s_ctarget, __pyx_n_s_cscope, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1393)) __PYX_ERR(0, 12258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1393);
  __Pyx_GIVEREF(__pyx_tuple__1393);
  __pyx_codeobj__624 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1393, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuFlushGPUDirectRDMAWrites, 12258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__624)) __PYX_ERR(0, 12258, __pyx_L1_error)

  /* "cuda/cuda.pyx":12295
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetProperties(dev):             # <<<<<<<<<<<<<<
 *     """ Returns properties for a selected device.
 * 
 */
  __pyx_tuple__1394 = PyTuple_Pack(5, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_prop, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1394)) __PYX_ERR(0, 12295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1394);
  __Pyx_GIVEREF(__pyx_tuple__1394);
  __pyx_codeobj__625 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1394, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetProperties, 12295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__625)) __PYX_ERR(0, 12295, __pyx_L1_error)

  /* "cuda/cuda.pyx":12371
 * 
 * @cython.embedsignature(True)
 * def cuDeviceComputeCapability(dev):             # <<<<<<<<<<<<<<
 *     """ Returns the compute capability of the device.
 * 
 */
  __pyx_tuple__1395 = PyTuple_Pack(6, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_major, __pyx_n_s_minor, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1395)) __PYX_ERR(0, 12371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1395);
  __Pyx_GIVEREF(__pyx_tuple__1395);
  __pyx_codeobj__626 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1395, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceComputeCapability, 12371, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__626)) __PYX_ERR(0, 12371, __pyx_L1_error)

  /* "cuda/cuda.pyx":12416
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxRetain(dev):             # <<<<<<<<<<<<<<
 *     """ Retain the primary context on the GPU.
 * 
 */
  __pyx_tuple__1396 = PyTuple_Pack(5, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_pctx, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1396)) __PYX_ERR(0, 12416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1396);
  __Pyx_GIVEREF(__pyx_tuple__1396);
  __pyx_codeobj__627 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1396, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDevicePrimaryCtxRetain, 12416, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__627)) __PYX_ERR(0, 12416, __pyx_L1_error)

  /* "cuda/cuda.pyx":12470
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxRelease(dev):             # <<<<<<<<<<<<<<
 *     """ Release the primary context on the GPU.
 * 
 */
  __pyx_tuple__1397 = PyTuple_Pack(4, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1397)) __PYX_ERR(0, 12470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1397);
  __Pyx_GIVEREF(__pyx_tuple__1397);
  __pyx_codeobj__628 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1397, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDevicePrimaryCtxRelease, 12470, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__628)) __PYX_ERR(0, 12470, __pyx_L1_error)

  /* "cuda/cuda.pyx":12514
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxSetFlags(dev, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Set flags for the primary context.
 * 
 */
  __pyx_tuple__1398 = PyTuple_Pack(5, __pyx_n_s_dev, __pyx_n_s_flags_2, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1398)) __PYX_ERR(0, 12514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1398);
  __Pyx_GIVEREF(__pyx_tuple__1398);
  __pyx_codeobj__629 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1398, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDevicePrimaryCtxSetFlags, 12514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__629)) __PYX_ERR(0, 12514, __pyx_L1_error)

  /* "cuda/cuda.pyx":12593
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxGetState(dev):             # <<<<<<<<<<<<<<
 *     """ Get the state of the primary context.
 * 
 */
  __pyx_tuple__1399 = PyTuple_Pack(6, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_flags_2, __pyx_n_s_active, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1399)) __PYX_ERR(0, 12593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1399);
  __Pyx_GIVEREF(__pyx_tuple__1399);
  __pyx_codeobj__630 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1399, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDevicePrimaryCtxGetState, 12593, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__630)) __PYX_ERR(0, 12593, __pyx_L1_error)

  /* "cuda/cuda.pyx":12634
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxReset(dev):             # <<<<<<<<<<<<<<
 *     """ Destroy all allocations and reset all state on the primary context.
 * 
 */
  __pyx_tuple__1400 = PyTuple_Pack(4, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1400)) __PYX_ERR(0, 12634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1400);
  __Pyx_GIVEREF(__pyx_tuple__1400);
  __pyx_codeobj__631 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1400, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDevicePrimaryCtxReset, 12634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__631)) __PYX_ERR(0, 12634, __pyx_L1_error)

  /* "cuda/cuda.pyx":12677
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetExecAffinitySupport(typename not None : CUexecAffinityType, dev):             # <<<<<<<<<<<<<<
 *     """ Returns information about the execution affinity support of the device.
 * 
 */
  __pyx_tuple__1401 = PyTuple_Pack(7, __pyx_n_s_typename, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_pi, __pyx_n_s_ctypename, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1401)) __PYX_ERR(0, 12677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1401);
  __Pyx_GIVEREF(__pyx_tuple__1401);
  __pyx_codeobj__632 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1401, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetExecAffinitySupport, 12677, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__632)) __PYX_ERR(0, 12677, __pyx_L1_error)

  /* "cuda/cuda.pyx":12721
 * 
 * @cython.embedsignature(True)
 * def cuCtxCreate(unsigned int flags, dev):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context.
 * 
 */
  __pyx_tuple__1402 = PyTuple_Pack(6, __pyx_n_s_flags_2, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_pctx, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1402)) __PYX_ERR(0, 12721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1402);
  __Pyx_GIVEREF(__pyx_tuple__1402);
  __pyx_codeobj__633 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1402, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxCreate, 12721, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__633)) __PYX_ERR(0, 12721, __pyx_L1_error)

  /* "cuda/cuda.pyx":12825
 * 
 * @cython.embedsignature(True)
 * def cuCtxCreate_v3(paramsArray : List[CUexecAffinityParam], int numParams, unsigned int flags, dev):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context with execution affinity.
 * 
 */
  __pyx_tuple__1403 = PyTuple_Pack(12, __pyx_n_s_paramsArray_2, __pyx_n_s_numParams, __pyx_n_s_flags_2, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_pctx, __pyx_n_s_cparamsArray, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1403)) __PYX_ERR(0, 12825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1403);
  __Pyx_GIVEREF(__pyx_tuple__1403);
  __pyx_codeobj__634 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1403, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxCreate_v3, 12825, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__634)) __PYX_ERR(0, 12825, __pyx_L1_error)

  /* "cuda/cuda.pyx":12959
 * 
 * @cython.embedsignature(True)
 * def cuCtxDestroy(ctx):             # <<<<<<<<<<<<<<
 *     """ Destroy a CUDA context.
 * 
 */
  __pyx_tuple__1404 = PyTuple_Pack(4, __pyx_n_s_ctx_2, __pyx_n_s_cctx, __pyx_n_s_pctx, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1404)) __PYX_ERR(0, 12959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1404);
  __Pyx_GIVEREF(__pyx_tuple__1404);
  __pyx_codeobj__636 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1404, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxDestroy, 12959, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__636)) __PYX_ERR(0, 12959, __pyx_L1_error)

  /* "cuda/cuda.pyx":13013
 * 
 * @cython.embedsignature(True)
 * def cuCtxPushCurrent(ctx):             # <<<<<<<<<<<<<<
 *     """ Pushes a context on the current CPU thread.
 * 
 */
  __pyx_tuple__1405 = PyTuple_Pack(4, __pyx_n_s_ctx_2, __pyx_n_s_cctx, __pyx_n_s_pctx, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1405)) __PYX_ERR(0, 13013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1405);
  __Pyx_GIVEREF(__pyx_tuple__1405);
  __pyx_codeobj__637 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1405, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxPushCurrent, 13013, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__637)) __PYX_ERR(0, 13013, __pyx_L1_error)

  /* "cuda/cuda.pyx":13052
 * 
 * @cython.embedsignature(True)
 * def cuCtxPopCurrent():             # <<<<<<<<<<<<<<
 *     """ Pops the current CUDA context from the current CPU thread.
 * 
 */
  __pyx_tuple__1406 = PyTuple_Pack(2, __pyx_n_s_pctx, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1406)) __PYX_ERR(0, 13052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1406);
  __Pyx_GIVEREF(__pyx_tuple__1406);
  __pyx_codeobj__638 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1406, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxPopCurrent, 13052, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__638)) __PYX_ERR(0, 13052, __pyx_L1_error)

  /* "cuda/cuda.pyx":13079
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetCurrent(ctx):             # <<<<<<<<<<<<<<
 *     """ Binds the specified CUDA context to the calling CPU thread.
 * 
 */
  __pyx_tuple__1407 = PyTuple_Pack(4, __pyx_n_s_ctx_2, __pyx_n_s_cctx, __pyx_n_s_pctx, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1407)) __PYX_ERR(0, 13079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1407);
  __Pyx_GIVEREF(__pyx_tuple__1407);
  __pyx_codeobj__639 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1407, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxSetCurrent, 13079, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__639)) __PYX_ERR(0, 13079, __pyx_L1_error)

  /* "cuda/cuda.pyx":13120
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetCurrent():             # <<<<<<<<<<<<<<
 *     """ Returns the CUDA context bound to the calling CPU thread.
 * 
 */
  __pyx_tuple__1408 = PyTuple_Pack(2, __pyx_n_s_pctx, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1408)) __PYX_ERR(0, 13120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1408);
  __Pyx_GIVEREF(__pyx_tuple__1408);
  __pyx_codeobj__640 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1408, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxGetCurrent, 13120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__640)) __PYX_ERR(0, 13120, __pyx_L1_error)

  /* "cuda/cuda.pyx":13143
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetDevice():             # <<<<<<<<<<<<<<
 *     """ Returns the device ID for the current context.
 * 
 */
  __pyx_tuple__1409 = PyTuple_Pack(2, __pyx_n_s_device, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1409)) __PYX_ERR(0, 13143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1409);
  __Pyx_GIVEREF(__pyx_tuple__1409);
  __pyx_codeobj__641 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1409, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxGetDevice, 13143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__641)) __PYX_ERR(0, 13143, __pyx_L1_error)

  /* "cuda/cuda.pyx":13164
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetFlags():             # <<<<<<<<<<<<<<
 *     """ Returns the flags for the current context.
 * 
 */
  __pyx_tuple__1410 = PyTuple_Pack(2, __pyx_n_s_flags_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1410)) __PYX_ERR(0, 13164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1410);
  __Pyx_GIVEREF(__pyx_tuple__1410);
  __pyx_codeobj__642 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1410, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxGetFlags, 13164, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__642)) __PYX_ERR(0, 13164, __pyx_L1_error)

  /* "cuda/cuda.pyx":13186
 * 
 * @cython.embedsignature(True)
 * def cuCtxSynchronize():             # <<<<<<<<<<<<<<
 *     """ Block for a context's tasks to complete.
 * 
 */
  __pyx_tuple__1411 = PyTuple_Pack(1, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1411)) __PYX_ERR(0, 13186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1411);
  __Pyx_GIVEREF(__pyx_tuple__1411);
  __pyx_codeobj__643 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1411, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxSynchronize, 13186, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__643)) __PYX_ERR(0, 13186, __pyx_L1_error)

  /* "cuda/cuda.pyx":13208
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetLimit(limit not None : CUlimit, size_t value):             # <<<<<<<<<<<<<<
 *     """ Set resource limits.
 * 
 */
  __pyx_tuple__1412 = PyTuple_Pack(4, __pyx_n_s_limit, __pyx_n_s_value, __pyx_n_s_climit, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1412)) __PYX_ERR(0, 13208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1412);
  __Pyx_GIVEREF(__pyx_tuple__1412);
  __pyx_codeobj__644 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1412, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxSetLimit, 13208, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__644)) __PYX_ERR(0, 13208, __pyx_L1_error)

  /* "cuda/cuda.pyx":13311
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetLimit(limit not None : CUlimit):             # <<<<<<<<<<<<<<
 *     """ Returns resource limits.
 * 
 */
  __pyx_tuple__1413 = PyTuple_Pack(4, __pyx_n_s_limit, __pyx_n_s_pvalue, __pyx_n_s_climit, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1413)) __PYX_ERR(0, 13311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1413);
  __Pyx_GIVEREF(__pyx_tuple__1413);
  __pyx_codeobj__645 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1413, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxGetLimit, 13311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__645)) __PYX_ERR(0, 13311, __pyx_L1_error)

  /* "cuda/cuda.pyx":13364
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetCacheConfig():             # <<<<<<<<<<<<<<
 *     """ Returns the preferred cache configuration for the current context.
 * 
 */
  __pyx_tuple__1414 = PyTuple_Pack(2, __pyx_n_s_pconfig, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1414)) __PYX_ERR(0, 13364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1414);
  __Pyx_GIVEREF(__pyx_tuple__1414);
  __pyx_codeobj__646 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1414, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxGetCacheConfig, 13364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__646)) __PYX_ERR(0, 13364, __pyx_L1_error)

  /* "cuda/cuda.pyx":13406
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetCacheConfig(config not None : CUfunc_cache):             # <<<<<<<<<<<<<<
 *     """ Sets the preferred cache configuration for the current context.
 * 
 */
  __pyx_tuple__1415 = PyTuple_Pack(3, __pyx_n_s_config, __pyx_n_s_cconfig, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1415)) __PYX_ERR(0, 13406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1415);
  __Pyx_GIVEREF(__pyx_tuple__1415);
  __pyx_codeobj__647 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1415, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxSetCacheConfig, 13406, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__647)) __PYX_ERR(0, 13406, __pyx_L1_error)

  /* "cuda/cuda.pyx":13459
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetSharedMemConfig():             # <<<<<<<<<<<<<<
 *     """ Returns the current shared memory configuration for the current context.
 * 
 */
  __pyx_tuple__1416 = PyTuple_Pack(2, __pyx_n_s_pConfig, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1416)) __PYX_ERR(0, 13459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1416);
  __Pyx_GIVEREF(__pyx_tuple__1416);
  __pyx_codeobj__648 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1416, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxGetSharedMemConfig, 13459, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__648)) __PYX_ERR(0, 13459, __pyx_L1_error)

  /* "cuda/cuda.pyx":13494
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetSharedMemConfig(config not None : CUsharedconfig):             # <<<<<<<<<<<<<<
 *     """ Sets the shared memory configuration for the current context.
 * 
 */
  __pyx_tuple__1417 = PyTuple_Pack(3, __pyx_n_s_config, __pyx_n_s_cconfig, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1417)) __PYX_ERR(0, 13494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1417);
  __Pyx_GIVEREF(__pyx_tuple__1417);
  __pyx_codeobj__649 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1417, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxSetSharedMemConfig, 13494, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__649)) __PYX_ERR(0, 13494, __pyx_L1_error)

  /* "cuda/cuda.pyx":13543
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetApiVersion(ctx):             # <<<<<<<<<<<<<<
 *     """ Gets the context's API version.
 * 
 */
  __pyx_tuple__1418 = PyTuple_Pack(5, __pyx_n_s_ctx_2, __pyx_n_s_cctx, __pyx_n_s_pctx, __pyx_n_s_version, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1418)) __PYX_ERR(0, 13543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1418);
  __Pyx_GIVEREF(__pyx_tuple__1418);
  __pyx_codeobj__650 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1418, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxGetApiVersion, 13543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__650)) __PYX_ERR(0, 13543, __pyx_L1_error)

  /* "cuda/cuda.pyx":13587
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetStreamPriorityRange():             # <<<<<<<<<<<<<<
 *     """ Returns numerical values that correspond to the least and greatest stream priorities.
 * 
 */
  __pyx_tuple__1419 = PyTuple_Pack(3, __pyx_n_s_leastPriority, __pyx_n_s_greatestPriority, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1419)) __PYX_ERR(0, 13587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1419);
  __Pyx_GIVEREF(__pyx_tuple__1419);
  __pyx_codeobj__651 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1419, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxGetStreamPriorityRange, 13587, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__651)) __PYX_ERR(0, 13587, __pyx_L1_error)

  /* "cuda/cuda.pyx":13627
 * 
 * @cython.embedsignature(True)
 * def cuCtxResetPersistingL2Cache():             # <<<<<<<<<<<<<<
 *     """ Resets all persisting lines in cache to normal status.
 * 
 */
  __pyx_tuple__1420 = PyTuple_Pack(1, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1420)) __PYX_ERR(0, 13627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1420);
  __Pyx_GIVEREF(__pyx_tuple__1420);
  __pyx_codeobj__652 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1420, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxResetPersistingL2Cache, 13627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__652)) __PYX_ERR(0, 13627, __pyx_L1_error)

  /* "cuda/cuda.pyx":13646
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetExecAffinity(typename not None : CUexecAffinityType):             # <<<<<<<<<<<<<<
 *     """ Returns the execution affinity setting for the current context.
 * 
 */
  __pyx_tuple__1421 = PyTuple_Pack(4, __pyx_n_s_typename, __pyx_n_s_pExecAffinity, __pyx_n_s_ctypename, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1421)) __PYX_ERR(0, 13646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1421);
  __Pyx_GIVEREF(__pyx_tuple__1421);
  __pyx_codeobj__653 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1421, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxGetExecAffinity, 13646, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__653)) __PYX_ERR(0, 13646, __pyx_L1_error)

  /* "cuda/cuda.pyx":13677
 * 
 * @cython.embedsignature(True)
 * def cuCtxAttach(unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Increment a context's usage-count.
 * 
 */
  __pyx_tuple__1422 = PyTuple_Pack(4, __pyx_n_s_flags_2, __pyx_n_s_flags_2, __pyx_n_s_pctx, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1422)) __PYX_ERR(0, 13677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1422);
  __Pyx_GIVEREF(__pyx_tuple__1422);
  __pyx_codeobj__654 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1422, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxAttach, 13677, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__654)) __PYX_ERR(0, 13677, __pyx_L1_error)

  /* "cuda/cuda.pyx":13712
 * 
 * @cython.embedsignature(True)
 * def cuCtxDetach(ctx):             # <<<<<<<<<<<<<<
 *     """ Decrement a context's usage-count.
 * 
 */
  __pyx_tuple__1423 = PyTuple_Pack(4, __pyx_n_s_ctx_2, __pyx_n_s_cctx, __pyx_n_s_pctx, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1423)) __PYX_ERR(0, 13712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1423);
  __Pyx_GIVEREF(__pyx_tuple__1423);
  __pyx_codeobj__655 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1423, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxDetach, 13712, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__655)) __PYX_ERR(0, 13712, __pyx_L1_error)

  /* "cuda/cuda.pyx":13752
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoad(char* fname):             # <<<<<<<<<<<<<<
 *     """ Loads a compute module.
 * 
 */
  __pyx_tuple__1424 = PyTuple_Pack(4, __pyx_n_s_fname, __pyx_n_s_fname, __pyx_n_s_module_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1424)) __PYX_ERR(0, 13752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1424);
  __Pyx_GIVEREF(__pyx_tuple__1424);
  __pyx_codeobj__656 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1424, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuModuleLoad, 13752, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__656)) __PYX_ERR(0, 13752, __pyx_L1_error)

  /* "cuda/cuda.pyx":13785
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadData(image):             # <<<<<<<<<<<<<<
 *     """ Load a module's data.
 * 
 */
  __pyx_tuple__1425 = PyTuple_Pack(5, __pyx_n_s_image, __pyx_n_s_module_2, __pyx_n_s_cimage, __pyx_n_s_cimage_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1425)) __PYX_ERR(0, 13785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1425);
  __Pyx_GIVEREF(__pyx_tuple__1425);
  __pyx_codeobj__657 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1425, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuModuleLoadData, 13785, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__657)) __PYX_ERR(0, 13785, __pyx_L1_error)

  /* "cuda/cuda.pyx":13819
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadDataEx(image, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Load a module's data with options.
 * 
 */
  __pyx_tuple__1426 = PyTuple_Pack(16, __pyx_n_s_image, __pyx_n_s_numOptions, __pyx_n_s_options, __pyx_n_s_optionValues, __pyx_n_s_module_2, __pyx_n_s_cimage, __pyx_n_s_cimage_ptr, __pyx_n_s_coptions, __pyx_n_s_pylist, __pyx_n_s_voidStarHelper, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_pyoptions, __pyx_n_s_pyoptions, __pyx_n_s_pyoptionValues); if (unlikely(!__pyx_tuple__1426)) __PYX_ERR(0, 13819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1426);
  __Pyx_GIVEREF(__pyx_tuple__1426);
  __pyx_codeobj__658 = (PyObject*)__Pyx_PyCode_New(4, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1426, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuModuleLoadDataEx, 13819, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__658)) __PYX_ERR(0, 13819, __pyx_L1_error)

  /* "cuda/cuda.pyx":13871
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadFatBinary(fatCubin):             # <<<<<<<<<<<<<<
 *     """ Load a module's data.
 * 
 */
  __pyx_tuple__1427 = PyTuple_Pack(5, __pyx_n_s_fatCubin, __pyx_n_s_module_2, __pyx_n_s_cfatCubin, __pyx_n_s_cfatCubin_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1427)) __PYX_ERR(0, 13871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1427);
  __Pyx_GIVEREF(__pyx_tuple__1427);
  __pyx_codeobj__661 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1427, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuModuleLoadFatBinary, 13871, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__661)) __PYX_ERR(0, 13871, __pyx_L1_error)

  /* "cuda/cuda.pyx":13908
 * 
 * @cython.embedsignature(True)
 * def cuModuleUnload(hmod):             # <<<<<<<<<<<<<<
 *     """ Unloads a module.
 * 
 */
  __pyx_tuple__1428 = PyTuple_Pack(4, __pyx_n_s_hmod, __pyx_n_s_chmod, __pyx_n_s_phmod, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1428)) __PYX_ERR(0, 13908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1428);
  __Pyx_GIVEREF(__pyx_tuple__1428);
  __pyx_codeobj__662 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1428, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuModuleUnload, 13908, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__662)) __PYX_ERR(0, 13908, __pyx_L1_error)

  /* "cuda/cuda.pyx":13941
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetLoadingMode():             # <<<<<<<<<<<<<<
 *     """ Query lazy loading mode.
 * 
 */
  __pyx_tuple__1429 = PyTuple_Pack(2, __pyx_n_s_mode, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1429)) __PYX_ERR(0, 13941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1429);
  __Pyx_GIVEREF(__pyx_tuple__1429);
  __pyx_codeobj__663 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1429, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuModuleGetLoadingMode, 13941, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__663)) __PYX_ERR(0, 13941, __pyx_L1_error)

  /* "cuda/cuda.pyx":13963
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetFunction(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a function handle.
 * 
 */
  __pyx_tuple__1430 = PyTuple_Pack(6, __pyx_n_s_hmod, __pyx_n_s_name_2, __pyx_n_s_chmod, __pyx_n_s_phmod, __pyx_n_s_hfunc, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1430)) __PYX_ERR(0, 13963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1430);
  __Pyx_GIVEREF(__pyx_tuple__1430);
  __pyx_codeobj__664 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1430, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuModuleGetFunction, 13963, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__664)) __PYX_ERR(0, 13963, __pyx_L1_error)

  /* "cuda/cuda.pyx":14004
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetGlobal(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a global pointer from a module.
 * 
 */
  __pyx_tuple__1431 = PyTuple_Pack(7, __pyx_n_s_hmod, __pyx_n_s_name_2, __pyx_n_s_chmod, __pyx_n_s_phmod, __pyx_n_s_dptr_2, __pyx_n_s_numbytes, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1431)) __PYX_ERR(0, 14004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1431);
  __Pyx_GIVEREF(__pyx_tuple__1431);
  __pyx_codeobj__665 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1431, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuModuleGetGlobal, 14004, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__665)) __PYX_ERR(0, 14004, __pyx_L1_error)

  /* "cuda/cuda.pyx":14049
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetTexRef(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a texture reference.
 * 
 */
  __pyx_tuple__1432 = PyTuple_Pack(6, __pyx_n_s_hmod, __pyx_n_s_name_2, __pyx_n_s_chmod, __pyx_n_s_phmod, __pyx_n_s_pTexRef, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1432)) __PYX_ERR(0, 14049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1432);
  __Pyx_GIVEREF(__pyx_tuple__1432);
  __pyx_codeobj__666 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1432, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuModuleGetTexRef, 14049, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__666)) __PYX_ERR(0, 14049, __pyx_L1_error)

  /* "cuda/cuda.pyx":14092
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetSurfRef(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a surface reference.
 * 
 */
  __pyx_tuple__1433 = PyTuple_Pack(6, __pyx_n_s_hmod, __pyx_n_s_name_2, __pyx_n_s_chmod, __pyx_n_s_phmod, __pyx_n_s_pSurfRef, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1433)) __PYX_ERR(0, 14092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1433);
  __Pyx_GIVEREF(__pyx_tuple__1433);
  __pyx_codeobj__667 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1433, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuModuleGetSurfRef, 14092, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__667)) __PYX_ERR(0, 14092, __pyx_L1_error)

  /* "cuda/cuda.pyx":14133
 * 
 * @cython.embedsignature(True)
 * def cuLinkCreate(unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Creates a pending JIT linker invocation.
 * 
 */
  __pyx_tuple__1434 = PyTuple_Pack(14, __pyx_n_s_numOptions, __pyx_n_s_options, __pyx_n_s_optionValues, __pyx_n_s_coptions, __pyx_n_s_pylist, __pyx_n_s_voidStarHelper, __pyx_n_s_stateOut, __pyx_n_s_err, __pyx_n_s_option, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_pyoptions, __pyx_n_s_pyoptions, __pyx_n_s_pyoptionValues); if (unlikely(!__pyx_tuple__1434)) __PYX_ERR(0, 14133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1434);
  __Pyx_GIVEREF(__pyx_tuple__1434);
  __pyx_codeobj__668 = (PyObject*)__Pyx_PyCode_New(3, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1434, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLinkCreate, 14133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__668)) __PYX_ERR(0, 14133, __pyx_L1_error)

  /* "cuda/cuda.pyx":14190
 * 
 * @cython.embedsignature(True)
 * def cuLinkAddData(state, typename not None : CUjitInputType, data, size_t size, char* name, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Add an input to a pending linker invocation.
 * 
 */
  __pyx_tuple__1435 = PyTuple_Pack(22, __pyx_n_s_state, __pyx_n_s_typename, __pyx_n_s_data, __pyx_n_s_size_2, __pyx_n_s_name_2, __pyx_n_s_numOptions, __pyx_n_s_options, __pyx_n_s_optionValues, __pyx_n_s_cstate, __pyx_n_s_pstate, __pyx_n_s_ctypename, __pyx_n_s_cdata, __pyx_n_s_cdata_ptr, __pyx_n_s_coptions, __pyx_n_s_pylist, __pyx_n_s_voidStarHelper, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_pyoptions, __pyx_n_s_pyoptions, __pyx_n_s_pyoptionValues); if (unlikely(!__pyx_tuple__1435)) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1435);
  __Pyx_GIVEREF(__pyx_tuple__1435);
  __pyx_codeobj__669 = (PyObject*)__Pyx_PyCode_New(8, 0, 22, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1435, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLinkAddData, 14190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__669)) __PYX_ERR(0, 14190, __pyx_L1_error)

  /* "cuda/cuda.pyx":14257
 * 
 * @cython.embedsignature(True)
 * def cuLinkAddFile(state, typename not None : CUjitInputType, char* path, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Add a file input to a pending linker invocation.
 * 
 */
  __pyx_tuple__1436 = PyTuple_Pack(18, __pyx_n_s_state, __pyx_n_s_typename, __pyx_n_s_path, __pyx_n_s_numOptions, __pyx_n_s_options, __pyx_n_s_optionValues, __pyx_n_s_cstate, __pyx_n_s_pstate, __pyx_n_s_ctypename, __pyx_n_s_coptions, __pyx_n_s_pylist, __pyx_n_s_voidStarHelper, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_pyoptions, __pyx_n_s_pyoptions, __pyx_n_s_pyoptionValues); if (unlikely(!__pyx_tuple__1436)) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1436);
  __Pyx_GIVEREF(__pyx_tuple__1436);
  __pyx_codeobj__670 = (PyObject*)__Pyx_PyCode_New(6, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1436, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLinkAddFile, 14257, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__670)) __PYX_ERR(0, 14257, __pyx_L1_error)

  /* "cuda/cuda.pyx":14320
 * 
 * @cython.embedsignature(True)
 * def cuLinkComplete(state):             # <<<<<<<<<<<<<<
 *     """ Complete a pending linker invocation.
 * 
 */
  __pyx_tuple__1437 = PyTuple_Pack(6, __pyx_n_s_state, __pyx_n_s_cstate, __pyx_n_s_pstate, __pyx_n_s_cubinOut, __pyx_n_s_sizeOut, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1437)) __PYX_ERR(0, 14320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1437);
  __Pyx_GIVEREF(__pyx_tuple__1437);
  __pyx_codeobj__671 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1437, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLinkComplete, 14320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__671)) __PYX_ERR(0, 14320, __pyx_L1_error)

  /* "cuda/cuda.pyx":14363
 * 
 * @cython.embedsignature(True)
 * def cuLinkDestroy(state):             # <<<<<<<<<<<<<<
 *     """ Destroys state for a JIT linker invocation.
 * 
 */
  __pyx_tuple__1438 = PyTuple_Pack(4, __pyx_n_s_state, __pyx_n_s_cstate, __pyx_n_s_pstate, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1438)) __PYX_ERR(0, 14363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1438);
  __Pyx_GIVEREF(__pyx_tuple__1438);
  __pyx_codeobj__672 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1438, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLinkDestroy, 14363, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__672)) __PYX_ERR(0, 14363, __pyx_L1_error)

  /* "cuda/cuda.pyx":14394
 * 
 * @cython.embedsignature(True)
 * def cuMemGetInfo():             # <<<<<<<<<<<<<<
 *     """ Gets free and total memory.
 * 
 */
  __pyx_tuple__1439 = PyTuple_Pack(3, __pyx_n_s_free, __pyx_n_s_total, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1439)) __PYX_ERR(0, 14394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1439);
  __Pyx_GIVEREF(__pyx_tuple__1439);
  __pyx_codeobj__673 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1439, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemGetInfo, 14394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__673)) __PYX_ERR(0, 14394, __pyx_L1_error)

  /* "cuda/cuda.pyx":14433
 * 
 * @cython.embedsignature(True)
 * def cuMemAlloc(size_t bytesize):             # <<<<<<<<<<<<<<
 *     """ Allocates device memory.
 * 
 */
  __pyx_tuple__1440 = PyTuple_Pack(4, __pyx_n_s_bytesize_2, __pyx_n_s_bytesize_2, __pyx_n_s_dptr_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1440)) __PYX_ERR(0, 14433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1440);
  __Pyx_GIVEREF(__pyx_tuple__1440);
  __pyx_codeobj__674 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1440, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemAlloc, 14433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__674)) __PYX_ERR(0, 14433, __pyx_L1_error)

  /* "cuda/cuda.pyx":14463
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocPitch(size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes):             # <<<<<<<<<<<<<<
 *     """ Allocates pitched device memory.
 * 
 */
  __pyx_tuple__1441 = PyTuple_Pack(6, __pyx_n_s_WidthInBytes_2, __pyx_n_s_Height_2, __pyx_n_s_ElementSizeBytes, __pyx_n_s_dptr_2, __pyx_n_s_pPitch_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1441)) __PYX_ERR(0, 14463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1441);
  __Pyx_GIVEREF(__pyx_tuple__1441);
  __pyx_codeobj__675 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1441, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemAllocPitch, 14463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__675)) __PYX_ERR(0, 14463, __pyx_L1_error)

  /* "cuda/cuda.pyx":14526
 * 
 * @cython.embedsignature(True)
 * def cuMemFree(dptr):             # <<<<<<<<<<<<<<
 *     """ Frees device memory.
 * 
 */
  __pyx_tuple__1442 = PyTuple_Pack(4, __pyx_n_s_dptr_2, __pyx_n_s_cdptr, __pyx_n_s_pdptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1442)) __PYX_ERR(0, 14526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1442);
  __Pyx_GIVEREF(__pyx_tuple__1442);
  __pyx_codeobj__676 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1442, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemFree, 14526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__676)) __PYX_ERR(0, 14526, __pyx_L1_error)

  /* "cuda/cuda.pyx":14571
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAddressRange(dptr):             # <<<<<<<<<<<<<<
 *     """ Get information on memory allocations.
 * 
 */
  __pyx_tuple__1443 = PyTuple_Pack(6, __pyx_n_s_dptr_2, __pyx_n_s_cdptr, __pyx_n_s_pdptr, __pyx_n_s_pbase, __pyx_n_s_psize, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1443)) __PYX_ERR(0, 14571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1443);
  __Pyx_GIVEREF(__pyx_tuple__1443);
  __pyx_codeobj__677 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1443, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemGetAddressRange, 14571, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__677)) __PYX_ERR(0, 14571, __pyx_L1_error)

  /* "cuda/cuda.pyx":14613
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocHost(size_t bytesize):             # <<<<<<<<<<<<<<
 *     """ Allocates page-locked host memory.
 * 
 */
  __pyx_tuple__1444 = PyTuple_Pack(4, __pyx_n_s_bytesize_2, __pyx_n_s_bytesize_2, __pyx_n_s_pp, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1444)) __PYX_ERR(0, 14613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1444);
  __Pyx_GIVEREF(__pyx_tuple__1444);
  __pyx_codeobj__678 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1444, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemAllocHost, 14613, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__678)) __PYX_ERR(0, 14613, __pyx_L1_error)

  /* "cuda/cuda.pyx":14657
 * 
 * @cython.embedsignature(True)
 * def cuMemFreeHost(p):             # <<<<<<<<<<<<<<
 *     """ Frees page-locked host memory.
 * 
 */
  __pyx_tuple__1445 = PyTuple_Pack(4, __pyx_n_s_p, __pyx_n_s_cp, __pyx_n_s_cp_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1445)) __PYX_ERR(0, 14657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1445);
  __Pyx_GIVEREF(__pyx_tuple__1445);
  __pyx_codeobj__679 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1445, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemFreeHost, 14657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__679)) __PYX_ERR(0, 14657, __pyx_L1_error)

  /* "cuda/cuda.pyx":14683
 * 
 * @cython.embedsignature(True)
 * def cuMemHostAlloc(size_t bytesize, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Allocates page-locked host memory.
 * 
 */
  __pyx_tuple__1446 = PyTuple_Pack(4, __pyx_n_s_bytesize_2, __pyx_n_s_Flags_2, __pyx_n_s_pp, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1446)) __PYX_ERR(0, 14683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1446);
  __Pyx_GIVEREF(__pyx_tuple__1446);
  __pyx_codeobj__680 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1446, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemHostAlloc, 14683, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__680)) __PYX_ERR(0, 14683, __pyx_L1_error)

  /* "cuda/cuda.pyx":14764
 * 
 * @cython.embedsignature(True)
 * def cuMemHostGetDevicePointer(p, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Passes back device pointer of mapped pinned memory.
 * 
 */
  __pyx_tuple__1447 = PyTuple_Pack(6, __pyx_n_s_p, __pyx_n_s_Flags_2, __pyx_n_s_pdptr, __pyx_n_s_cp, __pyx_n_s_cp_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1447)) __PYX_ERR(0, 14764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1447);
  __Pyx_GIVEREF(__pyx_tuple__1447);
  __pyx_codeobj__681 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1447, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemHostGetDevicePointer, 14764, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__681)) __PYX_ERR(0, 14764, __pyx_L1_error)

  /* "cuda/cuda.pyx":14821
 * 
 * @cython.embedsignature(True)
 * def cuMemHostGetFlags(p):             # <<<<<<<<<<<<<<
 *     """ Passes back flags that were used for a pinned allocation.
 * 
 */
  __pyx_tuple__1448 = PyTuple_Pack(5, __pyx_n_s_p, __pyx_n_s_pFlags, __pyx_n_s_cp, __pyx_n_s_cp_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1448)) __PYX_ERR(0, 14821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1448);
  __Pyx_GIVEREF(__pyx_tuple__1448);
  __pyx_codeobj__682 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1448, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemHostGetFlags, 14821, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__682)) __PYX_ERR(0, 14821, __pyx_L1_error)

  /* "cuda/cuda.pyx":14854
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocManaged(size_t bytesize, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Allocates memory that will be automatically managed by the Unified Memory system.
 * 
 */
  __pyx_tuple__1449 = PyTuple_Pack(4, __pyx_n_s_bytesize_2, __pyx_n_s_flags_2, __pyx_n_s_dptr_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1449)) __PYX_ERR(0, 14854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1449);
  __Pyx_GIVEREF(__pyx_tuple__1449);
  __pyx_codeobj__683 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1449, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemAllocManaged, 14854, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__683)) __PYX_ERR(0, 14854, __pyx_L1_error)

  /* "cuda/cuda.pyx":14986
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetByPCIBusId(char* pciBusId):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a compute device.
 * 
 */
  __pyx_tuple__1450 = PyTuple_Pack(4, __pyx_n_s_pciBusId, __pyx_n_s_pciBusId, __pyx_n_s_dev, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1450)) __PYX_ERR(0, 14986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1450);
  __Pyx_GIVEREF(__pyx_tuple__1450);
  __pyx_codeobj__684 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1450, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetByPCIBusId, 14986, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__684)) __PYX_ERR(0, 14986, __pyx_L1_error)

  /* "cuda/cuda.pyx":15015
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetPCIBusId(int length, dev):             # <<<<<<<<<<<<<<
 *     """ Returns a PCI Bus Id string for the device.
 * 
 */
  __pyx_tuple__1451 = PyTuple_Pack(7, __pyx_n_s_length, __pyx_n_s_dev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_pypciBusId, __pyx_n_s_pciBusId, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1451)) __PYX_ERR(0, 15015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1451);
  __Pyx_GIVEREF(__pyx_tuple__1451);
  __pyx_codeobj__685 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1451, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetPCIBusId, 15015, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__685)) __PYX_ERR(0, 15015, __pyx_L1_error)

  /* "cuda/cuda.pyx":15060
 * 
 * @cython.embedsignature(True)
 * def cuIpcGetEventHandle(event):             # <<<<<<<<<<<<<<
 *     """ Gets an interprocess handle for a previously allocated event.
 * 
 */
  __pyx_tuple__1452 = PyTuple_Pack(5, __pyx_n_s_event_2, __pyx_n_s_cevent, __pyx_n_s_pevent, __pyx_n_s_pHandle, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1452)) __PYX_ERR(0, 15060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1452);
  __Pyx_GIVEREF(__pyx_tuple__1452);
  __pyx_codeobj__686 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1452, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuIpcGetEventHandle, 15060, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__686)) __PYX_ERR(0, 15060, __pyx_L1_error)

  /* "cuda/cuda.pyx":15114
 * 
 * @cython.embedsignature(True)
 * def cuIpcOpenEventHandle(handle not None : CUipcEventHandle):             # <<<<<<<<<<<<<<
 *     """ Opens an interprocess event handle for use in the current process.
 * 
 */
  __pyx_tuple__1453 = PyTuple_Pack(3, __pyx_n_s_handle_2, __pyx_n_s_phEvent, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1453)) __PYX_ERR(0, 15114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1453);
  __Pyx_GIVEREF(__pyx_tuple__1453);
  __pyx_codeobj__687 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1453, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuIpcOpenEventHandle, 15114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__687)) __PYX_ERR(0, 15114, __pyx_L1_error)

  /* "cuda/cuda.pyx":15152
 * 
 * @cython.embedsignature(True)
 * def cuIpcGetMemHandle(dptr):             # <<<<<<<<<<<<<<
 *     """ Gets an interprocess memory handle for an existing device memory allocation.
 * 
 */
  __pyx_tuple__1454 = PyTuple_Pack(5, __pyx_n_s_dptr_2, __pyx_n_s_cdptr, __pyx_n_s_pdptr, __pyx_n_s_pHandle, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1454)) __PYX_ERR(0, 15152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1454);
  __Pyx_GIVEREF(__pyx_tuple__1454);
  __pyx_codeobj__688 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1454, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuIpcGetMemHandle, 15152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__688)) __PYX_ERR(0, 15152, __pyx_L1_error)

  /* "cuda/cuda.pyx":15201
 * 
 * @cython.embedsignature(True)
 * def cuIpcOpenMemHandle(handle not None : CUipcMemHandle, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process.
 * 
 */
  __pyx_tuple__1455 = PyTuple_Pack(4, __pyx_n_s_handle_2, __pyx_n_s_Flags_2, __pyx_n_s_pdptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1455)) __PYX_ERR(0, 15201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1455);
  __Pyx_GIVEREF(__pyx_tuple__1455);
  __pyx_codeobj__689 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1455, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuIpcOpenMemHandle, 15201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__689)) __PYX_ERR(0, 15201, __pyx_L1_error)

  /* "cuda/cuda.pyx":15261
 * 
 * @cython.embedsignature(True)
 * def cuIpcCloseMemHandle(dptr):             # <<<<<<<<<<<<<<
 *     """ Attempts to close memory mapped with :py:obj:`~.cuIpcOpenMemHandle`.
 * 
 */
  __pyx_tuple__1456 = PyTuple_Pack(4, __pyx_n_s_dptr_2, __pyx_n_s_cdptr, __pyx_n_s_pdptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1456)) __PYX_ERR(0, 15261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1456);
  __Pyx_GIVEREF(__pyx_tuple__1456);
  __pyx_codeobj__690 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1456, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuIpcCloseMemHandle, 15261, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__690)) __PYX_ERR(0, 15261, __pyx_L1_error)

  /* "cuda/cuda.pyx":15305
 * 
 * @cython.embedsignature(True)
 * def cuMemHostRegister(p, size_t bytesize, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Registers an existing host memory range for use by CUDA.
 * 
 */
  __pyx_tuple__1457 = PyTuple_Pack(6, __pyx_n_s_p, __pyx_n_s_bytesize_2, __pyx_n_s_Flags_2, __pyx_n_s_cp, __pyx_n_s_cp_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1457)) __PYX_ERR(0, 15305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1457);
  __Pyx_GIVEREF(__pyx_tuple__1457);
  __pyx_codeobj__691 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1457, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemHostRegister, 15305, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__691)) __PYX_ERR(0, 15305, __pyx_L1_error)

  /* "cuda/cuda.pyx":15401
 * 
 * @cython.embedsignature(True)
 * def cuMemHostUnregister(p):             # <<<<<<<<<<<<<<
 *     """ Unregisters a memory range that was registered with cuMemHostRegister.
 * 
 */
  __pyx_tuple__1458 = PyTuple_Pack(4, __pyx_n_s_p, __pyx_n_s_cp, __pyx_n_s_cp_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1458)) __PYX_ERR(0, 15401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1458);
  __Pyx_GIVEREF(__pyx_tuple__1458);
  __pyx_codeobj__692 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1458, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemHostUnregister, 15401, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__692)) __PYX_ERR(0, 15401, __pyx_L1_error)

  /* "cuda/cuda.pyx":15430
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy(dst, src, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory.
 * 
 */
  __pyx_tuple__1459 = PyTuple_Pack(8, __pyx_n_s_dst_2, __pyx_n_s_src, __pyx_n_s_ByteCount, __pyx_n_s_csrc, __pyx_n_s_psrc, __pyx_n_s_cdst, __pyx_n_s_pdst, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1459)) __PYX_ERR(0, 15430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1459);
  __Pyx_GIVEREF(__pyx_tuple__1459);
  __pyx_codeobj__693 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1459, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpy, 15430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__693)) __PYX_ERR(0, 15430, __pyx_L1_error)

  /* "cuda/cuda.pyx":15482
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies device memory between two contexts.
 * 
 */
  __pyx_tuple__1460 = PyTuple_Pack(14, __pyx_n_s_dstDevice_2, __pyx_n_s_dstContext_2, __pyx_n_s_srcDevice_2, __pyx_n_s_srcContext_2, __pyx_n_s_ByteCount, __pyx_n_s_csrcContext, __pyx_n_s_psrcContext, __pyx_n_s_csrcDevice, __pyx_n_s_psrcDevice, __pyx_n_s_cdstContext, __pyx_n_s_pdstContext, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1460)) __PYX_ERR(0, 15482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1460);
  __Pyx_GIVEREF(__pyx_tuple__1460);
  __pyx_codeobj__694 = (PyObject*)__Pyx_PyCode_New(5, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1460, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyPeer, 15482, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__694)) __PYX_ERR(0, 15482, __pyx_L1_error)

  /* "cuda/cuda.pyx":15557
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoD(dstDevice, srcHost, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Device.
 * 
 */
  __pyx_tuple__1461 = PyTuple_Pack(8, __pyx_n_s_dstDevice_2, __pyx_n_s_srcHost_2, __pyx_n_s_ByteCount, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_csrcHost, __pyx_n_s_csrcHost_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1461)) __PYX_ERR(0, 15557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1461);
  __Pyx_GIVEREF(__pyx_tuple__1461);
  __pyx_codeobj__695 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1461, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyHtoD, 15557, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__695)) __PYX_ERR(0, 15557, __pyx_L1_error)

  /* "cuda/cuda.pyx":15598
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoH(dstHost, srcDevice, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Host.
 * 
 */
  __pyx_tuple__1462 = PyTuple_Pack(8, __pyx_n_s_dstHost_2, __pyx_n_s_srcDevice_2, __pyx_n_s_ByteCount, __pyx_n_s_csrcDevice, __pyx_n_s_psrcDevice, __pyx_n_s_cdstHost, __pyx_n_s_cdstHost_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1462)) __PYX_ERR(0, 15598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1462);
  __Pyx_GIVEREF(__pyx_tuple__1462);
  __pyx_codeobj__696 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1462, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyDtoH, 15598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__696)) __PYX_ERR(0, 15598, __pyx_L1_error)

  /* "cuda/cuda.pyx":15639
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoD(dstDevice, srcDevice, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Device.
 * 
 */
  __pyx_tuple__1463 = PyTuple_Pack(8, __pyx_n_s_dstDevice_2, __pyx_n_s_srcDevice_2, __pyx_n_s_ByteCount, __pyx_n_s_csrcDevice, __pyx_n_s_psrcDevice, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1463)) __PYX_ERR(0, 15639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1463);
  __Pyx_GIVEREF(__pyx_tuple__1463);
  __pyx_codeobj__697 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1463, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyDtoD, 15639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__697)) __PYX_ERR(0, 15639, __pyx_L1_error)

  /* "cuda/cuda.pyx":15688
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoA(dstArray, size_t dstOffset, srcDevice, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Array.
 * 
 */
  __pyx_tuple__1464 = PyTuple_Pack(9, __pyx_n_s_dstArray_2, __pyx_n_s_dstOffset, __pyx_n_s_srcDevice_2, __pyx_n_s_ByteCount, __pyx_n_s_csrcDevice, __pyx_n_s_psrcDevice, __pyx_n_s_cdstArray, __pyx_n_s_pdstArray, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1464)) __PYX_ERR(0, 15688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1464);
  __Pyx_GIVEREF(__pyx_tuple__1464);
  __pyx_codeobj__698 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyDtoA, 15688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__698)) __PYX_ERR(0, 15688, __pyx_L1_error)

  /* "cuda/cuda.pyx":15740
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoD(dstDevice, srcArray, size_t srcOffset, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Device.
 * 
 */
  __pyx_tuple__1465 = PyTuple_Pack(9, __pyx_n_s_dstDevice_2, __pyx_n_s_srcArray_2, __pyx_n_s_srcOffset, __pyx_n_s_ByteCount, __pyx_n_s_csrcArray, __pyx_n_s_psrcArray, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1465)) __PYX_ERR(0, 15740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1465);
  __Pyx_GIVEREF(__pyx_tuple__1465);
  __pyx_codeobj__699 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1465, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyAtoD, 15740, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__699)) __PYX_ERR(0, 15740, __pyx_L1_error)

  /* "cuda/cuda.pyx":15794
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoA(dstArray, size_t dstOffset, srcHost, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Array.
 * 
 */
  __pyx_tuple__1466 = PyTuple_Pack(9, __pyx_n_s_dstArray_2, __pyx_n_s_dstOffset, __pyx_n_s_srcHost_2, __pyx_n_s_ByteCount, __pyx_n_s_cdstArray, __pyx_n_s_pdstArray, __pyx_n_s_csrcHost, __pyx_n_s_csrcHost_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1466)) __PYX_ERR(0, 15794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1466);
  __Pyx_GIVEREF(__pyx_tuple__1466);
  __pyx_codeobj__700 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1466, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyHtoA, 15794, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__700)) __PYX_ERR(0, 15794, __pyx_L1_error)

  /* "cuda/cuda.pyx":15838
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoH(dstHost, srcArray, size_t srcOffset, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Host.
 * 
 */
  __pyx_tuple__1467 = PyTuple_Pack(9, __pyx_n_s_dstHost_2, __pyx_n_s_srcArray_2, __pyx_n_s_srcOffset, __pyx_n_s_ByteCount, __pyx_n_s_csrcArray, __pyx_n_s_psrcArray, __pyx_n_s_cdstHost, __pyx_n_s_cdstHost_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1467)) __PYX_ERR(0, 15838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1467);
  __Pyx_GIVEREF(__pyx_tuple__1467);
  __pyx_codeobj__701 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1467, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyAtoH, 15838, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__701)) __PYX_ERR(0, 15838, __pyx_L1_error)

  /* "cuda/cuda.pyx":15882
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoA(dstArray, size_t dstOffset, srcArray, size_t srcOffset, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Array.
 * 
 */
  __pyx_tuple__1468 = PyTuple_Pack(10, __pyx_n_s_dstArray_2, __pyx_n_s_dstOffset, __pyx_n_s_srcArray_2, __pyx_n_s_srcOffset, __pyx_n_s_ByteCount, __pyx_n_s_csrcArray, __pyx_n_s_psrcArray, __pyx_n_s_cdstArray, __pyx_n_s_pdstArray, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1468)) __PYX_ERR(0, 15882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1468);
  __Pyx_GIVEREF(__pyx_tuple__1468);
  __pyx_codeobj__702 = (PyObject*)__Pyx_PyCode_New(5, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1468, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyAtoA, 15882, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__702)) __PYX_ERR(0, 15882, __pyx_L1_error)

  /* "cuda/cuda.pyx":15939
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy2D(pCopy : CUDA_MEMCPY2D):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 2D arrays.
 * 
 */
  __pyx_tuple__1469 = PyTuple_Pack(3, __pyx_n_s_pCopy, __pyx_n_s_cpCopy_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1469)) __PYX_ERR(0, 15939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1469);
  __Pyx_GIVEREF(__pyx_tuple__1469);
  __pyx_codeobj__703 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1469, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpy2D, 15939, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__703)) __PYX_ERR(0, 15939, __pyx_L1_error)

  /* "cuda/cuda.pyx":16062
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy2DUnaligned(pCopy : CUDA_MEMCPY2D):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 2D arrays.
 * 
 */
  __pyx_tuple__1470 = PyTuple_Pack(3, __pyx_n_s_pCopy, __pyx_n_s_cpCopy_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1470)) __PYX_ERR(0, 16062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1470);
  __Pyx_GIVEREF(__pyx_tuple__1470);
  __pyx_codeobj__704 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1470, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpy2DUnaligned, 16062, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__704)) __PYX_ERR(0, 16062, __pyx_L1_error)

  /* "cuda/cuda.pyx":16185
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3D(pCopy : CUDA_MEMCPY3D):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 3D arrays.
 * 
 */
  __pyx_tuple__1471 = PyTuple_Pack(3, __pyx_n_s_pCopy, __pyx_n_s_cpCopy_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1471)) __PYX_ERR(0, 16185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1471);
  __Pyx_GIVEREF(__pyx_tuple__1471);
  __pyx_codeobj__705 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1471, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpy3D, 16185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__705)) __PYX_ERR(0, 16185, __pyx_L1_error)

  /* "cuda/cuda.pyx":16311
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3DPeer(pCopy : CUDA_MEMCPY3D_PEER):             # <<<<<<<<<<<<<<
 *     """ Copies memory between contexts.
 * 
 */
  __pyx_tuple__1472 = PyTuple_Pack(3, __pyx_n_s_pCopy, __pyx_n_s_cpCopy_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1472)) __PYX_ERR(0, 16311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1472);
  __Pyx_GIVEREF(__pyx_tuple__1472);
  __pyx_codeobj__706 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1472, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpy3DPeer, 16311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__706)) __PYX_ERR(0, 16311, __pyx_L1_error)

  /* "cuda/cuda.pyx":16337
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAsync(dst, src, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory asynchronously.
 * 
 */
  __pyx_tuple__1473 = PyTuple_Pack(11, __pyx_n_s_dst_2, __pyx_n_s_src, __pyx_n_s_ByteCount, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_csrc, __pyx_n_s_psrc, __pyx_n_s_cdst, __pyx_n_s_pdst, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1473)) __PYX_ERR(0, 16337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1473);
  __Pyx_GIVEREF(__pyx_tuple__1473);
  __pyx_codeobj__707 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1473, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyAsync, 16337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__707)) __PYX_ERR(0, 16337, __pyx_L1_error)

  /* "cuda/cuda.pyx":16401
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies device memory between two contexts asynchronously.
 * 
 */
  __pyx_tuple__1474 = PyTuple_Pack(17, __pyx_n_s_dstDevice_2, __pyx_n_s_dstContext_2, __pyx_n_s_srcDevice_2, __pyx_n_s_srcContext_2, __pyx_n_s_ByteCount, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_csrcContext, __pyx_n_s_psrcContext, __pyx_n_s_csrcDevice, __pyx_n_s_psrcDevice, __pyx_n_s_cdstContext, __pyx_n_s_pdstContext, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1474)) __PYX_ERR(0, 16401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1474);
  __Pyx_GIVEREF(__pyx_tuple__1474);
  __pyx_codeobj__708 = (PyObject*)__Pyx_PyCode_New(6, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1474, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyPeerAsync, 16401, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__708)) __PYX_ERR(0, 16401, __pyx_L1_error)

  /* "cuda/cuda.pyx":16488
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoDAsync(dstDevice, srcHost, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Device.
 * 
 */
  __pyx_tuple__1475 = PyTuple_Pack(11, __pyx_n_s_dstDevice_2, __pyx_n_s_srcHost_2, __pyx_n_s_ByteCount, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_csrcHost, __pyx_n_s_csrcHost_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1475)) __PYX_ERR(0, 16488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1475);
  __Pyx_GIVEREF(__pyx_tuple__1475);
  __pyx_codeobj__709 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1475, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyHtoDAsync, 16488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__709)) __PYX_ERR(0, 16488, __pyx_L1_error)

  /* "cuda/cuda.pyx":16541
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoHAsync(dstHost, srcDevice, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Host.
 * 
 */
  __pyx_tuple__1476 = PyTuple_Pack(11, __pyx_n_s_dstHost_2, __pyx_n_s_srcDevice_2, __pyx_n_s_ByteCount, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_csrcDevice, __pyx_n_s_psrcDevice, __pyx_n_s_cdstHost, __pyx_n_s_cdstHost_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1476)) __PYX_ERR(0, 16541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1476);
  __Pyx_GIVEREF(__pyx_tuple__1476);
  __pyx_codeobj__710 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1476, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyDtoHAsync, 16541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__710)) __PYX_ERR(0, 16541, __pyx_L1_error)

  /* "cuda/cuda.pyx":16594
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoDAsync(dstDevice, srcDevice, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Device.
 * 
 */
  __pyx_tuple__1477 = PyTuple_Pack(11, __pyx_n_s_dstDevice_2, __pyx_n_s_srcDevice_2, __pyx_n_s_ByteCount, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_csrcDevice, __pyx_n_s_psrcDevice, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1477)) __PYX_ERR(0, 16594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1477);
  __Pyx_GIVEREF(__pyx_tuple__1477);
  __pyx_codeobj__711 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1477, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyDtoDAsync, 16594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__711)) __PYX_ERR(0, 16594, __pyx_L1_error)

  /* "cuda/cuda.pyx":16655
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoAAsync(dstArray, size_t dstOffset, srcHost, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Array.
 * 
 */
  __pyx_tuple__1478 = PyTuple_Pack(12, __pyx_n_s_dstArray_2, __pyx_n_s_dstOffset, __pyx_n_s_srcHost_2, __pyx_n_s_ByteCount, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cdstArray, __pyx_n_s_pdstArray, __pyx_n_s_csrcHost, __pyx_n_s_csrcHost_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1478)) __PYX_ERR(0, 16655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1478);
  __Pyx_GIVEREF(__pyx_tuple__1478);
  __pyx_codeobj__712 = (PyObject*)__Pyx_PyCode_New(5, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1478, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyHtoAAsync, 16655, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__712)) __PYX_ERR(0, 16655, __pyx_L1_error)

  /* "cuda/cuda.pyx":16711
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoHAsync(dstHost, srcArray, size_t srcOffset, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Host.
 * 
 */
  __pyx_tuple__1479 = PyTuple_Pack(12, __pyx_n_s_dstHost_2, __pyx_n_s_srcArray_2, __pyx_n_s_srcOffset, __pyx_n_s_ByteCount, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_csrcArray, __pyx_n_s_psrcArray, __pyx_n_s_cdstHost, __pyx_n_s_cdstHost_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1479)) __PYX_ERR(0, 16711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1479);
  __Pyx_GIVEREF(__pyx_tuple__1479);
  __pyx_codeobj__713 = (PyObject*)__Pyx_PyCode_New(5, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1479, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpyAtoHAsync, 16711, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__713)) __PYX_ERR(0, 16711, __pyx_L1_error)

  /* "cuda/cuda.pyx":16767
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy2DAsync(pCopy : CUDA_MEMCPY2D, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 2D arrays.
 * 
 */
  __pyx_tuple__1480 = PyTuple_Pack(6, __pyx_n_s_pCopy, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cpCopy_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1480)) __PYX_ERR(0, 16767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1480);
  __Pyx_GIVEREF(__pyx_tuple__1480);
  __pyx_codeobj__714 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1480, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpy2DAsync, 16767, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__714)) __PYX_ERR(0, 16767, __pyx_L1_error)

  /* "cuda/cuda.pyx":16909
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3DAsync(pCopy : CUDA_MEMCPY3D, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 3D arrays.
 * 
 */
  __pyx_tuple__1481 = PyTuple_Pack(6, __pyx_n_s_pCopy, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cpCopy_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1481)) __PYX_ERR(0, 16909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1481);
  __Pyx_GIVEREF(__pyx_tuple__1481);
  __pyx_codeobj__715 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpy3DAsync, 16909, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__715)) __PYX_ERR(0, 16909, __pyx_L1_error)

  /* "cuda/cuda.pyx":17047
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3DPeerAsync(pCopy : CUDA_MEMCPY3D_PEER, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory between contexts asynchronously.
 * 
 */
  __pyx_tuple__1482 = PyTuple_Pack(6, __pyx_n_s_pCopy, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cpCopy_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1482)) __PYX_ERR(0, 17047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1482);
  __Pyx_GIVEREF(__pyx_tuple__1482);
  __pyx_codeobj__716 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1482, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemcpy3DPeerAsync, 17047, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__716)) __PYX_ERR(0, 17047, __pyx_L1_error)

  /* "cuda/cuda.pyx":17085
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD8(dstDevice, unsigned char uc, size_t N):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */
  __pyx_tuple__1483 = PyTuple_Pack(6, __pyx_n_s_dstDevice_2, __pyx_n_s_uc, __pyx_n_s_N, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1483)) __PYX_ERR(0, 17085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1483);
  __Pyx_GIVEREF(__pyx_tuple__1483);
  __pyx_codeobj__717 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1483, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemsetD8, 17085, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__717)) __PYX_ERR(0, 17085, __pyx_L1_error)

  /* "cuda/cuda.pyx":17122
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD16(dstDevice, unsigned short us, size_t N):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */
  __pyx_tuple__1484 = PyTuple_Pack(6, __pyx_n_s_dstDevice_2, __pyx_n_s_us, __pyx_n_s_N, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1484)) __PYX_ERR(0, 17122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1484);
  __Pyx_GIVEREF(__pyx_tuple__1484);
  __pyx_codeobj__718 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1484, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemsetD16, 17122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__718)) __PYX_ERR(0, 17122, __pyx_L1_error)

  /* "cuda/cuda.pyx":17160
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD32(dstDevice, unsigned int ui, size_t N):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */
  __pyx_tuple__1485 = PyTuple_Pack(6, __pyx_n_s_dstDevice_2, __pyx_n_s_ui, __pyx_n_s_N, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1485)) __PYX_ERR(0, 17160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1485);
  __Pyx_GIVEREF(__pyx_tuple__1485);
  __pyx_codeobj__719 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1485, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemsetD32, 17160, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__719)) __PYX_ERR(0, 17160, __pyx_L1_error)

  /* "cuda/cuda.pyx":17198
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D8(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */
  __pyx_tuple__1486 = PyTuple_Pack(8, __pyx_n_s_dstDevice_2, __pyx_n_s_dstPitch_2, __pyx_n_s_uc, __pyx_n_s_Width_2, __pyx_n_s_Height_2, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1486)) __PYX_ERR(0, 17198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1486);
  __Pyx_GIVEREF(__pyx_tuple__1486);
  __pyx_codeobj__720 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1486, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemsetD2D8, 17198, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__720)) __PYX_ERR(0, 17198, __pyx_L1_error)

  /* "cuda/cuda.pyx":17243
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D16(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */
  __pyx_tuple__1487 = PyTuple_Pack(8, __pyx_n_s_dstDevice_2, __pyx_n_s_dstPitch_2, __pyx_n_s_us, __pyx_n_s_Width_2, __pyx_n_s_Height_2, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1487)) __PYX_ERR(0, 17243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1487);
  __Pyx_GIVEREF(__pyx_tuple__1487);
  __pyx_codeobj__721 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1487, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemsetD2D16, 17243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__721)) __PYX_ERR(0, 17243, __pyx_L1_error)

  /* "cuda/cuda.pyx":17289
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D32(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */
  __pyx_tuple__1488 = PyTuple_Pack(8, __pyx_n_s_dstDevice_2, __pyx_n_s_dstPitch_2, __pyx_n_s_ui, __pyx_n_s_Width_2, __pyx_n_s_Height_2, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1488)) __PYX_ERR(0, 17289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1488);
  __Pyx_GIVEREF(__pyx_tuple__1488);
  __pyx_codeobj__722 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1488, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemsetD2D32, 17289, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__722)) __PYX_ERR(0, 17289, __pyx_L1_error)

  /* "cuda/cuda.pyx":17335
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD8Async(dstDevice, unsigned char uc, size_t N, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */
  __pyx_tuple__1489 = PyTuple_Pack(9, __pyx_n_s_dstDevice_2, __pyx_n_s_uc, __pyx_n_s_N, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1489)) __PYX_ERR(0, 17335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1489);
  __Pyx_GIVEREF(__pyx_tuple__1489);
  __pyx_codeobj__723 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1489, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemsetD8Async, 17335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__723)) __PYX_ERR(0, 17335, __pyx_L1_error)

  /* "cuda/cuda.pyx":17384
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD16Async(dstDevice, unsigned short us, size_t N, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */
  __pyx_tuple__1490 = PyTuple_Pack(9, __pyx_n_s_dstDevice_2, __pyx_n_s_us, __pyx_n_s_N, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1490)) __PYX_ERR(0, 17384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1490);
  __Pyx_GIVEREF(__pyx_tuple__1490);
  __pyx_codeobj__724 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1490, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemsetD16Async, 17384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__724)) __PYX_ERR(0, 17384, __pyx_L1_error)

  /* "cuda/cuda.pyx":17434
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD32Async(dstDevice, unsigned int ui, size_t N, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */
  __pyx_tuple__1491 = PyTuple_Pack(9, __pyx_n_s_dstDevice_2, __pyx_n_s_ui, __pyx_n_s_N, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1491)) __PYX_ERR(0, 17434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1491);
  __Pyx_GIVEREF(__pyx_tuple__1491);
  __pyx_codeobj__725 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1491, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemsetD32Async, 17434, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__725)) __PYX_ERR(0, 17434, __pyx_L1_error)

  /* "cuda/cuda.pyx":17484
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D8Async(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */
  __pyx_tuple__1492 = PyTuple_Pack(11, __pyx_n_s_dstDevice_2, __pyx_n_s_dstPitch_2, __pyx_n_s_uc, __pyx_n_s_Width_2, __pyx_n_s_Height_2, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1492)) __PYX_ERR(0, 17484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1492);
  __Pyx_GIVEREF(__pyx_tuple__1492);
  __pyx_codeobj__726 = (PyObject*)__Pyx_PyCode_New(6, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1492, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemsetD2D8Async, 17484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__726)) __PYX_ERR(0, 17484, __pyx_L1_error)

  /* "cuda/cuda.pyx":17541
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D16Async(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */
  __pyx_tuple__1493 = PyTuple_Pack(11, __pyx_n_s_dstDevice_2, __pyx_n_s_dstPitch_2, __pyx_n_s_us, __pyx_n_s_Width_2, __pyx_n_s_Height_2, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1493)) __PYX_ERR(0, 17541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1493);
  __Pyx_GIVEREF(__pyx_tuple__1493);
  __pyx_codeobj__727 = (PyObject*)__Pyx_PyCode_New(6, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1493, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemsetD2D16Async, 17541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__727)) __PYX_ERR(0, 17541, __pyx_L1_error)

  /* "cuda/cuda.pyx":17599
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D32Async(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */
  __pyx_tuple__1494 = PyTuple_Pack(11, __pyx_n_s_dstDevice_2, __pyx_n_s_dstPitch_2, __pyx_n_s_ui, __pyx_n_s_Width_2, __pyx_n_s_Height_2, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1494)) __PYX_ERR(0, 17599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1494);
  __Pyx_GIVEREF(__pyx_tuple__1494);
  __pyx_codeobj__728 = (PyObject*)__Pyx_PyCode_New(6, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1494, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemsetD2D32Async, 17599, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__728)) __PYX_ERR(0, 17599, __pyx_L1_error)

  /* "cuda/cuda.pyx":17657
 * 
 * @cython.embedsignature(True)
 * def cuArrayCreate(pAllocateArray : CUDA_ARRAY_DESCRIPTOR):             # <<<<<<<<<<<<<<
 *     """ Creates a 1D or 2D CUDA array.
 * 
 */
  __pyx_tuple__1495 = PyTuple_Pack(4, __pyx_n_s_pAllocateArray, __pyx_n_s_pHandle, __pyx_n_s_cpAllocateArray_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1495)) __PYX_ERR(0, 17657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1495);
  __Pyx_GIVEREF(__pyx_tuple__1495);
  __pyx_codeobj__729 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1495, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuArrayCreate, 17657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__729)) __PYX_ERR(0, 17657, __pyx_L1_error)

  /* "cuda/cuda.pyx":17722
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetDescriptor(hArray):             # <<<<<<<<<<<<<<
 *     """ Get a 1D or 2D CUDA array descriptor.
 * 
 */
  __pyx_tuple__1496 = PyTuple_Pack(5, __pyx_n_s_hArray_2, __pyx_n_s_chArray, __pyx_n_s_phArray, __pyx_n_s_pArrayDescriptor, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1496)) __PYX_ERR(0, 17722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1496);
  __Pyx_GIVEREF(__pyx_tuple__1496);
  __pyx_codeobj__730 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1496, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuArrayGetDescriptor, 17722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__730)) __PYX_ERR(0, 17722, __pyx_L1_error)

  /* "cuda/cuda.pyx":17761
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetSparseProperties(array):             # <<<<<<<<<<<<<<
 *     """ Returns the layout properties of a sparse CUDA array.
 * 
 */
  __pyx_tuple__1497 = PyTuple_Pack(5, __pyx_n_s_array_2, __pyx_n_s_carray, __pyx_n_s_parray, __pyx_n_s_sparseProperties, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1497)) __PYX_ERR(0, 17761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1497);
  __Pyx_GIVEREF(__pyx_tuple__1497);
  __pyx_codeobj__731 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1497, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuArrayGetSparseProperties, 17761, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__731)) __PYX_ERR(0, 17761, __pyx_L1_error)

  /* "cuda/cuda.pyx":17813
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayGetSparseProperties(mipmap):             # <<<<<<<<<<<<<<
 *     """ Returns the layout properties of a sparse CUDA mipmapped array.
 * 
 */
  __pyx_tuple__1498 = PyTuple_Pack(5, __pyx_n_s_mipmap_2, __pyx_n_s_cmipmap, __pyx_n_s_pmipmap, __pyx_n_s_sparseProperties, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1498)) __PYX_ERR(0, 17813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1498);
  __Pyx_GIVEREF(__pyx_tuple__1498);
  __pyx_codeobj__732 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1498, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMipmappedArrayGetSparsePropert, 17813, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__732)) __PYX_ERR(0, 17813, __pyx_L1_error)

  /* "cuda/cuda.pyx":17867
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetMemoryRequirements(array, device):             # <<<<<<<<<<<<<<
 *     """ Returns the memory requirements of a CUDA array.
 * 
 */
  __pyx_tuple__1499 = PyTuple_Pack(8, __pyx_n_s_array_2, __pyx_n_s_device, __pyx_n_s_cdevice, __pyx_n_s_pdevice, __pyx_n_s_carray, __pyx_n_s_parray, __pyx_n_s_memoryRequirements, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1499)) __PYX_ERR(0, 17867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1499);
  __Pyx_GIVEREF(__pyx_tuple__1499);
  __pyx_codeobj__733 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1499, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuArrayGetMemoryRequirements, 17867, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__733)) __PYX_ERR(0, 17867, __pyx_L1_error)

  /* "cuda/cuda.pyx":17923
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayGetMemoryRequirements(mipmap, device):             # <<<<<<<<<<<<<<
 *     """ Returns the memory requirements of a CUDA mipmapped array.
 * 
 */
  __pyx_tuple__1500 = PyTuple_Pack(8, __pyx_n_s_mipmap_2, __pyx_n_s_device, __pyx_n_s_cdevice, __pyx_n_s_pdevice, __pyx_n_s_cmipmap, __pyx_n_s_pmipmap, __pyx_n_s_memoryRequirements, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1500)) __PYX_ERR(0, 17923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1500);
  __Pyx_GIVEREF(__pyx_tuple__1500);
  __pyx_codeobj__734 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1500, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMipmappedArrayGetMemoryRequire, 17923, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__734)) __PYX_ERR(0, 17923, __pyx_L1_error)

  /* "cuda/cuda.pyx":17980
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetPlane(hArray, unsigned int planeIdx):             # <<<<<<<<<<<<<<
 *     """ Gets a CUDA array plane from a CUDA array.
 * 
 */
  __pyx_tuple__1501 = PyTuple_Pack(6, __pyx_n_s_hArray_2, __pyx_n_s_planeIdx, __pyx_n_s_chArray, __pyx_n_s_phArray, __pyx_n_s_pPlaneArray, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1501)) __PYX_ERR(0, 17980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1501);
  __Pyx_GIVEREF(__pyx_tuple__1501);
  __pyx_codeobj__735 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1501, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuArrayGetPlane, 17980, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__735)) __PYX_ERR(0, 17980, __pyx_L1_error)

  /* "cuda/cuda.pyx":18032
 * 
 * @cython.embedsignature(True)
 * def cuArrayDestroy(hArray):             # <<<<<<<<<<<<<<
 *     """ Destroys a CUDA array.
 * 
 */
  __pyx_tuple__1502 = PyTuple_Pack(4, __pyx_n_s_hArray_2, __pyx_n_s_chArray, __pyx_n_s_phArray, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1502)) __PYX_ERR(0, 18032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1502);
  __Pyx_GIVEREF(__pyx_tuple__1502);
  __pyx_codeobj__736 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1502, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuArrayDestroy, 18032, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__736)) __PYX_ERR(0, 18032, __pyx_L1_error)

  /* "cuda/cuda.pyx":18065
 * 
 * @cython.embedsignature(True)
 * def cuArray3DCreate(pAllocateArray : CUDA_ARRAY3D_DESCRIPTOR):             # <<<<<<<<<<<<<<
 *     """ Creates a 3D CUDA array.
 * 
 */
  __pyx_tuple__1503 = PyTuple_Pack(4, __pyx_n_s_pAllocateArray, __pyx_n_s_pHandle, __pyx_n_s_cpAllocateArray_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1503)) __PYX_ERR(0, 18065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1503);
  __Pyx_GIVEREF(__pyx_tuple__1503);
  __pyx_codeobj__737 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1503, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuArray3DCreate, 18065, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__737)) __PYX_ERR(0, 18065, __pyx_L1_error)

  /* "cuda/cuda.pyx":18194
 * 
 * @cython.embedsignature(True)
 * def cuArray3DGetDescriptor(hArray):             # <<<<<<<<<<<<<<
 *     """ Get a 3D CUDA array descriptor.
 * 
 */
  __pyx_tuple__1504 = PyTuple_Pack(5, __pyx_n_s_hArray_2, __pyx_n_s_chArray, __pyx_n_s_phArray, __pyx_n_s_pArrayDescriptor, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1504)) __PYX_ERR(0, 18194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1504);
  __Pyx_GIVEREF(__pyx_tuple__1504);
  __pyx_codeobj__738 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1504, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuArray3DGetDescriptor, 18194, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__738)) __PYX_ERR(0, 18194, __pyx_L1_error)

  /* "cuda/cuda.pyx":18237
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayCreate(pMipmappedArrayDesc : CUDA_ARRAY3D_DESCRIPTOR, unsigned int numMipmapLevels):             # <<<<<<<<<<<<<<
 *     """ Creates a CUDA mipmapped array.
 * 
 */
  __pyx_tuple__1505 = PyTuple_Pack(5, __pyx_n_s_pMipmappedArrayDesc, __pyx_n_s_numMipmapLevels, __pyx_n_s_pHandle, __pyx_n_s_cpMipmappedArrayDesc_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1505)) __PYX_ERR(0, 18237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1505);
  __Pyx_GIVEREF(__pyx_tuple__1505);
  __pyx_codeobj__739 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1505, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMipmappedArrayCreate, 18237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__739)) __PYX_ERR(0, 18237, __pyx_L1_error)

  /* "cuda/cuda.pyx":18354
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayGetLevel(hMipmappedArray, unsigned int level):             # <<<<<<<<<<<<<<
 *     """ Gets a mipmap level of a CUDA mipmapped array.
 * 
 */
  __pyx_tuple__1506 = PyTuple_Pack(6, __pyx_n_s_hMipmappedArray_2, __pyx_n_s_level_2, __pyx_n_s_chMipmappedArray, __pyx_n_s_phMipmappedArray, __pyx_n_s_pLevelArray, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1506)) __PYX_ERR(0, 18354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1506);
  __Pyx_GIVEREF(__pyx_tuple__1506);
  __pyx_codeobj__740 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1506, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMipmappedArrayGetLevel, 18354, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__740)) __PYX_ERR(0, 18354, __pyx_L1_error)

  /* "cuda/cuda.pyx":18396
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayDestroy(hMipmappedArray):             # <<<<<<<<<<<<<<
 *     """ Destroys a CUDA mipmapped array.
 * 
 */
  __pyx_tuple__1507 = PyTuple_Pack(4, __pyx_n_s_hMipmappedArray_2, __pyx_n_s_chMipmappedArray, __pyx_n_s_phMipmappedArray, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1507)) __PYX_ERR(0, 18396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1507);
  __Pyx_GIVEREF(__pyx_tuple__1507);
  __pyx_codeobj__741 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1507, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMipmappedArrayDestroy, 18396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__741)) __PYX_ERR(0, 18396, __pyx_L1_error)

  /* "cuda/cuda.pyx":18429
 * 
 * @cython.embedsignature(True)
 * def cuMemGetHandleForAddressRange(dptr, size_t size, handleType not None : CUmemRangeHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Retrieve handle for an address range.
 * 
 */
  __pyx_tuple__1508 = PyTuple_Pack(10, __pyx_n_s_dptr_2, __pyx_n_s_size_2, __pyx_n_s_handleType, __pyx_n_s_flags_2, __pyx_n_s_cdptr, __pyx_n_s_pdptr, __pyx_n_s_handle_2, __pyx_n_s_chandle_ptr, __pyx_n_s_chandleType, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1508)) __PYX_ERR(0, 18429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1508);
  __Pyx_GIVEREF(__pyx_tuple__1508);
  __pyx_codeobj__742 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1508, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemGetHandleForAddressRange, 18429, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__742)) __PYX_ERR(0, 18429, __pyx_L1_error)

  /* "cuda/cuda.pyx":18492
 * 
 * @cython.embedsignature(True)
 * def cuMemAddressReserve(size_t size, size_t alignment, addr, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Allocate an address range reservation.
 * 
 */
  __pyx_tuple__1509 = PyTuple_Pack(8, __pyx_n_s_size_2, __pyx_n_s_alignment_2, __pyx_n_s_addr, __pyx_n_s_flags_2, __pyx_n_s_caddr, __pyx_n_s_paddr, __pyx_n_s_ptr_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1509)) __PYX_ERR(0, 18492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1509);
  __Pyx_GIVEREF(__pyx_tuple__1509);
  __pyx_codeobj__743 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1509, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemAddressReserve, 18492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__743)) __PYX_ERR(0, 18492, __pyx_L1_error)

  /* "cuda/cuda.pyx":18538
 * 
 * @cython.embedsignature(True)
 * def cuMemAddressFree(ptr, size_t size):             # <<<<<<<<<<<<<<
 *     """ Free an address range reservation.
 * 
 */
  __pyx_tuple__1510 = PyTuple_Pack(5, __pyx_n_s_ptr_2, __pyx_n_s_size_2, __pyx_n_s_cptr, __pyx_n_s_pptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1510)) __PYX_ERR(0, 18538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1510);
  __Pyx_GIVEREF(__pyx_tuple__1510);
  __pyx_codeobj__744 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1510, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemAddressFree, 18538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__744)) __PYX_ERR(0, 18538, __pyx_L1_error)

  /* "cuda/cuda.pyx":18575
 * 
 * @cython.embedsignature(True)
 * def cuMemCreate(size_t size, prop : CUmemAllocationProp, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA memory handle representing a memory allocation of a given size described by the given properties.
 * 
 */
  __pyx_tuple__1511 = PyTuple_Pack(6, __pyx_n_s_size_2, __pyx_n_s_prop, __pyx_n_s_flags_2, __pyx_n_s_handle_2, __pyx_n_s_cprop_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1511)) __PYX_ERR(0, 18575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1511);
  __Pyx_GIVEREF(__pyx_tuple__1511);
  __pyx_codeobj__745 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1511, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemCreate, 18575, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__745)) __PYX_ERR(0, 18575, __pyx_L1_error)

  /* "cuda/cuda.pyx":18624
 * 
 * @cython.embedsignature(True)
 * def cuMemRelease(handle):             # <<<<<<<<<<<<<<
 *     """ Release a memory handle representing a memory allocation which was previously allocated through cuMemCreate.
 * 
 */
  __pyx_tuple__1512 = PyTuple_Pack(4, __pyx_n_s_handle_2, __pyx_n_s_chandle, __pyx_n_s_phandle, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1512)) __PYX_ERR(0, 18624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1512);
  __Pyx_GIVEREF(__pyx_tuple__1512);
  __pyx_codeobj__746 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1512, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemRelease, 18624, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__746)) __PYX_ERR(0, 18624, __pyx_L1_error)

  /* "cuda/cuda.pyx":18666
 * 
 * @cython.embedsignature(True)
 * def cuMemMap(ptr, size_t size, size_t offset, handle, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Maps an allocation handle to a reserved virtual address range.
 * 
 */
  __pyx_tuple__1513 = PyTuple_Pack(10, __pyx_n_s_ptr_2, __pyx_n_s_size_2, __pyx_n_s_offset_2, __pyx_n_s_handle_2, __pyx_n_s_flags_2, __pyx_n_s_chandle, __pyx_n_s_phandle, __pyx_n_s_cptr, __pyx_n_s_pptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1513)) __PYX_ERR(0, 18666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1513);
  __Pyx_GIVEREF(__pyx_tuple__1513);
  __pyx_codeobj__747 = (PyObject*)__Pyx_PyCode_New(5, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1513, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemMap, 18666, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__747)) __PYX_ERR(0, 18666, __pyx_L1_error)

  /* "cuda/cuda.pyx":18736
 * 
 * @cython.embedsignature(True)
 * def cuMemMapArrayAsync(mapInfoList : List[CUarrayMapInfo], unsigned int count, hStream):             # <<<<<<<<<<<<<<
 *     """ Maps or unmaps subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays.
 * 
 */
  __pyx_tuple__1514 = PyTuple_Pack(10, __pyx_n_s_mapInfoList, __pyx_n_s_count_2, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cmapInfoList, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1514)) __PYX_ERR(0, 18736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1514);
  __Pyx_GIVEREF(__pyx_tuple__1514);
  __pyx_codeobj__748 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1514, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemMapArrayAsync, 18736, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__748)) __PYX_ERR(0, 18736, __pyx_L1_error)

  /* "cuda/cuda.pyx":18908
 * 
 * @cython.embedsignature(True)
 * def cuMemUnmap(ptr, size_t size):             # <<<<<<<<<<<<<<
 *     """ Unmap the backing memory of a given address range.
 * 
 */
  __pyx_tuple__1515 = PyTuple_Pack(5, __pyx_n_s_ptr_2, __pyx_n_s_size_2, __pyx_n_s_cptr, __pyx_n_s_pptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1515)) __PYX_ERR(0, 18908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1515);
  __Pyx_GIVEREF(__pyx_tuple__1515);
  __pyx_codeobj__750 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1515, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemUnmap, 18908, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__750)) __PYX_ERR(0, 18908, __pyx_L1_error)

  /* "cuda/cuda.pyx":18954
 * 
 * @cython.embedsignature(True)
 * def cuMemSetAccess(ptr, size_t size, desc : List[CUmemAccessDesc], size_t count):             # <<<<<<<<<<<<<<
 *     """ Set the access flags for each location specified in `desc` for the given virtual address range.
 * 
 */
  __pyx_tuple__1516 = PyTuple_Pack(11, __pyx_n_s_ptr_2, __pyx_n_s_size_2, __pyx_n_s_desc, __pyx_n_s_count_2, __pyx_n_s_cptr, __pyx_n_s_pptr, __pyx_n_s_cdesc, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1516)) __PYX_ERR(0, 18954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1516);
  __Pyx_GIVEREF(__pyx_tuple__1516);
  __pyx_codeobj__751 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1516, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemSetAccess, 18954, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__751)) __PYX_ERR(0, 18954, __pyx_L1_error)

  /* "cuda/cuda.pyx":19013
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAccess(location : CUmemLocation, ptr):             # <<<<<<<<<<<<<<
 *     """ Get the access `flags` set for the given `location` and `ptr`.
 * 
 */
  __pyx_tuple__1517 = PyTuple_Pack(7, __pyx_n_s_location_2, __pyx_n_s_ptr_2, __pyx_n_s_cptr, __pyx_n_s_pptr, __pyx_n_s_flags_2, __pyx_n_s_clocation_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1517)) __PYX_ERR(0, 19013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1517);
  __Pyx_GIVEREF(__pyx_tuple__1517);
  __pyx_codeobj__753 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1517, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemGetAccess, 19013, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__753)) __PYX_ERR(0, 19013, __pyx_L1_error)

  /* "cuda/cuda.pyx":19050
 * 
 * @cython.embedsignature(True)
 * def cuMemExportToShareableHandle(handle, handleType not None : CUmemAllocationHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Exports an allocation to a requested shareable handle type.
 * 
 */
  __pyx_tuple__1518 = PyTuple_Pack(9, __pyx_n_s_handle_2, __pyx_n_s_handleType, __pyx_n_s_flags_2, __pyx_n_s_chandle, __pyx_n_s_phandle, __pyx_n_s_cshareableHandle, __pyx_n_s_cshareableHandle_ptr, __pyx_n_s_chandleType, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1518)) __PYX_ERR(0, 19050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1518);
  __Pyx_GIVEREF(__pyx_tuple__1518);
  __pyx_codeobj__754 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1518, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemExportToShareableHandle, 19050, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__754)) __PYX_ERR(0, 19050, __pyx_L1_error)

  /* "cuda/cuda.pyx":19106
 * 
 * @cython.embedsignature(True)
 * def cuMemImportFromShareableHandle(osHandle, shHandleType not None : CUmemAllocationHandleType):             # <<<<<<<<<<<<<<
 *     """ Imports an allocation from a requested shareable handle type.
 * 
 */
  __pyx_tuple__1519 = PyTuple_Pack(7, __pyx_n_s_osHandle, __pyx_n_s_shHandleType, __pyx_n_s_handle_2, __pyx_n_s_cosHandle, __pyx_n_s_cosHandle_ptr, __pyx_n_s_cshHandleType, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1519)) __PYX_ERR(0, 19106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1519);
  __Pyx_GIVEREF(__pyx_tuple__1519);
  __pyx_codeobj__755 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1519, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemImportFromShareableHandle, 19106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__755)) __PYX_ERR(0, 19106, __pyx_L1_error)

  /* "cuda/cuda.pyx":19144
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAllocationGranularity(prop : CUmemAllocationProp, option not None : CUmemAllocationGranularity_flags):             # <<<<<<<<<<<<<<
 *     """ Calculates either the minimal or recommended granularity.
 * 
 */
  __pyx_tuple__1520 = PyTuple_Pack(6, __pyx_n_s_prop, __pyx_n_s_option, __pyx_n_s_granularity, __pyx_n_s_cprop_ptr, __pyx_n_s_coption, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1520)) __PYX_ERR(0, 19144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1520);
  __Pyx_GIVEREF(__pyx_tuple__1520);
  __pyx_codeobj__756 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1520, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemGetAllocationGranularity, 19144, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__756)) __PYX_ERR(0, 19144, __pyx_L1_error)

  /* "cuda/cuda.pyx":19177
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAllocationPropertiesFromHandle(handle):             # <<<<<<<<<<<<<<
 *     """ Retrieve the contents of the property structure defining properties for this handle.
 * 
 */
  __pyx_tuple__1521 = PyTuple_Pack(5, __pyx_n_s_handle_2, __pyx_n_s_chandle, __pyx_n_s_phandle, __pyx_n_s_prop, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1521)) __PYX_ERR(0, 19177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1521);
  __Pyx_GIVEREF(__pyx_tuple__1521);
  __pyx_codeobj__757 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1521, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemGetAllocationPropertiesFrom, 19177, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__757)) __PYX_ERR(0, 19177, __pyx_L1_error)

  /* "cuda/cuda.pyx":19212
 * 
 * @cython.embedsignature(True)
 * def cuMemRetainAllocationHandle(addr):             # <<<<<<<<<<<<<<
 *     """ Given an address `addr`, returns the allocation handle of the backing memory allocation.
 * 
 */
  __pyx_tuple__1522 = PyTuple_Pack(5, __pyx_n_s_addr, __pyx_n_s_handle_2, __pyx_n_s_caddr, __pyx_n_s_caddr_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1522)) __PYX_ERR(0, 19212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1522);
  __Pyx_GIVEREF(__pyx_tuple__1522);
  __pyx_codeobj__758 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1522, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemRetainAllocationHandle, 19212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__758)) __PYX_ERR(0, 19212, __pyx_L1_error)

  /* "cuda/cuda.pyx":19247
 * 
 * @cython.embedsignature(True)
 * def cuMemFreeAsync(dptr, hStream):             # <<<<<<<<<<<<<<
 *     """ Frees memory with stream ordered semantics.
 * 
 */
  __pyx_tuple__1523 = PyTuple_Pack(7, __pyx_n_s_dptr_2, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cdptr, __pyx_n_s_pdptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1523)) __PYX_ERR(0, 19247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1523);
  __Pyx_GIVEREF(__pyx_tuple__1523);
  __pyx_codeobj__759 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1523, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemFreeAsync, 19247, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__759)) __PYX_ERR(0, 19247, __pyx_L1_error)

  /* "cuda/cuda.pyx":19295
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocAsync(size_t bytesize, hStream):             # <<<<<<<<<<<<<<
 *     """ Allocates memory with stream ordered semantics.
 * 
 */
  __pyx_tuple__1524 = PyTuple_Pack(6, __pyx_n_s_bytesize_2, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_dptr_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1524)) __PYX_ERR(0, 19295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1524);
  __Pyx_GIVEREF(__pyx_tuple__1524);
  __pyx_codeobj__760 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1524, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemAllocAsync, 19295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__760)) __PYX_ERR(0, 19295, __pyx_L1_error)

  /* "cuda/cuda.pyx":19345
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolTrimTo(pool, size_t minBytesToKeep):             # <<<<<<<<<<<<<<
 *     """ Tries to release memory back to the OS.
 * 
 */
  __pyx_tuple__1525 = PyTuple_Pack(5, __pyx_n_s_pool, __pyx_n_s_minBytesToKeep, __pyx_n_s_cpool, __pyx_n_s_ppool, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1525)) __PYX_ERR(0, 19345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1525);
  __Pyx_GIVEREF(__pyx_tuple__1525);
  __pyx_codeobj__761 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1525, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemPoolTrimTo, 19345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__761)) __PYX_ERR(0, 19345, __pyx_L1_error)

  /* "cuda/cuda.pyx":19393
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolSetAttribute(pool, attr not None : CUmemPool_attribute, value):             # <<<<<<<<<<<<<<
 *     """ Sets attributes of a memory pool.
 * 
 */
  __pyx_tuple__1526 = PyTuple_Pack(9, __pyx_n_s_pool, __pyx_n_s_attr, __pyx_n_s_value, __pyx_n_s_cpool, __pyx_n_s_ppool, __pyx_n_s_cattr, __pyx_n_s_cvalue, __pyx_n_s_cvalue_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1526)) __PYX_ERR(0, 19393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1526);
  __Pyx_GIVEREF(__pyx_tuple__1526);
  __pyx_codeobj__762 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1526, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemPoolSetAttribute, 19393, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__762)) __PYX_ERR(0, 19393, __pyx_L1_error)

  /* "cuda/cuda.pyx":19466
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolGetAttribute(pool, attr not None : CUmemPool_attribute):             # <<<<<<<<<<<<<<
 *     """ Gets attributes of a memory pool.
 * 
 */
  __pyx_tuple__1527 = PyTuple_Pack(8, __pyx_n_s_pool, __pyx_n_s_attr, __pyx_n_s_cpool, __pyx_n_s_ppool, __pyx_n_s_cattr, __pyx_n_s_cvalue, __pyx_n_s_cvalue_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1527)) __PYX_ERR(0, 19466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1527);
  __Pyx_GIVEREF(__pyx_tuple__1527);
  __pyx_codeobj__763 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1527, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemPoolGetAttribute, 19466, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__763)) __PYX_ERR(0, 19466, __pyx_L1_error)

  /* "cuda/cuda.pyx":19546
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolSetAccess(pool, map : List[CUmemAccessDesc], size_t count):             # <<<<<<<<<<<<<<
 *     """ Controls visibility of pools between devices.
 * 
 */
  __pyx_tuple__1528 = PyTuple_Pack(10, __pyx_n_s_pool, __pyx_n_s_map, __pyx_n_s_count_2, __pyx_n_s_cpool, __pyx_n_s_ppool, __pyx_n_s_cmap, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1528)) __PYX_ERR(0, 19546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1528);
  __Pyx_GIVEREF(__pyx_tuple__1528);
  __pyx_codeobj__764 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1528, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemPoolSetAccess, 19546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__764)) __PYX_ERR(0, 19546, __pyx_L1_error)

  /* "cuda/cuda.pyx":19597
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolGetAccess(memPool, location : CUmemLocation):             # <<<<<<<<<<<<<<
 *     """ Returns the accessibility of a pool from a device.
 * 
 */
  __pyx_tuple__1529 = PyTuple_Pack(7, __pyx_n_s_memPool, __pyx_n_s_location_2, __pyx_n_s_cmemPool, __pyx_n_s_pmemPool, __pyx_n_s_flags_2, __pyx_n_s_clocation_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1529)) __PYX_ERR(0, 19597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1529);
  __Pyx_GIVEREF(__pyx_tuple__1529);
  __pyx_codeobj__766 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1529, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemPoolGetAccess, 19597, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__766)) __PYX_ERR(0, 19597, __pyx_L1_error)

  /* "cuda/cuda.pyx":19637
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolCreate(poolProps : CUmemPoolProps):             # <<<<<<<<<<<<<<
 *     """ Creates a memory pool.
 * 
 */
  __pyx_tuple__1530 = PyTuple_Pack(4, __pyx_n_s_poolProps_2, __pyx_n_s_pool, __pyx_n_s_cpoolProps_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1530)) __PYX_ERR(0, 19637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1530);
  __Pyx_GIVEREF(__pyx_tuple__1530);
  __pyx_codeobj__767 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1530, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemPoolCreate, 19637, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__767)) __PYX_ERR(0, 19637, __pyx_L1_error)

  /* "cuda/cuda.pyx":19673
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolDestroy(pool):             # <<<<<<<<<<<<<<
 *     """ Destroys the specified memory pool.
 * 
 */
  __pyx_tuple__1531 = PyTuple_Pack(4, __pyx_n_s_pool, __pyx_n_s_cpool, __pyx_n_s_ppool, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1531)) __PYX_ERR(0, 19673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1531);
  __Pyx_GIVEREF(__pyx_tuple__1531);
  __pyx_codeobj__768 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1531, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemPoolDestroy, 19673, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__768)) __PYX_ERR(0, 19673, __pyx_L1_error)

  /* "cuda/cuda.pyx":19717
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocFromPoolAsync(size_t bytesize, pool, hStream):             # <<<<<<<<<<<<<<
 *     """ Allocates memory from a specified pool with stream ordered semantics.
 * 
 */
  __pyx_tuple__1532 = PyTuple_Pack(9, __pyx_n_s_bytesize_2, __pyx_n_s_pool, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cpool, __pyx_n_s_ppool, __pyx_n_s_dptr_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1532)) __PYX_ERR(0, 19717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1532);
  __Pyx_GIVEREF(__pyx_tuple__1532);
  __pyx_codeobj__769 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1532, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemAllocFromPoolAsync, 19717, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__769)) __PYX_ERR(0, 19717, __pyx_L1_error)

  /* "cuda/cuda.pyx":19774
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolExportToShareableHandle(pool, handleType not None : CUmemAllocationHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Exports a memory pool to the requested handle type.
 * 
 */
  __pyx_tuple__1533 = PyTuple_Pack(9, __pyx_n_s_pool, __pyx_n_s_handleType, __pyx_n_s_flags_2, __pyx_n_s_cpool, __pyx_n_s_ppool, __pyx_n_s_chandle_out, __pyx_n_s_chandle_out_ptr, __pyx_n_s_chandleType, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1533)) __PYX_ERR(0, 19774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1533);
  __Pyx_GIVEREF(__pyx_tuple__1533);
  __pyx_codeobj__770 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1533, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemPoolExportToShareableHandle, 19774, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__770)) __PYX_ERR(0, 19774, __pyx_L1_error)

  /* "cuda/cuda.pyx":19827
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolImportFromShareableHandle(handle, handleType not None : CUmemAllocationHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ imports a memory pool from a shared handle.
 * 
 */
  __pyx_tuple__1534 = PyTuple_Pack(8, __pyx_n_s_handle_2, __pyx_n_s_handleType, __pyx_n_s_flags_2, __pyx_n_s_pool_out, __pyx_n_s_chandle, __pyx_n_s_chandle_ptr, __pyx_n_s_chandleType, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1534)) __PYX_ERR(0, 19827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1534);
  __Pyx_GIVEREF(__pyx_tuple__1534);
  __pyx_codeobj__771 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1534, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemPoolImportFromShareableHand, 19827, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__771)) __PYX_ERR(0, 19827, __pyx_L1_error)

  /* "cuda/cuda.pyx":19865
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolExportPointer(ptr):             # <<<<<<<<<<<<<<
 *     """ Export data to share a memory pool allocation between processes.
 * 
 */
  __pyx_tuple__1535 = PyTuple_Pack(5, __pyx_n_s_ptr_2, __pyx_n_s_cptr, __pyx_n_s_pptr, __pyx_n_s_shareData_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1535)) __PYX_ERR(0, 19865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1535);
  __Pyx_GIVEREF(__pyx_tuple__1535);
  __pyx_codeobj__772 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1535, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemPoolExportPointer, 19865, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__772)) __PYX_ERR(0, 19865, __pyx_L1_error)

  /* "cuda/cuda.pyx":19904
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolImportPointer(pool, shareData : CUmemPoolPtrExportData):             # <<<<<<<<<<<<<<
 *     """ Import a memory pool allocation from another process.
 * 
 */
  __pyx_tuple__1536 = PyTuple_Pack(7, __pyx_n_s_pool, __pyx_n_s_shareData, __pyx_n_s_cpool, __pyx_n_s_ppool, __pyx_n_s_ptr_out, __pyx_n_s_cshareData_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1536)) __PYX_ERR(0, 19904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1536);
  __Pyx_GIVEREF(__pyx_tuple__1536);
  __pyx_codeobj__773 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1536, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemPoolImportPointer, 19904, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__773)) __PYX_ERR(0, 19904, __pyx_L1_error)

  /* "cuda/cuda.pyx":19953
 * 
 * @cython.embedsignature(True)
 * def cuPointerGetAttribute(attribute not None : CUpointer_attribute, ptr):             # <<<<<<<<<<<<<<
 *     """ Returns information about a pointer.
 * 
 */
  __pyx_tuple__1537 = PyTuple_Pack(8, __pyx_n_s_attribute, __pyx_n_s_ptr_2, __pyx_n_s_cptr, __pyx_n_s_pptr, __pyx_n_s_cdata, __pyx_n_s_cdata_ptr, __pyx_n_s_cattribute, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1537)) __PYX_ERR(0, 19953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1537);
  __Pyx_GIVEREF(__pyx_tuple__1537);
  __pyx_codeobj__774 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1537, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuPointerGetAttribute, 19953, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__774)) __PYX_ERR(0, 19953, __pyx_L1_error)

  /* "cuda/cuda.pyx":20156
 * 
 * @cython.embedsignature(True)
 * def cuMemPrefetchAsync(devPtr, size_t count, dstDevice, hStream):             # <<<<<<<<<<<<<<
 *     """ Prefetches memory to the specified destination device.
 * 
 */
  __pyx_tuple__1538 = PyTuple_Pack(11, __pyx_n_s_devPtr_2, __pyx_n_s_count_2, __pyx_n_s_dstDevice_2, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_cdevPtr, __pyx_n_s_pdevPtr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1538)) __PYX_ERR(0, 20156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1538);
  __Pyx_GIVEREF(__pyx_tuple__1538);
  __pyx_codeobj__775 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1538, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemPrefetchAsync, 20156, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__775)) __PYX_ERR(0, 20156, __pyx_L1_error)

  /* "cuda/cuda.pyx":20269
 * 
 * @cython.embedsignature(True)
 * def cuMemAdvise(devPtr, size_t count, advice not None : CUmem_advise, device):             # <<<<<<<<<<<<<<
 *     """ Advise about the usage of a given memory range.
 * 
 */
  __pyx_tuple__1539 = PyTuple_Pack(10, __pyx_n_s_devPtr_2, __pyx_n_s_count_2, __pyx_n_s_advice, __pyx_n_s_device, __pyx_n_s_cdevice, __pyx_n_s_pdevice, __pyx_n_s_cdevPtr, __pyx_n_s_pdevPtr, __pyx_n_s_cadvice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1539)) __PYX_ERR(0, 20269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1539);
  __Pyx_GIVEREF(__pyx_tuple__1539);
  __pyx_codeobj__776 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1539, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemAdvise, 20269, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__776)) __PYX_ERR(0, 20269, __pyx_L1_error)

  /* "cuda/cuda.pyx":20454
 * 
 * @cython.embedsignature(True)
 * def cuMemRangeGetAttribute(size_t dataSize, attribute not None : CUmem_range_attribute, devPtr, size_t count):             # <<<<<<<<<<<<<<
 *     """ Query an attribute of a given memory range.
 * 
 */
  __pyx_tuple__1540 = PyTuple_Pack(10, __pyx_n_s_dataSize, __pyx_n_s_attribute, __pyx_n_s_devPtr_2, __pyx_n_s_count_2, __pyx_n_s_cdevPtr, __pyx_n_s_pdevPtr, __pyx_n_s_cdata, __pyx_n_s_cdata_ptr, __pyx_n_s_cattribute, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1540)) __PYX_ERR(0, 20454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1540);
  __Pyx_GIVEREF(__pyx_tuple__1540);
  __pyx_codeobj__777 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1540, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemRangeGetAttribute, 20454, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__777)) __PYX_ERR(0, 20454, __pyx_L1_error)

  /* "cuda/cuda.pyx":20551
 * 
 * @cython.embedsignature(True)
 * def cuMemRangeGetAttributes(dataSizes : List[int], attributes : List[CUmem_range_attribute], size_t numAttributes, devPtr, size_t count):             # <<<<<<<<<<<<<<
 *     """ Query attributes of a given memory range.
 * 
 */
  __pyx_tuple__1541 = PyTuple_Pack(20, __pyx_n_s_dataSizes, __pyx_n_s_attributes, __pyx_n_s_numAttributes, __pyx_n_s_devPtr_2, __pyx_n_s_count_2, __pyx_n_s_cdevPtr, __pyx_n_s_pdevPtr, __pyx_n_s_pylist, __pyx_n_s_voidStarHelper, __pyx_n_s_cvoidStarHelper_ptr, __pyx_n_s_cdataSizes, __pyx_n_s_cattributes, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_pyattributes, __pyx_n_s_pydataSizes, __pyx_n_s_pyattributes, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__1541)) __PYX_ERR(0, 20551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1541);
  __Pyx_GIVEREF(__pyx_tuple__1541);
  __pyx_codeobj__778 = (PyObject*)__Pyx_PyCode_New(5, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1541, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuMemRangeGetAttributes, 20551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__778)) __PYX_ERR(0, 20551, __pyx_L1_error)

  /* "cuda/cuda.pyx":20628
 * 
 * @cython.embedsignature(True)
 * def cuPointerSetAttribute(value, attribute not None : CUpointer_attribute, ptr):             # <<<<<<<<<<<<<<
 *     """ Set attributes on a previously allocated memory region.
 * 
 */
  __pyx_tuple__1542 = PyTuple_Pack(9, __pyx_n_s_value, __pyx_n_s_attribute, __pyx_n_s_ptr_2, __pyx_n_s_cptr, __pyx_n_s_pptr, __pyx_n_s_cvalue, __pyx_n_s_cvalue_ptr, __pyx_n_s_cattribute, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1542)) __PYX_ERR(0, 20628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1542);
  __Pyx_GIVEREF(__pyx_tuple__1542);
  __pyx_codeobj__781 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1542, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuPointerSetAttribute, 20628, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__781)) __PYX_ERR(0, 20628, __pyx_L1_error)

  /* "cuda/cuda.pyx":20682
 * 
 * @cython.embedsignature(True)
 * def cuPointerGetAttributes(unsigned int numAttributes, attributes : List[CUpointer_attribute], ptr):             # <<<<<<<<<<<<<<
 *     """ Returns information about a pointer.
 * 
 */
  __pyx_tuple__1543 = PyTuple_Pack(15, __pyx_n_s_numAttributes, __pyx_n_s_attributes, __pyx_n_s_ptr_2, __pyx_n_s_cptr, __pyx_n_s_pptr, __pyx_n_s_cattributes, __pyx_n_s_pylist, __pyx_n_s_voidStarHelper, __pyx_n_s_cvoidStarHelper_ptr, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_pyattributes, __pyx_n_s_pyattributes, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__1543)) __PYX_ERR(0, 20682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1543);
  __Pyx_GIVEREF(__pyx_tuple__1543);
  __pyx_codeobj__782 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1543, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuPointerGetAttributes, 20682, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__782)) __PYX_ERR(0, 20682, __pyx_L1_error)

  /* "cuda/cuda.pyx":20771
 * 
 * @cython.embedsignature(True)
 * def cuStreamCreate(unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Create a stream.
 * 
 */
  __pyx_tuple__1544 = PyTuple_Pack(4, __pyx_n_s_Flags_2, __pyx_n_s_Flags_2, __pyx_n_s_phStream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1544)) __PYX_ERR(0, 20771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1544);
  __Pyx_GIVEREF(__pyx_tuple__1544);
  __pyx_codeobj__784 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1544, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamCreate, 20771, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__784)) __PYX_ERR(0, 20771, __pyx_L1_error)

  /* "cuda/cuda.pyx":20807
 * 
 * @cython.embedsignature(True)
 * def cuStreamCreateWithPriority(unsigned int flags, int priority):             # <<<<<<<<<<<<<<
 *     """ Create a stream with the given priority.
 * 
 */
  __pyx_tuple__1545 = PyTuple_Pack(4, __pyx_n_s_flags_2, __pyx_n_s_priority_2, __pyx_n_s_phStream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1545)) __PYX_ERR(0, 20807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1545);
  __Pyx_GIVEREF(__pyx_tuple__1545);
  __pyx_codeobj__785 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1545, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamCreateWithPriority, 20807, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__785)) __PYX_ERR(0, 20807, __pyx_L1_error)

  /* "cuda/cuda.pyx":20855
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetPriority(hStream):             # <<<<<<<<<<<<<<
 *     """ Query the priority of a given stream.
 * 
 */
  __pyx_tuple__1546 = PyTuple_Pack(5, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_priority_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1546)) __PYX_ERR(0, 20855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1546);
  __Pyx_GIVEREF(__pyx_tuple__1546);
  __pyx_codeobj__786 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1546, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamGetPriority, 20855, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__786)) __PYX_ERR(0, 20855, __pyx_L1_error)

  /* "cuda/cuda.pyx":20898
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetFlags(hStream):             # <<<<<<<<<<<<<<
 *     """ Query the flags of a given stream.
 * 
 */
  __pyx_tuple__1547 = PyTuple_Pack(5, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_flags_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1547)) __PYX_ERR(0, 20898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1547);
  __Pyx_GIVEREF(__pyx_tuple__1547);
  __pyx_codeobj__787 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1547, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamGetFlags, 20898, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__787)) __PYX_ERR(0, 20898, __pyx_L1_error)

  /* "cuda/cuda.pyx":20938
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetCtx(hStream):             # <<<<<<<<<<<<<<
 *     """ Query the context associated with a stream.
 * 
 */
  __pyx_tuple__1548 = PyTuple_Pack(5, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_pctx, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1548)) __PYX_ERR(0, 20938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1548);
  __Pyx_GIVEREF(__pyx_tuple__1548);
  __pyx_codeobj__788 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1548, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamGetCtx, 20938, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__788)) __PYX_ERR(0, 20938, __pyx_L1_error)

  /* "cuda/cuda.pyx":20994
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitEvent(hStream, hEvent, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Make a compute stream wait on an event.
 * 
 */
  __pyx_tuple__1549 = PyTuple_Pack(8, __pyx_n_s_hStream_2, __pyx_n_s_hEvent, __pyx_n_s_Flags_2, __pyx_n_s_chEvent, __pyx_n_s_phEvent, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1549)) __PYX_ERR(0, 20994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1549);
  __Pyx_GIVEREF(__pyx_tuple__1549);
  __pyx_codeobj__789 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1549, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamWaitEvent, 20994, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__789)) __PYX_ERR(0, 20994, __pyx_L1_error)

  /* "cuda/cuda.pyx":21053
 * 
 * @cython.embedsignature(True)
 * def cuStreamAddCallback(hStream, callback, userData, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Add a callback to a compute stream.
 * 
 */
  __pyx_tuple__1550 = PyTuple_Pack(11, __pyx_n_s_hStream_2, __pyx_n_s_callback, __pyx_n_s_userData_2, __pyx_n_s_flags_2, __pyx_n_s_ccallback, __pyx_n_s_pcallback, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cuserData, __pyx_n_s_cuserData_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1550)) __PYX_ERR(0, 21053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1550);
  __Pyx_GIVEREF(__pyx_tuple__1550);
  __pyx_codeobj__790 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1550, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamAddCallback, 21053, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__790)) __PYX_ERR(0, 21053, __pyx_L1_error)

  /* "cuda/cuda.pyx":21147
 * 
 * @cython.embedsignature(True)
 * def cuStreamBeginCapture(hStream, mode not None : CUstreamCaptureMode):             # <<<<<<<<<<<<<<
 *     """ Begins graph capture on a stream.
 * 
 */
  __pyx_tuple__1551 = PyTuple_Pack(6, __pyx_n_s_hStream_2, __pyx_n_s_mode, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cmode, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1551)) __PYX_ERR(0, 21147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1551);
  __Pyx_GIVEREF(__pyx_tuple__1551);
  __pyx_codeobj__791 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1551, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamBeginCapture, 21147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__791)) __PYX_ERR(0, 21147, __pyx_L1_error)

  /* "cuda/cuda.pyx":21201
 * 
 * @cython.embedsignature(True)
 * def cuThreadExchangeStreamCaptureMode(mode not None : CUstreamCaptureMode):             # <<<<<<<<<<<<<<
 *     """ Swaps the stream capture interaction mode for a thread.
 * 
 */
  __pyx_tuple__1552 = PyTuple_Pack(3, __pyx_n_s_mode, __pyx_n_s_cmode, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1552)) __PYX_ERR(0, 21201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1552);
  __Pyx_GIVEREF(__pyx_tuple__1552);
  __pyx_codeobj__792 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1552, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuThreadExchangeStreamCaptureMod, 21201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__792)) __PYX_ERR(0, 21201, __pyx_L1_error)

  /* "cuda/cuda.pyx":21269
 * 
 * @cython.embedsignature(True)
 * def cuStreamEndCapture(hStream):             # <<<<<<<<<<<<<<
 *     """ Ends capture on a stream, returning the captured graph.
 * 
 */
  __pyx_tuple__1553 = PyTuple_Pack(5, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_phGraph, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1553)) __PYX_ERR(0, 21269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1553);
  __Pyx_GIVEREF(__pyx_tuple__1553);
  __pyx_codeobj__793 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1553, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamEndCapture, 21269, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__793)) __PYX_ERR(0, 21269, __pyx_L1_error)

  /* "cuda/cuda.pyx":21313
 * 
 * @cython.embedsignature(True)
 * def cuStreamIsCapturing(hStream):             # <<<<<<<<<<<<<<
 *     """ Returns a stream's capture status.
 * 
 */
  __pyx_tuple__1554 = PyTuple_Pack(5, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_captureStatus, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1554)) __PYX_ERR(0, 21313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1554);
  __Pyx_GIVEREF(__pyx_tuple__1554);
  __pyx_codeobj__794 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1554, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamIsCapturing, 21313, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__794)) __PYX_ERR(0, 21313, __pyx_L1_error)

  /* "cuda/cuda.pyx":21372
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetCaptureInfo(hStream):             # <<<<<<<<<<<<<<
 *     """ Query capture status of a stream.
 * 
 */
  __pyx_tuple__1555 = PyTuple_Pack(6, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_captureStatus_out, __pyx_n_s_id_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1555)) __PYX_ERR(0, 21372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1555);
  __Pyx_GIVEREF(__pyx_tuple__1555);
  __pyx_codeobj__795 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1555, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamGetCaptureInfo, 21372, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__795)) __PYX_ERR(0, 21372, __pyx_L1_error)

  /* "cuda/cuda.pyx":21426
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetCaptureInfo_v2(hStream):             # <<<<<<<<<<<<<<
 *     """ Query a stream's capture state (11.3+)
 * 
 */
  __pyx_tuple__1556 = PyTuple_Pack(11, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_captureStatus_out, __pyx_n_s_id_out, __pyx_n_s_graph_out, __pyx_n_s_cdependencies_out, __pyx_n_s_pydependencies_out, __pyx_n_s_numDependencies_out, __pyx_n_s_err, __pyx_n_s_idx); if (unlikely(!__pyx_tuple__1556)) __PYX_ERR(0, 21426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1556);
  __Pyx_GIVEREF(__pyx_tuple__1556);
  __pyx_codeobj__796 = (PyObject*)__Pyx_PyCode_New(1, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1556, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamGetCaptureInfo_v2, 21426, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__796)) __PYX_ERR(0, 21426, __pyx_L1_error)

  /* "cuda/cuda.pyx":21512
 * 
 * @cython.embedsignature(True)
 * def cuStreamUpdateCaptureDependencies(hStream, dependencies : List[CUgraphNode], size_t numDependencies, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Update the set of dependencies in a capturing stream (11.3+)
 * 
 */
  __pyx_tuple__1557 = PyTuple_Pack(11, __pyx_n_s_hStream_2, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_flags_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1557)) __PYX_ERR(0, 21512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1557);
  __Pyx_GIVEREF(__pyx_tuple__1557);
  __pyx_codeobj__797 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1557, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamUpdateCaptureDependencie_2, 21512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__797)) __PYX_ERR(0, 21512, __pyx_L1_error)

  /* "cuda/cuda.pyx":21586
 * 
 * @cython.embedsignature(True)
 * def cuStreamAttachMemAsync(hStream, dptr, size_t length, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Attach memory to a stream asynchronously.
 * 
 */
  __pyx_tuple__1558 = PyTuple_Pack(9, __pyx_n_s_hStream_2, __pyx_n_s_dptr_2, __pyx_n_s_length, __pyx_n_s_flags_2, __pyx_n_s_cdptr, __pyx_n_s_pdptr, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1558)) __PYX_ERR(0, 21586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1558);
  __Pyx_GIVEREF(__pyx_tuple__1558);
  __pyx_codeobj__799 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1558, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamAttachMemAsync, 21586, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__799)) __PYX_ERR(0, 21586, __pyx_L1_error)

  /* "cuda/cuda.pyx":21699
 * 
 * @cython.embedsignature(True)
 * def cuStreamQuery(hStream):             # <<<<<<<<<<<<<<
 *     """ Determine status of a compute stream.
 * 
 */
  __pyx_tuple__1559 = PyTuple_Pack(4, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1559)) __PYX_ERR(0, 21699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1559);
  __Pyx_GIVEREF(__pyx_tuple__1559);
  __pyx_codeobj__800 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1559, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamQuery, 21699, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__800)) __PYX_ERR(0, 21699, __pyx_L1_error)

  /* "cuda/cuda.pyx":21738
 * 
 * @cython.embedsignature(True)
 * def cuStreamSynchronize(hStream):             # <<<<<<<<<<<<<<
 *     """ Wait until a stream's tasks are completed.
 * 
 */
  __pyx_tuple__1560 = PyTuple_Pack(4, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1560)) __PYX_ERR(0, 21738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1560);
  __Pyx_GIVEREF(__pyx_tuple__1560);
  __pyx_codeobj__801 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1560, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamSynchronize, 21738, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__801)) __PYX_ERR(0, 21738, __pyx_L1_error)

  /* "cuda/cuda.pyx":21776
 * 
 * @cython.embedsignature(True)
 * def cuStreamDestroy(hStream):             # <<<<<<<<<<<<<<
 *     """ Destroys a stream.
 * 
 */
  __pyx_tuple__1561 = PyTuple_Pack(4, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1561)) __PYX_ERR(0, 21776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1561);
  __Pyx_GIVEREF(__pyx_tuple__1561);
  __pyx_codeobj__802 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1561, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamDestroy, 21776, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__802)) __PYX_ERR(0, 21776, __pyx_L1_error)

  /* "cuda/cuda.pyx":21815
 * 
 * @cython.embedsignature(True)
 * def cuStreamCopyAttributes(dst, src):             # <<<<<<<<<<<<<<
 *     """ Copies attributes from source stream to destination stream.
 * 
 */
  __pyx_tuple__1562 = PyTuple_Pack(7, __pyx_n_s_dst_2, __pyx_n_s_src, __pyx_n_s_csrc, __pyx_n_s_psrc, __pyx_n_s_cdst, __pyx_n_s_pdst, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1562)) __PYX_ERR(0, 21815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1562);
  __Pyx_GIVEREF(__pyx_tuple__1562);
  __pyx_codeobj__803 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1562, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamCopyAttributes, 21815, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__803)) __PYX_ERR(0, 21815, __pyx_L1_error)

  /* "cuda/cuda.pyx":21861
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetAttribute(hStream, attr not None : CUstreamAttrID):             # <<<<<<<<<<<<<<
 *     """ Queries stream attribute.
 * 
 */
  __pyx_tuple__1563 = PyTuple_Pack(7, __pyx_n_s_hStream_2, __pyx_n_s_attr, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cattr, __pyx_n_s_value_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1563)) __PYX_ERR(0, 21861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1563);
  __Pyx_GIVEREF(__pyx_tuple__1563);
  __pyx_codeobj__804 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1563, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamGetAttribute, 21861, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__804)) __PYX_ERR(0, 21861, __pyx_L1_error)

  /* "cuda/cuda.pyx":21901
 * 
 * @cython.embedsignature(True)
 * def cuStreamSetAttribute(hStream, attr not None : CUstreamAttrID, value : CUstreamAttrValue):             # <<<<<<<<<<<<<<
 *     """ Sets stream attribute.
 * 
 */
  __pyx_tuple__1564 = PyTuple_Pack(8, __pyx_n_s_hStream_2, __pyx_n_s_attr, __pyx_n_s_value, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cattr, __pyx_n_s_cvalue_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1564)) __PYX_ERR(0, 21901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1564);
  __Pyx_GIVEREF(__pyx_tuple__1564);
  __pyx_codeobj__805 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1564, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamSetAttribute, 21901, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__805)) __PYX_ERR(0, 21901, __pyx_L1_error)

  /* "cuda/cuda.pyx":21942
 * 
 * @cython.embedsignature(True)
 * def cuEventCreate(unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Creates an event.
 * 
 */
  __pyx_tuple__1565 = PyTuple_Pack(4, __pyx_n_s_Flags_2, __pyx_n_s_Flags_2, __pyx_n_s_phEvent, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1565)) __PYX_ERR(0, 21942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1565);
  __Pyx_GIVEREF(__pyx_tuple__1565);
  __pyx_codeobj__806 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1565, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEventCreate, 21942, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__806)) __PYX_ERR(0, 21942, __pyx_L1_error)

  /* "cuda/cuda.pyx":21987
 * 
 * @cython.embedsignature(True)
 * def cuEventRecord(hEvent, hStream):             # <<<<<<<<<<<<<<
 *     """ Records an event.
 * 
 */
  __pyx_tuple__1566 = PyTuple_Pack(7, __pyx_n_s_hEvent, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_chEvent, __pyx_n_s_phEvent, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1566)) __PYX_ERR(0, 21987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1566);
  __Pyx_GIVEREF(__pyx_tuple__1566);
  __pyx_codeobj__807 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1566, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEventRecord, 21987, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__807)) __PYX_ERR(0, 21987, __pyx_L1_error)

  /* "cuda/cuda.pyx":22046
 * 
 * @cython.embedsignature(True)
 * def cuEventRecordWithFlags(hEvent, hStream, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Records an event.
 * 
 */
  __pyx_tuple__1567 = PyTuple_Pack(8, __pyx_n_s_hEvent, __pyx_n_s_hStream_2, __pyx_n_s_flags_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_chEvent, __pyx_n_s_phEvent, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1567)) __PYX_ERR(0, 22046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1567);
  __Pyx_GIVEREF(__pyx_tuple__1567);
  __pyx_codeobj__808 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1567, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEventRecordWithFlags, 22046, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__808)) __PYX_ERR(0, 22046, __pyx_L1_error)

  /* "cuda/cuda.pyx":22115
 * 
 * @cython.embedsignature(True)
 * def cuEventQuery(hEvent):             # <<<<<<<<<<<<<<
 *     """ Queries an event's status.
 * 
 */
  __pyx_tuple__1568 = PyTuple_Pack(4, __pyx_n_s_hEvent, __pyx_n_s_chEvent, __pyx_n_s_phEvent, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1568)) __PYX_ERR(0, 22115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1568);
  __Pyx_GIVEREF(__pyx_tuple__1568);
  __pyx_codeobj__809 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1568, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEventQuery, 22115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__809)) __PYX_ERR(0, 22115, __pyx_L1_error)

  /* "cuda/cuda.pyx":22158
 * 
 * @cython.embedsignature(True)
 * def cuEventSynchronize(hEvent):             # <<<<<<<<<<<<<<
 *     """ Waits for an event to complete.
 * 
 */
  __pyx_tuple__1569 = PyTuple_Pack(4, __pyx_n_s_hEvent, __pyx_n_s_chEvent, __pyx_n_s_phEvent, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1569)) __PYX_ERR(0, 22158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1569);
  __Pyx_GIVEREF(__pyx_tuple__1569);
  __pyx_codeobj__810 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1569, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEventSynchronize, 22158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__810)) __PYX_ERR(0, 22158, __pyx_L1_error)

  /* "cuda/cuda.pyx":22200
 * 
 * @cython.embedsignature(True)
 * def cuEventDestroy(hEvent):             # <<<<<<<<<<<<<<
 *     """ Destroys an event.
 * 
 */
  __pyx_tuple__1570 = PyTuple_Pack(4, __pyx_n_s_hEvent, __pyx_n_s_chEvent, __pyx_n_s_phEvent, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1570)) __PYX_ERR(0, 22200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1570);
  __Pyx_GIVEREF(__pyx_tuple__1570);
  __pyx_codeobj__811 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1570, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEventDestroy, 22200, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__811)) __PYX_ERR(0, 22200, __pyx_L1_error)

  /* "cuda/cuda.pyx":22239
 * 
 * @cython.embedsignature(True)
 * def cuEventElapsedTime(hStart, hEnd):             # <<<<<<<<<<<<<<
 *     """ Computes the elapsed time between two events.
 * 
 */
  __pyx_tuple__1571 = PyTuple_Pack(8, __pyx_n_s_hStart, __pyx_n_s_hEnd, __pyx_n_s_chEnd, __pyx_n_s_phEnd, __pyx_n_s_chStart, __pyx_n_s_phStart, __pyx_n_s_pMilliseconds, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1571)) __PYX_ERR(0, 22239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1571);
  __Pyx_GIVEREF(__pyx_tuple__1571);
  __pyx_codeobj__812 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1571, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEventElapsedTime, 22239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__812)) __PYX_ERR(0, 22239, __pyx_L1_error)

  /* "cuda/cuda.pyx":22306
 * 
 * @cython.embedsignature(True)
 * def cuImportExternalMemory(memHandleDesc : CUDA_EXTERNAL_MEMORY_HANDLE_DESC):             # <<<<<<<<<<<<<<
 *     """ Imports an external memory object.
 * 
 */
  __pyx_tuple__1572 = PyTuple_Pack(4, __pyx_n_s_memHandleDesc, __pyx_n_s_extMem_out, __pyx_n_s_cmemHandleDesc_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1572)) __PYX_ERR(0, 22306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1572);
  __Pyx_GIVEREF(__pyx_tuple__1572);
  __pyx_codeobj__813 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1572, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuImportExternalMemory, 22306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__813)) __PYX_ERR(0, 22306, __pyx_L1_error)

  /* "cuda/cuda.pyx":22456
 * 
 * @cython.embedsignature(True)
 * def cuExternalMemoryGetMappedBuffer(extMem, bufferDesc : CUDA_EXTERNAL_MEMORY_BUFFER_DESC):             # <<<<<<<<<<<<<<
 *     """ Maps a buffer onto an imported memory object.
 * 
 */
  __pyx_tuple__1573 = PyTuple_Pack(7, __pyx_n_s_extMem, __pyx_n_s_bufferDesc, __pyx_n_s_cextMem, __pyx_n_s_pextMem, __pyx_n_s_devPtr_2, __pyx_n_s_cbufferDesc_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1573)) __PYX_ERR(0, 22456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1573);
  __Pyx_GIVEREF(__pyx_tuple__1573);
  __pyx_codeobj__814 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1573, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuExternalMemoryGetMappedBuffer, 22456, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__814)) __PYX_ERR(0, 22456, __pyx_L1_error)

  /* "cuda/cuda.pyx":22522
 * 
 * @cython.embedsignature(True)
 * def cuExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC):             # <<<<<<<<<<<<<<
 *     """ Maps a CUDA mipmapped array onto an external memory object.
 * 
 */
  __pyx_tuple__1574 = PyTuple_Pack(7, __pyx_n_s_extMem, __pyx_n_s_mipmapDesc, __pyx_n_s_cextMem, __pyx_n_s_pextMem, __pyx_n_s_mipmap_2, __pyx_n_s_cmipmapDesc_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1574)) __PYX_ERR(0, 22522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1574);
  __Pyx_GIVEREF(__pyx_tuple__1574);
  __pyx_codeobj__815 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1574, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuExternalMemoryGetMappedMipmapp, 22522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__815)) __PYX_ERR(0, 22522, __pyx_L1_error)

  /* "cuda/cuda.pyx":22595
 * 
 * @cython.embedsignature(True)
 * def cuDestroyExternalMemory(extMem):             # <<<<<<<<<<<<<<
 *     """ Destroys an external memory object.
 * 
 */
  __pyx_tuple__1575 = PyTuple_Pack(4, __pyx_n_s_extMem, __pyx_n_s_cextMem, __pyx_n_s_pextMem, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1575)) __PYX_ERR(0, 22595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1575);
  __Pyx_GIVEREF(__pyx_tuple__1575);
  __pyx_codeobj__816 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1575, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDestroyExternalMemory, 22595, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__816)) __PYX_ERR(0, 22595, __pyx_L1_error)

  /* "cuda/cuda.pyx":22631
 * 
 * @cython.embedsignature(True)
 * def cuImportExternalSemaphore(semHandleDesc : CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC):             # <<<<<<<<<<<<<<
 *     """ Imports an external semaphore.
 * 
 */
  __pyx_tuple__1576 = PyTuple_Pack(4, __pyx_n_s_semHandleDesc, __pyx_n_s_extSem_out, __pyx_n_s_csemHandleDesc_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1576)) __PYX_ERR(0, 22631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1576);
  __Pyx_GIVEREF(__pyx_tuple__1576);
  __pyx_codeobj__817 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1576, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuImportExternalSemaphore, 22631, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__817)) __PYX_ERR(0, 22631, __pyx_L1_error)

  /* "cuda/cuda.pyx":22776
 * 
 * @cython.embedsignature(True)
 * def cuSignalExternalSemaphoresAsync(extSemArray : List[CUexternalSemaphore], paramsArray : List[CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS], unsigned int numExtSems, stream):             # <<<<<<<<<<<<<<
 *     """ Signals a set of external semaphore objects.
 * 
 */
  __pyx_tuple__1577 = PyTuple_Pack(13, __pyx_n_s_extSemArray_2, __pyx_n_s_paramsArray_2, __pyx_n_s_numExtSems_2, __pyx_n_s_stream, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_cextSemArray, __pyx_n_s_idx, __pyx_n_s_cparamsArray, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1577)) __PYX_ERR(0, 22776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1577);
  __Pyx_GIVEREF(__pyx_tuple__1577);
  __pyx_codeobj__818 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1577, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuSignalExternalSemaphoresAsync_2, 22776, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__818)) __PYX_ERR(0, 22776, __pyx_L1_error)

  /* "cuda/cuda.pyx":22895
 * 
 * @cython.embedsignature(True)
 * def cuWaitExternalSemaphoresAsync(extSemArray : List[CUexternalSemaphore], paramsArray : List[CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS], unsigned int numExtSems, stream):             # <<<<<<<<<<<<<<
 *     """ Waits on a set of external semaphore objects.
 * 
 */
  __pyx_tuple__1578 = PyTuple_Pack(13, __pyx_n_s_extSemArray_2, __pyx_n_s_paramsArray_2, __pyx_n_s_numExtSems_2, __pyx_n_s_stream, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_cextSemArray, __pyx_n_s_idx, __pyx_n_s_cparamsArray, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1578)) __PYX_ERR(0, 22895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1578);
  __Pyx_GIVEREF(__pyx_tuple__1578);
  __pyx_codeobj__821 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1578, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuWaitExternalSemaphoresAsync, 22895, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__821)) __PYX_ERR(0, 22895, __pyx_L1_error)

  /* "cuda/cuda.pyx":23023
 * 
 * @cython.embedsignature(True)
 * def cuDestroyExternalSemaphore(extSem):             # <<<<<<<<<<<<<<
 *     """ Destroys an external semaphore.
 * 
 */
  __pyx_tuple__1579 = PyTuple_Pack(4, __pyx_n_s_extSem, __pyx_n_s_cextSem, __pyx_n_s_pextSem, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1579)) __PYX_ERR(0, 23023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1579);
  __Pyx_GIVEREF(__pyx_tuple__1579);
  __pyx_codeobj__823 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1579, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDestroyExternalSemaphore, 23023, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__823)) __PYX_ERR(0, 23023, __pyx_L1_error)

  /* "cuda/cuda.pyx":23058
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue32(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */
  __pyx_tuple__1580 = PyTuple_Pack(11, __pyx_n_s_stream, __pyx_n_s_addr, __pyx_n_s_value, __pyx_n_s_flags_2, __pyx_n_s_cvalue, __pyx_n_s_pvalue, __pyx_n_s_caddr, __pyx_n_s_paddr, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1580)) __PYX_ERR(0, 23058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1580);
  __Pyx_GIVEREF(__pyx_tuple__1580);
  __pyx_codeobj__824 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1580, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamWaitValue32, 23058, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__824)) __PYX_ERR(0, 23058, __pyx_L1_error)

  /* "cuda/cuda.pyx":23137
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue64(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */
  __pyx_tuple__1581 = PyTuple_Pack(11, __pyx_n_s_stream, __pyx_n_s_addr, __pyx_n_s_value, __pyx_n_s_flags_2, __pyx_n_s_cvalue, __pyx_n_s_pvalue, __pyx_n_s_caddr, __pyx_n_s_paddr, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1581)) __PYX_ERR(0, 23137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1581);
  __Pyx_GIVEREF(__pyx_tuple__1581);
  __pyx_codeobj__825 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1581, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamWaitValue64, 23137, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__825)) __PYX_ERR(0, 23137, __pyx_L1_error)

  /* "cuda/cuda.pyx":23211
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue32(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */
  __pyx_tuple__1582 = PyTuple_Pack(11, __pyx_n_s_stream, __pyx_n_s_addr, __pyx_n_s_value, __pyx_n_s_flags_2, __pyx_n_s_cvalue, __pyx_n_s_pvalue, __pyx_n_s_caddr, __pyx_n_s_paddr, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1582)) __PYX_ERR(0, 23211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1582);
  __Pyx_GIVEREF(__pyx_tuple__1582);
  __pyx_codeobj__826 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1582, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamWriteValue32, 23211, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__826)) __PYX_ERR(0, 23211, __pyx_L1_error)

  /* "cuda/cuda.pyx":23282
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue64(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */
  __pyx_tuple__1583 = PyTuple_Pack(11, __pyx_n_s_stream, __pyx_n_s_addr, __pyx_n_s_value, __pyx_n_s_flags_2, __pyx_n_s_cvalue, __pyx_n_s_pvalue, __pyx_n_s_caddr, __pyx_n_s_paddr, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1583)) __PYX_ERR(0, 23282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1583);
  __Pyx_GIVEREF(__pyx_tuple__1583);
  __pyx_codeobj__827 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1583, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamWriteValue64, 23282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__827)) __PYX_ERR(0, 23282, __pyx_L1_error)

  /* "cuda/cuda.pyx":23352
 * 
 * @cython.embedsignature(True)
 * def cuStreamBatchMemOp(stream, unsigned int count, paramArray : List[CUstreamBatchMemOpParams], unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Batch operations to synchronize the stream via memory operations.
 * 
 */
  __pyx_tuple__1584 = PyTuple_Pack(11, __pyx_n_s_stream, __pyx_n_s_count_2, __pyx_n_s_paramArray_2, __pyx_n_s_flags_2, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_cparamArray, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1584)) __PYX_ERR(0, 23352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1584);
  __Pyx_GIVEREF(__pyx_tuple__1584);
  __pyx_codeobj__828 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1584, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamBatchMemOp, 23352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__828)) __PYX_ERR(0, 23352, __pyx_L1_error)

  /* "cuda/cuda.pyx":23425
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue32_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */
  __pyx_tuple__1585 = PyTuple_Pack(11, __pyx_n_s_stream, __pyx_n_s_addr, __pyx_n_s_value, __pyx_n_s_flags_2, __pyx_n_s_cvalue, __pyx_n_s_pvalue, __pyx_n_s_caddr, __pyx_n_s_paddr, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1585)) __PYX_ERR(0, 23425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1585);
  __Pyx_GIVEREF(__pyx_tuple__1585);
  __pyx_codeobj__830 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1585, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamWaitValue32_v2, 23425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__830)) __PYX_ERR(0, 23425, __pyx_L1_error)

  /* "cuda/cuda.pyx":23501
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue64_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */
  __pyx_tuple__1586 = PyTuple_Pack(11, __pyx_n_s_stream, __pyx_n_s_addr, __pyx_n_s_value, __pyx_n_s_flags_2, __pyx_n_s_cvalue, __pyx_n_s_pvalue, __pyx_n_s_caddr, __pyx_n_s_paddr, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1586)) __PYX_ERR(0, 23501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1586);
  __Pyx_GIVEREF(__pyx_tuple__1586);
  __pyx_codeobj__831 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1586, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamWaitValue64_v2, 23501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__831)) __PYX_ERR(0, 23501, __pyx_L1_error)

  /* "cuda/cuda.pyx":23575
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue32_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */
  __pyx_tuple__1587 = PyTuple_Pack(11, __pyx_n_s_stream, __pyx_n_s_addr, __pyx_n_s_value, __pyx_n_s_flags_2, __pyx_n_s_cvalue, __pyx_n_s_pvalue, __pyx_n_s_caddr, __pyx_n_s_paddr, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1587)) __PYX_ERR(0, 23575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1587);
  __Pyx_GIVEREF(__pyx_tuple__1587);
  __pyx_codeobj__832 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1587, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamWriteValue32_v2, 23575, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__832)) __PYX_ERR(0, 23575, __pyx_L1_error)

  /* "cuda/cuda.pyx":23639
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue64_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */
  __pyx_tuple__1588 = PyTuple_Pack(11, __pyx_n_s_stream, __pyx_n_s_addr, __pyx_n_s_value, __pyx_n_s_flags_2, __pyx_n_s_cvalue, __pyx_n_s_pvalue, __pyx_n_s_caddr, __pyx_n_s_paddr, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1588)) __PYX_ERR(0, 23639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1588);
  __Pyx_GIVEREF(__pyx_tuple__1588);
  __pyx_codeobj__833 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1588, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamWriteValue64_v2, 23639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__833)) __PYX_ERR(0, 23639, __pyx_L1_error)

  /* "cuda/cuda.pyx":23705
 * 
 * @cython.embedsignature(True)
 * def cuStreamBatchMemOp_v2(stream, unsigned int count, paramArray : List[CUstreamBatchMemOpParams], unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Batch operations to synchronize the stream via memory operations.
 * 
 */
  __pyx_tuple__1589 = PyTuple_Pack(11, __pyx_n_s_stream, __pyx_n_s_count_2, __pyx_n_s_paramArray_2, __pyx_n_s_flags_2, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_cparamArray, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1589)) __PYX_ERR(0, 23705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1589);
  __Pyx_GIVEREF(__pyx_tuple__1589);
  __pyx_codeobj__834 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1589, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuStreamBatchMemOp_v2, 23705, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__834)) __PYX_ERR(0, 23705, __pyx_L1_error)

  /* "cuda/cuda.pyx":23777
 * 
 * @cython.embedsignature(True)
 * def cuFuncGetAttribute(attrib not None : CUfunction_attribute, hfunc):             # <<<<<<<<<<<<<<
 *     """ Returns information about a function.
 * 
 */
  __pyx_tuple__1590 = PyTuple_Pack(7, __pyx_n_s_attrib, __pyx_n_s_hfunc, __pyx_n_s_chfunc, __pyx_n_s_phfunc, __pyx_n_s_pi, __pyx_n_s_cattrib, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1590)) __PYX_ERR(0, 23777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1590);
  __Pyx_GIVEREF(__pyx_tuple__1590);
  __pyx_codeobj__835 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1590, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuFuncGetAttribute, 23777, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__835)) __PYX_ERR(0, 23777, __pyx_L1_error)

  /* "cuda/cuda.pyx":23893
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetAttribute(hfunc, attrib not None : CUfunction_attribute, int value):             # <<<<<<<<<<<<<<
 *     """ Sets information about a function.
 * 
 */
  __pyx_tuple__1591 = PyTuple_Pack(7, __pyx_n_s_hfunc, __pyx_n_s_attrib, __pyx_n_s_value, __pyx_n_s_chfunc, __pyx_n_s_phfunc, __pyx_n_s_cattrib, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1591)) __PYX_ERR(0, 23893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1591);
  __Pyx_GIVEREF(__pyx_tuple__1591);
  __pyx_codeobj__836 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1591, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuFuncSetAttribute, 23893, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__836)) __PYX_ERR(0, 23893, __pyx_L1_error)

  /* "cuda/cuda.pyx":23981
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetCacheConfig(hfunc, config not None : CUfunc_cache):             # <<<<<<<<<<<<<<
 *     """ Sets the preferred cache configuration for a device function.
 * 
 */
  __pyx_tuple__1592 = PyTuple_Pack(6, __pyx_n_s_hfunc, __pyx_n_s_config, __pyx_n_s_chfunc, __pyx_n_s_phfunc, __pyx_n_s_cconfig, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1592)) __PYX_ERR(0, 23981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1592);
  __Pyx_GIVEREF(__pyx_tuple__1592);
  __pyx_codeobj__837 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1592, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuFuncSetCacheConfig, 23981, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__837)) __PYX_ERR(0, 23981, __pyx_L1_error)

  /* "cuda/cuda.pyx":24045
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetSharedMemConfig(hfunc, config not None : CUsharedconfig):             # <<<<<<<<<<<<<<
 *     """ Sets the shared memory configuration for a device function.
 * 
 */
  __pyx_tuple__1593 = PyTuple_Pack(6, __pyx_n_s_hfunc, __pyx_n_s_config, __pyx_n_s_chfunc, __pyx_n_s_phfunc, __pyx_n_s_cconfig, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1593)) __PYX_ERR(0, 24045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1593);
  __Pyx_GIVEREF(__pyx_tuple__1593);
  __pyx_codeobj__838 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1593, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuFuncSetSharedMemConfig, 24045, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__838)) __PYX_ERR(0, 24045, __pyx_L1_error)

  /* "cuda/cuda.pyx":24114
 * 
 * @cython.embedsignature(True)
 * def cuFuncGetModule(hfunc):             # <<<<<<<<<<<<<<
 *     """ Returns a module handle.
 * 
 */
  __pyx_tuple__1594 = PyTuple_Pack(5, __pyx_n_s_hfunc, __pyx_n_s_chfunc, __pyx_n_s_phfunc, __pyx_n_s_hmod, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1594)) __PYX_ERR(0, 24114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1594);
  __Pyx_GIVEREF(__pyx_tuple__1594);
  __pyx_codeobj__839 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1594, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuFuncGetModule, 24114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__839)) __PYX_ERR(0, 24114, __pyx_L1_error)

  /* "cuda/cuda.pyx":24154
 * 
 * @cython.embedsignature(True)
 * def cuLaunchKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams, void_ptr extra):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */
  __pyx_tuple__1595 = PyTuple_Pack(17, __pyx_n_s_f, __pyx_n_s_gridDimX_2, __pyx_n_s_gridDimY_2, __pyx_n_s_gridDimZ_2, __pyx_n_s_blockDimX_2, __pyx_n_s_blockDimY_2, __pyx_n_s_blockDimZ_2, __pyx_n_s_sharedMemBytes_2, __pyx_n_s_hStream_2, __pyx_n_s_kernelParams_2, __pyx_n_s_extra_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cf, __pyx_n_s_pf, __pyx_n_s_ckernelParams, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1595)) __PYX_ERR(0, 24154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1595);
  __Pyx_GIVEREF(__pyx_tuple__1595);
  __pyx_codeobj__840 = (PyObject*)__Pyx_PyCode_New(11, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1595, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLaunchKernel, 24154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__840)) __PYX_ERR(0, 24154, __pyx_L1_error)

  /* "cuda/cuda.pyx":24277
 * 
 * @cython.embedsignature(True)
 * def cuLaunchKernelEx(config : CUlaunchConfig, f, kernelParams, void_ptr extra):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function with launch-time configuration.
 * 
 */
  __pyx_tuple__1596 = PyTuple_Pack(9, __pyx_n_s_config, __pyx_n_s_f, __pyx_n_s_kernelParams_2, __pyx_n_s_extra_2, __pyx_n_s_cf, __pyx_n_s_pf, __pyx_n_s_cconfig_ptr, __pyx_n_s_ckernelParams, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1596)) __PYX_ERR(0, 24277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1596);
  __Pyx_GIVEREF(__pyx_tuple__1596);
  __pyx_codeobj__841 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1596, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLaunchKernelEx, 24277, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__841)) __PYX_ERR(0, 24277, __pyx_L1_error)

  /* "cuda/cuda.pyx":24434
 * 
 * @cython.embedsignature(True)
 * def cuLaunchCooperativeKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function where thread blocks can cooperate and synchronize as they execute.
 * 
 */
  __pyx_tuple__1597 = PyTuple_Pack(16, __pyx_n_s_f, __pyx_n_s_gridDimX_2, __pyx_n_s_gridDimY_2, __pyx_n_s_gridDimZ_2, __pyx_n_s_blockDimX_2, __pyx_n_s_blockDimY_2, __pyx_n_s_blockDimZ_2, __pyx_n_s_sharedMemBytes_2, __pyx_n_s_hStream_2, __pyx_n_s_kernelParams_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cf, __pyx_n_s_pf, __pyx_n_s_ckernelParams, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1597)) __PYX_ERR(0, 24434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1597);
  __Pyx_GIVEREF(__pyx_tuple__1597);
  __pyx_codeobj__842 = (PyObject*)__Pyx_PyCode_New(10, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1597, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLaunchCooperativeKernel, 24434, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__842)) __PYX_ERR(0, 24434, __pyx_L1_error)

  /* "cuda/cuda.pyx":24537
 * 
 * @cython.embedsignature(True)
 * def cuLaunchCooperativeKernelMultiDevice(launchParamsList : List[CUDA_LAUNCH_PARAMS], unsigned int numDevices, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Launches CUDA functions on multiple devices where thread blocks can cooperate and synchronize as they execute.
 * 
 */
  __pyx_tuple__1598 = PyTuple_Pack(8, __pyx_n_s_launchParamsList, __pyx_n_s_numDevices, __pyx_n_s_flags_2, __pyx_n_s_claunchParamsList, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1598)) __PYX_ERR(0, 24537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1598);
  __Pyx_GIVEREF(__pyx_tuple__1598);
  __pyx_codeobj__843 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1598, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLaunchCooperativeKernelMultiDe_2, 24537, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__843)) __PYX_ERR(0, 24537, __pyx_L1_error)

  /* "cuda/cuda.pyx":24702
 * 
 * @cython.embedsignature(True)
 * def cuLaunchHostFunc(hStream, fn, userData):             # <<<<<<<<<<<<<<
 *     """ Enqueues a host function call in a stream.
 * 
 */
  __pyx_tuple__1599 = PyTuple_Pack(10, __pyx_n_s_hStream_2, __pyx_n_s_fn_2, __pyx_n_s_userData_2, __pyx_n_s_cfn, __pyx_n_s_pfn, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cuserData, __pyx_n_s_cuserData_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1599)) __PYX_ERR(0, 24702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1599);
  __Pyx_GIVEREF(__pyx_tuple__1599);
  __pyx_codeobj__845 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1599, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLaunchHostFunc, 24702, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__845)) __PYX_ERR(0, 24702, __pyx_L1_error)

  /* "cuda/cuda.pyx":24788
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetBlockShape(hfunc, int x, int y, int z):             # <<<<<<<<<<<<<<
 *     """ Sets the block-dimensions for the function.
 * 
 */
  __pyx_tuple__1600 = PyTuple_Pack(7, __pyx_n_s_hfunc, __pyx_n_s_x, __pyx_n_s_y_2, __pyx_n_s_z_2, __pyx_n_s_chfunc, __pyx_n_s_phfunc, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1600)) __PYX_ERR(0, 24788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1600);
  __Pyx_GIVEREF(__pyx_tuple__1600);
  __pyx_codeobj__846 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1600, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuFuncSetBlockShape, 24788, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__846)) __PYX_ERR(0, 24788, __pyx_L1_error)

  /* "cuda/cuda.pyx":24830
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetSharedSize(hfunc, unsigned int numbytes):             # <<<<<<<<<<<<<<
 *     """ Sets the dynamic shared-memory size for the function.
 * 
 */
  __pyx_tuple__1601 = PyTuple_Pack(5, __pyx_n_s_hfunc, __pyx_n_s_numbytes, __pyx_n_s_chfunc, __pyx_n_s_phfunc, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1601)) __PYX_ERR(0, 24830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1601);
  __Pyx_GIVEREF(__pyx_tuple__1601);
  __pyx_codeobj__847 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1601, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuFuncSetSharedSize, 24830, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__847)) __PYX_ERR(0, 24830, __pyx_L1_error)

  /* "cuda/cuda.pyx":24869
 * 
 * @cython.embedsignature(True)
 * def cuParamSetSize(hfunc, unsigned int numbytes):             # <<<<<<<<<<<<<<
 *     """ Sets the parameter size for the function.
 * 
 */
  __pyx_tuple__1602 = PyTuple_Pack(5, __pyx_n_s_hfunc, __pyx_n_s_numbytes, __pyx_n_s_chfunc, __pyx_n_s_phfunc, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1602)) __PYX_ERR(0, 24869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1602);
  __Pyx_GIVEREF(__pyx_tuple__1602);
  __pyx_codeobj__848 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1602, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuParamSetSize, 24869, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__848)) __PYX_ERR(0, 24869, __pyx_L1_error)

  /* "cuda/cuda.pyx":24907
 * 
 * @cython.embedsignature(True)
 * def cuParamSeti(hfunc, int offset, unsigned int value):             # <<<<<<<<<<<<<<
 *     """ Adds an integer parameter to the function's argument list.
 * 
 */
  __pyx_tuple__1603 = PyTuple_Pack(6, __pyx_n_s_hfunc, __pyx_n_s_offset_2, __pyx_n_s_value, __pyx_n_s_chfunc, __pyx_n_s_phfunc, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1603)) __PYX_ERR(0, 24907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1603);
  __Pyx_GIVEREF(__pyx_tuple__1603);
  __pyx_codeobj__849 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1603, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuParamSeti, 24907, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__849)) __PYX_ERR(0, 24907, __pyx_L1_error)

  /* "cuda/cuda.pyx":24948
 * 
 * @cython.embedsignature(True)
 * def cuParamSetf(hfunc, int offset, float value):             # <<<<<<<<<<<<<<
 *     """ Adds a floating-point parameter to the function's argument list.
 * 
 */
  __pyx_tuple__1604 = PyTuple_Pack(6, __pyx_n_s_hfunc, __pyx_n_s_offset_2, __pyx_n_s_value, __pyx_n_s_chfunc, __pyx_n_s_phfunc, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1604)) __PYX_ERR(0, 24948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1604);
  __Pyx_GIVEREF(__pyx_tuple__1604);
  __pyx_codeobj__850 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1604, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuParamSetf, 24948, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__850)) __PYX_ERR(0, 24948, __pyx_L1_error)

  /* "cuda/cuda.pyx":24989
 * 
 * @cython.embedsignature(True)
 * def cuParamSetv(hfunc, int offset, ptr, unsigned int numbytes):             # <<<<<<<<<<<<<<
 *     """ Adds arbitrary data to the function's argument list.
 * 
 */
  __pyx_tuple__1605 = PyTuple_Pack(9, __pyx_n_s_hfunc, __pyx_n_s_offset_2, __pyx_n_s_ptr_2, __pyx_n_s_numbytes, __pyx_n_s_chfunc, __pyx_n_s_phfunc, __pyx_n_s_cptr, __pyx_n_s_cptr_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1605)) __PYX_ERR(0, 24989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1605);
  __Pyx_GIVEREF(__pyx_tuple__1605);
  __pyx_codeobj__851 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1605, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuParamSetv, 24989, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__851)) __PYX_ERR(0, 24989, __pyx_L1_error)

  /* "cuda/cuda.pyx":25034
 * 
 * @cython.embedsignature(True)
 * def cuLaunch(f):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */
  __pyx_tuple__1606 = PyTuple_Pack(4, __pyx_n_s_f, __pyx_n_s_cf, __pyx_n_s_pf, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1606)) __PYX_ERR(0, 25034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1606);
  __Pyx_GIVEREF(__pyx_tuple__1606);
  __pyx_codeobj__852 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1606, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLaunch, 25034, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__852)) __PYX_ERR(0, 25034, __pyx_L1_error)

  /* "cuda/cuda.pyx":25083
 * 
 * @cython.embedsignature(True)
 * def cuLaunchGrid(f, int grid_width, int grid_height):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */
  __pyx_tuple__1607 = PyTuple_Pack(6, __pyx_n_s_f, __pyx_n_s_grid_width, __pyx_n_s_grid_height, __pyx_n_s_cf, __pyx_n_s_pf, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1607)) __PYX_ERR(0, 25083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1607);
  __Pyx_GIVEREF(__pyx_tuple__1607);
  __pyx_codeobj__853 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1607, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLaunchGrid, 25083, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__853)) __PYX_ERR(0, 25083, __pyx_L1_error)

  /* "cuda/cuda.pyx":25136
 * 
 * @cython.embedsignature(True)
 * def cuLaunchGridAsync(f, int grid_width, int grid_height, hStream):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */
  __pyx_tuple__1608 = PyTuple_Pack(9, __pyx_n_s_f, __pyx_n_s_grid_width, __pyx_n_s_grid_height, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cf, __pyx_n_s_pf, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1608)) __PYX_ERR(0, 25136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1608);
  __Pyx_GIVEREF(__pyx_tuple__1608);
  __pyx_codeobj__854 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1608, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuLaunchGridAsync, 25136, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__854)) __PYX_ERR(0, 25136, __pyx_L1_error)

  /* "cuda/cuda.pyx":25207
 * 
 * @cython.embedsignature(True)
 * def cuParamSetTexRef(hfunc, int texunit, hTexRef):             # <<<<<<<<<<<<<<
 *     """ Adds a texture-reference to the function's argument list.
 * 
 */
  __pyx_tuple__1609 = PyTuple_Pack(8, __pyx_n_s_hfunc, __pyx_n_s_texunit, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_chfunc, __pyx_n_s_phfunc, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1609)) __PYX_ERR(0, 25207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1609);
  __Pyx_GIVEREF(__pyx_tuple__1609);
  __pyx_codeobj__855 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1609, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuParamSetTexRef, 25207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__855)) __PYX_ERR(0, 25207, __pyx_L1_error)

  /* "cuda/cuda.pyx":25256
 * 
 * @cython.embedsignature(True)
 * def cuGraphCreate(unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Creates a graph.
 * 
 */
  __pyx_tuple__1610 = PyTuple_Pack(4, __pyx_n_s_flags_2, __pyx_n_s_flags_2, __pyx_n_s_phGraph, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1610)) __PYX_ERR(0, 25256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1610);
  __Pyx_GIVEREF(__pyx_tuple__1610);
  __pyx_codeobj__856 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1610, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphCreate, 25256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__856)) __PYX_ERR(0, 25256, __pyx_L1_error)

  /* "cuda/cuda.pyx":25282
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddKernelNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a kernel execution node and adds it to a graph.
 * 
 */
  __pyx_tuple__1611 = PyTuple_Pack(13, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_nodeParams, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1611)) __PYX_ERR(0, 25282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1611);
  __Pyx_GIVEREF(__pyx_tuple__1611);
  __pyx_codeobj__857 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1611, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddKernelNode, 25282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__857)) __PYX_ERR(0, 25282, __pyx_L1_error)

  /* "cuda/cuda.pyx":25402
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a kernel node's parameters.
 * 
 */
  __pyx_tuple__1612 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_nodeParams, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1612)) __PYX_ERR(0, 25402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1612);
  __Pyx_GIVEREF(__pyx_tuple__1612);
  __pyx_codeobj__858 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1612, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphKernelNodeGetParams, 25402, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__858)) __PYX_ERR(0, 25402, __pyx_L1_error)

  /* "cuda/cuda.pyx":25447
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeSetParams(hNode, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a kernel node's parameters.
 * 
 */
  __pyx_tuple__1613 = PyTuple_Pack(6, __pyx_n_s_hNode, __pyx_n_s_nodeParams, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1613)) __PYX_ERR(0, 25447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1613);
  __Pyx_GIVEREF(__pyx_tuple__1613);
  __pyx_codeobj__859 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1613, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphKernelNodeSetParams, 25447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__859)) __PYX_ERR(0, 25447, __pyx_L1_error)

  /* "cuda/cuda.pyx":25483
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemcpyNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, copyParams : CUDA_MEMCPY3D, ctx):             # <<<<<<<<<<<<<<
 *     """ Creates a memcpy node and adds it to a graph.
 * 
 */
  __pyx_tuple__1614 = PyTuple_Pack(16, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_copyParams, __pyx_n_s_ctx_2, __pyx_n_s_cctx, __pyx_n_s_pctx, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_ccopyParams_ptr, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1614)) __PYX_ERR(0, 25483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1614);
  __Pyx_GIVEREF(__pyx_tuple__1614);
  __pyx_codeobj__860 = (PyObject*)__Pyx_PyCode_New(5, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1614, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddMemcpyNode, 25483, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__860)) __PYX_ERR(0, 25483, __pyx_L1_error)

  /* "cuda/cuda.pyx":25572
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemcpyNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memcpy node's parameters.
 * 
 */
  __pyx_tuple__1615 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_nodeParams, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1615)) __PYX_ERR(0, 25572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1615);
  __Pyx_GIVEREF(__pyx_tuple__1615);
  __pyx_codeobj__861 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1615, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphMemcpyNodeGetParams, 25572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__861)) __PYX_ERR(0, 25572, __pyx_L1_error)

  /* "cuda/cuda.pyx":25608
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemcpyNodeSetParams(hNode, nodeParams : CUDA_MEMCPY3D):             # <<<<<<<<<<<<<<
 *     """ Sets a memcpy node's parameters.
 * 
 */
  __pyx_tuple__1616 = PyTuple_Pack(6, __pyx_n_s_hNode, __pyx_n_s_nodeParams, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1616)) __PYX_ERR(0, 25608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1616);
  __Pyx_GIVEREF(__pyx_tuple__1616);
  __pyx_codeobj__862 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1616, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphMemcpyNodeSetParams, 25608, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__862)) __PYX_ERR(0, 25608, __pyx_L1_error)

  /* "cuda/cuda.pyx":25644
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemsetNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, memsetParams : CUDA_MEMSET_NODE_PARAMS, ctx):             # <<<<<<<<<<<<<<
 *     """ Creates a memset node and adds it to a graph.
 * 
 */
  __pyx_tuple__1617 = PyTuple_Pack(16, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_memsetParams, __pyx_n_s_ctx_2, __pyx_n_s_cctx, __pyx_n_s_pctx, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_cmemsetParams_ptr, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1617)) __PYX_ERR(0, 25644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1617);
  __Pyx_GIVEREF(__pyx_tuple__1617);
  __pyx_codeobj__863 = (PyObject*)__Pyx_PyCode_New(5, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1617, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddMemsetNode, 25644, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__863)) __PYX_ERR(0, 25644, __pyx_L1_error)

  /* "cuda/cuda.pyx":25723
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemsetNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memset node's parameters.
 * 
 */
  __pyx_tuple__1618 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_nodeParams, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1618)) __PYX_ERR(0, 25723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1618);
  __Pyx_GIVEREF(__pyx_tuple__1618);
  __pyx_codeobj__864 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1618, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphMemsetNodeGetParams, 25723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__864)) __PYX_ERR(0, 25723, __pyx_L1_error)

  /* "cuda/cuda.pyx":25759
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemsetNodeSetParams(hNode, nodeParams : CUDA_MEMSET_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a memset node's parameters.
 * 
 */
  __pyx_tuple__1619 = PyTuple_Pack(6, __pyx_n_s_hNode, __pyx_n_s_nodeParams, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1619)) __PYX_ERR(0, 25759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1619);
  __Pyx_GIVEREF(__pyx_tuple__1619);
  __pyx_codeobj__865 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1619, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphMemsetNodeSetParams, 25759, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__865)) __PYX_ERR(0, 25759, __pyx_L1_error)

  /* "cuda/cuda.pyx":25795
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddHostNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a host execution node and adds it to a graph.
 * 
 */
  __pyx_tuple__1620 = PyTuple_Pack(13, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_nodeParams, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1620)) __PYX_ERR(0, 25795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1620);
  __Pyx_GIVEREF(__pyx_tuple__1620);
  __pyx_codeobj__866 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1620, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddHostNode, 25795, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__866)) __PYX_ERR(0, 25795, __pyx_L1_error)

  /* "cuda/cuda.pyx":25862
 * 
 * @cython.embedsignature(True)
 * def cuGraphHostNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a host node's parameters.
 * 
 */
  __pyx_tuple__1621 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_nodeParams, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1621)) __PYX_ERR(0, 25862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1621);
  __Pyx_GIVEREF(__pyx_tuple__1621);
  __pyx_codeobj__867 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1621, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphHostNodeGetParams, 25862, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__867)) __PYX_ERR(0, 25862, __pyx_L1_error)

  /* "cuda/cuda.pyx":25898
 * 
 * @cython.embedsignature(True)
 * def cuGraphHostNodeSetParams(hNode, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a host node's parameters.
 * 
 */
  __pyx_tuple__1622 = PyTuple_Pack(6, __pyx_n_s_hNode, __pyx_n_s_nodeParams, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1622)) __PYX_ERR(0, 25898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1622);
  __Pyx_GIVEREF(__pyx_tuple__1622);
  __pyx_codeobj__868 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1622, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphHostNodeSetParams, 25898, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__868)) __PYX_ERR(0, 25898, __pyx_L1_error)

  /* "cuda/cuda.pyx":25934
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddChildGraphNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, childGraph):             # <<<<<<<<<<<<<<
 *     """ Creates a child graph node and adds it to a graph.
 * 
 */
  __pyx_tuple__1623 = PyTuple_Pack(14, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_childGraph, __pyx_n_s_cchildGraph, __pyx_n_s_pchildGraph, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1623)) __PYX_ERR(0, 25934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1623);
  __Pyx_GIVEREF(__pyx_tuple__1623);
  __pyx_codeobj__869 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1623, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddChildGraphNode, 25934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__869)) __PYX_ERR(0, 25934, __pyx_L1_error)

  /* "cuda/cuda.pyx":26013
 * 
 * @cython.embedsignature(True)
 * def cuGraphChildGraphNodeGetGraph(hNode):             # <<<<<<<<<<<<<<
 *     """ Gets a handle to the embedded graph of a child graph node.
 * 
 */
  __pyx_tuple__1624 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_phGraph, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1624)) __PYX_ERR(0, 26013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1624);
  __Pyx_GIVEREF(__pyx_tuple__1624);
  __pyx_codeobj__870 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1624, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphChildGraphNodeGetGraph, 26013, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__870)) __PYX_ERR(0, 26013, __pyx_L1_error)

  /* "cuda/cuda.pyx":26054
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEmptyNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Creates an empty node and adds it to a graph.
 * 
 */
  __pyx_tuple__1625 = PyTuple_Pack(11, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1625)) __PYX_ERR(0, 26054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1625);
  __Pyx_GIVEREF(__pyx_tuple__1625);
  __pyx_codeobj__871 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1625, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddEmptyNode, 26054, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__871)) __PYX_ERR(0, 26054, __pyx_L1_error)

  /* "cuda/cuda.pyx":26121
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEventRecordNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, event):             # <<<<<<<<<<<<<<
 *     """ Creates an event record node and adds it to a graph.
 * 
 */
  __pyx_tuple__1626 = PyTuple_Pack(14, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_event_2, __pyx_n_s_cevent, __pyx_n_s_pevent, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1626)) __PYX_ERR(0, 26121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1626);
  __Pyx_GIVEREF(__pyx_tuple__1626);
  __pyx_codeobj__872 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1626, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddEventRecordNode, 26121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__872)) __PYX_ERR(0, 26121, __pyx_L1_error)

  /* "cuda/cuda.pyx":26197
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventRecordNodeGetEvent(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns the event associated with an event record node.
 * 
 */
  __pyx_tuple__1627 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_event_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1627)) __PYX_ERR(0, 26197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1627);
  __Pyx_GIVEREF(__pyx_tuple__1627);
  __pyx_codeobj__873 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1627, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphEventRecordNodeGetEvent, 26197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__873)) __PYX_ERR(0, 26197, __pyx_L1_error)

  /* "cuda/cuda.pyx":26233
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventRecordNodeSetEvent(hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets an event record node's event.
 * 
 */
  __pyx_tuple__1628 = PyTuple_Pack(7, __pyx_n_s_hNode, __pyx_n_s_event_2, __pyx_n_s_cevent, __pyx_n_s_pevent, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1628)) __PYX_ERR(0, 26233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1628);
  __Pyx_GIVEREF(__pyx_tuple__1628);
  __pyx_codeobj__874 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1628, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphEventRecordNodeSetEvent, 26233, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__874)) __PYX_ERR(0, 26233, __pyx_L1_error)

  /* "cuda/cuda.pyx":26278
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEventWaitNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, event):             # <<<<<<<<<<<<<<
 *     """ Creates an event wait node and adds it to a graph.
 * 
 */
  __pyx_tuple__1629 = PyTuple_Pack(14, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_event_2, __pyx_n_s_cevent, __pyx_n_s_pevent, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1629)) __PYX_ERR(0, 26278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1629);
  __Pyx_GIVEREF(__pyx_tuple__1629);
  __pyx_codeobj__875 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1629, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddEventWaitNode, 26278, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__875)) __PYX_ERR(0, 26278, __pyx_L1_error)

  /* "cuda/cuda.pyx":26356
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventWaitNodeGetEvent(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns the event associated with an event wait node.
 * 
 */
  __pyx_tuple__1630 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_event_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1630)) __PYX_ERR(0, 26356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1630);
  __Pyx_GIVEREF(__pyx_tuple__1630);
  __pyx_codeobj__876 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1630, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphEventWaitNodeGetEvent, 26356, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__876)) __PYX_ERR(0, 26356, __pyx_L1_error)

  /* "cuda/cuda.pyx":26392
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventWaitNodeSetEvent(hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets an event wait node's event.
 * 
 */
  __pyx_tuple__1631 = PyTuple_Pack(7, __pyx_n_s_hNode, __pyx_n_s_event_2, __pyx_n_s_cevent, __pyx_n_s_pevent, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1631)) __PYX_ERR(0, 26392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1631);
  __Pyx_GIVEREF(__pyx_tuple__1631);
  __pyx_codeobj__877 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1631, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphEventWaitNodeSetEvent, 26392, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__877)) __PYX_ERR(0, 26392, __pyx_L1_error)

  /* "cuda/cuda.pyx":26437
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an external semaphore signal node and adds it to a graph.
 * 
 */
  __pyx_tuple__1632 = PyTuple_Pack(13, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_nodeParams, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1632)) __PYX_ERR(0, 26437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1632);
  __Pyx_GIVEREF(__pyx_tuple__1632);
  __pyx_codeobj__878 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1632, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddExternalSemaphoresSign_2, 26437, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__878)) __PYX_ERR(0, 26437, __pyx_L1_error)

  /* "cuda/cuda.pyx":26505
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresSignalNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns an external semaphore signal node's parameters.
 * 
 */
  __pyx_tuple__1633 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_params_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1633)) __PYX_ERR(0, 26505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1633);
  __Pyx_GIVEREF(__pyx_tuple__1633);
  __pyx_codeobj__879 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1633, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExternalSemaphoresSignalN, 26505, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__879)) __PYX_ERR(0, 26505, __pyx_L1_error)

  /* "cuda/cuda.pyx":26547
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets an external semaphore signal node's parameters.
 * 
 */
  __pyx_tuple__1634 = PyTuple_Pack(6, __pyx_n_s_hNode, __pyx_n_s_nodeParams, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1634)) __PYX_ERR(0, 26547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1634);
  __Pyx_GIVEREF(__pyx_tuple__1634);
  __pyx_codeobj__880 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1634, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExternalSemaphoresSignalN_2, 26547, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__880)) __PYX_ERR(0, 26547, __pyx_L1_error)

  /* "cuda/cuda.pyx":26584
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an external semaphore wait node and adds it to a graph.
 * 
 */
  __pyx_tuple__1635 = PyTuple_Pack(13, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_nodeParams, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1635)) __PYX_ERR(0, 26584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1635);
  __Pyx_GIVEREF(__pyx_tuple__1635);
  __pyx_codeobj__881 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1635, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddExternalSemaphoresWait_2, 26584, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__881)) __PYX_ERR(0, 26584, __pyx_L1_error)

  /* "cuda/cuda.pyx":26652
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresWaitNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns an external semaphore wait node's parameters.
 * 
 */
  __pyx_tuple__1636 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_params_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1636)) __PYX_ERR(0, 26652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1636);
  __Pyx_GIVEREF(__pyx_tuple__1636);
  __pyx_codeobj__882 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1636, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExternalSemaphoresWaitNod, 26652, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__882)) __PYX_ERR(0, 26652, __pyx_L1_error)

  /* "cuda/cuda.pyx":26694
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets an external semaphore wait node's parameters.
 * 
 */
  __pyx_tuple__1637 = PyTuple_Pack(6, __pyx_n_s_hNode, __pyx_n_s_nodeParams, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1637)) __PYX_ERR(0, 26694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1637);
  __Pyx_GIVEREF(__pyx_tuple__1637);
  __pyx_codeobj__883 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1637, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExternalSemaphoresWaitNod_2, 26694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__883)) __PYX_ERR(0, 26694, __pyx_L1_error)

  /* "cuda/cuda.pyx":26731
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddBatchMemOpNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a batch memory operation node and adds it to a graph.
 * 
 */
  __pyx_tuple__1638 = PyTuple_Pack(13, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_nodeParams, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1638)) __PYX_ERR(0, 26731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1638);
  __Pyx_GIVEREF(__pyx_tuple__1638);
  __pyx_codeobj__884 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1638, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddBatchMemOpNode, 26731, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__884)) __PYX_ERR(0, 26731, __pyx_L1_error)

  /* "cuda/cuda.pyx":26802
 * 
 * @cython.embedsignature(True)
 * def cuGraphBatchMemOpNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a batch mem op node's parameters.
 * 
 */
  __pyx_tuple__1639 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_nodeParams_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1639)) __PYX_ERR(0, 26802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1639);
  __Pyx_GIVEREF(__pyx_tuple__1639);
  __pyx_codeobj__885 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1639, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphBatchMemOpNodeGetParams, 26802, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__885)) __PYX_ERR(0, 26802, __pyx_L1_error)

  /* "cuda/cuda.pyx":26843
 * 
 * @cython.embedsignature(True)
 * def cuGraphBatchMemOpNodeSetParams(hNode, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a batch mem op node's parameters.
 * 
 */
  __pyx_tuple__1640 = PyTuple_Pack(6, __pyx_n_s_hNode, __pyx_n_s_nodeParams, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1640)) __PYX_ERR(0, 26843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1640);
  __Pyx_GIVEREF(__pyx_tuple__1640);
  __pyx_codeobj__886 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1640, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphBatchMemOpNodeSetParams, 26843, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__886)) __PYX_ERR(0, 26843, __pyx_L1_error)

  /* "cuda/cuda.pyx":26882
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a batch mem op node in the given graphExec.
 * 
 */
  __pyx_tuple__1641 = PyTuple_Pack(9, __pyx_n_s_hGraphExec, __pyx_n_s_hNode, __pyx_n_s_nodeParams, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1641)) __PYX_ERR(0, 26882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1641);
  __Pyx_GIVEREF(__pyx_tuple__1641);
  __pyx_codeobj__887 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1641, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExecBatchMemOpNodeSetPara, 26882, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__887)) __PYX_ERR(0, 26882, __pyx_L1_error)

  /* "cuda/cuda.pyx":26953
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemAllocNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_MEM_ALLOC_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an allocation node and adds it to a graph.
 * 
 */
  __pyx_tuple__1642 = PyTuple_Pack(13, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_nodeParams, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1642)) __PYX_ERR(0, 26953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1642);
  __Pyx_GIVEREF(__pyx_tuple__1642);
  __pyx_codeobj__888 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1642, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddMemAllocNode, 26953, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__888)) __PYX_ERR(0, 26953, __pyx_L1_error)

  /* "cuda/cuda.pyx":27060
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemAllocNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memory alloc node's parameters.
 * 
 */
  __pyx_tuple__1643 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_params_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1643)) __PYX_ERR(0, 27060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1643);
  __Pyx_GIVEREF(__pyx_tuple__1643);
  __pyx_codeobj__889 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1643, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphMemAllocNodeGetParams, 27060, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__889)) __PYX_ERR(0, 27060, __pyx_L1_error)

  /* "cuda/cuda.pyx":27099
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemFreeNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, dptr):             # <<<<<<<<<<<<<<
 *     """ Creates a memory free node and adds it to a graph.
 * 
 */
  __pyx_tuple__1644 = PyTuple_Pack(14, __pyx_n_s_hGraph, __pyx_n_s_dependencies, __pyx_n_s_numDependencies, __pyx_n_s_dptr_2, __pyx_n_s_cdptr, __pyx_n_s_pdptr, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphNode, __pyx_n_s_cdependencies, __pyx_n_s_idx, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1644)) __PYX_ERR(0, 27099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1644);
  __Pyx_GIVEREF(__pyx_tuple__1644);
  __pyx_codeobj__890 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1644, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddMemFreeNode, 27099, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__890)) __PYX_ERR(0, 27099, __pyx_L1_error)

  /* "cuda/cuda.pyx":27192
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemFreeNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memory free node's parameters.
 * 
 */
  __pyx_tuple__1645 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_dptr_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1645)) __PYX_ERR(0, 27192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1645);
  __Pyx_GIVEREF(__pyx_tuple__1645);
  __pyx_codeobj__891 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1645, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphMemFreeNodeGetParams, 27192, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__891)) __PYX_ERR(0, 27192, __pyx_L1_error)

  /* "cuda/cuda.pyx":27228
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGraphMemTrim(device):             # <<<<<<<<<<<<<<
 *     """ Free unused memory that was cached on the specified device for use with graphs back to the OS.
 * 
 */
  __pyx_tuple__1646 = PyTuple_Pack(4, __pyx_n_s_device, __pyx_n_s_cdevice, __pyx_n_s_pdevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1646)) __PYX_ERR(0, 27228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1646);
  __Pyx_GIVEREF(__pyx_tuple__1646);
  __pyx_codeobj__892 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1646, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGraphMemTrim, 27228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__892)) __PYX_ERR(0, 27228, __pyx_L1_error)

  /* "cuda/cuda.pyx":27263
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetGraphMemAttribute(device, attr not None : CUgraphMem_attribute):             # <<<<<<<<<<<<<<
 *     """ Query asynchronous allocation attributes related to graphs.
 * 
 */
  __pyx_tuple__1647 = PyTuple_Pack(8, __pyx_n_s_device, __pyx_n_s_attr, __pyx_n_s_cdevice, __pyx_n_s_pdevice, __pyx_n_s_cattr, __pyx_n_s_cvalue, __pyx_n_s_cvalue_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1647)) __PYX_ERR(0, 27263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1647);
  __Pyx_GIVEREF(__pyx_tuple__1647);
  __pyx_codeobj__893 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1647, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetGraphMemAttribute, 27263, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__893)) __PYX_ERR(0, 27263, __pyx_L1_error)

  /* "cuda/cuda.pyx":27318
 * 
 * @cython.embedsignature(True)
 * def cuDeviceSetGraphMemAttribute(device, attr not None : CUgraphMem_attribute, value):             # <<<<<<<<<<<<<<
 *     """ Set asynchronous allocation attributes related to graphs.
 * 
 */
  __pyx_tuple__1648 = PyTuple_Pack(9, __pyx_n_s_device, __pyx_n_s_attr, __pyx_n_s_value, __pyx_n_s_cdevice, __pyx_n_s_pdevice, __pyx_n_s_cattr, __pyx_n_s_cvalue, __pyx_n_s_cvalue_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1648)) __PYX_ERR(0, 27318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1648);
  __Pyx_GIVEREF(__pyx_tuple__1648);
  __pyx_codeobj__894 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1648, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceSetGraphMemAttribute, 27318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__894)) __PYX_ERR(0, 27318, __pyx_L1_error)

  /* "cuda/cuda.pyx":27366
 * 
 * @cython.embedsignature(True)
 * def cuGraphClone(originalGraph):             # <<<<<<<<<<<<<<
 *     """ Clones a graph.
 * 
 */
  __pyx_tuple__1649 = PyTuple_Pack(5, __pyx_n_s_originalGraph, __pyx_n_s_coriginalGraph, __pyx_n_s_poriginalGraph, __pyx_n_s_phGraphClone, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1649)) __PYX_ERR(0, 27366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1649);
  __Pyx_GIVEREF(__pyx_tuple__1649);
  __pyx_codeobj__895 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1649, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphClone, 27366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__895)) __PYX_ERR(0, 27366, __pyx_L1_error)

  /* "cuda/cuda.pyx":27408
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeFindInClone(hOriginalNode, hClonedGraph):             # <<<<<<<<<<<<<<
 *     """ Finds a cloned version of a node.
 * 
 */
  __pyx_tuple__1650 = PyTuple_Pack(8, __pyx_n_s_hOriginalNode, __pyx_n_s_hClonedGraph, __pyx_n_s_chClonedGraph, __pyx_n_s_phClonedGraph, __pyx_n_s_chOriginalNode, __pyx_n_s_phOriginalNode, __pyx_n_s_phNode, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1650)) __PYX_ERR(0, 27408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1650);
  __Pyx_GIVEREF(__pyx_tuple__1650);
  __pyx_codeobj__896 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1650, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphNodeFindInClone, 27408, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__896)) __PYX_ERR(0, 27408, __pyx_L1_error)

  /* "cuda/cuda.pyx":27463
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetType(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a node's type.
 * 
 */
  __pyx_tuple__1651 = PyTuple_Pack(5, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_typename, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1651)) __PYX_ERR(0, 27463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1651);
  __Pyx_GIVEREF(__pyx_tuple__1651);
  __pyx_codeobj__897 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1651, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphNodeGetType, 27463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__897)) __PYX_ERR(0, 27463, __pyx_L1_error)

  /* "cuda/cuda.pyx":27499
 * 
 * @cython.embedsignature(True)
 * def cuGraphGetNodes(hGraph, size_t numNodes = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a graph's nodes.
 * 
 */
  __pyx_tuple__1652 = PyTuple_Pack(9, __pyx_n_s_hGraph, __pyx_n_s_numNodes, __pyx_n_s_graph_length, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_cnodes, __pyx_n_s_pynodes, __pyx_n_s_err, __pyx_n_s_idx); if (unlikely(!__pyx_tuple__1652)) __PYX_ERR(0, 27499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1652);
  __Pyx_GIVEREF(__pyx_tuple__1652);
  __pyx_codeobj__898 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1652, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphGetNodes, 27499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__898)) __PYX_ERR(0, 27499, __pyx_L1_error)

  /* "cuda/cuda.pyx":27554
 * 
 * @cython.embedsignature(True)
 * def cuGraphGetRootNodes(hGraph, size_t numRootNodes = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a graph's root nodes.
 * 
 */
  __pyx_tuple__1653 = PyTuple_Pack(9, __pyx_n_s_hGraph, __pyx_n_s_numRootNodes, __pyx_n_s_graph_length, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_crootNodes, __pyx_n_s_pyrootNodes, __pyx_n_s_err, __pyx_n_s_idx); if (unlikely(!__pyx_tuple__1653)) __PYX_ERR(0, 27554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1653);
  __Pyx_GIVEREF(__pyx_tuple__1653);
  __pyx_codeobj__899 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1653, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphGetRootNodes, 27554, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__899)) __PYX_ERR(0, 27554, __pyx_L1_error)

  /* "cuda/cuda.pyx":27609
 * 
 * @cython.embedsignature(True)
 * def cuGraphGetEdges(hGraph, size_t numEdges = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a graph's dependency edges.
 * 
 */
  __pyx_tuple__1654 = PyTuple_Pack(12, __pyx_n_s_hGraph, __pyx_n_s_numEdges, __pyx_n_s_graph_length, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_cfrom, __pyx_n_s_pyfrom, __pyx_n_s_cto, __pyx_n_s_pyto, __pyx_n_s_err, __pyx_n_s_idx, __pyx_n_s_idx); if (unlikely(!__pyx_tuple__1654)) __PYX_ERR(0, 27609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1654);
  __Pyx_GIVEREF(__pyx_tuple__1654);
  __pyx_codeobj__900 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1654, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphGetEdges, 27609, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__900)) __PYX_ERR(0, 27609, __pyx_L1_error)

  /* "cuda/cuda.pyx":27678
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetDependencies(hNode, size_t numDependencies = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a node's dependencies.
 * 
 */
  __pyx_tuple__1655 = PyTuple_Pack(9, __pyx_n_s_hNode, __pyx_n_s_numDependencies, __pyx_n_s_graph_length, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_cdependencies, __pyx_n_s_pydependencies, __pyx_n_s_err, __pyx_n_s_idx); if (unlikely(!__pyx_tuple__1655)) __PYX_ERR(0, 27678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1655);
  __Pyx_GIVEREF(__pyx_tuple__1655);
  __pyx_codeobj__901 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1655, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphNodeGetDependencies, 27678, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__901)) __PYX_ERR(0, 27678, __pyx_L1_error)

  /* "cuda/cuda.pyx":27734
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetDependentNodes(hNode, size_t numDependentNodes = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a node's dependent nodes.
 * 
 */
  __pyx_tuple__1656 = PyTuple_Pack(9, __pyx_n_s_hNode, __pyx_n_s_numDependentNodes, __pyx_n_s_graph_length, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_cdependentNodes, __pyx_n_s_pydependentNodes, __pyx_n_s_err, __pyx_n_s_idx); if (unlikely(!__pyx_tuple__1656)) __PYX_ERR(0, 27734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1656);
  __Pyx_GIVEREF(__pyx_tuple__1656);
  __pyx_codeobj__902 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1656, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphNodeGetDependentNodes, 27734, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__902)) __PYX_ERR(0, 27734, __pyx_L1_error)

  /* "cuda/cuda.pyx":27790
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddDependencies(hGraph, from_ : List[CUgraphNode], to : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Adds dependency edges to a graph.
 * 
 */
  __pyx_tuple__1657 = PyTuple_Pack(13, __pyx_n_s_hGraph, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_numDependencies, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_cfrom, __pyx_n_s_idx, __pyx_n_s_cto, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1657)) __PYX_ERR(0, 27790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1657);
  __Pyx_GIVEREF(__pyx_tuple__1657);
  __pyx_codeobj__903 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1657, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphAddDependencies, 27790, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__903)) __PYX_ERR(0, 27790, __pyx_L1_error)

  /* "cuda/cuda.pyx":27864
 * 
 * @cython.embedsignature(True)
 * def cuGraphRemoveDependencies(hGraph, from_ : List[CUgraphNode], to : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Removes dependency edges from a graph.
 * 
 */
  __pyx_tuple__1658 = PyTuple_Pack(13, __pyx_n_s_hGraph, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_numDependencies, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_cfrom, __pyx_n_s_idx, __pyx_n_s_cto, __pyx_n_s_err, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__1658)) __PYX_ERR(0, 27864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1658);
  __Pyx_GIVEREF(__pyx_tuple__1658);
  __pyx_codeobj__906 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1658, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphRemoveDependencies, 27864, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__906)) __PYX_ERR(0, 27864, __pyx_L1_error)

  /* "cuda/cuda.pyx":27942
 * 
 * @cython.embedsignature(True)
 * def cuGraphDestroyNode(hNode):             # <<<<<<<<<<<<<<
 *     """ Remove a node from the graph.
 * 
 */
  __pyx_tuple__1659 = PyTuple_Pack(4, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1659)) __PYX_ERR(0, 27942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1659);
  __Pyx_GIVEREF(__pyx_tuple__1659);
  __pyx_codeobj__907 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1659, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphDestroyNode, 27942, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__907)) __PYX_ERR(0, 27942, __pyx_L1_error)

  /* "cuda/cuda.pyx":27979
 * 
 * @cython.embedsignature(True)
 * def cuGraphInstantiate(hGraph, char* logBuffer, size_t bufferSize):             # <<<<<<<<<<<<<<
 *     """ Creates an executable graph from a graph.
 * 
 */
  __pyx_tuple__1660 = PyTuple_Pack(8, __pyx_n_s_hGraph, __pyx_n_s_logBuffer, __pyx_n_s_bufferSize, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphExec, __pyx_n_s_phErrorNode, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1660)) __PYX_ERR(0, 27979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1660);
  __Pyx_GIVEREF(__pyx_tuple__1660);
  __pyx_codeobj__908 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1660, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphInstantiate, 27979, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__908)) __PYX_ERR(0, 27979, __pyx_L1_error)

  /* "cuda/cuda.pyx":28032
 * 
 * @cython.embedsignature(True)
 * def cuGraphInstantiateWithFlags(hGraph, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Creates an executable graph from a graph.
 * 
 */
  __pyx_tuple__1661 = PyTuple_Pack(6, __pyx_n_s_hGraph, __pyx_n_s_flags_2, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_phGraphExec, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1661)) __PYX_ERR(0, 28032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1661);
  __Pyx_GIVEREF(__pyx_tuple__1661);
  __pyx_codeobj__909 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1661, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphInstantiateWithFlags, 28032, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__909)) __PYX_ERR(0, 28032, __pyx_L1_error)

  /* "cuda/cuda.pyx":28094
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a kernel node in the given graphExec.
 * 
 */
  __pyx_tuple__1662 = PyTuple_Pack(9, __pyx_n_s_hGraphExec, __pyx_n_s_hNode, __pyx_n_s_nodeParams, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1662)) __PYX_ERR(0, 28094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1662);
  __Pyx_GIVEREF(__pyx_tuple__1662);
  __pyx_codeobj__910 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1662, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExecKernelNodeSetParams, 28094, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__910)) __PYX_ERR(0, 28094, __pyx_L1_error)

  /* "cuda/cuda.pyx":28158
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams : CUDA_MEMCPY3D, ctx):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a memcpy node in the given graphExec.
 * 
 */
  __pyx_tuple__1663 = PyTuple_Pack(12, __pyx_n_s_hGraphExec, __pyx_n_s_hNode, __pyx_n_s_copyParams, __pyx_n_s_ctx_2, __pyx_n_s_cctx, __pyx_n_s_pctx, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_ccopyParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1663)) __PYX_ERR(0, 28158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1663);
  __Pyx_GIVEREF(__pyx_tuple__1663);
  __pyx_codeobj__911 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1663, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExecMemcpyNodeSetParams, 28158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__911)) __PYX_ERR(0, 28158, __pyx_L1_error)

  /* "cuda/cuda.pyx":28235
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams : CUDA_MEMSET_NODE_PARAMS, ctx):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a memset node in the given graphExec.
 * 
 */
  __pyx_tuple__1664 = PyTuple_Pack(12, __pyx_n_s_hGraphExec, __pyx_n_s_hNode, __pyx_n_s_memsetParams, __pyx_n_s_ctx_2, __pyx_n_s_cctx, __pyx_n_s_pctx, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_cmemsetParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1664)) __PYX_ERR(0, 28235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1664);
  __Pyx_GIVEREF(__pyx_tuple__1664);
  __pyx_codeobj__912 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1664, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExecMemsetNodeSetParams, 28235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__912)) __PYX_ERR(0, 28235, __pyx_L1_error)

  /* "cuda/cuda.pyx":28312
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a host node in the given graphExec.
 * 
 */
  __pyx_tuple__1665 = PyTuple_Pack(9, __pyx_n_s_hGraphExec, __pyx_n_s_hNode, __pyx_n_s_nodeParams, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1665)) __PYX_ERR(0, 28312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1665);
  __Pyx_GIVEREF(__pyx_tuple__1665);
  __pyx_codeobj__913 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1665, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExecHostNodeSetParams, 28312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__913)) __PYX_ERR(0, 28312, __pyx_L1_error)

  /* "cuda/cuda.pyx":28367
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph):             # <<<<<<<<<<<<<<
 *     """ Updates node parameters in the child graph node in the given graphExec.
 * 
 */
  __pyx_tuple__1666 = PyTuple_Pack(10, __pyx_n_s_hGraphExec, __pyx_n_s_hNode, __pyx_n_s_childGraph, __pyx_n_s_cchildGraph, __pyx_n_s_pchildGraph, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1666)) __PYX_ERR(0, 28367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1666);
  __Pyx_GIVEREF(__pyx_tuple__1666);
  __pyx_codeobj__914 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1666, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExecChildGraphNodeSetPara, 28367, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__914)) __PYX_ERR(0, 28367, __pyx_L1_error)

  /* "cuda/cuda.pyx":28439
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets the event for an event record node in the given graphExec.
 * 
 */
  __pyx_tuple__1667 = PyTuple_Pack(10, __pyx_n_s_hGraphExec, __pyx_n_s_hNode, __pyx_n_s_event_2, __pyx_n_s_cevent, __pyx_n_s_pevent, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1667)) __PYX_ERR(0, 28439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1667);
  __Pyx_GIVEREF(__pyx_tuple__1667);
  __pyx_codeobj__915 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1667, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExecEventRecordNodeSetEve, 28439, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__915)) __PYX_ERR(0, 28439, __pyx_L1_error)

  /* "cuda/cuda.pyx":28504
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets the event for an event wait node in the given graphExec.
 * 
 */
  __pyx_tuple__1668 = PyTuple_Pack(10, __pyx_n_s_hGraphExec, __pyx_n_s_hNode, __pyx_n_s_event_2, __pyx_n_s_cevent, __pyx_n_s_pevent, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1668)) __PYX_ERR(0, 28504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1668);
  __Pyx_GIVEREF(__pyx_tuple__1668);
  __pyx_codeobj__916 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1668, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExecEventWaitNodeSetEvent, 28504, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__916)) __PYX_ERR(0, 28504, __pyx_L1_error)

  /* "cuda/cuda.pyx":28569
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for an external semaphore signal node in the given graphExec.
 * 
 */
  __pyx_tuple__1669 = PyTuple_Pack(9, __pyx_n_s_hGraphExec, __pyx_n_s_hNode, __pyx_n_s_nodeParams, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1669)) __PYX_ERR(0, 28569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1669);
  __Pyx_GIVEREF(__pyx_tuple__1669);
  __pyx_codeobj__917 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1669, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExecExternalSemaphoresSig, 28569, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__917)) __PYX_ERR(0, 28569, __pyx_L1_error)

  /* "cuda/cuda.pyx":28629
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for an external semaphore wait node in the given graphExec.
 * 
 */
  __pyx_tuple__1670 = PyTuple_Pack(9, __pyx_n_s_hGraphExec, __pyx_n_s_hNode, __pyx_n_s_nodeParams, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_cnodeParams_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1670)) __PYX_ERR(0, 28629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1670);
  __Pyx_GIVEREF(__pyx_tuple__1670);
  __pyx_codeobj__918 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1670, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExecExternalSemaphoresWai, 28629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__918)) __PYX_ERR(0, 28629, __pyx_L1_error)

  /* "cuda/cuda.pyx":28689
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled):             # <<<<<<<<<<<<<<
 *     """ Enables or disables the specified node in the given graphExec.
 * 
 */
  __pyx_tuple__1671 = PyTuple_Pack(8, __pyx_n_s_hGraphExec, __pyx_n_s_hNode, __pyx_n_s_isEnabled, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1671)) __PYX_ERR(0, 28689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1671);
  __Pyx_GIVEREF(__pyx_tuple__1671);
  __pyx_codeobj__919 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1671, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphNodeSetEnabled, 28689, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__919)) __PYX_ERR(0, 28689, __pyx_L1_error)

  /* "cuda/cuda.pyx":28752
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetEnabled(hGraphExec, hNode):             # <<<<<<<<<<<<<<
 *     """ Query whether a node in the given graphExec is enabled.
 * 
 */
  __pyx_tuple__1672 = PyTuple_Pack(8, __pyx_n_s_hGraphExec, __pyx_n_s_hNode, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_isEnabled, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1672)) __PYX_ERR(0, 28752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1672);
  __Pyx_GIVEREF(__pyx_tuple__1672);
  __pyx_codeobj__920 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1672, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphNodeGetEnabled, 28752, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__920)) __PYX_ERR(0, 28752, __pyx_L1_error)

  /* "cuda/cuda.pyx":28809
 * 
 * @cython.embedsignature(True)
 * def cuGraphUpload(hGraphExec, hStream):             # <<<<<<<<<<<<<<
 *     """ Uploads an executable graph in a stream.
 * 
 */
  __pyx_tuple__1673 = PyTuple_Pack(7, __pyx_n_s_hGraphExec, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1673)) __PYX_ERR(0, 28809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1673);
  __Pyx_GIVEREF(__pyx_tuple__1673);
  __pyx_codeobj__921 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1673, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphUpload, 28809, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__921)) __PYX_ERR(0, 28809, __pyx_L1_error)

  /* "cuda/cuda.pyx":28858
 * 
 * @cython.embedsignature(True)
 * def cuGraphLaunch(hGraphExec, hStream):             # <<<<<<<<<<<<<<
 *     """ Launches an executable graph in a stream.
 * 
 */
  __pyx_tuple__1674 = PyTuple_Pack(7, __pyx_n_s_hGraphExec, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1674)) __PYX_ERR(0, 28858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1674);
  __Pyx_GIVEREF(__pyx_tuple__1674);
  __pyx_codeobj__922 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1674, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphLaunch, 28858, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__922)) __PYX_ERR(0, 28858, __pyx_L1_error)

  /* "cuda/cuda.pyx":28912
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecDestroy(hGraphExec):             # <<<<<<<<<<<<<<
 *     """ Destroys an executable graph.
 * 
 */
  __pyx_tuple__1675 = PyTuple_Pack(4, __pyx_n_s_hGraphExec, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1675)) __PYX_ERR(0, 28912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1675);
  __Pyx_GIVEREF(__pyx_tuple__1675);
  __pyx_codeobj__923 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1675, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExecDestroy, 28912, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__923)) __PYX_ERR(0, 28912, __pyx_L1_error)

  /* "cuda/cuda.pyx":28947
 * 
 * @cython.embedsignature(True)
 * def cuGraphDestroy(hGraph):             # <<<<<<<<<<<<<<
 *     """ Destroys a graph.
 * 
 */
  __pyx_tuple__1676 = PyTuple_Pack(4, __pyx_n_s_hGraph, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1676)) __PYX_ERR(0, 28947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1676);
  __Pyx_GIVEREF(__pyx_tuple__1676);
  __pyx_codeobj__924 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1676, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphDestroy, 28947, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__924)) __PYX_ERR(0, 28947, __pyx_L1_error)

  /* "cuda/cuda.pyx":28980
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecUpdate(hGraphExec, hGraph):             # <<<<<<<<<<<<<<
 *     """ Check whether an executable graph can be updated with a graph and perform the update if possible.
 * 
 */
  __pyx_tuple__1677 = PyTuple_Pack(9, __pyx_n_s_hGraphExec, __pyx_n_s_hGraph, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_chGraphExec, __pyx_n_s_phGraphExec, __pyx_n_s_hErrorNode_out, __pyx_n_s_updateResult_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1677)) __PYX_ERR(0, 28980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1677);
  __Pyx_GIVEREF(__pyx_tuple__1677);
  __pyx_codeobj__925 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1677, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphExecUpdate, 28980, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__925)) __PYX_ERR(0, 28980, __pyx_L1_error)

  /* "cuda/cuda.pyx":29130
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeCopyAttributes(dst, src):             # <<<<<<<<<<<<<<
 *     """ Copies attributes from source node to destination node.
 * 
 */
  __pyx_tuple__1678 = PyTuple_Pack(7, __pyx_n_s_dst_2, __pyx_n_s_src, __pyx_n_s_csrc, __pyx_n_s_psrc, __pyx_n_s_cdst, __pyx_n_s_pdst, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1678)) __PYX_ERR(0, 29130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1678);
  __Pyx_GIVEREF(__pyx_tuple__1678);
  __pyx_codeobj__926 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1678, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphKernelNodeCopyAttributes, 29130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__926)) __PYX_ERR(0, 29130, __pyx_L1_error)

  /* "cuda/cuda.pyx":29177
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeGetAttribute(hNode, attr not None : CUkernelNodeAttrID):             # <<<<<<<<<<<<<<
 *     """ Queries node attribute.
 * 
 */
  __pyx_tuple__1679 = PyTuple_Pack(7, __pyx_n_s_hNode, __pyx_n_s_attr, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_cattr, __pyx_n_s_value_out, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1679)) __PYX_ERR(0, 29177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1679);
  __Pyx_GIVEREF(__pyx_tuple__1679);
  __pyx_codeobj__927 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1679, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphKernelNodeGetAttribute, 29177, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__927)) __PYX_ERR(0, 29177, __pyx_L1_error)

  /* "cuda/cuda.pyx":29217
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeSetAttribute(hNode, attr not None : CUkernelNodeAttrID, value : CUkernelNodeAttrValue):             # <<<<<<<<<<<<<<
 *     """ Sets node attribute.
 * 
 */
  __pyx_tuple__1680 = PyTuple_Pack(8, __pyx_n_s_hNode, __pyx_n_s_attr, __pyx_n_s_value, __pyx_n_s_chNode, __pyx_n_s_phNode, __pyx_n_s_cattr, __pyx_n_s_cvalue_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1680)) __PYX_ERR(0, 29217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1680);
  __Pyx_GIVEREF(__pyx_tuple__1680);
  __pyx_codeobj__928 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1680, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphKernelNodeSetAttribute, 29217, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__928)) __PYX_ERR(0, 29217, __pyx_L1_error)

  /* "cuda/cuda.pyx":29257
 * 
 * @cython.embedsignature(True)
 * def cuGraphDebugDotPrint(hGraph, char* path, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a DOT file describing graph structure.
 * 
 */
  __pyx_tuple__1681 = PyTuple_Pack(6, __pyx_n_s_hGraph, __pyx_n_s_path, __pyx_n_s_flags_2, __pyx_n_s_chGraph, __pyx_n_s_phGraph, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1681)) __PYX_ERR(0, 29257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1681);
  __Pyx_GIVEREF(__pyx_tuple__1681);
  __pyx_codeobj__929 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1681, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphDebugDotPrint, 29257, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__929)) __PYX_ERR(0, 29257, __pyx_L1_error)

  /* "cuda/cuda.pyx":29295
 * 
 * @cython.embedsignature(True)
 * def cuUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Create a user object.
 * 
 */
  __pyx_tuple__1682 = PyTuple_Pack(10, __pyx_n_s_ptr_2, __pyx_n_s_destroy, __pyx_n_s_initialRefcount, __pyx_n_s_flags_2, __pyx_n_s_cdestroy, __pyx_n_s_pdestroy, __pyx_n_s_object_out, __pyx_n_s_cptr, __pyx_n_s_cptr_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1682)) __PYX_ERR(0, 29295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1682);
  __Pyx_GIVEREF(__pyx_tuple__1682);
  __pyx_codeobj__930 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1682, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuUserObjectCreate, 29295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__930)) __PYX_ERR(0, 29295, __pyx_L1_error)

  /* "cuda/cuda.pyx":29353
 * 
 * @cython.embedsignature(True)
 * def cuUserObjectRetain(object, unsigned int count):             # <<<<<<<<<<<<<<
 *     """ Retain a reference to a user object.
 * 
 */
  __pyx_tuple__1683 = PyTuple_Pack(5, __pyx_n_s_object, __pyx_n_s_count_2, __pyx_n_s_cobject, __pyx_n_s_pobject, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1683)) __PYX_ERR(0, 29353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1683);
  __Pyx_GIVEREF(__pyx_tuple__1683);
  __pyx_codeobj__931 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1683, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuUserObjectRetain, 29353, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__931)) __PYX_ERR(0, 29353, __pyx_L1_error)

  /* "cuda/cuda.pyx":29393
 * 
 * @cython.embedsignature(True)
 * def cuUserObjectRelease(object, unsigned int count):             # <<<<<<<<<<<<<<
 *     """ Release a reference to a user object.
 * 
 */
  __pyx_tuple__1684 = PyTuple_Pack(5, __pyx_n_s_object, __pyx_n_s_count_2, __pyx_n_s_cobject, __pyx_n_s_pobject, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1684)) __PYX_ERR(0, 29393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1684);
  __Pyx_GIVEREF(__pyx_tuple__1684);
  __pyx_codeobj__932 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1684, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuUserObjectRelease, 29393, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__932)) __PYX_ERR(0, 29393, __pyx_L1_error)

  /* "cuda/cuda.pyx":29436
 * 
 * @cython.embedsignature(True)
 * def cuGraphRetainUserObject(graph, object, unsigned int count, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Retain a reference to a user object from a graph.
 * 
 */
  __pyx_tuple__1685 = PyTuple_Pack(9, __pyx_n_s_graph, __pyx_n_s_object, __pyx_n_s_count_2, __pyx_n_s_flags_2, __pyx_n_s_cobject, __pyx_n_s_pobject, __pyx_n_s_cgraph, __pyx_n_s_pgraph, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1685)) __PYX_ERR(0, 29436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1685);
  __Pyx_GIVEREF(__pyx_tuple__1685);
  __pyx_codeobj__933 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1685, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphRetainUserObject, 29436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__933)) __PYX_ERR(0, 29436, __pyx_L1_error)

  /* "cuda/cuda.pyx":29492
 * 
 * @cython.embedsignature(True)
 * def cuGraphReleaseUserObject(graph, object, unsigned int count):             # <<<<<<<<<<<<<<
 *     """ Release a user object reference from a graph.
 * 
 */
  __pyx_tuple__1686 = PyTuple_Pack(8, __pyx_n_s_graph, __pyx_n_s_object, __pyx_n_s_count_2, __pyx_n_s_cobject, __pyx_n_s_pobject, __pyx_n_s_cgraph, __pyx_n_s_pgraph, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1686)) __PYX_ERR(0, 29492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1686);
  __Pyx_GIVEREF(__pyx_tuple__1686);
  __pyx_codeobj__934 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1686, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphReleaseUserObject, 29492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__934)) __PYX_ERR(0, 29492, __pyx_L1_error)

  /* "cuda/cuda.pyx":29543
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dynamicSMemSize):             # <<<<<<<<<<<<<<
 *     """ Returns occupancy of a function.
 * 
 */
  __pyx_tuple__1687 = PyTuple_Pack(7, __pyx_n_s_func_2, __pyx_n_s_blockSize, __pyx_n_s_dynamicSMemSize, __pyx_n_s_cfunc, __pyx_n_s_pfunc, __pyx_n_s_numBlocks, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1687)) __PYX_ERR(0, 29543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1687);
  __Pyx_GIVEREF(__pyx_tuple__1687);
  __pyx_codeobj__935 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1687, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuOccupancyMaxActiveBlocksPerMul, 29543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__935)) __PYX_ERR(0, 29543, __pyx_L1_error)

  /* "cuda/cuda.pyx":29584
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, size_t dynamicSMemSize, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Returns occupancy of a function.
 * 
 */
  __pyx_tuple__1688 = PyTuple_Pack(8, __pyx_n_s_func_2, __pyx_n_s_blockSize, __pyx_n_s_dynamicSMemSize, __pyx_n_s_flags_2, __pyx_n_s_cfunc, __pyx_n_s_pfunc, __pyx_n_s_numBlocks, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1688)) __PYX_ERR(0, 29584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1688);
  __Pyx_GIVEREF(__pyx_tuple__1688);
  __pyx_codeobj__936 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1688, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuOccupancyMaxActiveBlocksPerMul_2, 29584, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__936)) __PYX_ERR(0, 29584, __pyx_L1_error)

  /* "cuda/cuda.pyx":29643
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxPotentialBlockSize(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit):             # <<<<<<<<<<<<<<
 *     """ Suggest a launch configuration with reasonable occupancy.
 * 
 */
  __pyx_tuple__1689 = PyTuple_Pack(11, __pyx_n_s_func_2, __pyx_n_s_blockSizeToDynamicSMemSize, __pyx_n_s_dynamicSMemSize, __pyx_n_s_blockSizeLimit, __pyx_n_s_cblockSizeToDynamicSMemSize, __pyx_n_s_pblockSizeToDynamicSMemSize, __pyx_n_s_cfunc, __pyx_n_s_pfunc, __pyx_n_s_minGridSize, __pyx_n_s_blockSize, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1689)) __PYX_ERR(0, 29643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1689);
  __Pyx_GIVEREF(__pyx_tuple__1689);
  __pyx_codeobj__937 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1689, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuOccupancyMaxPotentialBlockSize, 29643, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__937)) __PYX_ERR(0, 29643, __pyx_L1_error)

  /* "cuda/cuda.pyx":29722
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxPotentialBlockSizeWithFlags(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Suggest a launch configuration with reasonable occupancy.
 * 
 */
  __pyx_tuple__1690 = PyTuple_Pack(12, __pyx_n_s_func_2, __pyx_n_s_blockSizeToDynamicSMemSize, __pyx_n_s_dynamicSMemSize, __pyx_n_s_blockSizeLimit, __pyx_n_s_flags_2, __pyx_n_s_cblockSizeToDynamicSMemSize, __pyx_n_s_pblockSizeToDynamicSMemSize, __pyx_n_s_cfunc, __pyx_n_s_pfunc, __pyx_n_s_minGridSize, __pyx_n_s_blockSize, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1690)) __PYX_ERR(0, 29722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1690);
  __Pyx_GIVEREF(__pyx_tuple__1690);
  __pyx_codeobj__938 = (PyObject*)__Pyx_PyCode_New(5, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1690, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuOccupancyMaxPotentialBlockSize_2, 29722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__938)) __PYX_ERR(0, 29722, __pyx_L1_error)

  /* "cuda/cuda.pyx":29800
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize):             # <<<<<<<<<<<<<<
 *     """ Returns dynamic shared memory available per block when launching `numBlocks` blocks on SM.
 * 
 */
  __pyx_tuple__1691 = PyTuple_Pack(7, __pyx_n_s_func_2, __pyx_n_s_numBlocks, __pyx_n_s_blockSize, __pyx_n_s_cfunc, __pyx_n_s_pfunc, __pyx_n_s_dynamicSmemSize, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1691)) __PYX_ERR(0, 29800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1691);
  __Pyx_GIVEREF(__pyx_tuple__1691);
  __pyx_codeobj__939 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1691, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuOccupancyAvailableDynamicSMemP, 29800, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__939)) __PYX_ERR(0, 29800, __pyx_L1_error)

  /* "cuda/cuda.pyx":29837
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxPotentialClusterSize(func, config : CUlaunchConfig):             # <<<<<<<<<<<<<<
 *     """ Given the kernel function (`func`) and launch configuration (`config`), return the maximum cluster size in `*clusterSize`.
 * 
 */
  __pyx_tuple__1692 = PyTuple_Pack(7, __pyx_n_s_func_2, __pyx_n_s_config, __pyx_n_s_cfunc, __pyx_n_s_pfunc, __pyx_n_s_clusterSize, __pyx_n_s_cconfig_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1692)) __PYX_ERR(0, 29837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1692);
  __Pyx_GIVEREF(__pyx_tuple__1692);
  __pyx_codeobj__940 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1692, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuOccupancyMaxPotentialClusterSi, 29837, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__940)) __PYX_ERR(0, 29837, __pyx_L1_error)

  /* "cuda/cuda.pyx":29886
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxActiveClusters(func, config : CUlaunchConfig):             # <<<<<<<<<<<<<<
 *     """ Given the kernel function (`func`) and launch configuration (`config`), return the maximum number of clusters that could co-exist on the target device in `*numClusters`.
 * 
 */
  __pyx_tuple__1693 = PyTuple_Pack(7, __pyx_n_s_func_2, __pyx_n_s_config, __pyx_n_s_cfunc, __pyx_n_s_pfunc, __pyx_n_s_numClusters, __pyx_n_s_cconfig_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1693)) __PYX_ERR(0, 29886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1693);
  __Pyx_GIVEREF(__pyx_tuple__1693);
  __pyx_codeobj__941 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1693, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuOccupancyMaxActiveClusters, 29886, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__941)) __PYX_ERR(0, 29886, __pyx_L1_error)

  /* "cuda/cuda.pyx":29935
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetArray(hTexRef, hArray, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Binds an array as a texture reference.
 * 
 */
  __pyx_tuple__1694 = PyTuple_Pack(8, __pyx_n_s_hTexRef, __pyx_n_s_hArray_2, __pyx_n_s_Flags_2, __pyx_n_s_chArray, __pyx_n_s_phArray, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1694)) __PYX_ERR(0, 29935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1694);
  __Pyx_GIVEREF(__pyx_tuple__1694);
  __pyx_codeobj__942 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1694, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetArray, 29935, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__942)) __PYX_ERR(0, 29935, __pyx_L1_error)

  /* "cuda/cuda.pyx":29988
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Binds a mipmapped array to a texture reference.
 * 
 */
  __pyx_tuple__1695 = PyTuple_Pack(8, __pyx_n_s_hTexRef, __pyx_n_s_hMipmappedArray_2, __pyx_n_s_Flags_2, __pyx_n_s_chMipmappedArray, __pyx_n_s_phMipmappedArray, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1695)) __PYX_ERR(0, 29988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1695);
  __Pyx_GIVEREF(__pyx_tuple__1695);
  __pyx_codeobj__943 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1695, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetMipmappedArray, 29988, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__943)) __PYX_ERR(0, 29988, __pyx_L1_error)

  /* "cuda/cuda.pyx":30041
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetAddress(hTexRef, dptr, size_t numbytes):             # <<<<<<<<<<<<<<
 *     """ Binds an address as a texture reference.
 * 
 */
  __pyx_tuple__1696 = PyTuple_Pack(9, __pyx_n_s_hTexRef, __pyx_n_s_dptr_2, __pyx_n_s_numbytes, __pyx_n_s_cdptr, __pyx_n_s_pdptr, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_ByteOffset, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1696)) __PYX_ERR(0, 30041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1696);
  __Pyx_GIVEREF(__pyx_tuple__1696);
  __pyx_codeobj__944 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1696, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetAddress, 30041, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__944)) __PYX_ERR(0, 30041, __pyx_L1_error)

  /* "cuda/cuda.pyx":30114
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetAddress2D(hTexRef, desc : CUDA_ARRAY_DESCRIPTOR, dptr, size_t Pitch):             # <<<<<<<<<<<<<<
 *     """ Binds an address as a 2D texture reference.
 * 
 */
  __pyx_tuple__1697 = PyTuple_Pack(10, __pyx_n_s_hTexRef, __pyx_n_s_desc, __pyx_n_s_dptr_2, __pyx_n_s_Pitch, __pyx_n_s_cdptr, __pyx_n_s_pdptr, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_cdesc_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1697)) __PYX_ERR(0, 30114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1697);
  __Pyx_GIVEREF(__pyx_tuple__1697);
  __pyx_codeobj__945 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1697, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetAddress2D, 30114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__945)) __PYX_ERR(0, 30114, __pyx_L1_error)

  /* "cuda/cuda.pyx":30195
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetFormat(hTexRef, fmt not None : CUarray_format, int NumPackedComponents):             # <<<<<<<<<<<<<<
 *     """ Sets the format for a texture reference.
 * 
 */
  __pyx_tuple__1698 = PyTuple_Pack(7, __pyx_n_s_hTexRef, __pyx_n_s_fmt, __pyx_n_s_NumPackedComponents, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_cfmt, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1698)) __PYX_ERR(0, 30195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1698);
  __Pyx_GIVEREF(__pyx_tuple__1698);
  __pyx_codeobj__946 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1698, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetFormat, 30195, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__946)) __PYX_ERR(0, 30195, __pyx_L1_error)

  /* "cuda/cuda.pyx":30239
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetAddressMode(hTexRef, int dim, am not None : CUaddress_mode):             # <<<<<<<<<<<<<<
 *     """ Sets the addressing mode for a texture reference.
 * 
 */
  __pyx_tuple__1699 = PyTuple_Pack(7, __pyx_n_s_hTexRef, __pyx_n_s_dim, __pyx_n_s_am, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_cam, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1699)) __PYX_ERR(0, 30239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1699);
  __Pyx_GIVEREF(__pyx_tuple__1699);
  __pyx_codeobj__947 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1699, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetAddressMode, 30239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__947)) __PYX_ERR(0, 30239, __pyx_L1_error)

  /* "cuda/cuda.pyx":30290
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetFilterMode(hTexRef, fm not None : CUfilter_mode):             # <<<<<<<<<<<<<<
 *     """ Sets the filtering mode for a texture reference.
 * 
 */
  __pyx_tuple__1700 = PyTuple_Pack(6, __pyx_n_s_hTexRef, __pyx_n_s_fm, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_cfm, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1700)) __PYX_ERR(0, 30290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1700);
  __Pyx_GIVEREF(__pyx_tuple__1700);
  __pyx_codeobj__948 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1700, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetFilterMode, 30290, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__948)) __PYX_ERR(0, 30290, __pyx_L1_error)

  /* "cuda/cuda.pyx":30335
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmapFilterMode(hTexRef, fm not None : CUfilter_mode):             # <<<<<<<<<<<<<<
 *     """ Sets the mipmap filtering mode for a texture reference.
 * 
 */
  __pyx_tuple__1701 = PyTuple_Pack(6, __pyx_n_s_hTexRef, __pyx_n_s_fm, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_cfm, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1701)) __PYX_ERR(0, 30335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1701);
  __Pyx_GIVEREF(__pyx_tuple__1701);
  __pyx_codeobj__949 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1701, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetMipmapFilterMode, 30335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__949)) __PYX_ERR(0, 30335, __pyx_L1_error)

  /* "cuda/cuda.pyx":30380
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmapLevelBias(hTexRef, float bias):             # <<<<<<<<<<<<<<
 *     """ Sets the mipmap level bias for a texture reference.
 * 
 */
  __pyx_tuple__1702 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_bias, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1702)) __PYX_ERR(0, 30380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1702);
  __Pyx_GIVEREF(__pyx_tuple__1702);
  __pyx_codeobj__950 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1702, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetMipmapLevelBias, 30380, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__950)) __PYX_ERR(0, 30380, __pyx_L1_error)

  /* "cuda/cuda.pyx":30422
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmapLevelClamp(hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp):             # <<<<<<<<<<<<<<
 *     """ Sets the mipmap min/max mipmap level clamps for a texture reference.
 * 
 */
  __pyx_tuple__1703 = PyTuple_Pack(6, __pyx_n_s_hTexRef, __pyx_n_s_minMipmapLevelClamp_2, __pyx_n_s_maxMipmapLevelClamp_2, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1703)) __PYX_ERR(0, 30422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1703);
  __Pyx_GIVEREF(__pyx_tuple__1703);
  __pyx_codeobj__951 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1703, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetMipmapLevelClamp, 30422, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__951)) __PYX_ERR(0, 30422, __pyx_L1_error)

  /* "cuda/cuda.pyx":30466
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMaxAnisotropy(hTexRef, unsigned int maxAniso):             # <<<<<<<<<<<<<<
 *     """ Sets the maximum anisotropy for a texture reference.
 * 
 */
  __pyx_tuple__1704 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_maxAniso, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1704)) __PYX_ERR(0, 30466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1704);
  __Pyx_GIVEREF(__pyx_tuple__1704);
  __pyx_codeobj__952 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1704, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetMaxAnisotropy, 30466, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__952)) __PYX_ERR(0, 30466, __pyx_L1_error)

  /* "cuda/cuda.pyx":30507
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetBorderColor(hTexRef, float pBorderColor):             # <<<<<<<<<<<<<<
 *     """ Sets the border color for a texture reference.
 * 
 */
  __pyx_tuple__1705 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_pBorderColor, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1705)) __PYX_ERR(0, 30507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1705);
  __Pyx_GIVEREF(__pyx_tuple__1705);
  __pyx_codeobj__953 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1705, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetBorderColor, 30507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__953)) __PYX_ERR(0, 30507, __pyx_L1_error)

  /* "cuda/cuda.pyx":30553
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetFlags(hTexRef, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Sets the flags for a texture reference.
 * 
 */
  __pyx_tuple__1706 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_Flags_2, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1706)) __PYX_ERR(0, 30553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1706);
  __Pyx_GIVEREF(__pyx_tuple__1706);
  __pyx_codeobj__954 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1706, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefSetFlags, 30553, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__954)) __PYX_ERR(0, 30553, __pyx_L1_error)

  /* "cuda/cuda.pyx":30609
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetAddress(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the address associated with a texture reference.
 * 
 */
  __pyx_tuple__1707 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_pdptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1707)) __PYX_ERR(0, 30609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1707);
  __Pyx_GIVEREF(__pyx_tuple__1707);
  __pyx_codeobj__955 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1707, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefGetAddress, 30609, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__955)) __PYX_ERR(0, 30609, __pyx_L1_error)

  /* "cuda/cuda.pyx":30649
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetArray(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the array bound to a texture reference.
 * 
 */
  __pyx_tuple__1708 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_phArray, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1708)) __PYX_ERR(0, 30649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1708);
  __Pyx_GIVEREF(__pyx_tuple__1708);
  __pyx_codeobj__956 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1708, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefGetArray, 30649, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__956)) __PYX_ERR(0, 30649, __pyx_L1_error)

  /* "cuda/cuda.pyx":30689
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmappedArray(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the mipmapped array bound to a texture reference.
 * 
 */
  __pyx_tuple__1709 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_phMipmappedArray, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1709)) __PYX_ERR(0, 30689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1709);
  __Pyx_GIVEREF(__pyx_tuple__1709);
  __pyx_codeobj__957 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1709, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefGetMipmappedArray, 30689, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__957)) __PYX_ERR(0, 30689, __pyx_L1_error)

  /* "cuda/cuda.pyx":30730
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetAddressMode(hTexRef, int dim):             # <<<<<<<<<<<<<<
 *     """ Gets the addressing mode used by a texture reference.
 * 
 */
  __pyx_tuple__1710 = PyTuple_Pack(6, __pyx_n_s_hTexRef, __pyx_n_s_dim, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_pam, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1710)) __PYX_ERR(0, 30730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1710);
  __Pyx_GIVEREF(__pyx_tuple__1710);
  __pyx_codeobj__958 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1710, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefGetAddressMode, 30730, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__958)) __PYX_ERR(0, 30730, __pyx_L1_error)

  /* "cuda/cuda.pyx":30772
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetFilterMode(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the filter-mode used by a texture reference.
 * 
 */
  __pyx_tuple__1711 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_pfm, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1711)) __PYX_ERR(0, 30772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1711);
  __Pyx_GIVEREF(__pyx_tuple__1711);
  __pyx_codeobj__959 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1711, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefGetFilterMode, 30772, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__959)) __PYX_ERR(0, 30772, __pyx_L1_error)

  /* "cuda/cuda.pyx":30811
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetFormat(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the format used by a texture reference.
 * 
 */
  __pyx_tuple__1712 = PyTuple_Pack(6, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_pFormat, __pyx_n_s_pNumChannels, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1712)) __PYX_ERR(0, 30811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1712);
  __Pyx_GIVEREF(__pyx_tuple__1712);
  __pyx_codeobj__960 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1712, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefGetFormat, 30811, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__960)) __PYX_ERR(0, 30811, __pyx_L1_error)

  /* "cuda/cuda.pyx":30854
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmapFilterMode(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the mipmap filtering mode for a texture reference.
 * 
 */
  __pyx_tuple__1713 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_pfm, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1713)) __PYX_ERR(0, 30854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1713);
  __Pyx_GIVEREF(__pyx_tuple__1713);
  __pyx_codeobj__961 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1713, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefGetMipmapFilterMode, 30854, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__961)) __PYX_ERR(0, 30854, __pyx_L1_error)

  /* "cuda/cuda.pyx":30893
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmapLevelBias(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the mipmap level bias for a texture reference.
 * 
 */
  __pyx_tuple__1714 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_pbias, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1714)) __PYX_ERR(0, 30893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1714);
  __Pyx_GIVEREF(__pyx_tuple__1714);
  __pyx_codeobj__962 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1714, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefGetMipmapLevelBias, 30893, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__962)) __PYX_ERR(0, 30893, __pyx_L1_error)

  /* "cuda/cuda.pyx":30933
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmapLevelClamp(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the min/max mipmap level clamps for a texture reference.
 * 
 */
  __pyx_tuple__1715 = PyTuple_Pack(6, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_pminMipmapLevelClamp, __pyx_n_s_pmaxMipmapLevelClamp, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1715)) __PYX_ERR(0, 30933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1715);
  __Pyx_GIVEREF(__pyx_tuple__1715);
  __pyx_codeobj__963 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1715, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefGetMipmapLevelClamp, 30933, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__963)) __PYX_ERR(0, 30933, __pyx_L1_error)

  /* "cuda/cuda.pyx":30976
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMaxAnisotropy(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the maximum anisotropy for a texture reference.
 * 
 */
  __pyx_tuple__1716 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_pmaxAniso, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1716)) __PYX_ERR(0, 30976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1716);
  __Pyx_GIVEREF(__pyx_tuple__1716);
  __pyx_codeobj__964 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1716, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefGetMaxAnisotropy, 30976, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__964)) __PYX_ERR(0, 30976, __pyx_L1_error)

  /* "cuda/cuda.pyx":31015
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetBorderColor(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the border color used by a texture reference.
 * 
 */
  __pyx_tuple__1717 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_pBorderColor, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1717)) __PYX_ERR(0, 31015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1717);
  __Pyx_GIVEREF(__pyx_tuple__1717);
  __pyx_codeobj__965 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1717, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefGetBorderColor, 31015, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__965)) __PYX_ERR(0, 31015, __pyx_L1_error)

  /* "cuda/cuda.pyx":31057
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetFlags(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the flags used by a texture reference.
 * 
 */
  __pyx_tuple__1718 = PyTuple_Pack(5, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_pFlags, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1718)) __PYX_ERR(0, 31057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1718);
  __Pyx_GIVEREF(__pyx_tuple__1718);
  __pyx_codeobj__966 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1718, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefGetFlags, 31057, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__966)) __PYX_ERR(0, 31057, __pyx_L1_error)

  /* "cuda/cuda.pyx":31095
 * 
 * @cython.embedsignature(True)
 * def cuTexRefCreate():             # <<<<<<<<<<<<<<
 *     """ Creates a texture reference.
 * 
 */
  __pyx_tuple__1719 = PyTuple_Pack(2, __pyx_n_s_pTexRef, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1719)) __PYX_ERR(0, 31095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1719);
  __Pyx_GIVEREF(__pyx_tuple__1719);
  __pyx_codeobj__967 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1719, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefCreate, 31095, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__967)) __PYX_ERR(0, 31095, __pyx_L1_error)

  /* "cuda/cuda.pyx":31123
 * 
 * @cython.embedsignature(True)
 * def cuTexRefDestroy(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Destroys a texture reference.
 * 
 */
  __pyx_tuple__1720 = PyTuple_Pack(4, __pyx_n_s_hTexRef, __pyx_n_s_chTexRef, __pyx_n_s_phTexRef, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1720)) __PYX_ERR(0, 31123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1720);
  __Pyx_GIVEREF(__pyx_tuple__1720);
  __pyx_codeobj__968 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1720, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexRefDestroy, 31123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__968)) __PYX_ERR(0, 31123, __pyx_L1_error)

  /* "cuda/cuda.pyx":31158
 * 
 * @cython.embedsignature(True)
 * def cuSurfRefSetArray(hSurfRef, hArray, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Sets the CUDA array for a surface reference.
 * 
 */
  __pyx_tuple__1721 = PyTuple_Pack(8, __pyx_n_s_hSurfRef, __pyx_n_s_hArray_2, __pyx_n_s_Flags_2, __pyx_n_s_chArray, __pyx_n_s_phArray, __pyx_n_s_chSurfRef, __pyx_n_s_phSurfRef, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1721)) __PYX_ERR(0, 31158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1721);
  __Pyx_GIVEREF(__pyx_tuple__1721);
  __pyx_codeobj__969 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1721, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuSurfRefSetArray, 31158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__969)) __PYX_ERR(0, 31158, __pyx_L1_error)

  /* "cuda/cuda.pyx":31212
 * 
 * @cython.embedsignature(True)
 * def cuSurfRefGetArray(hSurfRef):             # <<<<<<<<<<<<<<
 *     """ Passes back the CUDA array bound to a surface reference.
 * 
 */
  __pyx_tuple__1722 = PyTuple_Pack(5, __pyx_n_s_hSurfRef, __pyx_n_s_chSurfRef, __pyx_n_s_phSurfRef, __pyx_n_s_phArray, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1722)) __PYX_ERR(0, 31212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1722);
  __Pyx_GIVEREF(__pyx_tuple__1722);
  __pyx_codeobj__970 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1722, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuSurfRefGetArray, 31212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__970)) __PYX_ERR(0, 31212, __pyx_L1_error)

  /* "cuda/cuda.pyx":31252
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectCreate(pResDesc : CUDA_RESOURCE_DESC, pTexDesc : CUDA_TEXTURE_DESC, pResViewDesc : CUDA_RESOURCE_VIEW_DESC):             # <<<<<<<<<<<<<<
 *     """ Creates a texture object.
 * 
 */
  __pyx_tuple__1723 = PyTuple_Pack(8, __pyx_n_s_pResDesc, __pyx_n_s_pTexDesc, __pyx_n_s_pResViewDesc, __pyx_n_s_pTexObject, __pyx_n_s_cpResDesc_ptr, __pyx_n_s_cpTexDesc_ptr, __pyx_n_s_cpResViewDesc_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1723)) __PYX_ERR(0, 31252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1723);
  __Pyx_GIVEREF(__pyx_tuple__1723);
  __pyx_codeobj__971 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1723, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexObjectCreate, 31252, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__971)) __PYX_ERR(0, 31252, __pyx_L1_error)

  /* "cuda/cuda.pyx":31485
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectDestroy(texObject):             # <<<<<<<<<<<<<<
 *     """ Destroys a texture object.
 * 
 */
  __pyx_tuple__1724 = PyTuple_Pack(4, __pyx_n_s_texObject, __pyx_n_s_ctexObject, __pyx_n_s_ptexObject, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1724)) __PYX_ERR(0, 31485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1724);
  __Pyx_GIVEREF(__pyx_tuple__1724);
  __pyx_codeobj__972 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1724, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexObjectDestroy, 31485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__972)) __PYX_ERR(0, 31485, __pyx_L1_error)

  /* "cuda/cuda.pyx":31518
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectGetResourceDesc(texObject):             # <<<<<<<<<<<<<<
 *     """ Returns a texture object's resource descriptor.
 * 
 */
  __pyx_tuple__1725 = PyTuple_Pack(5, __pyx_n_s_texObject, __pyx_n_s_ctexObject, __pyx_n_s_ptexObject, __pyx_n_s_pResDesc, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1725)) __PYX_ERR(0, 31518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1725);
  __Pyx_GIVEREF(__pyx_tuple__1725);
  __pyx_codeobj__973 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1725, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexObjectGetResourceDesc, 31518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__973)) __PYX_ERR(0, 31518, __pyx_L1_error)

  /* "cuda/cuda.pyx":31555
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectGetTextureDesc(texObject):             # <<<<<<<<<<<<<<
 *     """ Returns a texture object's texture descriptor.
 * 
 */
  __pyx_tuple__1726 = PyTuple_Pack(5, __pyx_n_s_texObject, __pyx_n_s_ctexObject, __pyx_n_s_ptexObject, __pyx_n_s_pTexDesc, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1726)) __PYX_ERR(0, 31555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1726);
  __Pyx_GIVEREF(__pyx_tuple__1726);
  __pyx_codeobj__974 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1726, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexObjectGetTextureDesc, 31555, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__974)) __PYX_ERR(0, 31555, __pyx_L1_error)

  /* "cuda/cuda.pyx":31592
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectGetResourceViewDesc(texObject):             # <<<<<<<<<<<<<<
 *     """ Returns a texture object's resource view descriptor.
 * 
 */
  __pyx_tuple__1727 = PyTuple_Pack(5, __pyx_n_s_texObject, __pyx_n_s_ctexObject, __pyx_n_s_ptexObject, __pyx_n_s_pResViewDesc, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1727)) __PYX_ERR(0, 31592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1727);
  __Pyx_GIVEREF(__pyx_tuple__1727);
  __pyx_codeobj__975 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1727, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuTexObjectGetResourceViewDesc, 31592, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__975)) __PYX_ERR(0, 31592, __pyx_L1_error)

  /* "cuda/cuda.pyx":31630
 * 
 * @cython.embedsignature(True)
 * def cuSurfObjectCreate(pResDesc : CUDA_RESOURCE_DESC):             # <<<<<<<<<<<<<<
 *     """ Creates a surface object.
 * 
 */
  __pyx_tuple__1728 = PyTuple_Pack(4, __pyx_n_s_pResDesc, __pyx_n_s_pSurfObject, __pyx_n_s_cpResDesc_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1728)) __PYX_ERR(0, 31630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1728);
  __Pyx_GIVEREF(__pyx_tuple__1728);
  __pyx_codeobj__976 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1728, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuSurfObjectCreate, 31630, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__976)) __PYX_ERR(0, 31630, __pyx_L1_error)

  /* "cuda/cuda.pyx":31667
 * 
 * @cython.embedsignature(True)
 * def cuSurfObjectDestroy(surfObject):             # <<<<<<<<<<<<<<
 *     """ Destroys a surface object.
 * 
 */
  __pyx_tuple__1729 = PyTuple_Pack(4, __pyx_n_s_surfObject, __pyx_n_s_csurfObject, __pyx_n_s_psurfObject, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1729)) __PYX_ERR(0, 31667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1729);
  __Pyx_GIVEREF(__pyx_tuple__1729);
  __pyx_codeobj__977 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1729, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuSurfObjectDestroy, 31667, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__977)) __PYX_ERR(0, 31667, __pyx_L1_error)

  /* "cuda/cuda.pyx":31700
 * 
 * @cython.embedsignature(True)
 * def cuSurfObjectGetResourceDesc(surfObject):             # <<<<<<<<<<<<<<
 *     """ Returns a surface object's resource descriptor.
 * 
 */
  __pyx_tuple__1730 = PyTuple_Pack(5, __pyx_n_s_surfObject, __pyx_n_s_csurfObject, __pyx_n_s_psurfObject, __pyx_n_s_pResDesc, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1730)) __PYX_ERR(0, 31700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1730);
  __Pyx_GIVEREF(__pyx_tuple__1730);
  __pyx_codeobj__978 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1730, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuSurfObjectGetResourceDesc, 31700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__978)) __PYX_ERR(0, 31700, __pyx_L1_error)

  /* "cuda/cuda.pyx":31737
 * 
 * @cython.embedsignature(True)
 * def cuDeviceCanAccessPeer(dev, peerDev):             # <<<<<<<<<<<<<<
 *     """ Queries if a device may directly access a peer device's memory.
 * 
 */
  __pyx_tuple__1731 = PyTuple_Pack(8, __pyx_n_s_dev, __pyx_n_s_peerDev, __pyx_n_s_cpeerDev, __pyx_n_s_ppeerDev, __pyx_n_s_cdev, __pyx_n_s_pdev, __pyx_n_s_canAccessPeer, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1731)) __PYX_ERR(0, 31737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1731);
  __Pyx_GIVEREF(__pyx_tuple__1731);
  __pyx_codeobj__979 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1731, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceCanAccessPeer, 31737, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__979)) __PYX_ERR(0, 31737, __pyx_L1_error)

  /* "cuda/cuda.pyx":31791
 * 
 * @cython.embedsignature(True)
 * def cuCtxEnablePeerAccess(peerContext, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Enables direct access to memory allocations in a peer context.
 * 
 */
  __pyx_tuple__1732 = PyTuple_Pack(5, __pyx_n_s_peerContext, __pyx_n_s_Flags_2, __pyx_n_s_cpeerContext, __pyx_n_s_ppeerContext, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1732)) __PYX_ERR(0, 31791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1732);
  __Pyx_GIVEREF(__pyx_tuple__1732);
  __pyx_codeobj__980 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1732, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxEnablePeerAccess, 31791, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__980)) __PYX_ERR(0, 31791, __pyx_L1_error)

  /* "cuda/cuda.pyx":31859
 * 
 * @cython.embedsignature(True)
 * def cuCtxDisablePeerAccess(peerContext):             # <<<<<<<<<<<<<<
 *     """ Disables direct access to memory allocations in a peer context and unregisters any registered allocations.
 * 
 */
  __pyx_tuple__1733 = PyTuple_Pack(4, __pyx_n_s_peerContext, __pyx_n_s_cpeerContext, __pyx_n_s_ppeerContext, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1733)) __PYX_ERR(0, 31859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1733);
  __Pyx_GIVEREF(__pyx_tuple__1733);
  __pyx_codeobj__981 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1733, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuCtxDisablePeerAccess, 31859, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__981)) __PYX_ERR(0, 31859, __pyx_L1_error)

  /* "cuda/cuda.pyx":31897
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetP2PAttribute(attrib not None : CUdevice_P2PAttribute, srcDevice, dstDevice):             # <<<<<<<<<<<<<<
 *     """ Queries attributes of the link between two devices.
 * 
 */
  __pyx_tuple__1734 = PyTuple_Pack(10, __pyx_n_s_attrib, __pyx_n_s_srcDevice_2, __pyx_n_s_dstDevice_2, __pyx_n_s_cdstDevice, __pyx_n_s_pdstDevice, __pyx_n_s_csrcDevice, __pyx_n_s_psrcDevice, __pyx_n_s_value, __pyx_n_s_cattrib, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1734)) __PYX_ERR(0, 31897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1734);
  __Pyx_GIVEREF(__pyx_tuple__1734);
  __pyx_codeobj__982 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1734, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuDeviceGetP2PAttribute, 31897, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__982)) __PYX_ERR(0, 31897, __pyx_L1_error)

  /* "cuda/cuda.pyx":31969
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsUnregisterResource(resource):             # <<<<<<<<<<<<<<
 *     """ Unregisters a graphics resource for access by CUDA.
 * 
 */
  __pyx_tuple__1735 = PyTuple_Pack(4, __pyx_n_s_resource_2, __pyx_n_s_cresource, __pyx_n_s_presource, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1735)) __PYX_ERR(0, 31969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1735);
  __Pyx_GIVEREF(__pyx_tuple__1735);
  __pyx_codeobj__983 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1735, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsUnregisterResource, 31969, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__983)) __PYX_ERR(0, 31969, __pyx_L1_error)

  /* "cuda/cuda.pyx":32006
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsigned int mipLevel):             # <<<<<<<<<<<<<<
 *     """ Get an array through which to access a subresource of a mapped graphics resource.
 * 
 */
  __pyx_tuple__1736 = PyTuple_Pack(7, __pyx_n_s_resource_2, __pyx_n_s_arrayIndex, __pyx_n_s_mipLevel, __pyx_n_s_cresource, __pyx_n_s_presource, __pyx_n_s_pArray_2, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1736)) __PYX_ERR(0, 32006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1736);
  __Pyx_GIVEREF(__pyx_tuple__1736);
  __pyx_codeobj__984 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1736, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsSubResourceGetMappedAr, 32006, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__984)) __PYX_ERR(0, 32006, __pyx_L1_error)

  /* "cuda/cuda.pyx":32060
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceGetMappedMipmappedArray(resource):             # <<<<<<<<<<<<<<
 *     """ Get a mipmapped array through which to access a mapped graphics resource.
 * 
 */
  __pyx_tuple__1737 = PyTuple_Pack(5, __pyx_n_s_resource_2, __pyx_n_s_cresource, __pyx_n_s_presource, __pyx_n_s_pMipmappedArray, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1737)) __PYX_ERR(0, 32060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1737);
  __Pyx_GIVEREF(__pyx_tuple__1737);
  __pyx_codeobj__985 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1737, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsResourceGetMappedMipma, 32060, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__985)) __PYX_ERR(0, 32060, __pyx_L1_error)

  /* "cuda/cuda.pyx":32103
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceGetMappedPointer(resource):             # <<<<<<<<<<<<<<
 *     """ Get a device pointer through which to access a mapped graphics resource.
 * 
 */
  __pyx_tuple__1738 = PyTuple_Pack(6, __pyx_n_s_resource_2, __pyx_n_s_cresource, __pyx_n_s_presource, __pyx_n_s_pDevPtr, __pyx_n_s_pSize, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1738)) __PYX_ERR(0, 32103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1738);
  __Pyx_GIVEREF(__pyx_tuple__1738);
  __pyx_codeobj__986 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1738, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsResourceGetMappedPoint, 32103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__986)) __PYX_ERR(0, 32103, __pyx_L1_error)

  /* "cuda/cuda.pyx":32146
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceSetMapFlags(resource, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Set usage flags for mapping a graphics resource.
 * 
 */
  __pyx_tuple__1739 = PyTuple_Pack(5, __pyx_n_s_resource_2, __pyx_n_s_flags_2, __pyx_n_s_cresource, __pyx_n_s_presource, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1739)) __PYX_ERR(0, 32146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1739);
  __Pyx_GIVEREF(__pyx_tuple__1739);
  __pyx_codeobj__987 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1739, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsResourceSetMapFlags, 32146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__987)) __PYX_ERR(0, 32146, __pyx_L1_error)

  /* "cuda/cuda.pyx":32203
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsMapResources(unsigned int count, resources, hStream):             # <<<<<<<<<<<<<<
 *     """ Map graphics resources for access by CUDA.
 * 
 */
  __pyx_tuple__1740 = PyTuple_Pack(8, __pyx_n_s_count_2, __pyx_n_s_resources, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cresources, __pyx_n_s_presources, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1740)) __PYX_ERR(0, 32203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1740);
  __Pyx_GIVEREF(__pyx_tuple__1740);
  __pyx_codeobj__988 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1740, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsMapResources, 32203, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__988)) __PYX_ERR(0, 32203, __pyx_L1_error)

  /* "cuda/cuda.pyx":32265
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsUnmapResources(unsigned int count, resources, hStream):             # <<<<<<<<<<<<<<
 *     """ Unmap graphics resources.
 * 
 */
  __pyx_tuple__1741 = PyTuple_Pack(8, __pyx_n_s_count_2, __pyx_n_s_resources, __pyx_n_s_hStream_2, __pyx_n_s_chStream, __pyx_n_s_phStream, __pyx_n_s_cresources, __pyx_n_s_presources, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1741)) __PYX_ERR(0, 32265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1741);
  __Pyx_GIVEREF(__pyx_tuple__1741);
  __pyx_codeobj__989 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1741, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsUnmapResources, 32265, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__989)) __PYX_ERR(0, 32265, __pyx_L1_error)

  /* "cuda/cuda.pyx":32325
 * 
 * @cython.embedsignature(True)
 * def cuGetProcAddress(char* symbol, int cudaVersion, flags):             # <<<<<<<<<<<<<<
 *     """ Returns the requested driver API function pointer.
 * 
 */
  __pyx_tuple__1742 = PyTuple_Pack(7, __pyx_n_s_symbol, __pyx_n_s_cudaVersion, __pyx_n_s_flags_2, __pyx_n_s_cflags, __pyx_n_s_pflags, __pyx_n_s_pfn, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1742)) __PYX_ERR(0, 32325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1742);
  __Pyx_GIVEREF(__pyx_tuple__1742);
  __pyx_codeobj__990 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1742, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGetProcAddress, 32325, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__990)) __PYX_ERR(0, 32325, __pyx_L1_error)

  /* "cuda/cuda.pyx":32407
 * 
 * @cython.embedsignature(True)
 * def cuGetExportTable(pExportTableId : CUuuid):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_tuple__1743 = PyTuple_Pack(4, __pyx_n_s_pExportTableId, __pyx_n_s_ppExportTable, __pyx_n_s_cpExportTableId_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1743)) __PYX_ERR(0, 32407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1743);
  __Pyx_GIVEREF(__pyx_tuple__1743);
  __pyx_codeobj__991 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1743, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGetExportTable, 32407, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__991)) __PYX_ERR(0, 32407, __pyx_L1_error)

  /* "cuda/cuda.pyx":32428
 * 
 * @cython.embedsignature(True)
 * def cuProfilerInitialize(char* configFile, char* outputFile, outputMode not None : CUoutput_mode):             # <<<<<<<<<<<<<<
 *     """ Initialize the profiling.
 * 
 */
  __pyx_tuple__1744 = PyTuple_Pack(5, __pyx_n_s_configFile, __pyx_n_s_outputFile, __pyx_n_s_outputMode, __pyx_n_s_coutputMode, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1744)) __PYX_ERR(0, 32428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1744);
  __Pyx_GIVEREF(__pyx_tuple__1744);
  __pyx_codeobj__992 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1744, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuProfilerInitialize, 32428, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__992)) __PYX_ERR(0, 32428, __pyx_L1_error)

  /* "cuda/cuda.pyx":32478
 * 
 * @cython.embedsignature(True)
 * def cuProfilerStart():             # <<<<<<<<<<<<<<
 *     """ Enable profiling.
 * 
 */
  __pyx_tuple__1745 = PyTuple_Pack(1, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1745)) __PYX_ERR(0, 32478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1745);
  __Pyx_GIVEREF(__pyx_tuple__1745);
  __pyx_codeobj__993 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1745, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuProfilerStart, 32478, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__993)) __PYX_ERR(0, 32478, __pyx_L1_error)

  /* "cuda/cuda.pyx":32502
 * 
 * @cython.embedsignature(True)
 * def cuProfilerStop():             # <<<<<<<<<<<<<<
 *     """ Disable profiling.
 * 
 */
  __pyx_tuple__1746 = PyTuple_Pack(1, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1746)) __PYX_ERR(0, 32502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1746);
  __Pyx_GIVEREF(__pyx_tuple__1746);
  __pyx_codeobj__994 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1746, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuProfilerStop, 32502, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__994)) __PYX_ERR(0, 32502, __pyx_L1_error)

  /* "cuda/cuda.pyx":32526
 * 
 * @cython.embedsignature(True)
 * def cuVDPAUGetDevice(vdpDevice, vdpGetProcAddress):             # <<<<<<<<<<<<<<
 *     """ Gets the CUDA device associated with a VDPAU device.
 * 
 */
  __pyx_tuple__1747 = PyTuple_Pack(8, __pyx_n_s_vdpDevice, __pyx_n_s_vdpGetProcAddress, __pyx_n_s_cvdpGetProcAddress, __pyx_n_s_pvdpGetProcAddress, __pyx_n_s_cvdpDevice, __pyx_n_s_pvdpDevice, __pyx_n_s_pDevice, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1747)) __PYX_ERR(0, 32526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1747);
  __Pyx_GIVEREF(__pyx_tuple__1747);
  __pyx_codeobj__995 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1747, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuVDPAUGetDevice, 32526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__995)) __PYX_ERR(0, 32526, __pyx_L1_error)

  /* "cuda/cuda.pyx":32576
 * 
 * @cython.embedsignature(True)
 * def cuVDPAUCtxCreate(unsigned int flags, device, vdpDevice, vdpGetProcAddress):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context for interoperability with VDPAU.
 * 
 */
  __pyx_tuple__1748 = PyTuple_Pack(12, __pyx_n_s_flags_2, __pyx_n_s_device, __pyx_n_s_vdpDevice, __pyx_n_s_vdpGetProcAddress, __pyx_n_s_cvdpGetProcAddress, __pyx_n_s_pvdpGetProcAddress, __pyx_n_s_cvdpDevice, __pyx_n_s_pvdpDevice, __pyx_n_s_cdevice, __pyx_n_s_pdevice, __pyx_n_s_pCtx, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1748)) __PYX_ERR(0, 32576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1748);
  __Pyx_GIVEREF(__pyx_tuple__1748);
  __pyx_codeobj__996 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1748, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuVDPAUCtxCreate, 32576, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__996)) __PYX_ERR(0, 32576, __pyx_L1_error)

  /* "cuda/cuda.pyx":32643
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Registers a VDPAU VdpVideoSurface object.
 * 
 */
  __pyx_tuple__1749 = PyTuple_Pack(6, __pyx_n_s_vdpSurface, __pyx_n_s_flags_2, __pyx_n_s_cvdpSurface, __pyx_n_s_pvdpSurface, __pyx_n_s_pCudaResource, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1749)) __PYX_ERR(0, 32643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1749);
  __Pyx_GIVEREF(__pyx_tuple__1749);
  __pyx_codeobj__997 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1749, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsVDPAURegisterVideoSurf, 32643, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__997)) __PYX_ERR(0, 32643, __pyx_L1_error)

  /* "cuda/cuda.pyx":32702
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Registers a VDPAU VdpOutputSurface object.
 * 
 */
  __pyx_tuple__1750 = PyTuple_Pack(6, __pyx_n_s_vdpSurface, __pyx_n_s_flags_2, __pyx_n_s_cvdpSurface, __pyx_n_s_pvdpSurface, __pyx_n_s_pCudaResource, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1750)) __PYX_ERR(0, 32702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1750);
  __Pyx_GIVEREF(__pyx_tuple__1750);
  __pyx_codeobj__998 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1750, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsVDPAURegisterOutputSur, 32702, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__998)) __PYX_ERR(0, 32702, __pyx_L1_error)

  /* "cuda/cuda.pyx":32761
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsEGLRegisterImage(image, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Registers an EGL image.
 * 
 */
  __pyx_tuple__1751 = PyTuple_Pack(6, __pyx_n_s_image, __pyx_n_s_flags_2, __pyx_n_s_cimage, __pyx_n_s_pimage, __pyx_n_s_pCudaResource, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1751)) __PYX_ERR(0, 32761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1751);
  __Pyx_GIVEREF(__pyx_tuple__1751);
  __pyx_codeobj__999 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1751, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsEGLRegisterImage, 32761, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__999)) __PYX_ERR(0, 32761, __pyx_L1_error)

  /* "cuda/cuda.pyx":32833
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerConnect(stream):             # <<<<<<<<<<<<<<
 *     """ Connect CUDA to EGLStream as a consumer.
 * 
 */
  __pyx_tuple__1752 = PyTuple_Pack(5, __pyx_n_s_stream, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_conn, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1752)) __PYX_ERR(0, 32833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1752);
  __Pyx_GIVEREF(__pyx_tuple__1752);
  __pyx_codeobj__1000 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1752, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEGLStreamConsumerConnect, 32833, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1000)) __PYX_ERR(0, 32833, __pyx_L1_error)

  /* "cuda/cuda.pyx":32872
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerConnectWithFlags(stream, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Connect CUDA to EGLStream as a consumer with given flags.
 * 
 */
  __pyx_tuple__1753 = PyTuple_Pack(6, __pyx_n_s_stream, __pyx_n_s_flags_2, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_conn, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1753)) __PYX_ERR(0, 32872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1753);
  __Pyx_GIVEREF(__pyx_tuple__1753);
  __pyx_codeobj__1001 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1753, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEGLStreamConsumerConnectWithFl, 32872, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1001)) __PYX_ERR(0, 32872, __pyx_L1_error)

  /* "cuda/cuda.pyx":32915
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerDisconnect(conn):             # <<<<<<<<<<<<<<
 *     """ Disconnect CUDA as a consumer to EGLStream .
 * 
 */
  __pyx_tuple__1754 = PyTuple_Pack(4, __pyx_n_s_conn, __pyx_n_s_cconn, __pyx_n_s_pconn, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1754)) __PYX_ERR(0, 32915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1754);
  __Pyx_GIVEREF(__pyx_tuple__1754);
  __pyx_codeobj__1002 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1754, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEGLStreamConsumerDisconnect, 32915, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1002)) __PYX_ERR(0, 32915, __pyx_L1_error)

  /* "cuda/cuda.pyx":32949
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int timeout):             # <<<<<<<<<<<<<<
 *     """ Acquire an image frame from the EGLStream with CUDA as a consumer.
 * 
 */
  __pyx_tuple__1755 = PyTuple_Pack(11, __pyx_n_s_conn, __pyx_n_s_pCudaResource, __pyx_n_s_pStream, __pyx_n_s_timeout, __pyx_n_s_cpStream, __pyx_n_s_ppStream, __pyx_n_s_cpCudaResource, __pyx_n_s_ppCudaResource, __pyx_n_s_cconn, __pyx_n_s_pconn, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1755)) __PYX_ERR(0, 32949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1755);
  __Pyx_GIVEREF(__pyx_tuple__1755);
  __pyx_codeobj__1003 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1755, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEGLStreamConsumerAcquireFrame, 32949, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1003)) __PYX_ERR(0, 32949, __pyx_L1_error)

  /* "cuda/cuda.pyx":33020
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream):             # <<<<<<<<<<<<<<
 *     """ Releases the last frame acquired from the EGLStream.
 * 
 */
  __pyx_tuple__1756 = PyTuple_Pack(10, __pyx_n_s_conn, __pyx_n_s_pCudaResource, __pyx_n_s_pStream, __pyx_n_s_cpStream, __pyx_n_s_ppStream, __pyx_n_s_cpCudaResource, __pyx_n_s_ppCudaResource, __pyx_n_s_cconn, __pyx_n_s_pconn, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1756)) __PYX_ERR(0, 33020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1756);
  __Pyx_GIVEREF(__pyx_tuple__1756);
  __pyx_codeobj__1004 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1756, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEGLStreamConsumerReleaseFrame, 33020, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1004)) __PYX_ERR(0, 33020, __pyx_L1_error)

  /* "cuda/cuda.pyx":33083
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerConnect(stream, width, height):             # <<<<<<<<<<<<<<
 *     """ Connect CUDA to EGLStream as a producer.
 * 
 */
  __pyx_tuple__1757 = PyTuple_Pack(11, __pyx_n_s_stream, __pyx_n_s_width_2, __pyx_n_s_height_2, __pyx_n_s_cheight, __pyx_n_s_pheight, __pyx_n_s_cwidth, __pyx_n_s_pwidth, __pyx_n_s_cstream, __pyx_n_s_pstream, __pyx_n_s_conn, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1757)) __PYX_ERR(0, 33083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1757);
  __Pyx_GIVEREF(__pyx_tuple__1757);
  __pyx_codeobj__1005 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1757, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEGLStreamProducerConnect, 33083, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1005)) __PYX_ERR(0, 33083, __pyx_L1_error)

  /* "cuda/cuda.pyx":33146
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerDisconnect(conn):             # <<<<<<<<<<<<<<
 *     """ Disconnect CUDA as a producer to EGLStream .
 * 
 */
  __pyx_tuple__1758 = PyTuple_Pack(4, __pyx_n_s_conn, __pyx_n_s_cconn, __pyx_n_s_pconn, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1758)) __PYX_ERR(0, 33146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1758);
  __Pyx_GIVEREF(__pyx_tuple__1758);
  __pyx_codeobj__1006 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1758, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEGLStreamProducerDisconnect, 33146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1006)) __PYX_ERR(0, 33146, __pyx_L1_error)

  /* "cuda/cuda.pyx":33180
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerPresentFrame(conn, eglframe not None : CUeglFrame, pStream):             # <<<<<<<<<<<<<<
 *     """ Present a CUDA eglFrame to the EGLStream with CUDA as a producer.
 * 
 */
  __pyx_tuple__1759 = PyTuple_Pack(8, __pyx_n_s_conn, __pyx_n_s_eglframe, __pyx_n_s_pStream, __pyx_n_s_cpStream, __pyx_n_s_ppStream, __pyx_n_s_cconn, __pyx_n_s_pconn, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1759)) __PYX_ERR(0, 33180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1759);
  __Pyx_GIVEREF(__pyx_tuple__1759);
  __pyx_codeobj__1007 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1759, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEGLStreamProducerPresentFrame, 33180, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1007)) __PYX_ERR(0, 33180, __pyx_L1_error)

  /* "cuda/cuda.pyx":33248
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerReturnFrame(conn, eglframe : CUeglFrame, pStream):             # <<<<<<<<<<<<<<
 *     """ Return the CUDA eglFrame to the EGLStream released by the consumer.
 * 
 */
  __pyx_tuple__1760 = PyTuple_Pack(9, __pyx_n_s_conn, __pyx_n_s_eglframe, __pyx_n_s_pStream, __pyx_n_s_cpStream, __pyx_n_s_ppStream, __pyx_n_s_cconn, __pyx_n_s_pconn, __pyx_n_s_ceglframe_ptr, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1760)) __PYX_ERR(0, 33248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1760);
  __Pyx_GIVEREF(__pyx_tuple__1760);
  __pyx_codeobj__1008 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1760, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEGLStreamProducerReturnFrame, 33248, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1008)) __PYX_ERR(0, 33248, __pyx_L1_error)

  /* "cuda/cuda.pyx":33301
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned int mipLevel):             # <<<<<<<<<<<<<<
 *     """ Get an eglFrame through which to access a registered EGL graphics resource.
 * 
 */
  __pyx_tuple__1761 = PyTuple_Pack(7, __pyx_n_s_resource_2, __pyx_n_s_index, __pyx_n_s_mipLevel, __pyx_n_s_cresource, __pyx_n_s_presource, __pyx_n_s_eglFrame, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1761)) __PYX_ERR(0, 33301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1761);
  __Pyx_GIVEREF(__pyx_tuple__1761);
  __pyx_codeobj__1009 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1761, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsResourceGetMappedEglFr, 33301, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1009)) __PYX_ERR(0, 33301, __pyx_L1_error)

  /* "cuda/cuda.pyx":33346
 * 
 * @cython.embedsignature(True)
 * def cuEventCreateFromEGLSync(eglSync, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Creates an event from EGLSync object.
 * 
 */
  __pyx_tuple__1762 = PyTuple_Pack(6, __pyx_n_s_eglSync, __pyx_n_s_flags_2, __pyx_n_s_ceglSync, __pyx_n_s_peglSync, __pyx_n_s_phEvent, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1762)) __PYX_ERR(0, 33346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1762);
  __Pyx_GIVEREF(__pyx_tuple__1762);
  __pyx_codeobj__1010 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1762, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuEventCreateFromEGLSync, 33346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1010)) __PYX_ERR(0, 33346, __pyx_L1_error)

  /* "cuda/cuda.pyx":33401
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsGLRegisterBuffer(buffer, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Registers an OpenGL buffer object.
 * 
 */
  __pyx_tuple__1763 = PyTuple_Pack(6, __pyx_n_s_buffer, __pyx_n_s_Flags_2, __pyx_n_s_cbuffer, __pyx_n_s_pbuffer, __pyx_n_s_pCudaResource, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1763)) __PYX_ERR(0, 33401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1763);
  __Pyx_GIVEREF(__pyx_tuple__1763);
  __pyx_codeobj__1011 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1763, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsGLRegisterBuffer, 33401, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1011)) __PYX_ERR(0, 33401, __pyx_L1_error)

  /* "cuda/cuda.pyx":33454
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsGLRegisterImage(image, target, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Register an OpenGL texture or renderbuffer object.
 * 
 */
  __pyx_tuple__1764 = PyTuple_Pack(9, __pyx_n_s_image, __pyx_n_s_target, __pyx_n_s_Flags_2, __pyx_n_s_ctarget, __pyx_n_s_ptarget, __pyx_n_s_cimage, __pyx_n_s_pimage, __pyx_n_s_pCudaResource, __pyx_n_s_err); if (unlikely(!__pyx_tuple__1764)) __PYX_ERR(0, 33454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1764);
  __Pyx_GIVEREF(__pyx_tuple__1764);
  __pyx_codeobj__1012 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1764, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGraphicsGLRegisterImage, 33454, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1012)) __PYX_ERR(0, 33454, __pyx_L1_error)

  /* "cuda/cuda.pyx":33552
 * 
 * @cython.embedsignature(True)
 * def cuGLGetDevices(unsigned int cudaDeviceCount, deviceList not None : CUGLDeviceList):             # <<<<<<<<<<<<<<
 *     """ Gets the CUDA devices associated with the current OpenGL context.
 * 
 */
  __pyx_tuple__1765 = PyTuple_Pack(8, __pyx_n_s_cudaDeviceCount, __pyx_n_s_deviceList, __pyx_n_s_pCudaDeviceCount, __pyx_n_s_cpCudaDevices, __pyx_n_s_pypCudaDevices, __pyx_n_s_cdeviceList, __pyx_n_s_err, __pyx_n_s_idx); if (unlikely(!__pyx_tuple__1765)) __PYX_ERR(0, 33552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1765);
  __Pyx_GIVEREF(__pyx_tuple__1765);
  __pyx_codeobj__1013 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1765, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_cuGLGetDevices, 33552, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1013)) __PYX_ERR(0, 33552, __pyx_L1_error)

  /* "cuda/cuda.pyx":33615
 * 
 * @cython.embedsignature(True)
 * def sizeof(objType):             # <<<<<<<<<<<<<<
 *     """ Returns the size of provided CUDA Python structure in bytes
 * 
 */
  __pyx_tuple__1766 = PyTuple_Pack(1, __pyx_n_s_objType); if (unlikely(!__pyx_tuple__1766)) __PYX_ERR(0, 33615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__1766);
  __Pyx_GIVEREF(__pyx_tuple__1766);
  __pyx_codeobj__1014 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__1766, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cuda_cuda_pyx, __pyx_n_s_sizeof, 33615, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__1014)) __PYX_ERR(0, 33615, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_127 = PyInt_FromLong(127); if (unlikely(!__pyx_int_127)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_256 = PyInt_FromLong(256); if (unlikely(!__pyx_int_256)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_129 = PyInt_FromLong(-129); if (unlikely(!__pyx_int_neg_129)) __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
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUcontext) < 0) __PYX_ERR(0, 3681, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUcontext.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUcontext.tp_dictoffset && __pyx_type_4cuda_4cuda_CUcontext.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUcontext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUcontext_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUcontext) < 0) __PYX_ERR(0, 3681, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUcontext) < 0) __PYX_ERR(0, 3681, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUcontext = &__pyx_type_4cuda_4cuda_CUcontext;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmodule) < 0) __PYX_ERR(0, 3709, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmodule.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmodule.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmodule.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmodule.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmodule_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUmodule) < 0) __PYX_ERR(0, 3709, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUmodule) < 0) __PYX_ERR(0, 3709, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmodule = &__pyx_type_4cuda_4cuda_CUmodule;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUfunction) < 0) __PYX_ERR(0, 3737, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUfunction.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUfunction.tp_dictoffset && __pyx_type_4cuda_4cuda_CUfunction.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUfunction.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUfunction_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUfunction) < 0) __PYX_ERR(0, 3737, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUfunction) < 0) __PYX_ERR(0, 3737, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUfunction = &__pyx_type_4cuda_4cuda_CUfunction;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUarray) < 0) __PYX_ERR(0, 3765, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUarray.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUarray.tp_dictoffset && __pyx_type_4cuda_4cuda_CUarray.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUarray.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUarray_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUarray) < 0) __PYX_ERR(0, 3765, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUarray) < 0) __PYX_ERR(0, 3765, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUarray = &__pyx_type_4cuda_4cuda_CUarray;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmipmappedArray) < 0) __PYX_ERR(0, 3793, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmipmappedArray.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmipmappedArray.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmipmappedArray.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmipmappedArray.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmipmappedArray_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUmipmappedArray) < 0) __PYX_ERR(0, 3793, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUmipmappedArray) < 0) __PYX_ERR(0, 3793, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmipmappedArray = &__pyx_type_4cuda_4cuda_CUmipmappedArray;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUtexref) < 0) __PYX_ERR(0, 3821, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUtexref.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUtexref.tp_dictoffset && __pyx_type_4cuda_4cuda_CUtexref.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUtexref.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUtexref_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUtexref) < 0) __PYX_ERR(0, 3821, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUtexref) < 0) __PYX_ERR(0, 3821, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUtexref = &__pyx_type_4cuda_4cuda_CUtexref;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUsurfref) < 0) __PYX_ERR(0, 3849, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUsurfref.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUsurfref.tp_dictoffset && __pyx_type_4cuda_4cuda_CUsurfref.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUsurfref.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUsurfref_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUsurfref) < 0) __PYX_ERR(0, 3849, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUsurfref) < 0) __PYX_ERR(0, 3849, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUsurfref = &__pyx_type_4cuda_4cuda_CUsurfref;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUevent) < 0) __PYX_ERR(0, 3877, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUevent.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUevent.tp_dictoffset && __pyx_type_4cuda_4cuda_CUevent.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUevent.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUevent_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUevent) < 0) __PYX_ERR(0, 3877, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUevent) < 0) __PYX_ERR(0, 3877, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUevent = &__pyx_type_4cuda_4cuda_CUevent;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUstream) < 0) __PYX_ERR(0, 3905, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUstream.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUstream.tp_dictoffset && __pyx_type_4cuda_4cuda_CUstream.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUstream.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUstream_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUstream) < 0) __PYX_ERR(0, 3905, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUstream) < 0) __PYX_ERR(0, 3905, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUstream = &__pyx_type_4cuda_4cuda_CUstream;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUgraphicsResource) < 0) __PYX_ERR(0, 3933, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUgraphicsResource.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUgraphicsResource.tp_dictoffset && __pyx_type_4cuda_4cuda_CUgraphicsResource.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUgraphicsResource.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUgraphicsResource_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUgraphicsResource) < 0) __PYX_ERR(0, 3933, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUgraphicsResource) < 0) __PYX_ERR(0, 3933, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUgraphicsResource = &__pyx_type_4cuda_4cuda_CUgraphicsResource;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUexternalMemory) < 0) __PYX_ERR(0, 3961, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUexternalMemory.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUexternalMemory.tp_dictoffset && __pyx_type_4cuda_4cuda_CUexternalMemory.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUexternalMemory.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUexternalMemory_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUexternalMemory) < 0) __PYX_ERR(0, 3961, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUexternalMemory) < 0) __PYX_ERR(0, 3961, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUexternalMemory = &__pyx_type_4cuda_4cuda_CUexternalMemory;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUexternalSemaphore) < 0) __PYX_ERR(0, 3989, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUexternalSemaphore.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUexternalSemaphore.tp_dictoffset && __pyx_type_4cuda_4cuda_CUexternalSemaphore.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUexternalSemaphore.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUexternalSemaphore_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUexternalSemaphore) < 0) __PYX_ERR(0, 3989, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUexternalSemaphore) < 0) __PYX_ERR(0, 3989, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUexternalSemaphore = &__pyx_type_4cuda_4cuda_CUexternalSemaphore;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUgraph) < 0) __PYX_ERR(0, 4017, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUgraph.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUgraph.tp_dictoffset && __pyx_type_4cuda_4cuda_CUgraph.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUgraph.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUgraph_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUgraph) < 0) __PYX_ERR(0, 4017, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUgraph) < 0) __PYX_ERR(0, 4017, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUgraph = &__pyx_type_4cuda_4cuda_CUgraph;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUgraphNode) < 0) __PYX_ERR(0, 4045, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUgraphNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUgraphNode.tp_dictoffset && __pyx_type_4cuda_4cuda_CUgraphNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUgraphNode.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUgraphNode_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUgraphNode) < 0) __PYX_ERR(0, 4045, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUgraphNode) < 0) __PYX_ERR(0, 4045, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUgraphNode = &__pyx_type_4cuda_4cuda_CUgraphNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUgraphExec) < 0) __PYX_ERR(0, 4073, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUgraphExec.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUgraphExec.tp_dictoffset && __pyx_type_4cuda_4cuda_CUgraphExec.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUgraphExec.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUgraphExec_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUgraphExec) < 0) __PYX_ERR(0, 4073, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUgraphExec) < 0) __PYX_ERR(0, 4073, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUgraphExec = &__pyx_type_4cuda_4cuda_CUgraphExec;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemoryPool) < 0) __PYX_ERR(0, 4101, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemoryPool.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemoryPool.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemoryPool.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemoryPool.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemoryPool_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemoryPool) < 0) __PYX_ERR(0, 4101, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUmemoryPool) < 0) __PYX_ERR(0, 4101, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemoryPool = &__pyx_type_4cuda_4cuda_CUmemoryPool;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUuserObject) < 0) __PYX_ERR(0, 4129, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUuserObject.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUuserObject.tp_dictoffset && __pyx_type_4cuda_4cuda_CUuserObject.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUuserObject.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUuserObject_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUuserObject) < 0) __PYX_ERR(0, 4129, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUuserObject) < 0) __PYX_ERR(0, 4129, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUuserObject = &__pyx_type_4cuda_4cuda_CUuserObject;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUlinkState) < 0) __PYX_ERR(0, 4157, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUlinkState.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUlinkState.tp_dictoffset && __pyx_type_4cuda_4cuda_CUlinkState.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUlinkState.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUlinkState_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUlinkState) < 0) __PYX_ERR(0, 4157, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUlinkState) < 0) __PYX_ERR(0, 4157, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUlinkState = &__pyx_type_4cuda_4cuda_CUlinkState;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_EGLImageKHR) < 0) __PYX_ERR(0, 4183, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_EGLImageKHR.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_EGLImageKHR.tp_dictoffset && __pyx_type_4cuda_4cuda_EGLImageKHR.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_EGLImageKHR.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EGLImageKHR_2, (PyObject *)&__pyx_type_4cuda_4cuda_EGLImageKHR) < 0) __PYX_ERR(0, 4183, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_EGLImageKHR) < 0) __PYX_ERR(0, 4183, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_EGLImageKHR = &__pyx_type_4cuda_4cuda_EGLImageKHR;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_EGLStreamKHR) < 0) __PYX_ERR(0, 4209, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_EGLStreamKHR.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_EGLStreamKHR.tp_dictoffset && __pyx_type_4cuda_4cuda_EGLStreamKHR.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_EGLStreamKHR.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EGLStreamKHR_2, (PyObject *)&__pyx_type_4cuda_4cuda_EGLStreamKHR) < 0) __PYX_ERR(0, 4209, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_EGLStreamKHR) < 0) __PYX_ERR(0, 4209, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_EGLStreamKHR = &__pyx_type_4cuda_4cuda_EGLStreamKHR;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_EGLSyncKHR) < 0) __PYX_ERR(0, 4235, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_EGLSyncKHR.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_EGLSyncKHR.tp_dictoffset && __pyx_type_4cuda_4cuda_EGLSyncKHR.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_EGLSyncKHR.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EGLSyncKHR_2, (PyObject *)&__pyx_type_4cuda_4cuda_EGLSyncKHR) < 0) __PYX_ERR(0, 4235, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_EGLSyncKHR) < 0) __PYX_ERR(0, 4235, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_EGLSyncKHR = &__pyx_type_4cuda_4cuda_EGLSyncKHR;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUeglStreamConnection) < 0) __PYX_ERR(0, 4261, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUeglStreamConnection.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUeglStreamConnection.tp_dictoffset && __pyx_type_4cuda_4cuda_CUeglStreamConnection.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUeglStreamConnection.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUeglStreamConnection_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUeglStreamConnection) < 0) __PYX_ERR(0, 4261, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUeglStreamConnection) < 0) __PYX_ERR(0, 4261, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUeglStreamConnection = &__pyx_type_4cuda_4cuda_CUeglStreamConnection;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUhostFn) < 0) __PYX_ERR(0, 4289, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUhostFn.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUhostFn.tp_dictoffset && __pyx_type_4cuda_4cuda_CUhostFn.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUhostFn.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUhostFn_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUhostFn) < 0) __PYX_ERR(0, 4289, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUhostFn) < 0) __PYX_ERR(0, 4289, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUhostFn = &__pyx_type_4cuda_4cuda_CUhostFn;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUstreamCallback) < 0) __PYX_ERR(0, 4315, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUstreamCallback.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUstreamCallback.tp_dictoffset && __pyx_type_4cuda_4cuda_CUstreamCallback.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUstreamCallback.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUstreamCallback_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUstreamCallback) < 0) __PYX_ERR(0, 4315, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUstreamCallback) < 0) __PYX_ERR(0, 4315, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUstreamCallback = &__pyx_type_4cuda_4cuda_CUstreamCallback;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUoccupancyB2DSize) < 0) __PYX_ERR(0, 4341, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUoccupancyB2DSize.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUoccupancyB2DSize.tp_dictoffset && __pyx_type_4cuda_4cuda_CUoccupancyB2DSize.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUoccupancyB2DSize.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUoccupancyB2DSize_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUoccupancyB2DSize) < 0) __PYX_ERR(0, 4341, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUoccupancyB2DSize) < 0) __PYX_ERR(0, 4341, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUoccupancyB2DSize = &__pyx_type_4cuda_4cuda_CUoccupancyB2DSize;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUuuid_st) < 0) __PYX_ERR(0, 4367, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUuuid_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUuuid_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUuuid_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUuuid_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUuuid_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUuuid_st) < 0) __PYX_ERR(0, 4367, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUuuid_st) < 0) __PYX_ERR(0, 4367, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUuuid_st = &__pyx_type_4cuda_4cuda_CUuuid_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUipcEventHandle_st) < 0) __PYX_ERR(0, 4404, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUipcEventHandle_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUipcEventHandle_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUipcEventHandle_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUipcEventHandle_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUipcEventHandle_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUipcEventHandle_st) < 0) __PYX_ERR(0, 4404, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUipcEventHandle_st) < 0) __PYX_ERR(0, 4404, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUipcEventHandle_st = &__pyx_type_4cuda_4cuda_CUipcEventHandle_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUipcMemHandle_st) < 0) __PYX_ERR(0, 4456, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUipcMemHandle_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUipcMemHandle_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUipcMemHandle_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUipcMemHandle_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUipcMemHandle_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUipcMemHandle_st) < 0) __PYX_ERR(0, 4456, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUipcMemHandle_st) < 0) __PYX_ERR(0, 4456, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUipcMemHandle_st = &__pyx_type_4cuda_4cuda_CUipcMemHandle_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUstreamMemOpWaitValueParams_st) < 0) __PYX_ERR(0, 4508, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUstreamMemOpWaitValueParams_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUstreamMemOpWaitValueParams_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUstreamMemOpWaitValueParams_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUstreamMemOpWaitValueParams_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUstreamMemOpWaitValueParams_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUstreamMemOpWaitValueParams_st) < 0) __PYX_ERR(0, 4508, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUstreamMemOpWaitValueParams_st) < 0) __PYX_ERR(0, 4508, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUstreamMemOpWaitValueParams_st = &__pyx_type_4cuda_4cuda_CUstreamMemOpWaitValueParams_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUstreamMemOpWriteValueParams_st) < 0) __PYX_ERR(0, 4610, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUstreamMemOpWriteValueParams_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUstreamMemOpWriteValueParams_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUstreamMemOpWriteValueParams_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUstreamMemOpWriteValueParams_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUstreamMemOpWriteValueParams_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUstreamMemOpWriteValueParams_st) < 0) __PYX_ERR(0, 4610, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUstreamMemOpWriteValueParams_st) < 0) __PYX_ERR(0, 4610, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUstreamMemOpWriteValueParams_st = &__pyx_type_4cuda_4cuda_CUstreamMemOpWriteValueParams_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st) < 0) __PYX_ERR(0, 4712, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUstreamMemOpFlushRemoteWritesPa, (PyObject *)&__pyx_type_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st) < 0) __PYX_ERR(0, 4712, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st) < 0) __PYX_ERR(0, 4712, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st = &__pyx_type_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st) < 0) __PYX_ERR(0, 4758, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUstreamMemOpMemoryBarrierParams, (PyObject *)&__pyx_type_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st) < 0) __PYX_ERR(0, 4758, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st) < 0) __PYX_ERR(0, 4758, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st = &__pyx_type_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_union) < 0) __PYX_ERR(0, 4804, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_union.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_union.tp_dictoffset && __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_union.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_union.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUstreamBatchMemOpParams_union, (PyObject *)&__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_union) < 0) __PYX_ERR(0, 4804, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_union) < 0) __PYX_ERR(0, 4804, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams_union = &__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_union;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st) < 0) __PYX_ERR(0, 4915, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st) < 0) __PYX_ERR(0, 4915, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st) < 0) __PYX_ERR(0, 4915, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st = &__pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUdevprop_st) < 0) __PYX_ERR(0, 5008, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUdevprop_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUdevprop_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUdevprop_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUdevprop_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUdevprop_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUdevprop_st) < 0) __PYX_ERR(0, 5008, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUdevprop_st) < 0) __PYX_ERR(0, 5008, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUdevprop_st = &__pyx_type_4cuda_4cuda_CUdevprop_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUaccessPolicyWindow_st) < 0) __PYX_ERR(0, 5140, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUaccessPolicyWindow_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUaccessPolicyWindow_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUaccessPolicyWindow_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUaccessPolicyWindow_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUaccessPolicyWindow_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUaccessPolicyWindow_st) < 0) __PYX_ERR(0, 5140, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUaccessPolicyWindow_st) < 0) __PYX_ERR(0, 5140, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow_st = &__pyx_type_4cuda_4cuda_CUaccessPolicyWindow_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st) < 0) __PYX_ERR(0, 5234, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_KERNEL_NODE_PARAMS_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st) < 0) __PYX_ERR(0, 5234, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st) < 0) __PYX_ERR(0, 5234, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st = &__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st) < 0) __PYX_ERR(0, 5373, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEMSET_NODE_PARAMS_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st) < 0) __PYX_ERR(0, 5373, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st) < 0) __PYX_ERR(0, 5373, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st = &__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st) < 0) __PYX_ERR(0, 5473, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_HOST_NODE_PARAMS_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st) < 0) __PYX_ERR(0, 5473, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st) < 0) __PYX_ERR(0, 5473, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st = &__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s) < 0) __PYX_ERR(0, 5533, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUlaunchAttributeValue_CUlaunch, (PyObject *)&__pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s) < 0) __PYX_ERR(0, 5533, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s) < 0) __PYX_ERR(0, 5533, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s = &__pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s) < 0) __PYX_ERR(0, 5589, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUlaunchAttributeValue_CUlaunch_2, (PyObject *)&__pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s) < 0) __PYX_ERR(0, 5589, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s) < 0) __PYX_ERR(0, 5589, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s = &__pyx_type_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUlaunchAttributeValue_union) < 0) __PYX_ERR(0, 5653, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUlaunchAttributeValue_union.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUlaunchAttributeValue_union.tp_dictoffset && __pyx_type_4cuda_4cuda_CUlaunchAttributeValue_union.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUlaunchAttributeValue_union.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUlaunchAttributeValue_union, (PyObject *)&__pyx_type_4cuda_4cuda_CUlaunchAttributeValue_union) < 0) __PYX_ERR(0, 5653, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUlaunchAttributeValue_union) < 0) __PYX_ERR(0, 5653, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue_union = &__pyx_type_4cuda_4cuda_CUlaunchAttributeValue_union;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUlaunchAttribute_st) < 0) __PYX_ERR(0, 5789, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUlaunchAttribute_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUlaunchAttribute_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUlaunchAttribute_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUlaunchAttribute_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUlaunchAttribute_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUlaunchAttribute_st) < 0) __PYX_ERR(0, 5789, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUlaunchAttribute_st) < 0) __PYX_ERR(0, 5789, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUlaunchAttribute_st = &__pyx_type_4cuda_4cuda_CUlaunchAttribute_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUlaunchConfig_st) < 0) __PYX_ERR(0, 5844, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUlaunchConfig_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUlaunchConfig_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUlaunchConfig_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUlaunchConfig_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUlaunchConfig_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUlaunchConfig_st) < 0) __PYX_ERR(0, 5844, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUlaunchConfig_st) < 0) __PYX_ERR(0, 5844, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUlaunchConfig_st = &__pyx_type_4cuda_4cuda_CUlaunchConfig_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUexecAffinitySmCount_st) < 0) __PYX_ERR(0, 5997, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUexecAffinitySmCount_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUexecAffinitySmCount_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUexecAffinitySmCount_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUexecAffinitySmCount_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUexecAffinitySmCount_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUexecAffinitySmCount_st) < 0) __PYX_ERR(0, 5997, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUexecAffinitySmCount_st) < 0) __PYX_ERR(0, 5997, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount_st = &__pyx_type_4cuda_4cuda_CUexecAffinitySmCount_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u) < 0) __PYX_ERR(0, 6039, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.tp_dictoffset && __pyx_type_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUexecAffinityParam_v1_CUexecAf, (PyObject *)&__pyx_type_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u) < 0) __PYX_ERR(0, 6039, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u) < 0) __PYX_ERR(0, 6039, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u = &__pyx_type_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUexecAffinityParam_st) < 0) __PYX_ERR(0, 6079, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUexecAffinityParam_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUexecAffinityParam_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUexecAffinityParam_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUexecAffinityParam_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUexecAffinityParam_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUexecAffinityParam_st) < 0) __PYX_ERR(0, 6079, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUexecAffinityParam_st) < 0) __PYX_ERR(0, 6079, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUexecAffinityParam_st = &__pyx_type_4cuda_4cuda_CUexecAffinityParam_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_st) < 0) __PYX_ERR(0, 6135, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEMCPY2D_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_st) < 0) __PYX_ERR(0, 6135, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_st) < 0) __PYX_ERR(0, 6135, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D_st = &__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_st) < 0) __PYX_ERR(0, 6362, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEMCPY3D_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_st) < 0) __PYX_ERR(0, 6362, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_st) < 0) __PYX_ERR(0, 6362, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_st = &__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st) < 0) __PYX_ERR(0, 6680, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEMCPY3D_PEER_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st) < 0) __PYX_ERR(0, 6680, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st) < 0) __PYX_ERR(0, 6680, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st = &__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st) < 0) __PYX_ERR(0, 7017, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY_DESCRIPTOR_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st) < 0) __PYX_ERR(0, 7017, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st) < 0) __PYX_ERR(0, 7017, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st = &__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st) < 0) __PYX_ERR(0, 7089, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st) < 0) __PYX_ERR(0, 7089, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st) < 0) __PYX_ERR(0, 7089, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st = &__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s) < 0) __PYX_ERR(0, 7181, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s) < 0) __PYX_ERR(0, 7181, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s) < 0) __PYX_ERR(0, 7181, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s = &__pyx_type_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st) < 0) __PYX_ERR(0, 7237, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st) < 0) __PYX_ERR(0, 7237, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st) < 0) __PYX_ERR(0, 7237, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st = &__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st) < 0) __PYX_ERR(0, 7324, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_s, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st) < 0) __PYX_ERR(0, 7324, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st) < 0) __PYX_ERR(0, 7324, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st = &__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s) < 0) __PYX_ERR(0, 7386, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s) < 0) __PYX_ERR(0, 7386, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s) < 0) __PYX_ERR(0, 7386, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s = &__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s) < 0) __PYX_ERR(0, 7430, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_2, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s) < 0) __PYX_ERR(0, 7430, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s) < 0) __PYX_ERR(0, 7430, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s = &__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s) < 0) __PYX_ERR(0, 7474, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_3, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s) < 0) __PYX_ERR(0, 7474, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s) < 0) __PYX_ERR(0, 7474, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s = &__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s) < 0) __PYX_ERR(0, 7548, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_4, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s) < 0) __PYX_ERR(0, 7548, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s) < 0) __PYX_ERR(0, 7548, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s = &__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s) < 0) __PYX_ERR(0, 7642, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_5, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s) < 0) __PYX_ERR(0, 7642, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s) < 0) __PYX_ERR(0, 7642, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s = &__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u) < 0) __PYX_ERR(0, 7678, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_6, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u) < 0) __PYX_ERR(0, 7678, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u) < 0) __PYX_ERR(0, 7678, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u = &__pyx_type_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_st) < 0) __PYX_ERR(0, 7778, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_RESOURCE_DESC_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_st) < 0) __PYX_ERR(0, 7778, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_st) < 0) __PYX_ERR(0, 7778, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC_st = &__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_st) < 0) __PYX_ERR(0, 7844, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_TEXTURE_DESC_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_st) < 0) __PYX_ERR(0, 7844, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_st) < 0) __PYX_ERR(0, 7844, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC_st = &__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st) < 0) __PYX_ERR(0, 7975, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_RESOURCE_VIEW_DESC_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st) < 0) __PYX_ERR(0, 7975, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st) < 0) __PYX_ERR(0, 7975, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st = &__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st) < 0) __PYX_ERR(0, 8097, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st) < 0) __PYX_ERR(0, 8097, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st) < 0) __PYX_ERR(0, 8097, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st = &__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st) < 0) __PYX_ERR(0, 8149, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_LAUNCH_PARAMS_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st) < 0) __PYX_ERR(0, 8149, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st) < 0) __PYX_ERR(0, 8149, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st = &__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s) < 0) __PYX_ERR(0, 8298, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s) < 0) __PYX_ERR(0, 8298, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s) < 0) __PYX_ERR(0, 8298, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s = &__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u) < 0) __PYX_ERR(0, 8344, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_2, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u) < 0) __PYX_ERR(0, 8344, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u) < 0) __PYX_ERR(0, 8344, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u = &__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st) < 0) __PYX_ERR(0, 8404, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st) < 0) __PYX_ERR(0, 8404, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st) < 0) __PYX_ERR(0, 8404, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st) < 0) __PYX_ERR(0, 8490, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st) < 0) __PYX_ERR(0, 8490, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st) < 0) __PYX_ERR(0, 8490, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st) < 0) __PYX_ERR(0, 8562, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st) < 0) __PYX_ERR(0, 8562, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st) < 0) __PYX_ERR(0, 8562, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s) < 0) __PYX_ERR(0, 8639, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s) < 0) __PYX_ERR(0, 8639, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s) < 0) __PYX_ERR(0, 8639, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s = &__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u) < 0) __PYX_ERR(0, 8685, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_2, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u) < 0) __PYX_ERR(0, 8685, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u) < 0) __PYX_ERR(0, 8685, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u = &__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st) < 0) __PYX_ERR(0, 8745, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st) < 0) __PYX_ERR(0, 8745, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st) < 0) __PYX_ERR(0, 8745, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s) < 0) __PYX_ERR(0, 8821, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s) < 0) __PYX_ERR(0, 8821, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s) < 0) __PYX_ERR(0, 8821, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s = &__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u) < 0) __PYX_ERR(0, 8857, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_2, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u) < 0) __PYX_ERR(0, 8857, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u) < 0) __PYX_ERR(0, 8857, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u = &__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s) < 0) __PYX_ERR(0, 8903, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_3, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s) < 0) __PYX_ERR(0, 8903, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s) < 0) __PYX_ERR(0, 8903, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s = &__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s) < 0) __PYX_ERR(0, 8939, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_4, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s) < 0) __PYX_ERR(0, 8939, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s) < 0) __PYX_ERR(0, 8939, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s = &__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st) < 0) __PYX_ERR(0, 9019, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st) < 0) __PYX_ERR(0, 9019, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st) < 0) __PYX_ERR(0, 9019, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s) < 0) __PYX_ERR(0, 9092, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s) < 0) __PYX_ERR(0, 9092, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s) < 0) __PYX_ERR(0, 9092, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s = &__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u) < 0) __PYX_ERR(0, 9128, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_2, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u) < 0) __PYX_ERR(0, 9128, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u) < 0) __PYX_ERR(0, 9128, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u = &__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s) < 0) __PYX_ERR(0, 9174, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_3, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s) < 0) __PYX_ERR(0, 9174, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s) < 0) __PYX_ERR(0, 9174, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s = &__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s) < 0) __PYX_ERR(0, 9220, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_4, (PyObject *)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s) < 0) __PYX_ERR(0, 9220, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s) < 0) __PYX_ERR(0, 9220, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s = &__pyx_type_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st) < 0) __PYX_ERR(0, 9300, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st) < 0) __PYX_ERR(0, 9300, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st) < 0) __PYX_ERR(0, 9300, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st) < 0) __PYX_ERR(0, 9373, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st) < 0) __PYX_ERR(0, 9373, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st) < 0) __PYX_ERR(0, 9373, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st = &__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st) < 0) __PYX_ERR(0, 9465, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st) < 0) __PYX_ERR(0, 9465, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st) < 0) __PYX_ERR(0, 9465, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st = &__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u) < 0) __PYX_ERR(0, 9557, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.tp_dictoffset && __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf, (PyObject *)&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u) < 0) __PYX_ERR(0, 9557, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u) < 0) __PYX_ERR(0, 9557, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u = &__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s) < 0) __PYX_ERR(0, 9620, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_2, (PyObject *)&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s) < 0) __PYX_ERR(0, 9620, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s) < 0) __PYX_ERR(0, 9620, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s = &__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s) < 0) __PYX_ERR(0, 9726, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_3, (PyObject *)&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s) < 0) __PYX_ERR(0, 9726, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s) < 0) __PYX_ERR(0, 9726, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s = &__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u) < 0) __PYX_ERR(0, 9782, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.tp_dictoffset && __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_4, (PyObject *)&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u) < 0) __PYX_ERR(0, 9782, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u) < 0) __PYX_ERR(0, 9782, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u = &__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u) < 0) __PYX_ERR(0, 9837, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.tp_dictoffset && __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_5, (PyObject *)&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u) < 0) __PYX_ERR(0, 9837, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u) < 0) __PYX_ERR(0, 9837, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u = &__pyx_type_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUarrayMapInfo_st) < 0) __PYX_ERR(0, 9881, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUarrayMapInfo_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUarrayMapInfo_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUarrayMapInfo_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUarrayMapInfo_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUarrayMapInfo_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUarrayMapInfo_st) < 0) __PYX_ERR(0, 9881, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUarrayMapInfo_st) < 0) __PYX_ERR(0, 9881, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUarrayMapInfo_st = &__pyx_type_4cuda_4cuda_CUarrayMapInfo_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemLocation_st) < 0) __PYX_ERR(0, 10038, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemLocation_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemLocation_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemLocation_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemLocation_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemLocation_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemLocation_st) < 0) __PYX_ERR(0, 10038, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUmemLocation_st) < 0) __PYX_ERR(0, 10038, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemLocation_st = &__pyx_type_4cuda_4cuda_CUmemLocation_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s) < 0) __PYX_ERR(0, 10090, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.tp_dictoffset && __pyx_type_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemAllocationProp_v1_CUmemAll, (PyObject *)&__pyx_type_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s) < 0) __PYX_ERR(0, 10090, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s) < 0) __PYX_ERR(0, 10090, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s = &__pyx_type_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemAllocationProp_st) < 0) __PYX_ERR(0, 10158, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemAllocationProp_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemAllocationProp_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemAllocationProp_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemAllocationProp_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemAllocationProp_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemAllocationProp_st) < 0) __PYX_ERR(0, 10158, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUmemAllocationProp_st) < 0) __PYX_ERR(0, 10158, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemAllocationProp_st = &__pyx_type_4cuda_4cuda_CUmemAllocationProp_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemAccessDesc_st) < 0) __PYX_ERR(0, 10253, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemAccessDesc_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemAccessDesc_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemAccessDesc_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemAccessDesc_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemAccessDesc_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemAccessDesc_st) < 0) __PYX_ERR(0, 10253, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUmemAccessDesc_st) < 0) __PYX_ERR(0, 10253, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemAccessDesc_st = &__pyx_type_4cuda_4cuda_CUmemAccessDesc_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemPoolProps_st) < 0) __PYX_ERR(0, 10309, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemPoolProps_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemPoolProps_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemPoolProps_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemPoolProps_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemPoolProps_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemPoolProps_st) < 0) __PYX_ERR(0, 10309, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUmemPoolProps_st) < 0) __PYX_ERR(0, 10309, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemPoolProps_st = &__pyx_type_4cuda_4cuda_CUmemPoolProps_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_st) < 0) __PYX_ERR(0, 10402, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemPoolPtrExportData_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_st) < 0) __PYX_ERR(0, 10402, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_st) < 0) __PYX_ERR(0, 10402, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData_st = &__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st) < 0) __PYX_ERR(0, 10446, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st) < 0) __PYX_ERR(0, 10446, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st) < 0) __PYX_ERR(0, 10446, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st = &__pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u) < 0) __PYX_ERR(0, 10559, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.tp_dictoffset && __pyx_type_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUeglFrame_v1_CUeglFrame_v1_CUe, (PyObject *)&__pyx_type_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u) < 0) __PYX_ERR(0, 10559, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u) < 0) __PYX_ERR(0, 10559, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u = &__pyx_type_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUeglFrame_st) < 0) __PYX_ERR(0, 10611, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUeglFrame_st.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUeglFrame_st.tp_dictoffset && __pyx_type_4cuda_4cuda_CUeglFrame_st.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUeglFrame_st.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUeglFrame_st, (PyObject *)&__pyx_type_4cuda_4cuda_CUeglFrame_st) < 0) __PYX_ERR(0, 10611, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUeglFrame_st) < 0) __PYX_ERR(0, 10611, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUeglFrame_st = &__pyx_type_4cuda_4cuda_CUeglFrame_st;
  __pyx_type_4cuda_4cuda_CUuuid.tp_base = __pyx_ptype_4cuda_4cuda_CUuuid_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUuuid) < 0) __PYX_ERR(2, 2355, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUuuid.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUuuid.tp_dictoffset && __pyx_type_4cuda_4cuda_CUuuid.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUuuid.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUuuid, (PyObject *)&__pyx_type_4cuda_4cuda_CUuuid) < 0) __PYX_ERR(2, 2355, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUuuid = &__pyx_type_4cuda_4cuda_CUuuid;
  __pyx_type_4cuda_4cuda_CUipcEventHandle_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUipcEventHandle_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUipcEventHandle_v1) < 0) __PYX_ERR(2, 2371, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUipcEventHandle_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUipcEventHandle_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUipcEventHandle_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUipcEventHandle_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUipcEventHandle_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUipcEventHandle_v1) < 0) __PYX_ERR(2, 2371, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUipcEventHandle_v1 = &__pyx_type_4cuda_4cuda_CUipcEventHandle_v1;
  __pyx_type_4cuda_4cuda_CUipcEventHandle.tp_base = __pyx_ptype_4cuda_4cuda_CUipcEventHandle_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUipcEventHandle) < 0) __PYX_ERR(2, 2388, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUipcEventHandle.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUipcEventHandle.tp_dictoffset && __pyx_type_4cuda_4cuda_CUipcEventHandle.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUipcEventHandle.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUipcEventHandle, (PyObject *)&__pyx_type_4cuda_4cuda_CUipcEventHandle) < 0) __PYX_ERR(2, 2388, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUipcEventHandle = &__pyx_type_4cuda_4cuda_CUipcEventHandle;
  __pyx_type_4cuda_4cuda_CUipcMemHandle_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUipcMemHandle_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUipcMemHandle_v1) < 0) __PYX_ERR(2, 2405, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUipcMemHandle_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUipcMemHandle_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUipcMemHandle_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUipcMemHandle_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUipcMemHandle_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUipcMemHandle_v1) < 0) __PYX_ERR(2, 2405, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUipcMemHandle_v1 = &__pyx_type_4cuda_4cuda_CUipcMemHandle_v1;
  __pyx_type_4cuda_4cuda_CUipcMemHandle.tp_base = __pyx_ptype_4cuda_4cuda_CUipcMemHandle_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUipcMemHandle) < 0) __PYX_ERR(2, 2422, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUipcMemHandle.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUipcMemHandle.tp_dictoffset && __pyx_type_4cuda_4cuda_CUipcMemHandle.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUipcMemHandle.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUipcMemHandle, (PyObject *)&__pyx_type_4cuda_4cuda_CUipcMemHandle) < 0) __PYX_ERR(2, 2422, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUipcMemHandle = &__pyx_type_4cuda_4cuda_CUipcMemHandle;
  __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams_union;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_v1) < 0) __PYX_ERR(2, 2439, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUstreamBatchMemOpParams_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_v1) < 0) __PYX_ERR(2, 2439, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams_v1 = &__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams_v1;
  __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams.tp_base = __pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams_union;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams) < 0) __PYX_ERR(2, 2466, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams.tp_dictoffset && __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUstreamBatchMemOpParams, (PyObject *)&__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams) < 0) __PYX_ERR(2, 2466, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams = &__pyx_type_4cuda_4cuda_CUstreamBatchMemOpParams;
  __pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS) < 0) __PYX_ERR(2, 2493, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS) < 0) __PYX_ERR(2, 2493, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS = &__pyx_type_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS;
  __pyx_type_4cuda_4cuda_CUdevprop_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUdevprop_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUdevprop_v1) < 0) __PYX_ERR(2, 2515, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUdevprop_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUdevprop_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUdevprop_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUdevprop_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUdevprop_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUdevprop_v1) < 0) __PYX_ERR(2, 2515, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUdevprop_v1 = &__pyx_type_4cuda_4cuda_CUdevprop_v1;
  __pyx_type_4cuda_4cuda_CUdevprop.tp_base = __pyx_ptype_4cuda_4cuda_CUdevprop_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUdevprop) < 0) __PYX_ERR(2, 2550, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUdevprop.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUdevprop.tp_dictoffset && __pyx_type_4cuda_4cuda_CUdevprop.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUdevprop.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUdevprop, (PyObject *)&__pyx_type_4cuda_4cuda_CUdevprop) < 0) __PYX_ERR(2, 2550, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUdevprop = &__pyx_type_4cuda_4cuda_CUdevprop;
  __pyx_type_4cuda_4cuda_CUaccessPolicyWindow_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUaccessPolicyWindow_v1) < 0) __PYX_ERR(2, 2585, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUaccessPolicyWindow_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUaccessPolicyWindow_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUaccessPolicyWindow_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUaccessPolicyWindow_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUaccessPolicyWindow_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUaccessPolicyWindow_v1) < 0) __PYX_ERR(2, 2585, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow_v1 = &__pyx_type_4cuda_4cuda_CUaccessPolicyWindow_v1;
  __pyx_type_4cuda_4cuda_CUaccessPolicyWindow.tp_base = __pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUaccessPolicyWindow) < 0) __PYX_ERR(2, 2622, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUaccessPolicyWindow.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUaccessPolicyWindow.tp_dictoffset && __pyx_type_4cuda_4cuda_CUaccessPolicyWindow.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUaccessPolicyWindow.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUaccessPolicyWindow, (PyObject *)&__pyx_type_4cuda_4cuda_CUaccessPolicyWindow) < 0) __PYX_ERR(2, 2622, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow = &__pyx_type_4cuda_4cuda_CUaccessPolicyWindow;
  __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1) < 0) __PYX_ERR(2, 2659, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_KERNEL_NODE_PARAMS_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1) < 0) __PYX_ERR(2, 2659, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1 = &__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_v1;
  __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS) < 0) __PYX_ERR(2, 2694, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_KERNEL_NODE_PARAMS, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS) < 0) __PYX_ERR(2, 2694, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS = &__pyx_type_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS;
  __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1) < 0) __PYX_ERR(2, 2729, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEMSET_NODE_PARAMS_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1) < 0) __PYX_ERR(2, 2729, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1 = &__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_v1;
  __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS) < 0) __PYX_ERR(2, 2756, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEMSET_NODE_PARAMS, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS) < 0) __PYX_ERR(2, 2756, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS = &__pyx_type_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS;
  __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1) < 0) __PYX_ERR(2, 2783, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_HOST_NODE_PARAMS_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1) < 0) __PYX_ERR(2, 2783, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1 = &__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_v1;
  __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS) < 0) __PYX_ERR(2, 2802, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_HOST_NODE_PARAMS, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS) < 0) __PYX_ERR(2, 2802, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS = &__pyx_type_4cuda_4cuda_CUDA_HOST_NODE_PARAMS;
  __pyx_type_4cuda_4cuda_CUlaunchAttributeValue.tp_base = __pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue_union;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUlaunchAttributeValue) < 0) __PYX_ERR(2, 2821, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUlaunchAttributeValue.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUlaunchAttributeValue.tp_dictoffset && __pyx_type_4cuda_4cuda_CUlaunchAttributeValue.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUlaunchAttributeValue.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUlaunchAttributeValue, (PyObject *)&__pyx_type_4cuda_4cuda_CUlaunchAttributeValue) < 0) __PYX_ERR(2, 2821, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue = &__pyx_type_4cuda_4cuda_CUlaunchAttributeValue;
  __pyx_type_4cuda_4cuda_CUlaunchAttribute.tp_base = __pyx_ptype_4cuda_4cuda_CUlaunchAttribute_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUlaunchAttribute) < 0) __PYX_ERR(2, 2853, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUlaunchAttribute.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUlaunchAttribute.tp_dictoffset && __pyx_type_4cuda_4cuda_CUlaunchAttribute.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUlaunchAttribute.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUlaunchAttribute, (PyObject *)&__pyx_type_4cuda_4cuda_CUlaunchAttribute) < 0) __PYX_ERR(2, 2853, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUlaunchAttribute = &__pyx_type_4cuda_4cuda_CUlaunchAttribute;
  __pyx_type_4cuda_4cuda_CUlaunchConfig.tp_base = __pyx_ptype_4cuda_4cuda_CUlaunchConfig_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUlaunchConfig) < 0) __PYX_ERR(2, 2871, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUlaunchConfig.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUlaunchConfig.tp_dictoffset && __pyx_type_4cuda_4cuda_CUlaunchConfig.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUlaunchConfig.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUlaunchConfig, (PyObject *)&__pyx_type_4cuda_4cuda_CUlaunchConfig) < 0) __PYX_ERR(2, 2871, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUlaunchConfig = &__pyx_type_4cuda_4cuda_CUlaunchConfig;
  __pyx_type_4cuda_4cuda_CUkernelNodeAttrValue_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue_union;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUkernelNodeAttrValue_v1) < 0) __PYX_ERR(2, 2905, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUkernelNodeAttrValue_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUkernelNodeAttrValue_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUkernelNodeAttrValue_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUkernelNodeAttrValue_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUkernelNodeAttrValue_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUkernelNodeAttrValue_v1) < 0) __PYX_ERR(2, 2905, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUkernelNodeAttrValue_v1 = &__pyx_type_4cuda_4cuda_CUkernelNodeAttrValue_v1;
  __pyx_type_4cuda_4cuda_CUkernelNodeAttrValue.tp_base = __pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue_union;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUkernelNodeAttrValue) < 0) __PYX_ERR(2, 2937, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUkernelNodeAttrValue.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUkernelNodeAttrValue.tp_dictoffset && __pyx_type_4cuda_4cuda_CUkernelNodeAttrValue.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUkernelNodeAttrValue.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUkernelNodeAttrValue, (PyObject *)&__pyx_type_4cuda_4cuda_CUkernelNodeAttrValue) < 0) __PYX_ERR(2, 2937, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUkernelNodeAttrValue = &__pyx_type_4cuda_4cuda_CUkernelNodeAttrValue;
  __pyx_type_4cuda_4cuda_CUstreamAttrValue_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue_union;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUstreamAttrValue_v1) < 0) __PYX_ERR(2, 2969, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUstreamAttrValue_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUstreamAttrValue_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUstreamAttrValue_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUstreamAttrValue_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUstreamAttrValue_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUstreamAttrValue_v1) < 0) __PYX_ERR(2, 2969, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUstreamAttrValue_v1 = &__pyx_type_4cuda_4cuda_CUstreamAttrValue_v1;
  __pyx_type_4cuda_4cuda_CUstreamAttrValue.tp_base = __pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue_union;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUstreamAttrValue) < 0) __PYX_ERR(2, 3001, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUstreamAttrValue.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUstreamAttrValue.tp_dictoffset && __pyx_type_4cuda_4cuda_CUstreamAttrValue.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUstreamAttrValue.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUstreamAttrValue, (PyObject *)&__pyx_type_4cuda_4cuda_CUstreamAttrValue) < 0) __PYX_ERR(2, 3001, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUstreamAttrValue = &__pyx_type_4cuda_4cuda_CUstreamAttrValue;
  __pyx_type_4cuda_4cuda_CUexecAffinitySmCount_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUexecAffinitySmCount_v1) < 0) __PYX_ERR(2, 3033, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUexecAffinitySmCount_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUexecAffinitySmCount_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUexecAffinitySmCount_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUexecAffinitySmCount_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUexecAffinitySmCount_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUexecAffinitySmCount_v1) < 0) __PYX_ERR(2, 3033, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount_v1 = &__pyx_type_4cuda_4cuda_CUexecAffinitySmCount_v1;
  __pyx_type_4cuda_4cuda_CUexecAffinitySmCount.tp_base = __pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUexecAffinitySmCount) < 0) __PYX_ERR(2, 3050, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUexecAffinitySmCount.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUexecAffinitySmCount.tp_dictoffset && __pyx_type_4cuda_4cuda_CUexecAffinitySmCount.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUexecAffinitySmCount.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUexecAffinitySmCount, (PyObject *)&__pyx_type_4cuda_4cuda_CUexecAffinitySmCount) < 0) __PYX_ERR(2, 3050, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount = &__pyx_type_4cuda_4cuda_CUexecAffinitySmCount;
  __pyx_type_4cuda_4cuda_CUexecAffinityParam_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUexecAffinityParam_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUexecAffinityParam_v1) < 0) __PYX_ERR(2, 3067, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUexecAffinityParam_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUexecAffinityParam_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUexecAffinityParam_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUexecAffinityParam_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUexecAffinityParam_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUexecAffinityParam_v1) < 0) __PYX_ERR(2, 3067, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUexecAffinityParam_v1 = &__pyx_type_4cuda_4cuda_CUexecAffinityParam_v1;
  __pyx_type_4cuda_4cuda_CUexecAffinityParam.tp_base = __pyx_ptype_4cuda_4cuda_CUexecAffinityParam_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUexecAffinityParam) < 0) __PYX_ERR(2, 3086, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUexecAffinityParam.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUexecAffinityParam.tp_dictoffset && __pyx_type_4cuda_4cuda_CUexecAffinityParam.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUexecAffinityParam.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUexecAffinityParam, (PyObject *)&__pyx_type_4cuda_4cuda_CUexecAffinityParam) < 0) __PYX_ERR(2, 3086, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUexecAffinityParam = &__pyx_type_4cuda_4cuda_CUexecAffinityParam;
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_v2.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_v2) < 0) __PYX_ERR(2, 3105, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_v2.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_v2.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_v2.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_v2.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEMCPY2D_v2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_v2) < 0) __PYX_ERR(2, 3105, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D_v2 = &__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D_v2;
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D) < 0) __PYX_ERR(2, 3152, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEMCPY2D.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEMCPY2D, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D) < 0) __PYX_ERR(2, 3152, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D = &__pyx_type_4cuda_4cuda_CUDA_MEMCPY2D;
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_v2.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_v2) < 0) __PYX_ERR(2, 3199, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_v2.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_v2.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_v2.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_v2.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEMCPY3D_v2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_v2) < 0) __PYX_ERR(2, 3199, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_v2 = &__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_v2;
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D) < 0) __PYX_ERR(2, 3265, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEMCPY3D, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D) < 0) __PYX_ERR(2, 3265, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D = &__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D;
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1) < 0) __PYX_ERR(2, 3331, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEMCPY3D_PEER_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1) < 0) __PYX_ERR(2, 3331, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1 = &__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER_v1;
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER) < 0) __PYX_ERR(2, 3398, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEMCPY3D_PEER, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER) < 0) __PYX_ERR(2, 3398, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER = &__pyx_type_4cuda_4cuda_CUDA_MEMCPY3D_PEER;
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2) < 0) __PYX_ERR(2, 3465, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY_DESCRIPTOR_v2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2) < 0) __PYX_ERR(2, 3465, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2 = &__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_v2;
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR) < 0) __PYX_ERR(2, 3488, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY_DESCRIPTOR, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR) < 0) __PYX_ERR(2, 3488, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR = &__pyx_type_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR;
  __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2) < 0) __PYX_ERR(2, 3511, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_v2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2) < 0) __PYX_ERR(2, 3511, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2 = &__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_v2;
  __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR) < 0) __PYX_ERR(2, 3538, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR) < 0) __PYX_ERR(2, 3538, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR = &__pyx_type_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR;
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1) < 0) __PYX_ERR(2, 3565, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1) < 0) __PYX_ERR(2, 3565, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1 = &__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_v1;
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES) < 0) __PYX_ERR(2, 3591, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES) < 0) __PYX_ERR(2, 3591, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES = &__pyx_type_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES;
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1) < 0) __PYX_ERR(2, 3617, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_v, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1) < 0) __PYX_ERR(2, 3617, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 = &__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1;
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS) < 0) __PYX_ERR(2, 3638, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS) < 0) __PYX_ERR(2, 3638, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS = &__pyx_type_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS;
  __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_v1) < 0) __PYX_ERR(2, 3659, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_RESOURCE_DESC_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_v1) < 0) __PYX_ERR(2, 3659, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC_v1 = &__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC_v1;
  __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC) < 0) __PYX_ERR(2, 3680, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_RESOURCE_DESC, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC) < 0) __PYX_ERR(2, 3680, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC = &__pyx_type_4cuda_4cuda_CUDA_RESOURCE_DESC;
  __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_v1) < 0) __PYX_ERR(2, 3701, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_TEXTURE_DESC_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_v1) < 0) __PYX_ERR(2, 3701, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC_v1 = &__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC_v1;
  __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC) < 0) __PYX_ERR(2, 3736, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_TEXTURE_DESC, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC) < 0) __PYX_ERR(2, 3736, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC = &__pyx_type_4cuda_4cuda_CUDA_TEXTURE_DESC;
  __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1) < 0) __PYX_ERR(2, 3771, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_RESOURCE_VIEW_DESC_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1) < 0) __PYX_ERR(2, 3771, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1 = &__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_v1;
  __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC) < 0) __PYX_ERR(2, 3804, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_RESOURCE_VIEW_DESC, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC) < 0) __PYX_ERR(2, 3804, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC = &__pyx_type_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC;
  __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1) < 0) __PYX_ERR(2, 3837, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1) < 0) __PYX_ERR(2, 3837, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 = &__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1;
  __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS) < 0) __PYX_ERR(2, 3856, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_3, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS) < 0) __PYX_ERR(2, 3856, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS = &__pyx_type_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS;
  __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1) < 0) __PYX_ERR(2, 3875, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_LAUNCH_PARAMS_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1) < 0) __PYX_ERR(2, 3875, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1 = &__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS_v1;
  __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS) < 0) __PYX_ERR(2, 3910, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_LAUNCH_PARAMS, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS) < 0) __PYX_ERR(2, 3910, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS = &__pyx_type_4cuda_4cuda_CUDA_LAUNCH_PARAMS;
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1) < 0) __PYX_ERR(2, 3945, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1) < 0) __PYX_ERR(2, 3945, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1;
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC) < 0) __PYX_ERR(2, 3970, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_3, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC) < 0) __PYX_ERR(2, 3970, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC;
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1) < 0) __PYX_ERR(2, 3995, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1) < 0) __PYX_ERR(2, 3995, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1;
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC) < 0) __PYX_ERR(2, 4018, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_3, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC) < 0) __PYX_ERR(2, 4018, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC;
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1) < 0) __PYX_ERR(2, 4041, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1) < 0) __PYX_ERR(2, 4041, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1;
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC) < 0) __PYX_ERR(2, 4065, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_3, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC) < 0) __PYX_ERR(2, 4065, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC;
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1) < 0) __PYX_ERR(2, 4089, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1) < 0) __PYX_ERR(2, 4089, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1;
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC) < 0) __PYX_ERR(2, 4112, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_3, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC) < 0) __PYX_ERR(2, 4112, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC;
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1) < 0) __PYX_ERR(2, 4135, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1) < 0) __PYX_ERR(2, 4135, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1;
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) < 0) __PYX_ERR(2, 4163, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_3, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) < 0) __PYX_ERR(2, 4163, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS;
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1) < 0) __PYX_ERR(2, 4191, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1) < 0) __PYX_ERR(2, 4191, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1;
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) < 0) __PYX_ERR(2, 4219, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_3, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) < 0) __PYX_ERR(2, 4219, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS = &__pyx_type_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS;
  __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1) < 0) __PYX_ERR(2, 4247, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1) < 0) __PYX_ERR(2, 4247, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 = &__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1;
  __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS) < 0) __PYX_ERR(2, 4269, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS) < 0) __PYX_ERR(2, 4269, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS = &__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS;
  __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1) < 0) __PYX_ERR(2, 4291, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1) < 0) __PYX_ERR(2, 4291, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 = &__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1;
  __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS) < 0) __PYX_ERR(2, 4313, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS) < 0) __PYX_ERR(2, 4313, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS = &__pyx_type_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS;
  __pyx_type_4cuda_4cuda_CUarrayMapInfo_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUarrayMapInfo_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUarrayMapInfo_v1) < 0) __PYX_ERR(2, 4335, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUarrayMapInfo_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUarrayMapInfo_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUarrayMapInfo_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUarrayMapInfo_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUarrayMapInfo_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUarrayMapInfo_v1) < 0) __PYX_ERR(2, 4335, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUarrayMapInfo_v1 = &__pyx_type_4cuda_4cuda_CUarrayMapInfo_v1;
  __pyx_type_4cuda_4cuda_CUarrayMapInfo.tp_base = __pyx_ptype_4cuda_4cuda_CUarrayMapInfo_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUarrayMapInfo) < 0) __PYX_ERR(2, 4373, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUarrayMapInfo.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUarrayMapInfo.tp_dictoffset && __pyx_type_4cuda_4cuda_CUarrayMapInfo.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUarrayMapInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUarrayMapInfo, (PyObject *)&__pyx_type_4cuda_4cuda_CUarrayMapInfo) < 0) __PYX_ERR(2, 4373, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUarrayMapInfo = &__pyx_type_4cuda_4cuda_CUarrayMapInfo;
  __pyx_type_4cuda_4cuda_CUmemLocation_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUmemLocation_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemLocation_v1) < 0) __PYX_ERR(2, 4411, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemLocation_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemLocation_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemLocation_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemLocation_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemLocation_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemLocation_v1) < 0) __PYX_ERR(2, 4411, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemLocation_v1 = &__pyx_type_4cuda_4cuda_CUmemLocation_v1;
  __pyx_type_4cuda_4cuda_CUmemLocation.tp_base = __pyx_ptype_4cuda_4cuda_CUmemLocation_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemLocation) < 0) __PYX_ERR(2, 4430, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemLocation.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemLocation.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemLocation.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemLocation.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemLocation, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemLocation) < 0) __PYX_ERR(2, 4430, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemLocation = &__pyx_type_4cuda_4cuda_CUmemLocation;
  __pyx_type_4cuda_4cuda_CUmemAllocationProp_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUmemAllocationProp_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemAllocationProp_v1) < 0) __PYX_ERR(2, 4449, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemAllocationProp_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemAllocationProp_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemAllocationProp_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemAllocationProp_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemAllocationProp_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemAllocationProp_v1) < 0) __PYX_ERR(2, 4449, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemAllocationProp_v1 = &__pyx_type_4cuda_4cuda_CUmemAllocationProp_v1;
  __pyx_type_4cuda_4cuda_CUmemAllocationProp.tp_base = __pyx_ptype_4cuda_4cuda_CUmemAllocationProp_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemAllocationProp) < 0) __PYX_ERR(2, 4478, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemAllocationProp.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemAllocationProp.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemAllocationProp.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemAllocationProp.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemAllocationProp, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemAllocationProp) < 0) __PYX_ERR(2, 4478, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemAllocationProp = &__pyx_type_4cuda_4cuda_CUmemAllocationProp;
  __pyx_type_4cuda_4cuda_CUmemAccessDesc_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUmemAccessDesc_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemAccessDesc_v1) < 0) __PYX_ERR(2, 4507, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemAccessDesc_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemAccessDesc_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemAccessDesc_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemAccessDesc_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemAccessDesc_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemAccessDesc_v1) < 0) __PYX_ERR(2, 4507, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemAccessDesc_v1 = &__pyx_type_4cuda_4cuda_CUmemAccessDesc_v1;
  __pyx_type_4cuda_4cuda_CUmemAccessDesc.tp_base = __pyx_ptype_4cuda_4cuda_CUmemAccessDesc_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemAccessDesc) < 0) __PYX_ERR(2, 4526, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemAccessDesc.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemAccessDesc.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemAccessDesc.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemAccessDesc.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemAccessDesc, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemAccessDesc) < 0) __PYX_ERR(2, 4526, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemAccessDesc = &__pyx_type_4cuda_4cuda_CUmemAccessDesc;
  __pyx_type_4cuda_4cuda_CUmemPoolProps_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUmemPoolProps_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemPoolProps_v1) < 0) __PYX_ERR(2, 4545, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemPoolProps_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemPoolProps_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemPoolProps_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemPoolProps_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemPoolProps_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemPoolProps_v1) < 0) __PYX_ERR(2, 4545, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemPoolProps_v1 = &__pyx_type_4cuda_4cuda_CUmemPoolProps_v1;
  __pyx_type_4cuda_4cuda_CUmemPoolProps.tp_base = __pyx_ptype_4cuda_4cuda_CUmemPoolProps_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemPoolProps) < 0) __PYX_ERR(2, 4575, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemPoolProps.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemPoolProps.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemPoolProps.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemPoolProps.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemPoolProps, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemPoolProps) < 0) __PYX_ERR(2, 4575, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemPoolProps = &__pyx_type_4cuda_4cuda_CUmemPoolProps;
  __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_v1) < 0) __PYX_ERR(2, 4605, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemPoolPtrExportData_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_v1) < 0) __PYX_ERR(2, 4605, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData_v1 = &__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData_v1;
  __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData.tp_base = __pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData) < 0) __PYX_ERR(2, 4622, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemPoolPtrExportData.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemPoolPtrExportData, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData) < 0) __PYX_ERR(2, 4622, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData = &__pyx_type_4cuda_4cuda_CUmemPoolPtrExportData;
  __pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS.tp_base = __pyx_ptype_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS) < 0) __PYX_ERR(2, 4639, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS.tp_dictoffset && __pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS, (PyObject *)&__pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS) < 0) __PYX_ERR(2, 4639, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS = &__pyx_type_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS;
  __pyx_type_4cuda_4cuda_CUeglFrame_v1.tp_base = __pyx_ptype_4cuda_4cuda_CUeglFrame_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUeglFrame_v1) < 0) __PYX_ERR(2, 4668, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUeglFrame_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUeglFrame_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUeglFrame_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUeglFrame_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUeglFrame_v1, (PyObject *)&__pyx_type_4cuda_4cuda_CUeglFrame_v1) < 0) __PYX_ERR(2, 4668, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUeglFrame_v1 = &__pyx_type_4cuda_4cuda_CUeglFrame_v1;
  __pyx_type_4cuda_4cuda_CUeglFrame.tp_base = __pyx_ptype_4cuda_4cuda_CUeglFrame_st;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUeglFrame) < 0) __PYX_ERR(2, 4705, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUeglFrame.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUeglFrame.tp_dictoffset && __pyx_type_4cuda_4cuda_CUeglFrame.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUeglFrame.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUeglFrame, (PyObject *)&__pyx_type_4cuda_4cuda_CUeglFrame) < 0) __PYX_ERR(2, 4705, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUeglFrame = &__pyx_type_4cuda_4cuda_CUeglFrame;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_cuuint32_t) < 0) __PYX_ERR(0, 10749, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_cuuint32_t.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_cuuint32_t.tp_dictoffset && __pyx_type_4cuda_4cuda_cuuint32_t.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_cuuint32_t.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_cuuint32_t_2, (PyObject *)&__pyx_type_4cuda_4cuda_cuuint32_t) < 0) __PYX_ERR(0, 10749, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_cuuint32_t) < 0) __PYX_ERR(0, 10749, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_cuuint32_t = &__pyx_type_4cuda_4cuda_cuuint32_t;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_cuuint64_t) < 0) __PYX_ERR(0, 10774, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_cuuint64_t.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_cuuint64_t.tp_dictoffset && __pyx_type_4cuda_4cuda_cuuint64_t.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_cuuint64_t.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_cuuint64_t_2, (PyObject *)&__pyx_type_4cuda_4cuda_cuuint64_t) < 0) __PYX_ERR(0, 10774, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_cuuint64_t) < 0) __PYX_ERR(0, 10774, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_cuuint64_t = &__pyx_type_4cuda_4cuda_cuuint64_t;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUdeviceptr_v2) < 0) __PYX_ERR(0, 10799, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUdeviceptr_v2.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUdeviceptr_v2.tp_dictoffset && __pyx_type_4cuda_4cuda_CUdeviceptr_v2.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUdeviceptr_v2.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUdeviceptr_v2_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUdeviceptr_v2) < 0) __PYX_ERR(0, 10799, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUdeviceptr_v2) < 0) __PYX_ERR(0, 10799, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUdeviceptr_v2 = &__pyx_type_4cuda_4cuda_CUdeviceptr_v2;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUdeviceptr) < 0) __PYX_ERR(0, 10826, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUdeviceptr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUdeviceptr.tp_dictoffset && __pyx_type_4cuda_4cuda_CUdeviceptr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUdeviceptr.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUdeviceptr_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUdeviceptr) < 0) __PYX_ERR(0, 10826, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUdeviceptr) < 0) __PYX_ERR(0, 10826, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUdeviceptr = &__pyx_type_4cuda_4cuda_CUdeviceptr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUdevice_v1) < 0) __PYX_ERR(0, 10853, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUdevice_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUdevice_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUdevice_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUdevice_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUdevice_v1_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUdevice_v1) < 0) __PYX_ERR(0, 10853, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUdevice_v1) < 0) __PYX_ERR(0, 10853, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUdevice_v1 = &__pyx_type_4cuda_4cuda_CUdevice_v1;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUdevice) < 0) __PYX_ERR(0, 10880, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUdevice.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUdevice.tp_dictoffset && __pyx_type_4cuda_4cuda_CUdevice.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUdevice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUdevice_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUdevice) < 0) __PYX_ERR(0, 10880, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUdevice) < 0) __PYX_ERR(0, 10880, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUdevice = &__pyx_type_4cuda_4cuda_CUdevice;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUtexObject_v1) < 0) __PYX_ERR(0, 10907, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUtexObject_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUtexObject_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUtexObject_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUtexObject_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUtexObject_v1_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUtexObject_v1) < 0) __PYX_ERR(0, 10907, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUtexObject_v1) < 0) __PYX_ERR(0, 10907, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUtexObject_v1 = &__pyx_type_4cuda_4cuda_CUtexObject_v1;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUtexObject) < 0) __PYX_ERR(0, 10934, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUtexObject.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUtexObject.tp_dictoffset && __pyx_type_4cuda_4cuda_CUtexObject.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUtexObject.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUtexObject_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUtexObject) < 0) __PYX_ERR(0, 10934, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUtexObject) < 0) __PYX_ERR(0, 10934, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUtexObject = &__pyx_type_4cuda_4cuda_CUtexObject;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUsurfObject_v1) < 0) __PYX_ERR(0, 10961, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUsurfObject_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUsurfObject_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUsurfObject_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUsurfObject_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUsurfObject_v1_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUsurfObject_v1) < 0) __PYX_ERR(0, 10961, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUsurfObject_v1) < 0) __PYX_ERR(0, 10961, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUsurfObject_v1 = &__pyx_type_4cuda_4cuda_CUsurfObject_v1;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUsurfObject) < 0) __PYX_ERR(0, 10988, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUsurfObject.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUsurfObject.tp_dictoffset && __pyx_type_4cuda_4cuda_CUsurfObject.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUsurfObject.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUsurfObject_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUsurfObject) < 0) __PYX_ERR(0, 10988, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUsurfObject) < 0) __PYX_ERR(0, 10988, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUsurfObject = &__pyx_type_4cuda_4cuda_CUsurfObject;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle_v1) < 0) __PYX_ERR(0, 11015, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle_v1.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle_v1.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle_v1.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle_v1.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemGenericAllocationHandle_v1_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle_v1) < 0) __PYX_ERR(0, 11015, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle_v1) < 0) __PYX_ERR(0, 11015, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle_v1 = &__pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle_v1;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle) < 0) __PYX_ERR(0, 11040, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle.tp_dictoffset && __pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CUmemGenericAllocationHandle_2, (PyObject *)&__pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle) < 0) __PYX_ERR(0, 11040, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle) < 0) __PYX_ERR(0, 11040, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle = &__pyx_type_4cuda_4cuda_CUmemGenericAllocationHandle;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_GLenum) < 0) __PYX_ERR(0, 11065, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_GLenum.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_GLenum.tp_dictoffset && __pyx_type_4cuda_4cuda_GLenum.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_GLenum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GLenum_2, (PyObject *)&__pyx_type_4cuda_4cuda_GLenum) < 0) __PYX_ERR(0, 11065, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_GLenum) < 0) __PYX_ERR(0, 11065, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_GLenum = &__pyx_type_4cuda_4cuda_GLenum;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_GLuint) < 0) __PYX_ERR(0, 11090, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_GLuint.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_GLuint.tp_dictoffset && __pyx_type_4cuda_4cuda_GLuint.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_GLuint.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GLuint_2, (PyObject *)&__pyx_type_4cuda_4cuda_GLuint) < 0) __PYX_ERR(0, 11090, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_GLuint) < 0) __PYX_ERR(0, 11090, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_GLuint = &__pyx_type_4cuda_4cuda_GLuint;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_EGLint) < 0) __PYX_ERR(0, 11115, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_EGLint.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_EGLint.tp_dictoffset && __pyx_type_4cuda_4cuda_EGLint.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_EGLint.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EGLint_2, (PyObject *)&__pyx_type_4cuda_4cuda_EGLint) < 0) __PYX_ERR(0, 11115, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_EGLint) < 0) __PYX_ERR(0, 11115, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_EGLint = &__pyx_type_4cuda_4cuda_EGLint;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_VdpDevice) < 0) __PYX_ERR(0, 11140, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_VdpDevice.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_VdpDevice.tp_dictoffset && __pyx_type_4cuda_4cuda_VdpDevice.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_VdpDevice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VdpDevice_2, (PyObject *)&__pyx_type_4cuda_4cuda_VdpDevice) < 0) __PYX_ERR(0, 11140, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_VdpDevice) < 0) __PYX_ERR(0, 11140, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_VdpDevice = &__pyx_type_4cuda_4cuda_VdpDevice;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_VdpGetProcAddress) < 0) __PYX_ERR(0, 11165, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_VdpGetProcAddress.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_VdpGetProcAddress.tp_dictoffset && __pyx_type_4cuda_4cuda_VdpGetProcAddress.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_VdpGetProcAddress.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VdpGetProcAddress_2, (PyObject *)&__pyx_type_4cuda_4cuda_VdpGetProcAddress) < 0) __PYX_ERR(0, 11165, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_VdpGetProcAddress) < 0) __PYX_ERR(0, 11165, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_VdpGetProcAddress = &__pyx_type_4cuda_4cuda_VdpGetProcAddress;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_VdpVideoSurface) < 0) __PYX_ERR(0, 11190, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_VdpVideoSurface.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_VdpVideoSurface.tp_dictoffset && __pyx_type_4cuda_4cuda_VdpVideoSurface.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_VdpVideoSurface.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VdpVideoSurface_2, (PyObject *)&__pyx_type_4cuda_4cuda_VdpVideoSurface) < 0) __PYX_ERR(0, 11190, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_VdpVideoSurface) < 0) __PYX_ERR(0, 11190, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_VdpVideoSurface = &__pyx_type_4cuda_4cuda_VdpVideoSurface;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda_VdpOutputSurface) < 0) __PYX_ERR(0, 11215, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda_VdpOutputSurface.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda_VdpOutputSurface.tp_dictoffset && __pyx_type_4cuda_4cuda_VdpOutputSurface.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda_VdpOutputSurface.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VdpOutputSurface_2, (PyObject *)&__pyx_type_4cuda_4cuda_VdpOutputSurface) < 0) __PYX_ERR(0, 11215, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cuda_4cuda_VdpOutputSurface) < 0) __PYX_ERR(0, 11215, __pyx_L1_error)
  __pyx_ptype_4cuda_4cuda_VdpOutputSurface = &__pyx_type_4cuda_4cuda_VdpOutputSurface;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3) < 0) __PYX_ERR(0, 12825, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3 = &__pyx_type_4cuda_4cuda___pyx_scope_struct__cuCtxCreate_v3;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 12941, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_1_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_1_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_1_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_1_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_1_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_1_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx) < 0) __PYX_ERR(0, 13819, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx = &__pyx_type_4cuda_4cuda___pyx_scope_struct_2_cuModuleLoadDataEx;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_3_genexpr) < 0) __PYX_ERR(0, 13856, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_3_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_3_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_3_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_3_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_3_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_3_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate) < 0) __PYX_ERR(0, 14133, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate = &__pyx_type_4cuda_4cuda___pyx_scope_struct_4_cuLinkCreate;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_5_genexpr) < 0) __PYX_ERR(0, 14174, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_5_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_5_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_5_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_5_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_5_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_5_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData) < 0) __PYX_ERR(0, 14190, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData = &__pyx_type_4cuda_4cuda___pyx_scope_struct_6_cuLinkAddData;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(0, 14232, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_7_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_7_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_7_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_7_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_7_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_7_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile) < 0) __PYX_ERR(0, 14257, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile = &__pyx_type_4cuda_4cuda___pyx_scope_struct_8_cuLinkAddFile;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_9_genexpr) < 0) __PYX_ERR(0, 14297, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_9_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_9_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_9_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_9_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_9_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_9_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync) < 0) __PYX_ERR(0, 18736, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync = &__pyx_type_4cuda_4cuda___pyx_scope_struct_10_cuMemMapArrayAsync;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_11_genexpr) < 0) __PYX_ERR(0, 18890, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_11_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_11_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_11_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_11_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_11_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_11_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess) < 0) __PYX_ERR(0, 18954, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess = &__pyx_type_4cuda_4cuda___pyx_scope_struct_12_cuMemSetAccess;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_13_genexpr) < 0) __PYX_ERR(0, 18985, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_13_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_13_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_13_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_13_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_13_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_13_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess) < 0) __PYX_ERR(0, 19546, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess = &__pyx_type_4cuda_4cuda___pyx_scope_struct_14_cuMemPoolSetAccess;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_15_genexpr) < 0) __PYX_ERR(0, 19569, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_15_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_15_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_15_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_15_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_15_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_15_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes) < 0) __PYX_ERR(0, 20551, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes = &__pyx_type_4cuda_4cuda___pyx_scope_struct_16_cuMemRangeGetAttributes;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_17_genexpr) < 0) __PYX_ERR(0, 20611, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_17_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_17_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_17_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_17_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_17_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_17_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_18_genexpr) < 0) __PYX_ERR(0, 20614, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_18_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_18_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_18_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_18_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_18_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_18_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes) < 0) __PYX_ERR(0, 20682, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes = &__pyx_type_4cuda_4cuda___pyx_scope_struct_19_cuPointerGetAttributes;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_20_genexpr) < 0) __PYX_ERR(0, 20759, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_20_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_20_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_20_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_20_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_20_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_20_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies) < 0) __PYX_ERR(0, 21512, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies = &__pyx_type_4cuda_4cuda___pyx_scope_struct_21_cuStreamUpdateCaptureDependencies;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_22_genexpr) < 0) __PYX_ERR(0, 21557, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_22_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_22_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_22_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_22_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_22_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_22_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync) < 0) __PYX_ERR(0, 22776, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync = &__pyx_type_4cuda_4cuda___pyx_scope_struct_23_cuSignalExternalSemaphoresAsync;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_24_genexpr) < 0) __PYX_ERR(0, 22861, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_24_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_24_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_24_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_24_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_24_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_24_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_25_genexpr) < 0) __PYX_ERR(0, 22865, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_25_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_25_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_25_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_25_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_25_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_25_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync) < 0) __PYX_ERR(0, 22895, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync = &__pyx_type_4cuda_4cuda___pyx_scope_struct_26_cuWaitExternalSemaphoresAsync;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_27_genexpr) < 0) __PYX_ERR(0, 22989, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_27_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_27_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_27_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_27_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_27_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_27_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_28_genexpr) < 0) __PYX_ERR(0, 22993, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_28_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_28_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_28_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_28_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_28_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_28_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp) < 0) __PYX_ERR(0, 23352, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp = &__pyx_type_4cuda_4cuda___pyx_scope_struct_29_cuStreamBatchMemOp;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_30_genexpr) < 0) __PYX_ERR(0, 23397, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_30_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_30_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_30_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_30_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_30_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_30_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2) < 0) __PYX_ERR(0, 23705, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2 = &__pyx_type_4cuda_4cuda___pyx_scope_struct_31_cuStreamBatchMemOp_v2;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_32_genexpr) < 0) __PYX_ERR(0, 23749, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_32_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_32_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_32_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_32_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_32_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_32_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice) < 0) __PYX_ERR(0, 24537, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice = &__pyx_type_4cuda_4cuda___pyx_scope_struct_33_cuLaunchCooperativeKernelMultiDevice;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_34_genexpr) < 0) __PYX_ERR(0, 24684, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_34_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_34_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_34_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_34_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_34_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_34_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode) < 0) __PYX_ERR(0, 25282, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_35_cuGraphAddKernelNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_36_genexpr) < 0) __PYX_ERR(0, 25371, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_36_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_36_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_36_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_36_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_36_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_36_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode) < 0) __PYX_ERR(0, 25483, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_37_cuGraphAddMemcpyNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_38_genexpr) < 0) __PYX_ERR(0, 25541, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_38_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_38_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_38_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_38_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_38_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_38_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode) < 0) __PYX_ERR(0, 25644, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_39_cuGraphAddMemsetNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_40_genexpr) < 0) __PYX_ERR(0, 25692, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_40_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_40_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_40_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_40_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_40_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_40_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode) < 0) __PYX_ERR(0, 25795, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_41_cuGraphAddHostNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_42_genexpr) < 0) __PYX_ERR(0, 25831, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_42_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_42_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_42_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_42_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_42_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_42_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode) < 0) __PYX_ERR(0, 25934, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_43_cuGraphAddChildGraphNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_44_genexpr) < 0) __PYX_ERR(0, 25983, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_44_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_44_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_44_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_44_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_44_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_44_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode) < 0) __PYX_ERR(0, 26054, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_45_cuGraphAddEmptyNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_46_genexpr) < 0) __PYX_ERR(0, 26091, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_46_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_46_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_46_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_46_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_46_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_46_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode) < 0) __PYX_ERR(0, 26121, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_47_cuGraphAddEventRecordNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_48_genexpr) < 0) __PYX_ERR(0, 26167, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_48_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_48_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_48_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_48_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_48_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_48_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode) < 0) __PYX_ERR(0, 26278, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_49_cuGraphAddEventWaitNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_50_genexpr) < 0) __PYX_ERR(0, 26326, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_50_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_50_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_50_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_50_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_50_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_50_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode) < 0) __PYX_ERR(0, 26437, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_51_cuGraphAddExternalSemaphoresSignalNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_52_genexpr) < 0) __PYX_ERR(0, 26474, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_52_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_52_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_52_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_52_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_52_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_52_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode) < 0) __PYX_ERR(0, 26584, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_53_cuGraphAddExternalSemaphoresWaitNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_54_genexpr) < 0) __PYX_ERR(0, 26621, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_54_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_54_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_54_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_54_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_54_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_54_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode) < 0) __PYX_ERR(0, 26731, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_55_cuGraphAddBatchMemOpNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_56_genexpr) < 0) __PYX_ERR(0, 26771, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_56_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_56_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_56_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_56_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_56_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_56_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode) < 0) __PYX_ERR(0, 26953, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_57_cuGraphAddMemAllocNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_58_genexpr) < 0) __PYX_ERR(0, 27029, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_58_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_58_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_58_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_58_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_58_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_58_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode) < 0) __PYX_ERR(0, 27099, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode = &__pyx_type_4cuda_4cuda___pyx_scope_struct_59_cuGraphAddMemFreeNode;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_60_genexpr) < 0) __PYX_ERR(0, 27162, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_60_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_60_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_60_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_60_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_60_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_60_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies) < 0) __PYX_ERR(0, 27790, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies = &__pyx_type_4cuda_4cuda___pyx_scope_struct_61_cuGraphAddDependencies;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_62_genexpr) < 0) __PYX_ERR(0, 27821, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_62_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_62_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_62_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_62_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_62_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_62_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_63_genexpr) < 0) __PYX_ERR(0, 27825, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_63_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_63_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_63_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_63_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_63_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_63_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies) < 0) __PYX_ERR(0, 27864, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies = &__pyx_type_4cuda_4cuda___pyx_scope_struct_64_cuGraphRemoveDependencies;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_65_genexpr) < 0) __PYX_ERR(0, 27899, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_65_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_65_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_65_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_65_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_65_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_65_genexpr;
  if (PyType_Ready(&__pyx_type_4cuda_4cuda___pyx_scope_struct_66_genexpr) < 0) __PYX_ERR(0, 27903, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_4cuda_4cuda___pyx_scope_struct_66_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cuda_4cuda___pyx_scope_struct_66_genexpr.tp_dictoffset && __pyx_type_4cuda_4cuda___pyx_scope_struct_66_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_4cuda_4cuda___pyx_scope_struct_66_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_4cuda_4cuda___pyx_scope_struct_66_genexpr = &__pyx_type_4cuda_4cuda___pyx_scope_struct_66_genexpr;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_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_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule("cuda._lib.utils"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_4cuda_4_lib_5utils_HelperKernelParams = __Pyx_ImportType(__pyx_t_1, "cuda._lib.utils", "HelperKernelParams", sizeof(struct __pyx_obj_4cuda_4_lib_5utils_HelperKernelParams), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_4cuda_4_lib_5utils_HelperKernelParams),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_4cuda_4_lib_5utils_HelperKernelParams) __PYX_ERR(3, 12, __pyx_L1_error)
  __pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr = __Pyx_ImportType(__pyx_t_1, "cuda._lib.utils", "HelperInputVoidPtr", sizeof(struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_4cuda_4_lib_5utils_HelperInputVoidPtr),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_4cuda_4_lib_5utils_HelperInputVoidPtr) __PYX_ERR(3, 20, __pyx_L1_error)
  __pyx_ptype_4cuda_4_lib_5utils_HelperCUmemPool_attribute = __Pyx_ImportType(__pyx_t_1, "cuda._lib.utils", "HelperCUmemPool_attribute", sizeof(struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemPool_attribute), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemPool_attribute),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_4cuda_4_lib_5utils_HelperCUmemPool_attribute) __PYX_ERR(3, 25, __pyx_L1_error)
  __pyx_ptype_4cuda_4_lib_5utils_HelperCUmem_range_attribute = __Pyx_ImportType(__pyx_t_1, "cuda._lib.utils", "HelperCUmem_range_attribute", sizeof(struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmem_range_attribute), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmem_range_attribute),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_4cuda_4_lib_5utils_HelperCUmem_range_attribute) __PYX_ERR(3, 34, __pyx_L1_error)
  __pyx_ptype_4cuda_4_lib_5utils_HelperCUpointer_attribute = __Pyx_ImportType(__pyx_t_1, "cuda._lib.utils", "HelperCUpointer_attribute", sizeof(struct __pyx_obj_4cuda_4_lib_5utils_HelperCUpointer_attribute), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_4cuda_4_lib_5utils_HelperCUpointer_attribute),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_4cuda_4_lib_5utils_HelperCUpointer_attribute) __PYX_ERR(3, 43, __pyx_L1_error)
  __pyx_ptype_4cuda_4_lib_5utils_HelperCUgraphMem_attribute = __Pyx_ImportType(__pyx_t_1, "cuda._lib.utils", "HelperCUgraphMem_attribute", sizeof(struct __pyx_obj_4cuda_4_lib_5utils_HelperCUgraphMem_attribute), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_4cuda_4_lib_5utils_HelperCUgraphMem_attribute),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_4cuda_4_lib_5utils_HelperCUgraphMem_attribute) __PYX_ERR(3, 59, __pyx_L1_error)
  __pyx_ptype_4cuda_4_lib_5utils_HelperCUjit_option = __Pyx_ImportType(__pyx_t_1, "cuda._lib.utils", "HelperCUjit_option", sizeof(struct __pyx_obj_4cuda_4_lib_5utils_HelperCUjit_option), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_4cuda_4_lib_5utils_HelperCUjit_option),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_4cuda_4_lib_5utils_HelperCUjit_option) __PYX_ERR(3, 67, __pyx_L1_error)
  __pyx_ptype_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType = __Pyx_ImportType(__pyx_t_1, "cuda._lib.utils", "HelperCUmemAllocationHandleType", sizeof(struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_4cuda_4_lib_5utils_HelperCUmemAllocationHandleType) __PYX_ERR(3, 82, __pyx_L1_error)
  __pyx_ptype_4cuda_4_lib_5utils_InputVoidPtrPtrHelper = __Pyx_ImportType(__pyx_t_1, "cuda._lib.utils", "InputVoidPtrPtrHelper", sizeof(struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper), __PYX_GET_STRUCT_ALIGNMENT(struct __pyx_obj_4cuda_4_lib_5utils_InputVoidPtrPtrHelper),
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_4cuda_4_lib_5utils_InputVoidPtrPtrHelper) __PYX_ERR(3, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __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;
}

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.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_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_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_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_5ccuda_cuDriverGetVersion, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuDeviceGet", (void (**)(void))&__pyx_f_4cuda_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_5ccuda_cuDeviceGetCount, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuDeviceGetName", (void (**)(void))&__pyx_f_4cuda_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_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_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_5ccuda_cuDeviceGetLuid, "CUresult (char *, unsigned int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuDeviceTotalMem", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuDeviceTotalMem, "CUresult (size_t *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuDeviceGetAttribute", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_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_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_5ccuda_cuDevicePrimaryCtxRetain, "CUresult (CUcontext *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuDevicePrimaryCtxRelease", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxRelease, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuDevicePrimaryCtxSetFlags", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxSetFlags, "CUresult (CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuDevicePrimaryCtxGetState", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxGetState, "CUresult (CUdevice, unsigned int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuDevicePrimaryCtxReset", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxReset, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuDeviceGetExecAffinitySupport", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuDeviceGetExecAffinitySupport, "CUresult (int *, CUexecAffinityType, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuCtxCreate", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuCtxCreate, "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_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", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuCtxDestroy, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuCtxPushCurrent", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuCtxPushCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuCtxPopCurrent", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuCtxPopCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuCtxSetCurrent", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuCtxSetCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuCtxGetCurrent", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuCtxGetCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuCtxGetDevice", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuCtxGetDevice, "CUresult (CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuCtxGetFlags", (void (**)(void))&__pyx_f_4cuda_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_5ccuda_cuCtxSynchronize, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuCtxSetLimit", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_5ccuda_cuCtxGetSharedMemConfig, "CUresult (CUsharedconfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuCtxSetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuCtxSetSharedMemConfig, "CUresult (CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuCtxGetApiVersion", (void (**)(void))&__pyx_f_4cuda_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_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_5ccuda_cuCtxResetPersistingL2Cache, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuCtxGetExecAffinity", (void (**)(void))&__pyx_f_4cuda_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_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_5ccuda_cuCtxDetach, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuModuleLoad", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_5ccuda_cuModuleUnload, "CUresult (CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuModuleGetLoadingMode", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuModuleGetLoadingMode, "CUresult (CUmoduleLoadingMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuModuleGetFunction", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuModuleGetFunction, "CUresult (CUfunction *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuModuleGetTexRef", (void (**)(void))&__pyx_f_4cuda_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_5ccuda_cuModuleGetSurfRef, "CUresult (CUsurfref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuLinkComplete", (void (**)(void))&__pyx_f_4cuda_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_5ccuda_cuLinkDestroy, "CUresult (CUlinkState)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemGetInfo", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemGetInfo, "CUresult (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemAlloc", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemAlloc, "CUresult (CUdeviceptr *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuMemFree", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemFree, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemGetAddressRange", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemGetAddressRange, "CUresult (CUdeviceptr *, size_t *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemAllocHost", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemAllocHost, "CUresult (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemFreeHost", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemFreeHost, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemHostAlloc", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemHostAlloc, "CUresult (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemHostGetDevicePointer", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemHostGetDevicePointer, "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_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_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_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_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_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_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_5ccuda_cuIpcGetMemHandle, "CUresult (CUipcMemHandle *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuIpcOpenMemHandle", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuIpcOpenMemHandle, "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_5ccuda_cuIpcCloseMemHandle, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemHostRegister", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemHostRegister, "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_5ccuda_cuMemHostUnregister, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemcpy", (void (**)(void))&__pyx_f_4cuda_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_5ccuda_cuMemcpyPeer, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemcpyHtoD", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemcpyHtoD, "CUresult (CUdeviceptr, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemcpyDtoH", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemcpyDtoH, "CUresult (void *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemcpyDtoD", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemcpyDtoD, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuMemcpy2D", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemcpy2D, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemcpy2DUnaligned", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemcpy2DUnaligned, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemcpy3D", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemcpy3D, "CUresult (CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemcpy3DPeer", (void (**)(void))&__pyx_f_4cuda_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_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_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", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemcpyHtoDAsync, "CUresult (CUdeviceptr, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemcpyDtoHAsync", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemcpyDtoHAsync, "CUresult (void *, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemcpyDtoDAsync", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemcpyDtoDAsync, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuMemcpy2DAsync", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemcpy2DAsync, "CUresult (CUDA_MEMCPY2D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemcpy3DAsync", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemcpy3DAsync, "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_5ccuda_cuMemcpy3DPeerAsync, "CUresult (CUDA_MEMCPY3D_PEER const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemsetD8", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemsetD8, "CUresult (CUdeviceptr, unsigned char, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemsetD16", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemsetD16, "CUresult (CUdeviceptr, unsigned short, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemsetD32", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuMemsetD32, "CUresult (CUdeviceptr, unsigned int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuArrayCreate", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuArrayCreate, "CUresult (CUarray *, CUDA_ARRAY_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuArrayGetDescriptor", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuArrayGetDescriptor, "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_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_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_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_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_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_5ccuda_cuArrayDestroy, "CUresult (CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuArray3DCreate", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuArray3DCreate, "CUresult (CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuArray3DGetDescriptor", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuArray3DGetDescriptor, "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_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_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_5ccuda_cuMipmappedArrayDestroy, "CUresult (CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuMemAddressFree", (void (**)(void))&__pyx_f_4cuda_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_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_5ccuda_cuMemRelease, "CUresult (CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuMemMapArrayAsync", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_5ccuda_cuMemPoolDestroy, "CUresult (CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuMemAllocFromPoolAsync", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_5ccuda_cuStreamAddCallback, "CUresult (CUstream, CUstreamCallback, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuStreamBeginCapture", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuStreamBeginCapture, "CUresult (CUstream, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuThreadExchangeStreamCaptureMode", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuThreadExchangeStreamCaptureMode, "CUresult (CUstreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuStreamEndCapture", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_5ccuda_cuStreamQuery, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuStreamSynchronize", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuStreamSynchronize, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuStreamDestroy", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuStreamDestroy, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuStreamCopyAttributes", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_5ccuda_cuEventQuery, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuEventSynchronize", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuEventSynchronize, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuEventDestroy", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuEventDestroy, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuEventElapsedTime", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_5ccuda_cuDestroyExternalMemory, "CUresult (CUexternalMemory)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuDestroyExternalSemaphore", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuDestroyExternalSemaphore, "CUresult (CUexternalSemaphore)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuFuncGetAttribute", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_5ccuda_cuLaunch, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuLaunchGrid", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_5ccuda_cuDeviceGraphMemTrim, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuDeviceGetGraphMemAttribute", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_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_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_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_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_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_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_5ccuda_cuGraphDestroyNode, "CUresult (CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuGraphExecChildGraphNodeSetParams", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_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_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_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_5ccuda_cuGraphExecDestroy, "CUresult (CUgraphExec)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuGraphDestroy", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuGraphDestroy, "CUresult (CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuGraphExecUpdate", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_5ccuda_cuTexRefSetMipmappedArray, "CUresult (CUtexref, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuTexRefSetFormat", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_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_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_5ccuda_cuTexRefSetFlags, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuTexRefGetAddress", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuTexRefGetAddress, "CUresult (CUdeviceptr *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuTexRefGetArray", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_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_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_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_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_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_5ccuda_cuTexRefCreate, "CUresult (CUtexref *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuTexRefDestroy", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuTexRefDestroy, "CUresult (CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuSurfRefSetArray", (void (**)(void))&__pyx_f_4cuda_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_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_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_5ccuda_cuTexObjectDestroy, "CUresult (CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuTexObjectGetResourceDesc", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_5ccuda_cuSurfObjectDestroy, "CUresult (CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuSurfObjectGetResourceDesc", (void (**)(void))&__pyx_f_4cuda_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_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_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_5ccuda_cuCtxDisablePeerAccess, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuDeviceGetP2PAttribute", (void (**)(void))&__pyx_f_4cuda_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_5ccuda_cuGraphicsUnregisterResource, "CUresult (CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuGraphicsResourceGetMappedMipmappedArray", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuGraphicsResourceGetMappedPointer", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedPointer, "CUresult (CUdeviceptr *, size_t *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuGraphicsResourceSetMapFlags", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuGraphicsResourceSetMapFlags, "CUresult (CUgraphicsResource, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuGraphicsMapResources", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_5ccuda_cuProfilerStart, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "cuProfilerStop", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuProfilerStop, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "cuEGLStreamConsumerDisconnect", (void (**)(void))&__pyx_f_4cuda_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_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_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_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_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_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_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_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_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_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_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", (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_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 initcuda(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initcuda(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_cuda(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_cuda(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_cuda(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = 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 'cuda' 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_cuda(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("cuda", __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__cuda) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_3, __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.cuda")) {
      if (unlikely(PyDict_SetItemString(modules, "cuda.cuda", __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();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (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_cuda(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));

  /* "cuda/cuda.pyx":8
 * # this software and related documentation outside the terms of the EULA
 * # is strictly prohibited.
 * from typing import List, Tuple, Any             # <<<<<<<<<<<<<<
 * from enum import IntEnum
 * import cython
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_List);
  __Pyx_GIVEREF(__pyx_n_s_List);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_List);
  __Pyx_INCREF(__pyx_n_s_Tuple);
  __Pyx_GIVEREF(__pyx_n_s_Tuple);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Tuple);
  __Pyx_INCREF(__pyx_n_s_Any);
  __Pyx_GIVEREF(__pyx_n_s_Any);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_Any);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_List, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Tuple, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Any); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Any, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":9
 * # is strictly prohibited.
 * from typing import List, Tuple, Any
 * from enum import IntEnum             # <<<<<<<<<<<<<<
 * import cython
 * import ctypes
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_IntEnum);
  __Pyx_GIVEREF(__pyx_n_s_IntEnum);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_IntEnum);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_enum, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IntEnum, __pyx_t_2) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11
 * from enum import IntEnum
 * import cython
 * import ctypes             # <<<<<<<<<<<<<<
 * from libc.stdlib cimport calloc, free
 * from libc.string cimport memcpy
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_ctypes, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ctypes, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":44
 * 
 * #: CUDA API version number
 * CUDA_VERSION = ccuda.CUDA_VERSION             # <<<<<<<<<<<<<<
 * 
 * #: CUDA IPC handle size
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_VERSION); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_VERSION, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":47
 * 
 * #: CUDA IPC handle size
 * CU_IPC_HANDLE_SIZE = ccuda.CU_IPC_HANDLE_SIZE             # <<<<<<<<<<<<<<
 * 
 * #: Legacy stream handle
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_IPC_HANDLE_SIZE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_IPC_HANDLE_SIZE, __pyx_t_1) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":55
 * #:
 * #: See details of the \link_sync_behavior
 * CU_STREAM_LEGACY = ccuda.CU_STREAM_LEGACY             # <<<<<<<<<<<<<<
 * 
 * #: Per-thread stream handle
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_STREAM_LEGACY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_STREAM_LEGACY, __pyx_t_1) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":63
 * #:
 * #: See details of the \link_sync_behavior
 * CU_STREAM_PER_THREAD = ccuda.CU_STREAM_PER_THREAD             # <<<<<<<<<<<<<<
 * 
 * CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = ccuda.CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_STREAM_PER_THREAD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_STREAM_PER_THREAD, __pyx_t_1) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":65
 * CU_STREAM_PER_THREAD = ccuda.CU_STREAM_PER_THREAD
 * 
 * CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = ccuda.CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW             # <<<<<<<<<<<<<<
 * 
 * CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = ccuda.CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_ACCESS, __pyx_t_1) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":67
 * CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = ccuda.CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW
 * 
 * CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = ccuda.CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE             # <<<<<<<<<<<<<<
 * 
 * CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = ccuda.CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_COOPERA, __pyx_t_1) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":69
 * CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = ccuda.CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE
 * 
 * CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = ccuda.CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION             # <<<<<<<<<<<<<<
 * 
 * CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ccuda.CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER, __pyx_t_1) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":71
 * CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = ccuda.CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION
 * 
 * CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ccuda.CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE             # <<<<<<<<<<<<<<
 * 
 * CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = ccuda.CU_KERNEL_NODE_ATTRIBUTE_PRIORITY
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_2, __pyx_t_1) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":73
 * CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ccuda.CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE
 * 
 * CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = ccuda.CU_KERNEL_NODE_ATTRIBUTE_PRIORITY             # <<<<<<<<<<<<<<
 * 
 * CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = ccuda.CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_KERNEL_NODE_ATTRIBUTE_PRIORIT, __pyx_t_1) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":75
 * CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = ccuda.CU_KERNEL_NODE_ATTRIBUTE_PRIORITY
 * 
 * CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = ccuda.CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW             # <<<<<<<<<<<<<<
 * 
 * CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = ccuda.CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_STREAM_ATTRIBUTE_ACCESS_POLIC, __pyx_t_1) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":77
 * CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = ccuda.CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW
 * 
 * CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = ccuda.CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY             # <<<<<<<<<<<<<<
 * 
 * #: If set, host memory is portable between CUDA contexts. Flag for
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_STREAM_ATTRIBUTE_SYNCHRONIZAT, __pyx_t_1) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":81
 * #: If set, host memory is portable between CUDA contexts. Flag for
 * #: :py:obj:`~.cuMemHostAlloc()`
 * CU_MEMHOSTALLOC_PORTABLE = ccuda.CU_MEMHOSTALLOC_PORTABLE             # <<<<<<<<<<<<<<
 * 
 * #: If set, host memory is mapped into CUDA address space and
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_PORTABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_MEMHOSTALLOC_PORTABLE, __pyx_t_1) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":86
 * #: :py:obj:`~.cuMemHostGetDevicePointer()` may be called on the host
 * #: pointer. Flag for :py:obj:`~.cuMemHostAlloc()`
 * CU_MEMHOSTALLOC_DEVICEMAP = ccuda.CU_MEMHOSTALLOC_DEVICEMAP             # <<<<<<<<<<<<<<
 * 
 * #: If set, host memory is allocated as write-combined - fast to write,
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_DEVICEMAP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_MEMHOSTALLOC_DEVICEMAP, __pyx_t_1) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":91
 * #: faster to DMA, slow to read except via SSE4 streaming load instruction
 * #: (MOVNTDQA). Flag for :py:obj:`~.cuMemHostAlloc()`
 * CU_MEMHOSTALLOC_WRITECOMBINED = ccuda.CU_MEMHOSTALLOC_WRITECOMBINED             # <<<<<<<<<<<<<<
 * 
 * #: If set, host memory is portable between CUDA contexts. Flag for
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_WRITECOMBINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_MEMHOSTALLOC_WRITECOMBINED, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":95
 * #: If set, host memory is portable between CUDA contexts. Flag for
 * #: :py:obj:`~.cuMemHostRegister()`
 * CU_MEMHOSTREGISTER_PORTABLE = ccuda.CU_MEMHOSTREGISTER_PORTABLE             # <<<<<<<<<<<<<<
 * 
 * #: If set, host memory is mapped into CUDA address space and
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_PORTABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_MEMHOSTREGISTER_PORTABLE, __pyx_t_1) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":100
 * #: :py:obj:`~.cuMemHostGetDevicePointer()` may be called on the host
 * #: pointer. Flag for :py:obj:`~.cuMemHostRegister()`
 * CU_MEMHOSTREGISTER_DEVICEMAP = ccuda.CU_MEMHOSTREGISTER_DEVICEMAP             # <<<<<<<<<<<<<<
 * 
 * #: If set, the passed memory pointer is treated as pointing to some memory-
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_DEVICEMAP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_MEMHOSTREGISTER_DEVICEMAP, __pyx_t_1) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":111
 * #: :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` is returned. Flag for
 * #: :py:obj:`~.cuMemHostRegister()`
 * CU_MEMHOSTREGISTER_IOMEMORY = ccuda.CU_MEMHOSTREGISTER_IOMEMORY             # <<<<<<<<<<<<<<
 * 
 * #: If set, the passed memory pointer is treated as pointing to memory that
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_IOMEMORY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_MEMHOSTREGISTER_IOMEMORY, __pyx_t_1) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":123
 * #: have this attribute set will cause :py:obj:`~.cuMemHostRegister` to
 * #: error with :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`.
 * CU_MEMHOSTREGISTER_READ_ONLY = ccuda.CU_MEMHOSTREGISTER_READ_ONLY             # <<<<<<<<<<<<<<
 * 
 * #: Indicates that the layered sparse CUDA array or CUDA mipmapped array has
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_READ_ONLY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_MEMHOSTREGISTER_READ_ONLY, __pyx_t_1) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":127
 * #: Indicates that the layered sparse CUDA array or CUDA mipmapped array has
 * #: a single mip tail region for all layers
 * CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = ccuda.CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL             # <<<<<<<<<<<<<<
 * 
 * #: Indicates that the external memory object is a dedicated resource
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_ARRAY_SPARSE_PROPERTIES_SINGL, __pyx_t_1) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":130
 * 
 * #: Indicates that the external memory object is a dedicated resource
 * CUDA_EXTERNAL_MEMORY_DEDICATED = ccuda.CUDA_EXTERNAL_MEMORY_DEDICATED             # <<<<<<<<<<<<<<
 * 
 * #: When the `flags` parameter of
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_DEDICATED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_EXTERNAL_MEMORY_DEDICATED, __pyx_t_1) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":140
 * #: performed by default to ensure data coherency with other importers of
 * #: the same NvSciBuf memory objects.
 * CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = ccuda.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC             # <<<<<<<<<<<<<<
 * 
 * #: When the `flags` parameter of
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_S, __pyx_t_1) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":150
 * #: performed by default to ensure data coherency with other importers of
 * #: the same NvSciBuf memory objects.
 * CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = ccuda.CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC             # <<<<<<<<<<<<<<
 * 
 * #: When `flags` of :py:obj:`~.cuDeviceGetNvSciSyncAttributes` is set to
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKI, __pyx_t_1) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":156
 * #: NvSciSyncAttr to be filled by
 * #: :py:obj:`~.cuDeviceGetNvSciSyncAttributes`.
 * CUDA_NVSCISYNC_ATTR_SIGNAL = ccuda.CUDA_NVSCISYNC_ATTR_SIGNAL             # <<<<<<<<<<<<<<
 * 
 * #: When `flags` of :py:obj:`~.cuDeviceGetNvSciSyncAttributes` is set to
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_NVSCISYNC_ATTR_SIGNAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_NVSCISYNC_ATTR_SIGNAL, __pyx_t_1) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":161
 * #: this, it indicates that application needs waiter specific NvSciSyncAttr
 * #: to be filled by :py:obj:`~.cuDeviceGetNvSciSyncAttributes`.
 * CUDA_NVSCISYNC_ATTR_WAIT = ccuda.CUDA_NVSCISYNC_ATTR_WAIT             # <<<<<<<<<<<<<<
 * 
 * #: This flag if set indicates that the memory will be used as a tile pool.
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_NVSCISYNC_ATTR_WAIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_NVSCISYNC_ATTR_WAIT, __pyx_t_1) < 0) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":164
 * 
 * #: This flag if set indicates that the memory will be used as a tile pool.
 * CU_MEM_CREATE_USAGE_TILE_POOL = ccuda.CU_MEM_CREATE_USAGE_TILE_POOL             # <<<<<<<<<<<<<<
 * 
 * #: If set, each kernel launched as part of
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_MEM_CREATE_USAGE_TILE_POOL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_MEM_CREATE_USAGE_TILE_POOL, __pyx_t_1) < 0) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":170
 * #: work in the stream corresponding to that GPU to complete before the
 * #: kernel begins execution.
 * CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = ccuda.CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC             # <<<<<<<<<<<<<<
 * 
 * #: If set, any subsequent work pushed in a stream that participated in a
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_COOPERATIVE_LAUNCH_MULTI_DE, __pyx_t_1) < 0) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":176
 * #: for the kernel launched on the GPU corresponding to that stream to
 * #: complete before it begins execution.
 * CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = ccuda.CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC             # <<<<<<<<<<<<<<
 * 
 * #: If set, the CUDA array is a collection of layers, where each layer is
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_COOPERATIVE_LAUNCH_MULTI_DE_2, __pyx_t_1) < 0) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":182
 * #: CUDA_ARRAY3D_DESCRIPTOR specifies the number of layers, not the depth of
 * #: a 3D array.
 * CUDA_ARRAY3D_LAYERED = ccuda.CUDA_ARRAY3D_LAYERED             # <<<<<<<<<<<<<<
 * 
 * #: Deprecated, use CUDA_ARRAY3D_LAYERED
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_LAYERED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_ARRAY3D_LAYERED, __pyx_t_1) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":185
 * 
 * #: Deprecated, use CUDA_ARRAY3D_LAYERED
 * CUDA_ARRAY3D_2DARRAY = ccuda.CUDA_ARRAY3D_2DARRAY             # <<<<<<<<<<<<<<
 * 
 * #: This flag must be set in order to bind a surface reference to the CUDA
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_2DARRAY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_ARRAY3D_2DARRAY, __pyx_t_1) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":189
 * #: This flag must be set in order to bind a surface reference to the CUDA
 * #: array
 * CUDA_ARRAY3D_SURFACE_LDST = ccuda.CUDA_ARRAY3D_SURFACE_LDST             # <<<<<<<<<<<<<<
 * 
 * #: If set, the CUDA array is a collection of six 2D arrays, representing
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_SURFACE_LDST); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_ARRAY3D_SURFACE_LDST, __pyx_t_1) < 0) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":196
 * #: is also set, then the CUDA array is a collection of cubemaps and Depth
 * #: must be a multiple of six.
 * CUDA_ARRAY3D_CUBEMAP = ccuda.CUDA_ARRAY3D_CUBEMAP             # <<<<<<<<<<<<<<
 * 
 * #: This flag must be set in order to perform texture gather operations on a
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_CUBEMAP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_ARRAY3D_CUBEMAP, __pyx_t_1) < 0) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":200
 * #: This flag must be set in order to perform texture gather operations on a
 * #: CUDA array.
 * CUDA_ARRAY3D_TEXTURE_GATHER = ccuda.CUDA_ARRAY3D_TEXTURE_GATHER             # <<<<<<<<<<<<<<
 * 
 * #: This flag if set indicates that the CUDA array is a DEPTH_TEXTURE.
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_TEXTURE_GATHER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_ARRAY3D_TEXTURE_GATHER, __pyx_t_1) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":203
 * 
 * #: This flag if set indicates that the CUDA array is a DEPTH_TEXTURE.
 * CUDA_ARRAY3D_DEPTH_TEXTURE = ccuda.CUDA_ARRAY3D_DEPTH_TEXTURE             # <<<<<<<<<<<<<<
 * 
 * #: This flag indicates that the CUDA array may be bound as a color target
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_DEPTH_TEXTURE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_ARRAY3D_DEPTH_TEXTURE, __pyx_t_1) < 0) __PYX_ERR(0, 203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":207
 * #: This flag indicates that the CUDA array may be bound as a color target
 * #: in an external graphics API
 * CUDA_ARRAY3D_COLOR_ATTACHMENT = ccuda.CUDA_ARRAY3D_COLOR_ATTACHMENT             # <<<<<<<<<<<<<<
 * 
 * #: This flag if set indicates that the CUDA array or CUDA mipmapped array
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_COLOR_ATTACHMENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_ARRAY3D_COLOR_ATTACHMENT, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":211
 * #: This flag if set indicates that the CUDA array or CUDA mipmapped array
 * #: is a sparse CUDA array or CUDA mipmapped array respectively
 * CUDA_ARRAY3D_SPARSE = ccuda.CUDA_ARRAY3D_SPARSE             # <<<<<<<<<<<<<<
 * 
 * #: This flag if set indicates that the CUDA array or CUDA mipmapped array
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_SPARSE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_ARRAY3D_SPARSE, __pyx_t_1) < 0) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":215
 * #: This flag if set indicates that the CUDA array or CUDA mipmapped array
 * #: will allow deferred memory mapping
 * CUDA_ARRAY3D_DEFERRED_MAPPING = ccuda.CUDA_ARRAY3D_DEFERRED_MAPPING             # <<<<<<<<<<<<<<
 * 
 * #: Override the texref format with a format inferred from the array. Flag
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_DEFERRED_MAPPING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_ARRAY3D_DEFERRED_MAPPING, __pyx_t_1) < 0) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":219
 * #: Override the texref format with a format inferred from the array. Flag
 * #: for :py:obj:`~.cuTexRefSetArray()`
 * CU_TRSA_OVERRIDE_FORMAT = ccuda.CU_TRSA_OVERRIDE_FORMAT             # <<<<<<<<<<<<<<
 * 
 * #: Read the texture as integers rather than promoting the values to floats
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_TRSA_OVERRIDE_FORMAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_TRSA_OVERRIDE_FORMAT, __pyx_t_1) < 0) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":224
 * #: in the range [0,1]. Flag for :py:obj:`~.cuTexRefSetFlags()` and
 * #: :py:obj:`~.cuTexObjectCreate()`
 * CU_TRSF_READ_AS_INTEGER = ccuda.CU_TRSF_READ_AS_INTEGER             # <<<<<<<<<<<<<<
 * 
 * #: Use normalized texture coordinates in the range [0,1) instead of
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_TRSF_READ_AS_INTEGER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_TRSF_READ_AS_INTEGER, __pyx_t_1) < 0) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":229
 * #: [0,dim). Flag for :py:obj:`~.cuTexRefSetFlags()` and
 * #: :py:obj:`~.cuTexObjectCreate()`
 * CU_TRSF_NORMALIZED_COORDINATES = ccuda.CU_TRSF_NORMALIZED_COORDINATES             # <<<<<<<<<<<<<<
 * 
 * #: Perform sRGB->linear conversion during texture read. Flag for
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_TRSF_NORMALIZED_COORDINATES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_TRSF_NORMALIZED_COORDINATES, __pyx_t_1) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":233
 * #: Perform sRGB->linear conversion during texture read. Flag for
 * #: :py:obj:`~.cuTexRefSetFlags()` and :py:obj:`~.cuTexObjectCreate()`
 * CU_TRSF_SRGB = ccuda.CU_TRSF_SRGB             # <<<<<<<<<<<<<<
 * 
 * #: Disable any trilinear filtering optimizations. Flag for
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_TRSF_SRGB); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_TRSF_SRGB, __pyx_t_1) < 0) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":237
 * #: Disable any trilinear filtering optimizations. Flag for
 * #: :py:obj:`~.cuTexRefSetFlags()` and :py:obj:`~.cuTexObjectCreate()`
 * CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = ccuda.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION             # <<<<<<<<<<<<<<
 * 
 * #: Enable seamless cube map filtering. Flag for
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_TRSF_DISABLE_TRILINEAR_OPTIMI, __pyx_t_1) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":241
 * #: Enable seamless cube map filtering. Flag for
 * #: :py:obj:`~.cuTexObjectCreate()`
 * CU_TRSF_SEAMLESS_CUBEMAP = ccuda.CU_TRSF_SEAMLESS_CUBEMAP             # <<<<<<<<<<<<<<
 * 
 * #: C++ compile time constant for CU_LAUNCH_PARAM_END
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_TRSF_SEAMLESS_CUBEMAP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_TRSF_SEAMLESS_CUBEMAP, __pyx_t_1) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":244
 * 
 * #: C++ compile time constant for CU_LAUNCH_PARAM_END
 * CU_LAUNCH_PARAM_END_AS_INT = ccuda.CU_LAUNCH_PARAM_END_AS_INT             # <<<<<<<<<<<<<<
 * 
 * #: End of array terminator for the `extra` parameter to
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_END_AS_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_LAUNCH_PARAM_END_AS_INT, __pyx_t_1) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":248
 * #: End of array terminator for the `extra` parameter to
 * #: :py:obj:`~.cuLaunchKernel`
 * CU_LAUNCH_PARAM_END = ccuda.CU_LAUNCH_PARAM_END             # <<<<<<<<<<<<<<
 * 
 * #: C++ compile time constant for CU_LAUNCH_PARAM_BUFFER_POINTER
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_END); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_LAUNCH_PARAM_END, __pyx_t_1) < 0) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":251
 * 
 * #: C++ compile time constant for CU_LAUNCH_PARAM_BUFFER_POINTER
 * CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = ccuda.CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT             # <<<<<<<<<<<<<<
 * 
 * #: Indicator that the next value in the `extra` parameter to
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_LAUNCH_PARAM_BUFFER_POINTER_A, __pyx_t_1) < 0) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":260
 * #: `extra` array, then :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER` will have
 * #: no effect.
 * CU_LAUNCH_PARAM_BUFFER_POINTER = ccuda.CU_LAUNCH_PARAM_BUFFER_POINTER             # <<<<<<<<<<<<<<
 * 
 * #: C++ compile time constant for CU_LAUNCH_PARAM_BUFFER_SIZE
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_POINTER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_LAUNCH_PARAM_BUFFER_POINTER, __pyx_t_1) < 0) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":263
 * 
 * #: C++ compile time constant for CU_LAUNCH_PARAM_BUFFER_SIZE
 * CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = ccuda.CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT             # <<<<<<<<<<<<<<
 * 
 * #: Indicator that the next value in the `extra` parameter to
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_I, __pyx_t_1) < 0) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":272
 * #: `extra` array if the value associated with
 * #: :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_SIZE` is not zero.
 * CU_LAUNCH_PARAM_BUFFER_SIZE = ccuda.CU_LAUNCH_PARAM_BUFFER_SIZE             # <<<<<<<<<<<<<<
 * 
 * #: For texture references loaded into the module, use default texunit from
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_SIZE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_LAUNCH_PARAM_BUFFER_SIZE, __pyx_t_1) < 0) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":276
 * #: For texture references loaded into the module, use default texunit from
 * #: texture reference.
 * CU_PARAM_TR_DEFAULT = ccuda.CU_PARAM_TR_DEFAULT             # <<<<<<<<<<<<<<
 * 
 * #: Device that represents the CPU
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_PARAM_TR_DEFAULT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_PARAM_TR_DEFAULT, __pyx_t_1) < 0) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":279
 * 
 * #: Device that represents the CPU
 * CU_DEVICE_CPU = ccuda.CU_DEVICE_CPU             # <<<<<<<<<<<<<<
 * 
 * #: Device that represents an invalid device
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_DEVICE_CPU); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_DEVICE_CPU, __pyx_t_1) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":282
 * 
 * #: Device that represents an invalid device
 * CU_DEVICE_INVALID = ccuda.CU_DEVICE_INVALID             # <<<<<<<<<<<<<<
 * 
 * #: Maximum number of planes per frame
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CU_DEVICE_INVALID); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CU_DEVICE_INVALID, __pyx_t_1) < 0) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":285
 * 
 * #: Maximum number of planes per frame
 * MAX_PLANES = ccuda.MAX_PLANES             # <<<<<<<<<<<<<<
 * 
 * #: Indicates that timeout for :py:obj:`~.cuEGLStreamConsumerAcquireFrame`
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_MAX_PLANES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX_PLANES, __pyx_t_1) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":289
 * #: Indicates that timeout for :py:obj:`~.cuEGLStreamConsumerAcquireFrame`
 * #: is infinite.
 * CUDA_EGL_INFINITE_TIMEOUT = ccuda.CUDA_EGL_INFINITE_TIMEOUT             # <<<<<<<<<<<<<<
 * 
 * class CUipcMem_flags(IntEnum):
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_4cuda_5ccuda_CUDA_EGL_INFINITE_TIMEOUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_EGL_INFINITE_TIMEOUT, __pyx_t_1) < 0) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":291
 * CUDA_EGL_INFINITE_TIMEOUT = ccuda.CUDA_EGL_INFINITE_TIMEOUT
 * 
 * class CUipcMem_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA Ipc Mem Flags
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUipcMem_flags, __pyx_n_s_CUipcMem_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_CUDA_Ipc_Mem_Flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":297
 * 
 *     #: Automatically enable peer access between remote devices as needed
 *     CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = ccuda.CUipcMem_flags_enum.CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS             # <<<<<<<<<<<<<<
 * 
 * class CUmemAttach_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUipcMem_flags_enum(CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_IPC_MEM_LAZY_ENABLE_PEER_ACCE, __pyx_t_4) < 0) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":291
 * CUDA_EGL_INFINITE_TIMEOUT = ccuda.CUDA_EGL_INFINITE_TIMEOUT
 * 
 * class CUipcMem_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA Ipc Mem Flags
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUipcMem_flags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUipcMem_flags, __pyx_t_4) < 0) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":299
 *     CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = ccuda.CUipcMem_flags_enum.CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS
 * 
 * class CUmemAttach_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA Mem Attach Flags
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUmemAttach_flags, __pyx_n_s_CUmemAttach_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_CUDA_Mem_Attach_Flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":305
 * 
 *     #: Memory can be accessed by any stream on any device
 *     CU_MEM_ATTACH_GLOBAL = ccuda.CUmemAttach_flags_enum.CU_MEM_ATTACH_GLOBAL             # <<<<<<<<<<<<<<
 * 
 *     #: Memory cannot be accessed by any stream on any device
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAttach_flags_enum(CU_MEM_ATTACH_GLOBAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ATTACH_GLOBAL, __pyx_t_4) < 0) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":308
 * 
 *     #: Memory cannot be accessed by any stream on any device
 *     CU_MEM_ATTACH_HOST = ccuda.CUmemAttach_flags_enum.CU_MEM_ATTACH_HOST             # <<<<<<<<<<<<<<
 * 
 *     #: Memory can only be accessed by a single stream on the associated
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAttach_flags_enum(CU_MEM_ATTACH_HOST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ATTACH_HOST, __pyx_t_4) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":312
 *     #: Memory can only be accessed by a single stream on the associated
 *     #: device
 *     CU_MEM_ATTACH_SINGLE = ccuda.CUmemAttach_flags_enum.CU_MEM_ATTACH_SINGLE             # <<<<<<<<<<<<<<
 * 
 * class CUctx_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAttach_flags_enum(CU_MEM_ATTACH_SINGLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ATTACH_SINGLE, __pyx_t_4) < 0) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":299
 *     CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = ccuda.CUipcMem_flags_enum.CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS
 * 
 * class CUmemAttach_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA Mem Attach Flags
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUmemAttach_flags, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmemAttach_flags, __pyx_t_4) < 0) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":314
 *     CU_MEM_ATTACH_SINGLE = ccuda.CUmemAttach_flags_enum.CU_MEM_ATTACH_SINGLE
 * 
 * class CUctx_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Context creation flags
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUctx_flags, __pyx_n_s_CUctx_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Context_creation_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":320
 * 
 *     #: Automatic scheduling
 *     CU_CTX_SCHED_AUTO = ccuda.CUctx_flags_enum.CU_CTX_SCHED_AUTO             # <<<<<<<<<<<<<<
 * 
 *     #: Set spin as default scheduling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUctx_flags_enum(CU_CTX_SCHED_AUTO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CTX_SCHED_AUTO, __pyx_t_4) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":323
 * 
 *     #: Set spin as default scheduling
 *     CU_CTX_SCHED_SPIN = ccuda.CUctx_flags_enum.CU_CTX_SCHED_SPIN             # <<<<<<<<<<<<<<
 * 
 *     #: Set yield as default scheduling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUctx_flags_enum(CU_CTX_SCHED_SPIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CTX_SCHED_SPIN, __pyx_t_4) < 0) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":326
 * 
 *     #: Set yield as default scheduling
 *     CU_CTX_SCHED_YIELD = ccuda.CUctx_flags_enum.CU_CTX_SCHED_YIELD             # <<<<<<<<<<<<<<
 * 
 *     #: Set blocking synchronization as default scheduling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUctx_flags_enum(CU_CTX_SCHED_YIELD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CTX_SCHED_YIELD, __pyx_t_4) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":329
 * 
 *     #: Set blocking synchronization as default scheduling
 *     CU_CTX_SCHED_BLOCKING_SYNC = ccuda.CUctx_flags_enum.CU_CTX_SCHED_BLOCKING_SYNC             # <<<<<<<<<<<<<<
 * 
 *     #: Set blocking synchronization as default scheduling [Deprecated]
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUctx_flags_enum(CU_CTX_SCHED_BLOCKING_SYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CTX_SCHED_BLOCKING_SYNC, __pyx_t_4) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":332
 * 
 *     #: Set blocking synchronization as default scheduling [Deprecated]
 *     CU_CTX_BLOCKING_SYNC = ccuda.CUctx_flags_enum.CU_CTX_BLOCKING_SYNC             # <<<<<<<<<<<<<<
 *     CU_CTX_SCHED_MASK = ccuda.CUctx_flags_enum.CU_CTX_SCHED_MASK
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUctx_flags_enum(CU_CTX_BLOCKING_SYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CTX_BLOCKING_SYNC, __pyx_t_4) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":333
 *     #: Set blocking synchronization as default scheduling [Deprecated]
 *     CU_CTX_BLOCKING_SYNC = ccuda.CUctx_flags_enum.CU_CTX_BLOCKING_SYNC
 *     CU_CTX_SCHED_MASK = ccuda.CUctx_flags_enum.CU_CTX_SCHED_MASK             # <<<<<<<<<<<<<<
 * 
 *     #: [Deprecated]
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUctx_flags_enum(CU_CTX_SCHED_MASK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CTX_SCHED_MASK, __pyx_t_4) < 0) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":336
 * 
 *     #: [Deprecated]
 *     CU_CTX_MAP_HOST = ccuda.CUctx_flags_enum.CU_CTX_MAP_HOST             # <<<<<<<<<<<<<<
 * 
 *     #: Keep local memory allocation after launch
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUctx_flags_enum(CU_CTX_MAP_HOST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CTX_MAP_HOST, __pyx_t_4) < 0) __PYX_ERR(0, 336, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":339
 * 
 *     #: Keep local memory allocation after launch
 *     CU_CTX_LMEM_RESIZE_TO_MAX = ccuda.CUctx_flags_enum.CU_CTX_LMEM_RESIZE_TO_MAX             # <<<<<<<<<<<<<<
 *     CU_CTX_FLAGS_MASK = ccuda.CUctx_flags_enum.CU_CTX_FLAGS_MASK
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUctx_flags_enum(CU_CTX_LMEM_RESIZE_TO_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CTX_LMEM_RESIZE_TO_MAX, __pyx_t_4) < 0) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":340
 *     #: Keep local memory allocation after launch
 *     CU_CTX_LMEM_RESIZE_TO_MAX = ccuda.CUctx_flags_enum.CU_CTX_LMEM_RESIZE_TO_MAX
 *     CU_CTX_FLAGS_MASK = ccuda.CUctx_flags_enum.CU_CTX_FLAGS_MASK             # <<<<<<<<<<<<<<
 * 
 * class CUevent_sched_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUctx_flags_enum(CU_CTX_FLAGS_MASK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CTX_FLAGS_MASK, __pyx_t_4) < 0) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":314
 *     CU_MEM_ATTACH_SINGLE = ccuda.CUmemAttach_flags_enum.CU_MEM_ATTACH_SINGLE
 * 
 * class CUctx_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Context creation flags
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUctx_flags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUctx_flags, __pyx_t_4) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":342
 *     CU_CTX_FLAGS_MASK = ccuda.CUctx_flags_enum.CU_CTX_FLAGS_MASK
 * 
 * class CUevent_sched_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Event sched flags
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUevent_sched_flags, __pyx_n_s_CUevent_sched_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Event_sched_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":348
 * 
 *     #: Automatic scheduling
 *     CU_EVENT_SCHED_AUTO = ccuda.CUevent_sched_flags_enum.CU_EVENT_SCHED_AUTO             # <<<<<<<<<<<<<<
 * 
 *     #: Set spin as default scheduling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUevent_sched_flags_enum(CU_EVENT_SCHED_AUTO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EVENT_SCHED_AUTO, __pyx_t_4) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":351
 * 
 *     #: Set spin as default scheduling
 *     CU_EVENT_SCHED_SPIN = ccuda.CUevent_sched_flags_enum.CU_EVENT_SCHED_SPIN             # <<<<<<<<<<<<<<
 * 
 *     #: Set yield as default scheduling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUevent_sched_flags_enum(CU_EVENT_SCHED_SPIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EVENT_SCHED_SPIN, __pyx_t_4) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":354
 * 
 *     #: Set yield as default scheduling
 *     CU_EVENT_SCHED_YIELD = ccuda.CUevent_sched_flags_enum.CU_EVENT_SCHED_YIELD             # <<<<<<<<<<<<<<
 * 
 *     #: Set blocking synchronization as default scheduling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUevent_sched_flags_enum(CU_EVENT_SCHED_YIELD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EVENT_SCHED_YIELD, __pyx_t_4) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":357
 * 
 *     #: Set blocking synchronization as default scheduling
 *     CU_EVENT_SCHED_BLOCKING_SYNC = ccuda.CUevent_sched_flags_enum.CU_EVENT_SCHED_BLOCKING_SYNC             # <<<<<<<<<<<<<<
 * 
 * class cl_event_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUevent_sched_flags_enum(CU_EVENT_SCHED_BLOCKING_SYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EVENT_SCHED_BLOCKING_SYNC, __pyx_t_4) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":342
 *     CU_CTX_FLAGS_MASK = ccuda.CUctx_flags_enum.CU_CTX_FLAGS_MASK
 * 
 * class CUevent_sched_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Event sched flags
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUevent_sched_flags, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUevent_sched_flags, __pyx_t_4) < 0) __PYX_ERR(0, 342, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":359
 *     CU_EVENT_SCHED_BLOCKING_SYNC = ccuda.CUevent_sched_flags_enum.CU_EVENT_SCHED_BLOCKING_SYNC
 * 
 * class cl_event_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     NVCL event scheduling flags
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_cl_event_flags, __pyx_n_s_cl_event_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_NVCL_event_scheduling_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":365
 * 
 *     #: Automatic scheduling
 *     NVCL_EVENT_SCHED_AUTO = ccuda.cl_event_flags_enum.NVCL_EVENT_SCHED_AUTO             # <<<<<<<<<<<<<<
 * 
 *     #: Set spin as default scheduling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cl_event_flags_enum(NVCL_EVENT_SCHED_AUTO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NVCL_EVENT_SCHED_AUTO, __pyx_t_4) < 0) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":368
 * 
 *     #: Set spin as default scheduling
 *     NVCL_EVENT_SCHED_SPIN = ccuda.cl_event_flags_enum.NVCL_EVENT_SCHED_SPIN             # <<<<<<<<<<<<<<
 * 
 *     #: Set yield as default scheduling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cl_event_flags_enum(NVCL_EVENT_SCHED_SPIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NVCL_EVENT_SCHED_SPIN, __pyx_t_4) < 0) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":371
 * 
 *     #: Set yield as default scheduling
 *     NVCL_EVENT_SCHED_YIELD = ccuda.cl_event_flags_enum.NVCL_EVENT_SCHED_YIELD             # <<<<<<<<<<<<<<
 * 
 *     #: Set blocking synchronization as default scheduling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cl_event_flags_enum(NVCL_EVENT_SCHED_YIELD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NVCL_EVENT_SCHED_YIELD, __pyx_t_4) < 0) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":374
 * 
 *     #: Set blocking synchronization as default scheduling
 *     NVCL_EVENT_SCHED_BLOCKING_SYNC = ccuda.cl_event_flags_enum.NVCL_EVENT_SCHED_BLOCKING_SYNC             # <<<<<<<<<<<<<<
 * 
 * class cl_context_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cl_event_flags_enum(NVCL_EVENT_SCHED_BLOCKING_SYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NVCL_EVENT_SCHED_BLOCKING_SYNC, __pyx_t_4) < 0) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":359
 *     CU_EVENT_SCHED_BLOCKING_SYNC = ccuda.CUevent_sched_flags_enum.CU_EVENT_SCHED_BLOCKING_SYNC
 * 
 * class cl_event_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     NVCL event scheduling flags
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_cl_event_flags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl_event_flags, __pyx_t_4) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":376
 *     NVCL_EVENT_SCHED_BLOCKING_SYNC = ccuda.cl_event_flags_enum.NVCL_EVENT_SCHED_BLOCKING_SYNC
 * 
 * class cl_context_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     NVCL context scheduling flags
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_cl_context_flags, __pyx_n_s_cl_context_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_NVCL_context_scheduling_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":382
 * 
 *     #: Automatic scheduling
 *     NVCL_CTX_SCHED_AUTO = ccuda.cl_context_flags_enum.NVCL_CTX_SCHED_AUTO             # <<<<<<<<<<<<<<
 * 
 *     #: Set spin as default scheduling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cl_context_flags_enum(NVCL_CTX_SCHED_AUTO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NVCL_CTX_SCHED_AUTO, __pyx_t_4) < 0) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":385
 * 
 *     #: Set spin as default scheduling
 *     NVCL_CTX_SCHED_SPIN = ccuda.cl_context_flags_enum.NVCL_CTX_SCHED_SPIN             # <<<<<<<<<<<<<<
 * 
 *     #: Set yield as default scheduling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cl_context_flags_enum(NVCL_CTX_SCHED_SPIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NVCL_CTX_SCHED_SPIN, __pyx_t_4) < 0) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":388
 * 
 *     #: Set yield as default scheduling
 *     NVCL_CTX_SCHED_YIELD = ccuda.cl_context_flags_enum.NVCL_CTX_SCHED_YIELD             # <<<<<<<<<<<<<<
 * 
 *     #: Set blocking synchronization as default scheduling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cl_context_flags_enum(NVCL_CTX_SCHED_YIELD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NVCL_CTX_SCHED_YIELD, __pyx_t_4) < 0) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":391
 * 
 *     #: Set blocking synchronization as default scheduling
 *     NVCL_CTX_SCHED_BLOCKING_SYNC = ccuda.cl_context_flags_enum.NVCL_CTX_SCHED_BLOCKING_SYNC             # <<<<<<<<<<<<<<
 * 
 * class CUstream_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cl_context_flags_enum(NVCL_CTX_SCHED_BLOCKING_SYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NVCL_CTX_SCHED_BLOCKING_SYNC, __pyx_t_4) < 0) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":376
 *     NVCL_EVENT_SCHED_BLOCKING_SYNC = ccuda.cl_event_flags_enum.NVCL_EVENT_SCHED_BLOCKING_SYNC
 * 
 * class cl_context_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     NVCL context scheduling flags
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_cl_context_flags, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl_context_flags, __pyx_t_4) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":393
 *     NVCL_CTX_SCHED_BLOCKING_SYNC = ccuda.cl_context_flags_enum.NVCL_CTX_SCHED_BLOCKING_SYNC
 * 
 * class CUstream_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Stream creation flags
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUstream_flags, __pyx_n_s_CUstream_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Stream_creation_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":399
 * 
 *     #: Default stream flag
 *     CU_STREAM_DEFAULT = ccuda.CUstream_flags_enum.CU_STREAM_DEFAULT             # <<<<<<<<<<<<<<
 * 
 *     #: Stream does not synchronize with stream 0 (the NULL stream)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstream_flags_enum(CU_STREAM_DEFAULT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_DEFAULT, __pyx_t_4) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":402
 * 
 *     #: Stream does not synchronize with stream 0 (the NULL stream)
 *     CU_STREAM_NON_BLOCKING = ccuda.CUstream_flags_enum.CU_STREAM_NON_BLOCKING             # <<<<<<<<<<<<<<
 * 
 * class CUevent_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstream_flags_enum(CU_STREAM_NON_BLOCKING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_NON_BLOCKING, __pyx_t_4) < 0) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":393
 *     NVCL_CTX_SCHED_BLOCKING_SYNC = ccuda.cl_context_flags_enum.NVCL_CTX_SCHED_BLOCKING_SYNC
 * 
 * class CUstream_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Stream creation flags
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUstream_flags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUstream_flags, __pyx_t_4) < 0) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":404
 *     CU_STREAM_NON_BLOCKING = ccuda.CUstream_flags_enum.CU_STREAM_NON_BLOCKING
 * 
 * class CUevent_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Event creation flags
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUevent_flags, __pyx_n_s_CUevent_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Event_creation_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":410
 * 
 *     #: Default event flag
 *     CU_EVENT_DEFAULT = ccuda.CUevent_flags_enum.CU_EVENT_DEFAULT             # <<<<<<<<<<<<<<
 * 
 *     #: Event uses blocking synchronization
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUevent_flags_enum(CU_EVENT_DEFAULT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EVENT_DEFAULT, __pyx_t_4) < 0) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":413
 * 
 *     #: Event uses blocking synchronization
 *     CU_EVENT_BLOCKING_SYNC = ccuda.CUevent_flags_enum.CU_EVENT_BLOCKING_SYNC             # <<<<<<<<<<<<<<
 * 
 *     #: Event will not record timing data
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUevent_flags_enum(CU_EVENT_BLOCKING_SYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EVENT_BLOCKING_SYNC, __pyx_t_4) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":416
 * 
 *     #: Event will not record timing data
 *     CU_EVENT_DISABLE_TIMING = ccuda.CUevent_flags_enum.CU_EVENT_DISABLE_TIMING             # <<<<<<<<<<<<<<
 * 
 *     #: Event is suitable for interprocess use. CU_EVENT_DISABLE_TIMING must
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUevent_flags_enum(CU_EVENT_DISABLE_TIMING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EVENT_DISABLE_TIMING, __pyx_t_4) < 0) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":420
 *     #: Event is suitable for interprocess use. CU_EVENT_DISABLE_TIMING must
 *     #: be set
 *     CU_EVENT_INTERPROCESS = ccuda.CUevent_flags_enum.CU_EVENT_INTERPROCESS             # <<<<<<<<<<<<<<
 * 
 * class CUevent_record_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUevent_flags_enum(CU_EVENT_INTERPROCESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EVENT_INTERPROCESS, __pyx_t_4) < 0) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":404
 *     CU_STREAM_NON_BLOCKING = ccuda.CUstream_flags_enum.CU_STREAM_NON_BLOCKING
 * 
 * class CUevent_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Event creation flags
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUevent_flags, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUevent_flags, __pyx_t_4) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":422
 *     CU_EVENT_INTERPROCESS = ccuda.CUevent_flags_enum.CU_EVENT_INTERPROCESS
 * 
 * class CUevent_record_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Event record flags
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUevent_record_flags, __pyx_n_s_CUevent_record_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Event_record_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":428
 * 
 *     #: Default event record flag
 *     CU_EVENT_RECORD_DEFAULT = ccuda.CUevent_record_flags_enum.CU_EVENT_RECORD_DEFAULT             # <<<<<<<<<<<<<<
 * 
 *     #: When using stream capture, create an event record node instead of
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUevent_record_flags_enum(CU_EVENT_RECORD_DEFAULT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EVENT_RECORD_DEFAULT, __pyx_t_4) < 0) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":433
 *     #: the default behavior. This flag is invalid when used outside of
 *     #: capture.
 *     CU_EVENT_RECORD_EXTERNAL = ccuda.CUevent_record_flags_enum.CU_EVENT_RECORD_EXTERNAL             # <<<<<<<<<<<<<<
 * 
 * class CUevent_wait_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUevent_record_flags_enum(CU_EVENT_RECORD_EXTERNAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EVENT_RECORD_EXTERNAL, __pyx_t_4) < 0) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":422
 *     CU_EVENT_INTERPROCESS = ccuda.CUevent_flags_enum.CU_EVENT_INTERPROCESS
 * 
 * class CUevent_record_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Event record flags
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUevent_record_flags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUevent_record_flags, __pyx_t_4) < 0) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":435
 *     CU_EVENT_RECORD_EXTERNAL = ccuda.CUevent_record_flags_enum.CU_EVENT_RECORD_EXTERNAL
 * 
 * class CUevent_wait_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Event wait flags
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUevent_wait_flags, __pyx_n_s_CUevent_wait_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Event_wait_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":441
 * 
 *     #: Default event wait flag
 *     CU_EVENT_WAIT_DEFAULT = ccuda.CUevent_wait_flags_enum.CU_EVENT_WAIT_DEFAULT             # <<<<<<<<<<<<<<
 * 
 *     #: When using stream capture, create an event wait node instead of the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUevent_wait_flags_enum(CU_EVENT_WAIT_DEFAULT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EVENT_WAIT_DEFAULT, __pyx_t_4) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":445
 *     #: When using stream capture, create an event wait node instead of the
 *     #: default behavior. This flag is invalid when used outside of capture.
 *     CU_EVENT_WAIT_EXTERNAL = ccuda.CUevent_wait_flags_enum.CU_EVENT_WAIT_EXTERNAL             # <<<<<<<<<<<<<<
 * 
 * class CUstreamWaitValue_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUevent_wait_flags_enum(CU_EVENT_WAIT_EXTERNAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EVENT_WAIT_EXTERNAL, __pyx_t_4) < 0) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":435
 *     CU_EVENT_RECORD_EXTERNAL = ccuda.CUevent_record_flags_enum.CU_EVENT_RECORD_EXTERNAL
 * 
 * class CUevent_wait_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Event wait flags
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUevent_wait_flags, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUevent_wait_flags, __pyx_t_4) < 0) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":447
 *     CU_EVENT_WAIT_EXTERNAL = ccuda.CUevent_wait_flags_enum.CU_EVENT_WAIT_EXTERNAL
 * 
 * class CUstreamWaitValue_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for :py:obj:`~.cuStreamWaitValue32` and
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUstreamWaitValue_flags, __pyx_n_s_CUstreamWaitValue_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flags_for_py_obj_cuStreamWaitVa); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":456
 *     #: values). Note this is a cyclic comparison which ignores wraparound.
 *     #: (Default behavior.)
 *     CU_STREAM_WAIT_VALUE_GEQ = ccuda.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_GEQ             # <<<<<<<<<<<<<<
 * 
 *     #: Wait until *addr == value.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamWaitValue_flags_enum(CU_STREAM_WAIT_VALUE_GEQ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_WAIT_VALUE_GEQ, __pyx_t_4) < 0) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":459
 * 
 *     #: Wait until *addr == value.
 *     CU_STREAM_WAIT_VALUE_EQ = ccuda.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_EQ             # <<<<<<<<<<<<<<
 * 
 *     #: Wait until (*addr & value) != 0.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamWaitValue_flags_enum(CU_STREAM_WAIT_VALUE_EQ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_WAIT_VALUE_EQ, __pyx_t_4) < 0) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":462
 * 
 *     #: Wait until (*addr & value) != 0.
 *     CU_STREAM_WAIT_VALUE_AND = ccuda.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_AND             # <<<<<<<<<<<<<<
 * 
 *     #: Wait until ~(*addr | value) != 0. Support for this operation can be
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamWaitValue_flags_enum(CU_STREAM_WAIT_VALUE_AND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_WAIT_VALUE_AND, __pyx_t_4) < 0) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":467
 *     #: queried with :py:obj:`~.cuDeviceGetAttribute()` and
 *     #: :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR`.
 *     CU_STREAM_WAIT_VALUE_NOR = ccuda.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_NOR             # <<<<<<<<<<<<<<
 * 
 *     #: Follow the wait operation with a flush of outstanding remote writes.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamWaitValue_flags_enum(CU_STREAM_WAIT_VALUE_NOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_WAIT_VALUE_NOR, __pyx_t_4) < 0) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":479
 *     #: restricted to selected platforms and can be queried with
 *     #: :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES`.
 *     CU_STREAM_WAIT_VALUE_FLUSH = ccuda.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_FLUSH             # <<<<<<<<<<<<<<
 * 
 * class CUstreamWriteValue_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamWaitValue_flags_enum(CU_STREAM_WAIT_VALUE_FLUSH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_WAIT_VALUE_FLUSH, __pyx_t_4) < 0) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":447
 *     CU_EVENT_WAIT_EXTERNAL = ccuda.CUevent_wait_flags_enum.CU_EVENT_WAIT_EXTERNAL
 * 
 * class CUstreamWaitValue_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for :py:obj:`~.cuStreamWaitValue32` and
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUstreamWaitValue_flags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUstreamWaitValue_flags, __pyx_t_4) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":481
 *     CU_STREAM_WAIT_VALUE_FLUSH = ccuda.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_FLUSH
 * 
 * class CUstreamWriteValue_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for :py:obj:`~.cuStreamWriteValue32`
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUstreamWriteValue_flags, __pyx_n_s_CUstreamWriteValue_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flags_for_py_obj_cuStreamWriteV); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":487
 * 
 *     #: Default behavior
 *     CU_STREAM_WRITE_VALUE_DEFAULT = ccuda.CUstreamWriteValue_flags_enum.CU_STREAM_WRITE_VALUE_DEFAULT             # <<<<<<<<<<<<<<
 * 
 *     #: Permits the write to be reordered with writes which were issued
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamWriteValue_flags_enum(CU_STREAM_WRITE_VALUE_DEFAULT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_WRITE_VALUE_DEFAULT, __pyx_t_4) < 0) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":495
 *     #: is scoped to the stream rather than a CUDA thread. This flag is not
 *     #: supported in the v2 API.
 *     CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = ccuda.CUstreamWriteValue_flags_enum.CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER             # <<<<<<<<<<<<<<
 * 
 * class CUstreamBatchMemOpType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamWriteValue_flags_enum(CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_WRITE_VALUE_NO_MEMORY, __pyx_t_4) < 0) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":481
 *     CU_STREAM_WAIT_VALUE_FLUSH = ccuda.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_FLUSH
 * 
 * class CUstreamWriteValue_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for :py:obj:`~.cuStreamWriteValue32`
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUstreamWriteValue_flags, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUstreamWriteValue_flags, __pyx_t_4) < 0) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":497
 *     CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = ccuda.CUstreamWriteValue_flags_enum.CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER
 * 
 * class CUstreamBatchMemOpType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Operations for :py:obj:`~.cuStreamBatchMemOp`
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUstreamBatchMemOpType, __pyx_n_s_CUstreamBatchMemOpType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Operations_for_py_obj_cuStreamB); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":503
 * 
 *     #: Represents a :py:obj:`~.cuStreamWaitValue32` operation
 *     CU_STREAM_MEM_OP_WAIT_VALUE_32 = ccuda.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WAIT_VALUE_32             # <<<<<<<<<<<<<<
 * 
 *     #: Represents a :py:obj:`~.cuStreamWriteValue32` operation
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum(CU_STREAM_MEM_OP_WAIT_VALUE_32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_MEM_OP_WAIT_VALUE_32, __pyx_t_4) < 0) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":506
 * 
 *     #: Represents a :py:obj:`~.cuStreamWriteValue32` operation
 *     CU_STREAM_MEM_OP_WRITE_VALUE_32 = ccuda.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WRITE_VALUE_32             # <<<<<<<<<<<<<<
 * 
 *     #: Represents a :py:obj:`~.cuStreamWaitValue64` operation
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum(CU_STREAM_MEM_OP_WRITE_VALUE_32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_MEM_OP_WRITE_VALUE_32, __pyx_t_4) < 0) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":509
 * 
 *     #: Represents a :py:obj:`~.cuStreamWaitValue64` operation
 *     CU_STREAM_MEM_OP_WAIT_VALUE_64 = ccuda.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WAIT_VALUE_64             # <<<<<<<<<<<<<<
 * 
 *     #: Represents a :py:obj:`~.cuStreamWriteValue64` operation
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum(CU_STREAM_MEM_OP_WAIT_VALUE_64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_MEM_OP_WAIT_VALUE_64, __pyx_t_4) < 0) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":512
 * 
 *     #: Represents a :py:obj:`~.cuStreamWriteValue64` operation
 *     CU_STREAM_MEM_OP_WRITE_VALUE_64 = ccuda.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WRITE_VALUE_64             # <<<<<<<<<<<<<<
 * 
 *     #: Insert a memory barrier of the specified type
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum(CU_STREAM_MEM_OP_WRITE_VALUE_64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_MEM_OP_WRITE_VALUE_64, __pyx_t_4) < 0) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":515
 * 
 *     #: Insert a memory barrier of the specified type
 *     CU_STREAM_MEM_OP_BARRIER = ccuda.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_BARRIER             # <<<<<<<<<<<<<<
 * 
 *     #: This has the same effect as :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH`,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum(CU_STREAM_MEM_OP_BARRIER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_MEM_OP_BARRIER, __pyx_t_4) < 0) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":519
 *     #: This has the same effect as :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH`,
 *     #: but as a standalone operation.
 *     CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = ccuda.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES             # <<<<<<<<<<<<<<
 * 
 * class CUstreamMemoryBarrier_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum(CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_MEM_OP_FLUSH_REMOTE_WR, __pyx_t_4) < 0) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":497
 *     CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = ccuda.CUstreamWriteValue_flags_enum.CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER
 * 
 * class CUstreamBatchMemOpType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Operations for :py:obj:`~.cuStreamBatchMemOp`
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUstreamBatchMemOpType, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUstreamBatchMemOpType, __pyx_t_4) < 0) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":521
 *     CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = ccuda.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES
 * 
 * class CUstreamMemoryBarrier_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for :py:obj:`~.cuStreamMemoryBarrier`
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUstreamMemoryBarrier_flags, __pyx_n_s_CUstreamMemoryBarrier_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flags_for_py_obj_cuStreamMemory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":527
 * 
 *     #: System-wide memory barrier.
 *     CU_STREAM_MEMORY_BARRIER_TYPE_SYS = ccuda.CUstreamMemoryBarrier_flags_enum.CU_STREAM_MEMORY_BARRIER_TYPE_SYS             # <<<<<<<<<<<<<<
 * 
 *     #: Limit memory barrier scope to the GPU.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamMemoryBarrier_flags_enum(CU_STREAM_MEMORY_BARRIER_TYPE_SYS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_MEMORY_BARRIER_TYPE_SY, __pyx_t_4) < 0) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":530
 * 
 *     #: Limit memory barrier scope to the GPU.
 *     CU_STREAM_MEMORY_BARRIER_TYPE_GPU = ccuda.CUstreamMemoryBarrier_flags_enum.CU_STREAM_MEMORY_BARRIER_TYPE_GPU             # <<<<<<<<<<<<<<
 * 
 * class CUoccupancy_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamMemoryBarrier_flags_enum(CU_STREAM_MEMORY_BARRIER_TYPE_GPU); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_MEMORY_BARRIER_TYPE_GP, __pyx_t_4) < 0) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":521
 *     CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = ccuda.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES
 * 
 * class CUstreamMemoryBarrier_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for :py:obj:`~.cuStreamMemoryBarrier`
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUstreamMemoryBarrier_flags, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUstreamMemoryBarrier_flags, __pyx_t_4) < 0) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":532
 *     CU_STREAM_MEMORY_BARRIER_TYPE_GPU = ccuda.CUstreamMemoryBarrier_flags_enum.CU_STREAM_MEMORY_BARRIER_TYPE_GPU
 * 
 * class CUoccupancy_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Occupancy calculator flag
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUoccupancy_flags, __pyx_n_s_CUoccupancy_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Occupancy_calculator_flag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":538
 * 
 *     #: Default behavior
 *     CU_OCCUPANCY_DEFAULT = ccuda.CUoccupancy_flags_enum.CU_OCCUPANCY_DEFAULT             # <<<<<<<<<<<<<<
 * 
 *     #: Assume global caching is enabled and cannot be automatically turned
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUoccupancy_flags_enum(CU_OCCUPANCY_DEFAULT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_OCCUPANCY_DEFAULT, __pyx_t_4) < 0) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":542
 *     #: Assume global caching is enabled and cannot be automatically turned
 *     #: off
 *     CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = ccuda.CUoccupancy_flags_enum.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE             # <<<<<<<<<<<<<<
 * 
 * class CUstreamUpdateCaptureDependencies_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUoccupancy_flags_enum(CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_OCCUPANCY_DISABLE_CACHING_OVE, __pyx_t_4) < 0) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":532
 *     CU_STREAM_MEMORY_BARRIER_TYPE_GPU = ccuda.CUstreamMemoryBarrier_flags_enum.CU_STREAM_MEMORY_BARRIER_TYPE_GPU
 * 
 * class CUoccupancy_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Occupancy calculator flag
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUoccupancy_flags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUoccupancy_flags, __pyx_t_4) < 0) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":544
 *     CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = ccuda.CUoccupancy_flags_enum.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE
 * 
 * class CUstreamUpdateCaptureDependencies_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for :py:obj:`~.cuStreamUpdateCaptureDependencies`
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUstreamUpdateCaptureDependencie, __pyx_n_s_CUstreamUpdateCaptureDependencie, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flags_for_py_obj_cuStreamUpdate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":550
 * 
 *     #: Add new nodes to the dependency set
 *     CU_STREAM_ADD_CAPTURE_DEPENDENCIES = ccuda.CUstreamUpdateCaptureDependencies_flags_enum.CU_STREAM_ADD_CAPTURE_DEPENDENCIES             # <<<<<<<<<<<<<<
 * 
 *     #: Replace the dependency set with the new nodes
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamUpdateCaptureDependencies_flags_enum(CU_STREAM_ADD_CAPTURE_DEPENDENCIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_ADD_CAPTURE_DEPENDENCI, __pyx_t_4) < 0) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":553
 * 
 *     #: Replace the dependency set with the new nodes
 *     CU_STREAM_SET_CAPTURE_DEPENDENCIES = ccuda.CUstreamUpdateCaptureDependencies_flags_enum.CU_STREAM_SET_CAPTURE_DEPENDENCIES             # <<<<<<<<<<<<<<
 * 
 * class CUarray_format(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamUpdateCaptureDependencies_flags_enum(CU_STREAM_SET_CAPTURE_DEPENDENCIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_SET_CAPTURE_DEPENDENCI, __pyx_t_4) < 0) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":544
 *     CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = ccuda.CUoccupancy_flags_enum.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE
 * 
 * class CUstreamUpdateCaptureDependencies_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for :py:obj:`~.cuStreamUpdateCaptureDependencies`
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUstreamUpdateCaptureDependencie, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUstreamUpdateCaptureDependencie, __pyx_t_4) < 0) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":555
 *     CU_STREAM_SET_CAPTURE_DEPENDENCIES = ccuda.CUstreamUpdateCaptureDependencies_flags_enum.CU_STREAM_SET_CAPTURE_DEPENDENCIES
 * 
 * class CUarray_format(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Array formats
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUarray_format, __pyx_n_s_CUarray_format, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Array_formats); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":561
 * 
 *     #: Unsigned 8-bit integers
 *     CU_AD_FORMAT_UNSIGNED_INT8 = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8             # <<<<<<<<<<<<<<
 * 
 *     #: Unsigned 16-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_UNSIGNED_INT8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_UNSIGNED_INT8, __pyx_t_4) < 0) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":564
 * 
 *     #: Unsigned 16-bit integers
 *     CU_AD_FORMAT_UNSIGNED_INT16 = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16             # <<<<<<<<<<<<<<
 * 
 *     #: Unsigned 32-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_UNSIGNED_INT16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_UNSIGNED_INT16, __pyx_t_4) < 0) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":567
 * 
 *     #: Unsigned 32-bit integers
 *     CU_AD_FORMAT_UNSIGNED_INT32 = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32             # <<<<<<<<<<<<<<
 * 
 *     #: Signed 8-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_UNSIGNED_INT32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_UNSIGNED_INT32, __pyx_t_4) < 0) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":570
 * 
 *     #: Signed 8-bit integers
 *     CU_AD_FORMAT_SIGNED_INT8 = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8             # <<<<<<<<<<<<<<
 * 
 *     #: Signed 16-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_SIGNED_INT8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_SIGNED_INT8, __pyx_t_4) < 0) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":573
 * 
 *     #: Signed 16-bit integers
 *     CU_AD_FORMAT_SIGNED_INT16 = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16             # <<<<<<<<<<<<<<
 * 
 *     #: Signed 32-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_SIGNED_INT16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_SIGNED_INT16, __pyx_t_4) < 0) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":576
 * 
 *     #: Signed 32-bit integers
 *     CU_AD_FORMAT_SIGNED_INT32 = ccuda.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32             # <<<<<<<<<<<<<<
 * 
 *     #: 16-bit floating point
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_SIGNED_INT32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_SIGNED_INT32, __pyx_t_4) < 0) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":579
 * 
 *     #: 16-bit floating point
 *     CU_AD_FORMAT_HALF = ccuda.CUarray_format_enum.CU_AD_FORMAT_HALF             # <<<<<<<<<<<<<<
 * 
 *     #: 32-bit floating point
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_HALF); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_HALF, __pyx_t_4) < 0) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":582
 * 
 *     #: 32-bit floating point
 *     CU_AD_FORMAT_FLOAT = ccuda.CUarray_format_enum.CU_AD_FORMAT_FLOAT             # <<<<<<<<<<<<<<
 * 
 *     #: 8-bit YUV planar format, with 4:2:0 sampling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_FLOAT, __pyx_t_4) < 0) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":585
 * 
 *     #: 8-bit YUV planar format, with 4:2:0 sampling
 *     CU_AD_FORMAT_NV12 = ccuda.CUarray_format_enum.CU_AD_FORMAT_NV12             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel unsigned 8-bit normalized integer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_NV12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_NV12, __pyx_t_4) < 0) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":588
 * 
 *     #: 1 channel unsigned 8-bit normalized integer
 *     CU_AD_FORMAT_UNORM_INT8X1 = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X1             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel unsigned 8-bit normalized integer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_UNORM_INT8X1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_UNORM_INT8X1, __pyx_t_4) < 0) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":591
 * 
 *     #: 2 channel unsigned 8-bit normalized integer
 *     CU_AD_FORMAT_UNORM_INT8X2 = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X2             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned 8-bit normalized integer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_UNORM_INT8X2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_UNORM_INT8X2, __pyx_t_4) < 0) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":594
 * 
 *     #: 4 channel unsigned 8-bit normalized integer
 *     CU_AD_FORMAT_UNORM_INT8X4 = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X4             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel unsigned 16-bit normalized integer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_UNORM_INT8X4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_UNORM_INT8X4, __pyx_t_4) < 0) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":597
 * 
 *     #: 1 channel unsigned 16-bit normalized integer
 *     CU_AD_FORMAT_UNORM_INT16X1 = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X1             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel unsigned 16-bit normalized integer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_UNORM_INT16X1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_UNORM_INT16X1, __pyx_t_4) < 0) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":600
 * 
 *     #: 2 channel unsigned 16-bit normalized integer
 *     CU_AD_FORMAT_UNORM_INT16X2 = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X2             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned 16-bit normalized integer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_UNORM_INT16X2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_UNORM_INT16X2, __pyx_t_4) < 0) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":603
 * 
 *     #: 4 channel unsigned 16-bit normalized integer
 *     CU_AD_FORMAT_UNORM_INT16X4 = ccuda.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X4             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel signed 8-bit normalized integer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_UNORM_INT16X4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_UNORM_INT16X4, __pyx_t_4) < 0) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":606
 * 
 *     #: 1 channel signed 8-bit normalized integer
 *     CU_AD_FORMAT_SNORM_INT8X1 = ccuda.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X1             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel signed 8-bit normalized integer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_SNORM_INT8X1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_SNORM_INT8X1, __pyx_t_4) < 0) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":609
 * 
 *     #: 2 channel signed 8-bit normalized integer
 *     CU_AD_FORMAT_SNORM_INT8X2 = ccuda.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X2             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel signed 8-bit normalized integer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_SNORM_INT8X2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_SNORM_INT8X2, __pyx_t_4) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":612
 * 
 *     #: 4 channel signed 8-bit normalized integer
 *     CU_AD_FORMAT_SNORM_INT8X4 = ccuda.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X4             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel signed 16-bit normalized integer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_SNORM_INT8X4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_SNORM_INT8X4, __pyx_t_4) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":615
 * 
 *     #: 1 channel signed 16-bit normalized integer
 *     CU_AD_FORMAT_SNORM_INT16X1 = ccuda.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X1             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel signed 16-bit normalized integer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_SNORM_INT16X1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_SNORM_INT16X1, __pyx_t_4) < 0) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":618
 * 
 *     #: 2 channel signed 16-bit normalized integer
 *     CU_AD_FORMAT_SNORM_INT16X2 = ccuda.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X2             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel signed 16-bit normalized integer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_SNORM_INT16X2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_SNORM_INT16X2, __pyx_t_4) < 0) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":621
 * 
 *     #: 4 channel signed 16-bit normalized integer
 *     CU_AD_FORMAT_SNORM_INT16X4 = ccuda.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X4             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned normalized block-compressed (BC1 compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_SNORM_INT16X4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_SNORM_INT16X4, __pyx_t_4) < 0) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":625
 *     #: 4 channel unsigned normalized block-compressed (BC1 compression)
 *     #: format
 *     CU_AD_FORMAT_BC1_UNORM = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned normalized block-compressed (BC1 compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC1_UNORM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC1_UNORM, __pyx_t_4) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":629
 *     #: 4 channel unsigned normalized block-compressed (BC1 compression)
 *     #: format with sRGB encoding
 *     CU_AD_FORMAT_BC1_UNORM_SRGB = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned normalized block-compressed (BC2 compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC1_UNORM_SRGB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC1_UNORM_SRGB, __pyx_t_4) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":633
 *     #: 4 channel unsigned normalized block-compressed (BC2 compression)
 *     #: format
 *     CU_AD_FORMAT_BC2_UNORM = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned normalized block-compressed (BC2 compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC2_UNORM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC2_UNORM, __pyx_t_4) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":637
 *     #: 4 channel unsigned normalized block-compressed (BC2 compression)
 *     #: format with sRGB encoding
 *     CU_AD_FORMAT_BC2_UNORM_SRGB = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned normalized block-compressed (BC3 compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC2_UNORM_SRGB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC2_UNORM_SRGB, __pyx_t_4) < 0) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":641
 *     #: 4 channel unsigned normalized block-compressed (BC3 compression)
 *     #: format
 *     CU_AD_FORMAT_BC3_UNORM = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned normalized block-compressed (BC3 compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC3_UNORM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC3_UNORM, __pyx_t_4) < 0) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":645
 *     #: 4 channel unsigned normalized block-compressed (BC3 compression)
 *     #: format with sRGB encoding
 *     CU_AD_FORMAT_BC3_UNORM_SRGB = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel unsigned normalized block-compressed (BC4 compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC3_UNORM_SRGB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC3_UNORM_SRGB, __pyx_t_4) < 0) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":649
 *     #: 1 channel unsigned normalized block-compressed (BC4 compression)
 *     #: format
 *     CU_AD_FORMAT_BC4_UNORM = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel signed normalized block-compressed (BC4 compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC4_UNORM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC4_UNORM, __pyx_t_4) < 0) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":653
 *     #: 1 channel signed normalized block-compressed (BC4 compression)
 *     #: format
 *     CU_AD_FORMAT_BC4_SNORM = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel unsigned normalized block-compressed (BC5 compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC4_SNORM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC4_SNORM, __pyx_t_4) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":657
 *     #: 2 channel unsigned normalized block-compressed (BC5 compression)
 *     #: format
 *     CU_AD_FORMAT_BC5_UNORM = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel signed normalized block-compressed (BC5 compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC5_UNORM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC5_UNORM, __pyx_t_4) < 0) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":661
 *     #: 2 channel signed normalized block-compressed (BC5 compression)
 *     #: format
 *     CU_AD_FORMAT_BC5_SNORM = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM             # <<<<<<<<<<<<<<
 * 
 *     #: 3 channel unsigned half-float block-compressed (BC6H compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC5_SNORM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC5_SNORM, __pyx_t_4) < 0) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":665
 *     #: 3 channel unsigned half-float block-compressed (BC6H compression)
 *     #: format
 *     CU_AD_FORMAT_BC6H_UF16 = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16             # <<<<<<<<<<<<<<
 * 
 *     #: 3 channel signed half-float block-compressed (BC6H compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC6H_UF16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC6H_UF16, __pyx_t_4) < 0) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":669
 *     #: 3 channel signed half-float block-compressed (BC6H compression)
 *     #: format
 *     CU_AD_FORMAT_BC6H_SF16 = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned normalized block-compressed (BC7 compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC6H_SF16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC6H_SF16, __pyx_t_4) < 0) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":673
 *     #: 4 channel unsigned normalized block-compressed (BC7 compression)
 *     #: format
 *     CU_AD_FORMAT_BC7_UNORM = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned normalized block-compressed (BC7 compression)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC7_UNORM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC7_UNORM, __pyx_t_4) < 0) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":677
 *     #: 4 channel unsigned normalized block-compressed (BC7 compression)
 *     #: format with sRGB encoding
 *     CU_AD_FORMAT_BC7_UNORM_SRGB = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB             # <<<<<<<<<<<<<<
 * 
 * class CUaddress_mode(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_format_enum(CU_AD_FORMAT_BC7_UNORM_SRGB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_AD_FORMAT_BC7_UNORM_SRGB, __pyx_t_4) < 0) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":555
 *     CU_STREAM_SET_CAPTURE_DEPENDENCIES = ccuda.CUstreamUpdateCaptureDependencies_flags_enum.CU_STREAM_SET_CAPTURE_DEPENDENCIES
 * 
 * class CUarray_format(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Array formats
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUarray_format, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUarray_format, __pyx_t_4) < 0) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":679
 *     CU_AD_FORMAT_BC7_UNORM_SRGB = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB
 * 
 * class CUaddress_mode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Texture reference addressing modes
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUaddress_mode, __pyx_n_s_CUaddress_mode, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Texture_reference_addressing_mo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":685
 * 
 *     #: Wrapping address mode
 *     CU_TR_ADDRESS_MODE_WRAP = ccuda.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_WRAP             # <<<<<<<<<<<<<<
 * 
 *     #: Clamp to edge address mode
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUaddress_mode_enum(CU_TR_ADDRESS_MODE_WRAP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TR_ADDRESS_MODE_WRAP, __pyx_t_4) < 0) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":688
 * 
 *     #: Clamp to edge address mode
 *     CU_TR_ADDRESS_MODE_CLAMP = ccuda.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_CLAMP             # <<<<<<<<<<<<<<
 * 
 *     #: Mirror address mode
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUaddress_mode_enum(CU_TR_ADDRESS_MODE_CLAMP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TR_ADDRESS_MODE_CLAMP, __pyx_t_4) < 0) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":691
 * 
 *     #: Mirror address mode
 *     CU_TR_ADDRESS_MODE_MIRROR = ccuda.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_MIRROR             # <<<<<<<<<<<<<<
 * 
 *     #: Border address mode
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUaddress_mode_enum(CU_TR_ADDRESS_MODE_MIRROR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TR_ADDRESS_MODE_MIRROR, __pyx_t_4) < 0) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":694
 * 
 *     #: Border address mode
 *     CU_TR_ADDRESS_MODE_BORDER = ccuda.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_BORDER             # <<<<<<<<<<<<<<
 * 
 * class CUfilter_mode(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUaddress_mode_enum(CU_TR_ADDRESS_MODE_BORDER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TR_ADDRESS_MODE_BORDER, __pyx_t_4) < 0) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":679
 *     CU_AD_FORMAT_BC7_UNORM_SRGB = ccuda.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB
 * 
 * class CUaddress_mode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Texture reference addressing modes
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUaddress_mode, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUaddress_mode, __pyx_t_4) < 0) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":696
 *     CU_TR_ADDRESS_MODE_BORDER = ccuda.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_BORDER
 * 
 * class CUfilter_mode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Texture reference filtering modes
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUfilter_mode, __pyx_n_s_CUfilter_mode, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Texture_reference_filtering_mod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":702
 * 
 *     #: Point filter mode
 *     CU_TR_FILTER_MODE_POINT = ccuda.CUfilter_mode_enum.CU_TR_FILTER_MODE_POINT             # <<<<<<<<<<<<<<
 * 
 *     #: Linear filter mode
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfilter_mode_enum(CU_TR_FILTER_MODE_POINT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TR_FILTER_MODE_POINT, __pyx_t_4) < 0) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":705
 * 
 *     #: Linear filter mode
 *     CU_TR_FILTER_MODE_LINEAR = ccuda.CUfilter_mode_enum.CU_TR_FILTER_MODE_LINEAR             # <<<<<<<<<<<<<<
 * 
 * class CUdevice_attribute(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfilter_mode_enum(CU_TR_FILTER_MODE_LINEAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TR_FILTER_MODE_LINEAR, __pyx_t_4) < 0) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":696
 *     CU_TR_ADDRESS_MODE_BORDER = ccuda.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_BORDER
 * 
 * class CUfilter_mode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Texture reference filtering modes
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUfilter_mode, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUfilter_mode, __pyx_t_4) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":707
 *     CU_TR_FILTER_MODE_LINEAR = ccuda.CUfilter_mode_enum.CU_TR_FILTER_MODE_LINEAR
 * 
 * class CUdevice_attribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Device properties
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUdevice_attribute, __pyx_n_s_CUdevice_attribute, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Device_properties); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":713
 * 
 *     #: Maximum number of threads per block
 *     CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum block dimension X
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_THREADS, __pyx_t_4) < 0) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":716
 * 
 *     #: Maximum block dimension X
 *     CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum block dimension Y
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI, __pyx_t_4) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":719
 * 
 *     #: Maximum block dimension Y
 *     CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum block dimension Z
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI_2, __pyx_t_4) < 0) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":722
 * 
 *     #: Maximum block dimension Z
 *     CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum grid dimension X
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DI_3, __pyx_t_4) < 0) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":725
 * 
 *     #: Maximum grid dimension X
 *     CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum grid dimension Y
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM, __pyx_t_4) < 0) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":728
 * 
 *     #: Maximum grid dimension Y
 *     CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum grid dimension Z
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_2, __pyx_t_4) < 0) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":731
 * 
 *     #: Maximum grid dimension Z
 *     CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum shared memory available per block in bytes
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_3, __pyx_t_4) < 0) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":734
 * 
 *     #: Maximum shared memory available per block in bytes
 *     CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK             # <<<<<<<<<<<<<<
 * 
 *     #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M, __pyx_t_4) < 0) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":737
 * 
 *     #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK
 *     CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK             # <<<<<<<<<<<<<<
 * 
 *     #: Memory available on device for constant variables in a CUDA C kernel
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_SHARED_MEMOR, __pyx_t_4) < 0) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":741
 *     #: Memory available on device for constant variables in a CUDA C kernel
 *     #: in bytes
 *     CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY             # <<<<<<<<<<<<<<
 * 
 *     #: Warp size in threads
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_TOTAL_CONSTA, __pyx_t_4) < 0) __PYX_ERR(0, 741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":744
 * 
 *     #: Warp size in threads
 *     CU_DEVICE_ATTRIBUTE_WARP_SIZE = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_WARP_SIZE             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum pitch in bytes allowed by memory copies
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_WARP_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_WARP_SIZE, __pyx_t_4) < 0) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":747
 * 
 *     #: Maximum pitch in bytes allowed by memory copies
 *     CU_DEVICE_ATTRIBUTE_MAX_PITCH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_PITCH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum number of 32-bit registers available per block
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_PITCH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_PITCH, __pyx_t_4) < 0) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":750
 * 
 *     #: Maximum number of 32-bit registers available per block
 *     CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK             # <<<<<<<<<<<<<<
 * 
 *     #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_REGISTER, __pyx_t_4) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":753
 * 
 *     #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK
 *     CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK             # <<<<<<<<<<<<<<
 * 
 *     #: Typical clock frequency in kilohertz
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_REGISTERS_PE, __pyx_t_4) < 0) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":756
 * 
 *     #: Typical clock frequency in kilohertz
 *     CU_DEVICE_ATTRIBUTE_CLOCK_RATE = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CLOCK_RATE             # <<<<<<<<<<<<<<
 * 
 *     #: Alignment requirement for textures
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CLOCK_RATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CLOCK_RATE, __pyx_t_4) < 0) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":759
 * 
 *     #: Alignment requirement for textures
 *     CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT             # <<<<<<<<<<<<<<
 * 
 *     #: Device can possibly copy memory and execute a kernel concurrently.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_TEXTURE_ALIG, __pyx_t_4) < 0) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":763
 *     #: Device can possibly copy memory and execute a kernel concurrently.
 *     #: Deprecated. Use instead CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT.
 *     CU_DEVICE_ATTRIBUTE_GPU_OVERLAP = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_OVERLAP             # <<<<<<<<<<<<<<
 * 
 *     #: Number of multiprocessors on device
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_GPU_OVERLAP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, __pyx_t_4) < 0) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":766
 * 
 *     #: Number of multiprocessors on device
 *     CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT             # <<<<<<<<<<<<<<
 * 
 *     #: Specifies whether there is a run time limit on kernels
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MULTIPROCESS, __pyx_t_4) < 0) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":769
 * 
 *     #: Specifies whether there is a run time limit on kernels
 *     CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT             # <<<<<<<<<<<<<<
 * 
 *     #: Device is integrated with host memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_KERNEL_EXEC, __pyx_t_4) < 0) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":772
 * 
 *     #: Device is integrated with host memory
 *     CU_DEVICE_ATTRIBUTE_INTEGRATED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_INTEGRATED             # <<<<<<<<<<<<<<
 * 
 *     #: Device can map host memory into CUDA address space
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_INTEGRATED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_INTEGRATED, __pyx_t_4) < 0) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":775
 * 
 *     #: Device can map host memory into CUDA address space
 *     CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY             # <<<<<<<<<<<<<<
 * 
 *     #: Compute mode (See :py:obj:`~.CUcomputemode` for details)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST, __pyx_t_4) < 0) __PYX_ERR(0, 775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":778
 * 
 *     #: Compute mode (See :py:obj:`~.CUcomputemode` for details)
 *     CU_DEVICE_ATTRIBUTE_COMPUTE_MODE = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 1D texture width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_COMPUTE_MODE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_COMPUTE_MODE, __pyx_t_4) < 0) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":781
 * 
 *     #: Maximum 1D texture width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D texture width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT, __pyx_t_4) < 0) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":784
 * 
 *     #: Maximum 2D texture width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D texture height
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_2, __pyx_t_4) < 0) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":787
 * 
 *     #: Maximum 2D texture height
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 3D texture width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_3, __pyx_t_4) < 0) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":790
 * 
 *     #: Maximum 3D texture width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 3D texture height
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_4, __pyx_t_4) < 0) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":793
 * 
 *     #: Maximum 3D texture height
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 3D texture depth
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_5, __pyx_t_4) < 0) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":796
 * 
 *     #: Maximum 3D texture depth
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D layered texture width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_6, __pyx_t_4) < 0) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":799
 * 
 *     #: Maximum 2D layered texture width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D layered texture height
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_7, __pyx_t_4) < 0) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":802
 * 
 *     #: Maximum 2D layered texture height
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum layers in a 2D layered texture
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_8, __pyx_t_4) < 0) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":805
 * 
 *     #: Maximum layers in a 2D layered texture
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS             # <<<<<<<<<<<<<<
 * 
 *     #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_9, __pyx_t_4) < 0) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":808
 * 
 *     #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_10, __pyx_t_4) < 0) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":811
 * 
 *     #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT             # <<<<<<<<<<<<<<
 * 
 *     #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_11, __pyx_t_4) < 0) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":814
 * 
 *     #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES             # <<<<<<<<<<<<<<
 * 
 *     #: Alignment requirement for surfaces
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_12, __pyx_t_4) < 0) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":817
 * 
 *     #: Alignment requirement for surfaces
 *     CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT             # <<<<<<<<<<<<<<
 * 
 *     #: Device can possibly execute multiple kernels concurrently
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_SURFACE_ALIG, __pyx_t_4) < 0) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":820
 * 
 *     #: Device can possibly execute multiple kernels concurrently
 *     CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS             # <<<<<<<<<<<<<<
 * 
 *     #: Device has ECC support enabled
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CONCURRENT_K, __pyx_t_4) < 0) __PYX_ERR(0, 820, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":823
 * 
 *     #: Device has ECC support enabled
 *     CU_DEVICE_ATTRIBUTE_ECC_ENABLED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_ECC_ENABLED             # <<<<<<<<<<<<<<
 * 
 *     #: PCI bus ID of the device
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_ECC_ENABLED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_ECC_ENABLED, __pyx_t_4) < 0) __PYX_ERR(0, 823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":826
 * 
 *     #: PCI bus ID of the device
 *     CU_DEVICE_ATTRIBUTE_PCI_BUS_ID = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PCI_BUS_ID             # <<<<<<<<<<<<<<
 * 
 *     #: PCI device ID of the device
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_PCI_BUS_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, __pyx_t_4) < 0) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":829
 * 
 *     #: PCI device ID of the device
 *     CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID             # <<<<<<<<<<<<<<
 * 
 *     #: Device is using TCC driver model
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_PCI_DEVICE_I, __pyx_t_4) < 0) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":832
 * 
 *     #: Device is using TCC driver model
 *     CU_DEVICE_ATTRIBUTE_TCC_DRIVER = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TCC_DRIVER             # <<<<<<<<<<<<<<
 * 
 *     #: Peak memory clock frequency in kilohertz
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_TCC_DRIVER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_TCC_DRIVER, __pyx_t_4) < 0) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":835
 * 
 *     #: Peak memory clock frequency in kilohertz
 *     CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE             # <<<<<<<<<<<<<<
 * 
 *     #: Global memory bus width in bits
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK, __pyx_t_4) < 0) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":838
 * 
 *     #: Global memory bus width in bits
 *     CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Size of L2 cache in bytes
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_GLOBAL_MEMOR, __pyx_t_4) < 0) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":841
 * 
 *     #: Size of L2 cache in bytes
 *     CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum resident threads per multiprocessor
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZ, __pyx_t_4) < 0) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":844
 * 
 *     #: Maximum resident threads per multiprocessor
 *     CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR             # <<<<<<<<<<<<<<
 * 
 *     #: Number of asynchronous engines
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_THREADS_2, __pyx_t_4) < 0) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":847
 * 
 *     #: Number of asynchronous engines
 *     CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT             # <<<<<<<<<<<<<<
 * 
 *     #: Device shares a unified address space with the host
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE, __pyx_t_4) < 0) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":850
 * 
 *     #: Device shares a unified address space with the host
 *     CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 1D layered texture width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_UNIFIED_ADDR, __pyx_t_4) < 0) __PYX_ERR(0, 850, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":853
 * 
 *     #: Maximum 1D layered texture width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum layers in a 1D layered texture
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_13, __pyx_t_4) < 0) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":856
 * 
 *     #: Maximum layers in a 1D layered texture
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS             # <<<<<<<<<<<<<<
 * 
 *     #: Deprecated, do not use.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_14, __pyx_t_4) < 0) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":859
 * 
 *     #: Deprecated, do not use.
 *     CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GA, __pyx_t_4) < 0) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":862
 * 
 *     #: Maximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_15, __pyx_t_4) < 0) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":865
 * 
 *     #: Maximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT             # <<<<<<<<<<<<<<
 * 
 *     #: Alternate maximum 3D texture width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_16, __pyx_t_4) < 0) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":868
 * 
 *     #: Alternate maximum 3D texture width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE             # <<<<<<<<<<<<<<
 * 
 *     #: Alternate maximum 3D texture height
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_17, __pyx_t_4) < 0) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":871
 * 
 *     #: Alternate maximum 3D texture height
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE             # <<<<<<<<<<<<<<
 * 
 *     #: Alternate maximum 3D texture depth
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_18, __pyx_t_4) < 0) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":874
 * 
 *     #: Alternate maximum 3D texture depth
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE             # <<<<<<<<<<<<<<
 * 
 *     #: PCI domain ID of the device
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_19, __pyx_t_4) < 0) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":877
 * 
 *     #: PCI domain ID of the device
 *     CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID             # <<<<<<<<<<<<<<
 * 
 *     #: Pitch alignment requirement for textures
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_I, __pyx_t_4) < 0) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":880
 * 
 *     #: Pitch alignment requirement for textures
 *     CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum cubemap texture width/height
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_TEXTURE_PITC, __pyx_t_4) < 0) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":883
 * 
 *     #: Maximum cubemap texture width/height
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum cubemap layered texture width/height
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_20, __pyx_t_4) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":886
 * 
 *     #: Maximum cubemap layered texture width/height
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum layers in a cubemap layered texture
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_21, __pyx_t_4) < 0) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":889
 * 
 *     #: Maximum layers in a cubemap layered texture
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 1D surface width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_22, __pyx_t_4) < 0) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":892
 * 
 *     #: Maximum 1D surface width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D surface width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF, __pyx_t_4) < 0) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":895
 * 
 *     #: Maximum 2D surface width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D surface height
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_2, __pyx_t_4) < 0) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":898
 * 
 *     #: Maximum 2D surface height
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 3D surface width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_3, __pyx_t_4) < 0) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":901
 * 
 *     #: Maximum 3D surface width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 3D surface height
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_4, __pyx_t_4) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":904
 * 
 *     #: Maximum 3D surface height
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 3D surface depth
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_5, __pyx_t_4) < 0) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":907
 * 
 *     #: Maximum 3D surface depth
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 1D layered surface width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_6, __pyx_t_4) < 0) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":910
 * 
 *     #: Maximum 1D layered surface width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum layers in a 1D layered surface
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_7, __pyx_t_4) < 0) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":913
 * 
 *     #: Maximum layers in a 1D layered surface
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D layered surface width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_8, __pyx_t_4) < 0) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":916
 * 
 *     #: Maximum 2D layered surface width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D layered surface height
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_9, __pyx_t_4) < 0) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":919
 * 
 *     #: Maximum 2D layered surface height
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum layers in a 2D layered surface
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_10, __pyx_t_4) < 0) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":922
 * 
 *     #: Maximum layers in a 2D layered surface
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum cubemap surface width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_11, __pyx_t_4) < 0) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":925
 * 
 *     #: Maximum cubemap surface width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum cubemap layered surface width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_12, __pyx_t_4) < 0) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":928
 * 
 *     #: Maximum cubemap layered surface width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum layers in a cubemap layered surface
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_13, __pyx_t_4) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":931
 * 
 *     #: Maximum layers in a cubemap layered surface
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS             # <<<<<<<<<<<<<<
 * 
 *     #: Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth()
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_SURF_14, __pyx_t_4) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":935
 *     #: Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth()
 *     #: or :py:obj:`~.cuDeviceGetTexture1DLinearMaxWidth()` instead.
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D linear texture width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_23, __pyx_t_4) < 0) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":938
 * 
 *     #: Maximum 2D linear texture width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D linear texture height
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_24, __pyx_t_4) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":941
 * 
 *     #: Maximum 2D linear texture height
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum 2D linear texture pitch in bytes
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_25, __pyx_t_4) < 0) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":944
 * 
 *     #: Maximum 2D linear texture pitch in bytes
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum mipmapped 2D texture width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_26, __pyx_t_4) < 0) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":947
 * 
 *     #: Maximum mipmapped 2D texture width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum mipmapped 2D texture height
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_27, __pyx_t_4) < 0) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":950
 * 
 *     #: Maximum mipmapped 2D texture height
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT             # <<<<<<<<<<<<<<
 * 
 *     #: Major compute capability version number
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_28, __pyx_t_4) < 0) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":953
 * 
 *     #: Major compute capability version number
 *     CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR             # <<<<<<<<<<<<<<
 * 
 *     #: Minor compute capability version number
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPA, __pyx_t_4) < 0) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":956
 * 
 *     #: Minor compute capability version number
 *     CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum mipmapped 1D texture width
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPA_2, __pyx_t_4) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":959
 * 
 *     #: Maximum mipmapped 1D texture width
 *     CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports stream priorities
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXT_29, __pyx_t_4) < 0) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":962
 * 
 *     #: Device supports stream priorities
 *     CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports caching globals in L1
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_STREAM_PRIOR, __pyx_t_4) < 0) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":965
 * 
 *     #: Device supports caching globals in L1
 *     CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports caching locals in L1
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CA, __pyx_t_4) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":968
 * 
 *     #: Device supports caching locals in L1
 *     CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum shared memory available per multiprocessor in bytes
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_LOCAL_L1_CAC, __pyx_t_4) < 0) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":971
 * 
 *     #: Maximum shared memory available per multiprocessor in bytes
 *     CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum number of 32-bit registers available per multiprocessor
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M_2, __pyx_t_4) < 0) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":974
 * 
 *     #: Maximum number of 32-bit registers available per multiprocessor
 *     CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR             # <<<<<<<<<<<<<<
 * 
 *     #: Device can allocate managed memory on this system
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_REGISTER_2, __pyx_t_4) < 0) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":977
 * 
 *     #: Device can allocate managed memory on this system
 *     CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY             # <<<<<<<<<<<<<<
 * 
 *     #: Device is on a multi-GPU board
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MANAGED_MEMO, __pyx_t_4) < 0) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":980
 * 
 *     #: Device is on a multi-GPU board
 *     CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD             # <<<<<<<<<<<<<<
 * 
 *     #: Unique id for a group of devices on the same multi-GPU board
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BO, __pyx_t_4) < 0) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":983
 * 
 *     #: Unique id for a group of devices on the same multi-GPU board
 *     CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID             # <<<<<<<<<<<<<<
 * 
 *     #: Link between the device and the host supports native atomic
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MULTI_GPU_BO_2, __pyx_t_4) < 0) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":988
 *     #: operations (this is a placeholder attribute, and is not supported on
 *     #: any current hardware)
 *     CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Ratio of single precision performance (in floating-point operations
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_HOST_NATIVE, __pyx_t_4) < 0) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":992
 *     #: Ratio of single precision performance (in floating-point operations
 *     #: per second) to double precision performance
 *     CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports coherently accessing pageable memory without calling
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_SINGLE_TO_DO, __pyx_t_4) < 0) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":996
 *     #: Device supports coherently accessing pageable memory without calling
 *     #: cudaHostRegister on it
 *     CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS             # <<<<<<<<<<<<<<
 * 
 *     #: Device can coherently access managed memory concurrently with the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEM, __pyx_t_4) < 0) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1000
 *     #: Device can coherently access managed memory concurrently with the
 *     #: CPU
 *     CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports compute preemption.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CONCURRENT_M, __pyx_t_4) < 0) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1003
 * 
 *     #: Device supports compute preemption.
 *     CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Device can access host registered memory at the same virtual address
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_COMPUTE_PREE, __pyx_t_4) < 0) __PYX_ERR(0, 1003, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1007
 *     #: Device can access host registered memory at the same virtual address
 *     #: as the CPU
 *     CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM             # <<<<<<<<<<<<<<
 * 
 *     #: :py:obj:`~.cuStreamBatchMemOp` and related APIs are supported.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_HOST, __pyx_t_4) < 0) __PYX_ERR(0, 1007, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1010
 * 
 *     #: :py:obj:`~.cuStreamBatchMemOp` and related APIs are supported.
 *     CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS             # <<<<<<<<<<<<<<
 * 
 *     #: 64-bit operations are supported in :py:obj:`~.cuStreamBatchMemOp`
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE, __pyx_t_4) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1014
 *     #: 64-bit operations are supported in :py:obj:`~.cuStreamBatchMemOp`
 *     #: and related APIs.
 *     CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS             # <<<<<<<<<<<<<<
 * 
 *     #: :py:obj:`~.CU_STREAM_WAIT_VALUE_NOR` is supported.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_64_B, __pyx_t_4) < 0) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1017
 * 
 *     #: :py:obj:`~.CU_STREAM_WAIT_VALUE_NOR` is supported.
 *     CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports launching cooperative kernels via
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE_2, __pyx_t_4) < 0) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1021
 *     #: Device supports launching cooperative kernels via
 *     #: :py:obj:`~.cuLaunchCooperativeKernel`
 *     CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH             # <<<<<<<<<<<<<<
 * 
 *     #: Deprecated, :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` is
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_COOPERATIVE, __pyx_t_4) < 0) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1025
 *     #: Deprecated, :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` is
 *     #: deprecated.
 *     CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum optin shared memory per block
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_COOPERATIVE_2, __pyx_t_4) < 0) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1028
 * 
 *     #: Maximum optin shared memory per block
 *     CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN             # <<<<<<<<<<<<<<
 * 
 *     #: The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_SHARED_M_3, __pyx_t_4) < 0) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1034
 *     #: on the device. See :py:obj:`~.Stream Memory Operations` for
 *     #: additional details.
 *     CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports host memory registration via
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_FLUSH_RE, __pyx_t_4) < 0) __PYX_ERR(0, 1034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1038
 *     #: Device supports host memory registration via
 *     #: :py:obj:`~.cudaHostRegister`.
 *     CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Device accesses pageable memory via the host's page tables.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_HOST_REGISTE, __pyx_t_4) < 0) __PYX_ERR(0, 1038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1041
 * 
 *     #: Device accesses pageable memory via the host's page tables.
 *     CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES             # <<<<<<<<<<<<<<
 * 
 *     #: The host can directly access managed memory on the device without
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_PAGEABLE_MEM_2, __pyx_t_4) < 0) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1045
 *     #: The host can directly access managed memory on the device without
 *     #: migration.
 *     CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST             # <<<<<<<<<<<<<<
 * 
 *     #: Deprecated, Use
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_DIRECT_MANAG, __pyx_t_4) < 0) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1049
 *     #: Deprecated, Use
 *     #: CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED
 *     CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports virtual memory management APIs like
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDR, __pyx_t_4) < 0) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1054
 *     #: :py:obj:`~.cuMemAddressReserve`, :py:obj:`~.cuMemCreate`,
 *     #: :py:obj:`~.cuMemMap` and related APIs
 *     CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports exporting memory to a posix file descriptor with
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMO, __pyx_t_4) < 0) __PYX_ERR(0, 1054, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1059
 *     #: :py:obj:`~.cuMemExportToShareableHandle`, if requested via
 *     #: :py:obj:`~.cuMemCreate`
 *     CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports exporting memory to a Win32 NT handle with
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE, __pyx_t_4) < 0) __PYX_ERR(0, 1059, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1064
 *     #: :py:obj:`~.cuMemExportToShareableHandle`, if requested via
 *     #: :py:obj:`~.cuMemCreate`
 *     CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports exporting memory to a Win32 KMT handle with
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_2, __pyx_t_4) < 0) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1069
 *     #: :py:obj:`~.cuMemExportToShareableHandle`, if requested via
 *     #: :py:obj:`~.cuMemCreate`
 *     CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum number of blocks per multiprocessor
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_3, __pyx_t_4) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1072
 * 
 *     #: Maximum number of blocks per multiprocessor
 *     CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports compression of memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_P, __pyx_t_4) < 0) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1075
 * 
 *     #: Device supports compression of memory
 *     CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum L2 persisting lines capacity setting in bytes.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_GENERIC_COMP, __pyx_t_4) < 0) __PYX_ERR(0, 1075, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1078
 * 
 *     #: Maximum L2 persisting lines capacity setting in bytes.
 *     CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE             # <<<<<<<<<<<<<<
 * 
 *     #: Maximum value of :py:obj:`~.CUaccessPolicyWindow.num_bytes`.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_PERSISTI, __pyx_t_4) < 0) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1081
 * 
 *     #: Maximum value of :py:obj:`~.CUaccessPolicyWindow.num_bytes`.
 *     CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports specifying the GPUDirect RDMA flag with
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX_ACCESS_P, __pyx_t_4) < 0) __PYX_ERR(0, 1081, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1085
 *     #: Device supports specifying the GPUDirect RDMA flag with
 *     #: :py:obj:`~.cuMemCreate`
 *     CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Shared memory reserved by CUDA driver per block in bytes
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R, __pyx_t_4) < 0) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1088
 * 
 *     #: Shared memory reserved by CUDA driver per block in bytes
 *     CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_RESERVED_SHA, __pyx_t_4) < 0) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1091
 * 
 *     #: Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays
 *     CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports using the :py:obj:`~.cuMemHostRegister` flag
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_SPARSE_CUDA, __pyx_t_4) < 0) __PYX_ERR(0, 1091, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1096
 *     #: :py:obj:`~.CU_MEMHOSTERGISTER_READ_ONLY` to register memory that
 *     #: must be mapped as read-only to the GPU
 *     CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: External timeline semaphore interop is supported on the device
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_READ_ONLY_HO, __pyx_t_4) < 0) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1099
 * 
 *     #: External timeline semaphore interop is supported on the device
 *     CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports using the :py:obj:`~.cuMemAllocAsync` and
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_TIMELINE_SEM, __pyx_t_4) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1103
 *     #: Device supports using the :py:obj:`~.cuMemAllocAsync` and
 *     #: :py:obj:`~.cuMemPool` family of APIs
 *     CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MEMORY_POOLS, __pyx_t_4) < 0) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1107
 *     #: Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see
 *     #: https://docs.nvidia.com/cuda/gpudirect-rdma for more information)
 *     CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: The returned attribute shall be interpreted as a bitmask, where the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_2, __pyx_t_4) < 0) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1112
 *     #: individual bits are described by the
 *     #: :py:obj:`~.CUflushGPUDirectRDMAWritesOptions` enum
 *     CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS             # <<<<<<<<<<<<<<
 * 
 *     #: GPUDirect RDMA writes to the device do not need to be flushed for
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_3, __pyx_t_4) < 0) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1118
 *     #: :py:obj:`~.CUGPUDirectRDMAWritesOrdering` for the numerical values
 *     #: returned here.
 *     CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING             # <<<<<<<<<<<<<<
 * 
 *     #: Handle types supported with mempool based IPC
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_GPU_DIRECT_R_4, __pyx_t_4) < 0) __PYX_ERR(0, 1118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1121
 * 
 *     #: Handle types supported with mempool based IPC
 *     CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES             # <<<<<<<<<<<<<<
 * 
 *     #: Indicates device supports cluster launch
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPP, __pyx_t_4) < 0) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1124
 * 
 *     #: Indicates device supports cluster launch
 *     CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports deferred mapping CUDA arrays and CUDA mipmapped
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CLUSTER_LAUN, __pyx_t_4) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1128
 *     #: Device supports deferred mapping CUDA arrays and CUDA mipmapped
 *     #: arrays
 *     CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: 64-bit operations are supported in :py:obj:`~.cuStreamBatchMemOp_v2`
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_DEFERRED_MAP, __pyx_t_4) < 0) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1132
 *     #: 64-bit operations are supported in :py:obj:`~.cuStreamBatchMemOp_v2`
 *     #: and related v2 MemOp APIs.
 *     CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V2 = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V2             # <<<<<<<<<<<<<<
 * 
 *     #: :py:obj:`~.CU_STREAM_WAIT_VALUE_NOR` is supported by v2 MemOp APIs.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_64_B_2, __pyx_t_4) < 0) __PYX_ERR(0, 1132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1135
 * 
 *     #: :py:obj:`~.CU_STREAM_WAIT_VALUE_NOR` is supported by v2 MemOp APIs.
 *     CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2 = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2             # <<<<<<<<<<<<<<
 * 
 *     #: Device supports buffer sharing with dma_buf mechanism.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_CAN_USE_STRE_3, __pyx_t_4) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1138
 * 
 *     #: Device supports buffer sharing with dma_buf mechanism.
 *     CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED             # <<<<<<<<<<<<<<
 *     CU_DEVICE_ATTRIBUTE_MAX = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPP, __pyx_t_4) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1139
 *     #: Device supports buffer sharing with dma_buf mechanism.
 *     CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED
 *     CU_DEVICE_ATTRIBUTE_MAX = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX             # <<<<<<<<<<<<<<
 * 
 * class CUpointer_attribute(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_attribute_enum(CU_DEVICE_ATTRIBUTE_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_ATTRIBUTE_MAX, __pyx_t_4) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":707
 *     CU_TR_FILTER_MODE_LINEAR = ccuda.CUfilter_mode_enum.CU_TR_FILTER_MODE_LINEAR
 * 
 * class CUdevice_attribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Device properties
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUdevice_attribute, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUdevice_attribute, __pyx_t_4) < 0) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":1141
 *     CU_DEVICE_ATTRIBUTE_MAX = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX
 * 
 * class CUpointer_attribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Pointer information
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUpointer_attribute, __pyx_n_s_CUpointer_attribute, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Pointer_information); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1148
 *     #: The :py:obj:`~.CUcontext` on which a pointer was allocated or
 *     #: registered
 *     CU_POINTER_ATTRIBUTE_CONTEXT = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT             # <<<<<<<<<<<<<<
 * 
 *     #: The :py:obj:`~.CUmemorytype` describing the physical location of a
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_CONTEXT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_CONTEXT, __pyx_t_4) < 0) __PYX_ERR(0, 1148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1152
 *     #: The :py:obj:`~.CUmemorytype` describing the physical location of a
 *     #: pointer
 *     CU_POINTER_ATTRIBUTE_MEMORY_TYPE = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE             # <<<<<<<<<<<<<<
 * 
 *     #: The address at which a pointer's memory may be accessed on the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_MEMORY_TYPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_MEMORY_TYPE, __pyx_t_4) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1156
 *     #: The address at which a pointer's memory may be accessed on the
 *     #: device
 *     CU_POINTER_ATTRIBUTE_DEVICE_POINTER = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER             # <<<<<<<<<<<<<<
 * 
 *     #: The address at which a pointer's memory may be accessed on the host
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_DEVICE_POINTER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_DEVICE_POIN, __pyx_t_4) < 0) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1159
 * 
 *     #: The address at which a pointer's memory may be accessed on the host
 *     CU_POINTER_ATTRIBUTE_HOST_POINTER = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER             # <<<<<<<<<<<<<<
 * 
 *     #: A pair of tokens for use with the nv-p2p.h Linux kernel interface
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_HOST_POINTER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_HOST_POINTE, __pyx_t_4) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1162
 * 
 *     #: A pair of tokens for use with the nv-p2p.h Linux kernel interface
 *     CU_POINTER_ATTRIBUTE_P2P_TOKENS = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS             # <<<<<<<<<<<<<<
 * 
 *     #: Synchronize every synchronous memory operation initiated on this
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_P2P_TOKENS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_P2P_TOKENS, __pyx_t_4) < 0) __PYX_ERR(0, 1162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1166
 *     #: Synchronize every synchronous memory operation initiated on this
 *     #: region
 *     CU_POINTER_ATTRIBUTE_SYNC_MEMOPS = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS             # <<<<<<<<<<<<<<
 * 
 *     #: A process-wide unique ID for an allocated memory region
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_SYNC_MEMOPS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, __pyx_t_4) < 0) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1169
 * 
 *     #: A process-wide unique ID for an allocated memory region
 *     CU_POINTER_ATTRIBUTE_BUFFER_ID = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID             # <<<<<<<<<<<<<<
 * 
 *     #: Indicates if the pointer points to managed memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_BUFFER_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_BUFFER_ID, __pyx_t_4) < 0) __PYX_ERR(0, 1169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1172
 * 
 *     #: Indicates if the pointer points to managed memory
 *     CU_POINTER_ATTRIBUTE_IS_MANAGED = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED             # <<<<<<<<<<<<<<
 * 
 *     #: A device ordinal of a device on which a pointer was allocated or
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_IS_MANAGED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_IS_MANAGED, __pyx_t_4) < 0) __PYX_ERR(0, 1172, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1176
 *     #: A device ordinal of a device on which a pointer was allocated or
 *     #: registered
 *     CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL             # <<<<<<<<<<<<<<
 * 
 *     #: 1 if this pointer maps to an allocation that is suitable for
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_DEVICE_ORDI, __pyx_t_4) < 0) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1180
 *     #: 1 if this pointer maps to an allocation that is suitable for
 *     #: :py:obj:`~.cudaIpcGetMemHandle`, 0 otherwise
 *     CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE             # <<<<<<<<<<<<<<
 * 
 *     #: Starting address for this requested pointer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_IS_LEGACY_C, __pyx_t_4) < 0) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1183
 * 
 *     #: Starting address for this requested pointer
 *     CU_POINTER_ATTRIBUTE_RANGE_START_ADDR = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR             # <<<<<<<<<<<<<<
 * 
 *     #: Size of the address range for this requested pointer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_RANGE_START_ADDR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_RANGE_START, __pyx_t_4) < 0) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1186
 * 
 *     #: Size of the address range for this requested pointer
 *     CU_POINTER_ATTRIBUTE_RANGE_SIZE = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE             # <<<<<<<<<<<<<<
 * 
 *     #: 1 if this pointer is in a valid address range that is mapped to a
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_RANGE_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_RANGE_SIZE, __pyx_t_4) < 0) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1190
 *     #: 1 if this pointer is in a valid address range that is mapped to a
 *     #: backing allocation, 0 otherwise
 *     CU_POINTER_ATTRIBUTE_MAPPED = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED             # <<<<<<<<<<<<<<
 * 
 *     #: Bitmask of allowed :py:obj:`~.CUmemAllocationHandleType` for this
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_MAPPED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_MAPPED, __pyx_t_4) < 0) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1194
 *     #: Bitmask of allowed :py:obj:`~.CUmemAllocationHandleType` for this
 *     #: allocation
 *     CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES             # <<<<<<<<<<<<<<
 * 
 *     #: 1 if the memory this pointer is referencing can be used with the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_ALLOWED_HAN, __pyx_t_4) < 0) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1198
 *     #: 1 if the memory this pointer is referencing can be used with the
 *     #: GPUDirect RDMA API
 *     CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE             # <<<<<<<<<<<<<<
 * 
 *     #: Returns the access flags the device associated with the current
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_IS_GPU_DIRE, __pyx_t_4) < 0) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1203
 *     #: context has on the corresponding memory referenced by the pointer
 *     #: given
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAGS = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS             # <<<<<<<<<<<<<<
 * 
 *     #: Returns the mempool handle for the allocation if it was allocated
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_ACCESS_FLAGS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_ACCESS_FLAG, __pyx_t_4) < 0) __PYX_ERR(0, 1203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1207
 *     #: Returns the mempool handle for the allocation if it was allocated
 *     #: from a mempool. Otherwise returns NULL.
 *     CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE             # <<<<<<<<<<<<<<
 * 
 *     #: Size of the actual underlying mapping that the pointer belongs to
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_MEMPOOL_HAN, __pyx_t_4) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1210
 * 
 *     #: Size of the actual underlying mapping that the pointer belongs to
 *     CU_POINTER_ATTRIBUTE_MAPPING_SIZE = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPING_SIZE             # <<<<<<<<<<<<<<
 * 
 *     #: The start address of the mapping that the pointer belongs to
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_MAPPING_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_MAPPING_SIZ, __pyx_t_4) < 0) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1213
 * 
 *     #: The start address of the mapping that the pointer belongs to
 *     CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR             # <<<<<<<<<<<<<<
 * 
 *     #: A process-wide unique id corresponding to the physical allocation
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_MAPPING_BAS, __pyx_t_4) < 0) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1217
 *     #: A process-wide unique id corresponding to the physical allocation
 *     #: the pointer belongs to
 *     CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID             # <<<<<<<<<<<<<<
 * 
 * class CUfunction_attribute(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUpointer_attribute_enum(CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_MEMORY_BLOC, __pyx_t_4) < 0) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1141
 *     CU_DEVICE_ATTRIBUTE_MAX = ccuda.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX
 * 
 * class CUpointer_attribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Pointer information
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUpointer_attribute, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUpointer_attribute, __pyx_t_4) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":1219
 *     CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID
 * 
 * class CUfunction_attribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Function properties
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUfunction_attribute, __pyx_n_s_CUfunction_attribute, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Function_properties); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1227
 *     #: the function would fail. This number depends on both the function
 *     #: and the device on which the function is currently loaded.
 *     CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK             # <<<<<<<<<<<<<<
 * 
 *     #: The size in bytes of statically-allocated shared memory required by
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_MAX_THREADS_PE, __pyx_t_4) < 0) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1232
 *     #: this function. This does not include dynamically-allocated shared
 *     #: memory requested by the user at runtime.
 *     CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES             # <<<<<<<<<<<<<<
 * 
 *     #: The size in bytes of user-allocated constant memory required by this
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_SHARED_SIZE_BY, __pyx_t_4) < 0) __PYX_ERR(0, 1232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1236
 *     #: The size in bytes of user-allocated constant memory required by this
 *     #: function.
 *     CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES             # <<<<<<<<<<<<<<
 * 
 *     #: The size in bytes of local memory used by each thread of this
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_CONST_SIZE_BYT, __pyx_t_4) < 0) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1240
 *     #: The size in bytes of local memory used by each thread of this
 *     #: function.
 *     CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES             # <<<<<<<<<<<<<<
 * 
 *     #: The number of registers used by each thread of this function.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYT, __pyx_t_4) < 0) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1243
 * 
 *     #: The number of registers used by each thread of this function.
 *     CU_FUNC_ATTRIBUTE_NUM_REGS = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_NUM_REGS             # <<<<<<<<<<<<<<
 * 
 *     #: The PTX virtual architecture version for which the function was
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_NUM_REGS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_NUM_REGS, __pyx_t_4) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1250
 *     #: Note that this may return the undefined value of 0 for cubins
 *     #: compiled prior to CUDA 3.0.
 *     CU_FUNC_ATTRIBUTE_PTX_VERSION = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_PTX_VERSION             # <<<<<<<<<<<<<<
 * 
 *     #: The binary architecture version for which the function was compiled.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_PTX_VERSION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_PTX_VERSION, __pyx_t_4) < 0) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1257
 *     #: Note that this will return a value of 10 for legacy cubins that do
 *     #: not have a properly-encoded binary architecture version.
 *     CU_FUNC_ATTRIBUTE_BINARY_VERSION = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_BINARY_VERSION             # <<<<<<<<<<<<<<
 * 
 *     #: The attribute to indicate whether the function has been compiled
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_BINARY_VERSION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_BINARY_VERSION, __pyx_t_4) < 0) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1261
 *     #: The attribute to indicate whether the function has been compiled
 *     #: with user specified option "-Xptxas --dlcm=ca" set .
 *     CU_FUNC_ATTRIBUTE_CACHE_MODE_CA = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CACHE_MODE_CA             # <<<<<<<<<<<<<<
 * 
 *     #: The maximum size in bytes of dynamically-allocated shared memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_CACHE_MODE_CA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_CACHE_MODE_CA, __pyx_t_4) < 0) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1267
 *     #: shared memory size is larger than this value, the launch will fail.
 *     #: See :py:obj:`~.cuFuncSetAttribute`
 *     CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES             # <<<<<<<<<<<<<<
 * 
 *     #: On devices where the L1 cache and shared memory use the same
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SH, __pyx_t_4) < 0) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1275
 *     #: This is only a hint, and the driver can choose a different ratio if
 *     #: required to execute the function. See :py:obj:`~.cuFuncSetAttribute`
 *     CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT             # <<<<<<<<<<<<<<
 * 
 *     #: If this attribute is set, the kernel must launch with a valid
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_PREFERRED_SHAR, __pyx_t_4) < 0) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1279
 *     #: If this attribute is set, the kernel must launch with a valid
 *     #: cluster size specified. See :py:obj:`~.cuFuncSetAttribute`
 *     CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET             # <<<<<<<<<<<<<<
 * 
 *     #: The required cluster width in blocks. The values must either all be
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_M, __pyx_t_4) < 0) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1288
 *     #: runtime. Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED.
 *     #: See :py:obj:`~.cuFuncSetAttribute`
 *     CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH             # <<<<<<<<<<<<<<
 * 
 *     #: The required cluster height in blocks. The values must either all be
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST, __pyx_t_4) < 0) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1297
 *     #: runtime. Setting it at runtime should return
 *     #: CUDA_ERROR_NOT_PERMITTED. See :py:obj:`~.cuFuncSetAttribute`
 *     CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT             # <<<<<<<<<<<<<<
 * 
 *     #: The required cluster depth in blocks. The values must either all be
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST_2, __pyx_t_4) < 0) __PYX_ERR(0, 1297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1306
 *     #: runtime. Setting it at runtime should return
 *     #: CUDA_ERROR_NOT_PERMITTED. See :py:obj:`~.cuFuncSetAttribute`
 *     CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH             # <<<<<<<<<<<<<<
 * 
 *     #: Whether the function can be launched with non-portable cluster size.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_REQUIRED_CLUST_3, __pyx_t_4) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1326
 *     #: The specific hardware unit may support higher cluster sizes thats
 *     #: not guaranteed to be portable. See :py:obj:`~.cuFuncSetAttribute`
 *     CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED             # <<<<<<<<<<<<<<
 * 
 *     #: The block scheduling policy of a function. The value type is
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_NON_PORTABLE_C, __pyx_t_4) < 0) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1331
 *     #: CUclusterSchedulingPolicy / cudaClusterSchedulingPolicy. See
 *     #: :py:obj:`~.cuFuncSetAttribute`
 *     CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE             # <<<<<<<<<<<<<<
 *     CU_FUNC_ATTRIBUTE_MAX = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDU, __pyx_t_4) < 0) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1332
 *     #: :py:obj:`~.cuFuncSetAttribute`
 *     CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE
 *     CU_FUNC_ATTRIBUTE_MAX = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX             # <<<<<<<<<<<<<<
 * 
 * class CUfunc_cache(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunction_attribute_enum(CU_FUNC_ATTRIBUTE_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_ATTRIBUTE_MAX, __pyx_t_4) < 0) __PYX_ERR(0, 1332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1219
 *     CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID = ccuda.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID
 * 
 * class CUfunction_attribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Function properties
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUfunction_attribute, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUfunction_attribute, __pyx_t_4) < 0) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":1334
 *     CU_FUNC_ATTRIBUTE_MAX = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX
 * 
 * class CUfunc_cache(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Function cache configurations
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUfunc_cache, __pyx_n_s_CUfunc_cache, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Function_cache_configurations); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1340
 * 
 *     #: no preference for shared memory or L1 (default)
 *     CU_FUNC_CACHE_PREFER_NONE = ccuda.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_NONE             # <<<<<<<<<<<<<<
 * 
 *     #: prefer larger shared memory and smaller L1 cache
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunc_cache_enum(CU_FUNC_CACHE_PREFER_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_CACHE_PREFER_NONE, __pyx_t_4) < 0) __PYX_ERR(0, 1340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1343
 * 
 *     #: prefer larger shared memory and smaller L1 cache
 *     CU_FUNC_CACHE_PREFER_SHARED = ccuda.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_SHARED             # <<<<<<<<<<<<<<
 * 
 *     #: prefer larger L1 cache and smaller shared memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunc_cache_enum(CU_FUNC_CACHE_PREFER_SHARED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_CACHE_PREFER_SHARED, __pyx_t_4) < 0) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1346
 * 
 *     #: prefer larger L1 cache and smaller shared memory
 *     CU_FUNC_CACHE_PREFER_L1 = ccuda.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_L1             # <<<<<<<<<<<<<<
 * 
 *     #: prefer equal sized L1 cache and shared memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunc_cache_enum(CU_FUNC_CACHE_PREFER_L1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_CACHE_PREFER_L1, __pyx_t_4) < 0) __PYX_ERR(0, 1346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1349
 * 
 *     #: prefer equal sized L1 cache and shared memory
 *     CU_FUNC_CACHE_PREFER_EQUAL = ccuda.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_EQUAL             # <<<<<<<<<<<<<<
 * 
 * class CUsharedconfig(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUfunc_cache_enum(CU_FUNC_CACHE_PREFER_EQUAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FUNC_CACHE_PREFER_EQUAL, __pyx_t_4) < 0) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1334
 *     CU_FUNC_ATTRIBUTE_MAX = ccuda.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX
 * 
 * class CUfunc_cache(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Function cache configurations
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUfunc_cache, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUfunc_cache, __pyx_t_4) < 0) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":1351
 *     CU_FUNC_CACHE_PREFER_EQUAL = ccuda.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_EQUAL
 * 
 * class CUsharedconfig(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Shared memory configurations
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUsharedconfig, __pyx_n_s_CUsharedconfig, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Shared_memory_configurations); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1357
 * 
 *     #: set default shared memory bank size
 *     CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = ccuda.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE             # <<<<<<<<<<<<<<
 * 
 *     #: set shared memory bank width to four bytes
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUsharedconfig_enum(CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_SHARED_MEM_CONFIG_DEFAULT_BAN, __pyx_t_4) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1360
 * 
 *     #: set shared memory bank width to four bytes
 *     CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = ccuda.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE             # <<<<<<<<<<<<<<
 * 
 *     #: set shared memory bank width to eight bytes
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUsharedconfig_enum(CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_SHARED_MEM_CONFIG_FOUR_BYTE_B, __pyx_t_4) < 0) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1363
 * 
 *     #: set shared memory bank width to eight bytes
 *     CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = ccuda.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE             # <<<<<<<<<<<<<<
 * 
 * class CUshared_carveout(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUsharedconfig_enum(CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_SHARED_MEM_CONFIG_EIGHT_BYTE, __pyx_t_4) < 0) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1351
 *     CU_FUNC_CACHE_PREFER_EQUAL = ccuda.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_EQUAL
 * 
 * class CUsharedconfig(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Shared memory configurations
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUsharedconfig, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUsharedconfig, __pyx_t_4) < 0) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":1365
 *     CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = ccuda.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE
 * 
 * class CUshared_carveout(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Shared memory carveout configurations. These may be passed to
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUshared_carveout, __pyx_n_s_CUshared_carveout, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Shared_memory_carveout_configur); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1372
 * 
 *     #: No preference for shared memory or L1 (default)
 *     CU_SHAREDMEM_CARVEOUT_DEFAULT = ccuda.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_DEFAULT             # <<<<<<<<<<<<<<
 * 
 *     #: Prefer maximum available shared memory, minimum L1 cache
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUshared_carveout_enum(CU_SHAREDMEM_CARVEOUT_DEFAULT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_SHAREDMEM_CARVEOUT_DEFAULT, __pyx_t_4) < 0) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1375
 * 
 *     #: Prefer maximum available shared memory, minimum L1 cache
 *     CU_SHAREDMEM_CARVEOUT_MAX_SHARED = ccuda.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_MAX_SHARED             # <<<<<<<<<<<<<<
 * 
 *     #: Prefer maximum available L1 cache, minimum shared memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUshared_carveout_enum(CU_SHAREDMEM_CARVEOUT_MAX_SHARED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_SHAREDMEM_CARVEOUT_MAX_SHARED, __pyx_t_4) < 0) __PYX_ERR(0, 1375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1378
 * 
 *     #: Prefer maximum available L1 cache, minimum shared memory
 *     CU_SHAREDMEM_CARVEOUT_MAX_L1 = ccuda.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_MAX_L1             # <<<<<<<<<<<<<<
 * 
 * class CUmemorytype(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUshared_carveout_enum(CU_SHAREDMEM_CARVEOUT_MAX_L1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_SHAREDMEM_CARVEOUT_MAX_L1, __pyx_t_4) < 0) __PYX_ERR(0, 1378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1365
 *     CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = ccuda.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE
 * 
 * class CUshared_carveout(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Shared memory carveout configurations. These may be passed to
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUshared_carveout, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUshared_carveout, __pyx_t_4) < 0) __PYX_ERR(0, 1365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":1380
 *     CU_SHAREDMEM_CARVEOUT_MAX_L1 = ccuda.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_MAX_L1
 * 
 * class CUmemorytype(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Memory types
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUmemorytype, __pyx_n_s_CUmemorytype, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Memory_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1386
 * 
 *     #: Host memory
 *     CU_MEMORYTYPE_HOST = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_HOST             # <<<<<<<<<<<<<<
 * 
 *     #: Device memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemorytype_enum(CU_MEMORYTYPE_HOST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEMORYTYPE_HOST, __pyx_t_4) < 0) __PYX_ERR(0, 1386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1389
 * 
 *     #: Device memory
 *     CU_MEMORYTYPE_DEVICE = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE             # <<<<<<<<<<<<<<
 * 
 *     #: Array memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemorytype_enum(CU_MEMORYTYPE_DEVICE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEMORYTYPE_DEVICE, __pyx_t_4) < 0) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1392
 * 
 *     #: Array memory
 *     CU_MEMORYTYPE_ARRAY = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY             # <<<<<<<<<<<<<<
 * 
 *     #: Unified device or host memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemorytype_enum(CU_MEMORYTYPE_ARRAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEMORYTYPE_ARRAY, __pyx_t_4) < 0) __PYX_ERR(0, 1392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1395
 * 
 *     #: Unified device or host memory
 *     CU_MEMORYTYPE_UNIFIED = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED             # <<<<<<<<<<<<<<
 * 
 * class CUcomputemode(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemorytype_enum(CU_MEMORYTYPE_UNIFIED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEMORYTYPE_UNIFIED, __pyx_t_4) < 0) __PYX_ERR(0, 1395, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1380
 *     CU_SHAREDMEM_CARVEOUT_MAX_L1 = ccuda.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_MAX_L1
 * 
 * class CUmemorytype(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Memory types
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUmemorytype, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmemorytype, __pyx_t_4) < 0) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":1397
 *     CU_MEMORYTYPE_UNIFIED = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED
 * 
 * class CUcomputemode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Compute Modes
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUcomputemode, __pyx_n_s_CUcomputemode, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Compute_Modes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1403
 * 
 *     #: Default compute mode (Multiple contexts allowed per device)
 *     CU_COMPUTEMODE_DEFAULT = ccuda.CUcomputemode_enum.CU_COMPUTEMODE_DEFAULT             # <<<<<<<<<<<<<<
 * 
 *     #: Compute-prohibited mode (No contexts can be created on this device
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUcomputemode_enum(CU_COMPUTEMODE_DEFAULT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_COMPUTEMODE_DEFAULT, __pyx_t_4) < 0) __PYX_ERR(0, 1403, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1407
 *     #: Compute-prohibited mode (No contexts can be created on this device
 *     #: at this time)
 *     CU_COMPUTEMODE_PROHIBITED = ccuda.CUcomputemode_enum.CU_COMPUTEMODE_PROHIBITED             # <<<<<<<<<<<<<<
 * 
 *     #: Compute-exclusive-process mode (Only one context used by a single
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUcomputemode_enum(CU_COMPUTEMODE_PROHIBITED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_COMPUTEMODE_PROHIBITED, __pyx_t_4) < 0) __PYX_ERR(0, 1407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1411
 *     #: Compute-exclusive-process mode (Only one context used by a single
 *     #: process can be present on this device at a time)
 *     CU_COMPUTEMODE_EXCLUSIVE_PROCESS = ccuda.CUcomputemode_enum.CU_COMPUTEMODE_EXCLUSIVE_PROCESS             # <<<<<<<<<<<<<<
 * 
 * class CUmem_advise(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUcomputemode_enum(CU_COMPUTEMODE_EXCLUSIVE_PROCESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_COMPUTEMODE_EXCLUSIVE_PROCESS, __pyx_t_4) < 0) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1397
 *     CU_MEMORYTYPE_UNIFIED = ccuda.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED
 * 
 * class CUcomputemode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Compute Modes
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUcomputemode, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUcomputemode, __pyx_t_4) < 0) __PYX_ERR(0, 1397, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":1413
 *     CU_COMPUTEMODE_EXCLUSIVE_PROCESS = ccuda.CUcomputemode_enum.CU_COMPUTEMODE_EXCLUSIVE_PROCESS
 * 
 * class CUmem_advise(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Memory advise values
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUmem_advise, __pyx_n_s_CUmem_advise, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Memory_advise_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1419
 * 
 *     #: Data will mostly be read and only occassionally be written to
 *     CU_MEM_ADVISE_SET_READ_MOSTLY = ccuda.CUmem_advise_enum.CU_MEM_ADVISE_SET_READ_MOSTLY             # <<<<<<<<<<<<<<
 * 
 *     #: Undo the effect of :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY`
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmem_advise_enum(CU_MEM_ADVISE_SET_READ_MOSTLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ADVISE_SET_READ_MOSTLY, __pyx_t_4) < 0) __PYX_ERR(0, 1419, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1422
 * 
 *     #: Undo the effect of :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY`
 *     CU_MEM_ADVISE_UNSET_READ_MOSTLY = ccuda.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_READ_MOSTLY             # <<<<<<<<<<<<<<
 * 
 *     #: Set the preferred location for the data as the specified device
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmem_advise_enum(CU_MEM_ADVISE_UNSET_READ_MOSTLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ADVISE_UNSET_READ_MOSTLY, __pyx_t_4) < 0) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1425
 * 
 *     #: Set the preferred location for the data as the specified device
 *     CU_MEM_ADVISE_SET_PREFERRED_LOCATION = ccuda.CUmem_advise_enum.CU_MEM_ADVISE_SET_PREFERRED_LOCATION             # <<<<<<<<<<<<<<
 * 
 *     #: Clear the preferred location for the data
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmem_advise_enum(CU_MEM_ADVISE_SET_PREFERRED_LOCATION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ADVISE_SET_PREFERRED_LOCA, __pyx_t_4) < 0) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1428
 * 
 *     #: Clear the preferred location for the data
 *     CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION = ccuda.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION             # <<<<<<<<<<<<<<
 * 
 *     #: Data will be accessed by the specified device, so prevent page
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmem_advise_enum(CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ADVISE_UNSET_PREFERRED_LO, __pyx_t_4) < 0) __PYX_ERR(0, 1428, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1432
 *     #: Data will be accessed by the specified device, so prevent page
 *     #: faults as much as possible
 *     CU_MEM_ADVISE_SET_ACCESSED_BY = ccuda.CUmem_advise_enum.CU_MEM_ADVISE_SET_ACCESSED_BY             # <<<<<<<<<<<<<<
 * 
 *     #: Let the Unified Memory subsystem decide on the page faulting policy
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmem_advise_enum(CU_MEM_ADVISE_SET_ACCESSED_BY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ADVISE_SET_ACCESSED_BY, __pyx_t_4) < 0) __PYX_ERR(0, 1432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1436
 *     #: Let the Unified Memory subsystem decide on the page faulting policy
 *     #: for the specified device
 *     CU_MEM_ADVISE_UNSET_ACCESSED_BY = ccuda.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_ACCESSED_BY             # <<<<<<<<<<<<<<
 * 
 * class CUmem_range_attribute(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmem_advise_enum(CU_MEM_ADVISE_UNSET_ACCESSED_BY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ADVISE_UNSET_ACCESSED_BY, __pyx_t_4) < 0) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1413
 *     CU_COMPUTEMODE_EXCLUSIVE_PROCESS = ccuda.CUcomputemode_enum.CU_COMPUTEMODE_EXCLUSIVE_PROCESS
 * 
 * class CUmem_advise(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Memory advise values
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUmem_advise, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmem_advise, __pyx_t_4) < 0) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":1438
 *     CU_MEM_ADVISE_UNSET_ACCESSED_BY = ccuda.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_ACCESSED_BY
 * 
 * class CUmem_range_attribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUmem_range_attribute, __pyx_n_s_CUmem_range_attribute, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s__1015); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1445
 *     #: Whether the range will mostly be read and only occassionally be
 *     #: written to
 *     CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = ccuda.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY             # <<<<<<<<<<<<<<
 * 
 *     #: The preferred location of the range
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmem_range_attribute_enum(CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_RANGE_ATTRIBUTE_READ_MOST, __pyx_t_4) < 0) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1448
 * 
 *     #: The preferred location of the range
 *     CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = ccuda.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION             # <<<<<<<<<<<<<<
 * 
 *     #: Memory range has :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` set for
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmem_range_attribute_enum(CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_RANGE_ATTRIBUTE_PREFERRED, __pyx_t_4) < 0) __PYX_ERR(0, 1448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1452
 *     #: Memory range has :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` set for
 *     #: specified device
 *     CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY = ccuda.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY             # <<<<<<<<<<<<<<
 * 
 *     #: The last location to which the range was prefetched
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmem_range_attribute_enum(CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_RANGE_ATTRIBUTE_ACCESSED, __pyx_t_4) < 0) __PYX_ERR(0, 1452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1455
 * 
 *     #: The last location to which the range was prefetched
 *     CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = ccuda.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION             # <<<<<<<<<<<<<<
 * 
 * class CUjit_option(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmem_range_attribute_enum(CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_RANGE_ATTRIBUTE_LAST_PREF, __pyx_t_4) < 0) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1438
 *     CU_MEM_ADVISE_UNSET_ACCESSED_BY = ccuda.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_ACCESSED_BY
 * 
 * class CUmem_range_attribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUmem_range_attribute, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmem_range_attribute, __pyx_t_4) < 0) __PYX_ERR(0, 1438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":1457
 *     CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = ccuda.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION
 * 
 * class CUjit_option(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Online compiler and linker options
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUjit_option, __pyx_n_s_CUjit_option, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Online_compiler_and_linker_opti); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1465
 *     #: Option type: unsigned int
 *     #: Applies to: compiler only
 *     CU_JIT_MAX_REGISTERS = ccuda.CUjit_option_enum.CU_JIT_MAX_REGISTERS             # <<<<<<<<<<<<<<
 * 
 *     #: IN: Specifies minimum number of threads per block to target
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_MAX_REGISTERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_MAX_REGISTERS, __pyx_t_4) < 0) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1478
 *     #: Option type: unsigned int
 *     #: Applies to: compiler only
 *     CU_JIT_THREADS_PER_BLOCK = ccuda.CUjit_option_enum.CU_JIT_THREADS_PER_BLOCK             # <<<<<<<<<<<<<<
 * 
 *     #: Overwrites the option value with the total wall clock time, in
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_THREADS_PER_BLOCK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_THREADS_PER_BLOCK, __pyx_t_4) < 0) __PYX_ERR(0, 1478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1484
 *     #: Option type: float
 *     #: Applies to: compiler and linker
 *     CU_JIT_WALL_TIME = ccuda.CUjit_option_enum.CU_JIT_WALL_TIME             # <<<<<<<<<<<<<<
 * 
 *     #: Pointer to a buffer in which to print any log messages that are
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_WALL_TIME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_WALL_TIME, __pyx_t_4) < 0) __PYX_ERR(0, 1484, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1491
 *     #: Option type: char *
 *     #: Applies to: compiler and linker
 *     CU_JIT_INFO_LOG_BUFFER = ccuda.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER             # <<<<<<<<<<<<<<
 * 
 *     #: IN: Log buffer size in bytes. Log messages will be capped at this
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_INFO_LOG_BUFFER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_INFO_LOG_BUFFER, __pyx_t_4) < 0) __PYX_ERR(0, 1491, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1498
 *     #: Option type: unsigned int
 *     #: Applies to: compiler and linker
 *     CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES = ccuda.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES             # <<<<<<<<<<<<<<
 * 
 *     #: Pointer to a buffer in which to print any log messages that reflect
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_INFO_LOG_BUFFER_SIZE_BYTE, __pyx_t_4) < 0) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1505
 *     #: Option type: char *
 *     #: Applies to: compiler and linker
 *     CU_JIT_ERROR_LOG_BUFFER = ccuda.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER             # <<<<<<<<<<<<<<
 * 
 *     #: IN: Log buffer size in bytes. Log messages will be capped at this
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_ERROR_LOG_BUFFER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_ERROR_LOG_BUFFER, __pyx_t_4) < 0) __PYX_ERR(0, 1505, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1512
 *     #: Option type: unsigned int
 *     #: Applies to: compiler and linker
 *     CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = ccuda.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES             # <<<<<<<<<<<<<<
 * 
 *     #: Level of optimizations to apply to generated code (0 - 4), with 4
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_ERROR_LOG_BUFFER_SIZE_BYT, __pyx_t_4) < 0) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1518
 *     #: Option type: unsigned int
 *     #: Applies to: compiler only
 *     CU_JIT_OPTIMIZATION_LEVEL = ccuda.CUjit_option_enum.CU_JIT_OPTIMIZATION_LEVEL             # <<<<<<<<<<<<<<
 * 
 *     #: No option value required. Determines the target based on the current
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_OPTIMIZATION_LEVEL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_OPTIMIZATION_LEVEL, __pyx_t_4) < 0) __PYX_ERR(0, 1518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1524
 *     #: Option type: No option value needed
 *     #: Applies to: compiler and linker
 *     CU_JIT_TARGET_FROM_CUCONTEXT = ccuda.CUjit_option_enum.CU_JIT_TARGET_FROM_CUCONTEXT             # <<<<<<<<<<<<<<
 * 
 *     #: Target is chosen based on supplied :py:obj:`~.CUjit_target`. Cannot
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_TARGET_FROM_CUCONTEXT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_TARGET_FROM_CUCONTEXT, __pyx_t_4) < 0) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1531
 *     #: :py:obj:`~.CUjit_target`
 *     #: Applies to: compiler and linker
 *     CU_JIT_TARGET = ccuda.CUjit_option_enum.CU_JIT_TARGET             # <<<<<<<<<<<<<<
 * 
 *     #: Specifies choice of fallback strategy if matching cubin is not
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_TARGET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_TARGET, __pyx_t_4) < 0) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1540
 *     #: :py:obj:`~.CUjit_fallback`
 *     #: Applies to: compiler only
 *     CU_JIT_FALLBACK_STRATEGY = ccuda.CUjit_option_enum.CU_JIT_FALLBACK_STRATEGY             # <<<<<<<<<<<<<<
 * 
 *     #: Specifies whether to create debug information in output (-g) (0:
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_FALLBACK_STRATEGY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_FALLBACK_STRATEGY, __pyx_t_4) < 0) __PYX_ERR(0, 1540, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1546
 *     #: Option type: int
 *     #: Applies to: compiler and linker
 *     CU_JIT_GENERATE_DEBUG_INFO = ccuda.CUjit_option_enum.CU_JIT_GENERATE_DEBUG_INFO             # <<<<<<<<<<<<<<
 * 
 *     #: Generate verbose log messages (0: false, default)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_GENERATE_DEBUG_INFO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_GENERATE_DEBUG_INFO, __pyx_t_4) < 0) __PYX_ERR(0, 1546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1551
 *     #: Option type: int
 *     #: Applies to: compiler and linker
 *     CU_JIT_LOG_VERBOSE = ccuda.CUjit_option_enum.CU_JIT_LOG_VERBOSE             # <<<<<<<<<<<<<<
 * 
 *     #: Generate line number information (-lineinfo) (0: false, default)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_LOG_VERBOSE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_LOG_VERBOSE, __pyx_t_4) < 0) __PYX_ERR(0, 1551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1556
 *     #: Option type: int
 *     #: Applies to: compiler only
 *     CU_JIT_GENERATE_LINE_INFO = ccuda.CUjit_option_enum.CU_JIT_GENERATE_LINE_INFO             # <<<<<<<<<<<<<<
 * 
 *     #: Specifies whether to enable caching explicitly (-dlcm)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_GENERATE_LINE_INFO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_GENERATE_LINE_INFO, __pyx_t_4) < 0) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1563
 *     #: :py:obj:`~.CUjit_cacheMode_enum`
 *     #: Applies to: compiler only
 *     CU_JIT_CACHE_MODE = ccuda.CUjit_option_enum.CU_JIT_CACHE_MODE             # <<<<<<<<<<<<<<
 * 
 *     #: [Deprecated]
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_CACHE_MODE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_CACHE_MODE, __pyx_t_4) < 0) __PYX_ERR(0, 1563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1566
 * 
 *     #: [Deprecated]
 *     CU_JIT_NEW_SM3X_OPT = ccuda.CUjit_option_enum.CU_JIT_NEW_SM3X_OPT             # <<<<<<<<<<<<<<
 * 
 *     #: This jit option is used for internal purpose only.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_NEW_SM3X_OPT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_NEW_SM3X_OPT, __pyx_t_4) < 0) __PYX_ERR(0, 1566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1569
 * 
 *     #: This jit option is used for internal purpose only.
 *     CU_JIT_FAST_COMPILE = ccuda.CUjit_option_enum.CU_JIT_FAST_COMPILE             # <<<<<<<<<<<<<<
 * 
 *     #: Array of device symbol names that will be relocated to the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_FAST_COMPILE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_FAST_COMPILE, __pyx_t_4) < 0) __PYX_ERR(0, 1569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1583
 *     #: Option type: const char **
 *     #: Applies to: dynamic linker only
 *     CU_JIT_GLOBAL_SYMBOL_NAMES = ccuda.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_NAMES             # <<<<<<<<<<<<<<
 * 
 *     #: Array of host addresses that will be used to relocate corresponding
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_GLOBAL_SYMBOL_NAMES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_GLOBAL_SYMBOL_NAMES, __pyx_t_4) < 0) __PYX_ERR(0, 1583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1590
 *     #: Option type: void **
 *     #: Applies to: dynamic linker only
 *     CU_JIT_GLOBAL_SYMBOL_ADDRESSES = ccuda.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_ADDRESSES             # <<<<<<<<<<<<<<
 * 
 *     #: Number of entries in :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_NAMES` and
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_GLOBAL_SYMBOL_ADDRESSES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_GLOBAL_SYMBOL_ADDRESSES, __pyx_t_4) < 0) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1596
 *     #: Option type: unsigned int
 *     #: Applies to: dynamic linker only
 *     CU_JIT_GLOBAL_SYMBOL_COUNT = ccuda.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_COUNT             # <<<<<<<<<<<<<<
 * 
 *     #: Enable link-time optimization (-dlto) for device code (Disabled by
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_GLOBAL_SYMBOL_COUNT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_GLOBAL_SYMBOL_COUNT, __pyx_t_4) < 0) __PYX_ERR(0, 1596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1603
 *     #: Option type: int
 *     #: Applies to: compiler and linker
 *     CU_JIT_LTO = ccuda.CUjit_option_enum.CU_JIT_LTO             # <<<<<<<<<<<<<<
 * 
 *     #: Control single-precision denormals (-ftz) support (0: false,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_LTO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_LTO, __pyx_t_4) < 0) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1609
 *     #: values Option type: int
 *     #: Applies to: link-time optimization specified with CU_JIT_LTO
 *     CU_JIT_FTZ = ccuda.CUjit_option_enum.CU_JIT_FTZ             # <<<<<<<<<<<<<<
 * 
 *     #: Control single-precision floating-point division and reciprocals
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_FTZ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_FTZ, __pyx_t_4) < 0) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1616
 *     #: int
 *     #: Applies to: link-time optimization specified with CU_JIT_LTO
 *     CU_JIT_PREC_DIV = ccuda.CUjit_option_enum.CU_JIT_PREC_DIV             # <<<<<<<<<<<<<<
 * 
 *     #: Control single-precision floating-point square root (-prec-sqrt)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_PREC_DIV); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_PREC_DIV, __pyx_t_4) < 0) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1622
 *     #: mode 0 : Enables the fast approximation mode Option type: int
 *     #: Applies to: link-time optimization specified with CU_JIT_LTO
 *     CU_JIT_PREC_SQRT = ccuda.CUjit_option_enum.CU_JIT_PREC_SQRT             # <<<<<<<<<<<<<<
 * 
 *     #: Enable/Disable the contraction of floating-point multiplies and
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_PREC_SQRT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_PREC_SQRT, __pyx_t_4) < 0) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1628
 *     #: (1: Enable, default; 0: Disable). Option type: int
 *     #: Applies to: link-time optimization specified with CU_JIT_LTO
 *     CU_JIT_FMA = ccuda.CUjit_option_enum.CU_JIT_FMA             # <<<<<<<<<<<<<<
 * 
 *     #: Array of kernel names that should be preserved at link time while
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_FMA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_FMA, __pyx_t_4) < 0) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1644
 *     #: Option type: const char **
 *     #: Applies to: dynamic linker only
 *     CU_JIT_REFERENCED_KERNEL_NAMES = ccuda.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_NAMES             # <<<<<<<<<<<<<<
 * 
 *     #: Number of entries in :py:obj:`~.CU_JIT_REFERENCED_KERNEL_NAMES`
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_REFERENCED_KERNEL_NAMES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_REFERENCED_KERNEL_NAMES, __pyx_t_4) < 0) __PYX_ERR(0, 1644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1650
 *     #: Option type: unsigned int
 *     #: Applies to: dynamic linker only
 *     CU_JIT_REFERENCED_KERNEL_COUNT = ccuda.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_COUNT             # <<<<<<<<<<<<<<
 * 
 *     #: Array of variable names (device and/or constant) that should be
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_REFERENCED_KERNEL_COUNT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_REFERENCED_KERNEL_COUNT, __pyx_t_4) < 0) __PYX_ERR(0, 1650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1666
 *     #: Option type: const char **
 *     #: Applies to: link-time optimization specified with CU_JIT_LTO
 *     CU_JIT_REFERENCED_VARIABLE_NAMES = ccuda.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_NAMES             # <<<<<<<<<<<<<<
 * 
 *     #: Number of entries in :py:obj:`~.CU_JIT_REFERENCED_VARIABLE_NAMES`
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_REFERENCED_VARIABLE_NAMES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_REFERENCED_VARIABLE_NAMES, __pyx_t_4) < 0) __PYX_ERR(0, 1666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1672
 *     #: Option type: unsigned int
 *     #: Applies to: link-time optimization specified with CU_JIT_LTO
 *     CU_JIT_REFERENCED_VARIABLE_COUNT = ccuda.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_COUNT             # <<<<<<<<<<<<<<
 * 
 *     #: This option serves as a hint to enable the JIT compiler/linker to
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_REFERENCED_VARIABLE_COUNT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_REFERENCED_VARIABLE_COUNT, __pyx_t_4) < 0) __PYX_ERR(0, 1672, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1683
 *     #: Option type: int
 *     #: Applies to: link-time optimization specified with CU_JIT_LTO
 *     CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES = ccuda.CUjit_option_enum.CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES             # <<<<<<<<<<<<<<
 *     CU_JIT_NUM_OPTIONS = ccuda.CUjit_option_enum.CU_JIT_NUM_OPTIONS
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_OPTIMIZE_UNUSED_DEVICE_VA, __pyx_t_4) < 0) __PYX_ERR(0, 1683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1684
 *     #: Applies to: link-time optimization specified with CU_JIT_LTO
 *     CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES = ccuda.CUjit_option_enum.CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES
 *     CU_JIT_NUM_OPTIONS = ccuda.CUjit_option_enum.CU_JIT_NUM_OPTIONS             # <<<<<<<<<<<<<<
 * 
 * class CUjit_target(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_option_enum(CU_JIT_NUM_OPTIONS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_NUM_OPTIONS, __pyx_t_4) < 0) __PYX_ERR(0, 1684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1457
 *     CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = ccuda.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION
 * 
 * class CUjit_option(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Online compiler and linker options
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUjit_option, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUjit_option, __pyx_t_4) < 0) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":1686
 *     CU_JIT_NUM_OPTIONS = ccuda.CUjit_option_enum.CU_JIT_NUM_OPTIONS
 * 
 * class CUjit_target(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Online compilation targets
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUjit_target, __pyx_n_s_CUjit_target, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Online_compilation_targets); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1694
 * 
 *     #: Compute device class 3.0
 *     CU_TARGET_COMPUTE_30 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_30             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 3.2
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_30); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_30, __pyx_t_4) < 0) __PYX_ERR(0, 1694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1697
 * 
 *     #: Compute device class 3.2
 *     CU_TARGET_COMPUTE_32 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_32             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 3.5
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_32, __pyx_t_4) < 0) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1700
 * 
 *     #: Compute device class 3.5
 *     CU_TARGET_COMPUTE_35 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_35             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 3.7
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_35); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_35, __pyx_t_4) < 0) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1703
 * 
 *     #: Compute device class 3.7
 *     CU_TARGET_COMPUTE_37 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_37             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 5.0
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_37); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_37, __pyx_t_4) < 0) __PYX_ERR(0, 1703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1706
 * 
 *     #: Compute device class 5.0
 *     CU_TARGET_COMPUTE_50 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_50             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 5.2
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_50); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_50, __pyx_t_4) < 0) __PYX_ERR(0, 1706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1709
 * 
 *     #: Compute device class 5.2
 *     CU_TARGET_COMPUTE_52 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_52             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 5.3
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_52); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_52, __pyx_t_4) < 0) __PYX_ERR(0, 1709, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1712
 * 
 *     #: Compute device class 5.3
 *     CU_TARGET_COMPUTE_53 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_53             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 6.0.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_53); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_53, __pyx_t_4) < 0) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1715
 * 
 *     #: Compute device class 6.0.
 *     CU_TARGET_COMPUTE_60 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_60             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 6.1.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_60); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_60, __pyx_t_4) < 0) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1718
 * 
 *     #: Compute device class 6.1.
 *     CU_TARGET_COMPUTE_61 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_61             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 6.2.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_61); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_61, __pyx_t_4) < 0) __PYX_ERR(0, 1718, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1721
 * 
 *     #: Compute device class 6.2.
 *     CU_TARGET_COMPUTE_62 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_62             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 7.0.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_62); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_62, __pyx_t_4) < 0) __PYX_ERR(0, 1721, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1724
 * 
 *     #: Compute device class 7.0.
 *     CU_TARGET_COMPUTE_70 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_70             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 7.2.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_70); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_70, __pyx_t_4) < 0) __PYX_ERR(0, 1724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1727
 * 
 *     #: Compute device class 7.2.
 *     CU_TARGET_COMPUTE_72 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_72             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 7.5.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_72); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_72, __pyx_t_4) < 0) __PYX_ERR(0, 1727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1730
 * 
 *     #: Compute device class 7.5.
 *     CU_TARGET_COMPUTE_75 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_75             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 8.0.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_75); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_75, __pyx_t_4) < 0) __PYX_ERR(0, 1730, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1733
 * 
 *     #: Compute device class 8.0.
 *     CU_TARGET_COMPUTE_80 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_80             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 8.6.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_80); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_80, __pyx_t_4) < 0) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1736
 * 
 *     #: Compute device class 8.6.
 *     CU_TARGET_COMPUTE_86 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_86             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 8.7.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_86); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_86, __pyx_t_4) < 0) __PYX_ERR(0, 1736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1739
 * 
 *     #: Compute device class 8.7.
 *     CU_TARGET_COMPUTE_87 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_87             # <<<<<<<<<<<<<<
 * 
 *     #: Compute device class 8.9.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_87); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_87, __pyx_t_4) < 0) __PYX_ERR(0, 1739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1742
 * 
 *     #: Compute device class 8.9.
 *     CU_TARGET_COMPUTE_89 = ccuda.CUjit_target_enum.CU_TARGET_COMPUTE_89             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_target_enum(CU_TARGET_COMPUTE_89); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_TARGET_COMPUTE_89, __pyx_t_4) < 0) __PYX_ERR(0, 1742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1686
 *     CU_JIT_NUM_OPTIONS = ccuda.CUjit_option_enum.CU_JIT_NUM_OPTIONS
 * 
 * class CUjit_target(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Online compilation targets
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUjit_target, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUjit_target, __pyx_t_4) < 0) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":1745
 * 
 * 
 * class CUjit_fallback(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Cubin matching fallback strategies
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUjit_fallback, __pyx_n_s_CUjit_fallback, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Cubin_matching_fallback_strateg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1751
 * 
 *     #: Prefer to compile ptx if exact binary match not found
 *     CU_PREFER_PTX = ccuda.CUjit_fallback_enum.CU_PREFER_PTX             # <<<<<<<<<<<<<<
 * 
 *     #: Prefer to fall back to compatible binary code if exact match not
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_fallback_enum(CU_PREFER_PTX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_PREFER_PTX, __pyx_t_4) < 0) __PYX_ERR(0, 1751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1755
 *     #: Prefer to fall back to compatible binary code if exact match not
 *     #: found
 *     CU_PREFER_BINARY = ccuda.CUjit_fallback_enum.CU_PREFER_BINARY             # <<<<<<<<<<<<<<
 * 
 * class CUjit_cacheMode(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_fallback_enum(CU_PREFER_BINARY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_PREFER_BINARY, __pyx_t_4) < 0) __PYX_ERR(0, 1755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1745
 * 
 * 
 * class CUjit_fallback(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Cubin matching fallback strategies
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUjit_fallback, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUjit_fallback, __pyx_t_4) < 0) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":1757
 *     CU_PREFER_BINARY = ccuda.CUjit_fallback_enum.CU_PREFER_BINARY
 * 
 * class CUjit_cacheMode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Caching modes for dlcm
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUjit_cacheMode, __pyx_n_s_CUjit_cacheMode, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Caching_modes_for_dlcm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1763
 * 
 *     #: Compile with no -dlcm flag specified
 *     CU_JIT_CACHE_OPTION_NONE = ccuda.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_NONE             # <<<<<<<<<<<<<<
 * 
 *     #: Compile with L1 cache disabled
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_cacheMode_enum(CU_JIT_CACHE_OPTION_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_CACHE_OPTION_NONE, __pyx_t_4) < 0) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1766
 * 
 *     #: Compile with L1 cache disabled
 *     CU_JIT_CACHE_OPTION_CG = ccuda.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_CG             # <<<<<<<<<<<<<<
 * 
 *     #: Compile with L1 cache enabled
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_cacheMode_enum(CU_JIT_CACHE_OPTION_CG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_CACHE_OPTION_CG, __pyx_t_4) < 0) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1769
 * 
 *     #: Compile with L1 cache enabled
 *     CU_JIT_CACHE_OPTION_CA = ccuda.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_CA             # <<<<<<<<<<<<<<
 * 
 * class CUjitInputType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjit_cacheMode_enum(CU_JIT_CACHE_OPTION_CA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_CACHE_OPTION_CA, __pyx_t_4) < 0) __PYX_ERR(0, 1769, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1757
 *     CU_PREFER_BINARY = ccuda.CUjit_fallback_enum.CU_PREFER_BINARY
 * 
 * class CUjit_cacheMode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Caching modes for dlcm
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUjit_cacheMode, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUjit_cacheMode, __pyx_t_4) < 0) __PYX_ERR(0, 1757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":1771
 *     CU_JIT_CACHE_OPTION_CA = ccuda.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_CA
 * 
 * class CUjitInputType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Device code formats
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUjitInputType, __pyx_n_s_CUjitInputType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Device_code_formats); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1778
 *     #: Compiled device-class-specific device code
 *     #: Applicable options: none
 *     CU_JIT_INPUT_CUBIN = ccuda.CUjitInputType_enum.CU_JIT_INPUT_CUBIN             # <<<<<<<<<<<<<<
 * 
 *     #: PTX source code
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjitInputType_enum(CU_JIT_INPUT_CUBIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_INPUT_CUBIN, __pyx_t_4) < 0) __PYX_ERR(0, 1778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1782
 *     #: PTX source code
 *     #: Applicable options: PTX compiler options
 *     CU_JIT_INPUT_PTX = ccuda.CUjitInputType_enum.CU_JIT_INPUT_PTX             # <<<<<<<<<<<<<<
 * 
 *     #: Bundle of multiple cubins and/or PTX of some device code
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjitInputType_enum(CU_JIT_INPUT_PTX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_INPUT_PTX, __pyx_t_4) < 0) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1787
 *     #: Applicable options: PTX compiler options,
 *     #: :py:obj:`~.CU_JIT_FALLBACK_STRATEGY`
 *     CU_JIT_INPUT_FATBINARY = ccuda.CUjitInputType_enum.CU_JIT_INPUT_FATBINARY             # <<<<<<<<<<<<<<
 * 
 *     #: Host object with embedded device code
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjitInputType_enum(CU_JIT_INPUT_FATBINARY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_INPUT_FATBINARY, __pyx_t_4) < 0) __PYX_ERR(0, 1787, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1792
 *     #: Applicable options: PTX compiler options,
 *     #: :py:obj:`~.CU_JIT_FALLBACK_STRATEGY`
 *     CU_JIT_INPUT_OBJECT = ccuda.CUjitInputType_enum.CU_JIT_INPUT_OBJECT             # <<<<<<<<<<<<<<
 * 
 *     #: Archive of host objects with embedded device code
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjitInputType_enum(CU_JIT_INPUT_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_INPUT_OBJECT, __pyx_t_4) < 0) __PYX_ERR(0, 1792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1797
 *     #: Applicable options: PTX compiler options,
 *     #: :py:obj:`~.CU_JIT_FALLBACK_STRATEGY`
 *     CU_JIT_INPUT_LIBRARY = ccuda.CUjitInputType_enum.CU_JIT_INPUT_LIBRARY             # <<<<<<<<<<<<<<
 * 
 *     #: High-level intermediate code for link-time optimization
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjitInputType_enum(CU_JIT_INPUT_LIBRARY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_INPUT_LIBRARY, __pyx_t_4) < 0) __PYX_ERR(0, 1797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1801
 *     #: High-level intermediate code for link-time optimization
 *     #: Applicable options: NVVM compiler options, PTX compiler options
 *     CU_JIT_INPUT_NVVM = ccuda.CUjitInputType_enum.CU_JIT_INPUT_NVVM             # <<<<<<<<<<<<<<
 *     CU_JIT_NUM_INPUT_TYPES = ccuda.CUjitInputType_enum.CU_JIT_NUM_INPUT_TYPES
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjitInputType_enum(CU_JIT_INPUT_NVVM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_INPUT_NVVM, __pyx_t_4) < 0) __PYX_ERR(0, 1801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1802
 *     #: Applicable options: NVVM compiler options, PTX compiler options
 *     CU_JIT_INPUT_NVVM = ccuda.CUjitInputType_enum.CU_JIT_INPUT_NVVM
 *     CU_JIT_NUM_INPUT_TYPES = ccuda.CUjitInputType_enum.CU_JIT_NUM_INPUT_TYPES             # <<<<<<<<<<<<<<
 * 
 * class CUgraphicsRegisterFlags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUjitInputType_enum(CU_JIT_NUM_INPUT_TYPES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_JIT_NUM_INPUT_TYPES, __pyx_t_4) < 0) __PYX_ERR(0, 1802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1771
 *     CU_JIT_CACHE_OPTION_CA = ccuda.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_CA
 * 
 * class CUjitInputType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Device code formats
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUjitInputType, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUjitInputType, __pyx_t_4) < 0) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":1804
 *     CU_JIT_NUM_INPUT_TYPES = ccuda.CUjitInputType_enum.CU_JIT_NUM_INPUT_TYPES
 * 
 * class CUgraphicsRegisterFlags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags to register a graphics resource
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUgraphicsRegisterFlags, __pyx_n_s_CUgraphicsRegisterFlags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flags_to_register_a_graphics_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1808
 *     Flags to register a graphics resource
 *     """
 *     CU_GRAPHICS_REGISTER_FLAGS_NONE = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_NONE             # <<<<<<<<<<<<<<
 *     CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY
 *     CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphicsRegisterFlags_enum(CU_GRAPHICS_REGISTER_FLAGS_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_NONE, __pyx_t_4) < 0) __PYX_ERR(0, 1808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1809
 *     """
 *     CU_GRAPHICS_REGISTER_FLAGS_NONE = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_NONE
 *     CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY             # <<<<<<<<<<<<<<
 *     CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD
 *     CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphicsRegisterFlags_enum(CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_READ, __pyx_t_4) < 0) __PYX_ERR(0, 1809, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1810
 *     CU_GRAPHICS_REGISTER_FLAGS_NONE = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_NONE
 *     CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY
 *     CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD             # <<<<<<<<<<<<<<
 *     CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST
 *     CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphicsRegisterFlags_enum(CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_WRITE, __pyx_t_4) < 0) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1811
 *     CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY
 *     CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD
 *     CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST             # <<<<<<<<<<<<<<
 *     CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphicsRegisterFlags_enum(CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_SURFA, __pyx_t_4) < 0) __PYX_ERR(0, 1811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1812
 *     CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD
 *     CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST
 *     CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER             # <<<<<<<<<<<<<<
 * 
 * class CUgraphicsMapResourceFlags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphicsRegisterFlags_enum(CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPHICS_REGISTER_FLAGS_TEXTU, __pyx_t_4) < 0) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1804
 *     CU_JIT_NUM_INPUT_TYPES = ccuda.CUjitInputType_enum.CU_JIT_NUM_INPUT_TYPES
 * 
 * class CUgraphicsRegisterFlags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags to register a graphics resource
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUgraphicsRegisterFlags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUgraphicsRegisterFlags, __pyx_t_4) < 0) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":1814
 *     CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER
 * 
 * class CUgraphicsMapResourceFlags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for mapping and unmapping interop resources
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUgraphicsMapResourceFlags, __pyx_n_s_CUgraphicsMapResourceFlags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flags_for_mapping_and_unmapping); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1818
 *     Flags for mapping and unmapping interop resources
 *     """
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = ccuda.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE             # <<<<<<<<<<<<<<
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = ccuda.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = ccuda.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphicsMapResourceFlags_enum(CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPHICS_MAP_RESOURCE_FLAGS_N, __pyx_t_4) < 0) __PYX_ERR(0, 1818, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1819
 *     """
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = ccuda.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = ccuda.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY             # <<<<<<<<<<<<<<
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = ccuda.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphicsMapResourceFlags_enum(CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPHICS_MAP_RESOURCE_FLAGS_R, __pyx_t_4) < 0) __PYX_ERR(0, 1819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1820
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = ccuda.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = ccuda.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = ccuda.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD             # <<<<<<<<<<<<<<
 * 
 * class CUarray_cubemap_face(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphicsMapResourceFlags_enum(CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPHICS_MAP_RESOURCE_FLAGS_W, __pyx_t_4) < 0) __PYX_ERR(0, 1820, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1814
 *     CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = ccuda.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER
 * 
 * class CUgraphicsMapResourceFlags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for mapping and unmapping interop resources
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUgraphicsMapResourceFlags, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUgraphicsMapResourceFlags, __pyx_t_4) < 0) __PYX_ERR(0, 1814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":1822
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = ccuda.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD
 * 
 * class CUarray_cubemap_face(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Array indices for cube faces
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUarray_cubemap_face, __pyx_n_s_CUarray_cubemap_face, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Array_indices_for_cube_faces); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1828
 * 
 *     #: Positive X face of cubemap
 *     CU_CUBEMAP_FACE_POSITIVE_X = ccuda.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_POSITIVE_X             # <<<<<<<<<<<<<<
 * 
 *     #: Negative X face of cubemap
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_cubemap_face_enum(CU_CUBEMAP_FACE_POSITIVE_X); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CUBEMAP_FACE_POSITIVE_X, __pyx_t_4) < 0) __PYX_ERR(0, 1828, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1831
 * 
 *     #: Negative X face of cubemap
 *     CU_CUBEMAP_FACE_NEGATIVE_X = ccuda.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_X             # <<<<<<<<<<<<<<
 * 
 *     #: Positive Y face of cubemap
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_cubemap_face_enum(CU_CUBEMAP_FACE_NEGATIVE_X); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CUBEMAP_FACE_NEGATIVE_X, __pyx_t_4) < 0) __PYX_ERR(0, 1831, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1834
 * 
 *     #: Positive Y face of cubemap
 *     CU_CUBEMAP_FACE_POSITIVE_Y = ccuda.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_POSITIVE_Y             # <<<<<<<<<<<<<<
 * 
 *     #: Negative Y face of cubemap
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_cubemap_face_enum(CU_CUBEMAP_FACE_POSITIVE_Y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CUBEMAP_FACE_POSITIVE_Y, __pyx_t_4) < 0) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1837
 * 
 *     #: Negative Y face of cubemap
 *     CU_CUBEMAP_FACE_NEGATIVE_Y = ccuda.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_Y             # <<<<<<<<<<<<<<
 * 
 *     #: Positive Z face of cubemap
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_cubemap_face_enum(CU_CUBEMAP_FACE_NEGATIVE_Y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CUBEMAP_FACE_NEGATIVE_Y, __pyx_t_4) < 0) __PYX_ERR(0, 1837, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1840
 * 
 *     #: Positive Z face of cubemap
 *     CU_CUBEMAP_FACE_POSITIVE_Z = ccuda.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_POSITIVE_Z             # <<<<<<<<<<<<<<
 * 
 *     #: Negative Z face of cubemap
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_cubemap_face_enum(CU_CUBEMAP_FACE_POSITIVE_Z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CUBEMAP_FACE_POSITIVE_Z, __pyx_t_4) < 0) __PYX_ERR(0, 1840, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1843
 * 
 *     #: Negative Z face of cubemap
 *     CU_CUBEMAP_FACE_NEGATIVE_Z = ccuda.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_Z             # <<<<<<<<<<<<<<
 * 
 * class CUlimit(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarray_cubemap_face_enum(CU_CUBEMAP_FACE_NEGATIVE_Z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CUBEMAP_FACE_NEGATIVE_Z, __pyx_t_4) < 0) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1822
 *     CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = ccuda.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD
 * 
 * class CUarray_cubemap_face(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Array indices for cube faces
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUarray_cubemap_face, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUarray_cubemap_face, __pyx_t_4) < 0) __PYX_ERR(0, 1822, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":1845
 *     CU_CUBEMAP_FACE_NEGATIVE_Z = ccuda.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_Z
 * 
 * class CUlimit(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Limits
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUlimit, __pyx_n_s_CUlimit, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Limits); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1851
 * 
 *     #: GPU thread stack size
 *     CU_LIMIT_STACK_SIZE = ccuda.CUlimit_enum.CU_LIMIT_STACK_SIZE             # <<<<<<<<<<<<<<
 * 
 *     #: GPU printf FIFO size
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlimit_enum(CU_LIMIT_STACK_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LIMIT_STACK_SIZE, __pyx_t_4) < 0) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1854
 * 
 *     #: GPU printf FIFO size
 *     CU_LIMIT_PRINTF_FIFO_SIZE = ccuda.CUlimit_enum.CU_LIMIT_PRINTF_FIFO_SIZE             # <<<<<<<<<<<<<<
 * 
 *     #: GPU malloc heap size
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlimit_enum(CU_LIMIT_PRINTF_FIFO_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LIMIT_PRINTF_FIFO_SIZE, __pyx_t_4) < 0) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1857
 * 
 *     #: GPU malloc heap size
 *     CU_LIMIT_MALLOC_HEAP_SIZE = ccuda.CUlimit_enum.CU_LIMIT_MALLOC_HEAP_SIZE             # <<<<<<<<<<<<<<
 * 
 *     #: GPU device runtime launch synchronize depth
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlimit_enum(CU_LIMIT_MALLOC_HEAP_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LIMIT_MALLOC_HEAP_SIZE, __pyx_t_4) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1860
 * 
 *     #: GPU device runtime launch synchronize depth
 *     CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = ccuda.CUlimit_enum.CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH             # <<<<<<<<<<<<<<
 * 
 *     #: GPU device runtime pending launch count
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlimit_enum(CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH, __pyx_t_4) < 0) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1863
 * 
 *     #: GPU device runtime pending launch count
 *     CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = ccuda.CUlimit_enum.CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT             # <<<<<<<<<<<<<<
 * 
 *     #: A value between 0 and 128 that indicates the maximum fetch
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlimit_enum(CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LIMIT_DEV_RUNTIME_PENDING_LAU, __pyx_t_4) < 0) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1867
 *     #: A value between 0 and 128 that indicates the maximum fetch
 *     #: granularity of L2 (in Bytes). This is a hint
 *     CU_LIMIT_MAX_L2_FETCH_GRANULARITY = ccuda.CUlimit_enum.CU_LIMIT_MAX_L2_FETCH_GRANULARITY             # <<<<<<<<<<<<<<
 * 
 *     #: A size in bytes for L2 persisting lines cache size
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlimit_enum(CU_LIMIT_MAX_L2_FETCH_GRANULARITY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LIMIT_MAX_L2_FETCH_GRANULARIT, __pyx_t_4) < 0) __PYX_ERR(0, 1867, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1870
 * 
 *     #: A size in bytes for L2 persisting lines cache size
 *     CU_LIMIT_PERSISTING_L2_CACHE_SIZE = ccuda.CUlimit_enum.CU_LIMIT_PERSISTING_L2_CACHE_SIZE             # <<<<<<<<<<<<<<
 *     CU_LIMIT_MAX = ccuda.CUlimit_enum.CU_LIMIT_MAX
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlimit_enum(CU_LIMIT_PERSISTING_L2_CACHE_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LIMIT_PERSISTING_L2_CACHE_SIZ, __pyx_t_4) < 0) __PYX_ERR(0, 1870, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1871
 *     #: A size in bytes for L2 persisting lines cache size
 *     CU_LIMIT_PERSISTING_L2_CACHE_SIZE = ccuda.CUlimit_enum.CU_LIMIT_PERSISTING_L2_CACHE_SIZE
 *     CU_LIMIT_MAX = ccuda.CUlimit_enum.CU_LIMIT_MAX             # <<<<<<<<<<<<<<
 * 
 * class CUresourcetype(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlimit_enum(CU_LIMIT_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LIMIT_MAX, __pyx_t_4) < 0) __PYX_ERR(0, 1871, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1845
 *     CU_CUBEMAP_FACE_NEGATIVE_Z = ccuda.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_Z
 * 
 * class CUlimit(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Limits
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUlimit, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUlimit, __pyx_t_4) < 0) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":1873
 *     CU_LIMIT_MAX = ccuda.CUlimit_enum.CU_LIMIT_MAX
 * 
 * class CUresourcetype(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Resource types
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUresourcetype, __pyx_n_s_CUresourcetype, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Resource_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1879
 * 
 *     #: Array resoure
 *     CU_RESOURCE_TYPE_ARRAY = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY             # <<<<<<<<<<<<<<
 * 
 *     #: Mipmapped array resource
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourcetype_enum(CU_RESOURCE_TYPE_ARRAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RESOURCE_TYPE_ARRAY, __pyx_t_4) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1882
 * 
 *     #: Mipmapped array resource
 *     CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY             # <<<<<<<<<<<<<<
 * 
 *     #: Linear resource
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourcetype_enum(CU_RESOURCE_TYPE_MIPMAPPED_ARRAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RESOURCE_TYPE_MIPMAPPED_ARRAY, __pyx_t_4) < 0) __PYX_ERR(0, 1882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1885
 * 
 *     #: Linear resource
 *     CU_RESOURCE_TYPE_LINEAR = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR             # <<<<<<<<<<<<<<
 * 
 *     #: Pitch 2D resource
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourcetype_enum(CU_RESOURCE_TYPE_LINEAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RESOURCE_TYPE_LINEAR, __pyx_t_4) < 0) __PYX_ERR(0, 1885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1888
 * 
 *     #: Pitch 2D resource
 *     CU_RESOURCE_TYPE_PITCH2D = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D             # <<<<<<<<<<<<<<
 * 
 * class CUaccessProperty(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourcetype_enum(CU_RESOURCE_TYPE_PITCH2D); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RESOURCE_TYPE_PITCH2D, __pyx_t_4) < 0) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1873
 *     CU_LIMIT_MAX = ccuda.CUlimit_enum.CU_LIMIT_MAX
 * 
 * class CUresourcetype(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Resource types
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUresourcetype, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUresourcetype, __pyx_t_4) < 0) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":1890
 *     CU_RESOURCE_TYPE_PITCH2D = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D
 * 
 * class CUaccessProperty(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies performance hint with :py:obj:`~.CUaccessPolicyWindow`
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUaccessProperty, __pyx_n_s_CUaccessProperty, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Specifies_performance_hint_with); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1897
 * 
 *     #: Normal cache persistence.
 *     CU_ACCESS_PROPERTY_NORMAL = ccuda.CUaccessProperty_enum.CU_ACCESS_PROPERTY_NORMAL             # <<<<<<<<<<<<<<
 * 
 *     #: Streaming access is less likely to persit from cache.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUaccessProperty_enum(CU_ACCESS_PROPERTY_NORMAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_ACCESS_PROPERTY_NORMAL, __pyx_t_4) < 0) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1900
 * 
 *     #: Streaming access is less likely to persit from cache.
 *     CU_ACCESS_PROPERTY_STREAMING = ccuda.CUaccessProperty_enum.CU_ACCESS_PROPERTY_STREAMING             # <<<<<<<<<<<<<<
 * 
 *     #: Persisting access is more likely to persist in cache.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUaccessProperty_enum(CU_ACCESS_PROPERTY_STREAMING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_ACCESS_PROPERTY_STREAMING, __pyx_t_4) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1903
 * 
 *     #: Persisting access is more likely to persist in cache.
 *     CU_ACCESS_PROPERTY_PERSISTING = ccuda.CUaccessProperty_enum.CU_ACCESS_PROPERTY_PERSISTING             # <<<<<<<<<<<<<<
 * 
 * class CUgraphNodeType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUaccessProperty_enum(CU_ACCESS_PROPERTY_PERSISTING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_ACCESS_PROPERTY_PERSISTING, __pyx_t_4) < 0) __PYX_ERR(0, 1903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1890
 *     CU_RESOURCE_TYPE_PITCH2D = ccuda.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D
 * 
 * class CUaccessProperty(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies performance hint with :py:obj:`~.CUaccessPolicyWindow`
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUaccessProperty, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUaccessProperty, __pyx_t_4) < 0) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":1905
 *     CU_ACCESS_PROPERTY_PERSISTING = ccuda.CUaccessProperty_enum.CU_ACCESS_PROPERTY_PERSISTING
 * 
 * class CUgraphNodeType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Graph node types
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUgraphNodeType, __pyx_n_s_CUgraphNodeType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Graph_node_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1911
 * 
 *     #: GPU kernel node
 *     CU_GRAPH_NODE_TYPE_KERNEL = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_KERNEL             # <<<<<<<<<<<<<<
 * 
 *     #: Memcpy node
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_KERNEL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_KERNEL, __pyx_t_4) < 0) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1914
 * 
 *     #: Memcpy node
 *     CU_GRAPH_NODE_TYPE_MEMCPY = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEMCPY             # <<<<<<<<<<<<<<
 * 
 *     #: Memset node
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_MEMCPY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_MEMCPY, __pyx_t_4) < 0) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1917
 * 
 *     #: Memset node
 *     CU_GRAPH_NODE_TYPE_MEMSET = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEMSET             # <<<<<<<<<<<<<<
 * 
 *     #: Host (executable) node
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_MEMSET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_MEMSET, __pyx_t_4) < 0) __PYX_ERR(0, 1917, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1920
 * 
 *     #: Host (executable) node
 *     CU_GRAPH_NODE_TYPE_HOST = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_HOST             # <<<<<<<<<<<<<<
 * 
 *     #: Node which executes an embedded graph
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_HOST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_HOST, __pyx_t_4) < 0) __PYX_ERR(0, 1920, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1923
 * 
 *     #: Node which executes an embedded graph
 *     CU_GRAPH_NODE_TYPE_GRAPH = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_GRAPH             # <<<<<<<<<<<<<<
 * 
 *     #: Empty (no-op) node
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_GRAPH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_GRAPH, __pyx_t_4) < 0) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1926
 * 
 *     #: Empty (no-op) node
 *     CU_GRAPH_NODE_TYPE_EMPTY = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EMPTY             # <<<<<<<<<<<<<<
 * 
 *     #: External event wait node
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_EMPTY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_EMPTY, __pyx_t_4) < 0) __PYX_ERR(0, 1926, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1929
 * 
 *     #: External event wait node
 *     CU_GRAPH_NODE_TYPE_WAIT_EVENT = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_WAIT_EVENT             # <<<<<<<<<<<<<<
 * 
 *     #: External event record node
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_WAIT_EVENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_WAIT_EVENT, __pyx_t_4) < 0) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1932
 * 
 *     #: External event record node
 *     CU_GRAPH_NODE_TYPE_EVENT_RECORD = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EVENT_RECORD             # <<<<<<<<<<<<<<
 * 
 *     #: External semaphore signal node
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_EVENT_RECORD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_EVENT_RECORD, __pyx_t_4) < 0) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1935
 * 
 *     #: External semaphore signal node
 *     CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL             # <<<<<<<<<<<<<<
 * 
 *     #: External semaphore wait node
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIG, __pyx_t_4) < 0) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1938
 * 
 *     #: External semaphore wait node
 *     CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT             # <<<<<<<<<<<<<<
 * 
 *     #: Memory Allocation Node
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAI, __pyx_t_4) < 0) __PYX_ERR(0, 1938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1941
 * 
 *     #: Memory Allocation Node
 *     CU_GRAPH_NODE_TYPE_MEM_ALLOC = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEM_ALLOC             # <<<<<<<<<<<<<<
 * 
 *     #: Memory Free Node
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_MEM_ALLOC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_MEM_ALLOC, __pyx_t_4) < 0) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1944
 * 
 *     #: Memory Free Node
 *     CU_GRAPH_NODE_TYPE_MEM_FREE = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEM_FREE             # <<<<<<<<<<<<<<
 * 
 *     #: Batch MemOp Node
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_MEM_FREE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_MEM_FREE, __pyx_t_4) < 0) __PYX_ERR(0, 1944, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1947
 * 
 *     #: Batch MemOp Node
 *     CU_GRAPH_NODE_TYPE_BATCH_MEM_OP = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_BATCH_MEM_OP             # <<<<<<<<<<<<<<
 * 
 * class CUsynchronizationPolicy(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphNodeType_enum(CU_GRAPH_NODE_TYPE_BATCH_MEM_OP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_NODE_TYPE_BATCH_MEM_OP, __pyx_t_4) < 0) __PYX_ERR(0, 1947, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1905
 *     CU_ACCESS_PROPERTY_PERSISTING = ccuda.CUaccessProperty_enum.CU_ACCESS_PROPERTY_PERSISTING
 * 
 * class CUgraphNodeType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Graph node types
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUgraphNodeType, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUgraphNodeType, __pyx_t_4) < 0) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":1949
 *     CU_GRAPH_NODE_TYPE_BATCH_MEM_OP = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_BATCH_MEM_OP
 * 
 * class CUsynchronizationPolicy(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUsynchronizationPolicy, __pyx_n_s_CUsynchronizationPolicy, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s__1015); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1953
 * 
 *     """
 *     CU_SYNC_POLICY_AUTO = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_AUTO             # <<<<<<<<<<<<<<
 *     CU_SYNC_POLICY_SPIN = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_SPIN
 *     CU_SYNC_POLICY_YIELD = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_YIELD
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUsynchronizationPolicy_enum(CU_SYNC_POLICY_AUTO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_SYNC_POLICY_AUTO, __pyx_t_4) < 0) __PYX_ERR(0, 1953, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1954
 *     """
 *     CU_SYNC_POLICY_AUTO = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_AUTO
 *     CU_SYNC_POLICY_SPIN = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_SPIN             # <<<<<<<<<<<<<<
 *     CU_SYNC_POLICY_YIELD = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_YIELD
 *     CU_SYNC_POLICY_BLOCKING_SYNC = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_BLOCKING_SYNC
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUsynchronizationPolicy_enum(CU_SYNC_POLICY_SPIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_SYNC_POLICY_SPIN, __pyx_t_4) < 0) __PYX_ERR(0, 1954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1955
 *     CU_SYNC_POLICY_AUTO = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_AUTO
 *     CU_SYNC_POLICY_SPIN = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_SPIN
 *     CU_SYNC_POLICY_YIELD = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_YIELD             # <<<<<<<<<<<<<<
 *     CU_SYNC_POLICY_BLOCKING_SYNC = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_BLOCKING_SYNC
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUsynchronizationPolicy_enum(CU_SYNC_POLICY_YIELD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_SYNC_POLICY_YIELD, __pyx_t_4) < 0) __PYX_ERR(0, 1955, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1956
 *     CU_SYNC_POLICY_SPIN = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_SPIN
 *     CU_SYNC_POLICY_YIELD = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_YIELD
 *     CU_SYNC_POLICY_BLOCKING_SYNC = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_BLOCKING_SYNC             # <<<<<<<<<<<<<<
 * 
 * class CUclusterSchedulingPolicy(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUsynchronizationPolicy_enum(CU_SYNC_POLICY_BLOCKING_SYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_SYNC_POLICY_BLOCKING_SYNC, __pyx_t_4) < 0) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1949
 *     CU_GRAPH_NODE_TYPE_BATCH_MEM_OP = ccuda.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_BATCH_MEM_OP
 * 
 * class CUsynchronizationPolicy(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUsynchronizationPolicy, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUsynchronizationPolicy, __pyx_t_4) < 0) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":1958
 *     CU_SYNC_POLICY_BLOCKING_SYNC = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_BLOCKING_SYNC
 * 
 * class CUclusterSchedulingPolicy(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Cluster scheduling policies. These may be passed to
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUclusterSchedulingPolicy, __pyx_n_s_CUclusterSchedulingPolicy, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Cluster_scheduling_policies_The); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1965
 * 
 *     #: the default policy
 *     CU_CLUSTER_SCHEDULING_POLICY_DEFAULT = ccuda.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_DEFAULT             # <<<<<<<<<<<<<<
 * 
 *     #: spread the blocks within a cluster to the SMs
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUclusterSchedulingPolicy_enum(CU_CLUSTER_SCHEDULING_POLICY_DEFAULT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CLUSTER_SCHEDULING_POLICY_DEF, __pyx_t_4) < 0) __PYX_ERR(0, 1965, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1968
 * 
 *     #: spread the blocks within a cluster to the SMs
 *     CU_CLUSTER_SCHEDULING_POLICY_SPREAD = ccuda.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_SPREAD             # <<<<<<<<<<<<<<
 * 
 *     #: allow the hardware to load-balance the blocks in a cluster to the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUclusterSchedulingPolicy_enum(CU_CLUSTER_SCHEDULING_POLICY_SPREAD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CLUSTER_SCHEDULING_POLICY_SPR, __pyx_t_4) < 0) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1972
 *     #: allow the hardware to load-balance the blocks in a cluster to the
 *     #: SMs
 *     CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING = ccuda.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING             # <<<<<<<<<<<<<<
 * 
 * class CUlaunchAttributeID(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUclusterSchedulingPolicy_enum(CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_CLUSTER_SCHEDULING_POLICY_LOA, __pyx_t_4) < 0) __PYX_ERR(0, 1972, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1958
 *     CU_SYNC_POLICY_BLOCKING_SYNC = ccuda.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_BLOCKING_SYNC
 * 
 * class CUclusterSchedulingPolicy(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Cluster scheduling policies. These may be passed to
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUclusterSchedulingPolicy, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUclusterSchedulingPolicy, __pyx_t_4) < 0) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":1974
 *     CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING = ccuda.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING
 * 
 * class CUlaunchAttributeID(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUlaunchAttributeID, __pyx_n_s_CUlaunchAttributeID, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s__1015); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":1980
 * 
 *     #: Ignored entry, for convenient composition
 *     CU_LAUNCH_ATTRIBUTE_IGNORE = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_IGNORE             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for streams, graph nodes, launches.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_IGNORE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_IGNORE, __pyx_t_4) < 0) __PYX_ERR(0, 1980, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1983
 * 
 *     #: Valid for streams, graph nodes, launches.
 *     CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for graph nodes, launches.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_ACCESS_POLIC, __pyx_t_4) < 0) __PYX_ERR(0, 1983, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1986
 * 
 *     #: Valid for graph nodes, launches.
 *     CU_LAUNCH_ATTRIBUTE_COOPERATIVE = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_COOPERATIVE             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for streams.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_COOPERATIVE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_COOPERATIVE, __pyx_t_4) < 0) __PYX_ERR(0, 1986, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1989
 * 
 *     #: Valid for streams.
 *     CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for graph nodes, launches.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_SYNCHRONIZAT, __pyx_t_4) < 0) __PYX_ERR(0, 1989, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1992
 * 
 *     #: Valid for graph nodes, launches.
 *     CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for graph nodes, launches.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_CLUSTER_DIME, __pyx_t_4) < 0) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1995
 * 
 *     #: Valid for graph nodes, launches.
 *     CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for launches. Setting programmaticStreamSerializationAllowed
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHE, __pyx_t_4) < 0) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2002
 *     #: opportunistically allow the grid's execution to overlap with the
 *     #: previous kernel in the stream, if that kernel requests the overlap.
 *     CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for launches. Event recorded through this launch attribute is
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC, __pyx_t_4) < 0) __PYX_ERR(0, 2002, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2018
 *     #: interop event. The event must disable timing (i.e. created with
 *     #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set).
 *     CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for graph nodes.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_2, __pyx_t_4) < 0) __PYX_ERR(0, 2018, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2021
 * 
 *     #: Valid for graph nodes.
 *     CU_LAUNCH_ATTRIBUTE_PRIORITY = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY             # <<<<<<<<<<<<<<
 * 
 * class CUkernelNodeAttrID(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_PRIORITY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_PRIORITY, __pyx_t_4) < 0) __PYX_ERR(0, 2021, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":1974
 *     CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING = ccuda.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING
 * 
 * class CUlaunchAttributeID(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUlaunchAttributeID, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUlaunchAttributeID, __pyx_t_4) < 0) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":2023
 *     CU_LAUNCH_ATTRIBUTE_PRIORITY = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY
 * 
 * class CUkernelNodeAttrID(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUkernelNodeAttrID, __pyx_n_s_CUkernelNodeAttrID, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s__1015); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2029
 * 
 *     #: Ignored entry, for convenient composition
 *     CU_LAUNCH_ATTRIBUTE_IGNORE = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_IGNORE             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for streams, graph nodes, launches.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_IGNORE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_IGNORE, __pyx_t_4) < 0) __PYX_ERR(0, 2029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2032
 * 
 *     #: Valid for streams, graph nodes, launches.
 *     CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for graph nodes, launches.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_ACCESS_POLIC, __pyx_t_4) < 0) __PYX_ERR(0, 2032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2035
 * 
 *     #: Valid for graph nodes, launches.
 *     CU_LAUNCH_ATTRIBUTE_COOPERATIVE = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_COOPERATIVE             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for streams.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_COOPERATIVE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_COOPERATIVE, __pyx_t_4) < 0) __PYX_ERR(0, 2035, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2038
 * 
 *     #: Valid for streams.
 *     CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for graph nodes, launches.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_SYNCHRONIZAT, __pyx_t_4) < 0) __PYX_ERR(0, 2038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2041
 * 
 *     #: Valid for graph nodes, launches.
 *     CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for graph nodes, launches.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_CLUSTER_DIME, __pyx_t_4) < 0) __PYX_ERR(0, 2041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2044
 * 
 *     #: Valid for graph nodes, launches.
 *     CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for launches. Setting programmaticStreamSerializationAllowed
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHE, __pyx_t_4) < 0) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2051
 *     #: opportunistically allow the grid's execution to overlap with the
 *     #: previous kernel in the stream, if that kernel requests the overlap.
 *     CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for launches. Event recorded through this launch attribute is
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC, __pyx_t_4) < 0) __PYX_ERR(0, 2051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2067
 *     #: interop event. The event must disable timing (i.e. created with
 *     #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set).
 *     CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for graph nodes.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_2, __pyx_t_4) < 0) __PYX_ERR(0, 2067, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2070
 * 
 *     #: Valid for graph nodes.
 *     CU_LAUNCH_ATTRIBUTE_PRIORITY = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY             # <<<<<<<<<<<<<<
 * 
 * class CUstreamAttrID(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_PRIORITY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_PRIORITY, __pyx_t_4) < 0) __PYX_ERR(0, 2070, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2023
 *     CU_LAUNCH_ATTRIBUTE_PRIORITY = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY
 * 
 * class CUkernelNodeAttrID(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUkernelNodeAttrID, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUkernelNodeAttrID, __pyx_t_4) < 0) __PYX_ERR(0, 2023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":2072
 *     CU_LAUNCH_ATTRIBUTE_PRIORITY = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY
 * 
 * class CUstreamAttrID(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUstreamAttrID, __pyx_n_s_CUstreamAttrID, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s__1015); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2078
 * 
 *     #: Ignored entry, for convenient composition
 *     CU_LAUNCH_ATTRIBUTE_IGNORE = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_IGNORE             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for streams, graph nodes, launches.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_IGNORE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_IGNORE, __pyx_t_4) < 0) __PYX_ERR(0, 2078, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2081
 * 
 *     #: Valid for streams, graph nodes, launches.
 *     CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for graph nodes, launches.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_ACCESS_POLIC, __pyx_t_4) < 0) __PYX_ERR(0, 2081, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2084
 * 
 *     #: Valid for graph nodes, launches.
 *     CU_LAUNCH_ATTRIBUTE_COOPERATIVE = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_COOPERATIVE             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for streams.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_COOPERATIVE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_COOPERATIVE, __pyx_t_4) < 0) __PYX_ERR(0, 2084, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2087
 * 
 *     #: Valid for streams.
 *     CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for graph nodes, launches.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_SYNCHRONIZAT, __pyx_t_4) < 0) __PYX_ERR(0, 2087, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2090
 * 
 *     #: Valid for graph nodes, launches.
 *     CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for graph nodes, launches.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_CLUSTER_DIME, __pyx_t_4) < 0) __PYX_ERR(0, 2090, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2093
 * 
 *     #: Valid for graph nodes, launches.
 *     CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for launches. Setting programmaticStreamSerializationAllowed
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHE, __pyx_t_4) < 0) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2100
 *     #: opportunistically allow the grid's execution to overlap with the
 *     #: previous kernel in the stream, if that kernel requests the overlap.
 *     CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for launches. Event recorded through this launch attribute is
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC, __pyx_t_4) < 0) __PYX_ERR(0, 2100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2116
 *     #: interop event. The event must disable timing (i.e. created with
 *     #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set).
 *     CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT             # <<<<<<<<<<<<<<
 * 
 *     #: Valid for graph nodes.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_2, __pyx_t_4) < 0) __PYX_ERR(0, 2116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2119
 * 
 *     #: Valid for graph nodes.
 *     CU_LAUNCH_ATTRIBUTE_PRIORITY = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY             # <<<<<<<<<<<<<<
 * 
 * class CUstreamCaptureStatus(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(CU_LAUNCH_ATTRIBUTE_PRIORITY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_LAUNCH_ATTRIBUTE_PRIORITY, __pyx_t_4) < 0) __PYX_ERR(0, 2119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2072
 *     CU_LAUNCH_ATTRIBUTE_PRIORITY = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY
 * 
 * class CUstreamAttrID(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUstreamAttrID, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUstreamAttrID, __pyx_t_4) < 0) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":2121
 *     CU_LAUNCH_ATTRIBUTE_PRIORITY = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY
 * 
 * class CUstreamCaptureStatus(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Possible stream capture statuses returned by
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUstreamCaptureStatus, __pyx_n_s_CUstreamCaptureStatus, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Possible_stream_capture_statuse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2128
 * 
 *     #: Stream is not capturing
 *     CU_STREAM_CAPTURE_STATUS_NONE = ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_NONE             # <<<<<<<<<<<<<<
 * 
 *     #: Stream is actively capturing
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamCaptureStatus_enum(CU_STREAM_CAPTURE_STATUS_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_CAPTURE_STATUS_NONE, __pyx_t_4) < 0) __PYX_ERR(0, 2128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2131
 * 
 *     #: Stream is actively capturing
 *     CU_STREAM_CAPTURE_STATUS_ACTIVE = ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_ACTIVE             # <<<<<<<<<<<<<<
 * 
 *     #: Stream is part of a capture sequence that has been invalidated, but
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamCaptureStatus_enum(CU_STREAM_CAPTURE_STATUS_ACTIVE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_CAPTURE_STATUS_ACTIVE, __pyx_t_4) < 0) __PYX_ERR(0, 2131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2135
 *     #: Stream is part of a capture sequence that has been invalidated, but
 *     #: not terminated
 *     CU_STREAM_CAPTURE_STATUS_INVALIDATED = ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_INVALIDATED             # <<<<<<<<<<<<<<
 * 
 * class CUstreamCaptureMode(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamCaptureStatus_enum(CU_STREAM_CAPTURE_STATUS_INVALIDATED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_CAPTURE_STATUS_INVALID, __pyx_t_4) < 0) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2121
 *     CU_LAUNCH_ATTRIBUTE_PRIORITY = ccuda.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY
 * 
 * class CUstreamCaptureStatus(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Possible stream capture statuses returned by
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUstreamCaptureStatus, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUstreamCaptureStatus, __pyx_t_4) < 0) __PYX_ERR(0, 2121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":2137
 *     CU_STREAM_CAPTURE_STATUS_INVALIDATED = ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_INVALIDATED
 * 
 * class CUstreamCaptureMode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Possible modes for stream capture thread interactions. For more
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUstreamCaptureMode, __pyx_n_s_CUstreamCaptureMode, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Possible_modes_for_stream_captu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2143
 *     :py:obj:`~.cuThreadExchangeStreamCaptureMode`
 *     """
 *     CU_STREAM_CAPTURE_MODE_GLOBAL = ccuda.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_GLOBAL             # <<<<<<<<<<<<<<
 *     CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = ccuda.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_THREAD_LOCAL
 *     CU_STREAM_CAPTURE_MODE_RELAXED = ccuda.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_RELAXED
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamCaptureMode_enum(CU_STREAM_CAPTURE_MODE_GLOBAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_CAPTURE_MODE_GLOBAL, __pyx_t_4) < 0) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2144
 *     """
 *     CU_STREAM_CAPTURE_MODE_GLOBAL = ccuda.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_GLOBAL
 *     CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = ccuda.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_THREAD_LOCAL             # <<<<<<<<<<<<<<
 *     CU_STREAM_CAPTURE_MODE_RELAXED = ccuda.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_RELAXED
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamCaptureMode_enum(CU_STREAM_CAPTURE_MODE_THREAD_LOCAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_CAPTURE_MODE_THREAD_LO, __pyx_t_4) < 0) __PYX_ERR(0, 2144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2145
 *     CU_STREAM_CAPTURE_MODE_GLOBAL = ccuda.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_GLOBAL
 *     CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = ccuda.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_THREAD_LOCAL
 *     CU_STREAM_CAPTURE_MODE_RELAXED = ccuda.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_RELAXED             # <<<<<<<<<<<<<<
 * 
 * class CUdriverProcAddress_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUstreamCaptureMode_enum(CU_STREAM_CAPTURE_MODE_RELAXED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_STREAM_CAPTURE_MODE_RELAXED, __pyx_t_4) < 0) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2137
 *     CU_STREAM_CAPTURE_STATUS_INVALIDATED = ccuda.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_INVALIDATED
 * 
 * class CUstreamCaptureMode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Possible modes for stream capture thread interactions. For more
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUstreamCaptureMode, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUstreamCaptureMode, __pyx_t_4) < 0) __PYX_ERR(0, 2137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":2147
 *     CU_STREAM_CAPTURE_MODE_RELAXED = ccuda.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_RELAXED
 * 
 * class CUdriverProcAddress_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags to specify search options. For more details see
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUdriverProcAddress_flags, __pyx_n_s_CUdriverProcAddress_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flags_to_specify_search_options); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2154
 * 
 *     #: Default search mode for driver symbols.
 *     CU_GET_PROC_ADDRESS_DEFAULT = ccuda.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_DEFAULT             # <<<<<<<<<<<<<<
 * 
 *     #: Search for legacy versions of driver symbols.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdriverProcAddress_flags_enum(CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GET_PROC_ADDRESS_DEFAULT, __pyx_t_4) < 0) __PYX_ERR(0, 2154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2157
 * 
 *     #: Search for legacy versions of driver symbols.
 *     CU_GET_PROC_ADDRESS_LEGACY_STREAM = ccuda.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_LEGACY_STREAM             # <<<<<<<<<<<<<<
 * 
 *     #: Search for per-thread versions of driver symbols.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdriverProcAddress_flags_enum(CU_GET_PROC_ADDRESS_LEGACY_STREAM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GET_PROC_ADDRESS_LEGACY_STREA, __pyx_t_4) < 0) __PYX_ERR(0, 2157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2160
 * 
 *     #: Search for per-thread versions of driver symbols.
 *     CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = ccuda.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM             # <<<<<<<<<<<<<<
 * 
 * class CUexecAffinityType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdriverProcAddress_flags_enum(CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GET_PROC_ADDRESS_PER_THREAD_D, __pyx_t_4) < 0) __PYX_ERR(0, 2160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2147
 *     CU_STREAM_CAPTURE_MODE_RELAXED = ccuda.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_RELAXED
 * 
 * class CUdriverProcAddress_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags to specify search options. For more details see
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUdriverProcAddress_flags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUdriverProcAddress_flags, __pyx_t_4) < 0) __PYX_ERR(0, 2147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":2162
 *     CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = ccuda.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM
 * 
 * class CUexecAffinityType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Execution Affinity Types
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUexecAffinityType, __pyx_n_s_CUexecAffinityType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Execution_Affinity_Types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2168
 * 
 *     #: Create a context with limited SMs.
 *     CU_EXEC_AFFINITY_TYPE_SM_COUNT = ccuda.CUexecAffinityType_enum.CU_EXEC_AFFINITY_TYPE_SM_COUNT             # <<<<<<<<<<<<<<
 *     CU_EXEC_AFFINITY_TYPE_MAX = ccuda.CUexecAffinityType_enum.CU_EXEC_AFFINITY_TYPE_MAX
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexecAffinityType_enum(CU_EXEC_AFFINITY_TYPE_SM_COUNT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXEC_AFFINITY_TYPE_SM_COUNT, __pyx_t_4) < 0) __PYX_ERR(0, 2168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2169
 *     #: Create a context with limited SMs.
 *     CU_EXEC_AFFINITY_TYPE_SM_COUNT = ccuda.CUexecAffinityType_enum.CU_EXEC_AFFINITY_TYPE_SM_COUNT
 *     CU_EXEC_AFFINITY_TYPE_MAX = ccuda.CUexecAffinityType_enum.CU_EXEC_AFFINITY_TYPE_MAX             # <<<<<<<<<<<<<<
 * 
 * class CUresult(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexecAffinityType_enum(CU_EXEC_AFFINITY_TYPE_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXEC_AFFINITY_TYPE_MAX, __pyx_t_4) < 0) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2162
 *     CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = ccuda.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM
 * 
 * class CUexecAffinityType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Execution Affinity Types
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUexecAffinityType, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUexecAffinityType, __pyx_t_4) < 0) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":2171
 *     CU_EXEC_AFFINITY_TYPE_MAX = ccuda.CUexecAffinityType_enum.CU_EXEC_AFFINITY_TYPE_MAX
 * 
 * class CUresult(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Error codes
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUresult, __pyx_n_s_CUresult, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Error_codes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2179
 *     #: this also means that the operation being queried is complete (see
 *     #: :py:obj:`~.cuEventQuery()` and :py:obj:`~.cuStreamQuery()`).
 *     CUDA_SUCCESS = ccuda.cudaError_enum.CUDA_SUCCESS             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that one or more of the parameters passed to the API
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_SUCCESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_SUCCESS, __pyx_t_4) < 0) __PYX_ERR(0, 2179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2183
 *     #: This indicates that one or more of the parameters passed to the API
 *     #: call is not within an acceptable range of values.
 *     CUDA_ERROR_INVALID_VALUE = ccuda.cudaError_enum.CUDA_ERROR_INVALID_VALUE             # <<<<<<<<<<<<<<
 * 
 *     #: The API call failed because it was unable to allocate enough memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_INVALID_VALUE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_INVALID_VALUE, __pyx_t_4) < 0) __PYX_ERR(0, 2183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2187
 *     #: The API call failed because it was unable to allocate enough memory
 *     #: to perform the requested operation.
 *     CUDA_ERROR_OUT_OF_MEMORY = ccuda.cudaError_enum.CUDA_ERROR_OUT_OF_MEMORY             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the CUDA driver has not been initialized with
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_OUT_OF_MEMORY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_OUT_OF_MEMORY, __pyx_t_4) < 0) __PYX_ERR(0, 2187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2191
 *     #: This indicates that the CUDA driver has not been initialized with
 *     #: :py:obj:`~.cuInit()` or that initialization has failed.
 *     CUDA_ERROR_NOT_INITIALIZED = ccuda.cudaError_enum.CUDA_ERROR_NOT_INITIALIZED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the CUDA driver is in the process of shutting
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_NOT_INITIALIZED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_NOT_INITIALIZED, __pyx_t_4) < 0) __PYX_ERR(0, 2191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2195
 *     #: This indicates that the CUDA driver is in the process of shutting
 *     #: down.
 *     CUDA_ERROR_DEINITIALIZED = ccuda.cudaError_enum.CUDA_ERROR_DEINITIALIZED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates profiler is not initialized for this run. This can
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_DEINITIALIZED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_DEINITIALIZED, __pyx_t_4) < 0) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2200
 *     #: happen when the application is running with external profiling tools
 *     #: like visual profiler.
 *     CUDA_ERROR_PROFILER_DISABLED = ccuda.cudaError_enum.CUDA_ERROR_PROFILER_DISABLED             # <<<<<<<<<<<<<<
 * 
 *     #: [Deprecated]
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_PROFILER_DISABLED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_PROFILER_DISABLED, __pyx_t_4) < 0) __PYX_ERR(0, 2200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2203
 * 
 *     #: [Deprecated]
 *     CUDA_ERROR_PROFILER_NOT_INITIALIZED = ccuda.cudaError_enum.CUDA_ERROR_PROFILER_NOT_INITIALIZED             # <<<<<<<<<<<<<<
 * 
 *     #: [Deprecated]
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_PROFILER_NOT_INITIALIZED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_PROFILER_NOT_INITIALI, __pyx_t_4) < 0) __PYX_ERR(0, 2203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2206
 * 
 *     #: [Deprecated]
 *     CUDA_ERROR_PROFILER_ALREADY_STARTED = ccuda.cudaError_enum.CUDA_ERROR_PROFILER_ALREADY_STARTED             # <<<<<<<<<<<<<<
 * 
 *     #: [Deprecated]
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_PROFILER_ALREADY_STARTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_PROFILER_ALREADY_STAR, __pyx_t_4) < 0) __PYX_ERR(0, 2206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2209
 * 
 *     #: [Deprecated]
 *     CUDA_ERROR_PROFILER_ALREADY_STOPPED = ccuda.cudaError_enum.CUDA_ERROR_PROFILER_ALREADY_STOPPED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the CUDA driver that the application has loaded
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_PROFILER_ALREADY_STOPPED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_PROFILER_ALREADY_STOP, __pyx_t_4) < 0) __PYX_ERR(0, 2209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2214
 *     #: is a stub library. Applications that run with the stub rather than a
 *     #: real driver loaded will result in CUDA API returning this error.
 *     CUDA_ERROR_STUB_LIBRARY = ccuda.cudaError_enum.CUDA_ERROR_STUB_LIBRARY             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that requested CUDA device is unavailable at the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_STUB_LIBRARY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_STUB_LIBRARY, __pyx_t_4) < 0) __PYX_ERR(0, 2214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2220
 *     #: :py:obj:`~.CU_COMPUTEMODE_EXCLUSIVE_PROCESS` or
 *     #: :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`.
 *     CUDA_ERROR_DEVICE_UNAVAILABLE = ccuda.cudaError_enum.CUDA_ERROR_DEVICE_UNAVAILABLE             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that no CUDA-capable devices were detected by the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_DEVICE_UNAVAILABLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_DEVICE_UNAVAILABLE, __pyx_t_4) < 0) __PYX_ERR(0, 2220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2224
 *     #: This indicates that no CUDA-capable devices were detected by the
 *     #: installed CUDA driver.
 *     CUDA_ERROR_NO_DEVICE = ccuda.cudaError_enum.CUDA_ERROR_NO_DEVICE             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the device ordinal supplied by the user does not
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_NO_DEVICE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_NO_DEVICE, __pyx_t_4) < 0) __PYX_ERR(0, 2224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2229
 *     #: correspond to a valid CUDA device or that the action requested is
 *     #: invalid for the specified device.
 *     CUDA_ERROR_INVALID_DEVICE = ccuda.cudaError_enum.CUDA_ERROR_INVALID_DEVICE             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the Grid license is not applied.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_INVALID_DEVICE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_INVALID_DEVICE, __pyx_t_4) < 0) __PYX_ERR(0, 2229, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2232
 * 
 *     #: This error indicates that the Grid license is not applied.
 *     CUDA_ERROR_DEVICE_NOT_LICENSED = ccuda.cudaError_enum.CUDA_ERROR_DEVICE_NOT_LICENSED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the device kernel image is invalid. This can
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_DEVICE_NOT_LICENSED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_DEVICE_NOT_LICENSED, __pyx_t_4) < 0) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2236
 *     #: This indicates that the device kernel image is invalid. This can
 *     #: also indicate an invalid CUDA module.
 *     CUDA_ERROR_INVALID_IMAGE = ccuda.cudaError_enum.CUDA_ERROR_INVALID_IMAGE             # <<<<<<<<<<<<<<
 * 
 *     #: This most frequently indicates that there is no context bound to the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_INVALID_IMAGE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_INVALID_IMAGE, __pyx_t_4) < 0) __PYX_ERR(0, 2236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2244
 *     #: if a user mixes different API versions (i.e. 3010 context with 3020
 *     #: API calls). See :py:obj:`~.cuCtxGetApiVersion()` for more details.
 *     CUDA_ERROR_INVALID_CONTEXT = ccuda.cudaError_enum.CUDA_ERROR_INVALID_CONTEXT             # <<<<<<<<<<<<<<
 * 
 *     #: This indicated that the context being supplied as a parameter to the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_INVALID_CONTEXT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_INVALID_CONTEXT, __pyx_t_4) < 0) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2248
 *     #: This indicated that the context being supplied as a parameter to the
 *     #: API call was already the active context. [Deprecated]
 *     CUDA_ERROR_CONTEXT_ALREADY_CURRENT = ccuda.cudaError_enum.CUDA_ERROR_CONTEXT_ALREADY_CURRENT             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that a map or register operation has failed.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_CONTEXT_ALREADY_CURRENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_CONTEXT_ALREADY_CURRE, __pyx_t_4) < 0) __PYX_ERR(0, 2248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2251
 * 
 *     #: This indicates that a map or register operation has failed.
 *     CUDA_ERROR_MAP_FAILED = ccuda.cudaError_enum.CUDA_ERROR_MAP_FAILED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that an unmap or unregister operation has failed.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_MAP_FAILED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_MAP_FAILED, __pyx_t_4) < 0) __PYX_ERR(0, 2251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2254
 * 
 *     #: This indicates that an unmap or unregister operation has failed.
 *     CUDA_ERROR_UNMAP_FAILED = ccuda.cudaError_enum.CUDA_ERROR_UNMAP_FAILED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the specified array is currently mapped and thus
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_UNMAP_FAILED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_UNMAP_FAILED, __pyx_t_4) < 0) __PYX_ERR(0, 2254, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2258
 *     #: This indicates that the specified array is currently mapped and thus
 *     #: cannot be destroyed.
 *     CUDA_ERROR_ARRAY_IS_MAPPED = ccuda.cudaError_enum.CUDA_ERROR_ARRAY_IS_MAPPED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the resource is already mapped.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_ARRAY_IS_MAPPED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_ARRAY_IS_MAPPED, __pyx_t_4) < 0) __PYX_ERR(0, 2258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2261
 * 
 *     #: This indicates that the resource is already mapped.
 *     CUDA_ERROR_ALREADY_MAPPED = ccuda.cudaError_enum.CUDA_ERROR_ALREADY_MAPPED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that there is no kernel image available that is
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_ALREADY_MAPPED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_ALREADY_MAPPED, __pyx_t_4) < 0) __PYX_ERR(0, 2261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2267
 *     #: generation options for a particular CUDA source file that do not
 *     #: include the corresponding device configuration.
 *     CUDA_ERROR_NO_BINARY_FOR_GPU = ccuda.cudaError_enum.CUDA_ERROR_NO_BINARY_FOR_GPU             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that a resource has already been acquired.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_NO_BINARY_FOR_GPU); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_NO_BINARY_FOR_GPU, __pyx_t_4) < 0) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2270
 * 
 *     #: This indicates that a resource has already been acquired.
 *     CUDA_ERROR_ALREADY_ACQUIRED = ccuda.cudaError_enum.CUDA_ERROR_ALREADY_ACQUIRED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that a resource is not mapped.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_ALREADY_ACQUIRED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_ALREADY_ACQUIRED, __pyx_t_4) < 0) __PYX_ERR(0, 2270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2273
 * 
 *     #: This indicates that a resource is not mapped.
 *     CUDA_ERROR_NOT_MAPPED = ccuda.cudaError_enum.CUDA_ERROR_NOT_MAPPED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that a mapped resource is not available for access as
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_NOT_MAPPED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_NOT_MAPPED, __pyx_t_4) < 0) __PYX_ERR(0, 2273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2277
 *     #: This indicates that a mapped resource is not available for access as
 *     #: an array.
 *     CUDA_ERROR_NOT_MAPPED_AS_ARRAY = ccuda.cudaError_enum.CUDA_ERROR_NOT_MAPPED_AS_ARRAY             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that a mapped resource is not available for access as
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_NOT_MAPPED_AS_ARRAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_NOT_MAPPED_AS_ARRAY, __pyx_t_4) < 0) __PYX_ERR(0, 2277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2281
 *     #: This indicates that a mapped resource is not available for access as
 *     #: a pointer.
 *     CUDA_ERROR_NOT_MAPPED_AS_POINTER = ccuda.cudaError_enum.CUDA_ERROR_NOT_MAPPED_AS_POINTER             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that an uncorrectable ECC error was detected during
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_NOT_MAPPED_AS_POINTER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_NOT_MAPPED_AS_POINTER, __pyx_t_4) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2285
 *     #: This indicates that an uncorrectable ECC error was detected during
 *     #: execution.
 *     CUDA_ERROR_ECC_UNCORRECTABLE = ccuda.cudaError_enum.CUDA_ERROR_ECC_UNCORRECTABLE             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the :py:obj:`~.CUlimit` passed to the API call
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_ECC_UNCORRECTABLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_ECC_UNCORRECTABLE, __pyx_t_4) < 0) __PYX_ERR(0, 2285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2289
 *     #: This indicates that the :py:obj:`~.CUlimit` passed to the API call
 *     #: is not supported by the active device.
 *     CUDA_ERROR_UNSUPPORTED_LIMIT = ccuda.cudaError_enum.CUDA_ERROR_UNSUPPORTED_LIMIT             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the :py:obj:`~.CUcontext` passed to the API call
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_UNSUPPORTED_LIMIT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_UNSUPPORTED_LIMIT, __pyx_t_4) < 0) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2294
 *     #: can only be bound to a single CPU thread at a time but is already
 *     #: bound to a CPU thread.
 *     CUDA_ERROR_CONTEXT_ALREADY_IN_USE = ccuda.cudaError_enum.CUDA_ERROR_CONTEXT_ALREADY_IN_USE             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that peer access is not supported across the given
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_CONTEXT_ALREADY_IN_USE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_CONTEXT_ALREADY_IN_US, __pyx_t_4) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2298
 *     #: This indicates that peer access is not supported across the given
 *     #: devices.
 *     CUDA_ERROR_PEER_ACCESS_UNSUPPORTED = ccuda.cudaError_enum.CUDA_ERROR_PEER_ACCESS_UNSUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that a PTX JIT compilation failed.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_PEER_ACCESS_UNSUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_PEER_ACCESS_UNSUPPORT, __pyx_t_4) < 0) __PYX_ERR(0, 2298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2301
 * 
 *     #: This indicates that a PTX JIT compilation failed.
 *     CUDA_ERROR_INVALID_PTX = ccuda.cudaError_enum.CUDA_ERROR_INVALID_PTX             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates an error with OpenGL or DirectX context.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_INVALID_PTX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_INVALID_PTX, __pyx_t_4) < 0) __PYX_ERR(0, 2301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2304
 * 
 *     #: This indicates an error with OpenGL or DirectX context.
 *     CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = ccuda.cudaError_enum.CUDA_ERROR_INVALID_GRAPHICS_CONTEXT             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that an uncorrectable NVLink error was detected
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_INVALID_GRAPHICS_CONTEXT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_INVALID_GRAPHICS_CONT, __pyx_t_4) < 0) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2308
 *     #: This indicates that an uncorrectable NVLink error was detected
 *     #: during the execution.
 *     CUDA_ERROR_NVLINK_UNCORRECTABLE = ccuda.cudaError_enum.CUDA_ERROR_NVLINK_UNCORRECTABLE             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the PTX JIT compiler library was not found.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_NVLINK_UNCORRECTABLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_NVLINK_UNCORRECTABLE, __pyx_t_4) < 0) __PYX_ERR(0, 2308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2311
 * 
 *     #: This indicates that the PTX JIT compiler library was not found.
 *     CUDA_ERROR_JIT_COMPILER_NOT_FOUND = ccuda.cudaError_enum.CUDA_ERROR_JIT_COMPILER_NOT_FOUND             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the provided PTX was compiled with an
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_JIT_COMPILER_NOT_FOUND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_JIT_COMPILER_NOT_FOUN, __pyx_t_4) < 0) __PYX_ERR(0, 2311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2315
 *     #: This indicates that the provided PTX was compiled with an
 *     #: unsupported toolchain.
 *     CUDA_ERROR_UNSUPPORTED_PTX_VERSION = ccuda.cudaError_enum.CUDA_ERROR_UNSUPPORTED_PTX_VERSION             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the PTX JIT compilation was disabled.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_UNSUPPORTED_PTX_VERSION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_UNSUPPORTED_PTX_VERSI, __pyx_t_4) < 0) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2318
 * 
 *     #: This indicates that the PTX JIT compilation was disabled.
 *     CUDA_ERROR_JIT_COMPILATION_DISABLED = ccuda.cudaError_enum.CUDA_ERROR_JIT_COMPILATION_DISABLED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the :py:obj:`~.CUexecAffinityType` passed to the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_JIT_COMPILATION_DISABLED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_JIT_COMPILATION_DISAB, __pyx_t_4) < 0) __PYX_ERR(0, 2318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2322
 *     #: This indicates that the :py:obj:`~.CUexecAffinityType` passed to the
 *     #: API call is not supported by the active device.
 *     CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY = ccuda.cudaError_enum.CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the device kernel source is invalid. This
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_UNSUPPORTED_EXEC_AFFI, __pyx_t_4) < 0) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2327
 *     #: includes compilation/linker errors encountered in device code or
 *     #: user error.
 *     CUDA_ERROR_INVALID_SOURCE = ccuda.cudaError_enum.CUDA_ERROR_INVALID_SOURCE             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the file specified was not found.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_INVALID_SOURCE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_INVALID_SOURCE, __pyx_t_4) < 0) __PYX_ERR(0, 2327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2330
 * 
 *     #: This indicates that the file specified was not found.
 *     CUDA_ERROR_FILE_NOT_FOUND = ccuda.cudaError_enum.CUDA_ERROR_FILE_NOT_FOUND             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that a link to a shared object failed to resolve.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_FILE_NOT_FOUND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_FILE_NOT_FOUND, __pyx_t_4) < 0) __PYX_ERR(0, 2330, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2333
 * 
 *     #: This indicates that a link to a shared object failed to resolve.
 *     CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = ccuda.cudaError_enum.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that initialization of a shared object failed.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_SHARED_OBJECT_SYMBOL, __pyx_t_4) < 0) __PYX_ERR(0, 2333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2336
 * 
 *     #: This indicates that initialization of a shared object failed.
 *     CUDA_ERROR_SHARED_OBJECT_INIT_FAILED = ccuda.cudaError_enum.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that an OS call failed.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_SHARED_OBJECT_INIT_FAILED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_SHARED_OBJECT_INIT_FA, __pyx_t_4) < 0) __PYX_ERR(0, 2336, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2339
 * 
 *     #: This indicates that an OS call failed.
 *     CUDA_ERROR_OPERATING_SYSTEM = ccuda.cudaError_enum.CUDA_ERROR_OPERATING_SYSTEM             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that a resource handle passed to the API call was not
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_OPERATING_SYSTEM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_OPERATING_SYSTEM, __pyx_t_4) < 0) __PYX_ERR(0, 2339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2344
 *     #: valid. Resource handles are opaque types like :py:obj:`~.CUstream`
 *     #: and :py:obj:`~.CUevent`.
 *     CUDA_ERROR_INVALID_HANDLE = ccuda.cudaError_enum.CUDA_ERROR_INVALID_HANDLE             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that a resource required by the API call is not in a
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_INVALID_HANDLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_INVALID_HANDLE, __pyx_t_4) < 0) __PYX_ERR(0, 2344, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2348
 *     #: This indicates that a resource required by the API call is not in a
 *     #: valid state to perform the requested operation.
 *     CUDA_ERROR_ILLEGAL_STATE = ccuda.cudaError_enum.CUDA_ERROR_ILLEGAL_STATE             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that a named symbol was not found. Examples of
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_ILLEGAL_STATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_ILLEGAL_STATE, __pyx_t_4) < 0) __PYX_ERR(0, 2348, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2353
 *     #: symbols are global/constant variable names, driver function names,
 *     #: texture names, and surface names.
 *     CUDA_ERROR_NOT_FOUND = ccuda.cudaError_enum.CUDA_ERROR_NOT_FOUND             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that asynchronous operations issued previously have
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_NOT_FOUND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_NOT_FOUND, __pyx_t_4) < 0) __PYX_ERR(0, 2353, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2360
 *     #: completion). Calls that may return this value include
 *     #: :py:obj:`~.cuEventQuery()` and :py:obj:`~.cuStreamQuery()`.
 *     CUDA_ERROR_NOT_READY = ccuda.cudaError_enum.CUDA_ERROR_NOT_READY             # <<<<<<<<<<<<<<
 * 
 *     #: While executing a kernel, the device encountered a load or store
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_NOT_READY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_NOT_READY, __pyx_t_4) < 0) __PYX_ERR(0, 2360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2367
 *     #: error. To continue using CUDA, the process must be terminated and
 *     #: relaunched.
 *     CUDA_ERROR_ILLEGAL_ADDRESS = ccuda.cudaError_enum.CUDA_ERROR_ILLEGAL_ADDRESS             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that a launch did not occur because it did not have
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_ILLEGAL_ADDRESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_ILLEGAL_ADDRESS, __pyx_t_4) < 0) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2376
 *     #: pointer when a 32-bit int is expected) is equivalent to passing too
 *     #: many arguments and can also result in this error.
 *     CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = ccuda.cudaError_enum.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that the device kernel took too long to execute. This
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_LAUNCH_OUT_OF_RESOURC, __pyx_t_4) < 0) __PYX_ERR(0, 2376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2384
 *     #: any further CUDA work will return the same error. To continue using
 *     #: CUDA, the process must be terminated and relaunched.
 *     CUDA_ERROR_LAUNCH_TIMEOUT = ccuda.cudaError_enum.CUDA_ERROR_LAUNCH_TIMEOUT             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates a kernel launch that uses an incompatible
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_LAUNCH_TIMEOUT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_LAUNCH_TIMEOUT, __pyx_t_4) < 0) __PYX_ERR(0, 2384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2388
 *     #: This error indicates a kernel launch that uses an incompatible
 *     #: texturing mode.
 *     CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = ccuda.cudaError_enum.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that a call to
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_LAUNCH_INCOMPATIBLE_T, __pyx_t_4) < 0) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2393
 *     #: :py:obj:`~.cuCtxEnablePeerAccess()` is trying to re-enable peer
 *     #: access to a context which has already had peer access to it enabled.
 *     CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED = ccuda.cudaError_enum.CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that :py:obj:`~.cuCtxDisablePeerAccess()` is
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_PEER_ACCESS_ALREADY_E, __pyx_t_4) < 0) __PYX_ERR(0, 2393, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2398
 *     #: trying to disable peer access which has not been enabled yet via
 *     #: :py:obj:`~.cuCtxEnablePeerAccess()`.
 *     CUDA_ERROR_PEER_ACCESS_NOT_ENABLED = ccuda.cudaError_enum.CUDA_ERROR_PEER_ACCESS_NOT_ENABLED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the primary context for the specified
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_PEER_ACCESS_NOT_ENABLED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_PEER_ACCESS_NOT_ENABL, __pyx_t_4) < 0) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2402
 *     #: This error indicates that the primary context for the specified
 *     #: device has already been initialized.
 *     CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE = ccuda.cudaError_enum.CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the context current to the calling thread
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_PRIMARY_CONTEXT_ACTIV, __pyx_t_4) < 0) __PYX_ERR(0, 2402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2407
 *     #: has been destroyed using :py:obj:`~.cuCtxDestroy`, or is a primary
 *     #: context which has not yet been initialized.
 *     CUDA_ERROR_CONTEXT_IS_DESTROYED = ccuda.cudaError_enum.CUDA_ERROR_CONTEXT_IS_DESTROYED             # <<<<<<<<<<<<<<
 * 
 *     #: A device-side assert triggered during kernel execution. The context
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_CONTEXT_IS_DESTROYED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_CONTEXT_IS_DESTROYED, __pyx_t_4) < 0) __PYX_ERR(0, 2407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2413
 *     #: memory allocations from this context are invalid and must be
 *     #: reconstructed if the program is to continue using CUDA.
 *     CUDA_ERROR_ASSERT = ccuda.cudaError_enum.CUDA_ERROR_ASSERT             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the hardware resources required to enable
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_ASSERT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_ASSERT, __pyx_t_4) < 0) __PYX_ERR(0, 2413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2418
 *     #: peer access have been exhausted for one or more of the devices
 *     #: passed to :py:obj:`~.cuCtxEnablePeerAccess()`.
 *     CUDA_ERROR_TOO_MANY_PEERS = ccuda.cudaError_enum.CUDA_ERROR_TOO_MANY_PEERS             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the memory range passed to
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_TOO_MANY_PEERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_TOO_MANY_PEERS, __pyx_t_4) < 0) __PYX_ERR(0, 2418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2422
 *     #: This error indicates that the memory range passed to
 *     #: :py:obj:`~.cuMemHostRegister()` has already been registered.
 *     CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED = ccuda.cudaError_enum.CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the pointer passed to
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_HOST_MEMORY_ALREADY_R, __pyx_t_4) < 0) __PYX_ERR(0, 2422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2427
 *     #: :py:obj:`~.cuMemHostUnregister()` does not correspond to any
 *     #: currently registered memory region.
 *     CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED = ccuda.cudaError_enum.CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED             # <<<<<<<<<<<<<<
 * 
 *     #: While executing a kernel, the device encountered a stack error. This
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_HOST_MEMORY_NOT_REGIS, __pyx_t_4) < 0) __PYX_ERR(0, 2427, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2434
 *     #: CUDA work will return the same error. To continue using CUDA, the
 *     #: process must be terminated and relaunched.
 *     CUDA_ERROR_HARDWARE_STACK_ERROR = ccuda.cudaError_enum.CUDA_ERROR_HARDWARE_STACK_ERROR             # <<<<<<<<<<<<<<
 * 
 *     #: While executing a kernel, the device encountered an illegal
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_HARDWARE_STACK_ERROR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_HARDWARE_STACK_ERROR, __pyx_t_4) < 0) __PYX_ERR(0, 2434, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2440
 *     #: any further CUDA work will return the same error. To continue using
 *     #: CUDA, the process must be terminated and relaunched.
 *     CUDA_ERROR_ILLEGAL_INSTRUCTION = ccuda.cudaError_enum.CUDA_ERROR_ILLEGAL_INSTRUCTION             # <<<<<<<<<<<<<<
 * 
 *     #: While executing a kernel, the device encountered a load or store
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_ILLEGAL_INSTRUCTION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_ILLEGAL_INSTRUCTION, __pyx_t_4) < 0) __PYX_ERR(0, 2440, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2447
 *     #: return the same error. To continue using CUDA, the process must be
 *     #: terminated and relaunched.
 *     CUDA_ERROR_MISALIGNED_ADDRESS = ccuda.cudaError_enum.CUDA_ERROR_MISALIGNED_ADDRESS             # <<<<<<<<<<<<<<
 * 
 *     #: While executing a kernel, the device encountered an instruction
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_MISALIGNED_ADDRESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_MISALIGNED_ADDRESS, __pyx_t_4) < 0) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2456
 *     #: error. To continue using CUDA, the process must be terminated and
 *     #: relaunched.
 *     CUDA_ERROR_INVALID_ADDRESS_SPACE = ccuda.cudaError_enum.CUDA_ERROR_INVALID_ADDRESS_SPACE             # <<<<<<<<<<<<<<
 * 
 *     #: While executing a kernel, the device program counter wrapped its
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_INVALID_ADDRESS_SPACE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_INVALID_ADDRESS_SPACE, __pyx_t_4) < 0) __PYX_ERR(0, 2456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2462
 *     #: any further CUDA work will return the same error. To continue using
 *     #: CUDA, the process must be terminated and relaunched.
 *     CUDA_ERROR_INVALID_PC = ccuda.cudaError_enum.CUDA_ERROR_INVALID_PC             # <<<<<<<<<<<<<<
 * 
 *     #: An exception occurred on the device while executing a kernel. Common
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_INVALID_PC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_INVALID_PC, __pyx_t_4) < 0) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2472
 *     #: error. To continue using CUDA, the process must be terminated and
 *     #: relaunched.
 *     CUDA_ERROR_LAUNCH_FAILED = ccuda.cudaError_enum.CUDA_ERROR_LAUNCH_FAILED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the number of blocks launched per grid for
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_LAUNCH_FAILED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_LAUNCH_FAILED, __pyx_t_4) < 0) __PYX_ERR(0, 2472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2483
 *     #: times the number of multiprocessors as specified by the device
 *     #: attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`.
 *     CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = ccuda.cudaError_enum.CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the attempted operation is not permitted.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_COOPERATIVE_LAUNCH_TO, __pyx_t_4) < 0) __PYX_ERR(0, 2483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2486
 * 
 *     #: This error indicates that the attempted operation is not permitted.
 *     CUDA_ERROR_NOT_PERMITTED = ccuda.cudaError_enum.CUDA_ERROR_NOT_PERMITTED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the attempted operation is not supported
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_NOT_PERMITTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_NOT_PERMITTED, __pyx_t_4) < 0) __PYX_ERR(0, 2486, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2490
 *     #: This error indicates that the attempted operation is not supported
 *     #: on the current system or device.
 *     CUDA_ERROR_NOT_SUPPORTED = ccuda.cudaError_enum.CUDA_ERROR_NOT_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the system is not yet ready to start any
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_NOT_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_NOT_SUPPORTED, __pyx_t_4) < 0) __PYX_ERR(0, 2490, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2497
 *     #: running. More information about this error can be found in the
 *     #: system specific user guide.
 *     CUDA_ERROR_SYSTEM_NOT_READY = ccuda.cudaError_enum.CUDA_ERROR_SYSTEM_NOT_READY             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that there is a mismatch between the versions
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_SYSTEM_NOT_READY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_SYSTEM_NOT_READY, __pyx_t_4) < 0) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2502
 *     #: of the display driver and the CUDA driver. Refer to the
 *     #: compatibility documentation for supported versions.
 *     CUDA_ERROR_SYSTEM_DRIVER_MISMATCH = ccuda.cudaError_enum.CUDA_ERROR_SYSTEM_DRIVER_MISMATCH             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the system was upgraded to run with
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_SYSTEM_DRIVER_MISMATCH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_SYSTEM_DRIVER_MISMATC, __pyx_t_4) < 0) __PYX_ERR(0, 2502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2510
 *     #: supported hardware is visible during initialization via the
 *     #: CUDA_VISIBLE_DEVICES environment variable.
 *     CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE = ccuda.cudaError_enum.CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the MPS client failed to connect to the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_COMPAT_NOT_SUPPORTED, __pyx_t_4) < 0) __PYX_ERR(0, 2510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2514
 *     #: This error indicates that the MPS client failed to connect to the
 *     #: MPS control daemon or the MPS server.
 *     CUDA_ERROR_MPS_CONNECTION_FAILED = ccuda.cudaError_enum.CUDA_ERROR_MPS_CONNECTION_FAILED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the remote procedural call between the MPS
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_MPS_CONNECTION_FAILED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_MPS_CONNECTION_FAILED, __pyx_t_4) < 0) __PYX_ERR(0, 2514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2518
 *     #: This error indicates that the remote procedural call between the MPS
 *     #: server and the MPS client failed.
 *     CUDA_ERROR_MPS_RPC_FAILURE = ccuda.cudaError_enum.CUDA_ERROR_MPS_RPC_FAILURE             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the MPS server is not ready to accept new
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_MPS_RPC_FAILURE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_MPS_RPC_FAILURE, __pyx_t_4) < 0) __PYX_ERR(0, 2518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2523
 *     #: MPS client requests. This error can be returned when the MPS server
 *     #: is in the process of recovering from a fatal failure.
 *     CUDA_ERROR_MPS_SERVER_NOT_READY = ccuda.cudaError_enum.CUDA_ERROR_MPS_SERVER_NOT_READY             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the hardware resources required to create
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_MPS_SERVER_NOT_READY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_MPS_SERVER_NOT_READY, __pyx_t_4) < 0) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2527
 *     #: This error indicates that the hardware resources required to create
 *     #: MPS client have been exhausted.
 *     CUDA_ERROR_MPS_MAX_CLIENTS_REACHED = ccuda.cudaError_enum.CUDA_ERROR_MPS_MAX_CLIENTS_REACHED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates the the hardware resources required to support
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_MPS_MAX_CLIENTS_REACHED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_MPS_MAX_CLIENTS_REACH, __pyx_t_4) < 0) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2531
 *     #: This error indicates the the hardware resources required to support
 *     #: device connections have been exhausted.
 *     CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED = ccuda.cudaError_enum.CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the MPS client has been terminated by the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_MPS_MAX_CONNECTIONS_R, __pyx_t_4) < 0) __PYX_ERR(0, 2531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2536
 *     #: server. To continue using CUDA, the process must be terminated and
 *     #: relaunched.
 *     CUDA_ERROR_MPS_CLIENT_TERMINATED = ccuda.cudaError_enum.CUDA_ERROR_MPS_CLIENT_TERMINATED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the operation is not permitted when the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_MPS_CLIENT_TERMINATED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_MPS_CLIENT_TERMINATED, __pyx_t_4) < 0) __PYX_ERR(0, 2536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2540
 *     #: This error indicates that the operation is not permitted when the
 *     #: stream is capturing.
 *     CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED = ccuda.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the current capture sequence on the stream
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_UNSUPP, __pyx_t_4) < 0) __PYX_ERR(0, 2540, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2544
 *     #: This error indicates that the current capture sequence on the stream
 *     #: has been invalidated due to a previous error.
 *     CUDA_ERROR_STREAM_CAPTURE_INVALIDATED = ccuda.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_INVALIDATED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the operation would have resulted in a
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_STREAM_CAPTURE_INVALIDATED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_INVALI, __pyx_t_4) < 0) __PYX_ERR(0, 2544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2548
 *     #: This error indicates that the operation would have resulted in a
 *     #: merge of two independent capture sequences.
 *     CUDA_ERROR_STREAM_CAPTURE_MERGE = ccuda.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_MERGE             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the capture was not initiated in this
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_STREAM_CAPTURE_MERGE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_MERGE, __pyx_t_4) < 0) __PYX_ERR(0, 2548, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2552
 *     #: This error indicates that the capture was not initiated in this
 *     #: stream.
 *     CUDA_ERROR_STREAM_CAPTURE_UNMATCHED = ccuda.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_UNMATCHED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the capture sequence contains a fork that
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_STREAM_CAPTURE_UNMATCHED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_UNMATC, __pyx_t_4) < 0) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2556
 *     #: This error indicates that the capture sequence contains a fork that
 *     #: was not joined to the primary stream.
 *     CUDA_ERROR_STREAM_CAPTURE_UNJOINED = ccuda.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_UNJOINED             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that a dependency would have been created which
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_STREAM_CAPTURE_UNJOINED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_UNJOIN, __pyx_t_4) < 0) __PYX_ERR(0, 2556, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2561
 *     #: crosses the capture sequence boundary. Only implicit in-stream
 *     #: ordering dependencies are allowed to cross the boundary.
 *     CUDA_ERROR_STREAM_CAPTURE_ISOLATION = ccuda.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_ISOLATION             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates a disallowed implicit dependency on a current
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_STREAM_CAPTURE_ISOLATION); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_ISOLAT, __pyx_t_4) < 0) __PYX_ERR(0, 2561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2565
 *     #: This error indicates a disallowed implicit dependency on a current
 *     #: capture sequence from cudaStreamLegacy.
 *     CUDA_ERROR_STREAM_CAPTURE_IMPLICIT = ccuda.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the operation is not permitted on an event
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_STREAM_CAPTURE_IMPLICIT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_IMPLIC, __pyx_t_4) < 0) __PYX_ERR(0, 2565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2569
 *     #: This error indicates that the operation is not permitted on an event
 *     #: which was last recorded in a capturing stream.
 *     CUDA_ERROR_CAPTURED_EVENT = ccuda.cudaError_enum.CUDA_ERROR_CAPTURED_EVENT             # <<<<<<<<<<<<<<
 * 
 *     #: A stream capture sequence not initiated with the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_CAPTURED_EVENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_CAPTURED_EVENT, __pyx_t_4) < 0) __PYX_ERR(0, 2569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2575
 *     #: :py:obj:`~.cuStreamBeginCapture` was passed to
 *     #: :py:obj:`~.cuStreamEndCapture` in a different thread.
 *     CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD = ccuda.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the timeout specified for the wait
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_STREAM_CAPTURE_WRONG, __pyx_t_4) < 0) __PYX_ERR(0, 2575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2579
 *     #: This error indicates that the timeout specified for the wait
 *     #: operation has lapsed.
 *     CUDA_ERROR_TIMEOUT = ccuda.cudaError_enum.CUDA_ERROR_TIMEOUT             # <<<<<<<<<<<<<<
 * 
 *     #: This error indicates that the graph update was not performed because
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_TIMEOUT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_TIMEOUT, __pyx_t_4) < 0) __PYX_ERR(0, 2579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2584
 *     #: it included changes which violated constraints specific to
 *     #: instantiated graph update.
 *     CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE = ccuda.cudaError_enum.CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that an async error has occurred in a device outside
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_GRAPH_EXEC_UPDATE_FAI, __pyx_t_4) < 0) __PYX_ERR(0, 2584, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2593
 *     #: return the same error. To continue using CUDA, the process must be
 *     #: terminated and relaunched.
 *     CUDA_ERROR_EXTERNAL_DEVICE = ccuda.cudaError_enum.CUDA_ERROR_EXTERNAL_DEVICE             # <<<<<<<<<<<<<<
 * 
 *     #: Indicates a kernel launch error due to cluster misconfiguration.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_EXTERNAL_DEVICE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_EXTERNAL_DEVICE, __pyx_t_4) < 0) __PYX_ERR(0, 2593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2596
 * 
 *     #: Indicates a kernel launch error due to cluster misconfiguration.
 *     CUDA_ERROR_INVALID_CLUSTER_SIZE = ccuda.cudaError_enum.CUDA_ERROR_INVALID_CLUSTER_SIZE             # <<<<<<<<<<<<<<
 * 
 *     #: This indicates that an unknown internal error has occurred.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_INVALID_CLUSTER_SIZE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_INVALID_CLUSTER_SIZE, __pyx_t_4) < 0) __PYX_ERR(0, 2596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2599
 * 
 *     #: This indicates that an unknown internal error has occurred.
 *     CUDA_ERROR_UNKNOWN = ccuda.cudaError_enum.CUDA_ERROR_UNKNOWN             # <<<<<<<<<<<<<<
 * 
 * class CUdevice_P2PAttribute(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__cudaError_enum(CUDA_ERROR_UNKNOWN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_ERROR_UNKNOWN, __pyx_t_4) < 0) __PYX_ERR(0, 2599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2171
 *     CU_EXEC_AFFINITY_TYPE_MAX = ccuda.CUexecAffinityType_enum.CU_EXEC_AFFINITY_TYPE_MAX
 * 
 * class CUresult(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Error codes
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUresult, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUresult, __pyx_t_4) < 0) __PYX_ERR(0, 2171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":2601
 *     CUDA_ERROR_UNKNOWN = ccuda.cudaError_enum.CUDA_ERROR_UNKNOWN
 * 
 * class CUdevice_P2PAttribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     P2P Attributes
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUdevice_P2PAttribute, __pyx_n_s_CUdevice_P2PAttribute, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_P2P_Attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2608
 *     #: A relative value indicating the performance of the link between two
 *     #: devices
 *     CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = ccuda.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK             # <<<<<<<<<<<<<<
 * 
 *     #: P2P Access is enable
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_P2PAttribute_enum(CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_PERFORMA, __pyx_t_4) < 0) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2611
 * 
 *     #: P2P Access is enable
 *     CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = ccuda.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Atomic operation over the link supported
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_P2PAttribute_enum(CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_S, __pyx_t_4) < 0) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2614
 * 
 *     #: Atomic operation over the link supported
 *     CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = ccuda.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: [Deprecated]
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_P2PAttribute_enum(CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_NATIVE_A, __pyx_t_4) < 0) __PYX_ERR(0, 2614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2617
 * 
 *     #: [Deprecated]
 *     CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = ccuda.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: Accessing CUDA arrays over the link supported
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_P2PAttribute_enum(CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_ACCESS_A, __pyx_t_4) < 0) __PYX_ERR(0, 2617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2620
 * 
 *     #: Accessing CUDA arrays over the link supported
 *     CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = ccuda.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 * class CUresourceViewFormat(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUdevice_P2PAttribute_enum(CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARR, __pyx_t_4) < 0) __PYX_ERR(0, 2620, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2601
 *     CUDA_ERROR_UNKNOWN = ccuda.cudaError_enum.CUDA_ERROR_UNKNOWN
 * 
 * class CUdevice_P2PAttribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     P2P Attributes
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUdevice_P2PAttribute, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUdevice_P2PAttribute, __pyx_t_4) < 0) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":2622
 *     CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = ccuda.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED
 * 
 * class CUresourceViewFormat(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Resource view format
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUresourceViewFormat, __pyx_n_s_CUresourceViewFormat, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Resource_view_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2628
 * 
 *     #: No resource view format (use underlying resource format)
 *     CU_RES_VIEW_FORMAT_NONE = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_NONE             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel unsigned 8-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_NONE, __pyx_t_4) < 0) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2631
 * 
 *     #: 1 channel unsigned 8-bit integers
 *     CU_RES_VIEW_FORMAT_UINT_1X8 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_1X8             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel unsigned 8-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UINT_1X8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UINT_1X8, __pyx_t_4) < 0) __PYX_ERR(0, 2631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2634
 * 
 *     #: 2 channel unsigned 8-bit integers
 *     CU_RES_VIEW_FORMAT_UINT_2X8 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_2X8             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned 8-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UINT_2X8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UINT_2X8, __pyx_t_4) < 0) __PYX_ERR(0, 2634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2637
 * 
 *     #: 4 channel unsigned 8-bit integers
 *     CU_RES_VIEW_FORMAT_UINT_4X8 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_4X8             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel signed 8-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UINT_4X8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UINT_4X8, __pyx_t_4) < 0) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2640
 * 
 *     #: 1 channel signed 8-bit integers
 *     CU_RES_VIEW_FORMAT_SINT_1X8 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_1X8             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel signed 8-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_SINT_1X8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_SINT_1X8, __pyx_t_4) < 0) __PYX_ERR(0, 2640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2643
 * 
 *     #: 2 channel signed 8-bit integers
 *     CU_RES_VIEW_FORMAT_SINT_2X8 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_2X8             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel signed 8-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_SINT_2X8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_SINT_2X8, __pyx_t_4) < 0) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2646
 * 
 *     #: 4 channel signed 8-bit integers
 *     CU_RES_VIEW_FORMAT_SINT_4X8 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_4X8             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel unsigned 16-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_SINT_4X8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_SINT_4X8, __pyx_t_4) < 0) __PYX_ERR(0, 2646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2649
 * 
 *     #: 1 channel unsigned 16-bit integers
 *     CU_RES_VIEW_FORMAT_UINT_1X16 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_1X16             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel unsigned 16-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UINT_1X16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UINT_1X16, __pyx_t_4) < 0) __PYX_ERR(0, 2649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2652
 * 
 *     #: 2 channel unsigned 16-bit integers
 *     CU_RES_VIEW_FORMAT_UINT_2X16 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_2X16             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned 16-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UINT_2X16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UINT_2X16, __pyx_t_4) < 0) __PYX_ERR(0, 2652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2655
 * 
 *     #: 4 channel unsigned 16-bit integers
 *     CU_RES_VIEW_FORMAT_UINT_4X16 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_4X16             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel signed 16-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UINT_4X16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UINT_4X16, __pyx_t_4) < 0) __PYX_ERR(0, 2655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2658
 * 
 *     #: 1 channel signed 16-bit integers
 *     CU_RES_VIEW_FORMAT_SINT_1X16 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_1X16             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel signed 16-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_SINT_1X16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_SINT_1X16, __pyx_t_4) < 0) __PYX_ERR(0, 2658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2661
 * 
 *     #: 2 channel signed 16-bit integers
 *     CU_RES_VIEW_FORMAT_SINT_2X16 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_2X16             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel signed 16-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_SINT_2X16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_SINT_2X16, __pyx_t_4) < 0) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2664
 * 
 *     #: 4 channel signed 16-bit integers
 *     CU_RES_VIEW_FORMAT_SINT_4X16 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_4X16             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel unsigned 32-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_SINT_4X16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_SINT_4X16, __pyx_t_4) < 0) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2667
 * 
 *     #: 1 channel unsigned 32-bit integers
 *     CU_RES_VIEW_FORMAT_UINT_1X32 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_1X32             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel unsigned 32-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UINT_1X32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UINT_1X32, __pyx_t_4) < 0) __PYX_ERR(0, 2667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2670
 * 
 *     #: 2 channel unsigned 32-bit integers
 *     CU_RES_VIEW_FORMAT_UINT_2X32 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_2X32             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel unsigned 32-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UINT_2X32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UINT_2X32, __pyx_t_4) < 0) __PYX_ERR(0, 2670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2673
 * 
 *     #: 4 channel unsigned 32-bit integers
 *     CU_RES_VIEW_FORMAT_UINT_4X32 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_4X32             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel signed 32-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UINT_4X32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UINT_4X32, __pyx_t_4) < 0) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2676
 * 
 *     #: 1 channel signed 32-bit integers
 *     CU_RES_VIEW_FORMAT_SINT_1X32 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_1X32             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel signed 32-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_SINT_1X32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_SINT_1X32, __pyx_t_4) < 0) __PYX_ERR(0, 2676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2679
 * 
 *     #: 2 channel signed 32-bit integers
 *     CU_RES_VIEW_FORMAT_SINT_2X32 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_2X32             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel signed 32-bit integers
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_SINT_2X32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_SINT_2X32, __pyx_t_4) < 0) __PYX_ERR(0, 2679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2682
 * 
 *     #: 4 channel signed 32-bit integers
 *     CU_RES_VIEW_FORMAT_SINT_4X32 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_4X32             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel 16-bit floating point
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_SINT_4X32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_SINT_4X32, __pyx_t_4) < 0) __PYX_ERR(0, 2682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2685
 * 
 *     #: 1 channel 16-bit floating point
 *     CU_RES_VIEW_FORMAT_FLOAT_1X16 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_1X16             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel 16-bit floating point
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_FLOAT_1X16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_1X16, __pyx_t_4) < 0) __PYX_ERR(0, 2685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2688
 * 
 *     #: 2 channel 16-bit floating point
 *     CU_RES_VIEW_FORMAT_FLOAT_2X16 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_2X16             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel 16-bit floating point
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_FLOAT_2X16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_2X16, __pyx_t_4) < 0) __PYX_ERR(0, 2688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2691
 * 
 *     #: 4 channel 16-bit floating point
 *     CU_RES_VIEW_FORMAT_FLOAT_4X16 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_4X16             # <<<<<<<<<<<<<<
 * 
 *     #: 1 channel 32-bit floating point
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_FLOAT_4X16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_4X16, __pyx_t_4) < 0) __PYX_ERR(0, 2691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2694
 * 
 *     #: 1 channel 32-bit floating point
 *     CU_RES_VIEW_FORMAT_FLOAT_1X32 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_1X32             # <<<<<<<<<<<<<<
 * 
 *     #: 2 channel 32-bit floating point
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_FLOAT_1X32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_1X32, __pyx_t_4) < 0) __PYX_ERR(0, 2694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2697
 * 
 *     #: 2 channel 32-bit floating point
 *     CU_RES_VIEW_FORMAT_FLOAT_2X32 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_2X32             # <<<<<<<<<<<<<<
 * 
 *     #: 4 channel 32-bit floating point
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_FLOAT_2X32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_2X32, __pyx_t_4) < 0) __PYX_ERR(0, 2697, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2700
 * 
 *     #: 4 channel 32-bit floating point
 *     CU_RES_VIEW_FORMAT_FLOAT_4X32 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_4X32             # <<<<<<<<<<<<<<
 * 
 *     #: Block compressed 1
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_FLOAT_4X32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_FLOAT_4X32, __pyx_t_4) < 0) __PYX_ERR(0, 2700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2703
 * 
 *     #: Block compressed 1
 *     CU_RES_VIEW_FORMAT_UNSIGNED_BC1 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC1             # <<<<<<<<<<<<<<
 * 
 *     #: Block compressed 2
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UNSIGNED_BC1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC1, __pyx_t_4) < 0) __PYX_ERR(0, 2703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2706
 * 
 *     #: Block compressed 2
 *     CU_RES_VIEW_FORMAT_UNSIGNED_BC2 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC2             # <<<<<<<<<<<<<<
 * 
 *     #: Block compressed 3
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UNSIGNED_BC2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC2, __pyx_t_4) < 0) __PYX_ERR(0, 2706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2709
 * 
 *     #: Block compressed 3
 *     CU_RES_VIEW_FORMAT_UNSIGNED_BC3 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC3             # <<<<<<<<<<<<<<
 * 
 *     #: Block compressed 4 unsigned
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UNSIGNED_BC3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC3, __pyx_t_4) < 0) __PYX_ERR(0, 2709, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2712
 * 
 *     #: Block compressed 4 unsigned
 *     CU_RES_VIEW_FORMAT_UNSIGNED_BC4 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC4             # <<<<<<<<<<<<<<
 * 
 *     #: Block compressed 4 signed
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UNSIGNED_BC4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC4, __pyx_t_4) < 0) __PYX_ERR(0, 2712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2715
 * 
 *     #: Block compressed 4 signed
 *     CU_RES_VIEW_FORMAT_SIGNED_BC4 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SIGNED_BC4             # <<<<<<<<<<<<<<
 * 
 *     #: Block compressed 5 unsigned
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_SIGNED_BC4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_SIGNED_BC4, __pyx_t_4) < 0) __PYX_ERR(0, 2715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2718
 * 
 *     #: Block compressed 5 unsigned
 *     CU_RES_VIEW_FORMAT_UNSIGNED_BC5 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC5             # <<<<<<<<<<<<<<
 * 
 *     #: Block compressed 5 signed
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UNSIGNED_BC5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC5, __pyx_t_4) < 0) __PYX_ERR(0, 2718, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2721
 * 
 *     #: Block compressed 5 signed
 *     CU_RES_VIEW_FORMAT_SIGNED_BC5 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SIGNED_BC5             # <<<<<<<<<<<<<<
 * 
 *     #: Block compressed 6 unsigned half-float
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_SIGNED_BC5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_SIGNED_BC5, __pyx_t_4) < 0) __PYX_ERR(0, 2721, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2724
 * 
 *     #: Block compressed 6 unsigned half-float
 *     CU_RES_VIEW_FORMAT_UNSIGNED_BC6H = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC6H             # <<<<<<<<<<<<<<
 * 
 *     #: Block compressed 6 signed half-float
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UNSIGNED_BC6H); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC6H, __pyx_t_4) < 0) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2727
 * 
 *     #: Block compressed 6 signed half-float
 *     CU_RES_VIEW_FORMAT_SIGNED_BC6H = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SIGNED_BC6H             # <<<<<<<<<<<<<<
 * 
 *     #: Block compressed 7
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_SIGNED_BC6H); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_SIGNED_BC6H, __pyx_t_4) < 0) __PYX_ERR(0, 2727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2730
 * 
 *     #: Block compressed 7
 *     CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC7             # <<<<<<<<<<<<<<
 * 
 * class CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(CU_RES_VIEW_FORMAT_UNSIGNED_BC7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_RES_VIEW_FORMAT_UNSIGNED_BC7, __pyx_t_4) < 0) __PYX_ERR(0, 2730, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2622
 *     CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = ccuda.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED
 * 
 * class CUresourceViewFormat(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Resource view format
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUresourceViewFormat, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUresourceViewFormat, __pyx_t_4) < 0) __PYX_ERR(0, 2622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":2732
 *     CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC7
 * 
 * class CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Access flags that specify the level of access the current context's
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUDA_POINTER_ATTRIBUTE_ACCESS_FL, __pyx_n_s_CUDA_POINTER_ATTRIBUTE_ACCESS_FL, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Access_flags_that_specify_the_l); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2741
 *     #: must be staged through accessible memory in order to complete
 *     #: certain operations
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE = ccuda.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE             # <<<<<<<<<<<<<<
 * 
 *     #: Read-only access, meaning writes to this memory are considered
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_2, __pyx_t_4) < 0) __PYX_ERR(0, 2741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2745
 *     #: Read-only access, meaning writes to this memory are considered
 *     #: invalid accesses and thus return error in that case.
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ = ccuda.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ             # <<<<<<<<<<<<<<
 * 
 *     #: Read-write access, the device has full read-write access to the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_3, __pyx_t_4) < 0) __PYX_ERR(0, 2745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2749
 *     #: Read-write access, the device has full read-write access to the
 *     #: memory
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = ccuda.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE             # <<<<<<<<<<<<<<
 * 
 * class CUexternalMemoryHandleType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_POINTER_ATTRIBUTE_ACCESS_FLAG_4, __pyx_t_4) < 0) __PYX_ERR(0, 2749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2732
 *     CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = ccuda.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC7
 * 
 * class CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Access flags that specify the level of access the current context's
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUDA_POINTER_ATTRIBUTE_ACCESS_FL, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUDA_POINTER_ATTRIBUTE_ACCESS_FL, __pyx_t_4) < 0) __PYX_ERR(0, 2732, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":2751
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = ccuda.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE
 * 
 * class CUexternalMemoryHandleType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     External memory handle types
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUexternalMemoryHandleType, __pyx_n_s_CUexternalMemoryHandleType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_External_memory_handle_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2757
 * 
 *     #: Handle is an opaque file descriptor
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = ccuda.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is an opaque shared NT handle
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalMemoryHandleType_enum(CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O, __pyx_t_4) < 0) __PYX_ERR(0, 2757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2760
 * 
 *     #: Handle is an opaque shared NT handle
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = ccuda.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is an opaque, globally shared handle
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalMemoryHandleType_enum(CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O_2, __pyx_t_4) < 0) __PYX_ERR(0, 2760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2763
 * 
 *     #: Handle is an opaque, globally shared handle
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = ccuda.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is a D3D12 heap object
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalMemoryHandleType_enum(CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_O_3, __pyx_t_4) < 0) __PYX_ERR(0, 2763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2766
 * 
 *     #: Handle is a D3D12 heap object
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = ccuda.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is a D3D12 committed resource
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalMemoryHandleType_enum(CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D, __pyx_t_4) < 0) __PYX_ERR(0, 2766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2769
 * 
 *     #: Handle is a D3D12 committed resource
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = ccuda.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is a shared NT handle to a D3D11 resource
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalMemoryHandleType_enum(CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_2, __pyx_t_4) < 0) __PYX_ERR(0, 2769, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2772
 * 
 *     #: Handle is a shared NT handle to a D3D11 resource
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = ccuda.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is a globally shared handle to a D3D11 resource
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalMemoryHandleType_enum(CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_3, __pyx_t_4) < 0) __PYX_ERR(0, 2772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2775
 * 
 *     #: Handle is a globally shared handle to a D3D11 resource
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = ccuda.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is an NvSciBuf object
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalMemoryHandleType_enum(CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_D_4, __pyx_t_4) < 0) __PYX_ERR(0, 2775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2778
 * 
 *     #: Handle is an NvSciBuf object
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = ccuda.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF             # <<<<<<<<<<<<<<
 * 
 * class CUexternalSemaphoreHandleType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalMemoryHandleType_enum(CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_MEMORY_HANDLE_TYPE_N, __pyx_t_4) < 0) __PYX_ERR(0, 2778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2751
 *     CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = ccuda.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE
 * 
 * class CUexternalMemoryHandleType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     External memory handle types
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUexternalMemoryHandleType, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUexternalMemoryHandleType, __pyx_t_4) < 0) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":2780
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = ccuda.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF
 * 
 * class CUexternalSemaphoreHandleType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     External semaphore handle types
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUexternalSemaphoreHandleType, __pyx_n_s_CUexternalSemaphoreHandleType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_External_semaphore_handle_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2786
 * 
 *     #: Handle is an opaque file descriptor
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = ccuda.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is an opaque shared NT handle
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum(CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP, __pyx_t_4) < 0) __PYX_ERR(0, 2786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2789
 * 
 *     #: Handle is an opaque shared NT handle
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = ccuda.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is an opaque, globally shared handle
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum(CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_2, __pyx_t_4) < 0) __PYX_ERR(0, 2789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2792
 * 
 *     #: Handle is an opaque, globally shared handle
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = ccuda.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is a shared NT handle referencing a D3D12 fence object
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum(CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_3, __pyx_t_4) < 0) __PYX_ERR(0, 2792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2795
 * 
 *     #: Handle is a shared NT handle referencing a D3D12 fence object
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = ccuda.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is a shared NT handle referencing a D3D11 fence object
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum(CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_4, __pyx_t_4) < 0) __PYX_ERR(0, 2795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2798
 * 
 *     #: Handle is a shared NT handle referencing a D3D11 fence object
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE = ccuda.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE             # <<<<<<<<<<<<<<
 * 
 *     #: Opaque handle to NvSciSync Object
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum(CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_5, __pyx_t_4) < 0) __PYX_ERR(0, 2798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2801
 * 
 *     #: Opaque handle to NvSciSync Object
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC = ccuda.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is a shared NT handle referencing a D3D11 keyed mutex object
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum(CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_6, __pyx_t_4) < 0) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2804
 * 
 *     #: Handle is a shared NT handle referencing a D3D11 keyed mutex object
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX = ccuda.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is a globally shared handle referencing a D3D11 keyed mutex
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum(CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_7, __pyx_t_4) < 0) __PYX_ERR(0, 2804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2808
 *     #: Handle is a globally shared handle referencing a D3D11 keyed mutex
 *     #: object
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT = ccuda.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is an opaque file descriptor referencing a timeline semaphore
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum(CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_8, __pyx_t_4) < 0) __PYX_ERR(0, 2808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2811
 * 
 *     #: Handle is an opaque file descriptor referencing a timeline semaphore
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD = ccuda.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD             # <<<<<<<<<<<<<<
 * 
 *     #: Handle is an opaque shared NT handle referencing a timeline
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum(CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_9, __pyx_t_4) < 0) __PYX_ERR(0, 2811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2815
 *     #: Handle is an opaque shared NT handle referencing a timeline
 *     #: semaphore
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = ccuda.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32             # <<<<<<<<<<<<<<
 * 
 * class CUmemAllocationHandleType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum(CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EXTERNAL_SEMAPHORE_HANDLE_TYP_10, __pyx_t_4) < 0) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2780
 *     CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = ccuda.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF
 * 
 * class CUexternalSemaphoreHandleType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     External semaphore handle types
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUexternalSemaphoreHandleType, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUexternalSemaphoreHandleType, __pyx_t_4) < 0) __PYX_ERR(0, 2780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":2817
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = ccuda.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32
 * 
 * class CUmemAllocationHandleType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for specifying particular handle types
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUmemAllocationHandleType, __pyx_n_s_CUmemAllocationHandleType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flags_for_specifying_particular); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2823
 * 
 *     #: Does not allow any export mechanism. >
 *     CU_MEM_HANDLE_TYPE_NONE = ccuda.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE             # <<<<<<<<<<<<<<
 * 
 *     #: Allows a file descriptor to be used for exporting. Permitted only on
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAllocationHandleType_enum(CU_MEM_HANDLE_TYPE_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_HANDLE_TYPE_NONE, __pyx_t_4) < 0) __PYX_ERR(0, 2823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2827
 *     #: Allows a file descriptor to be used for exporting. Permitted only on
 *     #: POSIX systems. (int)
 *     CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = ccuda.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR             # <<<<<<<<<<<<<<
 * 
 *     #: Allows a Win32 NT handle to be used for exporting. (HANDLE)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAllocationHandleType_enum(CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_HANDLE_TYPE_POSIX_FILE_DE, __pyx_t_4) < 0) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2830
 * 
 *     #: Allows a Win32 NT handle to be used for exporting. (HANDLE)
 *     CU_MEM_HANDLE_TYPE_WIN32 = ccuda.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32             # <<<<<<<<<<<<<<
 * 
 *     #: Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAllocationHandleType_enum(CU_MEM_HANDLE_TYPE_WIN32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_HANDLE_TYPE_WIN32, __pyx_t_4) < 0) __PYX_ERR(0, 2830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2833
 * 
 *     #: Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)
 *     CU_MEM_HANDLE_TYPE_WIN32_KMT = ccuda.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT             # <<<<<<<<<<<<<<
 *     CU_MEM_HANDLE_TYPE_MAX = ccuda.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_MAX
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAllocationHandleType_enum(CU_MEM_HANDLE_TYPE_WIN32_KMT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_HANDLE_TYPE_WIN32_KMT, __pyx_t_4) < 0) __PYX_ERR(0, 2833, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2834
 *     #: Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)
 *     CU_MEM_HANDLE_TYPE_WIN32_KMT = ccuda.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT
 *     CU_MEM_HANDLE_TYPE_MAX = ccuda.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_MAX             # <<<<<<<<<<<<<<
 * 
 * class CUmemAccess_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAllocationHandleType_enum(CU_MEM_HANDLE_TYPE_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_HANDLE_TYPE_MAX, __pyx_t_4) < 0) __PYX_ERR(0, 2834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2817
 *     CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = ccuda.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32
 * 
 * class CUmemAllocationHandleType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for specifying particular handle types
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUmemAllocationHandleType, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmemAllocationHandleType, __pyx_t_4) < 0) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":2836
 *     CU_MEM_HANDLE_TYPE_MAX = ccuda.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_MAX
 * 
 * class CUmemAccess_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the memory protection flags for mapping.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUmemAccess_flags, __pyx_n_s_CUmemAccess_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Specifies_the_memory_protection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2842
 * 
 *     #: Default, make the address range not accessible
 *     CU_MEM_ACCESS_FLAGS_PROT_NONE = ccuda.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_NONE             # <<<<<<<<<<<<<<
 * 
 *     #: Make the address range read accessible
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAccess_flags_enum(CU_MEM_ACCESS_FLAGS_PROT_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ACCESS_FLAGS_PROT_NONE, __pyx_t_4) < 0) __PYX_ERR(0, 2842, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2845
 * 
 *     #: Make the address range read accessible
 *     CU_MEM_ACCESS_FLAGS_PROT_READ = ccuda.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_READ             # <<<<<<<<<<<<<<
 * 
 *     #: Make the address range read-write accessible
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAccess_flags_enum(CU_MEM_ACCESS_FLAGS_PROT_READ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ACCESS_FLAGS_PROT_READ, __pyx_t_4) < 0) __PYX_ERR(0, 2845, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2848
 * 
 *     #: Make the address range read-write accessible
 *     CU_MEM_ACCESS_FLAGS_PROT_READWRITE = ccuda.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_READWRITE             # <<<<<<<<<<<<<<
 *     CU_MEM_ACCESS_FLAGS_PROT_MAX = ccuda.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_MAX
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAccess_flags_enum(CU_MEM_ACCESS_FLAGS_PROT_READWRITE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ACCESS_FLAGS_PROT_READWRI, __pyx_t_4) < 0) __PYX_ERR(0, 2848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2849
 *     #: Make the address range read-write accessible
 *     CU_MEM_ACCESS_FLAGS_PROT_READWRITE = ccuda.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_READWRITE
 *     CU_MEM_ACCESS_FLAGS_PROT_MAX = ccuda.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_MAX             # <<<<<<<<<<<<<<
 * 
 * class CUmemLocationType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAccess_flags_enum(CU_MEM_ACCESS_FLAGS_PROT_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ACCESS_FLAGS_PROT_MAX, __pyx_t_4) < 0) __PYX_ERR(0, 2849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2836
 *     CU_MEM_HANDLE_TYPE_MAX = ccuda.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_MAX
 * 
 * class CUmemAccess_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the memory protection flags for mapping.
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUmemAccess_flags, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmemAccess_flags, __pyx_t_4) < 0) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":2851
 *     CU_MEM_ACCESS_FLAGS_PROT_MAX = ccuda.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_MAX
 * 
 * class CUmemLocationType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the type of location
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUmemLocationType, __pyx_n_s_CUmemLocationType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Specifies_the_type_of_location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2855
 *     Specifies the type of location
 *     """
 *     CU_MEM_LOCATION_TYPE_INVALID = ccuda.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_INVALID             # <<<<<<<<<<<<<<
 * 
 *     #: Location is a device location, thus id is a device ordinal
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemLocationType_enum(CU_MEM_LOCATION_TYPE_INVALID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_LOCATION_TYPE_INVALID, __pyx_t_4) < 0) __PYX_ERR(0, 2855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2858
 * 
 *     #: Location is a device location, thus id is a device ordinal
 *     CU_MEM_LOCATION_TYPE_DEVICE = ccuda.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_DEVICE             # <<<<<<<<<<<<<<
 *     CU_MEM_LOCATION_TYPE_MAX = ccuda.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_MAX
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemLocationType_enum(CU_MEM_LOCATION_TYPE_DEVICE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_LOCATION_TYPE_DEVICE, __pyx_t_4) < 0) __PYX_ERR(0, 2858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2859
 *     #: Location is a device location, thus id is a device ordinal
 *     CU_MEM_LOCATION_TYPE_DEVICE = ccuda.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_DEVICE
 *     CU_MEM_LOCATION_TYPE_MAX = ccuda.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_MAX             # <<<<<<<<<<<<<<
 * 
 * class CUmemAllocationType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemLocationType_enum(CU_MEM_LOCATION_TYPE_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_LOCATION_TYPE_MAX, __pyx_t_4) < 0) __PYX_ERR(0, 2859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2851
 *     CU_MEM_ACCESS_FLAGS_PROT_MAX = ccuda.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_MAX
 * 
 * class CUmemLocationType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the type of location
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUmemLocationType, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmemLocationType, __pyx_t_4) < 0) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":2861
 *     CU_MEM_LOCATION_TYPE_MAX = ccuda.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_MAX
 * 
 * class CUmemAllocationType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Defines the allocation types available
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUmemAllocationType, __pyx_n_s_CUmemAllocationType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Defines_the_allocation_types_av); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2865
 *     Defines the allocation types available
 *     """
 *     CU_MEM_ALLOCATION_TYPE_INVALID = ccuda.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_INVALID             # <<<<<<<<<<<<<<
 * 
 *     #: This allocation type is 'pinned', i.e. cannot migrate from its
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAllocationType_enum(CU_MEM_ALLOCATION_TYPE_INVALID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ALLOCATION_TYPE_INVALID, __pyx_t_4) < 0) __PYX_ERR(0, 2865, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2869
 *     #: This allocation type is 'pinned', i.e. cannot migrate from its
 *     #: current location while the application is actively using it
 *     CU_MEM_ALLOCATION_TYPE_PINNED = ccuda.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_PINNED             # <<<<<<<<<<<<<<
 *     CU_MEM_ALLOCATION_TYPE_MAX = ccuda.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_MAX
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAllocationType_enum(CU_MEM_ALLOCATION_TYPE_PINNED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ALLOCATION_TYPE_PINNED, __pyx_t_4) < 0) __PYX_ERR(0, 2869, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2870
 *     #: current location while the application is actively using it
 *     CU_MEM_ALLOCATION_TYPE_PINNED = ccuda.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_PINNED
 *     CU_MEM_ALLOCATION_TYPE_MAX = ccuda.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_MAX             # <<<<<<<<<<<<<<
 * 
 * class CUmemAllocationGranularity_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAllocationType_enum(CU_MEM_ALLOCATION_TYPE_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ALLOCATION_TYPE_MAX, __pyx_t_4) < 0) __PYX_ERR(0, 2870, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2861
 *     CU_MEM_LOCATION_TYPE_MAX = ccuda.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_MAX
 * 
 * class CUmemAllocationType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Defines the allocation types available
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUmemAllocationType, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmemAllocationType, __pyx_t_4) < 0) __PYX_ERR(0, 2861, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":2872
 *     CU_MEM_ALLOCATION_TYPE_MAX = ccuda.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_MAX
 * 
 * class CUmemAllocationGranularity_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flag for requesting different optimal and required granularities
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUmemAllocationGranularity_flags, __pyx_n_s_CUmemAllocationGranularity_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flag_for_requesting_different_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2879
 * 
 *     #: Minimum required granularity for allocation
 *     CU_MEM_ALLOC_GRANULARITY_MINIMUM = ccuda.CUmemAllocationGranularity_flags_enum.CU_MEM_ALLOC_GRANULARITY_MINIMUM             # <<<<<<<<<<<<<<
 * 
 *     #: Recommended granularity for allocation for best performance
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAllocationGranularity_flags_enum(CU_MEM_ALLOC_GRANULARITY_MINIMUM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ALLOC_GRANULARITY_MINIMUM, __pyx_t_4) < 0) __PYX_ERR(0, 2879, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2882
 * 
 *     #: Recommended granularity for allocation for best performance
 *     CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = ccuda.CUmemAllocationGranularity_flags_enum.CU_MEM_ALLOC_GRANULARITY_RECOMMENDED             # <<<<<<<<<<<<<<
 * 
 * class CUmemRangeHandleType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAllocationGranularity_flags_enum(CU_MEM_ALLOC_GRANULARITY_RECOMMENDED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ALLOC_GRANULARITY_RECOMME, __pyx_t_4) < 0) __PYX_ERR(0, 2882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2872
 *     CU_MEM_ALLOCATION_TYPE_MAX = ccuda.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_MAX
 * 
 * class CUmemAllocationGranularity_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flag for requesting different optimal and required granularities
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUmemAllocationGranularity_flags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmemAllocationGranularity_flags, __pyx_t_4) < 0) __PYX_ERR(0, 2872, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":2884
 *     CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = ccuda.CUmemAllocationGranularity_flags_enum.CU_MEM_ALLOC_GRANULARITY_RECOMMENDED
 * 
 * class CUmemRangeHandleType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the handle type for address range
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUmemRangeHandleType, __pyx_n_s_CUmemRangeHandleType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Specifies_the_handle_type_for_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2888
 *     Specifies the handle type for address range
 *     """
 *     CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD = ccuda.CUmemRangeHandleType_enum.CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD             # <<<<<<<<<<<<<<
 *     CU_MEM_RANGE_HANDLE_TYPE_MAX = ccuda.CUmemRangeHandleType_enum.CU_MEM_RANGE_HANDLE_TYPE_MAX
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemRangeHandleType_enum(CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF, __pyx_t_4) < 0) __PYX_ERR(0, 2888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2889
 *     """
 *     CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD = ccuda.CUmemRangeHandleType_enum.CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD
 *     CU_MEM_RANGE_HANDLE_TYPE_MAX = ccuda.CUmemRangeHandleType_enum.CU_MEM_RANGE_HANDLE_TYPE_MAX             # <<<<<<<<<<<<<<
 * 
 * class CUarraySparseSubresourceType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemRangeHandleType_enum(CU_MEM_RANGE_HANDLE_TYPE_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_RANGE_HANDLE_TYPE_MAX, __pyx_t_4) < 0) __PYX_ERR(0, 2889, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2884
 *     CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = ccuda.CUmemAllocationGranularity_flags_enum.CU_MEM_ALLOC_GRANULARITY_RECOMMENDED
 * 
 * class CUmemRangeHandleType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies the handle type for address range
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUmemRangeHandleType, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmemRangeHandleType, __pyx_t_4) < 0) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":2891
 *     CU_MEM_RANGE_HANDLE_TYPE_MAX = ccuda.CUmemRangeHandleType_enum.CU_MEM_RANGE_HANDLE_TYPE_MAX
 * 
 * class CUarraySparseSubresourceType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Sparse subresource types
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUarraySparseSubresourceType, __pyx_n_s_CUarraySparseSubresourceType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Sparse_subresource_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2895
 *     Sparse subresource types
 *     """
 *     CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = ccuda.CUarraySparseSubresourceType_enum.CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL             # <<<<<<<<<<<<<<
 *     CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = ccuda.CUarraySparseSubresourceType_enum.CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarraySparseSubresourceType_enum(CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE, __pyx_t_4) < 0) __PYX_ERR(0, 2895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2896
 *     """
 *     CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = ccuda.CUarraySparseSubresourceType_enum.CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL
 *     CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = ccuda.CUarraySparseSubresourceType_enum.CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL             # <<<<<<<<<<<<<<
 * 
 * class CUmemOperationType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUarraySparseSubresourceType_enum(CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_2, __pyx_t_4) < 0) __PYX_ERR(0, 2896, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2891
 *     CU_MEM_RANGE_HANDLE_TYPE_MAX = ccuda.CUmemRangeHandleType_enum.CU_MEM_RANGE_HANDLE_TYPE_MAX
 * 
 * class CUarraySparseSubresourceType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Sparse subresource types
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUarraySparseSubresourceType, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUarraySparseSubresourceType, __pyx_t_4) < 0) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":2898
 *     CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = ccuda.CUarraySparseSubresourceType_enum.CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL
 * 
 * class CUmemOperationType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Memory operation types
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUmemOperationType, __pyx_n_s_CUmemOperationType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Memory_operation_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2902
 *     Memory operation types
 *     """
 *     CU_MEM_OPERATION_TYPE_MAP = ccuda.CUmemOperationType_enum.CU_MEM_OPERATION_TYPE_MAP             # <<<<<<<<<<<<<<
 *     CU_MEM_OPERATION_TYPE_UNMAP = ccuda.CUmemOperationType_enum.CU_MEM_OPERATION_TYPE_UNMAP
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemOperationType_enum(CU_MEM_OPERATION_TYPE_MAP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_OPERATION_TYPE_MAP, __pyx_t_4) < 0) __PYX_ERR(0, 2902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2903
 *     """
 *     CU_MEM_OPERATION_TYPE_MAP = ccuda.CUmemOperationType_enum.CU_MEM_OPERATION_TYPE_MAP
 *     CU_MEM_OPERATION_TYPE_UNMAP = ccuda.CUmemOperationType_enum.CU_MEM_OPERATION_TYPE_UNMAP             # <<<<<<<<<<<<<<
 * 
 * class CUmemHandleType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemOperationType_enum(CU_MEM_OPERATION_TYPE_UNMAP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_OPERATION_TYPE_UNMAP, __pyx_t_4) < 0) __PYX_ERR(0, 2903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2898
 *     CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = ccuda.CUarraySparseSubresourceType_enum.CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL
 * 
 * class CUmemOperationType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Memory operation types
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUmemOperationType, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmemOperationType, __pyx_t_4) < 0) __PYX_ERR(0, 2898, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":2905
 *     CU_MEM_OPERATION_TYPE_UNMAP = ccuda.CUmemOperationType_enum.CU_MEM_OPERATION_TYPE_UNMAP
 * 
 * class CUmemHandleType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Memory handle types
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUmemHandleType, __pyx_n_s_CUmemHandleType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Memory_handle_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2909
 *     Memory handle types
 *     """
 *     CU_MEM_HANDLE_TYPE_GENERIC = ccuda.CUmemHandleType_enum.CU_MEM_HANDLE_TYPE_GENERIC             # <<<<<<<<<<<<<<
 * 
 * class CUmemAllocationCompType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemHandleType_enum(CU_MEM_HANDLE_TYPE_GENERIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_HANDLE_TYPE_GENERIC, __pyx_t_4) < 0) __PYX_ERR(0, 2909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2905
 *     CU_MEM_OPERATION_TYPE_UNMAP = ccuda.CUmemOperationType_enum.CU_MEM_OPERATION_TYPE_UNMAP
 * 
 * class CUmemHandleType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Memory handle types
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUmemHandleType, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmemHandleType, __pyx_t_4) < 0) __PYX_ERR(0, 2905, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":2911
 *     CU_MEM_HANDLE_TYPE_GENERIC = ccuda.CUmemHandleType_enum.CU_MEM_HANDLE_TYPE_GENERIC
 * 
 * class CUmemAllocationCompType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies compression attribute for an allocation.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUmemAllocationCompType, __pyx_n_s_CUmemAllocationCompType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Specifies_compression_attribute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2917
 * 
 *     #: Allocating non-compressible memory
 *     CU_MEM_ALLOCATION_COMP_NONE = ccuda.CUmemAllocationCompType_enum.CU_MEM_ALLOCATION_COMP_NONE             # <<<<<<<<<<<<<<
 * 
 *     #: Allocating compressible memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAllocationCompType_enum(CU_MEM_ALLOCATION_COMP_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ALLOCATION_COMP_NONE, __pyx_t_4) < 0) __PYX_ERR(0, 2917, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2920
 * 
 *     #: Allocating compressible memory
 *     CU_MEM_ALLOCATION_COMP_GENERIC = ccuda.CUmemAllocationCompType_enum.CU_MEM_ALLOCATION_COMP_GENERIC             # <<<<<<<<<<<<<<
 * 
 * class CUgraphExecUpdateResult(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemAllocationCompType_enum(CU_MEM_ALLOCATION_COMP_GENERIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEM_ALLOCATION_COMP_GENERIC, __pyx_t_4) < 0) __PYX_ERR(0, 2920, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2911
 *     CU_MEM_HANDLE_TYPE_GENERIC = ccuda.CUmemHandleType_enum.CU_MEM_HANDLE_TYPE_GENERIC
 * 
 * class CUmemAllocationCompType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Specifies compression attribute for an allocation.
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUmemAllocationCompType, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmemAllocationCompType, __pyx_t_4) < 0) __PYX_ERR(0, 2911, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":2922
 *     CU_MEM_ALLOCATION_COMP_GENERIC = ccuda.CUmemAllocationCompType_enum.CU_MEM_ALLOCATION_COMP_GENERIC
 * 
 * class CUgraphExecUpdateResult(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUgraphExecUpdateResult, __pyx_n_s_CUgraphExecUpdateResult, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s__1015); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2928
 * 
 *     #: The update succeeded
 *     CU_GRAPH_EXEC_UPDATE_SUCCESS = ccuda.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_SUCCESS             # <<<<<<<<<<<<<<
 * 
 *     #: The update failed for an unexpected reason which is described in the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphExecUpdateResult_enum(CU_GRAPH_EXEC_UPDATE_SUCCESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_EXEC_UPDATE_SUCCESS, __pyx_t_4) < 0) __PYX_ERR(0, 2928, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2932
 *     #: The update failed for an unexpected reason which is described in the
 *     #: return value of the function
 *     CU_GRAPH_EXEC_UPDATE_ERROR = ccuda.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR             # <<<<<<<<<<<<<<
 * 
 *     #: The update failed because the topology changed
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphExecUpdateResult_enum(CU_GRAPH_EXEC_UPDATE_ERROR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR, __pyx_t_4) < 0) __PYX_ERR(0, 2932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2935
 * 
 *     #: The update failed because the topology changed
 *     CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = ccuda.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED             # <<<<<<<<<<<<<<
 * 
 *     #: The update failed because a node type changed
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphExecUpdateResult_enum(CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_TOPOL, __pyx_t_4) < 0) __PYX_ERR(0, 2935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2938
 * 
 *     #: The update failed because a node type changed
 *     CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = ccuda.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED             # <<<<<<<<<<<<<<
 * 
 *     #: The update failed because the function of a kernel node changed
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphExecUpdateResult_enum(CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_NODE, __pyx_t_4) < 0) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2942
 *     #: The update failed because the function of a kernel node changed
 *     #: (CUDA driver < 11.2)
 *     CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = ccuda.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED             # <<<<<<<<<<<<<<
 * 
 *     #: The update failed because the parameters changed in a way that is
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphExecUpdateResult_enum(CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_FUNCT, __pyx_t_4) < 0) __PYX_ERR(0, 2942, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2946
 *     #: The update failed because the parameters changed in a way that is
 *     #: not supported
 *     CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = ccuda.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED             # <<<<<<<<<<<<<<
 * 
 *     #: The update failed because something about the node is not supported
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphExecUpdateResult_enum(CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_PARAM, __pyx_t_4) < 0) __PYX_ERR(0, 2946, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2949
 * 
 *     #: The update failed because something about the node is not supported
 *     CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = ccuda.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED             # <<<<<<<<<<<<<<
 * 
 *     #: The update failed because the function of a kernel node changed in
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphExecUpdateResult_enum(CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_NOT_S, __pyx_t_4) < 0) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2953
 *     #: The update failed because the function of a kernel node changed in
 *     #: an unsupported way
 *     CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = ccuda.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE             # <<<<<<<<<<<<<<
 * 
 *     #: The update failed because the node attributes changed in a way that
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphExecUpdateResult_enum(CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_UNSUP, __pyx_t_4) < 0) __PYX_ERR(0, 2953, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2957
 *     #: The update failed because the node attributes changed in a way that
 *     #: is not supported
 *     CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = ccuda.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED             # <<<<<<<<<<<<<<
 * 
 * class CUmemPool_attribute(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphExecUpdateResult_enum(CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_EXEC_UPDATE_ERROR_ATTRI, __pyx_t_4) < 0) __PYX_ERR(0, 2957, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2922
 *     CU_MEM_ALLOCATION_COMP_GENERIC = ccuda.CUmemAllocationCompType_enum.CU_MEM_ALLOCATION_COMP_GENERIC
 * 
 * class CUgraphExecUpdateResult(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUgraphExecUpdateResult, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUgraphExecUpdateResult, __pyx_t_4) < 0) __PYX_ERR(0, 2922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":2959
 *     CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = ccuda.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED
 * 
 * class CUmemPool_attribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA memory pool attributes
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUmemPool_attribute, __pyx_n_s_CUmemPool_attribute, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_CUDA_memory_pool_attributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":2969
 *     #: events and null stream interactions can create the required stream
 *     #: ordered dependencies. (default enabled)
 *     CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = ccuda.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES             # <<<<<<<<<<<<<<
 * 
 *     #: (value type = int) Allow reuse of already completed frees when there
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemPool_attribute_enum(CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVE, __pyx_t_4) < 0) __PYX_ERR(0, 2969, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2973
 *     #: (value type = int) Allow reuse of already completed frees when there
 *     #: is no dependency between the free and allocation. (default enabled)
 *     CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = ccuda.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC             # <<<<<<<<<<<<<<
 * 
 *     #: (value type = int) Allow cuMemAllocAsync to insert new stream
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemPool_attribute_enum(CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPO, __pyx_t_4) < 0) __PYX_ERR(0, 2973, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2978
 *     #: dependencies in order to establish the stream ordering required to
 *     #: reuse a piece of memory released by cuFreeAsync (default enabled).
 *     CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = ccuda.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES             # <<<<<<<<<<<<<<
 * 
 *     #: (value type = cuuint64_t) Amount of reserved memory in bytes to hold
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemPool_attribute_enum(CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEMPOOL_ATTR_REUSE_ALLOW_INTE, __pyx_t_4) < 0) __PYX_ERR(0, 2978, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2985
 *     #: the allocator will try to release memory back to the OS on the next
 *     #: call to stream, event or context synchronize. (default 0)
 *     CU_MEMPOOL_ATTR_RELEASE_THRESHOLD = ccuda.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD             # <<<<<<<<<<<<<<
 * 
 *     #: (value type = cuuint64_t) Amount of backing memory currently
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemPool_attribute_enum(CU_MEMPOOL_ATTR_RELEASE_THRESHOLD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEMPOOL_ATTR_RELEASE_THRESHOL, __pyx_t_4) < 0) __PYX_ERR(0, 2985, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2989
 *     #: (value type = cuuint64_t) Amount of backing memory currently
 *     #: allocated for the mempool.
 *     CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT = ccuda.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT             # <<<<<<<<<<<<<<
 * 
 *     #: (value type = cuuint64_t) High watermark of backing memory allocated
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemPool_attribute_enum(CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEMPOOL_ATTR_RESERVED_MEM_CUR, __pyx_t_4) < 0) __PYX_ERR(0, 2989, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2994
 *     #: for the mempool since the last time it was reset. High watermark can
 *     #: only be reset to zero.
 *     CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH = ccuda.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH             # <<<<<<<<<<<<<<
 * 
 *     #: (value type = cuuint64_t) Amount of memory from the pool that is
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemPool_attribute_enum(CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEMPOOL_ATTR_RESERVED_MEM_HIG, __pyx_t_4) < 0) __PYX_ERR(0, 2994, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2998
 *     #: (value type = cuuint64_t) Amount of memory from the pool that is
 *     #: currently in use by the application.
 *     CU_MEMPOOL_ATTR_USED_MEM_CURRENT = ccuda.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT             # <<<<<<<<<<<<<<
 * 
 *     #: (value type = cuuint64_t) High watermark of the amount of memory
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemPool_attribute_enum(CU_MEMPOOL_ATTR_USED_MEM_CURRENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEMPOOL_ATTR_USED_MEM_CURRENT, __pyx_t_4) < 0) __PYX_ERR(0, 2998, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3003
 *     #: from the pool that was in use by the application since the last time
 *     #: it was reset. High watermark can only be reset to zero.
 *     CU_MEMPOOL_ATTR_USED_MEM_HIGH = ccuda.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH             # <<<<<<<<<<<<<<
 * 
 * class CUgraphMem_attribute(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmemPool_attribute_enum(CU_MEMPOOL_ATTR_USED_MEM_HIGH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MEMPOOL_ATTR_USED_MEM_HIGH, __pyx_t_4) < 0) __PYX_ERR(0, 3003, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":2959
 *     CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = ccuda.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED
 * 
 * class CUmemPool_attribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA memory pool attributes
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUmemPool_attribute, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmemPool_attribute, __pyx_t_4) < 0) __PYX_ERR(0, 2959, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3005
 *     CU_MEMPOOL_ATTR_USED_MEM_HIGH = ccuda.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH
 * 
 * class CUgraphMem_attribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUgraphMem_attribute, __pyx_n_s_CUgraphMem_attribute, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s__1015); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3012
 *     #: (value type = cuuint64_t) Amount of memory, in bytes, currently
 *     #: associated with graphs
 *     CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT = ccuda.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT             # <<<<<<<<<<<<<<
 * 
 *     #: (value type = cuuint64_t) High watermark of memory, in bytes,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphMem_attribute_enum(CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_MEM_ATTR_USED_MEM_CURRE, __pyx_t_4) < 0) __PYX_ERR(0, 3012, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3017
 *     #: associated with graphs since the last time it was reset. High
 *     #: watermark can only be reset to zero.
 *     CU_GRAPH_MEM_ATTR_USED_MEM_HIGH = ccuda.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH             # <<<<<<<<<<<<<<
 * 
 *     #: (value type = cuuint64_t) Amount of memory, in bytes, currently
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphMem_attribute_enum(CU_GRAPH_MEM_ATTR_USED_MEM_HIGH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, __pyx_t_4) < 0) __PYX_ERR(0, 3017, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3021
 *     #: (value type = cuuint64_t) Amount of memory, in bytes, currently
 *     #: allocated for use by the CUDA graphs asynchronous allocator.
 *     CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT = ccuda.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT             # <<<<<<<<<<<<<<
 * 
 *     #: (value type = cuuint64_t) High watermark of memory, in bytes,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphMem_attribute_enum(CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_MEM_ATTR_RESERVED_MEM_C, __pyx_t_4) < 0) __PYX_ERR(0, 3021, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3026
 *     #: currently allocated for use by the CUDA graphs asynchronous
 *     #: allocator.
 *     CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = ccuda.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH             # <<<<<<<<<<<<<<
 * 
 * class CUflushGPUDirectRDMAWritesOptions(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphMem_attribute_enum(CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_MEM_ATTR_RESERVED_MEM_H, __pyx_t_4) < 0) __PYX_ERR(0, 3026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3005
 *     CU_MEMPOOL_ATTR_USED_MEM_HIGH = ccuda.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH
 * 
 * class CUgraphMem_attribute(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUgraphMem_attribute, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUgraphMem_attribute, __pyx_t_4) < 0) __PYX_ERR(0, 3005, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":3028
 *     CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = ccuda.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH
 * 
 * class CUflushGPUDirectRDMAWritesOptions(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Bitmasks for
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUflushGPUDirectRDMAWritesOption, __pyx_n_s_CUflushGPUDirectRDMAWritesOption, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Bitmasks_for_py_obj_CU_DEVICE_A); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3036
 *     #: :py:obj:`~.cuFlushGPUDirectRDMAWrites()` and its CUDA Runtime API
 *     #: counterpart are supported on the device.
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = ccuda.CUflushGPUDirectRDMAWritesOptions_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST             # <<<<<<<<<<<<<<
 * 
 *     #: The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUflushGPUDirectRDMAWritesOptions_enum(CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES, __pyx_t_4) < 0) __PYX_ERR(0, 3036, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3041
 *     #: :py:obj:`~.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES` MemOp are supported
 *     #: on the device.
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = ccuda.CUflushGPUDirectRDMAWritesOptions_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS             # <<<<<<<<<<<<<<
 * 
 * class CUGPUDirectRDMAWritesOrdering(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUflushGPUDirectRDMAWritesOptions_enum(CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_2, __pyx_t_4) < 0) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3028
 *     CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = ccuda.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH
 * 
 * class CUflushGPUDirectRDMAWritesOptions(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Bitmasks for
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUflushGPUDirectRDMAWritesOption, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUflushGPUDirectRDMAWritesOption, __pyx_t_4) < 0) __PYX_ERR(0, 3028, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3043
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = ccuda.CUflushGPUDirectRDMAWritesOptions_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS
 * 
 * class CUGPUDirectRDMAWritesOrdering(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Platform native ordering for GPUDirect RDMA writes
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUGPUDirectRDMAWritesOrdering, __pyx_n_s_CUGPUDirectRDMAWritesOrdering, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Platform_native_ordering_for_GP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3051
 *     #: :py:obj:`~.cuFlushGPUDirectRDMAWrites()` can be leveraged if
 *     #: supported.
 *     CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE = ccuda.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE             # <<<<<<<<<<<<<<
 * 
 *     #: Natively, the device can consistently consume remote writes,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUGPUDirectRDMAWritesOrdering_enum(CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GPU_DIRECT_RDMA_WRITES_ORDERI, __pyx_t_4) < 0) __PYX_ERR(0, 3051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3055
 *     #: Natively, the device can consistently consume remote writes,
 *     #: although other CUDA devices may not.
 *     CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER = ccuda.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER             # <<<<<<<<<<<<<<
 * 
 *     #: Any CUDA device in the system can consistently consume remote writes
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUGPUDirectRDMAWritesOrdering_enum(CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GPU_DIRECT_RDMA_WRITES_ORDERI_2, __pyx_t_4) < 0) __PYX_ERR(0, 3055, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3059
 *     #: Any CUDA device in the system can consistently consume remote writes
 *     #: to this device.
 *     CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES = ccuda.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES             # <<<<<<<<<<<<<<
 * 
 * class CUflushGPUDirectRDMAWritesScope(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUGPUDirectRDMAWritesOrdering_enum(CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GPU_DIRECT_RDMA_WRITES_ORDERI_3, __pyx_t_4) < 0) __PYX_ERR(0, 3059, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3043
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = ccuda.CUflushGPUDirectRDMAWritesOptions_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS
 * 
 * class CUGPUDirectRDMAWritesOrdering(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Platform native ordering for GPUDirect RDMA writes
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUGPUDirectRDMAWritesOrdering, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUGPUDirectRDMAWritesOrdering, __pyx_t_4) < 0) __PYX_ERR(0, 3043, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":3061
 *     CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES = ccuda.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES
 * 
 * class CUflushGPUDirectRDMAWritesScope(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     The scopes for :py:obj:`~.cuFlushGPUDirectRDMAWrites`
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUflushGPUDirectRDMAWritesScope, __pyx_n_s_CUflushGPUDirectRDMAWritesScope, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_The_scopes_for_py_obj_cuFlushGP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3068
 *     #: Blocks until remote writes are visible to the CUDA device context
 *     #: owning the data.
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER = ccuda.CUflushGPUDirectRDMAWritesScope_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER             # <<<<<<<<<<<<<<
 * 
 *     #: Blocks until remote writes are visible to all CUDA device contexts.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUflushGPUDirectRDMAWritesScope_enum(CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_3, __pyx_t_4) < 0) __PYX_ERR(0, 3068, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3071
 * 
 *     #: Blocks until remote writes are visible to all CUDA device contexts.
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = ccuda.CUflushGPUDirectRDMAWritesScope_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES             # <<<<<<<<<<<<<<
 * 
 * class CUflushGPUDirectRDMAWritesTarget(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUflushGPUDirectRDMAWritesScope_enum(CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_4, __pyx_t_4) < 0) __PYX_ERR(0, 3071, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3061
 *     CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES = ccuda.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES
 * 
 * class CUflushGPUDirectRDMAWritesScope(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     The scopes for :py:obj:`~.cuFlushGPUDirectRDMAWrites`
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUflushGPUDirectRDMAWritesScope, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUflushGPUDirectRDMAWritesScope, __pyx_t_4) < 0) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3073
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = ccuda.CUflushGPUDirectRDMAWritesScope_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES
 * 
 * class CUflushGPUDirectRDMAWritesTarget(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     The targets for :py:obj:`~.cuFlushGPUDirectRDMAWrites`
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUflushGPUDirectRDMAWritesTarget, __pyx_n_s_CUflushGPUDirectRDMAWritesTarget, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_The_targets_for_py_obj_cuFlushG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3080
 *     #: Sets the target for :py:obj:`~.cuFlushGPUDirectRDMAWrites()` to the
 *     #: currently active CUDA device context.
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = ccuda.CUflushGPUDirectRDMAWritesTarget_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX             # <<<<<<<<<<<<<<
 * 
 * class CUgraphDebugDot_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUflushGPUDirectRDMAWritesTarget_enum(CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_FLUSH_GPU_DIRECT_RDMA_WRITES_5, __pyx_t_4) < 0) __PYX_ERR(0, 3080, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3073
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = ccuda.CUflushGPUDirectRDMAWritesScope_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES
 * 
 * class CUflushGPUDirectRDMAWritesTarget(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     The targets for :py:obj:`~.cuFlushGPUDirectRDMAWrites`
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUflushGPUDirectRDMAWritesTarget, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUflushGPUDirectRDMAWritesTarget, __pyx_t_4) < 0) __PYX_ERR(0, 3073, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":3082
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = ccuda.CUflushGPUDirectRDMAWritesTarget_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX
 * 
 * class CUgraphDebugDot_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     The additional write options for :py:obj:`~.cuGraphDebugDotPrint`
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUgraphDebugDot_flags, __pyx_n_s_CUgraphDebugDot_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_The_additional_write_options_fo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3086
 *     The additional write options for :py:obj:`~.cuGraphDebugDotPrint`
 *     """
 *     CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE             # <<<<<<<<<<<<<<
 * 
 *     #: Output all debug data as if every debug flag is enabled
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE, __pyx_t_4) < 0) __PYX_ERR(0, 3086, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3089
 * 
 *     #: Output all debug data as if every debug flag is enabled
 *     CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES             # <<<<<<<<<<<<<<
 * 
 *     #: Use CUDA Runtime structures for output
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME, __pyx_t_4) < 0) __PYX_ERR(0, 3089, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3092
 * 
 *     #: Use CUDA Runtime structures for output
 *     CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 *     #: Adds CUDA_KERNEL_NODE_PARAMS values to output
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL, __pyx_t_4) < 0) __PYX_ERR(0, 3092, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3095
 * 
 *     #: Adds CUDA_KERNEL_NODE_PARAMS values to output
 *     CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 *     #: Adds CUDA_MEMCPY3D values to output
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY, __pyx_t_4) < 0) __PYX_ERR(0, 3095, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3098
 * 
 *     #: Adds CUDA_MEMCPY3D values to output
 *     CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 *     #: Adds CUDA_MEMSET_NODE_PARAMS values to output
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET, __pyx_t_4) < 0) __PYX_ERR(0, 3098, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3101
 * 
 *     #: Adds CUDA_MEMSET_NODE_PARAMS values to output
 *     CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 *     #: Adds CUDA_HOST_NODE_PARAMS values to output
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NO, __pyx_t_4) < 0) __PYX_ERR(0, 3101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3104
 * 
 *     #: Adds CUDA_HOST_NODE_PARAMS values to output
 *     CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 *     #: Adds CUevent handle from record and wait nodes to output
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_N, __pyx_t_4) < 0) __PYX_ERR(0, 3104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3107
 * 
 *     #: Adds CUevent handle from record and wait nodes to output
 *     CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 *     #: Adds CUDA_EXT_SEM_SIGNAL_NODE_PARAMS values to output
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEM, __pyx_t_4) < 0) __PYX_ERR(0, 3107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3110
 * 
 *     #: Adds CUDA_EXT_SEM_SIGNAL_NODE_PARAMS values to output
 *     CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 *     #: Adds CUDA_EXT_SEM_WAIT_NODE_PARAMS values to output
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEM_2, __pyx_t_4) < 0) __PYX_ERR(0, 3110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3113
 * 
 *     #: Adds CUDA_EXT_SEM_WAIT_NODE_PARAMS values to output
 *     CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES             # <<<<<<<<<<<<<<
 * 
 *     #: Adds CUkernelNodeAttrValue values to output
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_2, __pyx_t_4) < 0) __PYX_ERR(0, 3113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3116
 * 
 *     #: Adds CUkernelNodeAttrValue values to output
 *     CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES             # <<<<<<<<<<<<<<
 * 
 *     #: Adds node handles and every kernel function handle to output
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES, __pyx_t_4) < 0) __PYX_ERR(0, 3116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3119
 * 
 *     #: Adds node handles and every kernel function handle to output
 *     CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 *     #: Adds memory alloc node parameters to output
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALL, __pyx_t_4) < 0) __PYX_ERR(0, 3119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3122
 * 
 *     #: Adds memory alloc node parameters to output
 *     CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS             # <<<<<<<<<<<<<<
 *     CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FRE, __pyx_t_4) < 0) __PYX_ERR(0, 3122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3123
 *     #: Adds memory alloc node parameters to output
 *     CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS
 *     CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS             # <<<<<<<<<<<<<<
 * 
 * class CUuserObject_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_M, __pyx_t_4) < 0) __PYX_ERR(0, 3123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3082
 *     CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = ccuda.CUflushGPUDirectRDMAWritesTarget_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX
 * 
 * class CUgraphDebugDot_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     The additional write options for :py:obj:`~.cuGraphDebugDotPrint`
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUgraphDebugDot_flags, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUgraphDebugDot_flags, __pyx_t_4) < 0) __PYX_ERR(0, 3082, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3125
 *     CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS
 * 
 * class CUuserObject_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for user objects for graphs
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUuserObject_flags, __pyx_n_s_CUuserObject_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flags_for_user_objects_for_grap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3132
 *     #: Indicates the destructor execution is not synchronized by any CUDA
 *     #: handle.
 *     CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = ccuda.CUuserObject_flags_enum.CU_USER_OBJECT_NO_DESTRUCTOR_SYNC             # <<<<<<<<<<<<<<
 * 
 * class CUuserObjectRetain_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUuserObject_flags_enum(CU_USER_OBJECT_NO_DESTRUCTOR_SYNC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_USER_OBJECT_NO_DESTRUCTOR_SYN, __pyx_t_4) < 0) __PYX_ERR(0, 3132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3125
 *     CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS = ccuda.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS
 * 
 * class CUuserObject_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for user objects for graphs
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUuserObject_flags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUuserObject_flags, __pyx_t_4) < 0) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":3134
 *     CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = ccuda.CUuserObject_flags_enum.CU_USER_OBJECT_NO_DESTRUCTOR_SYNC
 * 
 * class CUuserObjectRetain_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for retaining user object references for graphs
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUuserObjectRetain_flags, __pyx_n_s_CUuserObjectRetain_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flags_for_retaining_user_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3141
 *     #: Transfer references from the caller rather than creating new
 *     #: references.
 *     CU_GRAPH_USER_OBJECT_MOVE = ccuda.CUuserObjectRetain_flags_enum.CU_GRAPH_USER_OBJECT_MOVE             # <<<<<<<<<<<<<<
 * 
 * class CUgraphInstantiate_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUuserObjectRetain_flags_enum(CU_GRAPH_USER_OBJECT_MOVE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GRAPH_USER_OBJECT_MOVE, __pyx_t_4) < 0) __PYX_ERR(0, 3141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3134
 *     CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = ccuda.CUuserObject_flags_enum.CU_USER_OBJECT_NO_DESTRUCTOR_SYNC
 * 
 * class CUuserObjectRetain_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for retaining user object references for graphs
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUuserObjectRetain_flags, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUuserObjectRetain_flags, __pyx_t_4) < 0) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3143
 *     CU_GRAPH_USER_OBJECT_MOVE = ccuda.CUuserObjectRetain_flags_enum.CU_GRAPH_USER_OBJECT_MOVE
 * 
 * class CUgraphInstantiate_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for instantiating a graph
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUgraphInstantiate_flags, __pyx_n_s_CUgraphInstantiate_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flags_for_instantiating_a_graph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3149
 * 
 *     #: Automatically free memory allocated in a graph before relaunching.
 *     CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = ccuda.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH             # <<<<<<<<<<<<<<
 * 
 *     #: Run the graph using the per-node priority attributes rather than the
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphInstantiate_flags_enum(CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_GRAPH_INSTANTIATE_FLAG_AUTO, __pyx_t_4) < 0) __PYX_ERR(0, 3149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3153
 *     #: Run the graph using the per-node priority attributes rather than the
 *     #: priority of the stream it is launched into.
 *     CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY = ccuda.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY             # <<<<<<<<<<<<<<
 * 
 * class CUmoduleLoadingMode(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUgraphInstantiate_flags_enum(CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CUDA_GRAPH_INSTANTIATE_FLAG_USE, __pyx_t_4) < 0) __PYX_ERR(0, 3153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3143
 *     CU_GRAPH_USER_OBJECT_MOVE = ccuda.CUuserObjectRetain_flags_enum.CU_GRAPH_USER_OBJECT_MOVE
 * 
 * class CUgraphInstantiate_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags for instantiating a graph
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUgraphInstantiate_flags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUgraphInstantiate_flags, __pyx_t_4) < 0) __PYX_ERR(0, 3143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":3155
 *     CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY = ccuda.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY
 * 
 * class CUmoduleLoadingMode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA Lazy Loading status
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUmoduleLoadingMode, __pyx_n_s_CUmoduleLoadingMode, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_CUDA_Lazy_Loading_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3161
 * 
 *     #: Lazy Kernel Loading is not enabled
 *     CU_MODULE_EAGER_LOADING = ccuda.CUmoduleLoadingMode_enum.CU_MODULE_EAGER_LOADING             # <<<<<<<<<<<<<<
 * 
 *     #: Lazy Kernel Loading is enabled
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmoduleLoadingMode_enum(CU_MODULE_EAGER_LOADING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MODULE_EAGER_LOADING, __pyx_t_4) < 0) __PYX_ERR(0, 3161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3164
 * 
 *     #: Lazy Kernel Loading is enabled
 *     CU_MODULE_LAZY_LOADING = ccuda.CUmoduleLoadingMode_enum.CU_MODULE_LAZY_LOADING             # <<<<<<<<<<<<<<
 * 
 * class CUoutput_mode(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUmoduleLoadingMode_enum(CU_MODULE_LAZY_LOADING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_MODULE_LAZY_LOADING, __pyx_t_4) < 0) __PYX_ERR(0, 3164, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3155
 *     CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY = ccuda.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY
 * 
 * class CUmoduleLoadingMode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA Lazy Loading status
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUmoduleLoadingMode, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUmoduleLoadingMode, __pyx_t_4) < 0) __PYX_ERR(0, 3155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3166
 *     CU_MODULE_LAZY_LOADING = ccuda.CUmoduleLoadingMode_enum.CU_MODULE_LAZY_LOADING
 * 
 * class CUoutput_mode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Profiler Output Modes
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUoutput_mode, __pyx_n_s_CUoutput_mode, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Profiler_Output_Modes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3172
 * 
 *     #: Output mode Key-Value pair format.
 *     CU_OUT_KEY_VALUE_PAIR = ccuda.CUoutput_mode_enum.CU_OUT_KEY_VALUE_PAIR             # <<<<<<<<<<<<<<
 * 
 *     #: Output mode Comma separated values format.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUoutput_mode_enum(CU_OUT_KEY_VALUE_PAIR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_OUT_KEY_VALUE_PAIR, __pyx_t_4) < 0) __PYX_ERR(0, 3172, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3175
 * 
 *     #: Output mode Comma separated values format.
 *     CU_OUT_CSV = ccuda.CUoutput_mode_enum.CU_OUT_CSV             # <<<<<<<<<<<<<<
 * 
 * class CUeglFrameType(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum__CUoutput_mode_enum(CU_OUT_CSV); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_OUT_CSV, __pyx_t_4) < 0) __PYX_ERR(0, 3175, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3166
 *     CU_MODULE_LAZY_LOADING = ccuda.CUmoduleLoadingMode_enum.CU_MODULE_LAZY_LOADING
 * 
 * class CUoutput_mode(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Profiler Output Modes
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUoutput_mode, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUoutput_mode, __pyx_t_4) < 0) __PYX_ERR(0, 3166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":3177
 *     CU_OUT_CSV = ccuda.CUoutput_mode_enum.CU_OUT_CSV
 * 
 * class CUeglFrameType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA EglFrame type - array or pointer
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUeglFrameType, __pyx_n_s_CUeglFrameType, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_CUDA_EglFrame_type_array_or_poi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3183
 * 
 *     #: Frame type CUDA array
 *     CU_EGL_FRAME_TYPE_ARRAY = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY             # <<<<<<<<<<<<<<
 * 
 *     #: Frame type pointer
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglFrameType_enum(__pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_ARRAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_FRAME_TYPE_ARRAY, __pyx_t_4) < 0) __PYX_ERR(0, 3183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3186
 * 
 *     #: Frame type pointer
 *     CU_EGL_FRAME_TYPE_PITCH = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH             # <<<<<<<<<<<<<<
 * 
 * class CUeglResourceLocationFlags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglFrameType_enum(__pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_PITCH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_FRAME_TYPE_PITCH, __pyx_t_4) < 0) __PYX_ERR(0, 3186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3177
 *     CU_OUT_CSV = ccuda.CUoutput_mode_enum.CU_OUT_CSV
 * 
 * class CUeglFrameType(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA EglFrame type - array or pointer
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUeglFrameType, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUeglFrameType, __pyx_t_4) < 0) __PYX_ERR(0, 3177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3188
 *     CU_EGL_FRAME_TYPE_PITCH = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH
 * 
 * class CUeglResourceLocationFlags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Resource location flags- sysmem or vidmem  For CUDA context on
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUeglResourceLocationFlags, __pyx_n_s_CUeglResourceLocationFlags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Resource_location_flags_sysmem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3204
 * 
 *     #: Resource location sysmem
 *     CU_EGL_RESOURCE_LOCATION_SYSMEM = ccuda.CUeglResourceLocationFlags_enum.CU_EGL_RESOURCE_LOCATION_SYSMEM             # <<<<<<<<<<<<<<
 * 
 *     #: Resource location vidmem
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum(__pyx_e_4cuda_5ccuda_CU_EGL_RESOURCE_LOCATION_SYSMEM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_RESOURCE_LOCATION_SYSMEM, __pyx_t_4) < 0) __PYX_ERR(0, 3204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3207
 * 
 *     #: Resource location vidmem
 *     CU_EGL_RESOURCE_LOCATION_VIDMEM = ccuda.CUeglResourceLocationFlags_enum.CU_EGL_RESOURCE_LOCATION_VIDMEM             # <<<<<<<<<<<<<<
 * 
 * class CUeglColorFormat(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum(__pyx_e_4cuda_5ccuda_CU_EGL_RESOURCE_LOCATION_VIDMEM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_RESOURCE_LOCATION_VIDMEM, __pyx_t_4) < 0) __PYX_ERR(0, 3207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3188
 *     CU_EGL_FRAME_TYPE_PITCH = ccuda.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH
 * 
 * class CUeglResourceLocationFlags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Resource location flags- sysmem or vidmem  For CUDA context on
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUeglResourceLocationFlags, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUeglResourceLocationFlags, __pyx_t_4) < 0) __PYX_ERR(0, 3188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":3209
 *     CU_EGL_RESOURCE_LOCATION_VIDMEM = ccuda.CUeglResourceLocationFlags_enum.CU_EGL_RESOURCE_LOCATION_VIDMEM
 * 
 * class CUeglColorFormat(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA EGL Color Format - The different planar and multiplanar
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUeglColorFormat, __pyx_n_s_CUeglColorFormat, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_CUDA_EGL_Color_Format_The_diffe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3219
 *     #: Y, U, V in three surfaces, each in a separate surface, U/V width =
 *     #: 1/2 Y width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YUV420_PLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y, UV in two surfaces (UV as one surface) with VU byte ordering,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_PLANA, __pyx_t_4) < 0) __PYX_ERR(0, 3219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3223
 *     #: Y, UV in two surfaces (UV as one surface) with VU byte ordering,
 *     #: width, height ratio same as YUV420Planar.
 *     CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_SEMIP, __pyx_t_4) < 0) __PYX_ERR(0, 3223, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3227
 *     #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V
 *     #: height = Y height.
 *     CU_EGL_COLOR_FORMAT_YUV422_PLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y, UV in two surfaces with VU byte ordering, width, height ratio
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_PLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV422_PLANA, __pyx_t_4) < 0) __PYX_ERR(0, 3227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3231
 *     #: Y, UV in two surfaces with VU byte ordering, width, height ratio
 *     #: same as YUV422Planar.
 *     CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: R/G/B three channels in one surface with BGR byte ordering. Only
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV422_SEMIP, __pyx_t_4) < 0) __PYX_ERR(0, 3231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3235
 *     #: R/G/B three channels in one surface with BGR byte ordering. Only
 *     #: pitch linear format supported.
 *     CU_EGL_COLOR_FORMAT_RGB = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGB             # <<<<<<<<<<<<<<
 * 
 *     #: R/G/B three channels in one surface with RGB byte ordering. Only
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RGB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_RGB, __pyx_t_4) < 0) __PYX_ERR(0, 3235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3239
 *     #: R/G/B three channels in one surface with RGB byte ordering. Only
 *     #: pitch linear format supported.
 *     CU_EGL_COLOR_FORMAT_BGR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGR             # <<<<<<<<<<<<<<
 * 
 *     #: R/G/B/A four channels in one surface with BGRA byte ordering.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BGR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BGR, __pyx_t_4) < 0) __PYX_ERR(0, 3239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3242
 * 
 *     #: R/G/B/A four channels in one surface with BGRA byte ordering.
 *     CU_EGL_COLOR_FORMAT_ARGB = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB             # <<<<<<<<<<<<<<
 * 
 *     #: R/G/B/A four channels in one surface with ABGR byte ordering.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_ARGB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_ARGB, __pyx_t_4) < 0) __PYX_ERR(0, 3242, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3245
 * 
 *     #: R/G/B/A four channels in one surface with ABGR byte ordering.
 *     CU_EGL_COLOR_FORMAT_RGBA = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA             # <<<<<<<<<<<<<<
 * 
 *     #: single luminance channel in one surface.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RGBA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_RGBA, __pyx_t_4) < 0) __PYX_ERR(0, 3245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3248
 * 
 *     #: single luminance channel in one surface.
 *     CU_EGL_COLOR_FORMAT_L = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L             # <<<<<<<<<<<<<<
 * 
 *     #: single color channel in one surface.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_L); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_L, __pyx_t_4) < 0) __PYX_ERR(0, 3248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3251
 * 
 *     #: single color channel in one surface.
 *     CU_EGL_COLOR_FORMAT_R = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R             # <<<<<<<<<<<<<<
 * 
 *     #: Y, U, V in three surfaces, each in a separate surface, U/V width = Y
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_R); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_R, __pyx_t_4) < 0) __PYX_ERR(0, 3251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3255
 *     #: Y, U, V in three surfaces, each in a separate surface, U/V width = Y
 *     #: width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_YUV444_PLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y, UV in two surfaces (UV as one surface) with VU byte ordering,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_PLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV444_PLANA, __pyx_t_4) < 0) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3259
 *     #: Y, UV in two surfaces (UV as one surface) with VU byte ordering,
 *     #: width, height ratio same as YUV444Planar.
 *     CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y, U, V in one surface, interleaved as UYVY in one channel.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV444_SEMIP, __pyx_t_4) < 0) __PYX_ERR(0, 3259, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3262
 * 
 *     #: Y, U, V in one surface, interleaved as UYVY in one channel.
 *     CU_EGL_COLOR_FORMAT_YUYV_422 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422             # <<<<<<<<<<<<<<
 * 
 *     #: Y, U, V in one surface, interleaved as YUYV in one channel.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUYV_422); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUYV_422, __pyx_t_4) < 0) __PYX_ERR(0, 3262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3265
 * 
 *     #: Y, U, V in one surface, interleaved as YUYV in one channel.
 *     CU_EGL_COLOR_FORMAT_UYVY_422 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422             # <<<<<<<<<<<<<<
 * 
 *     #: R/G/B/A four channels in one surface with RGBA byte ordering.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_UYVY_422); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_UYVY_422, __pyx_t_4) < 0) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3268
 * 
 *     #: R/G/B/A four channels in one surface with RGBA byte ordering.
 *     CU_EGL_COLOR_FORMAT_ABGR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR             # <<<<<<<<<<<<<<
 * 
 *     #: R/G/B/A four channels in one surface with ARGB byte ordering.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_ABGR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_ABGR, __pyx_t_4) < 0) __PYX_ERR(0, 3268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3271
 * 
 *     #: R/G/B/A four channels in one surface with ARGB byte ordering.
 *     CU_EGL_COLOR_FORMAT_BGRA = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA             # <<<<<<<<<<<<<<
 * 
 *     #: Alpha color format - one channel in one surface.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BGRA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BGRA, __pyx_t_4) < 0) __PYX_ERR(0, 3271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3274
 * 
 *     #: Alpha color format - one channel in one surface.
 *     CU_EGL_COLOR_FORMAT_A = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A             # <<<<<<<<<<<<<<
 * 
 *     #: R/G color format - two channels in one surface with GR byte ordering
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_A); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_A, __pyx_t_4) < 0) __PYX_ERR(0, 3274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3277
 * 
 *     #: R/G color format - two channels in one surface with GR byte ordering
 *     CU_EGL_COLOR_FORMAT_RG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG             # <<<<<<<<<<<<<<
 * 
 *     #: Y, U, V, A four channels in one surface, interleaved as VUYA.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_RG, __pyx_t_4) < 0) __PYX_ERR(0, 3277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3280
 * 
 *     #: Y, U, V, A four channels in one surface, interleaved as VUYA.
 *     CU_EGL_COLOR_FORMAT_AYUV = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV             # <<<<<<<<<<<<<<
 * 
 *     #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_AYUV); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_AYUV, __pyx_t_4) < 0) __PYX_ERR(0, 3280, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3284
 *     #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V
 *     #: width = Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU444_SEMIP, __pyx_t_4) < 0) __PYX_ERR(0, 3284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3288
 *     #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V
 *     #: width = 1/2 Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU422_SEMIP, __pyx_t_4) < 0) __PYX_ERR(0, 3288, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3292
 *     #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V
 *     #: width = 1/2 Y width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y10, V10U10 in two surfaces (VU as one surface) with UV byte
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_SEMIP, __pyx_t_4) < 0) __PYX_ERR(0, 3292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3296
 *     #: Y10, V10U10 in two surfaces (VU as one surface) with UV byte
 *     #: ordering, U/V width = Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y10, V10U10 in two surfaces (VU as one surface) with UV byte
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_44, __pyx_t_4) < 0) __PYX_ERR(0, 3296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3300
 *     #: Y10, V10U10 in two surfaces (VU as one surface) with UV byte
 *     #: ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y12, V12U12 in two surfaces (VU as one surface) with UV byte
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42, __pyx_t_4) < 0) __PYX_ERR(0, 3300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3304
 *     #: Y12, V12U12 in two surfaces (VU as one surface) with UV byte
 *     #: ordering, U/V width = Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y12, V12U12 in two surfaces (VU as one surface) with UV byte
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_44, __pyx_t_4) < 0) __PYX_ERR(0, 3304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3308
 *     #: Y12, V12U12 in two surfaces (VU as one surface) with UV byte
 *     #: ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, U, V in one surface, interleaved as YVYU in one
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_42, __pyx_t_4) < 0) __PYX_ERR(0, 3308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3312
 *     #: Extended Range Y, U, V in one surface, interleaved as YVYU in one
 *     #: channel.
 *     CU_EGL_COLOR_FORMAT_VYUY_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, U, V in one surface, interleaved as YUYV in one
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_VYUY_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_VYUY_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3316
 *     #: Extended Range Y, U, V in one surface, interleaved as YUYV in one
 *     #: channel.
 *     CU_EGL_COLOR_FORMAT_UYVY_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, U, V in one surface, interleaved as UYVY in one
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_UYVY_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_UYVY_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3316, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3320
 *     #: Extended Range Y, U, V in one surface, interleaved as UYVY in one
 *     #: channel.
 *     CU_EGL_COLOR_FORMAT_YUYV_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, U, V in one surface, interleaved as VYUY in one
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUYV_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUYV_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3320, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3324
 *     #: Extended Range Y, U, V in one surface, interleaved as VYUY in one
 *     #: channel.
 *     CU_EGL_COLOR_FORMAT_YVYU_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, U, V three channels in one surface, interleaved as
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVYU_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVYU_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3324, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3328
 *     #: Extended Range Y, U, V three channels in one surface, interleaved as
 *     #: VUY. Only pitch linear format supported.
 *     CU_EGL_COLOR_FORMAT_YUV_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, U, V, A four channels in one surface, interleaved
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3332
 *     #: Extended Range Y, U, V, A four channels in one surface, interleaved
 *     #: as AVUY.
 *     CU_EGL_COLOR_FORMAT_YUVA_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, U, V, A four channels in one surface, interleaved
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUVA_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUVA_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3336
 *     #: Extended Range Y, U, V, A four channels in one surface, interleaved
 *     #: as VUYA.
 *     CU_EGL_COLOR_FORMAT_AYUV_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_AYUV_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_AYUV_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3336, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3340
 *     #: Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V
 *     #: height = Y height.
 *     CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV444_PLANA_2, __pyx_t_4) < 0) __PYX_ERR(0, 3340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3344
 *     #: Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width,
 *     #: U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV422_PLANA_2, __pyx_t_4) < 0) __PYX_ERR(0, 3344, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3348
 *     #: Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width,
 *     #: U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, UV in two surfaces (UV as one surface) with VU
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_PLANA_2, __pyx_t_4) < 0) __PYX_ERR(0, 3348, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3352
 *     #: Extended Range Y, UV in two surfaces (UV as one surface) with VU
 *     #: byte ordering, U/V width = Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, UV in two surfaces (UV as one surface) with VU
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV444_SEMIP_2, __pyx_t_4) < 0) __PYX_ERR(0, 3352, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3356
 *     #: Extended Range Y, UV in two surfaces (UV as one surface) with VU
 *     #: byte ordering, U/V width = 1/2 Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, UV in two surfaces (UV as one surface) with VU
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV422_SEMIP_2, __pyx_t_4) < 0) __PYX_ERR(0, 3356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3360
 *     #: Extended Range Y, UV in two surfaces (UV as one surface) with VU
 *     #: byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_2, __pyx_t_4) < 0) __PYX_ERR(0, 3360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3364
 *     #: Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V
 *     #: height = Y height.
 *     CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU444_PLANA, __pyx_t_4) < 0) __PYX_ERR(0, 3364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3368
 *     #: Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width,
 *     #: U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU422_PLANA, __pyx_t_4) < 0) __PYX_ERR(0, 3368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3372
 *     #: Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width,
 *     #: U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, VU in two surfaces (VU as one surface) with UV
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_PLANA, __pyx_t_4) < 0) __PYX_ERR(0, 3372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3376
 *     #: Extended Range Y, VU in two surfaces (VU as one surface) with UV
 *     #: byte ordering, U/V width = Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, VU in two surfaces (VU as one surface) with UV
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU444_SEMIP_2, __pyx_t_4) < 0) __PYX_ERR(0, 3376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3380
 *     #: Extended Range Y, VU in two surfaces (VU as one surface) with UV
 *     #: byte ordering, U/V width = 1/2 Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y, VU in two surfaces (VU as one surface) with UV
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU422_SEMIP_2, __pyx_t_4) < 0) __PYX_ERR(0, 3380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3384
 *     #: Extended Range Y, VU in two surfaces (VU as one surface) with UV
 *     #: byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer format - one channel in one surface with interleaved RGGB
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_2, __pyx_t_4) < 0) __PYX_ERR(0, 3384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3388
 *     #: Bayer format - one channel in one surface with interleaved RGGB
 *     #: ordering.
 *     CU_EGL_COLOR_FORMAT_BAYER_RGGB = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer format - one channel in one surface with interleaved BGGR
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_RGGB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_RGGB, __pyx_t_4) < 0) __PYX_ERR(0, 3388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3392
 *     #: Bayer format - one channel in one surface with interleaved BGGR
 *     #: ordering.
 *     CU_EGL_COLOR_FORMAT_BAYER_BGGR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer format - one channel in one surface with interleaved GRBG
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_BGGR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_BGGR, __pyx_t_4) < 0) __PYX_ERR(0, 3392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3396
 *     #: Bayer format - one channel in one surface with interleaved GRBG
 *     #: ordering.
 *     CU_EGL_COLOR_FORMAT_BAYER_GRBG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer format - one channel in one surface with interleaved GBRG
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_GRBG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_GRBG, __pyx_t_4) < 0) __PYX_ERR(0, 3396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3400
 *     #: Bayer format - one channel in one surface with interleaved GBRG
 *     #: ordering.
 *     CU_EGL_COLOR_FORMAT_BAYER_GBRG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer10 format - one channel in one surface with interleaved RGGB
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_GBRG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_GBRG, __pyx_t_4) < 0) __PYX_ERR(0, 3400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3404
 *     #: Bayer10 format - one channel in one surface with interleaved RGGB
 *     #: ordering. Out of 16 bits, 10 bits used 6 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER10_RGGB = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer10 format - one channel in one surface with interleaved BGGR
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_RGGB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_RGGB, __pyx_t_4) < 0) __PYX_ERR(0, 3404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3408
 *     #: Bayer10 format - one channel in one surface with interleaved BGGR
 *     #: ordering. Out of 16 bits, 10 bits used 6 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER10_BGGR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer10 format - one channel in one surface with interleaved GRBG
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_BGGR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_BGGR, __pyx_t_4) < 0) __PYX_ERR(0, 3408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3412
 *     #: Bayer10 format - one channel in one surface with interleaved GRBG
 *     #: ordering. Out of 16 bits, 10 bits used 6 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER10_GRBG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer10 format - one channel in one surface with interleaved GBRG
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_GRBG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_GRBG, __pyx_t_4) < 0) __PYX_ERR(0, 3412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3416
 *     #: Bayer10 format - one channel in one surface with interleaved GBRG
 *     #: ordering. Out of 16 bits, 10 bits used 6 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER10_GBRG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer12 format - one channel in one surface with interleaved RGGB
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_GBRG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_GBRG, __pyx_t_4) < 0) __PYX_ERR(0, 3416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3420
 *     #: Bayer12 format - one channel in one surface with interleaved RGGB
 *     #: ordering. Out of 16 bits, 12 bits used 4 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER12_RGGB = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer12 format - one channel in one surface with interleaved BGGR
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_RGGB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_RGGB, __pyx_t_4) < 0) __PYX_ERR(0, 3420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3424
 *     #: Bayer12 format - one channel in one surface with interleaved BGGR
 *     #: ordering. Out of 16 bits, 12 bits used 4 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER12_BGGR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer12 format - one channel in one surface with interleaved GRBG
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_BGGR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_BGGR, __pyx_t_4) < 0) __PYX_ERR(0, 3424, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3428
 *     #: Bayer12 format - one channel in one surface with interleaved GRBG
 *     #: ordering. Out of 16 bits, 12 bits used 4 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER12_GRBG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer12 format - one channel in one surface with interleaved GBRG
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_GRBG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_GRBG, __pyx_t_4) < 0) __PYX_ERR(0, 3428, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3432
 *     #: Bayer12 format - one channel in one surface with interleaved GBRG
 *     #: ordering. Out of 16 bits, 12 bits used 4 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER12_GBRG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer14 format - one channel in one surface with interleaved RGGB
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_GBRG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_GBRG, __pyx_t_4) < 0) __PYX_ERR(0, 3432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3436
 *     #: Bayer14 format - one channel in one surface with interleaved RGGB
 *     #: ordering. Out of 16 bits, 14 bits used 2 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER14_RGGB = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer14 format - one channel in one surface with interleaved BGGR
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_RGGB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER14_RGGB, __pyx_t_4) < 0) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3440
 *     #: Bayer14 format - one channel in one surface with interleaved BGGR
 *     #: ordering. Out of 16 bits, 14 bits used 2 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER14_BGGR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer14 format - one channel in one surface with interleaved GRBG
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_BGGR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER14_BGGR, __pyx_t_4) < 0) __PYX_ERR(0, 3440, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3444
 *     #: Bayer14 format - one channel in one surface with interleaved GRBG
 *     #: ordering. Out of 16 bits, 14 bits used 2 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER14_GRBG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer14 format - one channel in one surface with interleaved GBRG
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_GRBG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER14_GRBG, __pyx_t_4) < 0) __PYX_ERR(0, 3444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3448
 *     #: Bayer14 format - one channel in one surface with interleaved GBRG
 *     #: ordering. Out of 16 bits, 14 bits used 2 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER14_GBRG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer20 format - one channel in one surface with interleaved RGGB
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_GBRG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER14_GBRG, __pyx_t_4) < 0) __PYX_ERR(0, 3448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3452
 *     #: Bayer20 format - one channel in one surface with interleaved RGGB
 *     #: ordering. Out of 32 bits, 20 bits used 12 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER20_RGGB = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer20 format - one channel in one surface with interleaved BGGR
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_RGGB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER20_RGGB, __pyx_t_4) < 0) __PYX_ERR(0, 3452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3456
 *     #: Bayer20 format - one channel in one surface with interleaved BGGR
 *     #: ordering. Out of 32 bits, 20 bits used 12 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER20_BGGR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer20 format - one channel in one surface with interleaved GRBG
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_BGGR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER20_BGGR, __pyx_t_4) < 0) __PYX_ERR(0, 3456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3460
 *     #: Bayer20 format - one channel in one surface with interleaved GRBG
 *     #: ordering. Out of 32 bits, 20 bits used 12 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER20_GRBG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer20 format - one channel in one surface with interleaved GBRG
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_GRBG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER20_GRBG, __pyx_t_4) < 0) __PYX_ERR(0, 3460, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3464
 *     #: Bayer20 format - one channel in one surface with interleaved GBRG
 *     #: ordering. Out of 32 bits, 20 bits used 12 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER20_GBRG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG             # <<<<<<<<<<<<<<
 * 
 *     #: Y, V, U in three surfaces, each in a separate surface, U/V width = Y
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_GBRG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER20_GBRG, __pyx_t_4) < 0) __PYX_ERR(0, 3464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3468
 *     #: Y, V, U in three surfaces, each in a separate surface, U/V width = Y
 *     #: width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_YVU444_PLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y, V, U in three surfaces, each in a separate surface, U/V width =
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_PLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU444_PLANA_2, __pyx_t_4) < 0) __PYX_ERR(0, 3468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3472
 *     #: Y, V, U in three surfaces, each in a separate surface, U/V width =
 *     #: 1/2 Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_YVU422_PLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y, V, U in three surfaces, each in a separate surface, U/V width =
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_PLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU422_PLANA_2, __pyx_t_4) < 0) __PYX_ERR(0, 3472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3476
 *     #: Y, V, U in three surfaces, each in a separate surface, U/V width =
 *     #: 1/2 Y width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YVU420_PLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Nvidia proprietary Bayer ISP format - one channel in one surface
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_PLANA_2, __pyx_t_4) < 0) __PYX_ERR(0, 3476, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3481
 *     #: with interleaved RGGB ordering and mapped to opaque integer
 *     #: datatype.
 *     CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB             # <<<<<<<<<<<<<<
 * 
 *     #: Nvidia proprietary Bayer ISP format - one channel in one surface
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_ISP_RG, __pyx_t_4) < 0) __PYX_ERR(0, 3481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3486
 *     #: with interleaved BGGR ordering and mapped to opaque integer
 *     #: datatype.
 *     CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR             # <<<<<<<<<<<<<<
 * 
 *     #: Nvidia proprietary Bayer ISP format - one channel in one surface
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_ISP_BG, __pyx_t_4) < 0) __PYX_ERR(0, 3486, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3491
 *     #: with interleaved GRBG ordering and mapped to opaque integer
 *     #: datatype.
 *     CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG             # <<<<<<<<<<<<<<
 * 
 *     #: Nvidia proprietary Bayer ISP format - one channel in one surface
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_ISP_GR, __pyx_t_4) < 0) __PYX_ERR(0, 3491, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3496
 *     #: with interleaved GBRG ordering and mapped to opaque integer
 *     #: datatype.
 *     CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer format - one channel in one surface with interleaved BCCR
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_ISP_GB, __pyx_t_4) < 0) __PYX_ERR(0, 3496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3500
 *     #: Bayer format - one channel in one surface with interleaved BCCR
 *     #: ordering.
 *     CU_EGL_COLOR_FORMAT_BAYER_BCCR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer format - one channel in one surface with interleaved RCCB
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_BCCR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_BCCR, __pyx_t_4) < 0) __PYX_ERR(0, 3500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3504
 *     #: Bayer format - one channel in one surface with interleaved RCCB
 *     #: ordering.
 *     CU_EGL_COLOR_FORMAT_BAYER_RCCB = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer format - one channel in one surface with interleaved CRBC
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_RCCB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_RCCB, __pyx_t_4) < 0) __PYX_ERR(0, 3504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3508
 *     #: Bayer format - one channel in one surface with interleaved CRBC
 *     #: ordering.
 *     CU_EGL_COLOR_FORMAT_BAYER_CRBC = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer format - one channel in one surface with interleaved CBRC
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_CRBC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_CRBC, __pyx_t_4) < 0) __PYX_ERR(0, 3508, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3512
 *     #: Bayer format - one channel in one surface with interleaved CBRC
 *     #: ordering.
 *     CU_EGL_COLOR_FORMAT_BAYER_CBRC = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer10 format - one channel in one surface with interleaved CCCC
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_CBRC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER_CBRC, __pyx_t_4) < 0) __PYX_ERR(0, 3512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3516
 *     #: Bayer10 format - one channel in one surface with interleaved CCCC
 *     #: ordering. Out of 16 bits, 10 bits used 6 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER10_CCCC = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer12 format - one channel in one surface with interleaved BCCR
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_CCCC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER10_CCCC, __pyx_t_4) < 0) __PYX_ERR(0, 3516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3520
 *     #: Bayer12 format - one channel in one surface with interleaved BCCR
 *     #: ordering. Out of 16 bits, 12 bits used 4 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER12_BCCR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer12 format - one channel in one surface with interleaved RCCB
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_BCCR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_BCCR, __pyx_t_4) < 0) __PYX_ERR(0, 3520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3524
 *     #: Bayer12 format - one channel in one surface with interleaved RCCB
 *     #: ordering. Out of 16 bits, 12 bits used 4 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER12_RCCB = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer12 format - one channel in one surface with interleaved CRBC
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_RCCB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_RCCB, __pyx_t_4) < 0) __PYX_ERR(0, 3524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3528
 *     #: Bayer12 format - one channel in one surface with interleaved CRBC
 *     #: ordering. Out of 16 bits, 12 bits used 4 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER12_CRBC = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer12 format - one channel in one surface with interleaved CBRC
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CRBC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_CRBC, __pyx_t_4) < 0) __PYX_ERR(0, 3528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3532
 *     #: Bayer12 format - one channel in one surface with interleaved CBRC
 *     #: ordering. Out of 16 bits, 12 bits used 4 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER12_CBRC = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC             # <<<<<<<<<<<<<<
 * 
 *     #: Bayer12 format - one channel in one surface with interleaved CCCC
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CBRC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_CBRC, __pyx_t_4) < 0) __PYX_ERR(0, 3532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3536
 *     #: Bayer12 format - one channel in one surface with interleaved CCCC
 *     #: ordering. Out of 16 bits, 12 bits used 4 bits No-op.
 *     CU_EGL_COLOR_FORMAT_BAYER12_CCCC = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC             # <<<<<<<<<<<<<<
 * 
 *     #: Color format for single Y plane.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CCCC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_BAYER12_CCCC, __pyx_t_4) < 0) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3539
 * 
 *     #: Color format for single Y plane.
 *     CU_EGL_COLOR_FORMAT_Y = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y             # <<<<<<<<<<<<<<
 * 
 *     #: Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y, __pyx_t_4) < 0) __PYX_ERR(0, 3539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3543
 *     #: Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width,
 *     #: U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020             # <<<<<<<<<<<<<<
 * 
 *     #: Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_3, __pyx_t_4) < 0) __PYX_ERR(0, 3543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3547
 *     #: Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width,
 *     #: U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020             # <<<<<<<<<<<<<<
 * 
 *     #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_3, __pyx_t_4) < 0) __PYX_ERR(0, 3547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3551
 *     #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V
 *     #: height= 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020             # <<<<<<<<<<<<<<
 * 
 *     #: Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_PLANA_3, __pyx_t_4) < 0) __PYX_ERR(0, 3551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3555
 *     #: Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V
 *     #: height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020             # <<<<<<<<<<<<<<
 * 
 *     #: Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_PLANA_3, __pyx_t_4) < 0) __PYX_ERR(0, 3555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3559
 *     #: Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width,
 *     #: U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709             # <<<<<<<<<<<<<<
 * 
 *     #: Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width,
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_SEMIP_4, __pyx_t_4) < 0) __PYX_ERR(0, 3559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3563
 *     #: Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width,
 *     #: U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709             # <<<<<<<<<<<<<<
 * 
 *     #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_SEMIP_4, __pyx_t_4) < 0) __PYX_ERR(0, 3563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3567
 *     #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V
 *     #: height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709             # <<<<<<<<<<<<<<
 * 
 *     #: Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV420_PLANA_4, __pyx_t_4) < 0) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3571
 *     #: Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V
 *     #: height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709             # <<<<<<<<<<<<<<
 * 
 *     #: Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVU420_PLANA_4, __pyx_t_4) < 0) __PYX_ERR(0, 3571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3575
 *     #: Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y
 *     #: width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709             # <<<<<<<<<<<<<<
 * 
 *     #: Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_2, __pyx_t_4) < 0) __PYX_ERR(0, 3575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3579
 *     #: Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y
 *     #: width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020             # <<<<<<<<<<<<<<
 * 
 *     #: Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_3, __pyx_t_4) < 0) __PYX_ERR(0, 3579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3583
 *     #: Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y
 *     #: width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020             # <<<<<<<<<<<<<<
 * 
 *     #: Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_4, __pyx_t_4) < 0) __PYX_ERR(0, 3583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3587
 *     #: Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y
 *     #: width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR             # <<<<<<<<<<<<<<
 * 
 *     #: Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_5, __pyx_t_4) < 0) __PYX_ERR(0, 3587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3591
 *     #: Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y
 *     #: width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Color format for single Y plane.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_6, __pyx_t_4) < 0) __PYX_ERR(0, 3591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3594
 * 
 *     #: Extended Range Color format for single Y plane.
 *     CU_EGL_COLOR_FORMAT_Y_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Color format for single Y plane.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3597
 * 
 *     #: Extended Range Color format for single Y plane.
 *     CU_EGL_COLOR_FORMAT_Y_709_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Color format for single Y10 plane.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y_709_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y_709_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3600
 * 
 *     #: Extended Range Color format for single Y10 plane.
 *     CU_EGL_COLOR_FORMAT_Y10_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Color format for single Y10 plane.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3603
 * 
 *     #: Extended Range Color format for single Y10 plane.
 *     CU_EGL_COLOR_FORMAT_Y10_709_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Color format for single Y12 plane.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10_709_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10_709_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3606
 * 
 *     #: Extended Range Color format for single Y12 plane.
 *     CU_EGL_COLOR_FORMAT_Y12_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Color format for single Y12 plane.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y12_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3609
 * 
 *     #: Extended Range Color format for single Y12 plane.
 *     CU_EGL_COLOR_FORMAT_Y12_709_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Y, U, V, A four channels in one surface, interleaved as AVUY.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12_709_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y12_709_ER, __pyx_t_4) < 0) __PYX_ERR(0, 3609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3612
 * 
 *     #: Y, U, V, A four channels in one surface, interleaved as AVUY.
 *     CU_EGL_COLOR_FORMAT_YUVA = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA             # <<<<<<<<<<<<<<
 * 
 *     #: Y, U, V three channels in one surface, interleaved as VUY. Only
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUVA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUVA, __pyx_t_4) < 0) __PYX_ERR(0, 3612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3616
 *     #: Y, U, V three channels in one surface, interleaved as VUY. Only
 *     #: pitch linear format supported.
 *     CU_EGL_COLOR_FORMAT_YUV = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV             # <<<<<<<<<<<<<<
 * 
 *     #: Y, U, V in one surface, interleaved as YVYU in one channel.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YUV, __pyx_t_4) < 0) __PYX_ERR(0, 3616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3619
 * 
 *     #: Y, U, V in one surface, interleaved as YVYU in one channel.
 *     CU_EGL_COLOR_FORMAT_YVYU = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU             # <<<<<<<<<<<<<<
 * 
 *     #: Y, U, V in one surface, interleaved as VYUY in one channel.
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVYU); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_YVYU, __pyx_t_4) < 0) __PYX_ERR(0, 3619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3622
 * 
 *     #: Y, U, V in one surface, interleaved as VYUY in one channel.
 *     CU_EGL_COLOR_FORMAT_VYUY = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_VYUY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_VYUY, __pyx_t_4) < 0) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3626
 *     #: Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V
 *     #: width = 1/2 Y width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_7, __pyx_t_4) < 0) __PYX_ERR(0, 3626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3630
 *     #: Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V
 *     #: width = 1/2 Y width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_42_8, __pyx_t_4) < 0) __PYX_ERR(0, 3630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3634
 *     #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V
 *     #: width = Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_44_2, __pyx_t_4) < 0) __PYX_ERR(0, 3634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3638
 *     #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V
 *     #: width = Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y10V10U10_44_3, __pyx_t_4) < 0) __PYX_ERR(0, 3638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3642
 *     #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V
 *     #: width = 1/2 Y width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_42_2, __pyx_t_4) < 0) __PYX_ERR(0, 3642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3646
 *     #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V
 *     #: width = 1/2 Y width, U/V height = 1/2 Y height.
 *     CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_42_3, __pyx_t_4) < 0) __PYX_ERR(0, 3646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3650
 *     #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V
 *     #: width = Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER             # <<<<<<<<<<<<<<
 * 
 *     #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_44_2, __pyx_t_4) < 0) __PYX_ERR(0, 3650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3654
 *     #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V
 *     #: width = Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER             # <<<<<<<<<<<<<<
 *     CU_EGL_COLOR_FORMAT_MAX = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_MAX
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_Y12V12U12_44_3, __pyx_t_4) < 0) __PYX_ERR(0, 3654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3655
 *     #: width = Y width, U/V height = Y height.
 *     CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER
 *     CU_EGL_COLOR_FORMAT_MAX = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_MAX             # <<<<<<<<<<<<<<
 * 
 * class CUGLDeviceList(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(__pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_EGL_COLOR_FORMAT_MAX, __pyx_t_4) < 0) __PYX_ERR(0, 3655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3209
 *     CU_EGL_RESOURCE_LOCATION_VIDMEM = ccuda.CUeglResourceLocationFlags_enum.CU_EGL_RESOURCE_LOCATION_VIDMEM
 * 
 * class CUeglColorFormat(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA EGL Color Format - The different planar and multiplanar
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUeglColorFormat, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUeglColorFormat, __pyx_t_4) < 0) __PYX_ERR(0, 3209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3657
 *     CU_EGL_COLOR_FORMAT_MAX = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_MAX
 * 
 * class CUGLDeviceList(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA devices corresponding to an OpenGL device
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_CUGLDeviceList, __pyx_n_s_CUGLDeviceList, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_CUDA_devices_corresponding_to_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3663
 * 
 *     #: The CUDA devices for all GPUs used by the current OpenGL context
 *     CU_GL_DEVICE_LIST_ALL = ccuda.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_ALL             # <<<<<<<<<<<<<<
 * 
 *     #: The CUDA devices for the GPUs used by the current OpenGL context in
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUGLDeviceList_enum(__pyx_e_4cuda_5ccuda_CU_GL_DEVICE_LIST_ALL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GL_DEVICE_LIST_ALL, __pyx_t_4) < 0) __PYX_ERR(0, 3663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3667
 *     #: The CUDA devices for the GPUs used by the current OpenGL context in
 *     #: its currently rendering frame
 *     CU_GL_DEVICE_LIST_CURRENT_FRAME = ccuda.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_CURRENT_FRAME             # <<<<<<<<<<<<<<
 * 
 *     #: The CUDA devices for the GPUs to be used by the current OpenGL
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUGLDeviceList_enum(__pyx_e_4cuda_5ccuda_CU_GL_DEVICE_LIST_CURRENT_FRAME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GL_DEVICE_LIST_CURRENT_FRAME, __pyx_t_4) < 0) __PYX_ERR(0, 3667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3671
 *     #: The CUDA devices for the GPUs to be used by the current OpenGL
 *     #: context in the next frame
 *     CU_GL_DEVICE_LIST_NEXT_FRAME = ccuda.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_NEXT_FRAME             # <<<<<<<<<<<<<<
 * 
 * class CUGLmap_flags(IntEnum):
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUGLDeviceList_enum(__pyx_e_4cuda_5ccuda_CU_GL_DEVICE_LIST_NEXT_FRAME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GL_DEVICE_LIST_NEXT_FRAME, __pyx_t_4) < 0) __PYX_ERR(0, 3671, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3657
 *     CU_EGL_COLOR_FORMAT_MAX = ccuda.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_MAX
 * 
 * class CUGLDeviceList(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     CUDA devices corresponding to an OpenGL device
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_CUGLDeviceList, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUGLDeviceList, __pyx_t_4) < 0) __PYX_ERR(0, 3657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":3673
 *     CU_GL_DEVICE_LIST_NEXT_FRAME = ccuda.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_NEXT_FRAME
 * 
 * class CUGLmap_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags to map or unmap a resource
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CUGLmap_flags, __pyx_n_s_CUGLmap_flags, (PyObject *) NULL, __pyx_n_s_cuda_cuda, __pyx_kp_s_Flags_to_map_or_unmap_a_resourc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cuda/cuda.pyx":3677
 *     Flags to map or unmap a resource
 *     """
 *     CU_GL_MAP_RESOURCE_FLAGS_NONE = ccuda.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_NONE             # <<<<<<<<<<<<<<
 *     CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = ccuda.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY
 *     CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = ccuda.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUGLmap_flags_enum(__pyx_e_4cuda_5ccuda_CU_GL_MAP_RESOURCE_FLAGS_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GL_MAP_RESOURCE_FLAGS_NONE, __pyx_t_4) < 0) __PYX_ERR(0, 3677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3678
 *     """
 *     CU_GL_MAP_RESOURCE_FLAGS_NONE = ccuda.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_NONE
 *     CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = ccuda.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY             # <<<<<<<<<<<<<<
 *     CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = ccuda.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUGLmap_flags_enum(__pyx_e_4cuda_5ccuda_CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GL_MAP_RESOURCE_FLAGS_READ_ON, __pyx_t_4) < 0) __PYX_ERR(0, 3678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3679
 *     CU_GL_MAP_RESOURCE_FLAGS_NONE = ccuda.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_NONE
 *     CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = ccuda.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY
 *     CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = ccuda.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD             # <<<<<<<<<<<<<<
 * 
 * cdef class CUcontext:
 */
  __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUGLmap_flags_enum(__pyx_e_4cuda_5ccuda_CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CU_GL_MAP_RESOURCE_FLAGS_WRITE_D, __pyx_t_4) < 0) __PYX_ERR(0, 3679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":3673
 *     CU_GL_DEVICE_LIST_NEXT_FRAME = ccuda.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_NEXT_FRAME
 * 
 * class CUGLmap_flags(IntEnum):             # <<<<<<<<<<<<<<
 *     """
 *     Flags to map or unmap a resource
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CUGLmap_flags, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUGLmap_flags, __pyx_t_4) < 0) __PYX_ERR(0, 3673, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3706
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9CUcontext_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUcontext_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUcontext->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 3706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUcontext);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9CUcontext_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUcontext___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9CUcontext_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUcontext___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3734
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUmodule_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmodule_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUmodule->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 3734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUmodule);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUmodule_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmodule___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUmodule_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmodule___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3762
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_10CUfunction_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUfunction_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUfunction->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 3762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUfunction);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_10CUfunction_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUfunction___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_10CUfunction_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUfunction___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3790
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_7CUarray_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarray_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUarray->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 3790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUarray);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_7CUarray_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarray___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_7CUarray_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarray___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3818
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUmipmappedArray_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmipmappedArray_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUmipmappedArray->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 3818, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUmipmappedArray);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUmipmappedArray_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmipmappedArray___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUmipmappedArray_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmipmappedArray___setstate_cyth, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3846
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUtexref_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUtexref_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexref->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 3846, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUtexref);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUtexref_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUtexref___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUtexref_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUtexref___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3874
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9CUsurfref_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUsurfref_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUsurfref->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 3874, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUsurfref);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9CUsurfref_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUsurfref___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9CUsurfref_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUsurfref___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3902
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_7CUevent_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUevent_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUevent->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 3902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUevent);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_7CUevent_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUevent___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_7CUevent_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUevent___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3930
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUstream_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstream_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUstream->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 3930, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUstream);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUstream_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstream___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUstream_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstream___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3958
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_18CUgraphicsResource_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUgraphicsResource_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphicsResource->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUgraphicsResource);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_18CUgraphicsResource_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUgraphicsResource___reduce_cyth, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_18CUgraphicsResource_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUgraphicsResource___setstate_cy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":3986
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUexternalMemory_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexternalMemory_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalMemory->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 3986, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUexternalMemory);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUexternalMemory_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexternalMemory___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUexternalMemory_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexternalMemory___setstate_cyth, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4014
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_19CUexternalSemaphore_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexternalSemaphore_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalSemaphore->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUexternalSemaphore);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_19CUexternalSemaphore_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexternalSemaphore___reduce_cyt, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_19CUexternalSemaphore_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexternalSemaphore___setstate_c, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4042
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_7CUgraph_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUgraph_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraph->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4042, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUgraph);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_7CUgraph_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUgraph___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_7CUgraph_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUgraph___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4070
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUgraphNode_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUgraphNode_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4070, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUgraphNode);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUgraphNode_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUgraphNode___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUgraphNode_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUgraphNode___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4098
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUgraphExec_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUgraphExec_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphExec->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUgraphExec);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUgraphExec_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUgraphExec___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUgraphExec_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUgraphExec___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4126
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12CUmemoryPool_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemoryPool_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemoryPool->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUmemoryPool);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12CUmemoryPool_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemoryPool___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12CUmemoryPool_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemoryPool___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4154
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12CUuserObject_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUuserObject_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUuserObject->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUuserObject);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12CUuserObject_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUuserObject___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12CUuserObject_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUuserObject___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4180
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUlinkState_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlinkState_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUlinkState->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUlinkState);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUlinkState_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlinkState___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUlinkState_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlinkState___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4206
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11EGLImageKHR_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EGLImageKHR_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_EGLImageKHR->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_EGLImageKHR);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11EGLImageKHR_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EGLImageKHR___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11EGLImageKHR_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EGLImageKHR___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4232
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12EGLStreamKHR_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EGLStreamKHR_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_EGLStreamKHR->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_EGLStreamKHR);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12EGLStreamKHR_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EGLStreamKHR___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12EGLStreamKHR_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EGLStreamKHR___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4258
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_10EGLSyncKHR_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EGLSyncKHR_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_EGLSyncKHR->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_EGLSyncKHR);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_10EGLSyncKHR_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EGLSyncKHR___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_10EGLSyncKHR_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EGLSyncKHR___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4286
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21CUeglStreamConnection_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUeglStreamConnection_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUeglStreamConnection->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4286, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUeglStreamConnection);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21CUeglStreamConnection_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUeglStreamConnection___reduce_c, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21CUeglStreamConnection_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUeglStreamConnection___setstate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4312
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUhostFn_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUhostFn_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUhostFn->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUhostFn);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUhostFn_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUhostFn___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUhostFn_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUhostFn___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4338
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUstreamCallback_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamCallback_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamCallback->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4338, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUstreamCallback);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUstreamCallback_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamCallback___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUstreamCallback_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamCallback___setstate_cyth, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4364
 *     def __int__(self):
 *         return <void_ptr>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_18CUoccupancyB2DSize_11getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUoccupancyB2DSize_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUoccupancyB2DSize->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUoccupancyB2DSize);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_18CUoccupancyB2DSize_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUoccupancyB2DSize___reduce_cyth, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_18CUoccupancyB2DSize_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUoccupancyB2DSize___setstate_cy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4390
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9CUuuid_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUuuid_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUuuid_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUuuid_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9CUuuid_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUuuid_st___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9CUuuid_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUuuid_st___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4428
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_19CUipcEventHandle_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUipcEventHandle_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUipcEventHandle_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4428, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUipcEventHandle_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_19CUipcEventHandle_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUipcEventHandle_st___reduce_cyt, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_19CUipcEventHandle_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUipcEventHandle_st___setstate_c, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4480
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17CUipcMemHandle_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUipcMemHandle_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUipcMemHandle_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4480, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUipcMemHandle_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17CUipcMemHandle_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUipcMemHandle_st___reduce_cytho, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17CUipcMemHandle_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUipcMemHandle_st___setstate_cyt, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4536
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].waitValue.value64)
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].waitValue.alias)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamMemOpWaitValueParams_st_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamMemOpWaitValueParams_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUstreamMemOpWaitValueParams_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamMemOpWaitValueParams_st_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_31CUstreamMemOpWaitValueParams_st_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamMemOpWaitValueParams_st_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4638
 *         self._value64 = cuuint64_t(_ptr=<void_ptr>&self._ptr[0].writeValue.value64)
 *         self._alias = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].writeValue.alias)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamMemOpWriteValueParams_st_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamMemOpWriteValueParams_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUstreamMemOpWriteValueParams_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamMemOpWriteValueParams_st_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_32CUstreamMemOpWriteValueParams_st_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamMemOpWriteValueParams_st_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4732
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamMemOpFlushRemoteWritesPa_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4732, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUstreamMemOpFlushRemoteWritesParams_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamMemOpFlushRemoteWritesPa_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_39CUstreamMemOpFlushRemoteWritesParams_st_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamMemOpFlushRemoteWritesPa_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4778
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamMemOpMemoryBarrierParams_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUstreamMemOpMemoryBarrierParams_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamMemOpMemoryBarrierParams_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_35CUstreamMemOpMemoryBarrierParams_st_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamMemOpMemoryBarrierParams_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4841
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_30CUstreamBatchMemOpParams_union_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamBatchMemOpParams_union_g, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams_union->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4841, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams_union);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_30CUstreamBatchMemOpParams_union_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamBatchMemOpParams_union_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_30CUstreamBatchMemOpParams_union_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUstreamBatchMemOpParams_union_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":4945
 *         if self._paramArray is not NULL:
 *             free(self._paramArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 4945, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_BATCH_MEM_OP_NODE_PARAMS_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_32CUDA_BATCH_MEM_OP_NODE_PARAMS_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_BATCH_MEM_OP_NODE_PARAMS_st_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5050
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12CUdevprop_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdevprop_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevprop_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 5050, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUdevprop_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12CUdevprop_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdevprop_st___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12CUdevprop_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdevprop_st___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5184
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_23CUaccessPolicyWindow_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUaccessPolicyWindow_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 5184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUaccessPolicyWindow_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_23CUaccessPolicyWindow_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUaccessPolicyWindow_st___reduce, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_23CUaccessPolicyWindow_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUaccessPolicyWindow_st___setsta, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5276
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_KERNEL_NODE_PARAMS_st_getPt, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 5276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_KERNEL_NODE_PARAMS_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_KERNEL_NODE_PARAMS_st___red, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_26CUDA_KERNEL_NODE_PARAMS_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_KERNEL_NODE_PARAMS_st___set, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5407
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEMSET_NODE_PARAMS_st_getPt, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 5407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_MEMSET_NODE_PARAMS_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEMSET_NODE_PARAMS_st___red, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_26CUDA_MEMSET_NODE_PARAMS_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEMSET_NODE_PARAMS_st___set, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5499
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_HOST_NODE_PARAMS_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 5499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_HOST_NODE_PARAMS_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_HOST_NODE_PARAMS_st___reduc, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_24CUDA_HOST_NODE_PARAMS_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_HOST_NODE_PARAMS_st___setst, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5555
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchAttributeValue_CUlaunch_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 5555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchAttributeValue_CUlaunch_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_88_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_clusterDim_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchAttributeValue_CUlaunch_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5611
 *     def __init__(self, void_ptr _ptr):
 *         self._event = CUevent(_ptr=<void_ptr>&self._ptr[0].programmaticEvent.event)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchAttributeValue_CUlaunch_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 5611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchAttributeValue_CUlaunch_7, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_95_CUlaunchAttributeValue_CUlaunchAttributeValue_CUlaunchAttributeValue_union_programmaticEvent_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchAttributeValue_CUlaunch_8, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5694
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_28CUlaunchAttributeValue_union_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchAttributeValue_union_get, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue_union->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 5694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUlaunchAttributeValue_union);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_28CUlaunchAttributeValue_union_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchAttributeValue_union___r, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_28CUlaunchAttributeValue_union_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchAttributeValue_union___s, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__214)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5814
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_20CUlaunchAttribute_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchAttribute_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUlaunchAttribute_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 5814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUlaunchAttribute_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_20CUlaunchAttribute_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchAttribute_st___reduce_cy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_20CUlaunchAttribute_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchAttribute_st___setstate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":5886
 *         if self._attrs is not NULL:
 *             free(self._attrs)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17CUlaunchConfig_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchConfig_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUlaunchConfig_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 5886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUlaunchConfig_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17CUlaunchConfig_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchConfig_st___reduce_cytho, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__222)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17CUlaunchConfig_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUlaunchConfig_st___setstate_cyt, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6021
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_24CUexecAffinitySmCount_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexecAffinitySmCount_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__226)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 6021, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUexecAffinitySmCount_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_24CUexecAffinitySmCount_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexecAffinitySmCount_st___reduc, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_24CUexecAffinitySmCount_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexecAffinitySmCount_st___setst, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6057
 *     def __init__(self, void_ptr _ptr):
 *         self._smCount = CUexecAffinitySmCount(_ptr=<void_ptr>&self._ptr[0].param.smCount)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexecAffinityParam_v1_CUexecAf_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 6057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexecAffinityParam_v1_CUexecAf_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__232)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_77_CUexecAffinityParam_v1_CUexecAffinityParam_v1_CUexecAffinityParam_st_param_u_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexecAffinityParam_v1_CUexecAf_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__234)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6105
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_22CUexecAffinityParam_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexecAffinityParam_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__236)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUexecAffinityParam_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 6105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUexecAffinityParam_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_22CUexecAffinityParam_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexecAffinityParam_st___reduce, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_22CUexecAffinityParam_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUexecAffinityParam_st___setstat, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6192
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUDA_MEMCPY2D_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEMCPY2D_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__241)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 6192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY2D_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUDA_MEMCPY2D_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEMCPY2D_st___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUDA_MEMCPY2D_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEMCPY2D_st___setstate_cyth, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__244)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6438
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUDA_MEMCPY3D_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEMCPY3D_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 6438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUDA_MEMCPY3D_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEMCPY3D_st___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUDA_MEMCPY3D_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEMCPY3D_st___setstate_cyth, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":6759
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEMCPY3D_PEER_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 6759, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_MEMCPY3D_PEER_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEMCPY3D_PEER_st___reduce_c, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__252)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21CUDA_MEMCPY3D_PEER_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEMCPY3D_PEER_st___setstate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__254)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7047
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY_DESCRIPTOR_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__256)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7047, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_DESCRIPTOR_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY_DESCRIPTOR_st___reduc, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_24CUDA_ARRAY_DESCRIPTOR_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY_DESCRIPTOR_st___setst, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7123
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_st_getPt, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_ARRAY3D_DESCRIPTOR_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_st___red, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__262)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_26CUDA_ARRAY3D_DESCRIPTOR_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY3D_DESCRIPTOR_st___set, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__264)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7203
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__266)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_109_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_v1_CUDA_ARRAY_SPARSE_PROPERTIES_st_tileExtent_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_v1_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7270
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_st_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__271)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_SPARSE_PROPERTIES_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_st_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__272)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_31CUDA_ARRAY_SPARSE_PROPERTIES_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY_SPARSE_PROPERTIES_st_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__274)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7352
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__276)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7352, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_ARRAY_MEMORY_REQUIREMENTS_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__277)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_33CUDA_ARRAY_MEMORY_REQUIREMENTS_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_ARRAY_MEMORY_REQUIREMENTS_s_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__279)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7404
 *     def __init__(self, void_ptr _ptr):
 *         self._hArray = CUarray(_ptr=<void_ptr>&self._ptr[0].res.array.hArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_7, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__281)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_8, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__282)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_82_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_array_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_9, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__284)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7448
 *     def __init__(self, void_ptr _ptr):
 *         self._hMipmappedArray = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].res.mipmap.hMipmappedArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_10, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__286)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_11, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__287)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_mipmap_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_12, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7498
 *     def __init__(self, void_ptr _ptr):
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.linear.devPtr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_13, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__291)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_14, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__292)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_83_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_linear_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_15, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__294)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7576
 *     def __init__(self, void_ptr _ptr):
 *         self._devPtr = CUdeviceptr(_ptr=<void_ptr>&self._ptr[0].res.pitch2D.devPtr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_16, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__296)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7576, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_17, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__297)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_84_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_18, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__299)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7660
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_19, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__301)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_20, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__302)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_85_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_21, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__304)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7708
 *         self._pitch2D = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_pitch2D_s(_ptr=<void_ptr>self._ptr)
 *         self._reserved = _CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_res_reserved_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_22, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__306)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_23, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__307)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_72_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_v1_CUDA_RESOURCE_DESC_st_res_u_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_v1_CUDA_RESO_24, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__309)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7806
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__311)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_DESC_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_st___reduce_c, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__312)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21CUDA_RESOURCE_DESC_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_DESC_st___setstate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__314)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":7886
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_TEXTURE_DESC_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__316)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 7886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_TEXTURE_DESC_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_TEXTURE_DESC_st___reduce_cy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__317)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_20CUDA_TEXTURE_DESC_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_TEXTURE_DESC_st___setstate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__319)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8015
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_VIEW_DESC_st_getPt, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__321)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_RESOURCE_VIEW_DESC_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_VIEW_DESC_st___red, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__322)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_26CUDA_RESOURCE_VIEW_DESC_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_RESOURCE_VIEW_DESC_st___set, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__324)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8123
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__326)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__327)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_36CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__329)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8192
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_LAUNCH_PARAMS_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__331)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_LAUNCH_PARAMS_st___reduce_c, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__332)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21CUDA_LAUNCH_PARAMS_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_LAUNCH_PARAMS_st___setstate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__334)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8318
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__336)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__337)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_130_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__339)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8366
 *     def __init__(self, void_ptr _ptr):
 *         self._win32 = _CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__341)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_7, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__342)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_117_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_handle_u_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DES_8, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__344)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8436
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__346)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__347)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__349)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8520
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__351)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__352)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_35CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__354)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8593
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__356)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__357)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_44CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__359)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8659
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__361)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8659, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__362)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__364)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8707
 *     def __init__(self, void_ptr _ptr):
 *         self._win32 = _CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_handle_win32_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__366)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_7, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__367)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_handle_u_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_8, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__369)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8775
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__371)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__372)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__374)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8839
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__376)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__377)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_145_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_fence_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_7, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__379)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8877
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_8, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__381)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8877, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_9, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__382)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_149_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_10, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__384)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8921
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_11, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__386)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_12, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__387)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_150_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_13, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__389)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":8965
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_14, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__391)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 8965, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_15, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__392)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_132_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_params_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_16, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__394)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9054
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__396)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9054, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__397)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_40CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_P_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__399)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9110
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__401)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__402)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_139_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_fence_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_7, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__404)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9148
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_8, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__406)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_9, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__407)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_143_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_10, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__409)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9194
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_11, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__411)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_12, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__412)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_144_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_13, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__414)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9246
 *         self._nvSciSync = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_nvSciSync_u(_ptr=<void_ptr>self._ptr)
 *         self._keyedMutex = _CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_params_keyedMutex_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_14, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__416)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_15, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__417)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_126_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_params_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PA_16, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__419)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9335
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__421)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__422)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_38CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXTERNAL_SEMAPHORE_WAIT_PAR_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__424)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9405
 *         if self._paramsArray is not NULL:
 *             free(self._paramsArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__426)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__427)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_34CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__429)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9497
 *         if self._paramsArray is not NULL:
 *             free(self._paramsArray)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__431)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__432)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_32CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__434)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9578
 *         self._mipmap = CUmipmappedArray(_ptr=<void_ptr>&self._ptr[0].resource.mipmap)
 *         self._array = CUarray(_ptr=<void_ptr>&self._ptr[0].resource.array)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_6, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__436)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_7, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__437)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_65_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_resource_u_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_8, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__439)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9652
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_9, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__441)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_10, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__442)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_92_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_11, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__444)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9748
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_12, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__446)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9748, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_13, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__447)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_88_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_14, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__449)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9803
 *         self._sparseLevel = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_sparseLevel_s(_ptr=<void_ptr>self._ptr)
 *         self._miptail = _CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_subresource_miptail_s(_ptr=<void_ptr>self._ptr)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_15, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__451)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9803, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_16, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__452)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_68_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_subresource_u_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_17, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__454)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9855
 *     def __init__(self, void_ptr _ptr):
 *         self._memHandle = CUmemGenericAllocationHandle(_ptr=<void_ptr>&self._ptr[0].memHandle.memHandle)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_18, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__456)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_19, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__457)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_66_CUarrayMapInfo_v1_CUarrayMapInfo_v1_CUarrayMapInfo_st_memHandle_u_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_v1_CUarrayMapInf_20, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__459)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":9928
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17CUarrayMapInfo_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__461)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUarrayMapInfo_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 9928, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUarrayMapInfo_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17CUarrayMapInfo_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_st___reduce_cytho, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__462)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17CUarrayMapInfo_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUarrayMapInfo_st___setstate_cyt, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__464)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10064
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUmemLocation_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemLocation_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__466)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemLocation_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUmemLocation_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUmemLocation_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemLocation_st___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__467)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16CUmemLocation_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemLocation_st___setstate_cyth, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__469)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10114
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemAllocationProp_v1_CUmemAll_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__471)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemAllocationProp_v1_CUmemAll_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__472)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_82_CUmemAllocationProp_v1_CUmemAllocationProp_v1_CUmemAllocationProp_st_allocFlags_s_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemAllocationProp_v1_CUmemAll_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__474)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10195
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_22CUmemAllocationProp_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemAllocationProp_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__476)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemAllocationProp_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUmemAllocationProp_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_22CUmemAllocationProp_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemAllocationProp_st___reduce, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__477)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_22CUmemAllocationProp_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemAllocationProp_st___setstat, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__479)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10279
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_18CUmemAccessDesc_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemAccessDesc_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__481)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemAccessDesc_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUmemAccessDesc_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_18CUmemAccessDesc_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemAccessDesc_st___reduce_cyth, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__482)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_18CUmemAccessDesc_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemAccessDesc_st___setstate_cy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__484)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10346
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17CUmemPoolProps_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemPoolProps_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__486)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemPoolProps_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUmemPoolProps_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17CUmemPoolProps_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemPoolProps_st___reduce_cytho, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__487)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17CUmemPoolProps_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemPoolProps_st___setstate_cyt, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__489)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10426
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_25CUmemPoolPtrExportData_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemPoolPtrExportData_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__491)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10426, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUmemPoolPtrExportData_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_25CUmemPoolPtrExportData_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemPoolPtrExportData_st___redu, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__492)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_25CUmemPoolPtrExportData_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemPoolPtrExportData_st___sets, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__494)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10484
 *         if self._accessDescs is not NULL:
 *             free(self._accessDescs)
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS_st_ge, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__496)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10484, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUDA_MEM_ALLOC_NODE_PARAMS_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS_st_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__497)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_29CUDA_MEM_ALLOC_NODE_PARAMS_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUDA_MEM_ALLOC_NODE_PARAMS_st_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__499)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10579
 *     def __init__(self, void_ptr _ptr):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_5getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUeglFrame_v1_CUeglFrame_v1_CUe_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__501)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUeglFrame_v1_CUeglFrame_v1_CUe_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__502)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_50_CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUeglFrame_v1_CUeglFrame_v1_CUe_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__504)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10655
 *     def __dealloc__(self):
 *         pass
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_13CUeglFrame_st_7getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUeglFrame_st_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__506)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUeglFrame_st->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUeglFrame_st);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_13CUeglFrame_st_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUeglFrame_st___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__507)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_13CUeglFrame_st_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUeglFrame_st___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__509)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10771
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_10cuuint32_t_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_cuuint32_t_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__511)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint32_t->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_cuuint32_t);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_10cuuint32_t_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_cuuint32_t___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__512)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_10cuuint32_t_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_cuuint32_t___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__514)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10796
 *     def __int__(self):
 *         return <uint64_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_10cuuint64_t_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_cuuint64_t_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__516)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_cuuint64_t->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_cuuint64_t);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_10cuuint64_t_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_cuuint64_t___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__517)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_10cuuint64_t_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_cuuint64_t___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__519)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10823
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_14CUdeviceptr_v2_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdeviceptr_v2_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__521)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr_v2->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUdeviceptr_v2);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_14CUdeviceptr_v2_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdeviceptr_v2___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__522)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_14CUdeviceptr_v2_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdeviceptr_v2___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__524)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10850
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUdeviceptr_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdeviceptr_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__526)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUdeviceptr->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10850, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUdeviceptr);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUdeviceptr_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdeviceptr___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__527)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUdeviceptr_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdeviceptr___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__529)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10877
 *     def __int__(self):
 *         return <int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUdevice_v1_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdevice_v1_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__531)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice_v1->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10877, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUdevice_v1);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUdevice_v1_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdevice_v1___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__532)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUdevice_v1_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdevice_v1___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__534)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10904
 *     def __int__(self):
 *         return <int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUdevice_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdevice_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__536)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUdevice->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10904, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUdevice);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUdevice_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdevice___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__537)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_8CUdevice_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUdevice___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__539)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10931
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_14CUtexObject_v1_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUtexObject_v1_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__541)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexObject_v1->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUtexObject_v1);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_14CUtexObject_v1_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUtexObject_v1___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__542)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_14CUtexObject_v1_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUtexObject_v1___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__544)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10958
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUtexObject_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUtexObject_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__546)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUtexObject->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUtexObject);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUtexObject_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUtexObject___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__547)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11CUtexObject_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUtexObject___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__549)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":10985
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_15CUsurfObject_v1_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUsurfObject_v1_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__551)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUsurfObject_v1->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 10985, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUsurfObject_v1);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_15CUsurfObject_v1_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUsurfObject_v1___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__552)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_15CUsurfObject_v1_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUsurfObject_v1___setstate_cytho, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__554)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11012
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12CUsurfObject_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUsurfObject_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__556)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUsurfObject->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 11012, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUsurfObject);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12CUsurfObject_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUsurfObject___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__557)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_12CUsurfObject_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUsurfObject___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__559)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11037
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemGenericAllocationHandle_v1_3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__561)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle_v1->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 11037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle_v1);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemGenericAllocationHandle_v1_4, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__562)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_31CUmemGenericAllocationHandle_v1_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemGenericAllocationHandle_v1_5, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__564)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11062
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_28CUmemGenericAllocationHandle_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemGenericAllocationHandle_get, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__566)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 11062, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_CUmemGenericAllocationHandle);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_28CUmemGenericAllocationHandle_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemGenericAllocationHandle___r, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__567)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_28CUmemGenericAllocationHandle_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CUmemGenericAllocationHandle___s, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__569)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11087
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_6GLenum_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GLenum_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__571)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_GLenum->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 11087, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_GLenum);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_6GLenum_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GLenum___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__572)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_6GLenum_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GLenum___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__574)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11112
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_6GLuint_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GLuint_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__576)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_GLuint->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 11112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_GLuint);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_6GLuint_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GLuint___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__577)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_6GLuint_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GLuint___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__579)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11137
 *     def __int__(self):
 *         return <unsigned int>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_6EGLint_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EGLint_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__581)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_EGLint->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 11137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_EGLint);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_6EGLint_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EGLint___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__582)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_6EGLint_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EGLint___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__584)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11162
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9VdpDevice_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VdpDevice_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__586)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_VdpDevice->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 11162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_VdpDevice);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9VdpDevice_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VdpDevice___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__587)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9VdpDevice_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VdpDevice___setstate_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__589)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11187
 *     def __int__(self):
 *         return <unsigned long long>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17VdpGetProcAddress_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VdpGetProcAddress_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__591)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_VdpGetProcAddress->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 11187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_VdpGetProcAddress);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17VdpGetProcAddress_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VdpGetProcAddress___reduce_cytho, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__592)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17VdpGetProcAddress_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VdpGetProcAddress___setstate_cyt, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__594)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11212
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_15VdpVideoSurface_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VdpVideoSurface_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__596)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_VdpVideoSurface->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 11212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_VdpVideoSurface);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_15VdpVideoSurface_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VdpVideoSurface___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__597)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_15VdpVideoSurface_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VdpVideoSurface___setstate_cytho, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__599)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11237
 *     def __int__(self):
 *         return <uint32_t>self._ptr[0]
 *     def getPtr(self):             # <<<<<<<<<<<<<<
 *         return <void_ptr>self._ptr
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16VdpOutputSurface_9getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VdpOutputSurface_getPtr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__601)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_4cuda_4cuda_VdpOutputSurface->tp_dict, __pyx_n_s_getPtr, __pyx_t_1) < 0) __PYX_ERR(0, 11237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_4cuda_4cuda_VdpOutputSurface);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16VdpOutputSurface_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VdpOutputSurface___reduce_cython, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__602)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_16VdpOutputSurface_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VdpOutputSurface___setstate_cyth, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__604)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11241
 * 
 * @cython.embedsignature(True)
 * def cuGetErrorString(error not None : CUresult):             # <<<<<<<<<<<<<<
 *     """ Gets the string description of an error code.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_error, __pyx_t_2) < 0) __PYX_ERR(0, 11241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_1cuGetErrorString, 0, __pyx_n_s_cuGetErrorString, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__606)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGetErrorString, __pyx_t_2) < 0) __PYX_ERR(0, 11241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":11271
 * 
 * @cython.embedsignature(True)
 * def cuGetErrorName(error not None : CUresult):             # <<<<<<<<<<<<<<
 *     """ Gets the string representation of an error code enum name.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUresult); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_error, __pyx_t_1) < 0) __PYX_ERR(0, 11271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_3cuGetErrorName, 0, __pyx_n_s_cuGetErrorName, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__607)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGetErrorName, __pyx_t_1) < 0) __PYX_ERR(0, 11271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11301
 * 
 * @cython.embedsignature(True)
 * def cuInit(unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Initialize the CUDA driver API.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_5cuInit, 0, __pyx_n_s_cuInit, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__608)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuInit, __pyx_t_1) < 0) __PYX_ERR(0, 11301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11323
 * 
 * @cython.embedsignature(True)
 * def cuDriverGetVersion():             # <<<<<<<<<<<<<<
 *     """ Returns the latest CUDA version supported by driver.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_7cuDriverGetVersion, 0, __pyx_n_s_cuDriverGetVersion, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__609)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDriverGetVersion, __pyx_t_1) < 0) __PYX_ERR(0, 11323, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11349
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGet(int ordinal):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a compute device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_9cuDeviceGet, 0, __pyx_n_s_cuDeviceGet, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__610)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGet, __pyx_t_1) < 0) __PYX_ERR(0, 11349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11376
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetCount():             # <<<<<<<<<<<<<<
 *     """ Returns the number of compute-capable devices.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_11cuDeviceGetCount, 0, __pyx_n_s_cuDeviceGetCount, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__611)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetCount, __pyx_t_1) < 0) __PYX_ERR(0, 11376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11399
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetName(int length, dev):             # <<<<<<<<<<<<<<
 *     """ Returns an identifer string for the device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_13cuDeviceGetName, 0, __pyx_n_s_cuDeviceGetName, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__612)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetName, __pyx_t_1) < 0) __PYX_ERR(0, 11399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11440
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetUuid(dev):             # <<<<<<<<<<<<<<
 *     """ Return an UUID for the device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_15cuDeviceGetUuid, 0, __pyx_n_s_cuDeviceGetUuid, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__614)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetUuid, __pyx_t_1) < 0) __PYX_ERR(0, 11440, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11481
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetUuid_v2(dev):             # <<<<<<<<<<<<<<
 *     """ Return an UUID for the device (11.4+)
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_17cuDeviceGetUuid_v2, 0, __pyx_n_s_cuDeviceGetUuid_v2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__615)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetUuid_v2, __pyx_t_1) < 0) __PYX_ERR(0, 11481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11519
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetLuid(dev):             # <<<<<<<<<<<<<<
 *     """ Return an LUID and device node mask for the device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_19cuDeviceGetLuid, 0, __pyx_n_s_cuDeviceGetLuid, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__616)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetLuid, __pyx_t_1) < 0) __PYX_ERR(0, 11519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11559
 * 
 * @cython.embedsignature(True)
 * def cuDeviceTotalMem(dev):             # <<<<<<<<<<<<<<
 *     """ Returns the total amount of memory on the device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_21cuDeviceTotalMem, 0, __pyx_n_s_cuDeviceTotalMem, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__617)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceTotalMem, __pyx_t_1) < 0) __PYX_ERR(0, 11559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":11596
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetTexture1DLinearMaxWidth(pformat not None : CUarray_format, unsigned numChannels, dev):             # <<<<<<<<<<<<<<
 *     """ Returns the maximum number of elements allocatable in a 1D linear texture for a given texture element size.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUarray_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pformat, __pyx_t_2) < 0) __PYX_ERR(0, 11596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_23cuDeviceGetTexture1DLinearMaxWidth, 0, __pyx_n_s_cuDeviceGetTexture1DLinearMaxWid, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__618)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetTexture1DLinearMaxWid, __pyx_t_2) < 0) __PYX_ERR(0, 11596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":11640
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetAttribute(attrib not None : CUdevice_attribute, dev):             # <<<<<<<<<<<<<<
 *     """ Returns information about the device.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUdevice_attribute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_attrib, __pyx_t_1) < 0) __PYX_ERR(0, 11640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_25cuDeviceGetAttribute, 0, __pyx_n_s_cuDeviceGetAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__619)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetAttribute, __pyx_t_1) < 0) __PYX_ERR(0, 11640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":12057
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, int flags):             # <<<<<<<<<<<<<<
 *     """ Return NvSciSync attributes that this device can support.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_27cuDeviceGetNvSciSyncAttributes, 0, __pyx_n_s_cuDeviceGetNvSciSyncAttributes, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__620)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetNvSciSyncAttributes, __pyx_t_1) < 0) __PYX_ERR(0, 12057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":12129
 * 
 * @cython.embedsignature(True)
 * def cuDeviceSetMemPool(dev, pool):             # <<<<<<<<<<<<<<
 *     """ Sets the current memory pool of a device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_29cuDeviceSetMemPool, 0, __pyx_n_s_cuDeviceSetMemPool, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__621)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceSetMemPool, __pyx_t_1) < 0) __PYX_ERR(0, 12129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":12181
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetMemPool(dev):             # <<<<<<<<<<<<<<
 *     """ Gets the current mempool for a device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_31cuDeviceGetMemPool, 0, __pyx_n_s_cuDeviceGetMemPool, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__622)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetMemPool, __pyx_t_1) < 0) __PYX_ERR(0, 12181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":12221
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetDefaultMemPool(dev):             # <<<<<<<<<<<<<<
 *     """ Returns the default mempool of a device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_33cuDeviceGetDefaultMemPool, 0, __pyx_n_s_cuDeviceGetDefaultMemPool, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__623)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetDefaultMemPool, __pyx_t_1) < 0) __PYX_ERR(0, 12221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":12258
 * 
 * @cython.embedsignature(True)
 * def cuFlushGPUDirectRDMAWrites(target not None : CUflushGPUDirectRDMAWritesTarget, scope not None : CUflushGPUDirectRDMAWritesScope):             # <<<<<<<<<<<<<<
 *     """ Blocks until remote writes are visible to the specified scope.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUflushGPUDirectRDMAWritesTarget); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_target, __pyx_t_2) < 0) __PYX_ERR(0, 12258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUflushGPUDirectRDMAWritesScope); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_scope, __pyx_t_2) < 0) __PYX_ERR(0, 12258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_35cuFlushGPUDirectRDMAWrites, 0, __pyx_n_s_cuFlushGPUDirectRDMAWrites, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__624)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuFlushGPUDirectRDMAWrites, __pyx_t_2) < 0) __PYX_ERR(0, 12258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":12295
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetProperties(dev):             # <<<<<<<<<<<<<<
 *     """ Returns properties for a selected device.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_37cuDeviceGetProperties, 0, __pyx_n_s_cuDeviceGetProperties, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__625)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetProperties, __pyx_t_2) < 0) __PYX_ERR(0, 12295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":12371
 * 
 * @cython.embedsignature(True)
 * def cuDeviceComputeCapability(dev):             # <<<<<<<<<<<<<<
 *     """ Returns the compute capability of the device.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_39cuDeviceComputeCapability, 0, __pyx_n_s_cuDeviceComputeCapability, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__626)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceComputeCapability, __pyx_t_2) < 0) __PYX_ERR(0, 12371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":12416
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxRetain(dev):             # <<<<<<<<<<<<<<
 *     """ Retain the primary context on the GPU.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_41cuDevicePrimaryCtxRetain, 0, __pyx_n_s_cuDevicePrimaryCtxRetain, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__627)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDevicePrimaryCtxRetain, __pyx_t_2) < 0) __PYX_ERR(0, 12416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":12470
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxRelease(dev):             # <<<<<<<<<<<<<<
 *     """ Release the primary context on the GPU.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_43cuDevicePrimaryCtxRelease, 0, __pyx_n_s_cuDevicePrimaryCtxRelease, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__628)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDevicePrimaryCtxRelease, __pyx_t_2) < 0) __PYX_ERR(0, 12470, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":12514
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxSetFlags(dev, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Set flags for the primary context.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_45cuDevicePrimaryCtxSetFlags, 0, __pyx_n_s_cuDevicePrimaryCtxSetFlags, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__629)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDevicePrimaryCtxSetFlags, __pyx_t_2) < 0) __PYX_ERR(0, 12514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":12593
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxGetState(dev):             # <<<<<<<<<<<<<<
 *     """ Get the state of the primary context.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_47cuDevicePrimaryCtxGetState, 0, __pyx_n_s_cuDevicePrimaryCtxGetState, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__630)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDevicePrimaryCtxGetState, __pyx_t_2) < 0) __PYX_ERR(0, 12593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":12634
 * 
 * @cython.embedsignature(True)
 * def cuDevicePrimaryCtxReset(dev):             # <<<<<<<<<<<<<<
 *     """ Destroy all allocations and reset all state on the primary context.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_49cuDevicePrimaryCtxReset, 0, __pyx_n_s_cuDevicePrimaryCtxReset, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__631)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDevicePrimaryCtxReset, __pyx_t_2) < 0) __PYX_ERR(0, 12634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":12677
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetExecAffinitySupport(typename not None : CUexecAffinityType, dev):             # <<<<<<<<<<<<<<
 *     """ Returns information about the execution affinity support of the device.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUexecAffinityType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_typename, __pyx_t_1) < 0) __PYX_ERR(0, 12677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_51cuDeviceGetExecAffinitySupport, 0, __pyx_n_s_cuDeviceGetExecAffinitySupport, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__632)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetExecAffinitySupport, __pyx_t_1) < 0) __PYX_ERR(0, 12677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":12721
 * 
 * @cython.embedsignature(True)
 * def cuCtxCreate(unsigned int flags, dev):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_53cuCtxCreate, 0, __pyx_n_s_cuCtxCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__633)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxCreate, __pyx_t_1) < 0) __PYX_ERR(0, 12721, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":12825
 * 
 * @cython.embedsignature(True)
 * def cuCtxCreate_v3(paramsArray : List[CUexecAffinityParam], int numParams, unsigned int flags, dev):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context with execution affinity.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUexecAffinityParam)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_paramsArray_2, __pyx_t_3) < 0) __PYX_ERR(0, 12825, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_55cuCtxCreate_v3, 0, __pyx_n_s_cuCtxCreate_v3, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__634)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxCreate_v3, __pyx_t_3) < 0) __PYX_ERR(0, 12825, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":12959
 * 
 * @cython.embedsignature(True)
 * def cuCtxDestroy(ctx):             # <<<<<<<<<<<<<<
 *     """ Destroy a CUDA context.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_57cuCtxDestroy, 0, __pyx_n_s_cuCtxDestroy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__636)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxDestroy, __pyx_t_3) < 0) __PYX_ERR(0, 12959, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13013
 * 
 * @cython.embedsignature(True)
 * def cuCtxPushCurrent(ctx):             # <<<<<<<<<<<<<<
 *     """ Pushes a context on the current CPU thread.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_59cuCtxPushCurrent, 0, __pyx_n_s_cuCtxPushCurrent, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__637)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxPushCurrent, __pyx_t_3) < 0) __PYX_ERR(0, 13013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13052
 * 
 * @cython.embedsignature(True)
 * def cuCtxPopCurrent():             # <<<<<<<<<<<<<<
 *     """ Pops the current CUDA context from the current CPU thread.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_61cuCtxPopCurrent, 0, __pyx_n_s_cuCtxPopCurrent, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__638)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxPopCurrent, __pyx_t_3) < 0) __PYX_ERR(0, 13052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13079
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetCurrent(ctx):             # <<<<<<<<<<<<<<
 *     """ Binds the specified CUDA context to the calling CPU thread.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_63cuCtxSetCurrent, 0, __pyx_n_s_cuCtxSetCurrent, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__639)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxSetCurrent, __pyx_t_3) < 0) __PYX_ERR(0, 13079, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13120
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetCurrent():             # <<<<<<<<<<<<<<
 *     """ Returns the CUDA context bound to the calling CPU thread.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_65cuCtxGetCurrent, 0, __pyx_n_s_cuCtxGetCurrent, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__640)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxGetCurrent, __pyx_t_3) < 0) __PYX_ERR(0, 13120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13143
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetDevice():             # <<<<<<<<<<<<<<
 *     """ Returns the device ID for the current context.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_67cuCtxGetDevice, 0, __pyx_n_s_cuCtxGetDevice, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__641)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxGetDevice, __pyx_t_3) < 0) __PYX_ERR(0, 13143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13164
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetFlags():             # <<<<<<<<<<<<<<
 *     """ Returns the flags for the current context.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_69cuCtxGetFlags, 0, __pyx_n_s_cuCtxGetFlags, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__642)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxGetFlags, __pyx_t_3) < 0) __PYX_ERR(0, 13164, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13186
 * 
 * @cython.embedsignature(True)
 * def cuCtxSynchronize():             # <<<<<<<<<<<<<<
 *     """ Block for a context's tasks to complete.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_71cuCtxSynchronize, 0, __pyx_n_s_cuCtxSynchronize, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__643)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxSynchronize, __pyx_t_3) < 0) __PYX_ERR(0, 13186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13208
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetLimit(limit not None : CUlimit, size_t value):             # <<<<<<<<<<<<<<
 *     """ Set resource limits.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUlimit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_limit, __pyx_t_1) < 0) __PYX_ERR(0, 13208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_73cuCtxSetLimit, 0, __pyx_n_s_cuCtxSetLimit, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__644)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxSetLimit, __pyx_t_1) < 0) __PYX_ERR(0, 13208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13311
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetLimit(limit not None : CUlimit):             # <<<<<<<<<<<<<<
 *     """ Returns resource limits.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUlimit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_limit, __pyx_t_3) < 0) __PYX_ERR(0, 13311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_75cuCtxGetLimit, 0, __pyx_n_s_cuCtxGetLimit, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__645)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxGetLimit, __pyx_t_3) < 0) __PYX_ERR(0, 13311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13364
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetCacheConfig():             # <<<<<<<<<<<<<<
 *     """ Returns the preferred cache configuration for the current context.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_77cuCtxGetCacheConfig, 0, __pyx_n_s_cuCtxGetCacheConfig, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__646)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxGetCacheConfig, __pyx_t_3) < 0) __PYX_ERR(0, 13364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13406
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetCacheConfig(config not None : CUfunc_cache):             # <<<<<<<<<<<<<<
 *     """ Sets the preferred cache configuration for the current context.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUfunc_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_config, __pyx_t_1) < 0) __PYX_ERR(0, 13406, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_79cuCtxSetCacheConfig, 0, __pyx_n_s_cuCtxSetCacheConfig, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__647)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxSetCacheConfig, __pyx_t_1) < 0) __PYX_ERR(0, 13406, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13459
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetSharedMemConfig():             # <<<<<<<<<<<<<<
 *     """ Returns the current shared memory configuration for the current context.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_81cuCtxGetSharedMemConfig, 0, __pyx_n_s_cuCtxGetSharedMemConfig, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__648)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxGetSharedMemConfig, __pyx_t_1) < 0) __PYX_ERR(0, 13459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13494
 * 
 * @cython.embedsignature(True)
 * def cuCtxSetSharedMemConfig(config not None : CUsharedconfig):             # <<<<<<<<<<<<<<
 *     """ Sets the shared memory configuration for the current context.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUsharedconfig); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_config, __pyx_t_3) < 0) __PYX_ERR(0, 13494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_83cuCtxSetSharedMemConfig, 0, __pyx_n_s_cuCtxSetSharedMemConfig, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__649)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxSetSharedMemConfig, __pyx_t_3) < 0) __PYX_ERR(0, 13494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13543
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetApiVersion(ctx):             # <<<<<<<<<<<<<<
 *     """ Gets the context's API version.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_85cuCtxGetApiVersion, 0, __pyx_n_s_cuCtxGetApiVersion, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__650)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxGetApiVersion, __pyx_t_3) < 0) __PYX_ERR(0, 13543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13587
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetStreamPriorityRange():             # <<<<<<<<<<<<<<
 *     """ Returns numerical values that correspond to the least and greatest stream priorities.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_87cuCtxGetStreamPriorityRange, 0, __pyx_n_s_cuCtxGetStreamPriorityRange, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__651)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxGetStreamPriorityRange, __pyx_t_3) < 0) __PYX_ERR(0, 13587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13627
 * 
 * @cython.embedsignature(True)
 * def cuCtxResetPersistingL2Cache():             # <<<<<<<<<<<<<<
 *     """ Resets all persisting lines in cache to normal status.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_89cuCtxResetPersistingL2Cache, 0, __pyx_n_s_cuCtxResetPersistingL2Cache, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__652)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxResetPersistingL2Cache, __pyx_t_3) < 0) __PYX_ERR(0, 13627, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13646
 * 
 * @cython.embedsignature(True)
 * def cuCtxGetExecAffinity(typename not None : CUexecAffinityType):             # <<<<<<<<<<<<<<
 *     """ Returns the execution affinity setting for the current context.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUexecAffinityType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_typename, __pyx_t_1) < 0) __PYX_ERR(0, 13646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_91cuCtxGetExecAffinity, 0, __pyx_n_s_cuCtxGetExecAffinity, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__653)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxGetExecAffinity, __pyx_t_1) < 0) __PYX_ERR(0, 13646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13677
 * 
 * @cython.embedsignature(True)
 * def cuCtxAttach(unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Increment a context's usage-count.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_93cuCtxAttach, 0, __pyx_n_s_cuCtxAttach, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__654)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxAttach, __pyx_t_1) < 0) __PYX_ERR(0, 13677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13712
 * 
 * @cython.embedsignature(True)
 * def cuCtxDetach(ctx):             # <<<<<<<<<<<<<<
 *     """ Decrement a context's usage-count.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_95cuCtxDetach, 0, __pyx_n_s_cuCtxDetach, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__655)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxDetach, __pyx_t_1) < 0) __PYX_ERR(0, 13712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13752
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoad(char* fname):             # <<<<<<<<<<<<<<
 *     """ Loads a compute module.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_97cuModuleLoad, 0, __pyx_n_s_cuModuleLoad, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__656)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuModuleLoad, __pyx_t_1) < 0) __PYX_ERR(0, 13752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13785
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadData(image):             # <<<<<<<<<<<<<<
 *     """ Load a module's data.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_99cuModuleLoadData, 0, __pyx_n_s_cuModuleLoadData, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__657)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuModuleLoadData, __pyx_t_1) < 0) __PYX_ERR(0, 13785, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":13819
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadDataEx(image, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Load a module's data with options.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUjit_option); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_options, __pyx_t_4) < 0) __PYX_ERR(0, 13819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_List); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_optionValues, __pyx_t_3) < 0) __PYX_ERR(0, 13819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_101cuModuleLoadDataEx, 0, __pyx_n_s_cuModuleLoadDataEx, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__658)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuModuleLoadDataEx, __pyx_t_3) < 0) __PYX_ERR(0, 13819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13871
 * 
 * @cython.embedsignature(True)
 * def cuModuleLoadFatBinary(fatCubin):             # <<<<<<<<<<<<<<
 *     """ Load a module's data.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_103cuModuleLoadFatBinary, 0, __pyx_n_s_cuModuleLoadFatBinary, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__661)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuModuleLoadFatBinary, __pyx_t_3) < 0) __PYX_ERR(0, 13871, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13908
 * 
 * @cython.embedsignature(True)
 * def cuModuleUnload(hmod):             # <<<<<<<<<<<<<<
 *     """ Unloads a module.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_105cuModuleUnload, 0, __pyx_n_s_cuModuleUnload, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__662)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuModuleUnload, __pyx_t_3) < 0) __PYX_ERR(0, 13908, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13941
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetLoadingMode():             # <<<<<<<<<<<<<<
 *     """ Query lazy loading mode.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_107cuModuleGetLoadingMode, 0, __pyx_n_s_cuModuleGetLoadingMode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__663)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuModuleGetLoadingMode, __pyx_t_3) < 0) __PYX_ERR(0, 13941, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":13963
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetFunction(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a function handle.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_109cuModuleGetFunction, 0, __pyx_n_s_cuModuleGetFunction, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__664)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuModuleGetFunction, __pyx_t_3) < 0) __PYX_ERR(0, 13963, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":14004
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetGlobal(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a global pointer from a module.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_111cuModuleGetGlobal, 0, __pyx_n_s_cuModuleGetGlobal, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__665)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuModuleGetGlobal, __pyx_t_3) < 0) __PYX_ERR(0, 14004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":14049
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetTexRef(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_113cuModuleGetTexRef, 0, __pyx_n_s_cuModuleGetTexRef, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__666)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuModuleGetTexRef, __pyx_t_3) < 0) __PYX_ERR(0, 14049, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":14092
 * 
 * @cython.embedsignature(True)
 * def cuModuleGetSurfRef(hmod, char* name):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a surface reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_115cuModuleGetSurfRef, 0, __pyx_n_s_cuModuleGetSurfRef, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__667)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuModuleGetSurfRef, __pyx_t_3) < 0) __PYX_ERR(0, 14092, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":14133
 * 
 * @cython.embedsignature(True)
 * def cuLinkCreate(unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Creates a pending JIT linker invocation.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUjit_option); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_options, __pyx_t_4) < 0) __PYX_ERR(0, 14133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_List); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_optionValues, __pyx_t_1) < 0) __PYX_ERR(0, 14133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_117cuLinkCreate, 0, __pyx_n_s_cuLinkCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__668)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLinkCreate, __pyx_t_1) < 0) __PYX_ERR(0, 14133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14190
 * 
 * @cython.embedsignature(True)
 * def cuLinkAddData(state, typename not None : CUjitInputType, data, size_t size, char* name, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Add an input to a pending linker invocation.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUjitInputType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_typename, __pyx_t_3) < 0) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUjit_option); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_options, __pyx_t_4) < 0) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_List); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_optionValues, __pyx_t_3) < 0) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_119cuLinkAddData, 0, __pyx_n_s_cuLinkAddData, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__669)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLinkAddData, __pyx_t_3) < 0) __PYX_ERR(0, 14190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":14257
 * 
 * @cython.embedsignature(True)
 * def cuLinkAddFile(state, typename not None : CUjitInputType, char* path, unsigned int numOptions, options : List[CUjit_option], optionValues : List[Any]):             # <<<<<<<<<<<<<<
 *     """ Add a file input to a pending linker invocation.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUjitInputType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_typename, __pyx_t_1) < 0) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUjit_option); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_options, __pyx_t_4) < 0) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_List); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_optionValues, __pyx_t_1) < 0) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_121cuLinkAddFile, 0, __pyx_n_s_cuLinkAddFile, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__670)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLinkAddFile, __pyx_t_1) < 0) __PYX_ERR(0, 14257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14320
 * 
 * @cython.embedsignature(True)
 * def cuLinkComplete(state):             # <<<<<<<<<<<<<<
 *     """ Complete a pending linker invocation.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_123cuLinkComplete, 0, __pyx_n_s_cuLinkComplete, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__671)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLinkComplete, __pyx_t_1) < 0) __PYX_ERR(0, 14320, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14363
 * 
 * @cython.embedsignature(True)
 * def cuLinkDestroy(state):             # <<<<<<<<<<<<<<
 *     """ Destroys state for a JIT linker invocation.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_125cuLinkDestroy, 0, __pyx_n_s_cuLinkDestroy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__672)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLinkDestroy, __pyx_t_1) < 0) __PYX_ERR(0, 14363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14394
 * 
 * @cython.embedsignature(True)
 * def cuMemGetInfo():             # <<<<<<<<<<<<<<
 *     """ Gets free and total memory.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_127cuMemGetInfo, 0, __pyx_n_s_cuMemGetInfo, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__673)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemGetInfo, __pyx_t_1) < 0) __PYX_ERR(0, 14394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14433
 * 
 * @cython.embedsignature(True)
 * def cuMemAlloc(size_t bytesize):             # <<<<<<<<<<<<<<
 *     """ Allocates device memory.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_129cuMemAlloc, 0, __pyx_n_s_cuMemAlloc, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__674)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemAlloc, __pyx_t_1) < 0) __PYX_ERR(0, 14433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14463
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocPitch(size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes):             # <<<<<<<<<<<<<<
 *     """ Allocates pitched device memory.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_131cuMemAllocPitch, 0, __pyx_n_s_cuMemAllocPitch, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__675)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemAllocPitch, __pyx_t_1) < 0) __PYX_ERR(0, 14463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14526
 * 
 * @cython.embedsignature(True)
 * def cuMemFree(dptr):             # <<<<<<<<<<<<<<
 *     """ Frees device memory.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_133cuMemFree, 0, __pyx_n_s_cuMemFree, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__676)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemFree, __pyx_t_1) < 0) __PYX_ERR(0, 14526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14571
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAddressRange(dptr):             # <<<<<<<<<<<<<<
 *     """ Get information on memory allocations.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_135cuMemGetAddressRange, 0, __pyx_n_s_cuMemGetAddressRange, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__677)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemGetAddressRange, __pyx_t_1) < 0) __PYX_ERR(0, 14571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14613
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocHost(size_t bytesize):             # <<<<<<<<<<<<<<
 *     """ Allocates page-locked host memory.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_137cuMemAllocHost, 0, __pyx_n_s_cuMemAllocHost, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__678)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemAllocHost, __pyx_t_1) < 0) __PYX_ERR(0, 14613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14657
 * 
 * @cython.embedsignature(True)
 * def cuMemFreeHost(p):             # <<<<<<<<<<<<<<
 *     """ Frees page-locked host memory.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_139cuMemFreeHost, 0, __pyx_n_s_cuMemFreeHost, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__679)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemFreeHost, __pyx_t_1) < 0) __PYX_ERR(0, 14657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14683
 * 
 * @cython.embedsignature(True)
 * def cuMemHostAlloc(size_t bytesize, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Allocates page-locked host memory.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_141cuMemHostAlloc, 0, __pyx_n_s_cuMemHostAlloc, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__680)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemHostAlloc, __pyx_t_1) < 0) __PYX_ERR(0, 14683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14764
 * 
 * @cython.embedsignature(True)
 * def cuMemHostGetDevicePointer(p, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Passes back device pointer of mapped pinned memory.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_143cuMemHostGetDevicePointer, 0, __pyx_n_s_cuMemHostGetDevicePointer, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__681)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemHostGetDevicePointer, __pyx_t_1) < 0) __PYX_ERR(0, 14764, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14821
 * 
 * @cython.embedsignature(True)
 * def cuMemHostGetFlags(p):             # <<<<<<<<<<<<<<
 *     """ Passes back flags that were used for a pinned allocation.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_145cuMemHostGetFlags, 0, __pyx_n_s_cuMemHostGetFlags, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__682)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemHostGetFlags, __pyx_t_1) < 0) __PYX_ERR(0, 14821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14854
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocManaged(size_t bytesize, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Allocates memory that will be automatically managed by the Unified Memory system.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_147cuMemAllocManaged, 0, __pyx_n_s_cuMemAllocManaged, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__683)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemAllocManaged, __pyx_t_1) < 0) __PYX_ERR(0, 14854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":14986
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetByPCIBusId(char* pciBusId):             # <<<<<<<<<<<<<<
 *     """ Returns a handle to a compute device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_149cuDeviceGetByPCIBusId, 0, __pyx_n_s_cuDeviceGetByPCIBusId, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__684)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetByPCIBusId, __pyx_t_1) < 0) __PYX_ERR(0, 14986, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15015
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetPCIBusId(int length, dev):             # <<<<<<<<<<<<<<
 *     """ Returns a PCI Bus Id string for the device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_151cuDeviceGetPCIBusId, 0, __pyx_n_s_cuDeviceGetPCIBusId, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__685)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetPCIBusId, __pyx_t_1) < 0) __PYX_ERR(0, 15015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15060
 * 
 * @cython.embedsignature(True)
 * def cuIpcGetEventHandle(event):             # <<<<<<<<<<<<<<
 *     """ Gets an interprocess handle for a previously allocated event.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_153cuIpcGetEventHandle, 0, __pyx_n_s_cuIpcGetEventHandle, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__686)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuIpcGetEventHandle, __pyx_t_1) < 0) __PYX_ERR(0, 15060, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15114
 * 
 * @cython.embedsignature(True)
 * def cuIpcOpenEventHandle(handle not None : CUipcEventHandle):             # <<<<<<<<<<<<<<
 *     """ Opens an interprocess event handle for use in the current process.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_handle_2, __pyx_n_u_CUipcEventHandle) < 0) __PYX_ERR(0, 15114, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_155cuIpcOpenEventHandle, 0, __pyx_n_s_cuIpcOpenEventHandle, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__687)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuIpcOpenEventHandle, __pyx_t_3) < 0) __PYX_ERR(0, 15114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":15152
 * 
 * @cython.embedsignature(True)
 * def cuIpcGetMemHandle(dptr):             # <<<<<<<<<<<<<<
 *     """ Gets an interprocess memory handle for an existing device memory allocation.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_157cuIpcGetMemHandle, 0, __pyx_n_s_cuIpcGetMemHandle, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__688)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuIpcGetMemHandle, __pyx_t_3) < 0) __PYX_ERR(0, 15152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":15201
 * 
 * @cython.embedsignature(True)
 * def cuIpcOpenMemHandle(handle not None : CUipcMemHandle, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handle_2, __pyx_n_u_CUipcMemHandle) < 0) __PYX_ERR(0, 15201, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_159cuIpcOpenMemHandle, 0, __pyx_n_s_cuIpcOpenMemHandle, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__689)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuIpcOpenMemHandle, __pyx_t_1) < 0) __PYX_ERR(0, 15201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15261
 * 
 * @cython.embedsignature(True)
 * def cuIpcCloseMemHandle(dptr):             # <<<<<<<<<<<<<<
 *     """ Attempts to close memory mapped with :py:obj:`~.cuIpcOpenMemHandle`.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_161cuIpcCloseMemHandle, 0, __pyx_n_s_cuIpcCloseMemHandle, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__690)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuIpcCloseMemHandle, __pyx_t_1) < 0) __PYX_ERR(0, 15261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15305
 * 
 * @cython.embedsignature(True)
 * def cuMemHostRegister(p, size_t bytesize, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Registers an existing host memory range for use by CUDA.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_163cuMemHostRegister, 0, __pyx_n_s_cuMemHostRegister, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__691)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemHostRegister, __pyx_t_1) < 0) __PYX_ERR(0, 15305, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15401
 * 
 * @cython.embedsignature(True)
 * def cuMemHostUnregister(p):             # <<<<<<<<<<<<<<
 *     """ Unregisters a memory range that was registered with cuMemHostRegister.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_165cuMemHostUnregister, 0, __pyx_n_s_cuMemHostUnregister, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__692)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemHostUnregister, __pyx_t_1) < 0) __PYX_ERR(0, 15401, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15430
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy(dst, src, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_167cuMemcpy, 0, __pyx_n_s_cuMemcpy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__693)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpy, __pyx_t_1) < 0) __PYX_ERR(0, 15430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15482
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies device memory between two contexts.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_169cuMemcpyPeer, 0, __pyx_n_s_cuMemcpyPeer, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__694)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyPeer, __pyx_t_1) < 0) __PYX_ERR(0, 15482, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15557
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoD(dstDevice, srcHost, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_171cuMemcpyHtoD, 0, __pyx_n_s_cuMemcpyHtoD, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__695)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyHtoD, __pyx_t_1) < 0) __PYX_ERR(0, 15557, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15598
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoH(dstHost, srcDevice, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Host.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_173cuMemcpyDtoH, 0, __pyx_n_s_cuMemcpyDtoH, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__696)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyDtoH, __pyx_t_1) < 0) __PYX_ERR(0, 15598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15639
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoD(dstDevice, srcDevice, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_175cuMemcpyDtoD, 0, __pyx_n_s_cuMemcpyDtoD, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__697)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyDtoD, __pyx_t_1) < 0) __PYX_ERR(0, 15639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15688
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoA(dstArray, size_t dstOffset, srcDevice, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Array.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_177cuMemcpyDtoA, 0, __pyx_n_s_cuMemcpyDtoA, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__698)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyDtoA, __pyx_t_1) < 0) __PYX_ERR(0, 15688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15740
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoD(dstDevice, srcArray, size_t srcOffset, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_179cuMemcpyAtoD, 0, __pyx_n_s_cuMemcpyAtoD, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__699)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyAtoD, __pyx_t_1) < 0) __PYX_ERR(0, 15740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15794
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoA(dstArray, size_t dstOffset, srcHost, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Array.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_181cuMemcpyHtoA, 0, __pyx_n_s_cuMemcpyHtoA, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__700)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyHtoA, __pyx_t_1) < 0) __PYX_ERR(0, 15794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15838
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoH(dstHost, srcArray, size_t srcOffset, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Host.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_183cuMemcpyAtoH, 0, __pyx_n_s_cuMemcpyAtoH, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__701)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyAtoH, __pyx_t_1) < 0) __PYX_ERR(0, 15838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15882
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoA(dstArray, size_t dstOffset, srcArray, size_t srcOffset, size_t ByteCount):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Array.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_185cuMemcpyAtoA, 0, __pyx_n_s_cuMemcpyAtoA, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__702)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyAtoA, __pyx_t_1) < 0) __PYX_ERR(0, 15882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":15939
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy2D(pCopy : CUDA_MEMCPY2D):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 2D arrays.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pCopy, __pyx_n_u_CUDA_MEMCPY2D) < 0) __PYX_ERR(0, 15939, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_187cuMemcpy2D, 0, __pyx_n_s_cuMemcpy2D, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__703)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpy2D, __pyx_t_3) < 0) __PYX_ERR(0, 15939, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":16062
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy2DUnaligned(pCopy : CUDA_MEMCPY2D):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 2D arrays.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pCopy, __pyx_n_u_CUDA_MEMCPY2D) < 0) __PYX_ERR(0, 16062, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_189cuMemcpy2DUnaligned, 0, __pyx_n_s_cuMemcpy2DUnaligned, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__704)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpy2DUnaligned, __pyx_t_1) < 0) __PYX_ERR(0, 16062, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":16185
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3D(pCopy : CUDA_MEMCPY3D):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 3D arrays.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pCopy, __pyx_n_u_CUDA_MEMCPY3D) < 0) __PYX_ERR(0, 16185, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_191cuMemcpy3D, 0, __pyx_n_s_cuMemcpy3D, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__705)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpy3D, __pyx_t_3) < 0) __PYX_ERR(0, 16185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":16311
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3DPeer(pCopy : CUDA_MEMCPY3D_PEER):             # <<<<<<<<<<<<<<
 *     """ Copies memory between contexts.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pCopy, __pyx_n_u_CUDA_MEMCPY3D_PEER) < 0) __PYX_ERR(0, 16311, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_193cuMemcpy3DPeer, 0, __pyx_n_s_cuMemcpy3DPeer, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__706)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpy3DPeer, __pyx_t_1) < 0) __PYX_ERR(0, 16311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":16337
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAsync(dst, src, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory asynchronously.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_195cuMemcpyAsync, 0, __pyx_n_s_cuMemcpyAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__707)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyAsync, __pyx_t_1) < 0) __PYX_ERR(0, 16337, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":16401
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies device memory between two contexts asynchronously.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_197cuMemcpyPeerAsync, 0, __pyx_n_s_cuMemcpyPeerAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__708)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyPeerAsync, __pyx_t_1) < 0) __PYX_ERR(0, 16401, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":16488
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoDAsync(dstDevice, srcHost, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_199cuMemcpyHtoDAsync, 0, __pyx_n_s_cuMemcpyHtoDAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__709)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyHtoDAsync, __pyx_t_1) < 0) __PYX_ERR(0, 16488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":16541
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoHAsync(dstHost, srcDevice, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Host.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_201cuMemcpyDtoHAsync, 0, __pyx_n_s_cuMemcpyDtoHAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__710)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyDtoHAsync, __pyx_t_1) < 0) __PYX_ERR(0, 16541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":16594
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyDtoDAsync(dstDevice, srcDevice, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Device to Device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_203cuMemcpyDtoDAsync, 0, __pyx_n_s_cuMemcpyDtoDAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__711)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyDtoDAsync, __pyx_t_1) < 0) __PYX_ERR(0, 16594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":16655
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyHtoAAsync(dstArray, size_t dstOffset, srcHost, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Host to Array.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_205cuMemcpyHtoAAsync, 0, __pyx_n_s_cuMemcpyHtoAAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__712)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyHtoAAsync, __pyx_t_1) < 0) __PYX_ERR(0, 16655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":16711
 * 
 * @cython.embedsignature(True)
 * def cuMemcpyAtoHAsync(dstHost, srcArray, size_t srcOffset, size_t ByteCount, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory from Array to Host.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_207cuMemcpyAtoHAsync, 0, __pyx_n_s_cuMemcpyAtoHAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__713)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpyAtoHAsync, __pyx_t_1) < 0) __PYX_ERR(0, 16711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":16767
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy2DAsync(pCopy : CUDA_MEMCPY2D, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 2D arrays.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pCopy, __pyx_n_u_CUDA_MEMCPY2D) < 0) __PYX_ERR(0, 16767, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_209cuMemcpy2DAsync, 0, __pyx_n_s_cuMemcpy2DAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__714)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpy2DAsync, __pyx_t_3) < 0) __PYX_ERR(0, 16767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":16909
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3DAsync(pCopy : CUDA_MEMCPY3D, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory for 3D arrays.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pCopy, __pyx_n_u_CUDA_MEMCPY3D) < 0) __PYX_ERR(0, 16909, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_211cuMemcpy3DAsync, 0, __pyx_n_s_cuMemcpy3DAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__715)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpy3DAsync, __pyx_t_1) < 0) __PYX_ERR(0, 16909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":17047
 * 
 * @cython.embedsignature(True)
 * def cuMemcpy3DPeerAsync(pCopy : CUDA_MEMCPY3D_PEER, hStream):             # <<<<<<<<<<<<<<
 *     """ Copies memory between contexts asynchronously.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pCopy, __pyx_n_u_CUDA_MEMCPY3D_PEER) < 0) __PYX_ERR(0, 17047, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_213cuMemcpy3DPeerAsync, 0, __pyx_n_s_cuMemcpy3DPeerAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__716)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemcpy3DPeerAsync, __pyx_t_3) < 0) __PYX_ERR(0, 17047, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17085
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD8(dstDevice, unsigned char uc, size_t N):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_215cuMemsetD8, 0, __pyx_n_s_cuMemsetD8, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__717)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemsetD8, __pyx_t_3) < 0) __PYX_ERR(0, 17085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17122
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD16(dstDevice, unsigned short us, size_t N):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_217cuMemsetD16, 0, __pyx_n_s_cuMemsetD16, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__718)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemsetD16, __pyx_t_3) < 0) __PYX_ERR(0, 17122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17160
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD32(dstDevice, unsigned int ui, size_t N):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_219cuMemsetD32, 0, __pyx_n_s_cuMemsetD32, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__719)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemsetD32, __pyx_t_3) < 0) __PYX_ERR(0, 17160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17198
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D8(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_221cuMemsetD2D8, 0, __pyx_n_s_cuMemsetD2D8, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__720)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemsetD2D8, __pyx_t_3) < 0) __PYX_ERR(0, 17198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17243
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D16(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_223cuMemsetD2D16, 0, __pyx_n_s_cuMemsetD2D16, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__721)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemsetD2D16, __pyx_t_3) < 0) __PYX_ERR(0, 17243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17289
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D32(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height):             # <<<<<<<<<<<<<<
 *     """ Initializes device memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_225cuMemsetD2D32, 0, __pyx_n_s_cuMemsetD2D32, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__722)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemsetD2D32, __pyx_t_3) < 0) __PYX_ERR(0, 17289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17335
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD8Async(dstDevice, unsigned char uc, size_t N, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_227cuMemsetD8Async, 0, __pyx_n_s_cuMemsetD8Async, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__723)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemsetD8Async, __pyx_t_3) < 0) __PYX_ERR(0, 17335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17384
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD16Async(dstDevice, unsigned short us, size_t N, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_229cuMemsetD16Async, 0, __pyx_n_s_cuMemsetD16Async, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__724)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemsetD16Async, __pyx_t_3) < 0) __PYX_ERR(0, 17384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17434
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD32Async(dstDevice, unsigned int ui, size_t N, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_231cuMemsetD32Async, 0, __pyx_n_s_cuMemsetD32Async, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__725)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemsetD32Async, __pyx_t_3) < 0) __PYX_ERR(0, 17434, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17484
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D8Async(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_233cuMemsetD2D8Async, 0, __pyx_n_s_cuMemsetD2D8Async, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__726)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemsetD2D8Async, __pyx_t_3) < 0) __PYX_ERR(0, 17484, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17541
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D16Async(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_235cuMemsetD2D16Async, 0, __pyx_n_s_cuMemsetD2D16Async, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__727)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemsetD2D16Async, __pyx_t_3) < 0) __PYX_ERR(0, 17541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17599
 * 
 * @cython.embedsignature(True)
 * def cuMemsetD2D32Async(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, hStream):             # <<<<<<<<<<<<<<
 *     """ Sets device memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_237cuMemsetD2D32Async, 0, __pyx_n_s_cuMemsetD2D32Async, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__728)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemsetD2D32Async, __pyx_t_3) < 0) __PYX_ERR(0, 17599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":17657
 * 
 * @cython.embedsignature(True)
 * def cuArrayCreate(pAllocateArray : CUDA_ARRAY_DESCRIPTOR):             # <<<<<<<<<<<<<<
 *     """ Creates a 1D or 2D CUDA array.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pAllocateArray, __pyx_n_u_CUDA_ARRAY_DESCRIPTOR) < 0) __PYX_ERR(0, 17657, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_239cuArrayCreate, 0, __pyx_n_s_cuArrayCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__729)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuArrayCreate, __pyx_t_1) < 0) __PYX_ERR(0, 17657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":17722
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetDescriptor(hArray):             # <<<<<<<<<<<<<<
 *     """ Get a 1D or 2D CUDA array descriptor.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_241cuArrayGetDescriptor, 0, __pyx_n_s_cuArrayGetDescriptor, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__730)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuArrayGetDescriptor, __pyx_t_1) < 0) __PYX_ERR(0, 17722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":17761
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetSparseProperties(array):             # <<<<<<<<<<<<<<
 *     """ Returns the layout properties of a sparse CUDA array.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_243cuArrayGetSparseProperties, 0, __pyx_n_s_cuArrayGetSparseProperties, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__731)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuArrayGetSparseProperties, __pyx_t_1) < 0) __PYX_ERR(0, 17761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":17813
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayGetSparseProperties(mipmap):             # <<<<<<<<<<<<<<
 *     """ Returns the layout properties of a sparse CUDA mipmapped array.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_245cuMipmappedArrayGetSparseProperties, 0, __pyx_n_s_cuMipmappedArrayGetSparsePropert, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__732)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMipmappedArrayGetSparsePropert, __pyx_t_1) < 0) __PYX_ERR(0, 17813, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":17867
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetMemoryRequirements(array, device):             # <<<<<<<<<<<<<<
 *     """ Returns the memory requirements of a CUDA array.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_247cuArrayGetMemoryRequirements, 0, __pyx_n_s_cuArrayGetMemoryRequirements, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__733)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuArrayGetMemoryRequirements, __pyx_t_1) < 0) __PYX_ERR(0, 17867, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":17923
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayGetMemoryRequirements(mipmap, device):             # <<<<<<<<<<<<<<
 *     """ Returns the memory requirements of a CUDA mipmapped array.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_249cuMipmappedArrayGetMemoryRequirements, 0, __pyx_n_s_cuMipmappedArrayGetMemoryRequire, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__734)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMipmappedArrayGetMemoryRequire, __pyx_t_1) < 0) __PYX_ERR(0, 17923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":17980
 * 
 * @cython.embedsignature(True)
 * def cuArrayGetPlane(hArray, unsigned int planeIdx):             # <<<<<<<<<<<<<<
 *     """ Gets a CUDA array plane from a CUDA array.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_251cuArrayGetPlane, 0, __pyx_n_s_cuArrayGetPlane, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__735)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuArrayGetPlane, __pyx_t_1) < 0) __PYX_ERR(0, 17980, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":18032
 * 
 * @cython.embedsignature(True)
 * def cuArrayDestroy(hArray):             # <<<<<<<<<<<<<<
 *     """ Destroys a CUDA array.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_253cuArrayDestroy, 0, __pyx_n_s_cuArrayDestroy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__736)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuArrayDestroy, __pyx_t_1) < 0) __PYX_ERR(0, 18032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":18065
 * 
 * @cython.embedsignature(True)
 * def cuArray3DCreate(pAllocateArray : CUDA_ARRAY3D_DESCRIPTOR):             # <<<<<<<<<<<<<<
 *     """ Creates a 3D CUDA array.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pAllocateArray, __pyx_n_u_CUDA_ARRAY3D_DESCRIPTOR) < 0) __PYX_ERR(0, 18065, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_255cuArray3DCreate, 0, __pyx_n_s_cuArray3DCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__737)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuArray3DCreate, __pyx_t_3) < 0) __PYX_ERR(0, 18065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":18194
 * 
 * @cython.embedsignature(True)
 * def cuArray3DGetDescriptor(hArray):             # <<<<<<<<<<<<<<
 *     """ Get a 3D CUDA array descriptor.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_257cuArray3DGetDescriptor, 0, __pyx_n_s_cuArray3DGetDescriptor, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__738)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuArray3DGetDescriptor, __pyx_t_3) < 0) __PYX_ERR(0, 18194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":18237
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayCreate(pMipmappedArrayDesc : CUDA_ARRAY3D_DESCRIPTOR, unsigned int numMipmapLevels):             # <<<<<<<<<<<<<<
 *     """ Creates a CUDA mipmapped array.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pMipmappedArrayDesc, __pyx_n_u_CUDA_ARRAY3D_DESCRIPTOR) < 0) __PYX_ERR(0, 18237, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_259cuMipmappedArrayCreate, 0, __pyx_n_s_cuMipmappedArrayCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__739)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMipmappedArrayCreate, __pyx_t_1) < 0) __PYX_ERR(0, 18237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":18354
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayGetLevel(hMipmappedArray, unsigned int level):             # <<<<<<<<<<<<<<
 *     """ Gets a mipmap level of a CUDA mipmapped array.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_261cuMipmappedArrayGetLevel, 0, __pyx_n_s_cuMipmappedArrayGetLevel, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__740)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMipmappedArrayGetLevel, __pyx_t_1) < 0) __PYX_ERR(0, 18354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":18396
 * 
 * @cython.embedsignature(True)
 * def cuMipmappedArrayDestroy(hMipmappedArray):             # <<<<<<<<<<<<<<
 *     """ Destroys a CUDA mipmapped array.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_263cuMipmappedArrayDestroy, 0, __pyx_n_s_cuMipmappedArrayDestroy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__741)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMipmappedArrayDestroy, __pyx_t_1) < 0) __PYX_ERR(0, 18396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":18429
 * 
 * @cython.embedsignature(True)
 * def cuMemGetHandleForAddressRange(dptr, size_t size, handleType not None : CUmemRangeHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Retrieve handle for an address range.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUmemRangeHandleType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_handleType, __pyx_t_3) < 0) __PYX_ERR(0, 18429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_265cuMemGetHandleForAddressRange, 0, __pyx_n_s_cuMemGetHandleForAddressRange, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__742)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemGetHandleForAddressRange, __pyx_t_3) < 0) __PYX_ERR(0, 18429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":18492
 * 
 * @cython.embedsignature(True)
 * def cuMemAddressReserve(size_t size, size_t alignment, addr, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Allocate an address range reservation.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_267cuMemAddressReserve, 0, __pyx_n_s_cuMemAddressReserve, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__743)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemAddressReserve, __pyx_t_3) < 0) __PYX_ERR(0, 18492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":18538
 * 
 * @cython.embedsignature(True)
 * def cuMemAddressFree(ptr, size_t size):             # <<<<<<<<<<<<<<
 *     """ Free an address range reservation.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_269cuMemAddressFree, 0, __pyx_n_s_cuMemAddressFree, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__744)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemAddressFree, __pyx_t_3) < 0) __PYX_ERR(0, 18538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":18575
 * 
 * @cython.embedsignature(True)
 * def cuMemCreate(size_t size, prop : CUmemAllocationProp, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA memory handle representing a memory allocation of a given size described by the given properties.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_prop, __pyx_n_u_CUmemAllocationProp) < 0) __PYX_ERR(0, 18575, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_271cuMemCreate, 0, __pyx_n_s_cuMemCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__745)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemCreate, __pyx_t_1) < 0) __PYX_ERR(0, 18575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":18624
 * 
 * @cython.embedsignature(True)
 * def cuMemRelease(handle):             # <<<<<<<<<<<<<<
 *     """ Release a memory handle representing a memory allocation which was previously allocated through cuMemCreate.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_273cuMemRelease, 0, __pyx_n_s_cuMemRelease, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__746)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemRelease, __pyx_t_1) < 0) __PYX_ERR(0, 18624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":18666
 * 
 * @cython.embedsignature(True)
 * def cuMemMap(ptr, size_t size, size_t offset, handle, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Maps an allocation handle to a reserved virtual address range.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_275cuMemMap, 0, __pyx_n_s_cuMemMap, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__747)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemMap, __pyx_t_1) < 0) __PYX_ERR(0, 18666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":18736
 * 
 * @cython.embedsignature(True)
 * def cuMemMapArrayAsync(mapInfoList : List[CUarrayMapInfo], unsigned int count, hStream):             # <<<<<<<<<<<<<<
 *     """ Maps or unmaps subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUarrayMapInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mapInfoList, __pyx_t_2) < 0) __PYX_ERR(0, 18736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_277cuMemMapArrayAsync, 0, __pyx_n_s_cuMemMapArrayAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__748)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemMapArrayAsync, __pyx_t_2) < 0) __PYX_ERR(0, 18736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":18908
 * 
 * @cython.embedsignature(True)
 * def cuMemUnmap(ptr, size_t size):             # <<<<<<<<<<<<<<
 *     """ Unmap the backing memory of a given address range.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_279cuMemUnmap, 0, __pyx_n_s_cuMemUnmap, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__750)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemUnmap, __pyx_t_2) < 0) __PYX_ERR(0, 18908, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":18954
 * 
 * @cython.embedsignature(True)
 * def cuMemSetAccess(ptr, size_t size, desc : List[CUmemAccessDesc], size_t count):             # <<<<<<<<<<<<<<
 *     """ Set the access flags for each location specified in `desc` for the given virtual address range.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemAccessDesc)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_desc, __pyx_t_3) < 0) __PYX_ERR(0, 18954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_281cuMemSetAccess, 0, __pyx_n_s_cuMemSetAccess, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__751)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemSetAccess, __pyx_t_3) < 0) __PYX_ERR(0, 18954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19013
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAccess(location : CUmemLocation, ptr):             # <<<<<<<<<<<<<<
 *     """ Get the access `flags` set for the given `location` and `ptr`.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_location_2, __pyx_n_u_CUmemLocation) < 0) __PYX_ERR(0, 19013, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_283cuMemGetAccess, 0, __pyx_n_s_cuMemGetAccess, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__753)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemGetAccess, __pyx_t_2) < 0) __PYX_ERR(0, 19013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":19050
 * 
 * @cython.embedsignature(True)
 * def cuMemExportToShareableHandle(handle, handleType not None : CUmemAllocationHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Exports an allocation to a requested shareable handle type.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUmemAllocationHandleType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_handleType, __pyx_t_3) < 0) __PYX_ERR(0, 19050, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_285cuMemExportToShareableHandle, 0, __pyx_n_s_cuMemExportToShareableHandle, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__754)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemExportToShareableHandle, __pyx_t_3) < 0) __PYX_ERR(0, 19050, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19106
 * 
 * @cython.embedsignature(True)
 * def cuMemImportFromShareableHandle(osHandle, shHandleType not None : CUmemAllocationHandleType):             # <<<<<<<<<<<<<<
 *     """ Imports an allocation from a requested shareable handle type.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemAllocationHandleType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shHandleType, __pyx_t_2) < 0) __PYX_ERR(0, 19106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_287cuMemImportFromShareableHandle, 0, __pyx_n_s_cuMemImportFromShareableHandle, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__755)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemImportFromShareableHandle, __pyx_t_2) < 0) __PYX_ERR(0, 19106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":19144
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAllocationGranularity(prop : CUmemAllocationProp, option not None : CUmemAllocationGranularity_flags):             # <<<<<<<<<<<<<<
 *     """ Calculates either the minimal or recommended granularity.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_prop, __pyx_n_u_CUmemAllocationProp) < 0) __PYX_ERR(0, 19144, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUmemAllocationGranularity_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_option, __pyx_t_3) < 0) __PYX_ERR(0, 19144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_289cuMemGetAllocationGranularity, 0, __pyx_n_s_cuMemGetAllocationGranularity, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__756)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemGetAllocationGranularity, __pyx_t_3) < 0) __PYX_ERR(0, 19144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19177
 * 
 * @cython.embedsignature(True)
 * def cuMemGetAllocationPropertiesFromHandle(handle):             # <<<<<<<<<<<<<<
 *     """ Retrieve the contents of the property structure defining properties for this handle.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_291cuMemGetAllocationPropertiesFromHandle, 0, __pyx_n_s_cuMemGetAllocationPropertiesFrom, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__757)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemGetAllocationPropertiesFrom, __pyx_t_3) < 0) __PYX_ERR(0, 19177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19212
 * 
 * @cython.embedsignature(True)
 * def cuMemRetainAllocationHandle(addr):             # <<<<<<<<<<<<<<
 *     """ Given an address `addr`, returns the allocation handle of the backing memory allocation.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_293cuMemRetainAllocationHandle, 0, __pyx_n_s_cuMemRetainAllocationHandle, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__758)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemRetainAllocationHandle, __pyx_t_3) < 0) __PYX_ERR(0, 19212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19247
 * 
 * @cython.embedsignature(True)
 * def cuMemFreeAsync(dptr, hStream):             # <<<<<<<<<<<<<<
 *     """ Frees memory with stream ordered semantics.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_295cuMemFreeAsync, 0, __pyx_n_s_cuMemFreeAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__759)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemFreeAsync, __pyx_t_3) < 0) __PYX_ERR(0, 19247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19295
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocAsync(size_t bytesize, hStream):             # <<<<<<<<<<<<<<
 *     """ Allocates memory with stream ordered semantics.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_297cuMemAllocAsync, 0, __pyx_n_s_cuMemAllocAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__760)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemAllocAsync, __pyx_t_3) < 0) __PYX_ERR(0, 19295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19345
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolTrimTo(pool, size_t minBytesToKeep):             # <<<<<<<<<<<<<<
 *     """ Tries to release memory back to the OS.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_299cuMemPoolTrimTo, 0, __pyx_n_s_cuMemPoolTrimTo, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__761)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemPoolTrimTo, __pyx_t_3) < 0) __PYX_ERR(0, 19345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19393
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolSetAttribute(pool, attr not None : CUmemPool_attribute, value):             # <<<<<<<<<<<<<<
 *     """ Sets attributes of a memory pool.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUmemPool_attribute); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attr, __pyx_t_2) < 0) __PYX_ERR(0, 19393, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_301cuMemPoolSetAttribute, 0, __pyx_n_s_cuMemPoolSetAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__762)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemPoolSetAttribute, __pyx_t_2) < 0) __PYX_ERR(0, 19393, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":19466
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolGetAttribute(pool, attr not None : CUmemPool_attribute):             # <<<<<<<<<<<<<<
 *     """ Gets attributes of a memory pool.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUmemPool_attribute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_attr, __pyx_t_3) < 0) __PYX_ERR(0, 19466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_303cuMemPoolGetAttribute, 0, __pyx_n_s_cuMemPoolGetAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__763)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemPoolGetAttribute, __pyx_t_3) < 0) __PYX_ERR(0, 19466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19546
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolSetAccess(pool, map : List[CUmemAccessDesc], size_t count):             # <<<<<<<<<<<<<<
 *     """ Controls visibility of pools between devices.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUmemAccessDesc)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_map, __pyx_t_1) < 0) __PYX_ERR(0, 19546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_305cuMemPoolSetAccess, 0, __pyx_n_s_cuMemPoolSetAccess, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__764)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemPoolSetAccess, __pyx_t_1) < 0) __PYX_ERR(0, 19546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19597
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolGetAccess(memPool, location : CUmemLocation):             # <<<<<<<<<<<<<<
 *     """ Returns the accessibility of a pool from a device.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_location_2, __pyx_n_u_CUmemLocation) < 0) __PYX_ERR(0, 19597, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_307cuMemPoolGetAccess, 0, __pyx_n_s_cuMemPoolGetAccess, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__766)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemPoolGetAccess, __pyx_t_3) < 0) __PYX_ERR(0, 19597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19637
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolCreate(poolProps : CUmemPoolProps):             # <<<<<<<<<<<<<<
 *     """ Creates a memory pool.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_poolProps_2, __pyx_n_u_CUmemPoolProps) < 0) __PYX_ERR(0, 19637, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_309cuMemPoolCreate, 0, __pyx_n_s_cuMemPoolCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__767)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemPoolCreate, __pyx_t_1) < 0) __PYX_ERR(0, 19637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19673
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolDestroy(pool):             # <<<<<<<<<<<<<<
 *     """ Destroys the specified memory pool.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_311cuMemPoolDestroy, 0, __pyx_n_s_cuMemPoolDestroy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__768)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemPoolDestroy, __pyx_t_1) < 0) __PYX_ERR(0, 19673, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19717
 * 
 * @cython.embedsignature(True)
 * def cuMemAllocFromPoolAsync(size_t bytesize, pool, hStream):             # <<<<<<<<<<<<<<
 *     """ Allocates memory from a specified pool with stream ordered semantics.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_313cuMemAllocFromPoolAsync, 0, __pyx_n_s_cuMemAllocFromPoolAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__769)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemAllocFromPoolAsync, __pyx_t_1) < 0) __PYX_ERR(0, 19717, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19774
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolExportToShareableHandle(pool, handleType not None : CUmemAllocationHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Exports a memory pool to the requested handle type.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUmemAllocationHandleType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_handleType, __pyx_t_3) < 0) __PYX_ERR(0, 19774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_315cuMemPoolExportToShareableHandle, 0, __pyx_n_s_cuMemPoolExportToShareableHandle, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__770)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemPoolExportToShareableHandle, __pyx_t_3) < 0) __PYX_ERR(0, 19774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19827
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolImportFromShareableHandle(handle, handleType not None : CUmemAllocationHandleType, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ imports a memory pool from a shared handle.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUmemAllocationHandleType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_handleType, __pyx_t_1) < 0) __PYX_ERR(0, 19827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_317cuMemPoolImportFromShareableHandle, 0, __pyx_n_s_cuMemPoolImportFromShareableHand, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__771)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemPoolImportFromShareableHand, __pyx_t_1) < 0) __PYX_ERR(0, 19827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19865
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolExportPointer(ptr):             # <<<<<<<<<<<<<<
 *     """ Export data to share a memory pool allocation between processes.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_319cuMemPoolExportPointer, 0, __pyx_n_s_cuMemPoolExportPointer, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__772)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemPoolExportPointer, __pyx_t_1) < 0) __PYX_ERR(0, 19865, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":19904
 * 
 * @cython.embedsignature(True)
 * def cuMemPoolImportPointer(pool, shareData : CUmemPoolPtrExportData):             # <<<<<<<<<<<<<<
 *     """ Import a memory pool allocation from another process.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shareData, __pyx_n_u_CUmemPoolPtrExportData) < 0) __PYX_ERR(0, 19904, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_321cuMemPoolImportPointer, 0, __pyx_n_s_cuMemPoolImportPointer, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__773)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemPoolImportPointer, __pyx_t_3) < 0) __PYX_ERR(0, 19904, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":19953
 * 
 * @cython.embedsignature(True)
 * def cuPointerGetAttribute(attribute not None : CUpointer_attribute, ptr):             # <<<<<<<<<<<<<<
 *     """ Returns information about a pointer.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUpointer_attribute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute, __pyx_t_1) < 0) __PYX_ERR(0, 19953, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_323cuPointerGetAttribute, 0, __pyx_n_s_cuPointerGetAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__774)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuPointerGetAttribute, __pyx_t_1) < 0) __PYX_ERR(0, 19953, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":20156
 * 
 * @cython.embedsignature(True)
 * def cuMemPrefetchAsync(devPtr, size_t count, dstDevice, hStream):             # <<<<<<<<<<<<<<
 *     """ Prefetches memory to the specified destination device.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_325cuMemPrefetchAsync, 0, __pyx_n_s_cuMemPrefetchAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__775)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemPrefetchAsync, __pyx_t_1) < 0) __PYX_ERR(0, 20156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":20269
 * 
 * @cython.embedsignature(True)
 * def cuMemAdvise(devPtr, size_t count, advice not None : CUmem_advise, device):             # <<<<<<<<<<<<<<
 *     """ Advise about the usage of a given memory range.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUmem_advise); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_advice, __pyx_t_3) < 0) __PYX_ERR(0, 20269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_327cuMemAdvise, 0, __pyx_n_s_cuMemAdvise, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__776)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemAdvise, __pyx_t_3) < 0) __PYX_ERR(0, 20269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":20454
 * 
 * @cython.embedsignature(True)
 * def cuMemRangeGetAttribute(size_t dataSize, attribute not None : CUmem_range_attribute, devPtr, size_t count):             # <<<<<<<<<<<<<<
 *     """ Query an attribute of a given memory range.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUmem_range_attribute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute, __pyx_t_1) < 0) __PYX_ERR(0, 20454, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_329cuMemRangeGetAttribute, 0, __pyx_n_s_cuMemRangeGetAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__777)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemRangeGetAttribute, __pyx_t_1) < 0) __PYX_ERR(0, 20454, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":20551
 * 
 * @cython.embedsignature(True)
 * def cuMemRangeGetAttributes(dataSizes : List[int], attributes : List[CUmem_range_attribute], size_t numAttributes, devPtr, size_t count):             # <<<<<<<<<<<<<<
 *     """ Query attributes of a given memory range.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, ((PyObject *)(&PyInt_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dataSizes, __pyx_t_2) < 0) __PYX_ERR(0, 20551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUmem_range_attribute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_attributes, __pyx_t_4) < 0) __PYX_ERR(0, 20551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_331cuMemRangeGetAttributes, 0, __pyx_n_s_cuMemRangeGetAttributes, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__778)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuMemRangeGetAttributes, __pyx_t_4) < 0) __PYX_ERR(0, 20551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cuda/cuda.pyx":20628
 * 
 * @cython.embedsignature(True)
 * def cuPointerSetAttribute(value, attribute not None : CUpointer_attribute, ptr):             # <<<<<<<<<<<<<<
 *     """ Set attributes on a previously allocated memory region.
 * 
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUpointer_attribute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_attribute, __pyx_t_1) < 0) __PYX_ERR(0, 20628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_333cuPointerSetAttribute, 0, __pyx_n_s_cuPointerSetAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__781)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuPointerSetAttribute, __pyx_t_1) < 0) __PYX_ERR(0, 20628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":20682
 * 
 * @cython.embedsignature(True)
 * def cuPointerGetAttributes(unsigned int numAttributes, attributes : List[CUpointer_attribute], ptr):             # <<<<<<<<<<<<<<
 *     """ Returns information about a pointer.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_List); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUpointer_attribute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_attributes, __pyx_t_2) < 0) __PYX_ERR(0, 20682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_335cuPointerGetAttributes, 0, __pyx_n_s_cuPointerGetAttributes, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__782)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuPointerGetAttributes, __pyx_t_2) < 0) __PYX_ERR(0, 20682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":20771
 * 
 * @cython.embedsignature(True)
 * def cuStreamCreate(unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Create a stream.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_337cuStreamCreate, 0, __pyx_n_s_cuStreamCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__784)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamCreate, __pyx_t_2) < 0) __PYX_ERR(0, 20771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":20807
 * 
 * @cython.embedsignature(True)
 * def cuStreamCreateWithPriority(unsigned int flags, int priority):             # <<<<<<<<<<<<<<
 *     """ Create a stream with the given priority.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_339cuStreamCreateWithPriority, 0, __pyx_n_s_cuStreamCreateWithPriority, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__785)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamCreateWithPriority, __pyx_t_2) < 0) __PYX_ERR(0, 20807, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":20855
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetPriority(hStream):             # <<<<<<<<<<<<<<
 *     """ Query the priority of a given stream.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_341cuStreamGetPriority, 0, __pyx_n_s_cuStreamGetPriority, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__786)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamGetPriority, __pyx_t_2) < 0) __PYX_ERR(0, 20855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":20898
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetFlags(hStream):             # <<<<<<<<<<<<<<
 *     """ Query the flags of a given stream.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_343cuStreamGetFlags, 0, __pyx_n_s_cuStreamGetFlags, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__787)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamGetFlags, __pyx_t_2) < 0) __PYX_ERR(0, 20898, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":20938
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetCtx(hStream):             # <<<<<<<<<<<<<<
 *     """ Query the context associated with a stream.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_345cuStreamGetCtx, 0, __pyx_n_s_cuStreamGetCtx, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__788)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamGetCtx, __pyx_t_2) < 0) __PYX_ERR(0, 20938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":20994
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitEvent(hStream, hEvent, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Make a compute stream wait on an event.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_347cuStreamWaitEvent, 0, __pyx_n_s_cuStreamWaitEvent, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__789)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamWaitEvent, __pyx_t_2) < 0) __PYX_ERR(0, 20994, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":21053
 * 
 * @cython.embedsignature(True)
 * def cuStreamAddCallback(hStream, callback, userData, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Add a callback to a compute stream.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_349cuStreamAddCallback, 0, __pyx_n_s_cuStreamAddCallback, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__790)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamAddCallback, __pyx_t_2) < 0) __PYX_ERR(0, 21053, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":21147
 * 
 * @cython.embedsignature(True)
 * def cuStreamBeginCapture(hStream, mode not None : CUstreamCaptureMode):             # <<<<<<<<<<<<<<
 *     """ Begins graph capture on a stream.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUstreamCaptureMode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mode, __pyx_t_1) < 0) __PYX_ERR(0, 21147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_351cuStreamBeginCapture, 0, __pyx_n_s_cuStreamBeginCapture, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__791)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamBeginCapture, __pyx_t_1) < 0) __PYX_ERR(0, 21147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":21201
 * 
 * @cython.embedsignature(True)
 * def cuThreadExchangeStreamCaptureMode(mode not None : CUstreamCaptureMode):             # <<<<<<<<<<<<<<
 *     """ Swaps the stream capture interaction mode for a thread.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUstreamCaptureMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mode, __pyx_t_2) < 0) __PYX_ERR(0, 21201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_353cuThreadExchangeStreamCaptureMode, 0, __pyx_n_s_cuThreadExchangeStreamCaptureMod, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__792)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuThreadExchangeStreamCaptureMod, __pyx_t_2) < 0) __PYX_ERR(0, 21201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":21269
 * 
 * @cython.embedsignature(True)
 * def cuStreamEndCapture(hStream):             # <<<<<<<<<<<<<<
 *     """ Ends capture on a stream, returning the captured graph.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_355cuStreamEndCapture, 0, __pyx_n_s_cuStreamEndCapture, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__793)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamEndCapture, __pyx_t_2) < 0) __PYX_ERR(0, 21269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":21313
 * 
 * @cython.embedsignature(True)
 * def cuStreamIsCapturing(hStream):             # <<<<<<<<<<<<<<
 *     """ Returns a stream's capture status.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_357cuStreamIsCapturing, 0, __pyx_n_s_cuStreamIsCapturing, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__794)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamIsCapturing, __pyx_t_2) < 0) __PYX_ERR(0, 21313, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":21372
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetCaptureInfo(hStream):             # <<<<<<<<<<<<<<
 *     """ Query capture status of a stream.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_359cuStreamGetCaptureInfo, 0, __pyx_n_s_cuStreamGetCaptureInfo, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__795)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamGetCaptureInfo, __pyx_t_2) < 0) __PYX_ERR(0, 21372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":21426
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetCaptureInfo_v2(hStream):             # <<<<<<<<<<<<<<
 *     """ Query a stream's capture state (11.3+)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_361cuStreamGetCaptureInfo_v2, 0, __pyx_n_s_cuStreamGetCaptureInfo_v2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__796)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamGetCaptureInfo_v2, __pyx_t_2) < 0) __PYX_ERR(0, 21426, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":21512
 * 
 * @cython.embedsignature(True)
 * def cuStreamUpdateCaptureDependencies(hStream, dependencies : List[CUgraphNode], size_t numDependencies, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Update the set of dependencies in a capturing stream (11.3+)
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dependencies, __pyx_t_3) < 0) __PYX_ERR(0, 21512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_363cuStreamUpdateCaptureDependencies, 0, __pyx_n_s_cuStreamUpdateCaptureDependencie_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__797)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamUpdateCaptureDependencie_2, __pyx_t_3) < 0) __PYX_ERR(0, 21512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":21586
 * 
 * @cython.embedsignature(True)
 * def cuStreamAttachMemAsync(hStream, dptr, size_t length, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Attach memory to a stream asynchronously.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_365cuStreamAttachMemAsync, 0, __pyx_n_s_cuStreamAttachMemAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__799)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamAttachMemAsync, __pyx_t_3) < 0) __PYX_ERR(0, 21586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":21699
 * 
 * @cython.embedsignature(True)
 * def cuStreamQuery(hStream):             # <<<<<<<<<<<<<<
 *     """ Determine status of a compute stream.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_367cuStreamQuery, 0, __pyx_n_s_cuStreamQuery, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__800)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamQuery, __pyx_t_3) < 0) __PYX_ERR(0, 21699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":21738
 * 
 * @cython.embedsignature(True)
 * def cuStreamSynchronize(hStream):             # <<<<<<<<<<<<<<
 *     """ Wait until a stream's tasks are completed.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_369cuStreamSynchronize, 0, __pyx_n_s_cuStreamSynchronize, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__801)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamSynchronize, __pyx_t_3) < 0) __PYX_ERR(0, 21738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":21776
 * 
 * @cython.embedsignature(True)
 * def cuStreamDestroy(hStream):             # <<<<<<<<<<<<<<
 *     """ Destroys a stream.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_371cuStreamDestroy, 0, __pyx_n_s_cuStreamDestroy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__802)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamDestroy, __pyx_t_3) < 0) __PYX_ERR(0, 21776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":21815
 * 
 * @cython.embedsignature(True)
 * def cuStreamCopyAttributes(dst, src):             # <<<<<<<<<<<<<<
 *     """ Copies attributes from source stream to destination stream.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_373cuStreamCopyAttributes, 0, __pyx_n_s_cuStreamCopyAttributes, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__803)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamCopyAttributes, __pyx_t_3) < 0) __PYX_ERR(0, 21815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":21861
 * 
 * @cython.embedsignature(True)
 * def cuStreamGetAttribute(hStream, attr not None : CUstreamAttrID):             # <<<<<<<<<<<<<<
 *     """ Queries stream attribute.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUstreamAttrID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attr, __pyx_t_2) < 0) __PYX_ERR(0, 21861, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_375cuStreamGetAttribute, 0, __pyx_n_s_cuStreamGetAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__804)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamGetAttribute, __pyx_t_2) < 0) __PYX_ERR(0, 21861, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":21901
 * 
 * @cython.embedsignature(True)
 * def cuStreamSetAttribute(hStream, attr not None : CUstreamAttrID, value : CUstreamAttrValue):             # <<<<<<<<<<<<<<
 *     """ Sets stream attribute.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUstreamAttrID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_attr, __pyx_t_3) < 0) __PYX_ERR(0, 21901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_value, __pyx_n_u_CUstreamAttrValue) < 0) __PYX_ERR(0, 21901, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_377cuStreamSetAttribute, 0, __pyx_n_s_cuStreamSetAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__805)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamSetAttribute, __pyx_t_3) < 0) __PYX_ERR(0, 21901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":21942
 * 
 * @cython.embedsignature(True)
 * def cuEventCreate(unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Creates an event.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_379cuEventCreate, 0, __pyx_n_s_cuEventCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__806)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEventCreate, __pyx_t_3) < 0) __PYX_ERR(0, 21942, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":21987
 * 
 * @cython.embedsignature(True)
 * def cuEventRecord(hEvent, hStream):             # <<<<<<<<<<<<<<
 *     """ Records an event.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_381cuEventRecord, 0, __pyx_n_s_cuEventRecord, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__807)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEventRecord, __pyx_t_3) < 0) __PYX_ERR(0, 21987, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":22046
 * 
 * @cython.embedsignature(True)
 * def cuEventRecordWithFlags(hEvent, hStream, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Records an event.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_383cuEventRecordWithFlags, 0, __pyx_n_s_cuEventRecordWithFlags, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__808)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEventRecordWithFlags, __pyx_t_3) < 0) __PYX_ERR(0, 22046, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":22115
 * 
 * @cython.embedsignature(True)
 * def cuEventQuery(hEvent):             # <<<<<<<<<<<<<<
 *     """ Queries an event's status.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_385cuEventQuery, 0, __pyx_n_s_cuEventQuery, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__809)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEventQuery, __pyx_t_3) < 0) __PYX_ERR(0, 22115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":22158
 * 
 * @cython.embedsignature(True)
 * def cuEventSynchronize(hEvent):             # <<<<<<<<<<<<<<
 *     """ Waits for an event to complete.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_387cuEventSynchronize, 0, __pyx_n_s_cuEventSynchronize, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__810)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEventSynchronize, __pyx_t_3) < 0) __PYX_ERR(0, 22158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":22200
 * 
 * @cython.embedsignature(True)
 * def cuEventDestroy(hEvent):             # <<<<<<<<<<<<<<
 *     """ Destroys an event.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_389cuEventDestroy, 0, __pyx_n_s_cuEventDestroy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__811)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEventDestroy, __pyx_t_3) < 0) __PYX_ERR(0, 22200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":22239
 * 
 * @cython.embedsignature(True)
 * def cuEventElapsedTime(hStart, hEnd):             # <<<<<<<<<<<<<<
 *     """ Computes the elapsed time between two events.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_391cuEventElapsedTime, 0, __pyx_n_s_cuEventElapsedTime, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__812)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEventElapsedTime, __pyx_t_3) < 0) __PYX_ERR(0, 22239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":22306
 * 
 * @cython.embedsignature(True)
 * def cuImportExternalMemory(memHandleDesc : CUDA_EXTERNAL_MEMORY_HANDLE_DESC):             # <<<<<<<<<<<<<<
 *     """ Imports an external memory object.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_memHandleDesc, __pyx_n_u_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_3) < 0) __PYX_ERR(0, 22306, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_393cuImportExternalMemory, 0, __pyx_n_s_cuImportExternalMemory, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__813)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuImportExternalMemory, __pyx_t_2) < 0) __PYX_ERR(0, 22306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":22456
 * 
 * @cython.embedsignature(True)
 * def cuExternalMemoryGetMappedBuffer(extMem, bufferDesc : CUDA_EXTERNAL_MEMORY_BUFFER_DESC):             # <<<<<<<<<<<<<<
 *     """ Maps a buffer onto an imported memory object.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_bufferDesc, __pyx_n_u_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_3) < 0) __PYX_ERR(0, 22456, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_395cuExternalMemoryGetMappedBuffer, 0, __pyx_n_s_cuExternalMemoryGetMappedBuffer, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__814)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuExternalMemoryGetMappedBuffer, __pyx_t_3) < 0) __PYX_ERR(0, 22456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":22522
 * 
 * @cython.embedsignature(True)
 * def cuExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC):             # <<<<<<<<<<<<<<
 *     """ Maps a CUDA mipmapped array onto an external memory object.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_mipmapDesc, __pyx_n_u_CUDA_EXTERNAL_MEMORY_MIPMAPPED_A_3) < 0) __PYX_ERR(0, 22522, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_397cuExternalMemoryGetMappedMipmappedArray, 0, __pyx_n_s_cuExternalMemoryGetMappedMipmapp, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__815)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuExternalMemoryGetMappedMipmapp, __pyx_t_2) < 0) __PYX_ERR(0, 22522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":22595
 * 
 * @cython.embedsignature(True)
 * def cuDestroyExternalMemory(extMem):             # <<<<<<<<<<<<<<
 *     """ Destroys an external memory object.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_399cuDestroyExternalMemory, 0, __pyx_n_s_cuDestroyExternalMemory, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__816)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDestroyExternalMemory, __pyx_t_2) < 0) __PYX_ERR(0, 22595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":22631
 * 
 * @cython.embedsignature(True)
 * def cuImportExternalSemaphore(semHandleDesc : CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC):             # <<<<<<<<<<<<<<
 *     """ Imports an external semaphore.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_semHandleDesc, __pyx_n_u_CUDA_EXTERNAL_SEMAPHORE_HANDLE_D_3) < 0) __PYX_ERR(0, 22631, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_401cuImportExternalSemaphore, 0, __pyx_n_s_cuImportExternalSemaphore, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__817)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuImportExternalSemaphore, __pyx_t_3) < 0) __PYX_ERR(0, 22631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":22776
 * 
 * @cython.embedsignature(True)
 * def cuSignalExternalSemaphoresAsync(extSemArray : List[CUexternalSemaphore], paramsArray : List[CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS], unsigned int numExtSems, stream):             # <<<<<<<<<<<<<<
 *     """ Signals a set of external semaphore objects.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalSemaphore)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_extSemArray_2, __pyx_t_1) < 0) __PYX_ERR(0, 22776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_paramsArray_2, __pyx_t_2) < 0) __PYX_ERR(0, 22776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_403cuSignalExternalSemaphoresAsync, 0, __pyx_n_s_cuSignalExternalSemaphoresAsync_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__818)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuSignalExternalSemaphoresAsync_2, __pyx_t_2) < 0) __PYX_ERR(0, 22776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":22895
 * 
 * @cython.embedsignature(True)
 * def cuWaitExternalSemaphoresAsync(extSemArray : List[CUexternalSemaphore], paramsArray : List[CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS], unsigned int numExtSems, stream):             # <<<<<<<<<<<<<<
 *     """ Waits on a set of external semaphore objects.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUexternalSemaphore)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_extSemArray_2, __pyx_t_1) < 0) __PYX_ERR(0, 22895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_paramsArray_2, __pyx_t_3) < 0) __PYX_ERR(0, 22895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_405cuWaitExternalSemaphoresAsync, 0, __pyx_n_s_cuWaitExternalSemaphoresAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__821)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuWaitExternalSemaphoresAsync, __pyx_t_3) < 0) __PYX_ERR(0, 22895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":23023
 * 
 * @cython.embedsignature(True)
 * def cuDestroyExternalSemaphore(extSem):             # <<<<<<<<<<<<<<
 *     """ Destroys an external semaphore.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_407cuDestroyExternalSemaphore, 0, __pyx_n_s_cuDestroyExternalSemaphore, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__823)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDestroyExternalSemaphore, __pyx_t_3) < 0) __PYX_ERR(0, 23023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":23058
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue32(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_409cuStreamWaitValue32, 0, __pyx_n_s_cuStreamWaitValue32, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__824)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamWaitValue32, __pyx_t_3) < 0) __PYX_ERR(0, 23058, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":23137
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue64(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_411cuStreamWaitValue64, 0, __pyx_n_s_cuStreamWaitValue64, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__825)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamWaitValue64, __pyx_t_3) < 0) __PYX_ERR(0, 23137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":23211
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue32(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_413cuStreamWriteValue32, 0, __pyx_n_s_cuStreamWriteValue32, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__826)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamWriteValue32, __pyx_t_3) < 0) __PYX_ERR(0, 23211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":23282
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue64(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_415cuStreamWriteValue64, 0, __pyx_n_s_cuStreamWriteValue64, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__827)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamWriteValue64, __pyx_t_3) < 0) __PYX_ERR(0, 23282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":23352
 * 
 * @cython.embedsignature(True)
 * def cuStreamBatchMemOp(stream, unsigned int count, paramArray : List[CUstreamBatchMemOpParams], unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Batch operations to synchronize the stream via memory operations.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_paramArray_2, __pyx_t_1) < 0) __PYX_ERR(0, 23352, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_417cuStreamBatchMemOp, 0, __pyx_n_s_cuStreamBatchMemOp, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__828)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamBatchMemOp, __pyx_t_1) < 0) __PYX_ERR(0, 23352, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":23425
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue32_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_419cuStreamWaitValue32_v2, 0, __pyx_n_s_cuStreamWaitValue32_v2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__830)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamWaitValue32_v2, __pyx_t_1) < 0) __PYX_ERR(0, 23425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":23501
 * 
 * @cython.embedsignature(True)
 * def cuStreamWaitValue64_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Wait on a memory location.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_421cuStreamWaitValue64_v2, 0, __pyx_n_s_cuStreamWaitValue64_v2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__831)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamWaitValue64_v2, __pyx_t_1) < 0) __PYX_ERR(0, 23501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":23575
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue32_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_423cuStreamWriteValue32_v2, 0, __pyx_n_s_cuStreamWriteValue32_v2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__832)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamWriteValue32_v2, __pyx_t_1) < 0) __PYX_ERR(0, 23575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":23639
 * 
 * @cython.embedsignature(True)
 * def cuStreamWriteValue64_v2(stream, addr, value, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a value to memory.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_425cuStreamWriteValue64_v2, 0, __pyx_n_s_cuStreamWriteValue64_v2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__833)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamWriteValue64_v2, __pyx_t_1) < 0) __PYX_ERR(0, 23639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":23705
 * 
 * @cython.embedsignature(True)
 * def cuStreamBatchMemOp_v2(stream, unsigned int count, paramArray : List[CUstreamBatchMemOpParams], unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Batch operations to synchronize the stream via memory operations.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUstreamBatchMemOpParams)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_paramArray_2, __pyx_t_2) < 0) __PYX_ERR(0, 23705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_427cuStreamBatchMemOp_v2, 0, __pyx_n_s_cuStreamBatchMemOp_v2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__834)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuStreamBatchMemOp_v2, __pyx_t_2) < 0) __PYX_ERR(0, 23705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":23777
 * 
 * @cython.embedsignature(True)
 * def cuFuncGetAttribute(attrib not None : CUfunction_attribute, hfunc):             # <<<<<<<<<<<<<<
 *     """ Returns information about a function.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUfunction_attribute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_attrib, __pyx_t_1) < 0) __PYX_ERR(0, 23777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_429cuFuncGetAttribute, 0, __pyx_n_s_cuFuncGetAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__835)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuFuncGetAttribute, __pyx_t_1) < 0) __PYX_ERR(0, 23777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":23893
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetAttribute(hfunc, attrib not None : CUfunction_attribute, int value):             # <<<<<<<<<<<<<<
 *     """ Sets information about a function.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUfunction_attribute); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_attrib, __pyx_t_2) < 0) __PYX_ERR(0, 23893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_431cuFuncSetAttribute, 0, __pyx_n_s_cuFuncSetAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__836)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuFuncSetAttribute, __pyx_t_2) < 0) __PYX_ERR(0, 23893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":23981
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetCacheConfig(hfunc, config not None : CUfunc_cache):             # <<<<<<<<<<<<<<
 *     """ Sets the preferred cache configuration for a device function.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CUfunc_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_config, __pyx_t_1) < 0) __PYX_ERR(0, 23981, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_433cuFuncSetCacheConfig, 0, __pyx_n_s_cuFuncSetCacheConfig, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__837)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuFuncSetCacheConfig, __pyx_t_1) < 0) __PYX_ERR(0, 23981, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":24045
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetSharedMemConfig(hfunc, config not None : CUsharedconfig):             # <<<<<<<<<<<<<<
 *     """ Sets the shared memory configuration for a device function.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUsharedconfig); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_config, __pyx_t_2) < 0) __PYX_ERR(0, 24045, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_435cuFuncSetSharedMemConfig, 0, __pyx_n_s_cuFuncSetSharedMemConfig, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__838)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuFuncSetSharedMemConfig, __pyx_t_2) < 0) __PYX_ERR(0, 24045, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":24114
 * 
 * @cython.embedsignature(True)
 * def cuFuncGetModule(hfunc):             # <<<<<<<<<<<<<<
 *     """ Returns a module handle.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_437cuFuncGetModule, 0, __pyx_n_s_cuFuncGetModule, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__839)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuFuncGetModule, __pyx_t_2) < 0) __PYX_ERR(0, 24114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":24154
 * 
 * @cython.embedsignature(True)
 * def cuLaunchKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams, void_ptr extra):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_439cuLaunchKernel, 0, __pyx_n_s_cuLaunchKernel, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__840)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLaunchKernel, __pyx_t_2) < 0) __PYX_ERR(0, 24154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":24277
 * 
 * @cython.embedsignature(True)
 * def cuLaunchKernelEx(config : CUlaunchConfig, f, kernelParams, void_ptr extra):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function with launch-time configuration.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_config, __pyx_n_u_CUlaunchConfig) < 0) __PYX_ERR(0, 24277, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_441cuLaunchKernelEx, 0, __pyx_n_s_cuLaunchKernelEx, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__841)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLaunchKernelEx, __pyx_t_1) < 0) __PYX_ERR(0, 24277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":24434
 * 
 * @cython.embedsignature(True)
 * def cuLaunchCooperativeKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function where thread blocks can cooperate and synchronize as they execute.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_443cuLaunchCooperativeKernel, 0, __pyx_n_s_cuLaunchCooperativeKernel, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__842)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLaunchCooperativeKernel, __pyx_t_1) < 0) __PYX_ERR(0, 24434, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":24537
 * 
 * @cython.embedsignature(True)
 * def cuLaunchCooperativeKernelMultiDevice(launchParamsList : List[CUDA_LAUNCH_PARAMS], unsigned int numDevices, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Launches CUDA functions on multiple devices where thread blocks can cooperate and synchronize as they execute.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUDA_LAUNCH_PARAMS)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_launchParamsList, __pyx_t_3) < 0) __PYX_ERR(0, 24537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_445cuLaunchCooperativeKernelMultiDevice, 0, __pyx_n_s_cuLaunchCooperativeKernelMultiDe_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__843)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLaunchCooperativeKernelMultiDe_2, __pyx_t_3) < 0) __PYX_ERR(0, 24537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":24702
 * 
 * @cython.embedsignature(True)
 * def cuLaunchHostFunc(hStream, fn, userData):             # <<<<<<<<<<<<<<
 *     """ Enqueues a host function call in a stream.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_447cuLaunchHostFunc, 0, __pyx_n_s_cuLaunchHostFunc, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__845)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLaunchHostFunc, __pyx_t_3) < 0) __PYX_ERR(0, 24702, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":24788
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetBlockShape(hfunc, int x, int y, int z):             # <<<<<<<<<<<<<<
 *     """ Sets the block-dimensions for the function.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_449cuFuncSetBlockShape, 0, __pyx_n_s_cuFuncSetBlockShape, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__846)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuFuncSetBlockShape, __pyx_t_3) < 0) __PYX_ERR(0, 24788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":24830
 * 
 * @cython.embedsignature(True)
 * def cuFuncSetSharedSize(hfunc, unsigned int numbytes):             # <<<<<<<<<<<<<<
 *     """ Sets the dynamic shared-memory size for the function.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_451cuFuncSetSharedSize, 0, __pyx_n_s_cuFuncSetSharedSize, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__847)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuFuncSetSharedSize, __pyx_t_3) < 0) __PYX_ERR(0, 24830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":24869
 * 
 * @cython.embedsignature(True)
 * def cuParamSetSize(hfunc, unsigned int numbytes):             # <<<<<<<<<<<<<<
 *     """ Sets the parameter size for the function.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_453cuParamSetSize, 0, __pyx_n_s_cuParamSetSize, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__848)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuParamSetSize, __pyx_t_3) < 0) __PYX_ERR(0, 24869, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":24907
 * 
 * @cython.embedsignature(True)
 * def cuParamSeti(hfunc, int offset, unsigned int value):             # <<<<<<<<<<<<<<
 *     """ Adds an integer parameter to the function's argument list.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_455cuParamSeti, 0, __pyx_n_s_cuParamSeti, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__849)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuParamSeti, __pyx_t_3) < 0) __PYX_ERR(0, 24907, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":24948
 * 
 * @cython.embedsignature(True)
 * def cuParamSetf(hfunc, int offset, float value):             # <<<<<<<<<<<<<<
 *     """ Adds a floating-point parameter to the function's argument list.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_457cuParamSetf, 0, __pyx_n_s_cuParamSetf, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__850)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuParamSetf, __pyx_t_3) < 0) __PYX_ERR(0, 24948, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":24989
 * 
 * @cython.embedsignature(True)
 * def cuParamSetv(hfunc, int offset, ptr, unsigned int numbytes):             # <<<<<<<<<<<<<<
 *     """ Adds arbitrary data to the function's argument list.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_459cuParamSetv, 0, __pyx_n_s_cuParamSetv, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__851)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuParamSetv, __pyx_t_3) < 0) __PYX_ERR(0, 24989, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":25034
 * 
 * @cython.embedsignature(True)
 * def cuLaunch(f):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_461cuLaunch, 0, __pyx_n_s_cuLaunch, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__852)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLaunch, __pyx_t_3) < 0) __PYX_ERR(0, 25034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":25083
 * 
 * @cython.embedsignature(True)
 * def cuLaunchGrid(f, int grid_width, int grid_height):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_463cuLaunchGrid, 0, __pyx_n_s_cuLaunchGrid, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__853)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLaunchGrid, __pyx_t_3) < 0) __PYX_ERR(0, 25083, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":25136
 * 
 * @cython.embedsignature(True)
 * def cuLaunchGridAsync(f, int grid_width, int grid_height, hStream):             # <<<<<<<<<<<<<<
 *     """ Launches a CUDA function.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_465cuLaunchGridAsync, 0, __pyx_n_s_cuLaunchGridAsync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__854)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuLaunchGridAsync, __pyx_t_3) < 0) __PYX_ERR(0, 25136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":25207
 * 
 * @cython.embedsignature(True)
 * def cuParamSetTexRef(hfunc, int texunit, hTexRef):             # <<<<<<<<<<<<<<
 *     """ Adds a texture-reference to the function's argument list.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_467cuParamSetTexRef, 0, __pyx_n_s_cuParamSetTexRef, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__855)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuParamSetTexRef, __pyx_t_3) < 0) __PYX_ERR(0, 25207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":25256
 * 
 * @cython.embedsignature(True)
 * def cuGraphCreate(unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Creates a graph.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_469cuGraphCreate, 0, __pyx_n_s_cuGraphCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__856)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphCreate, __pyx_t_3) < 0) __PYX_ERR(0, 25256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":25282
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddKernelNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a kernel execution node and adds it to a graph.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dependencies, __pyx_t_2) < 0) __PYX_ERR(0, 25282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_KERNEL_NODE_PARAMS) < 0) __PYX_ERR(0, 25282, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_471cuGraphAddKernelNode, 0, __pyx_n_s_cuGraphAddKernelNode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__857)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddKernelNode, __pyx_t_2) < 0) __PYX_ERR(0, 25282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":25402
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a kernel node's parameters.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_473cuGraphKernelNodeGetParams, 0, __pyx_n_s_cuGraphKernelNodeGetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__858)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphKernelNodeGetParams, __pyx_t_2) < 0) __PYX_ERR(0, 25402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":25447
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeSetParams(hNode, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a kernel node's parameters.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_KERNEL_NODE_PARAMS) < 0) __PYX_ERR(0, 25447, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_475cuGraphKernelNodeSetParams, 0, __pyx_n_s_cuGraphKernelNodeSetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__859)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphKernelNodeSetParams, __pyx_t_3) < 0) __PYX_ERR(0, 25447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":25483
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemcpyNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, copyParams : CUDA_MEMCPY3D, ctx):             # <<<<<<<<<<<<<<
 *     """ Creates a memcpy node and adds it to a graph.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dependencies, __pyx_t_1) < 0) __PYX_ERR(0, 25483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_copyParams, __pyx_n_u_CUDA_MEMCPY3D) < 0) __PYX_ERR(0, 25483, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_477cuGraphAddMemcpyNode, 0, __pyx_n_s_cuGraphAddMemcpyNode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__860)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddMemcpyNode, __pyx_t_1) < 0) __PYX_ERR(0, 25483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":25572
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemcpyNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memcpy node's parameters.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_479cuGraphMemcpyNodeGetParams, 0, __pyx_n_s_cuGraphMemcpyNodeGetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__861)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphMemcpyNodeGetParams, __pyx_t_1) < 0) __PYX_ERR(0, 25572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":25608
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemcpyNodeSetParams(hNode, nodeParams : CUDA_MEMCPY3D):             # <<<<<<<<<<<<<<
 *     """ Sets a memcpy node's parameters.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_MEMCPY3D) < 0) __PYX_ERR(0, 25608, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_481cuGraphMemcpyNodeSetParams, 0, __pyx_n_s_cuGraphMemcpyNodeSetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__862)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphMemcpyNodeSetParams, __pyx_t_3) < 0) __PYX_ERR(0, 25608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":25644
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemsetNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, memsetParams : CUDA_MEMSET_NODE_PARAMS, ctx):             # <<<<<<<<<<<<<<
 *     """ Creates a memset node and adds it to a graph.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dependencies, __pyx_t_2) < 0) __PYX_ERR(0, 25644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_memsetParams, __pyx_n_u_CUDA_MEMSET_NODE_PARAMS) < 0) __PYX_ERR(0, 25644, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_483cuGraphAddMemsetNode, 0, __pyx_n_s_cuGraphAddMemsetNode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__863)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddMemsetNode, __pyx_t_2) < 0) __PYX_ERR(0, 25644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":25723
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemsetNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memset node's parameters.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_485cuGraphMemsetNodeGetParams, 0, __pyx_n_s_cuGraphMemsetNodeGetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__864)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphMemsetNodeGetParams, __pyx_t_2) < 0) __PYX_ERR(0, 25723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":25759
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemsetNodeSetParams(hNode, nodeParams : CUDA_MEMSET_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a memset node's parameters.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_MEMSET_NODE_PARAMS) < 0) __PYX_ERR(0, 25759, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_487cuGraphMemsetNodeSetParams, 0, __pyx_n_s_cuGraphMemsetNodeSetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__865)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphMemsetNodeSetParams, __pyx_t_3) < 0) __PYX_ERR(0, 25759, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":25795
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddHostNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a host execution node and adds it to a graph.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dependencies, __pyx_t_1) < 0) __PYX_ERR(0, 25795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_HOST_NODE_PARAMS) < 0) __PYX_ERR(0, 25795, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_489cuGraphAddHostNode, 0, __pyx_n_s_cuGraphAddHostNode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__866)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddHostNode, __pyx_t_1) < 0) __PYX_ERR(0, 25795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":25862
 * 
 * @cython.embedsignature(True)
 * def cuGraphHostNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a host node's parameters.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_491cuGraphHostNodeGetParams, 0, __pyx_n_s_cuGraphHostNodeGetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__867)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphHostNodeGetParams, __pyx_t_1) < 0) __PYX_ERR(0, 25862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":25898
 * 
 * @cython.embedsignature(True)
 * def cuGraphHostNodeSetParams(hNode, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a host node's parameters.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_HOST_NODE_PARAMS) < 0) __PYX_ERR(0, 25898, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_493cuGraphHostNodeSetParams, 0, __pyx_n_s_cuGraphHostNodeSetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__868)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphHostNodeSetParams, __pyx_t_3) < 0) __PYX_ERR(0, 25898, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":25934
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddChildGraphNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, childGraph):             # <<<<<<<<<<<<<<
 *     """ Creates a child graph node and adds it to a graph.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dependencies, __pyx_t_2) < 0) __PYX_ERR(0, 25934, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_495cuGraphAddChildGraphNode, 0, __pyx_n_s_cuGraphAddChildGraphNode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__869)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddChildGraphNode, __pyx_t_2) < 0) __PYX_ERR(0, 25934, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":26013
 * 
 * @cython.embedsignature(True)
 * def cuGraphChildGraphNodeGetGraph(hNode):             # <<<<<<<<<<<<<<
 *     """ Gets a handle to the embedded graph of a child graph node.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_497cuGraphChildGraphNodeGetGraph, 0, __pyx_n_s_cuGraphChildGraphNodeGetGraph, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__870)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphChildGraphNodeGetGraph, __pyx_t_2) < 0) __PYX_ERR(0, 26013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":26054
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEmptyNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Creates an empty node and adds it to a graph.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dependencies, __pyx_t_1) < 0) __PYX_ERR(0, 26054, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_499cuGraphAddEmptyNode, 0, __pyx_n_s_cuGraphAddEmptyNode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__871)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddEmptyNode, __pyx_t_1) < 0) __PYX_ERR(0, 26054, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26121
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEventRecordNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, event):             # <<<<<<<<<<<<<<
 *     """ Creates an event record node and adds it to a graph.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dependencies, __pyx_t_3) < 0) __PYX_ERR(0, 26121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_501cuGraphAddEventRecordNode, 0, __pyx_n_s_cuGraphAddEventRecordNode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__872)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddEventRecordNode, __pyx_t_3) < 0) __PYX_ERR(0, 26121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":26197
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventRecordNodeGetEvent(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns the event associated with an event record node.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_503cuGraphEventRecordNodeGetEvent, 0, __pyx_n_s_cuGraphEventRecordNodeGetEvent, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__873)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphEventRecordNodeGetEvent, __pyx_t_3) < 0) __PYX_ERR(0, 26197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":26233
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventRecordNodeSetEvent(hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets an event record node's event.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_505cuGraphEventRecordNodeSetEvent, 0, __pyx_n_s_cuGraphEventRecordNodeSetEvent, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__874)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphEventRecordNodeSetEvent, __pyx_t_3) < 0) __PYX_ERR(0, 26233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":26278
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddEventWaitNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, event):             # <<<<<<<<<<<<<<
 *     """ Creates an event wait node and adds it to a graph.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dependencies, __pyx_t_2) < 0) __PYX_ERR(0, 26278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_507cuGraphAddEventWaitNode, 0, __pyx_n_s_cuGraphAddEventWaitNode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__875)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddEventWaitNode, __pyx_t_2) < 0) __PYX_ERR(0, 26278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":26356
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventWaitNodeGetEvent(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns the event associated with an event wait node.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_509cuGraphEventWaitNodeGetEvent, 0, __pyx_n_s_cuGraphEventWaitNodeGetEvent, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__876)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphEventWaitNodeGetEvent, __pyx_t_2) < 0) __PYX_ERR(0, 26356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":26392
 * 
 * @cython.embedsignature(True)
 * def cuGraphEventWaitNodeSetEvent(hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets an event wait node's event.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_511cuGraphEventWaitNodeSetEvent, 0, __pyx_n_s_cuGraphEventWaitNodeSetEvent, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__877)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphEventWaitNodeSetEvent, __pyx_t_2) < 0) __PYX_ERR(0, 26392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":26437
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an external semaphore signal node and adds it to a graph.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dependencies, __pyx_t_1) < 0) __PYX_ERR(0, 26437, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3) < 0) __PYX_ERR(0, 26437, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_513cuGraphAddExternalSemaphoresSignalNode, 0, __pyx_n_s_cuGraphAddExternalSemaphoresSign_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__878)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddExternalSemaphoresSign_2, __pyx_t_1) < 0) __PYX_ERR(0, 26437, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26505
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresSignalNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns an external semaphore signal node's parameters.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_515cuGraphExternalSemaphoresSignalNodeGetParams, 0, __pyx_n_s_cuGraphExternalSemaphoresSignalN, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__879)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExternalSemaphoresSignalN, __pyx_t_1) < 0) __PYX_ERR(0, 26505, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26547
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets an external semaphore signal node's parameters.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3) < 0) __PYX_ERR(0, 26547, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_517cuGraphExternalSemaphoresSignalNodeSetParams, 0, __pyx_n_s_cuGraphExternalSemaphoresSignalN_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__880)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExternalSemaphoresSignalN_2, __pyx_t_2) < 0) __PYX_ERR(0, 26547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":26584
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an external semaphore wait node and adds it to a graph.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dependencies, __pyx_t_3) < 0) __PYX_ERR(0, 26584, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_EXT_SEM_WAIT_NODE_PARAMS) < 0) __PYX_ERR(0, 26584, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_519cuGraphAddExternalSemaphoresWaitNode, 0, __pyx_n_s_cuGraphAddExternalSemaphoresWait_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__881)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddExternalSemaphoresWait_2, __pyx_t_3) < 0) __PYX_ERR(0, 26584, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":26652
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresWaitNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns an external semaphore wait node's parameters.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_521cuGraphExternalSemaphoresWaitNodeGetParams, 0, __pyx_n_s_cuGraphExternalSemaphoresWaitNod, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__882)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExternalSemaphoresWaitNod, __pyx_t_3) < 0) __PYX_ERR(0, 26652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":26694
 * 
 * @cython.embedsignature(True)
 * def cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets an external semaphore wait node's parameters.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_EXT_SEM_WAIT_NODE_PARAMS) < 0) __PYX_ERR(0, 26694, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_523cuGraphExternalSemaphoresWaitNodeSetParams, 0, __pyx_n_s_cuGraphExternalSemaphoresWaitNod_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__883)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExternalSemaphoresWaitNod_2, __pyx_t_2) < 0) __PYX_ERR(0, 26694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":26731
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddBatchMemOpNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates a batch memory operation node and adds it to a graph.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dependencies, __pyx_t_1) < 0) __PYX_ERR(0, 26731, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_BATCH_MEM_OP_NODE_PARAMS) < 0) __PYX_ERR(0, 26731, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_525cuGraphAddBatchMemOpNode, 0, __pyx_n_s_cuGraphAddBatchMemOpNode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__884)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddBatchMemOpNode, __pyx_t_1) < 0) __PYX_ERR(0, 26731, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26802
 * 
 * @cython.embedsignature(True)
 * def cuGraphBatchMemOpNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a batch mem op node's parameters.
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_527cuGraphBatchMemOpNodeGetParams, 0, __pyx_n_s_cuGraphBatchMemOpNodeGetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__885)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphBatchMemOpNodeGetParams, __pyx_t_1) < 0) __PYX_ERR(0, 26802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26843
 * 
 * @cython.embedsignature(True)
 * def cuGraphBatchMemOpNodeSetParams(hNode, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets a batch mem op node's parameters.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_BATCH_MEM_OP_NODE_PARAMS) < 0) __PYX_ERR(0, 26843, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_529cuGraphBatchMemOpNodeSetParams, 0, __pyx_n_s_cuGraphBatchMemOpNodeSetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__886)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphBatchMemOpNodeSetParams, __pyx_t_2) < 0) __PYX_ERR(0, 26843, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":26882
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_BATCH_MEM_OP_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a batch mem op node in the given graphExec.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_BATCH_MEM_OP_NODE_PARAMS) < 0) __PYX_ERR(0, 26882, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_531cuGraphExecBatchMemOpNodeSetParams, 0, __pyx_n_s_cuGraphExecBatchMemOpNodeSetPara, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__887)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExecBatchMemOpNodeSetPara, __pyx_t_1) < 0) __PYX_ERR(0, 26882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/cuda.pyx":26953
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemAllocNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, nodeParams : CUDA_MEM_ALLOC_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Creates an allocation node and adds it to a graph.
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dependencies, __pyx_t_3) < 0) __PYX_ERR(0, 26953, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_MEM_ALLOC_NODE_PARAMS) < 0) __PYX_ERR(0, 26953, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_533cuGraphAddMemAllocNode, 0, __pyx_n_s_cuGraphAddMemAllocNode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__888)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddMemAllocNode, __pyx_t_3) < 0) __PYX_ERR(0, 26953, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":27060
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemAllocNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memory alloc node's parameters.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_535cuGraphMemAllocNodeGetParams, 0, __pyx_n_s_cuGraphMemAllocNodeGetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__889)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphMemAllocNodeGetParams, __pyx_t_3) < 0) __PYX_ERR(0, 27060, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":27099
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddMemFreeNode(hGraph, dependencies : List[CUgraphNode], size_t numDependencies, dptr):             # <<<<<<<<<<<<<<
 *     """ Creates a memory free node and adds it to a graph.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dependencies, __pyx_t_2) < 0) __PYX_ERR(0, 27099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_537cuGraphAddMemFreeNode, 0, __pyx_n_s_cuGraphAddMemFreeNode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__890)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddMemFreeNode, __pyx_t_2) < 0) __PYX_ERR(0, 27099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27192
 * 
 * @cython.embedsignature(True)
 * def cuGraphMemFreeNodeGetParams(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a memory free node's parameters.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_539cuGraphMemFreeNodeGetParams, 0, __pyx_n_s_cuGraphMemFreeNodeGetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__891)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphMemFreeNodeGetParams, __pyx_t_2) < 0) __PYX_ERR(0, 27192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27228
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGraphMemTrim(device):             # <<<<<<<<<<<<<<
 *     """ Free unused memory that was cached on the specified device for use with graphs back to the OS.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_541cuDeviceGraphMemTrim, 0, __pyx_n_s_cuDeviceGraphMemTrim, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__892)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGraphMemTrim, __pyx_t_2) < 0) __PYX_ERR(0, 27228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27263
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetGraphMemAttribute(device, attr not None : CUgraphMem_attribute):             # <<<<<<<<<<<<<<
 *     """ Query asynchronous allocation attributes related to graphs.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUgraphMem_attribute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_attr, __pyx_t_3) < 0) __PYX_ERR(0, 27263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_543cuDeviceGetGraphMemAttribute, 0, __pyx_n_s_cuDeviceGetGraphMemAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__893)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetGraphMemAttribute, __pyx_t_3) < 0) __PYX_ERR(0, 27263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":27318
 * 
 * @cython.embedsignature(True)
 * def cuDeviceSetGraphMemAttribute(device, attr not None : CUgraphMem_attribute, value):             # <<<<<<<<<<<<<<
 *     """ Set asynchronous allocation attributes related to graphs.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUgraphMem_attribute); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attr, __pyx_t_2) < 0) __PYX_ERR(0, 27318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_545cuDeviceSetGraphMemAttribute, 0, __pyx_n_s_cuDeviceSetGraphMemAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__894)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceSetGraphMemAttribute, __pyx_t_2) < 0) __PYX_ERR(0, 27318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27366
 * 
 * @cython.embedsignature(True)
 * def cuGraphClone(originalGraph):             # <<<<<<<<<<<<<<
 *     """ Clones a graph.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_547cuGraphClone, 0, __pyx_n_s_cuGraphClone, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__895)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphClone, __pyx_t_2) < 0) __PYX_ERR(0, 27366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27408
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeFindInClone(hOriginalNode, hClonedGraph):             # <<<<<<<<<<<<<<
 *     """ Finds a cloned version of a node.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_549cuGraphNodeFindInClone, 0, __pyx_n_s_cuGraphNodeFindInClone, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__896)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphNodeFindInClone, __pyx_t_2) < 0) __PYX_ERR(0, 27408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27463
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetType(hNode):             # <<<<<<<<<<<<<<
 *     """ Returns a node's type.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_551cuGraphNodeGetType, 0, __pyx_n_s_cuGraphNodeGetType, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__897)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphNodeGetType, __pyx_t_2) < 0) __PYX_ERR(0, 27463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27499
 * 
 * @cython.embedsignature(True)
 * def cuGraphGetNodes(hGraph, size_t numNodes = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a graph's nodes.
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(((size_t)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_553cuGraphGetNodes, 0, __pyx_n_s_cuGraphGetNodes, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__898)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphGetNodes, __pyx_t_2) < 0) __PYX_ERR(0, 27499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27554
 * 
 * @cython.embedsignature(True)
 * def cuGraphGetRootNodes(hGraph, size_t numRootNodes = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a graph's root nodes.
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(((size_t)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_555cuGraphGetRootNodes, 0, __pyx_n_s_cuGraphGetRootNodes, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__899)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphGetRootNodes, __pyx_t_2) < 0) __PYX_ERR(0, 27554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27609
 * 
 * @cython.embedsignature(True)
 * def cuGraphGetEdges(hGraph, size_t numEdges = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a graph's dependency edges.
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(((size_t)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_557cuGraphGetEdges, 0, __pyx_n_s_cuGraphGetEdges, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__900)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphGetEdges, __pyx_t_2) < 0) __PYX_ERR(0, 27609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27678
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetDependencies(hNode, size_t numDependencies = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a node's dependencies.
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(((size_t)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_559cuGraphNodeGetDependencies, 0, __pyx_n_s_cuGraphNodeGetDependencies, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__901)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphNodeGetDependencies, __pyx_t_2) < 0) __PYX_ERR(0, 27678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27734
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetDependentNodes(hNode, size_t numDependentNodes = 0):             # <<<<<<<<<<<<<<
 *     """ Returns a node's dependent nodes.
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(((size_t)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_561cuGraphNodeGetDependentNodes, 0, __pyx_n_s_cuGraphNodeGetDependentNodes, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__902)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphNodeGetDependentNodes, __pyx_t_2) < 0) __PYX_ERR(0, 27734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27790
 * 
 * @cython.embedsignature(True)
 * def cuGraphAddDependencies(hGraph, from_ : List[CUgraphNode], to : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Adds dependency edges to a graph.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_from, __pyx_t_1) < 0) __PYX_ERR(0, 27790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_to, __pyx_t_3) < 0) __PYX_ERR(0, 27790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_563cuGraphAddDependencies, 0, __pyx_n_s_cuGraphAddDependencies, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__903)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphAddDependencies, __pyx_t_3) < 0) __PYX_ERR(0, 27790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":27864
 * 
 * @cython.embedsignature(True)
 * def cuGraphRemoveDependencies(hGraph, from_ : List[CUgraphNode], to : List[CUgraphNode], size_t numDependencies):             # <<<<<<<<<<<<<<
 *     """ Removes dependency edges from a graph.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_from, __pyx_t_1) < 0) __PYX_ERR(0, 27864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, ((PyObject *)__pyx_ptype_4cuda_4cuda_CUgraphNode)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_to, __pyx_t_2) < 0) __PYX_ERR(0, 27864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_565cuGraphRemoveDependencies, 0, __pyx_n_s_cuGraphRemoveDependencies, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__906)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphRemoveDependencies, __pyx_t_2) < 0) __PYX_ERR(0, 27864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27942
 * 
 * @cython.embedsignature(True)
 * def cuGraphDestroyNode(hNode):             # <<<<<<<<<<<<<<
 *     """ Remove a node from the graph.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_567cuGraphDestroyNode, 0, __pyx_n_s_cuGraphDestroyNode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__907)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphDestroyNode, __pyx_t_2) < 0) __PYX_ERR(0, 27942, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":27979
 * 
 * @cython.embedsignature(True)
 * def cuGraphInstantiate(hGraph, char* logBuffer, size_t bufferSize):             # <<<<<<<<<<<<<<
 *     """ Creates an executable graph from a graph.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_569cuGraphInstantiate, 0, __pyx_n_s_cuGraphInstantiate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__908)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphInstantiate, __pyx_t_2) < 0) __PYX_ERR(0, 27979, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28032
 * 
 * @cython.embedsignature(True)
 * def cuGraphInstantiateWithFlags(hGraph, unsigned long long flags):             # <<<<<<<<<<<<<<
 *     """ Creates an executable graph from a graph.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_571cuGraphInstantiateWithFlags, 0, __pyx_n_s_cuGraphInstantiateWithFlags, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__909)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphInstantiateWithFlags, __pyx_t_2) < 0) __PYX_ERR(0, 28032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28094
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_KERNEL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a kernel node in the given graphExec.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_KERNEL_NODE_PARAMS) < 0) __PYX_ERR(0, 28094, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_573cuGraphExecKernelNodeSetParams, 0, __pyx_n_s_cuGraphExecKernelNodeSetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__910)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExecKernelNodeSetParams, __pyx_t_3) < 0) __PYX_ERR(0, 28094, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":28158
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams : CUDA_MEMCPY3D, ctx):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a memcpy node in the given graphExec.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_copyParams, __pyx_n_u_CUDA_MEMCPY3D) < 0) __PYX_ERR(0, 28158, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_575cuGraphExecMemcpyNodeSetParams, 0, __pyx_n_s_cuGraphExecMemcpyNodeSetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__911)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExecMemcpyNodeSetParams, __pyx_t_2) < 0) __PYX_ERR(0, 28158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28235
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams : CUDA_MEMSET_NODE_PARAMS, ctx):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a memset node in the given graphExec.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_memsetParams, __pyx_n_u_CUDA_MEMSET_NODE_PARAMS) < 0) __PYX_ERR(0, 28235, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_577cuGraphExecMemsetNodeSetParams, 0, __pyx_n_s_cuGraphExecMemsetNodeSetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__912)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExecMemsetNodeSetParams, __pyx_t_3) < 0) __PYX_ERR(0, 28235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":28312
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_HOST_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for a host node in the given graphExec.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_HOST_NODE_PARAMS) < 0) __PYX_ERR(0, 28312, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_579cuGraphExecHostNodeSetParams, 0, __pyx_n_s_cuGraphExecHostNodeSetParams, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__913)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExecHostNodeSetParams, __pyx_t_2) < 0) __PYX_ERR(0, 28312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28367
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph):             # <<<<<<<<<<<<<<
 *     """ Updates node parameters in the child graph node in the given graphExec.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_581cuGraphExecChildGraphNodeSetParams, 0, __pyx_n_s_cuGraphExecChildGraphNodeSetPara, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__914)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExecChildGraphNodeSetPara, __pyx_t_2) < 0) __PYX_ERR(0, 28367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28439
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets the event for an event record node in the given graphExec.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_583cuGraphExecEventRecordNodeSetEvent, 0, __pyx_n_s_cuGraphExecEventRecordNodeSetEve, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__915)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExecEventRecordNodeSetEve, __pyx_t_2) < 0) __PYX_ERR(0, 28439, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28504
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event):             # <<<<<<<<<<<<<<
 *     """ Sets the event for an event wait node in the given graphExec.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_585cuGraphExecEventWaitNodeSetEvent, 0, __pyx_n_s_cuGraphExecEventWaitNodeSetEvent, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__916)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExecEventWaitNodeSetEvent, __pyx_t_2) < 0) __PYX_ERR(0, 28504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28569
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for an external semaphore signal node in the given graphExec.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_3) < 0) __PYX_ERR(0, 28569, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_587cuGraphExecExternalSemaphoresSignalNodeSetParams, 0, __pyx_n_s_cuGraphExecExternalSemaphoresSig, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__917)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExecExternalSemaphoresSig, __pyx_t_3) < 0) __PYX_ERR(0, 28569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":28629
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams : CUDA_EXT_SEM_WAIT_NODE_PARAMS):             # <<<<<<<<<<<<<<
 *     """ Sets the parameters for an external semaphore wait node in the given graphExec.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nodeParams, __pyx_n_u_CUDA_EXT_SEM_WAIT_NODE_PARAMS) < 0) __PYX_ERR(0, 28629, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_589cuGraphExecExternalSemaphoresWaitNodeSetParams, 0, __pyx_n_s_cuGraphExecExternalSemaphoresWai, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__918)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExecExternalSemaphoresWai, __pyx_t_2) < 0) __PYX_ERR(0, 28629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28689
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled):             # <<<<<<<<<<<<<<
 *     """ Enables or disables the specified node in the given graphExec.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_591cuGraphNodeSetEnabled, 0, __pyx_n_s_cuGraphNodeSetEnabled, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__919)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphNodeSetEnabled, __pyx_t_2) < 0) __PYX_ERR(0, 28689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28752
 * 
 * @cython.embedsignature(True)
 * def cuGraphNodeGetEnabled(hGraphExec, hNode):             # <<<<<<<<<<<<<<
 *     """ Query whether a node in the given graphExec is enabled.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_593cuGraphNodeGetEnabled, 0, __pyx_n_s_cuGraphNodeGetEnabled, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__920)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphNodeGetEnabled, __pyx_t_2) < 0) __PYX_ERR(0, 28752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28809
 * 
 * @cython.embedsignature(True)
 * def cuGraphUpload(hGraphExec, hStream):             # <<<<<<<<<<<<<<
 *     """ Uploads an executable graph in a stream.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_595cuGraphUpload, 0, __pyx_n_s_cuGraphUpload, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__921)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphUpload, __pyx_t_2) < 0) __PYX_ERR(0, 28809, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28858
 * 
 * @cython.embedsignature(True)
 * def cuGraphLaunch(hGraphExec, hStream):             # <<<<<<<<<<<<<<
 *     """ Launches an executable graph in a stream.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_597cuGraphLaunch, 0, __pyx_n_s_cuGraphLaunch, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__922)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphLaunch, __pyx_t_2) < 0) __PYX_ERR(0, 28858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28912
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecDestroy(hGraphExec):             # <<<<<<<<<<<<<<
 *     """ Destroys an executable graph.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_599cuGraphExecDestroy, 0, __pyx_n_s_cuGraphExecDestroy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__923)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExecDestroy, __pyx_t_2) < 0) __PYX_ERR(0, 28912, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28947
 * 
 * @cython.embedsignature(True)
 * def cuGraphDestroy(hGraph):             # <<<<<<<<<<<<<<
 *     """ Destroys a graph.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_601cuGraphDestroy, 0, __pyx_n_s_cuGraphDestroy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__924)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphDestroy, __pyx_t_2) < 0) __PYX_ERR(0, 28947, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":28980
 * 
 * @cython.embedsignature(True)
 * def cuGraphExecUpdate(hGraphExec, hGraph):             # <<<<<<<<<<<<<<
 *     """ Check whether an executable graph can be updated with a graph and perform the update if possible.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_603cuGraphExecUpdate, 0, __pyx_n_s_cuGraphExecUpdate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__925)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphExecUpdate, __pyx_t_2) < 0) __PYX_ERR(0, 28980, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29130
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeCopyAttributes(dst, src):             # <<<<<<<<<<<<<<
 *     """ Copies attributes from source node to destination node.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_605cuGraphKernelNodeCopyAttributes, 0, __pyx_n_s_cuGraphKernelNodeCopyAttributes, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__926)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphKernelNodeCopyAttributes, __pyx_t_2) < 0) __PYX_ERR(0, 29130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29177
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeGetAttribute(hNode, attr not None : CUkernelNodeAttrID):             # <<<<<<<<<<<<<<
 *     """ Queries node attribute.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUkernelNodeAttrID); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_attr, __pyx_t_3) < 0) __PYX_ERR(0, 29177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_607cuGraphKernelNodeGetAttribute, 0, __pyx_n_s_cuGraphKernelNodeGetAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__927)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphKernelNodeGetAttribute, __pyx_t_3) < 0) __PYX_ERR(0, 29177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":29217
 * 
 * @cython.embedsignature(True)
 * def cuGraphKernelNodeSetAttribute(hNode, attr not None : CUkernelNodeAttrID, value : CUkernelNodeAttrValue):             # <<<<<<<<<<<<<<
 *     """ Sets node attribute.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUkernelNodeAttrID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attr, __pyx_t_2) < 0) __PYX_ERR(0, 29217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_value, __pyx_n_u_CUkernelNodeAttrValue) < 0) __PYX_ERR(0, 29217, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_609cuGraphKernelNodeSetAttribute, 0, __pyx_n_s_cuGraphKernelNodeSetAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__928)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphKernelNodeSetAttribute, __pyx_t_2) < 0) __PYX_ERR(0, 29217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29257
 * 
 * @cython.embedsignature(True)
 * def cuGraphDebugDotPrint(hGraph, char* path, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Write a DOT file describing graph structure.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_611cuGraphDebugDotPrint, 0, __pyx_n_s_cuGraphDebugDotPrint, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__929)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphDebugDotPrint, __pyx_t_2) < 0) __PYX_ERR(0, 29257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29295
 * 
 * @cython.embedsignature(True)
 * def cuUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Create a user object.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_613cuUserObjectCreate, 0, __pyx_n_s_cuUserObjectCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__930)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuUserObjectCreate, __pyx_t_2) < 0) __PYX_ERR(0, 29295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29353
 * 
 * @cython.embedsignature(True)
 * def cuUserObjectRetain(object, unsigned int count):             # <<<<<<<<<<<<<<
 *     """ Retain a reference to a user object.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_615cuUserObjectRetain, 0, __pyx_n_s_cuUserObjectRetain, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__931)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuUserObjectRetain, __pyx_t_2) < 0) __PYX_ERR(0, 29353, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29393
 * 
 * @cython.embedsignature(True)
 * def cuUserObjectRelease(object, unsigned int count):             # <<<<<<<<<<<<<<
 *     """ Release a reference to a user object.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_617cuUserObjectRelease, 0, __pyx_n_s_cuUserObjectRelease, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__932)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuUserObjectRelease, __pyx_t_2) < 0) __PYX_ERR(0, 29393, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29436
 * 
 * @cython.embedsignature(True)
 * def cuGraphRetainUserObject(graph, object, unsigned int count, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Retain a reference to a user object from a graph.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_619cuGraphRetainUserObject, 0, __pyx_n_s_cuGraphRetainUserObject, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__933)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphRetainUserObject, __pyx_t_2) < 0) __PYX_ERR(0, 29436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29492
 * 
 * @cython.embedsignature(True)
 * def cuGraphReleaseUserObject(graph, object, unsigned int count):             # <<<<<<<<<<<<<<
 *     """ Release a user object reference from a graph.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_621cuGraphReleaseUserObject, 0, __pyx_n_s_cuGraphReleaseUserObject, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__934)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphReleaseUserObject, __pyx_t_2) < 0) __PYX_ERR(0, 29492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29543
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dynamicSMemSize):             # <<<<<<<<<<<<<<
 *     """ Returns occupancy of a function.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_623cuOccupancyMaxActiveBlocksPerMultiprocessor, 0, __pyx_n_s_cuOccupancyMaxActiveBlocksPerMul, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__935)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuOccupancyMaxActiveBlocksPerMul, __pyx_t_2) < 0) __PYX_ERR(0, 29543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29584
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, size_t dynamicSMemSize, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Returns occupancy of a function.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_625cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 0, __pyx_n_s_cuOccupancyMaxActiveBlocksPerMul_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__936)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuOccupancyMaxActiveBlocksPerMul_2, __pyx_t_2) < 0) __PYX_ERR(0, 29584, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29643
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxPotentialBlockSize(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit):             # <<<<<<<<<<<<<<
 *     """ Suggest a launch configuration with reasonable occupancy.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_627cuOccupancyMaxPotentialBlockSize, 0, __pyx_n_s_cuOccupancyMaxPotentialBlockSize, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__937)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuOccupancyMaxPotentialBlockSize, __pyx_t_2) < 0) __PYX_ERR(0, 29643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29722
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxPotentialBlockSizeWithFlags(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Suggest a launch configuration with reasonable occupancy.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_629cuOccupancyMaxPotentialBlockSizeWithFlags, 0, __pyx_n_s_cuOccupancyMaxPotentialBlockSize_2, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__938)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuOccupancyMaxPotentialBlockSize_2, __pyx_t_2) < 0) __PYX_ERR(0, 29722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29800
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize):             # <<<<<<<<<<<<<<
 *     """ Returns dynamic shared memory available per block when launching `numBlocks` blocks on SM.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_631cuOccupancyAvailableDynamicSMemPerBlock, 0, __pyx_n_s_cuOccupancyAvailableDynamicSMemP, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__939)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuOccupancyAvailableDynamicSMemP, __pyx_t_2) < 0) __PYX_ERR(0, 29800, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29837
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxPotentialClusterSize(func, config : CUlaunchConfig):             # <<<<<<<<<<<<<<
 *     """ Given the kernel function (`func`) and launch configuration (`config`), return the maximum cluster size in `*clusterSize`.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_config, __pyx_n_u_CUlaunchConfig) < 0) __PYX_ERR(0, 29837, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_633cuOccupancyMaxPotentialClusterSize, 0, __pyx_n_s_cuOccupancyMaxPotentialClusterSi, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__940)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuOccupancyMaxPotentialClusterSi, __pyx_t_3) < 0) __PYX_ERR(0, 29837, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":29886
 * 
 * @cython.embedsignature(True)
 * def cuOccupancyMaxActiveClusters(func, config : CUlaunchConfig):             # <<<<<<<<<<<<<<
 *     """ Given the kernel function (`func`) and launch configuration (`config`), return the maximum number of clusters that could co-exist on the target device in `*numClusters`.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_config, __pyx_n_u_CUlaunchConfig) < 0) __PYX_ERR(0, 29886, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_635cuOccupancyMaxActiveClusters, 0, __pyx_n_s_cuOccupancyMaxActiveClusters, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__941)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuOccupancyMaxActiveClusters, __pyx_t_2) < 0) __PYX_ERR(0, 29886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29935
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetArray(hTexRef, hArray, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Binds an array as a texture reference.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_637cuTexRefSetArray, 0, __pyx_n_s_cuTexRefSetArray, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__942)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetArray, __pyx_t_2) < 0) __PYX_ERR(0, 29935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":29988
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Binds a mipmapped array to a texture reference.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_639cuTexRefSetMipmappedArray, 0, __pyx_n_s_cuTexRefSetMipmappedArray, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__943)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetMipmappedArray, __pyx_t_2) < 0) __PYX_ERR(0, 29988, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":30041
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetAddress(hTexRef, dptr, size_t numbytes):             # <<<<<<<<<<<<<<
 *     """ Binds an address as a texture reference.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_641cuTexRefSetAddress, 0, __pyx_n_s_cuTexRefSetAddress, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__944)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetAddress, __pyx_t_2) < 0) __PYX_ERR(0, 30041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":30114
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetAddress2D(hTexRef, desc : CUDA_ARRAY_DESCRIPTOR, dptr, size_t Pitch):             # <<<<<<<<<<<<<<
 *     """ Binds an address as a 2D texture reference.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_desc, __pyx_n_u_CUDA_ARRAY_DESCRIPTOR) < 0) __PYX_ERR(0, 30114, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_643cuTexRefSetAddress2D, 0, __pyx_n_s_cuTexRefSetAddress2D, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__945)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetAddress2D, __pyx_t_3) < 0) __PYX_ERR(0, 30114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30195
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetFormat(hTexRef, fmt not None : CUarray_format, int NumPackedComponents):             # <<<<<<<<<<<<<<
 *     """ Sets the format for a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUarray_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fmt, __pyx_t_2) < 0) __PYX_ERR(0, 30195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_645cuTexRefSetFormat, 0, __pyx_n_s_cuTexRefSetFormat, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__946)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetFormat, __pyx_t_2) < 0) __PYX_ERR(0, 30195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":30239
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetAddressMode(hTexRef, int dim, am not None : CUaddress_mode):             # <<<<<<<<<<<<<<
 *     """ Sets the addressing mode for a texture reference.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUaddress_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_am, __pyx_t_3) < 0) __PYX_ERR(0, 30239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_647cuTexRefSetAddressMode, 0, __pyx_n_s_cuTexRefSetAddressMode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__947)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetAddressMode, __pyx_t_3) < 0) __PYX_ERR(0, 30239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30290
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetFilterMode(hTexRef, fm not None : CUfilter_mode):             # <<<<<<<<<<<<<<
 *     """ Sets the filtering mode for a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUfilter_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fm, __pyx_t_2) < 0) __PYX_ERR(0, 30290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_649cuTexRefSetFilterMode, 0, __pyx_n_s_cuTexRefSetFilterMode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__948)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetFilterMode, __pyx_t_2) < 0) __PYX_ERR(0, 30290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":30335
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmapFilterMode(hTexRef, fm not None : CUfilter_mode):             # <<<<<<<<<<<<<<
 *     """ Sets the mipmap filtering mode for a texture reference.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUfilter_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fm, __pyx_t_3) < 0) __PYX_ERR(0, 30335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_651cuTexRefSetMipmapFilterMode, 0, __pyx_n_s_cuTexRefSetMipmapFilterMode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__949)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetMipmapFilterMode, __pyx_t_3) < 0) __PYX_ERR(0, 30335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30380
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmapLevelBias(hTexRef, float bias):             # <<<<<<<<<<<<<<
 *     """ Sets the mipmap level bias for a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_653cuTexRefSetMipmapLevelBias, 0, __pyx_n_s_cuTexRefSetMipmapLevelBias, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__950)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetMipmapLevelBias, __pyx_t_3) < 0) __PYX_ERR(0, 30380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30422
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMipmapLevelClamp(hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp):             # <<<<<<<<<<<<<<
 *     """ Sets the mipmap min/max mipmap level clamps for a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_655cuTexRefSetMipmapLevelClamp, 0, __pyx_n_s_cuTexRefSetMipmapLevelClamp, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__951)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetMipmapLevelClamp, __pyx_t_3) < 0) __PYX_ERR(0, 30422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30466
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetMaxAnisotropy(hTexRef, unsigned int maxAniso):             # <<<<<<<<<<<<<<
 *     """ Sets the maximum anisotropy for a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_657cuTexRefSetMaxAnisotropy, 0, __pyx_n_s_cuTexRefSetMaxAnisotropy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__952)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetMaxAnisotropy, __pyx_t_3) < 0) __PYX_ERR(0, 30466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30507
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetBorderColor(hTexRef, float pBorderColor):             # <<<<<<<<<<<<<<
 *     """ Sets the border color for a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_659cuTexRefSetBorderColor, 0, __pyx_n_s_cuTexRefSetBorderColor, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__953)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetBorderColor, __pyx_t_3) < 0) __PYX_ERR(0, 30507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30553
 * 
 * @cython.embedsignature(True)
 * def cuTexRefSetFlags(hTexRef, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Sets the flags for a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_661cuTexRefSetFlags, 0, __pyx_n_s_cuTexRefSetFlags, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__954)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefSetFlags, __pyx_t_3) < 0) __PYX_ERR(0, 30553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30609
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetAddress(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the address associated with a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_663cuTexRefGetAddress, 0, __pyx_n_s_cuTexRefGetAddress, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__955)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefGetAddress, __pyx_t_3) < 0) __PYX_ERR(0, 30609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30649
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetArray(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the array bound to a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_665cuTexRefGetArray, 0, __pyx_n_s_cuTexRefGetArray, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__956)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefGetArray, __pyx_t_3) < 0) __PYX_ERR(0, 30649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30689
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmappedArray(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the mipmapped array bound to a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_667cuTexRefGetMipmappedArray, 0, __pyx_n_s_cuTexRefGetMipmappedArray, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__957)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefGetMipmappedArray, __pyx_t_3) < 0) __PYX_ERR(0, 30689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30730
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetAddressMode(hTexRef, int dim):             # <<<<<<<<<<<<<<
 *     """ Gets the addressing mode used by a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_669cuTexRefGetAddressMode, 0, __pyx_n_s_cuTexRefGetAddressMode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__958)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefGetAddressMode, __pyx_t_3) < 0) __PYX_ERR(0, 30730, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30772
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetFilterMode(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the filter-mode used by a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_671cuTexRefGetFilterMode, 0, __pyx_n_s_cuTexRefGetFilterMode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__959)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefGetFilterMode, __pyx_t_3) < 0) __PYX_ERR(0, 30772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30811
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetFormat(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the format used by a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_673cuTexRefGetFormat, 0, __pyx_n_s_cuTexRefGetFormat, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__960)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefGetFormat, __pyx_t_3) < 0) __PYX_ERR(0, 30811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30854
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmapFilterMode(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the mipmap filtering mode for a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_675cuTexRefGetMipmapFilterMode, 0, __pyx_n_s_cuTexRefGetMipmapFilterMode, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__961)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefGetMipmapFilterMode, __pyx_t_3) < 0) __PYX_ERR(0, 30854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30893
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmapLevelBias(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the mipmap level bias for a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_677cuTexRefGetMipmapLevelBias, 0, __pyx_n_s_cuTexRefGetMipmapLevelBias, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__962)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefGetMipmapLevelBias, __pyx_t_3) < 0) __PYX_ERR(0, 30893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30933
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMipmapLevelClamp(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the min/max mipmap level clamps for a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_679cuTexRefGetMipmapLevelClamp, 0, __pyx_n_s_cuTexRefGetMipmapLevelClamp, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__963)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefGetMipmapLevelClamp, __pyx_t_3) < 0) __PYX_ERR(0, 30933, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":30976
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetMaxAnisotropy(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the maximum anisotropy for a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_681cuTexRefGetMaxAnisotropy, 0, __pyx_n_s_cuTexRefGetMaxAnisotropy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__964)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefGetMaxAnisotropy, __pyx_t_3) < 0) __PYX_ERR(0, 30976, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31015
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetBorderColor(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the border color used by a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_683cuTexRefGetBorderColor, 0, __pyx_n_s_cuTexRefGetBorderColor, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__965)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefGetBorderColor, __pyx_t_3) < 0) __PYX_ERR(0, 31015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31057
 * 
 * @cython.embedsignature(True)
 * def cuTexRefGetFlags(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Gets the flags used by a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_685cuTexRefGetFlags, 0, __pyx_n_s_cuTexRefGetFlags, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__966)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefGetFlags, __pyx_t_3) < 0) __PYX_ERR(0, 31057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31095
 * 
 * @cython.embedsignature(True)
 * def cuTexRefCreate():             # <<<<<<<<<<<<<<
 *     """ Creates a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_687cuTexRefCreate, 0, __pyx_n_s_cuTexRefCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__967)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefCreate, __pyx_t_3) < 0) __PYX_ERR(0, 31095, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31123
 * 
 * @cython.embedsignature(True)
 * def cuTexRefDestroy(hTexRef):             # <<<<<<<<<<<<<<
 *     """ Destroys a texture reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_689cuTexRefDestroy, 0, __pyx_n_s_cuTexRefDestroy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__968)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexRefDestroy, __pyx_t_3) < 0) __PYX_ERR(0, 31123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31158
 * 
 * @cython.embedsignature(True)
 * def cuSurfRefSetArray(hSurfRef, hArray, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Sets the CUDA array for a surface reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_691cuSurfRefSetArray, 0, __pyx_n_s_cuSurfRefSetArray, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__969)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuSurfRefSetArray, __pyx_t_3) < 0) __PYX_ERR(0, 31158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31212
 * 
 * @cython.embedsignature(True)
 * def cuSurfRefGetArray(hSurfRef):             # <<<<<<<<<<<<<<
 *     """ Passes back the CUDA array bound to a surface reference.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_693cuSurfRefGetArray, 0, __pyx_n_s_cuSurfRefGetArray, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__970)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuSurfRefGetArray, __pyx_t_3) < 0) __PYX_ERR(0, 31212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31252
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectCreate(pResDesc : CUDA_RESOURCE_DESC, pTexDesc : CUDA_TEXTURE_DESC, pResViewDesc : CUDA_RESOURCE_VIEW_DESC):             # <<<<<<<<<<<<<<
 *     """ Creates a texture object.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pResDesc, __pyx_n_u_CUDA_RESOURCE_DESC) < 0) __PYX_ERR(0, 31252, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pTexDesc, __pyx_n_u_CUDA_TEXTURE_DESC) < 0) __PYX_ERR(0, 31252, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pResViewDesc, __pyx_n_u_CUDA_RESOURCE_VIEW_DESC) < 0) __PYX_ERR(0, 31252, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_695cuTexObjectCreate, 0, __pyx_n_s_cuTexObjectCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__971)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexObjectCreate, __pyx_t_2) < 0) __PYX_ERR(0, 31252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":31485
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectDestroy(texObject):             # <<<<<<<<<<<<<<
 *     """ Destroys a texture object.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_697cuTexObjectDestroy, 0, __pyx_n_s_cuTexObjectDestroy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__972)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexObjectDestroy, __pyx_t_2) < 0) __PYX_ERR(0, 31485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":31518
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectGetResourceDesc(texObject):             # <<<<<<<<<<<<<<
 *     """ Returns a texture object's resource descriptor.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_699cuTexObjectGetResourceDesc, 0, __pyx_n_s_cuTexObjectGetResourceDesc, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__973)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexObjectGetResourceDesc, __pyx_t_2) < 0) __PYX_ERR(0, 31518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":31555
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectGetTextureDesc(texObject):             # <<<<<<<<<<<<<<
 *     """ Returns a texture object's texture descriptor.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_701cuTexObjectGetTextureDesc, 0, __pyx_n_s_cuTexObjectGetTextureDesc, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__974)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexObjectGetTextureDesc, __pyx_t_2) < 0) __PYX_ERR(0, 31555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":31592
 * 
 * @cython.embedsignature(True)
 * def cuTexObjectGetResourceViewDesc(texObject):             # <<<<<<<<<<<<<<
 *     """ Returns a texture object's resource view descriptor.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_703cuTexObjectGetResourceViewDesc, 0, __pyx_n_s_cuTexObjectGetResourceViewDesc, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__975)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuTexObjectGetResourceViewDesc, __pyx_t_2) < 0) __PYX_ERR(0, 31592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":31630
 * 
 * @cython.embedsignature(True)
 * def cuSurfObjectCreate(pResDesc : CUDA_RESOURCE_DESC):             # <<<<<<<<<<<<<<
 *     """ Creates a surface object.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pResDesc, __pyx_n_u_CUDA_RESOURCE_DESC) < 0) __PYX_ERR(0, 31630, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_705cuSurfObjectCreate, 0, __pyx_n_s_cuSurfObjectCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__976)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuSurfObjectCreate, __pyx_t_3) < 0) __PYX_ERR(0, 31630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31667
 * 
 * @cython.embedsignature(True)
 * def cuSurfObjectDestroy(surfObject):             # <<<<<<<<<<<<<<
 *     """ Destroys a surface object.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_707cuSurfObjectDestroy, 0, __pyx_n_s_cuSurfObjectDestroy, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__977)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuSurfObjectDestroy, __pyx_t_3) < 0) __PYX_ERR(0, 31667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31700
 * 
 * @cython.embedsignature(True)
 * def cuSurfObjectGetResourceDesc(surfObject):             # <<<<<<<<<<<<<<
 *     """ Returns a surface object's resource descriptor.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_709cuSurfObjectGetResourceDesc, 0, __pyx_n_s_cuSurfObjectGetResourceDesc, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__978)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuSurfObjectGetResourceDesc, __pyx_t_3) < 0) __PYX_ERR(0, 31700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31737
 * 
 * @cython.embedsignature(True)
 * def cuDeviceCanAccessPeer(dev, peerDev):             # <<<<<<<<<<<<<<
 *     """ Queries if a device may directly access a peer device's memory.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_711cuDeviceCanAccessPeer, 0, __pyx_n_s_cuDeviceCanAccessPeer, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__979)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceCanAccessPeer, __pyx_t_3) < 0) __PYX_ERR(0, 31737, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31791
 * 
 * @cython.embedsignature(True)
 * def cuCtxEnablePeerAccess(peerContext, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Enables direct access to memory allocations in a peer context.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_713cuCtxEnablePeerAccess, 0, __pyx_n_s_cuCtxEnablePeerAccess, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__980)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxEnablePeerAccess, __pyx_t_3) < 0) __PYX_ERR(0, 31791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31859
 * 
 * @cython.embedsignature(True)
 * def cuCtxDisablePeerAccess(peerContext):             # <<<<<<<<<<<<<<
 *     """ Disables direct access to memory allocations in a peer context and unregisters any registered allocations.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_715cuCtxDisablePeerAccess, 0, __pyx_n_s_cuCtxDisablePeerAccess, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__981)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuCtxDisablePeerAccess, __pyx_t_3) < 0) __PYX_ERR(0, 31859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":31897
 * 
 * @cython.embedsignature(True)
 * def cuDeviceGetP2PAttribute(attrib not None : CUdevice_P2PAttribute, srcDevice, dstDevice):             # <<<<<<<<<<<<<<
 *     """ Queries attributes of the link between two devices.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUdevice_P2PAttribute); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attrib, __pyx_t_2) < 0) __PYX_ERR(0, 31897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_717cuDeviceGetP2PAttribute, 0, __pyx_n_s_cuDeviceGetP2PAttribute, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__982)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuDeviceGetP2PAttribute, __pyx_t_2) < 0) __PYX_ERR(0, 31897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":31969
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsUnregisterResource(resource):             # <<<<<<<<<<<<<<
 *     """ Unregisters a graphics resource for access by CUDA.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_719cuGraphicsUnregisterResource, 0, __pyx_n_s_cuGraphicsUnregisterResource, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__983)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsUnregisterResource, __pyx_t_2) < 0) __PYX_ERR(0, 31969, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32006
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsigned int mipLevel):             # <<<<<<<<<<<<<<
 *     """ Get an array through which to access a subresource of a mapped graphics resource.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_721cuGraphicsSubResourceGetMappedArray, 0, __pyx_n_s_cuGraphicsSubResourceGetMappedAr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__984)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsSubResourceGetMappedAr, __pyx_t_2) < 0) __PYX_ERR(0, 32006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32060
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceGetMappedMipmappedArray(resource):             # <<<<<<<<<<<<<<
 *     """ Get a mipmapped array through which to access a mapped graphics resource.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_723cuGraphicsResourceGetMappedMipmappedArray, 0, __pyx_n_s_cuGraphicsResourceGetMappedMipma, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__985)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsResourceGetMappedMipma, __pyx_t_2) < 0) __PYX_ERR(0, 32060, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32103
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceGetMappedPointer(resource):             # <<<<<<<<<<<<<<
 *     """ Get a device pointer through which to access a mapped graphics resource.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_725cuGraphicsResourceGetMappedPointer, 0, __pyx_n_s_cuGraphicsResourceGetMappedPoint, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__986)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsResourceGetMappedPoint, __pyx_t_2) < 0) __PYX_ERR(0, 32103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32146
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceSetMapFlags(resource, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Set usage flags for mapping a graphics resource.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_727cuGraphicsResourceSetMapFlags, 0, __pyx_n_s_cuGraphicsResourceSetMapFlags, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__987)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsResourceSetMapFlags, __pyx_t_2) < 0) __PYX_ERR(0, 32146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32203
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsMapResources(unsigned int count, resources, hStream):             # <<<<<<<<<<<<<<
 *     """ Map graphics resources for access by CUDA.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_729cuGraphicsMapResources, 0, __pyx_n_s_cuGraphicsMapResources, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__988)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsMapResources, __pyx_t_2) < 0) __PYX_ERR(0, 32203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32265
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsUnmapResources(unsigned int count, resources, hStream):             # <<<<<<<<<<<<<<
 *     """ Unmap graphics resources.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_731cuGraphicsUnmapResources, 0, __pyx_n_s_cuGraphicsUnmapResources, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__989)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsUnmapResources, __pyx_t_2) < 0) __PYX_ERR(0, 32265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32325
 * 
 * @cython.embedsignature(True)
 * def cuGetProcAddress(char* symbol, int cudaVersion, flags):             # <<<<<<<<<<<<<<
 *     """ Returns the requested driver API function pointer.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_733cuGetProcAddress, 0, __pyx_n_s_cuGetProcAddress, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__990)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGetProcAddress, __pyx_t_2) < 0) __PYX_ERR(0, 32325, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32407
 * 
 * @cython.embedsignature(True)
 * def cuGetExportTable(pExportTableId : CUuuid):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pExportTableId, __pyx_n_u_CUuuid) < 0) __PYX_ERR(0, 32407, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_735cuGetExportTable, 0, __pyx_n_s_cuGetExportTable, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__991)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGetExportTable, __pyx_t_3) < 0) __PYX_ERR(0, 32407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":32428
 * 
 * @cython.embedsignature(True)
 * def cuProfilerInitialize(char* configFile, char* outputFile, outputMode not None : CUoutput_mode):             # <<<<<<<<<<<<<<
 *     """ Initialize the profiling.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CUoutput_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_outputMode, __pyx_t_2) < 0) __PYX_ERR(0, 32428, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_737cuProfilerInitialize, 0, __pyx_n_s_cuProfilerInitialize, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__992)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuProfilerInitialize, __pyx_t_2) < 0) __PYX_ERR(0, 32428, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32478
 * 
 * @cython.embedsignature(True)
 * def cuProfilerStart():             # <<<<<<<<<<<<<<
 *     """ Enable profiling.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_739cuProfilerStart, 0, __pyx_n_s_cuProfilerStart, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__993)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuProfilerStart, __pyx_t_2) < 0) __PYX_ERR(0, 32478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32502
 * 
 * @cython.embedsignature(True)
 * def cuProfilerStop():             # <<<<<<<<<<<<<<
 *     """ Disable profiling.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_741cuProfilerStop, 0, __pyx_n_s_cuProfilerStop, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__994)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuProfilerStop, __pyx_t_2) < 0) __PYX_ERR(0, 32502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32526
 * 
 * @cython.embedsignature(True)
 * def cuVDPAUGetDevice(vdpDevice, vdpGetProcAddress):             # <<<<<<<<<<<<<<
 *     """ Gets the CUDA device associated with a VDPAU device.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_743cuVDPAUGetDevice, 0, __pyx_n_s_cuVDPAUGetDevice, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__995)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuVDPAUGetDevice, __pyx_t_2) < 0) __PYX_ERR(0, 32526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32576
 * 
 * @cython.embedsignature(True)
 * def cuVDPAUCtxCreate(unsigned int flags, device, vdpDevice, vdpGetProcAddress):             # <<<<<<<<<<<<<<
 *     """ Create a CUDA context for interoperability with VDPAU.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_745cuVDPAUCtxCreate, 0, __pyx_n_s_cuVDPAUCtxCreate, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__996)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuVDPAUCtxCreate, __pyx_t_2) < 0) __PYX_ERR(0, 32576, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32643
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Registers a VDPAU VdpVideoSurface object.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_747cuGraphicsVDPAURegisterVideoSurface, 0, __pyx_n_s_cuGraphicsVDPAURegisterVideoSurf, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__997)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsVDPAURegisterVideoSurf, __pyx_t_2) < 0) __PYX_ERR(0, 32643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32702
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Registers a VDPAU VdpOutputSurface object.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_749cuGraphicsVDPAURegisterOutputSurface, 0, __pyx_n_s_cuGraphicsVDPAURegisterOutputSur, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__998)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsVDPAURegisterOutputSur, __pyx_t_2) < 0) __PYX_ERR(0, 32702, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32761
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsEGLRegisterImage(image, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Registers an EGL image.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_751cuGraphicsEGLRegisterImage, 0, __pyx_n_s_cuGraphicsEGLRegisterImage, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__999)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsEGLRegisterImage, __pyx_t_2) < 0) __PYX_ERR(0, 32761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32833
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerConnect(stream):             # <<<<<<<<<<<<<<
 *     """ Connect CUDA to EGLStream as a consumer.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_753cuEGLStreamConsumerConnect, 0, __pyx_n_s_cuEGLStreamConsumerConnect, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1000)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEGLStreamConsumerConnect, __pyx_t_2) < 0) __PYX_ERR(0, 32833, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32872
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerConnectWithFlags(stream, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Connect CUDA to EGLStream as a consumer with given flags.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_755cuEGLStreamConsumerConnectWithFlags, 0, __pyx_n_s_cuEGLStreamConsumerConnectWithFl, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1001)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEGLStreamConsumerConnectWithFl, __pyx_t_2) < 0) __PYX_ERR(0, 32872, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32915
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerDisconnect(conn):             # <<<<<<<<<<<<<<
 *     """ Disconnect CUDA as a consumer to EGLStream .
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_757cuEGLStreamConsumerDisconnect, 0, __pyx_n_s_cuEGLStreamConsumerDisconnect, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1002)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEGLStreamConsumerDisconnect, __pyx_t_2) < 0) __PYX_ERR(0, 32915, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":32949
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int timeout):             # <<<<<<<<<<<<<<
 *     """ Acquire an image frame from the EGLStream with CUDA as a consumer.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_759cuEGLStreamConsumerAcquireFrame, 0, __pyx_n_s_cuEGLStreamConsumerAcquireFrame, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1003)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEGLStreamConsumerAcquireFrame, __pyx_t_2) < 0) __PYX_ERR(0, 32949, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":33020
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream):             # <<<<<<<<<<<<<<
 *     """ Releases the last frame acquired from the EGLStream.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_761cuEGLStreamConsumerReleaseFrame, 0, __pyx_n_s_cuEGLStreamConsumerReleaseFrame, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1004)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEGLStreamConsumerReleaseFrame, __pyx_t_2) < 0) __PYX_ERR(0, 33020, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":33083
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerConnect(stream, width, height):             # <<<<<<<<<<<<<<
 *     """ Connect CUDA to EGLStream as a producer.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_763cuEGLStreamProducerConnect, 0, __pyx_n_s_cuEGLStreamProducerConnect, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1005)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEGLStreamProducerConnect, __pyx_t_2) < 0) __PYX_ERR(0, 33083, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":33146
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerDisconnect(conn):             # <<<<<<<<<<<<<<
 *     """ Disconnect CUDA as a producer to EGLStream .
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_765cuEGLStreamProducerDisconnect, 0, __pyx_n_s_cuEGLStreamProducerDisconnect, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1006)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEGLStreamProducerDisconnect, __pyx_t_2) < 0) __PYX_ERR(0, 33146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":33180
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerPresentFrame(conn, eglframe not None : CUeglFrame, pStream):             # <<<<<<<<<<<<<<
 *     """ Present a CUDA eglFrame to the EGLStream with CUDA as a producer.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_eglframe, __pyx_n_u_CUeglFrame) < 0) __PYX_ERR(0, 33180, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_767cuEGLStreamProducerPresentFrame, 0, __pyx_n_s_cuEGLStreamProducerPresentFrame, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1007)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEGLStreamProducerPresentFrame, __pyx_t_3) < 0) __PYX_ERR(0, 33180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":33248
 * 
 * @cython.embedsignature(True)
 * def cuEGLStreamProducerReturnFrame(conn, eglframe : CUeglFrame, pStream):             # <<<<<<<<<<<<<<
 *     """ Return the CUDA eglFrame to the EGLStream released by the consumer.
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_eglframe, __pyx_n_u_CUeglFrame) < 0) __PYX_ERR(0, 33248, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_769cuEGLStreamProducerReturnFrame, 0, __pyx_n_s_cuEGLStreamProducerReturnFrame, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1008)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEGLStreamProducerReturnFrame, __pyx_t_2) < 0) __PYX_ERR(0, 33248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":33301
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned int mipLevel):             # <<<<<<<<<<<<<<
 *     """ Get an eglFrame through which to access a registered EGL graphics resource.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_771cuGraphicsResourceGetMappedEglFrame, 0, __pyx_n_s_cuGraphicsResourceGetMappedEglFr, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1009)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsResourceGetMappedEglFr, __pyx_t_2) < 0) __PYX_ERR(0, 33301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":33346
 * 
 * @cython.embedsignature(True)
 * def cuEventCreateFromEGLSync(eglSync, unsigned int flags):             # <<<<<<<<<<<<<<
 *     """ Creates an event from EGLSync object.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_773cuEventCreateFromEGLSync, 0, __pyx_n_s_cuEventCreateFromEGLSync, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1010)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuEventCreateFromEGLSync, __pyx_t_2) < 0) __PYX_ERR(0, 33346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":33401
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsGLRegisterBuffer(buffer, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Registers an OpenGL buffer object.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_775cuGraphicsGLRegisterBuffer, 0, __pyx_n_s_cuGraphicsGLRegisterBuffer, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1011)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsGLRegisterBuffer, __pyx_t_2) < 0) __PYX_ERR(0, 33401, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":33454
 * 
 * @cython.embedsignature(True)
 * def cuGraphicsGLRegisterImage(image, target, unsigned int Flags):             # <<<<<<<<<<<<<<
 *     """ Register an OpenGL texture or renderbuffer object.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_777cuGraphicsGLRegisterImage, 0, __pyx_n_s_cuGraphicsGLRegisterImage, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1012)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGraphicsGLRegisterImage, __pyx_t_2) < 0) __PYX_ERR(0, 33454, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/cuda.pyx":33552
 * 
 * @cython.embedsignature(True)
 * def cuGLGetDevices(unsigned int cudaDeviceCount, deviceList not None : CUGLDeviceList):             # <<<<<<<<<<<<<<
 *     """ Gets the CUDA devices associated with the current OpenGL context.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_CUGLDeviceList); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_deviceList, __pyx_t_3) < 0) __PYX_ERR(0, 33552, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_779cuGLGetDevices, 0, __pyx_n_s_cuGLGetDevices, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1013)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cuGLGetDevices, __pyx_t_3) < 0) __PYX_ERR(0, 33552, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":33615
 * 
 * @cython.embedsignature(True)
 * def sizeof(objType):             # <<<<<<<<<<<<<<
 *     """ Returns the size of provided CUDA Python structure in bytes
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_4cuda_781sizeof, 0, __pyx_n_s_sizeof, NULL, __pyx_n_s_cuda_cuda, __pyx_d, ((PyObject *)__pyx_codeobj__1014)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sizeof, __pyx_t_3) < 0) __PYX_ERR(0, 33615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cuda/cuda.pyx":1
 * # Copyright 2021-2022 NVIDIA Corporation.  All rights reserved.             # <<<<<<<<<<<<<<
 * #
 * # Please refer to the NVIDIA end user license agreement (EULA) associated
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vector.from_py":45
 * 
 * @cname("__pyx_convert_vector_from_py_CUpointer_attribute")
 * cdef vector[X] __pyx_convert_vector_from_py_CUpointer_attribute(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef vector[X] v
 *     for item in o:
 */
  __Pyx_TraceReturn(Py_None, 0);

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init cuda.cuda", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init cuda.cuda");
  }
  __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

/* 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

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* 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

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#if defined(__Pyx_CyFunction_USED) && defined(NDEBUG)
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (__Pyx_PyFastCFunction_Check(func)) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a - b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#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

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    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++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_3);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunctionShared */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    if (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
#if PY_MAJOR_VERSION < 3
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
#endif
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
#if PY_MAJOR_VERSION > 2
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
#else
            PyErr_SetString(PyExc_TypeError,
                            "unbound method needs an argument");
#endif
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_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);
}

/* 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;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#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 (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= 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(int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUipcMem_flags_enum(enum CUipcMem_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUipcMem_flags_enum neg_one = (enum CUipcMem_flags_enum) -1, const_zero = (enum CUipcMem_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUipcMem_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUipcMem_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUipcMem_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUipcMem_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUipcMem_flags_enum) <= 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(enum CUipcMem_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemAttach_flags_enum(enum CUmemAttach_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemAttach_flags_enum neg_one = (enum CUmemAttach_flags_enum) -1, const_zero = (enum CUmemAttach_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmemAttach_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmemAttach_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemAttach_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmemAttach_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemAttach_flags_enum) <= 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(enum CUmemAttach_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUctx_flags_enum(enum CUctx_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUctx_flags_enum neg_one = (enum CUctx_flags_enum) -1, const_zero = (enum CUctx_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUctx_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUctx_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUctx_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUctx_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUctx_flags_enum) <= 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(enum CUctx_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUevent_sched_flags_enum(enum CUevent_sched_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUevent_sched_flags_enum neg_one = (enum CUevent_sched_flags_enum) -1, const_zero = (enum CUevent_sched_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUevent_sched_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUevent_sched_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUevent_sched_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUevent_sched_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUevent_sched_flags_enum) <= 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(enum CUevent_sched_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__cl_event_flags_enum(enum cl_event_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum cl_event_flags_enum neg_one = (enum cl_event_flags_enum) -1, const_zero = (enum cl_event_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum cl_event_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum cl_event_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum cl_event_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum cl_event_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum cl_event_flags_enum) <= 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(enum cl_event_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__cl_context_flags_enum(enum cl_context_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum cl_context_flags_enum neg_one = (enum cl_context_flags_enum) -1, const_zero = (enum cl_context_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum cl_context_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum cl_context_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum cl_context_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum cl_context_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum cl_context_flags_enum) <= 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(enum cl_context_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstream_flags_enum(enum CUstream_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUstream_flags_enum neg_one = (enum CUstream_flags_enum) -1, const_zero = (enum CUstream_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUstream_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUstream_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstream_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUstream_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstream_flags_enum) <= 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(enum CUstream_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUevent_flags_enum(enum CUevent_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUevent_flags_enum neg_one = (enum CUevent_flags_enum) -1, const_zero = (enum CUevent_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUevent_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUevent_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUevent_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUevent_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUevent_flags_enum) <= 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(enum CUevent_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUevent_record_flags_enum(enum CUevent_record_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUevent_record_flags_enum neg_one = (enum CUevent_record_flags_enum) -1, const_zero = (enum CUevent_record_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUevent_record_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUevent_record_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUevent_record_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUevent_record_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUevent_record_flags_enum) <= 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(enum CUevent_record_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUevent_wait_flags_enum(enum CUevent_wait_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUevent_wait_flags_enum neg_one = (enum CUevent_wait_flags_enum) -1, const_zero = (enum CUevent_wait_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUevent_wait_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUevent_wait_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUevent_wait_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUevent_wait_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUevent_wait_flags_enum) <= 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(enum CUevent_wait_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamWaitValue_flags_enum(enum CUstreamWaitValue_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUstreamWaitValue_flags_enum neg_one = (enum CUstreamWaitValue_flags_enum) -1, const_zero = (enum CUstreamWaitValue_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUstreamWaitValue_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUstreamWaitValue_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamWaitValue_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUstreamWaitValue_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamWaitValue_flags_enum) <= 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(enum CUstreamWaitValue_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamWriteValue_flags_enum(enum CUstreamWriteValue_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUstreamWriteValue_flags_enum neg_one = (enum CUstreamWriteValue_flags_enum) -1, const_zero = (enum CUstreamWriteValue_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUstreamWriteValue_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUstreamWriteValue_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamWriteValue_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUstreamWriteValue_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamWriteValue_flags_enum) <= 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(enum CUstreamWriteValue_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamBatchMemOpType_enum(enum CUstreamBatchMemOpType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUstreamBatchMemOpType_enum neg_one = (enum CUstreamBatchMemOpType_enum) -1, const_zero = (enum CUstreamBatchMemOpType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUstreamBatchMemOpType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUstreamBatchMemOpType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamBatchMemOpType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUstreamBatchMemOpType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamBatchMemOpType_enum) <= 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(enum CUstreamBatchMemOpType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamMemoryBarrier_flags_enum(enum CUstreamMemoryBarrier_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUstreamMemoryBarrier_flags_enum neg_one = (enum CUstreamMemoryBarrier_flags_enum) -1, const_zero = (enum CUstreamMemoryBarrier_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUstreamMemoryBarrier_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUstreamMemoryBarrier_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamMemoryBarrier_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUstreamMemoryBarrier_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamMemoryBarrier_flags_enum) <= 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(enum CUstreamMemoryBarrier_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUoccupancy_flags_enum(enum CUoccupancy_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUoccupancy_flags_enum neg_one = (enum CUoccupancy_flags_enum) -1, const_zero = (enum CUoccupancy_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUoccupancy_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUoccupancy_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUoccupancy_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUoccupancy_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUoccupancy_flags_enum) <= 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(enum CUoccupancy_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamUpdateCaptureDependencies_flags_enum(enum CUstreamUpdateCaptureDependencies_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUstreamUpdateCaptureDependencies_flags_enum neg_one = (enum CUstreamUpdateCaptureDependencies_flags_enum) -1, const_zero = (enum CUstreamUpdateCaptureDependencies_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUstreamUpdateCaptureDependencies_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUstreamUpdateCaptureDependencies_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamUpdateCaptureDependencies_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUstreamUpdateCaptureDependencies_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamUpdateCaptureDependencies_flags_enum) <= 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(enum CUstreamUpdateCaptureDependencies_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUarray_format_enum(enum CUarray_format_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUarray_format_enum neg_one = (enum CUarray_format_enum) -1, const_zero = (enum CUarray_format_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUarray_format_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUarray_format_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUarray_format_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUarray_format_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUarray_format_enum) <= 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(enum CUarray_format_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUaddress_mode_enum(enum CUaddress_mode_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUaddress_mode_enum neg_one = (enum CUaddress_mode_enum) -1, const_zero = (enum CUaddress_mode_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUaddress_mode_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUaddress_mode_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUaddress_mode_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUaddress_mode_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUaddress_mode_enum) <= 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(enum CUaddress_mode_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUfilter_mode_enum(enum CUfilter_mode_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUfilter_mode_enum neg_one = (enum CUfilter_mode_enum) -1, const_zero = (enum CUfilter_mode_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUfilter_mode_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUfilter_mode_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUfilter_mode_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUfilter_mode_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUfilter_mode_enum) <= 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(enum CUfilter_mode_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUdevice_attribute_enum(enum CUdevice_attribute_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUdevice_attribute_enum neg_one = (enum CUdevice_attribute_enum) -1, const_zero = (enum CUdevice_attribute_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUdevice_attribute_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUdevice_attribute_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUdevice_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUdevice_attribute_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUdevice_attribute_enum) <= 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(enum CUdevice_attribute_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUpointer_attribute_enum(enum CUpointer_attribute_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUpointer_attribute_enum neg_one = (enum CUpointer_attribute_enum) -1, const_zero = (enum CUpointer_attribute_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUpointer_attribute_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUpointer_attribute_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUpointer_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUpointer_attribute_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUpointer_attribute_enum) <= 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(enum CUpointer_attribute_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUfunction_attribute_enum(enum CUfunction_attribute_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUfunction_attribute_enum neg_one = (enum CUfunction_attribute_enum) -1, const_zero = (enum CUfunction_attribute_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUfunction_attribute_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUfunction_attribute_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUfunction_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUfunction_attribute_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUfunction_attribute_enum) <= 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(enum CUfunction_attribute_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUfunc_cache_enum(enum CUfunc_cache_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUfunc_cache_enum neg_one = (enum CUfunc_cache_enum) -1, const_zero = (enum CUfunc_cache_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUfunc_cache_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUfunc_cache_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUfunc_cache_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUfunc_cache_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUfunc_cache_enum) <= 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(enum CUfunc_cache_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUsharedconfig_enum(enum CUsharedconfig_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUsharedconfig_enum neg_one = (enum CUsharedconfig_enum) -1, const_zero = (enum CUsharedconfig_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUsharedconfig_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUsharedconfig_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUsharedconfig_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUsharedconfig_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUsharedconfig_enum) <= 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(enum CUsharedconfig_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUshared_carveout_enum(enum CUshared_carveout_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUshared_carveout_enum neg_one = (enum CUshared_carveout_enum) -1, const_zero = (enum CUshared_carveout_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUshared_carveout_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUshared_carveout_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUshared_carveout_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUshared_carveout_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUshared_carveout_enum) <= 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(enum CUshared_carveout_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemorytype_enum(enum CUmemorytype_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemorytype_enum neg_one = (enum CUmemorytype_enum) -1, const_zero = (enum CUmemorytype_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmemorytype_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmemorytype_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemorytype_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmemorytype_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemorytype_enum) <= 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(enum CUmemorytype_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUcomputemode_enum(enum CUcomputemode_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUcomputemode_enum neg_one = (enum CUcomputemode_enum) -1, const_zero = (enum CUcomputemode_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUcomputemode_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUcomputemode_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUcomputemode_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUcomputemode_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUcomputemode_enum) <= 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(enum CUcomputemode_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmem_advise_enum(enum CUmem_advise_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmem_advise_enum neg_one = (enum CUmem_advise_enum) -1, const_zero = (enum CUmem_advise_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmem_advise_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmem_advise_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmem_advise_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmem_advise_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmem_advise_enum) <= 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(enum CUmem_advise_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmem_range_attribute_enum(enum CUmem_range_attribute_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmem_range_attribute_enum neg_one = (enum CUmem_range_attribute_enum) -1, const_zero = (enum CUmem_range_attribute_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmem_range_attribute_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmem_range_attribute_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmem_range_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmem_range_attribute_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmem_range_attribute_enum) <= 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(enum CUmem_range_attribute_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUjit_option_enum(enum CUjit_option_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUjit_option_enum neg_one = (enum CUjit_option_enum) -1, const_zero = (enum CUjit_option_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUjit_option_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUjit_option_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUjit_option_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUjit_option_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUjit_option_enum) <= 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(enum CUjit_option_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUjit_target_enum(enum CUjit_target_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUjit_target_enum neg_one = (enum CUjit_target_enum) -1, const_zero = (enum CUjit_target_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUjit_target_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUjit_target_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUjit_target_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUjit_target_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUjit_target_enum) <= 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(enum CUjit_target_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUjit_fallback_enum(enum CUjit_fallback_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUjit_fallback_enum neg_one = (enum CUjit_fallback_enum) -1, const_zero = (enum CUjit_fallback_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUjit_fallback_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUjit_fallback_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUjit_fallback_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUjit_fallback_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUjit_fallback_enum) <= 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(enum CUjit_fallback_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUjit_cacheMode_enum(enum CUjit_cacheMode_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUjit_cacheMode_enum neg_one = (enum CUjit_cacheMode_enum) -1, const_zero = (enum CUjit_cacheMode_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUjit_cacheMode_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUjit_cacheMode_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUjit_cacheMode_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUjit_cacheMode_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUjit_cacheMode_enum) <= 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(enum CUjit_cacheMode_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUjitInputType_enum(enum CUjitInputType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUjitInputType_enum neg_one = (enum CUjitInputType_enum) -1, const_zero = (enum CUjitInputType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUjitInputType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUjitInputType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUjitInputType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUjitInputType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUjitInputType_enum) <= 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(enum CUjitInputType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphicsRegisterFlags_enum(enum CUgraphicsRegisterFlags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUgraphicsRegisterFlags_enum neg_one = (enum CUgraphicsRegisterFlags_enum) -1, const_zero = (enum CUgraphicsRegisterFlags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUgraphicsRegisterFlags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUgraphicsRegisterFlags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphicsRegisterFlags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUgraphicsRegisterFlags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphicsRegisterFlags_enum) <= 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(enum CUgraphicsRegisterFlags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphicsMapResourceFlags_enum(enum CUgraphicsMapResourceFlags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUgraphicsMapResourceFlags_enum neg_one = (enum CUgraphicsMapResourceFlags_enum) -1, const_zero = (enum CUgraphicsMapResourceFlags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUgraphicsMapResourceFlags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUgraphicsMapResourceFlags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphicsMapResourceFlags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUgraphicsMapResourceFlags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphicsMapResourceFlags_enum) <= 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(enum CUgraphicsMapResourceFlags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUarray_cubemap_face_enum(enum CUarray_cubemap_face_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUarray_cubemap_face_enum neg_one = (enum CUarray_cubemap_face_enum) -1, const_zero = (enum CUarray_cubemap_face_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUarray_cubemap_face_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUarray_cubemap_face_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUarray_cubemap_face_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUarray_cubemap_face_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUarray_cubemap_face_enum) <= 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(enum CUarray_cubemap_face_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUlimit_enum(enum CUlimit_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUlimit_enum neg_one = (enum CUlimit_enum) -1, const_zero = (enum CUlimit_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUlimit_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUlimit_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUlimit_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUlimit_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUlimit_enum) <= 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(enum CUlimit_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUresourcetype_enum(enum CUresourcetype_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUresourcetype_enum neg_one = (enum CUresourcetype_enum) -1, const_zero = (enum CUresourcetype_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUresourcetype_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUresourcetype_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUresourcetype_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUresourcetype_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUresourcetype_enum) <= 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(enum CUresourcetype_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUaccessProperty_enum(enum CUaccessProperty_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUaccessProperty_enum neg_one = (enum CUaccessProperty_enum) -1, const_zero = (enum CUaccessProperty_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUaccessProperty_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUaccessProperty_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUaccessProperty_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUaccessProperty_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUaccessProperty_enum) <= 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(enum CUaccessProperty_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphNodeType_enum(enum CUgraphNodeType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUgraphNodeType_enum neg_one = (enum CUgraphNodeType_enum) -1, const_zero = (enum CUgraphNodeType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUgraphNodeType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUgraphNodeType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphNodeType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUgraphNodeType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphNodeType_enum) <= 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(enum CUgraphNodeType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUsynchronizationPolicy_enum(enum CUsynchronizationPolicy_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUsynchronizationPolicy_enum neg_one = (enum CUsynchronizationPolicy_enum) -1, const_zero = (enum CUsynchronizationPolicy_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUsynchronizationPolicy_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUsynchronizationPolicy_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUsynchronizationPolicy_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUsynchronizationPolicy_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUsynchronizationPolicy_enum) <= 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(enum CUsynchronizationPolicy_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUclusterSchedulingPolicy_enum(enum CUclusterSchedulingPolicy_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUclusterSchedulingPolicy_enum neg_one = (enum CUclusterSchedulingPolicy_enum) -1, const_zero = (enum CUclusterSchedulingPolicy_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUclusterSchedulingPolicy_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUclusterSchedulingPolicy_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUclusterSchedulingPolicy_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUclusterSchedulingPolicy_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUclusterSchedulingPolicy_enum) <= 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(enum CUclusterSchedulingPolicy_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUlaunchAttributeID_enum(enum CUlaunchAttributeID_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUlaunchAttributeID_enum neg_one = (enum CUlaunchAttributeID_enum) -1, const_zero = (enum CUlaunchAttributeID_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUlaunchAttributeID_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUlaunchAttributeID_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUlaunchAttributeID_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUlaunchAttributeID_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUlaunchAttributeID_enum) <= 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(enum CUlaunchAttributeID_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamCaptureStatus_enum(enum CUstreamCaptureStatus_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUstreamCaptureStatus_enum neg_one = (enum CUstreamCaptureStatus_enum) -1, const_zero = (enum CUstreamCaptureStatus_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUstreamCaptureStatus_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUstreamCaptureStatus_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamCaptureStatus_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUstreamCaptureStatus_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamCaptureStatus_enum) <= 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(enum CUstreamCaptureStatus_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUstreamCaptureMode_enum(enum CUstreamCaptureMode_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUstreamCaptureMode_enum neg_one = (enum CUstreamCaptureMode_enum) -1, const_zero = (enum CUstreamCaptureMode_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUstreamCaptureMode_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUstreamCaptureMode_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamCaptureMode_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUstreamCaptureMode_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUstreamCaptureMode_enum) <= 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(enum CUstreamCaptureMode_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUdriverProcAddress_flags_enum(enum CUdriverProcAddress_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUdriverProcAddress_flags_enum neg_one = (enum CUdriverProcAddress_flags_enum) -1, const_zero = (enum CUdriverProcAddress_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUdriverProcAddress_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUdriverProcAddress_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUdriverProcAddress_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUdriverProcAddress_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUdriverProcAddress_flags_enum) <= 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(enum CUdriverProcAddress_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUexecAffinityType_enum(enum CUexecAffinityType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUexecAffinityType_enum neg_one = (enum CUexecAffinityType_enum) -1, const_zero = (enum CUexecAffinityType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUexecAffinityType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUexecAffinityType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUexecAffinityType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUexecAffinityType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUexecAffinityType_enum) <= 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(enum CUexecAffinityType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__cudaError_enum(enum cudaError_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum cudaError_enum neg_one = (enum cudaError_enum) -1, const_zero = (enum cudaError_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum cudaError_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum cudaError_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum cudaError_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum cudaError_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum cudaError_enum) <= 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(enum cudaError_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUdevice_P2PAttribute_enum(enum CUdevice_P2PAttribute_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUdevice_P2PAttribute_enum neg_one = (enum CUdevice_P2PAttribute_enum) -1, const_zero = (enum CUdevice_P2PAttribute_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUdevice_P2PAttribute_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUdevice_P2PAttribute_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUdevice_P2PAttribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUdevice_P2PAttribute_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUdevice_P2PAttribute_enum) <= 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(enum CUdevice_P2PAttribute_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUresourceViewFormat_enum(enum CUresourceViewFormat_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUresourceViewFormat_enum neg_one = (enum CUresourceViewFormat_enum) -1, const_zero = (enum CUresourceViewFormat_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUresourceViewFormat_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUresourceViewFormat_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUresourceViewFormat_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUresourceViewFormat_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUresourceViewFormat_enum) <= 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(enum CUresourceViewFormat_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum neg_one = (enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum) -1, const_zero = (enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum) <= 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(enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUexternalMemoryHandleType_enum(enum CUexternalMemoryHandleType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUexternalMemoryHandleType_enum neg_one = (enum CUexternalMemoryHandleType_enum) -1, const_zero = (enum CUexternalMemoryHandleType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUexternalMemoryHandleType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUexternalMemoryHandleType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUexternalMemoryHandleType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUexternalMemoryHandleType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUexternalMemoryHandleType_enum) <= 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(enum CUexternalMemoryHandleType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUexternalSemaphoreHandleType_enum(enum CUexternalSemaphoreHandleType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUexternalSemaphoreHandleType_enum neg_one = (enum CUexternalSemaphoreHandleType_enum) -1, const_zero = (enum CUexternalSemaphoreHandleType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUexternalSemaphoreHandleType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUexternalSemaphoreHandleType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUexternalSemaphoreHandleType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUexternalSemaphoreHandleType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUexternalSemaphoreHandleType_enum) <= 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(enum CUexternalSemaphoreHandleType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemAllocationHandleType_enum(enum CUmemAllocationHandleType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemAllocationHandleType_enum neg_one = (enum CUmemAllocationHandleType_enum) -1, const_zero = (enum CUmemAllocationHandleType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmemAllocationHandleType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemAllocationHandleType_enum) <= 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(enum CUmemAllocationHandleType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemAccess_flags_enum(enum CUmemAccess_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemAccess_flags_enum neg_one = (enum CUmemAccess_flags_enum) -1, const_zero = (enum CUmemAccess_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmemAccess_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmemAccess_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemAccess_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmemAccess_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemAccess_flags_enum) <= 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(enum CUmemAccess_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemLocationType_enum(enum CUmemLocationType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemLocationType_enum neg_one = (enum CUmemLocationType_enum) -1, const_zero = (enum CUmemLocationType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmemLocationType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmemLocationType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemLocationType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmemLocationType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemLocationType_enum) <= 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(enum CUmemLocationType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemAllocationType_enum(enum CUmemAllocationType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemAllocationType_enum neg_one = (enum CUmemAllocationType_enum) -1, const_zero = (enum CUmemAllocationType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmemAllocationType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmemAllocationType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemAllocationType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmemAllocationType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemAllocationType_enum) <= 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(enum CUmemAllocationType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemAllocationGranularity_flags_enum(enum CUmemAllocationGranularity_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemAllocationGranularity_flags_enum neg_one = (enum CUmemAllocationGranularity_flags_enum) -1, const_zero = (enum CUmemAllocationGranularity_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmemAllocationGranularity_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmemAllocationGranularity_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemAllocationGranularity_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmemAllocationGranularity_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemAllocationGranularity_flags_enum) <= 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(enum CUmemAllocationGranularity_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemRangeHandleType_enum(enum CUmemRangeHandleType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemRangeHandleType_enum neg_one = (enum CUmemRangeHandleType_enum) -1, const_zero = (enum CUmemRangeHandleType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmemRangeHandleType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmemRangeHandleType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemRangeHandleType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmemRangeHandleType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemRangeHandleType_enum) <= 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(enum CUmemRangeHandleType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUarraySparseSubresourceType_enum(enum CUarraySparseSubresourceType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUarraySparseSubresourceType_enum neg_one = (enum CUarraySparseSubresourceType_enum) -1, const_zero = (enum CUarraySparseSubresourceType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUarraySparseSubresourceType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUarraySparseSubresourceType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUarraySparseSubresourceType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUarraySparseSubresourceType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUarraySparseSubresourceType_enum) <= 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(enum CUarraySparseSubresourceType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemOperationType_enum(enum CUmemOperationType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemOperationType_enum neg_one = (enum CUmemOperationType_enum) -1, const_zero = (enum CUmemOperationType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmemOperationType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmemOperationType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemOperationType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmemOperationType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemOperationType_enum) <= 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(enum CUmemOperationType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemHandleType_enum(enum CUmemHandleType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemHandleType_enum neg_one = (enum CUmemHandleType_enum) -1, const_zero = (enum CUmemHandleType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmemHandleType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmemHandleType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemHandleType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmemHandleType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemHandleType_enum) <= 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(enum CUmemHandleType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemAllocationCompType_enum(enum CUmemAllocationCompType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemAllocationCompType_enum neg_one = (enum CUmemAllocationCompType_enum) -1, const_zero = (enum CUmemAllocationCompType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmemAllocationCompType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmemAllocationCompType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemAllocationCompType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmemAllocationCompType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemAllocationCompType_enum) <= 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(enum CUmemAllocationCompType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphExecUpdateResult_enum(enum CUgraphExecUpdateResult_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUgraphExecUpdateResult_enum neg_one = (enum CUgraphExecUpdateResult_enum) -1, const_zero = (enum CUgraphExecUpdateResult_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUgraphExecUpdateResult_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUgraphExecUpdateResult_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphExecUpdateResult_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUgraphExecUpdateResult_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphExecUpdateResult_enum) <= 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(enum CUgraphExecUpdateResult_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmemPool_attribute_enum(enum CUmemPool_attribute_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemPool_attribute_enum neg_one = (enum CUmemPool_attribute_enum) -1, const_zero = (enum CUmemPool_attribute_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmemPool_attribute_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmemPool_attribute_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemPool_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmemPool_attribute_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmemPool_attribute_enum) <= 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(enum CUmemPool_attribute_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphMem_attribute_enum(enum CUgraphMem_attribute_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUgraphMem_attribute_enum neg_one = (enum CUgraphMem_attribute_enum) -1, const_zero = (enum CUgraphMem_attribute_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUgraphMem_attribute_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUgraphMem_attribute_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphMem_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUgraphMem_attribute_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphMem_attribute_enum) <= 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(enum CUgraphMem_attribute_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUflushGPUDirectRDMAWritesOptions_enum(enum CUflushGPUDirectRDMAWritesOptions_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUflushGPUDirectRDMAWritesOptions_enum neg_one = (enum CUflushGPUDirectRDMAWritesOptions_enum) -1, const_zero = (enum CUflushGPUDirectRDMAWritesOptions_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUflushGPUDirectRDMAWritesOptions_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUflushGPUDirectRDMAWritesOptions_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUflushGPUDirectRDMAWritesOptions_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUflushGPUDirectRDMAWritesOptions_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUflushGPUDirectRDMAWritesOptions_enum) <= 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(enum CUflushGPUDirectRDMAWritesOptions_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUGPUDirectRDMAWritesOrdering_enum(enum CUGPUDirectRDMAWritesOrdering_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUGPUDirectRDMAWritesOrdering_enum neg_one = (enum CUGPUDirectRDMAWritesOrdering_enum) -1, const_zero = (enum CUGPUDirectRDMAWritesOrdering_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUGPUDirectRDMAWritesOrdering_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUGPUDirectRDMAWritesOrdering_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUGPUDirectRDMAWritesOrdering_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUGPUDirectRDMAWritesOrdering_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUGPUDirectRDMAWritesOrdering_enum) <= 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(enum CUGPUDirectRDMAWritesOrdering_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUflushGPUDirectRDMAWritesScope_enum(enum CUflushGPUDirectRDMAWritesScope_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUflushGPUDirectRDMAWritesScope_enum neg_one = (enum CUflushGPUDirectRDMAWritesScope_enum) -1, const_zero = (enum CUflushGPUDirectRDMAWritesScope_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) <= 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(enum CUflushGPUDirectRDMAWritesScope_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUflushGPUDirectRDMAWritesTarget_enum(enum CUflushGPUDirectRDMAWritesTarget_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUflushGPUDirectRDMAWritesTarget_enum neg_one = (enum CUflushGPUDirectRDMAWritesTarget_enum) -1, const_zero = (enum CUflushGPUDirectRDMAWritesTarget_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) <= 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(enum CUflushGPUDirectRDMAWritesTarget_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphDebugDot_flags_enum(enum CUgraphDebugDot_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUgraphDebugDot_flags_enum neg_one = (enum CUgraphDebugDot_flags_enum) -1, const_zero = (enum CUgraphDebugDot_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUgraphDebugDot_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUgraphDebugDot_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphDebugDot_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUgraphDebugDot_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphDebugDot_flags_enum) <= 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(enum CUgraphDebugDot_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUuserObject_flags_enum(enum CUuserObject_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUuserObject_flags_enum neg_one = (enum CUuserObject_flags_enum) -1, const_zero = (enum CUuserObject_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUuserObject_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUuserObject_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUuserObject_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUuserObject_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUuserObject_flags_enum) <= 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(enum CUuserObject_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUuserObjectRetain_flags_enum(enum CUuserObjectRetain_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUuserObjectRetain_flags_enum neg_one = (enum CUuserObjectRetain_flags_enum) -1, const_zero = (enum CUuserObjectRetain_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUuserObjectRetain_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUuserObjectRetain_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUuserObjectRetain_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUuserObjectRetain_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUuserObjectRetain_flags_enum) <= 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(enum CUuserObjectRetain_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUgraphInstantiate_flags_enum(enum CUgraphInstantiate_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUgraphInstantiate_flags_enum neg_one = (enum CUgraphInstantiate_flags_enum) -1, const_zero = (enum CUgraphInstantiate_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUgraphInstantiate_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUgraphInstantiate_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphInstantiate_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUgraphInstantiate_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUgraphInstantiate_flags_enum) <= 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(enum CUgraphInstantiate_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUmoduleLoadingMode_enum(enum CUmoduleLoadingMode_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmoduleLoadingMode_enum neg_one = (enum CUmoduleLoadingMode_enum) -1, const_zero = (enum CUmoduleLoadingMode_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUmoduleLoadingMode_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUmoduleLoadingMode_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmoduleLoadingMode_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUmoduleLoadingMode_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUmoduleLoadingMode_enum) <= 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(enum CUmoduleLoadingMode_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__CUoutput_mode_enum(enum CUoutput_mode_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUoutput_mode_enum neg_one = (enum CUoutput_mode_enum) -1, const_zero = (enum CUoutput_mode_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum CUoutput_mode_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum CUoutput_mode_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUoutput_mode_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum CUoutput_mode_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum CUoutput_mode_enum) <= 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(enum CUoutput_mode_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglFrameType_enum(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum neg_one = (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) -1, const_zero = (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) <= 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(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum(enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum neg_one = (enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum) -1, const_zero = (enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum) <= 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(enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum neg_one = (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) -1, const_zero = (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) <= 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(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUGLDeviceList_enum(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum neg_one = (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) -1, const_zero = (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) <= 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(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_4cuda_5ccuda_CUGLmap_flags_enum(enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum neg_one = (enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum) -1, const_zero = (enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum) <= 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(enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) -1, const_zero = (unsigned PY_LONG_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(unsigned PY_LONG_LONG) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned PY_LONG_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 (unsigned PY_LONG_LONG) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) >= 2 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) >= 3 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_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(unsigned PY_LONG_LONG) >= 4 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_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 (unsigned PY_LONG_LONG) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_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 (unsigned PY_LONG_LONG) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) ((((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) ((((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_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(unsigned PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_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(unsigned PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) ((((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_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
            unsigned PY_LONG_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 (unsigned PY_LONG_LONG) -1;
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned PY_LONG_LONG) -1;
        val = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned PY_LONG_LONG");
    return (unsigned PY_LONG_LONG) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned PY_LONG_LONG");
    return (unsigned PY_LONG_LONG) -1;
}

/* CIntFromPy */
static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned 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(unsigned int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned 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 (unsigned int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) {
                            return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) {
                            return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) >= 4 * PyLong_SHIFT) {
                            return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned 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 (unsigned int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(unsigned int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned 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 (unsigned int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned 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
            unsigned 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 (unsigned int) -1;
        }
    } else {
        unsigned int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned int) -1;
        val = __Pyx_PyInt_As_unsigned_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned int");
    return (unsigned int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned int");
    return (unsigned int) -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;
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 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(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) 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 (size_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, 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(size_t) >= 4 * PyLong_SHIFT) {
                            return (size_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
#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 (size_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(size_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, 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 (size_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, 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(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((((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(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, 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(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_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
            if (sizeof(size_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, 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
            size_t 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 (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 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(unsigned char) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned char) 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 (unsigned char) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned char, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) >= 2 * PyLong_SHIFT) {
                            return (unsigned char) (((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) >= 3 * PyLong_SHIFT) {
                            return (unsigned char) (((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, 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(unsigned char) >= 4 * PyLong_SHIFT) {
                            return (unsigned char) (((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)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 (unsigned char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(unsigned char) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned char, 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 (unsigned char) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned char, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned char,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned char) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned char) (((unsigned char)-1)*(((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned char) ((((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned char) (((unsigned char)-1)*(((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned char) ((((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, 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(unsigned char) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned char) (((unsigned char)-1)*(((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, 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(unsigned char) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned char) ((((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned char) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned char, 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
            unsigned char 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 (unsigned char) -1;
        }
    } else {
        unsigned char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned char) -1;
        val = __Pyx_PyInt_As_unsigned_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned char");
    return (unsigned char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned char");
    return (unsigned char) -1;
}

/* CIntFromPy */
static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned short neg_one = (unsigned short) -1, const_zero = (unsigned short) 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(unsigned short) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned short, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned short) 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 (unsigned short) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned short, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned short) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) >= 2 * PyLong_SHIFT) {
                            return (unsigned short) (((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned short) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) >= 3 * PyLong_SHIFT) {
                            return (unsigned short) (((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned short) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, 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(unsigned short) >= 4 * PyLong_SHIFT) {
                            return (unsigned short) (((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)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 (unsigned short) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(unsigned short) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned short, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned short, 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 (unsigned short) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned short, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned short,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned short) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned short) (((unsigned short)-1)*(((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned short) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned short) ((((((unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned short) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned short) (((unsigned short)-1)*(((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned short) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned short) ((((((((unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned short) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, 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(unsigned short) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned short) (((unsigned short)-1)*(((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned short) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned short, 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(unsigned short) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned short) ((((((((((unsigned short)digits[3]) << PyLong_SHIFT) | (unsigned short)digits[2]) << PyLong_SHIFT) | (unsigned short)digits[1]) << PyLong_SHIFT) | (unsigned short)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned short) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned short, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned short, 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
            unsigned short 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 (unsigned short) -1;
        }
    } else {
        unsigned short val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned short) -1;
        val = __Pyx_PyInt_As_unsigned_short(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned short");
    return (unsigned short) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned short");
    return (unsigned short) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 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(uint32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint32_t) 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 (uint32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT) {
                            return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT) {
                            return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, 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(uint32_t) >= 4 * PyLong_SHIFT) {
                            return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)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 (uint32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, 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 (uint32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, 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(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, 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(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, 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
            uint32_t 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 (uint32_t) -1;
        }
    } else {
        uint32_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint32_t) -1;
        val = __Pyx_PyInt_As_uint32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint32_t");
    return (uint32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint32_t");
    return (uint32_t) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 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(uint64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint64_t) 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 (uint64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT) {
                            return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT) {
                            return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, 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(uint64_t) >= 4 * PyLong_SHIFT) {
                            return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)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 (uint64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, 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 (uint64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, 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(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, 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(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, 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
            uint64_t 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 (uint64_t) -1;
        }
    } else {
        uint64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint64_t) -1;
        val = __Pyx_PyInt_As_uint64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint64_t");
    return (uint64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint64_t");
    return (uint64_t) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) -1, const_zero = (unsigned PY_LONG_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(unsigned PY_LONG_LONG) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned PY_LONG_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(unsigned PY_LONG_LONG),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const char neg_one = (char) -1, const_zero = (char) 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(char) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (char) 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 (char) 0;
                case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
                            return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
                            return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, 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(char) >= 4 * PyLong_SHIFT) {
                            return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)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 (char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(char) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, 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 (char) 0;
                case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(char) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, 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
            char 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 (char) -1;
        }
    } else {
        char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (char) -1;
        val = __Pyx_PyInt_As_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to char");
    return (char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to char");
    return (char) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUstreamBatchMemOpType_enum __Pyx_PyInt_As_enum__CUstreamBatchMemOpType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUstreamBatchMemOpType_enum neg_one = (enum CUstreamBatchMemOpType_enum) -1, const_zero = (enum CUstreamBatchMemOpType_enum) 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(enum CUstreamBatchMemOpType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUstreamBatchMemOpType_enum) 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 (enum CUstreamBatchMemOpType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUstreamBatchMemOpType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUstreamBatchMemOpType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUstreamBatchMemOpType_enum) (((((enum CUstreamBatchMemOpType_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUstreamBatchMemOpType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUstreamBatchMemOpType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUstreamBatchMemOpType_enum) (((((((enum CUstreamBatchMemOpType_enum)digits[2]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUstreamBatchMemOpType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum, 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(enum CUstreamBatchMemOpType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUstreamBatchMemOpType_enum) (((((((((enum CUstreamBatchMemOpType_enum)digits[3]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[2]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)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 (enum CUstreamBatchMemOpType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUstreamBatchMemOpType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUstreamBatchMemOpType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUstreamBatchMemOpType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUstreamBatchMemOpType_enum, 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 (enum CUstreamBatchMemOpType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUstreamBatchMemOpType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUstreamBatchMemOpType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUstreamBatchMemOpType_enum) (((enum CUstreamBatchMemOpType_enum)-1)*(((((enum CUstreamBatchMemOpType_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUstreamBatchMemOpType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUstreamBatchMemOpType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUstreamBatchMemOpType_enum) ((((((enum CUstreamBatchMemOpType_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUstreamBatchMemOpType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUstreamBatchMemOpType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUstreamBatchMemOpType_enum) (((enum CUstreamBatchMemOpType_enum)-1)*(((((((enum CUstreamBatchMemOpType_enum)digits[2]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUstreamBatchMemOpType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUstreamBatchMemOpType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUstreamBatchMemOpType_enum) ((((((((enum CUstreamBatchMemOpType_enum)digits[2]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUstreamBatchMemOpType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum, 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(enum CUstreamBatchMemOpType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUstreamBatchMemOpType_enum) (((enum CUstreamBatchMemOpType_enum)-1)*(((((((((enum CUstreamBatchMemOpType_enum)digits[3]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[2]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUstreamBatchMemOpType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamBatchMemOpType_enum, 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(enum CUstreamBatchMemOpType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUstreamBatchMemOpType_enum) ((((((((((enum CUstreamBatchMemOpType_enum)digits[3]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[2]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamBatchMemOpType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUstreamBatchMemOpType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUstreamBatchMemOpType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUstreamBatchMemOpType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUstreamBatchMemOpType_enum, 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
            enum CUstreamBatchMemOpType_enum 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 (enum CUstreamBatchMemOpType_enum) -1;
        }
    } else {
        enum CUstreamBatchMemOpType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUstreamBatchMemOpType_enum) -1;
        val = __Pyx_PyInt_As_enum__CUstreamBatchMemOpType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUstreamBatchMemOpType_enum");
    return (enum CUstreamBatchMemOpType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUstreamBatchMemOpType_enum");
    return (enum CUstreamBatchMemOpType_enum) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= 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(unsigned int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= 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(uint64_t),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE enum CUaccessProperty_enum __Pyx_PyInt_As_enum__CUaccessProperty_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUaccessProperty_enum neg_one = (enum CUaccessProperty_enum) -1, const_zero = (enum CUaccessProperty_enum) 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(enum CUaccessProperty_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUaccessProperty_enum) 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 (enum CUaccessProperty_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUaccessProperty_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUaccessProperty_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUaccessProperty_enum) (((((enum CUaccessProperty_enum)digits[1]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUaccessProperty_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUaccessProperty_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUaccessProperty_enum) (((((((enum CUaccessProperty_enum)digits[2]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[1]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUaccessProperty_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum, 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(enum CUaccessProperty_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUaccessProperty_enum) (((((((((enum CUaccessProperty_enum)digits[3]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[2]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[1]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)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 (enum CUaccessProperty_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUaccessProperty_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUaccessProperty_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUaccessProperty_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUaccessProperty_enum, 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 (enum CUaccessProperty_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUaccessProperty_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUaccessProperty_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUaccessProperty_enum) (((enum CUaccessProperty_enum)-1)*(((((enum CUaccessProperty_enum)digits[1]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUaccessProperty_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUaccessProperty_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUaccessProperty_enum) ((((((enum CUaccessProperty_enum)digits[1]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUaccessProperty_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUaccessProperty_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUaccessProperty_enum) (((enum CUaccessProperty_enum)-1)*(((((((enum CUaccessProperty_enum)digits[2]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[1]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUaccessProperty_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUaccessProperty_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUaccessProperty_enum) ((((((((enum CUaccessProperty_enum)digits[2]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[1]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUaccessProperty_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum, 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(enum CUaccessProperty_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUaccessProperty_enum) (((enum CUaccessProperty_enum)-1)*(((((((((enum CUaccessProperty_enum)digits[3]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[2]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[1]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUaccessProperty_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaccessProperty_enum, 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(enum CUaccessProperty_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUaccessProperty_enum) ((((((((((enum CUaccessProperty_enum)digits[3]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[2]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[1]) << PyLong_SHIFT) | (enum CUaccessProperty_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUaccessProperty_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUaccessProperty_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUaccessProperty_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUaccessProperty_enum, 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
            enum CUaccessProperty_enum 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 (enum CUaccessProperty_enum) -1;
        }
    } else {
        enum CUaccessProperty_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUaccessProperty_enum) -1;
        val = __Pyx_PyInt_As_enum__CUaccessProperty_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUaccessProperty_enum");
    return (enum CUaccessProperty_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUaccessProperty_enum");
    return (enum CUaccessProperty_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUsynchronizationPolicy_enum __Pyx_PyInt_As_enum__CUsynchronizationPolicy_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUsynchronizationPolicy_enum neg_one = (enum CUsynchronizationPolicy_enum) -1, const_zero = (enum CUsynchronizationPolicy_enum) 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(enum CUsynchronizationPolicy_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUsynchronizationPolicy_enum) 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 (enum CUsynchronizationPolicy_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUsynchronizationPolicy_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUsynchronizationPolicy_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUsynchronizationPolicy_enum) (((((enum CUsynchronizationPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUsynchronizationPolicy_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUsynchronizationPolicy_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUsynchronizationPolicy_enum) (((((((enum CUsynchronizationPolicy_enum)digits[2]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUsynchronizationPolicy_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum, 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(enum CUsynchronizationPolicy_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUsynchronizationPolicy_enum) (((((((((enum CUsynchronizationPolicy_enum)digits[3]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[2]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)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 (enum CUsynchronizationPolicy_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUsynchronizationPolicy_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUsynchronizationPolicy_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUsynchronizationPolicy_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUsynchronizationPolicy_enum, 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 (enum CUsynchronizationPolicy_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUsynchronizationPolicy_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUsynchronizationPolicy_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUsynchronizationPolicy_enum) (((enum CUsynchronizationPolicy_enum)-1)*(((((enum CUsynchronizationPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUsynchronizationPolicy_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUsynchronizationPolicy_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUsynchronizationPolicy_enum) ((((((enum CUsynchronizationPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUsynchronizationPolicy_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUsynchronizationPolicy_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUsynchronizationPolicy_enum) (((enum CUsynchronizationPolicy_enum)-1)*(((((((enum CUsynchronizationPolicy_enum)digits[2]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUsynchronizationPolicy_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUsynchronizationPolicy_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUsynchronizationPolicy_enum) ((((((((enum CUsynchronizationPolicy_enum)digits[2]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUsynchronizationPolicy_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum, 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(enum CUsynchronizationPolicy_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUsynchronizationPolicy_enum) (((enum CUsynchronizationPolicy_enum)-1)*(((((((((enum CUsynchronizationPolicy_enum)digits[3]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[2]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUsynchronizationPolicy_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsynchronizationPolicy_enum, 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(enum CUsynchronizationPolicy_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUsynchronizationPolicy_enum) ((((((((((enum CUsynchronizationPolicy_enum)digits[3]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[2]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUsynchronizationPolicy_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUsynchronizationPolicy_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUsynchronizationPolicy_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUsynchronizationPolicy_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUsynchronizationPolicy_enum, 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
            enum CUsynchronizationPolicy_enum 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 (enum CUsynchronizationPolicy_enum) -1;
        }
    } else {
        enum CUsynchronizationPolicy_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUsynchronizationPolicy_enum) -1;
        val = __Pyx_PyInt_As_enum__CUsynchronizationPolicy_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUsynchronizationPolicy_enum");
    return (enum CUsynchronizationPolicy_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUsynchronizationPolicy_enum");
    return (enum CUsynchronizationPolicy_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUclusterSchedulingPolicy_enum __Pyx_PyInt_As_enum__CUclusterSchedulingPolicy_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUclusterSchedulingPolicy_enum neg_one = (enum CUclusterSchedulingPolicy_enum) -1, const_zero = (enum CUclusterSchedulingPolicy_enum) 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(enum CUclusterSchedulingPolicy_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUclusterSchedulingPolicy_enum) 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 (enum CUclusterSchedulingPolicy_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUclusterSchedulingPolicy_enum) (((((enum CUclusterSchedulingPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUclusterSchedulingPolicy_enum) (((((((enum CUclusterSchedulingPolicy_enum)digits[2]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum, 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(enum CUclusterSchedulingPolicy_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUclusterSchedulingPolicy_enum) (((((((((enum CUclusterSchedulingPolicy_enum)digits[3]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[2]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)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 (enum CUclusterSchedulingPolicy_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUclusterSchedulingPolicy_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUclusterSchedulingPolicy_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUclusterSchedulingPolicy_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUclusterSchedulingPolicy_enum, 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 (enum CUclusterSchedulingPolicy_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUclusterSchedulingPolicy_enum) (((enum CUclusterSchedulingPolicy_enum)-1)*(((((enum CUclusterSchedulingPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUclusterSchedulingPolicy_enum) ((((((enum CUclusterSchedulingPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUclusterSchedulingPolicy_enum) (((enum CUclusterSchedulingPolicy_enum)-1)*(((((((enum CUclusterSchedulingPolicy_enum)digits[2]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUclusterSchedulingPolicy_enum) ((((((((enum CUclusterSchedulingPolicy_enum)digits[2]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum, 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(enum CUclusterSchedulingPolicy_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUclusterSchedulingPolicy_enum) (((enum CUclusterSchedulingPolicy_enum)-1)*(((((((((enum CUclusterSchedulingPolicy_enum)digits[3]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[2]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUclusterSchedulingPolicy_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUclusterSchedulingPolicy_enum, 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(enum CUclusterSchedulingPolicy_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUclusterSchedulingPolicy_enum) ((((((((((enum CUclusterSchedulingPolicy_enum)digits[3]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[2]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[1]) << PyLong_SHIFT) | (enum CUclusterSchedulingPolicy_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUclusterSchedulingPolicy_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUclusterSchedulingPolicy_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUclusterSchedulingPolicy_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUclusterSchedulingPolicy_enum, 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
            enum CUclusterSchedulingPolicy_enum 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 (enum CUclusterSchedulingPolicy_enum) -1;
        }
    } else {
        enum CUclusterSchedulingPolicy_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUclusterSchedulingPolicy_enum) -1;
        val = __Pyx_PyInt_As_enum__CUclusterSchedulingPolicy_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUclusterSchedulingPolicy_enum");
    return (enum CUclusterSchedulingPolicy_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUclusterSchedulingPolicy_enum");
    return (enum CUclusterSchedulingPolicy_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUlaunchAttributeID_enum __Pyx_PyInt_As_enum__CUlaunchAttributeID_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUlaunchAttributeID_enum neg_one = (enum CUlaunchAttributeID_enum) -1, const_zero = (enum CUlaunchAttributeID_enum) 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(enum CUlaunchAttributeID_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUlaunchAttributeID_enum) 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 (enum CUlaunchAttributeID_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUlaunchAttributeID_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUlaunchAttributeID_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUlaunchAttributeID_enum) (((((enum CUlaunchAttributeID_enum)digits[1]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUlaunchAttributeID_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUlaunchAttributeID_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUlaunchAttributeID_enum) (((((((enum CUlaunchAttributeID_enum)digits[2]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[1]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUlaunchAttributeID_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum, 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(enum CUlaunchAttributeID_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUlaunchAttributeID_enum) (((((((((enum CUlaunchAttributeID_enum)digits[3]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[2]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[1]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)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 (enum CUlaunchAttributeID_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUlaunchAttributeID_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUlaunchAttributeID_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUlaunchAttributeID_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUlaunchAttributeID_enum, 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 (enum CUlaunchAttributeID_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUlaunchAttributeID_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUlaunchAttributeID_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUlaunchAttributeID_enum) (((enum CUlaunchAttributeID_enum)-1)*(((((enum CUlaunchAttributeID_enum)digits[1]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUlaunchAttributeID_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUlaunchAttributeID_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUlaunchAttributeID_enum) ((((((enum CUlaunchAttributeID_enum)digits[1]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUlaunchAttributeID_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUlaunchAttributeID_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUlaunchAttributeID_enum) (((enum CUlaunchAttributeID_enum)-1)*(((((((enum CUlaunchAttributeID_enum)digits[2]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[1]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUlaunchAttributeID_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUlaunchAttributeID_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUlaunchAttributeID_enum) ((((((((enum CUlaunchAttributeID_enum)digits[2]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[1]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUlaunchAttributeID_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum, 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(enum CUlaunchAttributeID_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUlaunchAttributeID_enum) (((enum CUlaunchAttributeID_enum)-1)*(((((((((enum CUlaunchAttributeID_enum)digits[3]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[2]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[1]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUlaunchAttributeID_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlaunchAttributeID_enum, 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(enum CUlaunchAttributeID_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUlaunchAttributeID_enum) ((((((((((enum CUlaunchAttributeID_enum)digits[3]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[2]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[1]) << PyLong_SHIFT) | (enum CUlaunchAttributeID_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUlaunchAttributeID_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUlaunchAttributeID_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUlaunchAttributeID_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUlaunchAttributeID_enum, 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
            enum CUlaunchAttributeID_enum 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 (enum CUlaunchAttributeID_enum) -1;
        }
    } else {
        enum CUlaunchAttributeID_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUlaunchAttributeID_enum) -1;
        val = __Pyx_PyInt_As_enum__CUlaunchAttributeID_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUlaunchAttributeID_enum");
    return (enum CUlaunchAttributeID_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUlaunchAttributeID_enum");
    return (enum CUlaunchAttributeID_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUexecAffinityType_enum __Pyx_PyInt_As_enum__CUexecAffinityType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUexecAffinityType_enum neg_one = (enum CUexecAffinityType_enum) -1, const_zero = (enum CUexecAffinityType_enum) 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(enum CUexecAffinityType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUexecAffinityType_enum) 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 (enum CUexecAffinityType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUexecAffinityType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexecAffinityType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUexecAffinityType_enum) (((((enum CUexecAffinityType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUexecAffinityType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexecAffinityType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUexecAffinityType_enum) (((((((enum CUexecAffinityType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUexecAffinityType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum, 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(enum CUexecAffinityType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUexecAffinityType_enum) (((((((((enum CUexecAffinityType_enum)digits[3]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)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 (enum CUexecAffinityType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUexecAffinityType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUexecAffinityType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUexecAffinityType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUexecAffinityType_enum, 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 (enum CUexecAffinityType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUexecAffinityType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexecAffinityType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUexecAffinityType_enum) (((enum CUexecAffinityType_enum)-1)*(((((enum CUexecAffinityType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUexecAffinityType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexecAffinityType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUexecAffinityType_enum) ((((((enum CUexecAffinityType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUexecAffinityType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexecAffinityType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUexecAffinityType_enum) (((enum CUexecAffinityType_enum)-1)*(((((((enum CUexecAffinityType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUexecAffinityType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexecAffinityType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUexecAffinityType_enum) ((((((((enum CUexecAffinityType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUexecAffinityType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum, 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(enum CUexecAffinityType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUexecAffinityType_enum) (((enum CUexecAffinityType_enum)-1)*(((((((((enum CUexecAffinityType_enum)digits[3]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUexecAffinityType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexecAffinityType_enum, 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(enum CUexecAffinityType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUexecAffinityType_enum) ((((((((((enum CUexecAffinityType_enum)digits[3]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexecAffinityType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUexecAffinityType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUexecAffinityType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUexecAffinityType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUexecAffinityType_enum, 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
            enum CUexecAffinityType_enum 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 (enum CUexecAffinityType_enum) -1;
        }
    } else {
        enum CUexecAffinityType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUexecAffinityType_enum) -1;
        val = __Pyx_PyInt_As_enum__CUexecAffinityType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUexecAffinityType_enum");
    return (enum CUexecAffinityType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUexecAffinityType_enum");
    return (enum CUexecAffinityType_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUmemorytype_enum __Pyx_PyInt_As_enum__CUmemorytype_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemorytype_enum neg_one = (enum CUmemorytype_enum) -1, const_zero = (enum CUmemorytype_enum) 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(enum CUmemorytype_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUmemorytype_enum) 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 (enum CUmemorytype_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUmemorytype_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemorytype_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUmemorytype_enum) (((((enum CUmemorytype_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemorytype_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemorytype_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUmemorytype_enum) (((((((enum CUmemorytype_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemorytype_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum, 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(enum CUmemorytype_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUmemorytype_enum) (((((((((enum CUmemorytype_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemorytype_enum)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 (enum CUmemorytype_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUmemorytype_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemorytype_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemorytype_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemorytype_enum, 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 (enum CUmemorytype_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUmemorytype_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemorytype_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemorytype_enum) (((enum CUmemorytype_enum)-1)*(((((enum CUmemorytype_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUmemorytype_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemorytype_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemorytype_enum) ((((((enum CUmemorytype_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUmemorytype_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemorytype_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemorytype_enum) (((enum CUmemorytype_enum)-1)*(((((((enum CUmemorytype_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemorytype_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemorytype_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemorytype_enum) ((((((((enum CUmemorytype_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUmemorytype_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum, 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(enum CUmemorytype_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemorytype_enum) (((enum CUmemorytype_enum)-1)*(((((((((enum CUmemorytype_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemorytype_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemorytype_enum, 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(enum CUmemorytype_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemorytype_enum) ((((((((((enum CUmemorytype_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemorytype_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUmemorytype_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemorytype_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemorytype_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemorytype_enum, 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
            enum CUmemorytype_enum 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 (enum CUmemorytype_enum) -1;
        }
    } else {
        enum CUmemorytype_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUmemorytype_enum) -1;
        val = __Pyx_PyInt_As_enum__CUmemorytype_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUmemorytype_enum");
    return (enum CUmemorytype_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUmemorytype_enum");
    return (enum CUmemorytype_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUarray_format_enum __Pyx_PyInt_As_enum__CUarray_format_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUarray_format_enum neg_one = (enum CUarray_format_enum) -1, const_zero = (enum CUarray_format_enum) 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(enum CUarray_format_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUarray_format_enum) 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 (enum CUarray_format_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUarray_format_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUarray_format_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUarray_format_enum) (((((enum CUarray_format_enum)digits[1]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUarray_format_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUarray_format_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUarray_format_enum) (((((((enum CUarray_format_enum)digits[2]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[1]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUarray_format_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum, 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(enum CUarray_format_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUarray_format_enum) (((((((((enum CUarray_format_enum)digits[3]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[2]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[1]) << PyLong_SHIFT) | (enum CUarray_format_enum)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 (enum CUarray_format_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUarray_format_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUarray_format_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUarray_format_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUarray_format_enum, 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 (enum CUarray_format_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUarray_format_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUarray_format_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUarray_format_enum) (((enum CUarray_format_enum)-1)*(((((enum CUarray_format_enum)digits[1]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUarray_format_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUarray_format_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUarray_format_enum) ((((((enum CUarray_format_enum)digits[1]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUarray_format_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUarray_format_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUarray_format_enum) (((enum CUarray_format_enum)-1)*(((((((enum CUarray_format_enum)digits[2]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[1]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUarray_format_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUarray_format_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUarray_format_enum) ((((((((enum CUarray_format_enum)digits[2]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[1]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUarray_format_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum, 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(enum CUarray_format_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUarray_format_enum) (((enum CUarray_format_enum)-1)*(((((((((enum CUarray_format_enum)digits[3]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[2]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[1]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUarray_format_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarray_format_enum, 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(enum CUarray_format_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUarray_format_enum) ((((((((((enum CUarray_format_enum)digits[3]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[2]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[1]) << PyLong_SHIFT) | (enum CUarray_format_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUarray_format_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUarray_format_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUarray_format_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUarray_format_enum, 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
            enum CUarray_format_enum 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 (enum CUarray_format_enum) -1;
        }
    } else {
        enum CUarray_format_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUarray_format_enum) -1;
        val = __Pyx_PyInt_As_enum__CUarray_format_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUarray_format_enum");
    return (enum CUarray_format_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUarray_format_enum");
    return (enum CUarray_format_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUresourcetype_enum __Pyx_PyInt_As_enum__CUresourcetype_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUresourcetype_enum neg_one = (enum CUresourcetype_enum) -1, const_zero = (enum CUresourcetype_enum) 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(enum CUresourcetype_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUresourcetype_enum) 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 (enum CUresourcetype_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUresourcetype_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUresourcetype_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUresourcetype_enum) (((((enum CUresourcetype_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUresourcetype_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUresourcetype_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUresourcetype_enum) (((((((enum CUresourcetype_enum)digits[2]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUresourcetype_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum, 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(enum CUresourcetype_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUresourcetype_enum) (((((((((enum CUresourcetype_enum)digits[3]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[2]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourcetype_enum)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 (enum CUresourcetype_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUresourcetype_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUresourcetype_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUresourcetype_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUresourcetype_enum, 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 (enum CUresourcetype_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUresourcetype_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUresourcetype_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUresourcetype_enum) (((enum CUresourcetype_enum)-1)*(((((enum CUresourcetype_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUresourcetype_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUresourcetype_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUresourcetype_enum) ((((((enum CUresourcetype_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUresourcetype_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUresourcetype_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUresourcetype_enum) (((enum CUresourcetype_enum)-1)*(((((((enum CUresourcetype_enum)digits[2]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUresourcetype_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUresourcetype_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUresourcetype_enum) ((((((((enum CUresourcetype_enum)digits[2]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUresourcetype_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum, 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(enum CUresourcetype_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUresourcetype_enum) (((enum CUresourcetype_enum)-1)*(((((((((enum CUresourcetype_enum)digits[3]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[2]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUresourcetype_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourcetype_enum, 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(enum CUresourcetype_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUresourcetype_enum) ((((((((((enum CUresourcetype_enum)digits[3]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[2]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourcetype_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUresourcetype_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUresourcetype_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUresourcetype_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUresourcetype_enum, 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
            enum CUresourcetype_enum 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 (enum CUresourcetype_enum) -1;
        }
    } else {
        enum CUresourcetype_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUresourcetype_enum) -1;
        val = __Pyx_PyInt_As_enum__CUresourcetype_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUresourcetype_enum");
    return (enum CUresourcetype_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUresourcetype_enum");
    return (enum CUresourcetype_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUaddress_mode_enum __Pyx_PyInt_As_enum__CUaddress_mode_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUaddress_mode_enum neg_one = (enum CUaddress_mode_enum) -1, const_zero = (enum CUaddress_mode_enum) 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(enum CUaddress_mode_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUaddress_mode_enum) 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 (enum CUaddress_mode_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUaddress_mode_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUaddress_mode_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUaddress_mode_enum) (((((enum CUaddress_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUaddress_mode_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUaddress_mode_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUaddress_mode_enum) (((((((enum CUaddress_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUaddress_mode_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum, 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(enum CUaddress_mode_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUaddress_mode_enum) (((((((((enum CUaddress_mode_enum)digits[3]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)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 (enum CUaddress_mode_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUaddress_mode_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUaddress_mode_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUaddress_mode_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUaddress_mode_enum, 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 (enum CUaddress_mode_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUaddress_mode_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUaddress_mode_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUaddress_mode_enum) (((enum CUaddress_mode_enum)-1)*(((((enum CUaddress_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUaddress_mode_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUaddress_mode_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUaddress_mode_enum) ((((((enum CUaddress_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUaddress_mode_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUaddress_mode_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUaddress_mode_enum) (((enum CUaddress_mode_enum)-1)*(((((((enum CUaddress_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUaddress_mode_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUaddress_mode_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUaddress_mode_enum) ((((((((enum CUaddress_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUaddress_mode_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum, 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(enum CUaddress_mode_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUaddress_mode_enum) (((enum CUaddress_mode_enum)-1)*(((((((((enum CUaddress_mode_enum)digits[3]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUaddress_mode_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUaddress_mode_enum, 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(enum CUaddress_mode_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUaddress_mode_enum) ((((((((((enum CUaddress_mode_enum)digits[3]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUaddress_mode_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUaddress_mode_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUaddress_mode_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUaddress_mode_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUaddress_mode_enum, 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
            enum CUaddress_mode_enum 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 (enum CUaddress_mode_enum) -1;
        }
    } else {
        enum CUaddress_mode_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUaddress_mode_enum) -1;
        val = __Pyx_PyInt_As_enum__CUaddress_mode_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUaddress_mode_enum");
    return (enum CUaddress_mode_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUaddress_mode_enum");
    return (enum CUaddress_mode_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUfilter_mode_enum __Pyx_PyInt_As_enum__CUfilter_mode_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUfilter_mode_enum neg_one = (enum CUfilter_mode_enum) -1, const_zero = (enum CUfilter_mode_enum) 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(enum CUfilter_mode_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUfilter_mode_enum) 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 (enum CUfilter_mode_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUfilter_mode_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfilter_mode_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUfilter_mode_enum) (((((enum CUfilter_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUfilter_mode_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfilter_mode_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUfilter_mode_enum) (((((((enum CUfilter_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUfilter_mode_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum, 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(enum CUfilter_mode_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUfilter_mode_enum) (((((((((enum CUfilter_mode_enum)digits[3]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)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 (enum CUfilter_mode_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUfilter_mode_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUfilter_mode_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUfilter_mode_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUfilter_mode_enum, 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 (enum CUfilter_mode_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUfilter_mode_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfilter_mode_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUfilter_mode_enum) (((enum CUfilter_mode_enum)-1)*(((((enum CUfilter_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUfilter_mode_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfilter_mode_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUfilter_mode_enum) ((((((enum CUfilter_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUfilter_mode_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfilter_mode_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUfilter_mode_enum) (((enum CUfilter_mode_enum)-1)*(((((((enum CUfilter_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUfilter_mode_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfilter_mode_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUfilter_mode_enum) ((((((((enum CUfilter_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUfilter_mode_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum, 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(enum CUfilter_mode_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUfilter_mode_enum) (((enum CUfilter_mode_enum)-1)*(((((((((enum CUfilter_mode_enum)digits[3]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUfilter_mode_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfilter_mode_enum, 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(enum CUfilter_mode_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUfilter_mode_enum) ((((((((((enum CUfilter_mode_enum)digits[3]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUfilter_mode_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUfilter_mode_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUfilter_mode_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUfilter_mode_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUfilter_mode_enum, 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
            enum CUfilter_mode_enum 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 (enum CUfilter_mode_enum) -1;
        }
    } else {
        enum CUfilter_mode_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUfilter_mode_enum) -1;
        val = __Pyx_PyInt_As_enum__CUfilter_mode_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUfilter_mode_enum");
    return (enum CUfilter_mode_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUfilter_mode_enum");
    return (enum CUfilter_mode_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUresourceViewFormat_enum __Pyx_PyInt_As_enum__CUresourceViewFormat_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUresourceViewFormat_enum neg_one = (enum CUresourceViewFormat_enum) -1, const_zero = (enum CUresourceViewFormat_enum) 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(enum CUresourceViewFormat_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUresourceViewFormat_enum) 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 (enum CUresourceViewFormat_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUresourceViewFormat_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUresourceViewFormat_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUresourceViewFormat_enum) (((((enum CUresourceViewFormat_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUresourceViewFormat_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUresourceViewFormat_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUresourceViewFormat_enum) (((((((enum CUresourceViewFormat_enum)digits[2]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUresourceViewFormat_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum, 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(enum CUresourceViewFormat_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUresourceViewFormat_enum) (((((((((enum CUresourceViewFormat_enum)digits[3]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[2]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)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 (enum CUresourceViewFormat_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUresourceViewFormat_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUresourceViewFormat_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUresourceViewFormat_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUresourceViewFormat_enum, 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 (enum CUresourceViewFormat_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUresourceViewFormat_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUresourceViewFormat_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUresourceViewFormat_enum) (((enum CUresourceViewFormat_enum)-1)*(((((enum CUresourceViewFormat_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUresourceViewFormat_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUresourceViewFormat_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUresourceViewFormat_enum) ((((((enum CUresourceViewFormat_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUresourceViewFormat_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUresourceViewFormat_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUresourceViewFormat_enum) (((enum CUresourceViewFormat_enum)-1)*(((((((enum CUresourceViewFormat_enum)digits[2]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUresourceViewFormat_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUresourceViewFormat_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUresourceViewFormat_enum) ((((((((enum CUresourceViewFormat_enum)digits[2]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUresourceViewFormat_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum, 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(enum CUresourceViewFormat_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUresourceViewFormat_enum) (((enum CUresourceViewFormat_enum)-1)*(((((((((enum CUresourceViewFormat_enum)digits[3]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[2]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUresourceViewFormat_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUresourceViewFormat_enum, 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(enum CUresourceViewFormat_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUresourceViewFormat_enum) ((((((((((enum CUresourceViewFormat_enum)digits[3]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[2]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[1]) << PyLong_SHIFT) | (enum CUresourceViewFormat_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUresourceViewFormat_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUresourceViewFormat_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUresourceViewFormat_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUresourceViewFormat_enum, 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
            enum CUresourceViewFormat_enum 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 (enum CUresourceViewFormat_enum) -1;
        }
    } else {
        enum CUresourceViewFormat_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUresourceViewFormat_enum) -1;
        val = __Pyx_PyInt_As_enum__CUresourceViewFormat_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUresourceViewFormat_enum");
    return (enum CUresourceViewFormat_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUresourceViewFormat_enum");
    return (enum CUresourceViewFormat_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUexternalMemoryHandleType_enum __Pyx_PyInt_As_enum__CUexternalMemoryHandleType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUexternalMemoryHandleType_enum neg_one = (enum CUexternalMemoryHandleType_enum) -1, const_zero = (enum CUexternalMemoryHandleType_enum) 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(enum CUexternalMemoryHandleType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUexternalMemoryHandleType_enum) 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 (enum CUexternalMemoryHandleType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUexternalMemoryHandleType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexternalMemoryHandleType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUexternalMemoryHandleType_enum) (((((enum CUexternalMemoryHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUexternalMemoryHandleType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexternalMemoryHandleType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUexternalMemoryHandleType_enum) (((((((enum CUexternalMemoryHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUexternalMemoryHandleType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum, 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(enum CUexternalMemoryHandleType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUexternalMemoryHandleType_enum) (((((((((enum CUexternalMemoryHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)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 (enum CUexternalMemoryHandleType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUexternalMemoryHandleType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUexternalMemoryHandleType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUexternalMemoryHandleType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUexternalMemoryHandleType_enum, 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 (enum CUexternalMemoryHandleType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUexternalMemoryHandleType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexternalMemoryHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUexternalMemoryHandleType_enum) (((enum CUexternalMemoryHandleType_enum)-1)*(((((enum CUexternalMemoryHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUexternalMemoryHandleType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexternalMemoryHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUexternalMemoryHandleType_enum) ((((((enum CUexternalMemoryHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUexternalMemoryHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexternalMemoryHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUexternalMemoryHandleType_enum) (((enum CUexternalMemoryHandleType_enum)-1)*(((((((enum CUexternalMemoryHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUexternalMemoryHandleType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexternalMemoryHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUexternalMemoryHandleType_enum) ((((((((enum CUexternalMemoryHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUexternalMemoryHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum, 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(enum CUexternalMemoryHandleType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUexternalMemoryHandleType_enum) (((enum CUexternalMemoryHandleType_enum)-1)*(((((((((enum CUexternalMemoryHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUexternalMemoryHandleType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalMemoryHandleType_enum, 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(enum CUexternalMemoryHandleType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUexternalMemoryHandleType_enum) ((((((((((enum CUexternalMemoryHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalMemoryHandleType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUexternalMemoryHandleType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUexternalMemoryHandleType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUexternalMemoryHandleType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUexternalMemoryHandleType_enum, 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
            enum CUexternalMemoryHandleType_enum 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 (enum CUexternalMemoryHandleType_enum) -1;
        }
    } else {
        enum CUexternalMemoryHandleType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUexternalMemoryHandleType_enum) -1;
        val = __Pyx_PyInt_As_enum__CUexternalMemoryHandleType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUexternalMemoryHandleType_enum");
    return (enum CUexternalMemoryHandleType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUexternalMemoryHandleType_enum");
    return (enum CUexternalMemoryHandleType_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUexternalSemaphoreHandleType_enum __Pyx_PyInt_As_enum__CUexternalSemaphoreHandleType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUexternalSemaphoreHandleType_enum neg_one = (enum CUexternalSemaphoreHandleType_enum) -1, const_zero = (enum CUexternalSemaphoreHandleType_enum) 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(enum CUexternalSemaphoreHandleType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUexternalSemaphoreHandleType_enum) 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 (enum CUexternalSemaphoreHandleType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUexternalSemaphoreHandleType_enum) (((((enum CUexternalSemaphoreHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUexternalSemaphoreHandleType_enum) (((((((enum CUexternalSemaphoreHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum, 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(enum CUexternalSemaphoreHandleType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUexternalSemaphoreHandleType_enum) (((((((((enum CUexternalSemaphoreHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)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 (enum CUexternalSemaphoreHandleType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUexternalSemaphoreHandleType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUexternalSemaphoreHandleType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUexternalSemaphoreHandleType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUexternalSemaphoreHandleType_enum, 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 (enum CUexternalSemaphoreHandleType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUexternalSemaphoreHandleType_enum) (((enum CUexternalSemaphoreHandleType_enum)-1)*(((((enum CUexternalSemaphoreHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUexternalSemaphoreHandleType_enum) ((((((enum CUexternalSemaphoreHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUexternalSemaphoreHandleType_enum) (((enum CUexternalSemaphoreHandleType_enum)-1)*(((((((enum CUexternalSemaphoreHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUexternalSemaphoreHandleType_enum) ((((((((enum CUexternalSemaphoreHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum, 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(enum CUexternalSemaphoreHandleType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUexternalSemaphoreHandleType_enum) (((enum CUexternalSemaphoreHandleType_enum)-1)*(((((((((enum CUexternalSemaphoreHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUexternalSemaphoreHandleType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUexternalSemaphoreHandleType_enum, 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(enum CUexternalSemaphoreHandleType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUexternalSemaphoreHandleType_enum) ((((((((((enum CUexternalSemaphoreHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUexternalSemaphoreHandleType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUexternalSemaphoreHandleType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUexternalSemaphoreHandleType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUexternalSemaphoreHandleType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUexternalSemaphoreHandleType_enum, 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
            enum CUexternalSemaphoreHandleType_enum 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 (enum CUexternalSemaphoreHandleType_enum) -1;
        }
    } else {
        enum CUexternalSemaphoreHandleType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUexternalSemaphoreHandleType_enum) -1;
        val = __Pyx_PyInt_As_enum__CUexternalSemaphoreHandleType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUexternalSemaphoreHandleType_enum");
    return (enum CUexternalSemaphoreHandleType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUexternalSemaphoreHandleType_enum");
    return (enum CUexternalSemaphoreHandleType_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUarraySparseSubresourceType_enum __Pyx_PyInt_As_enum__CUarraySparseSubresourceType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUarraySparseSubresourceType_enum neg_one = (enum CUarraySparseSubresourceType_enum) -1, const_zero = (enum CUarraySparseSubresourceType_enum) 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(enum CUarraySparseSubresourceType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUarraySparseSubresourceType_enum) 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 (enum CUarraySparseSubresourceType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUarraySparseSubresourceType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUarraySparseSubresourceType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUarraySparseSubresourceType_enum) (((((enum CUarraySparseSubresourceType_enum)digits[1]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUarraySparseSubresourceType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUarraySparseSubresourceType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUarraySparseSubresourceType_enum) (((((((enum CUarraySparseSubresourceType_enum)digits[2]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[1]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUarraySparseSubresourceType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum, 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(enum CUarraySparseSubresourceType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUarraySparseSubresourceType_enum) (((((((((enum CUarraySparseSubresourceType_enum)digits[3]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[2]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[1]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)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 (enum CUarraySparseSubresourceType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUarraySparseSubresourceType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUarraySparseSubresourceType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUarraySparseSubresourceType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUarraySparseSubresourceType_enum, 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 (enum CUarraySparseSubresourceType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUarraySparseSubresourceType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUarraySparseSubresourceType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUarraySparseSubresourceType_enum) (((enum CUarraySparseSubresourceType_enum)-1)*(((((enum CUarraySparseSubresourceType_enum)digits[1]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUarraySparseSubresourceType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUarraySparseSubresourceType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUarraySparseSubresourceType_enum) ((((((enum CUarraySparseSubresourceType_enum)digits[1]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUarraySparseSubresourceType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUarraySparseSubresourceType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUarraySparseSubresourceType_enum) (((enum CUarraySparseSubresourceType_enum)-1)*(((((((enum CUarraySparseSubresourceType_enum)digits[2]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[1]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUarraySparseSubresourceType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUarraySparseSubresourceType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUarraySparseSubresourceType_enum) ((((((((enum CUarraySparseSubresourceType_enum)digits[2]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[1]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUarraySparseSubresourceType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum, 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(enum CUarraySparseSubresourceType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUarraySparseSubresourceType_enum) (((enum CUarraySparseSubresourceType_enum)-1)*(((((((((enum CUarraySparseSubresourceType_enum)digits[3]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[2]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[1]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUarraySparseSubresourceType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUarraySparseSubresourceType_enum, 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(enum CUarraySparseSubresourceType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUarraySparseSubresourceType_enum) ((((((((((enum CUarraySparseSubresourceType_enum)digits[3]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[2]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[1]) << PyLong_SHIFT) | (enum CUarraySparseSubresourceType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUarraySparseSubresourceType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUarraySparseSubresourceType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUarraySparseSubresourceType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUarraySparseSubresourceType_enum, 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
            enum CUarraySparseSubresourceType_enum 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 (enum CUarraySparseSubresourceType_enum) -1;
        }
    } else {
        enum CUarraySparseSubresourceType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUarraySparseSubresourceType_enum) -1;
        val = __Pyx_PyInt_As_enum__CUarraySparseSubresourceType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUarraySparseSubresourceType_enum");
    return (enum CUarraySparseSubresourceType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUarraySparseSubresourceType_enum");
    return (enum CUarraySparseSubresourceType_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUmemOperationType_enum __Pyx_PyInt_As_enum__CUmemOperationType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemOperationType_enum neg_one = (enum CUmemOperationType_enum) -1, const_zero = (enum CUmemOperationType_enum) 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(enum CUmemOperationType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUmemOperationType_enum) 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 (enum CUmemOperationType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUmemOperationType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemOperationType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUmemOperationType_enum) (((((enum CUmemOperationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemOperationType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemOperationType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUmemOperationType_enum) (((((((enum CUmemOperationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemOperationType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum, 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(enum CUmemOperationType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUmemOperationType_enum) (((((((((enum CUmemOperationType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)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 (enum CUmemOperationType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUmemOperationType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemOperationType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemOperationType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemOperationType_enum, 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 (enum CUmemOperationType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUmemOperationType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemOperationType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemOperationType_enum) (((enum CUmemOperationType_enum)-1)*(((((enum CUmemOperationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUmemOperationType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemOperationType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemOperationType_enum) ((((((enum CUmemOperationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUmemOperationType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemOperationType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemOperationType_enum) (((enum CUmemOperationType_enum)-1)*(((((((enum CUmemOperationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemOperationType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemOperationType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemOperationType_enum) ((((((((enum CUmemOperationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUmemOperationType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum, 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(enum CUmemOperationType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemOperationType_enum) (((enum CUmemOperationType_enum)-1)*(((((((((enum CUmemOperationType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemOperationType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemOperationType_enum, 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(enum CUmemOperationType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemOperationType_enum) ((((((((((enum CUmemOperationType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemOperationType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUmemOperationType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemOperationType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemOperationType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemOperationType_enum, 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
            enum CUmemOperationType_enum 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 (enum CUmemOperationType_enum) -1;
        }
    } else {
        enum CUmemOperationType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUmemOperationType_enum) -1;
        val = __Pyx_PyInt_As_enum__CUmemOperationType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUmemOperationType_enum");
    return (enum CUmemOperationType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUmemOperationType_enum");
    return (enum CUmemOperationType_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUmemHandleType_enum __Pyx_PyInt_As_enum__CUmemHandleType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemHandleType_enum neg_one = (enum CUmemHandleType_enum) -1, const_zero = (enum CUmemHandleType_enum) 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(enum CUmemHandleType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUmemHandleType_enum) 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 (enum CUmemHandleType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUmemHandleType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemHandleType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUmemHandleType_enum) (((((enum CUmemHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemHandleType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemHandleType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUmemHandleType_enum) (((((((enum CUmemHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemHandleType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum, 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(enum CUmemHandleType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUmemHandleType_enum) (((((((((enum CUmemHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)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 (enum CUmemHandleType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUmemHandleType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemHandleType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemHandleType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemHandleType_enum, 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 (enum CUmemHandleType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUmemHandleType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemHandleType_enum) (((enum CUmemHandleType_enum)-1)*(((((enum CUmemHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUmemHandleType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemHandleType_enum) ((((((enum CUmemHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUmemHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemHandleType_enum) (((enum CUmemHandleType_enum)-1)*(((((((enum CUmemHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemHandleType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemHandleType_enum) ((((((((enum CUmemHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUmemHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum, 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(enum CUmemHandleType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemHandleType_enum) (((enum CUmemHandleType_enum)-1)*(((((((((enum CUmemHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemHandleType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemHandleType_enum, 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(enum CUmemHandleType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemHandleType_enum) ((((((((((enum CUmemHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemHandleType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUmemHandleType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemHandleType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemHandleType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemHandleType_enum, 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
            enum CUmemHandleType_enum 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 (enum CUmemHandleType_enum) -1;
        }
    } else {
        enum CUmemHandleType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUmemHandleType_enum) -1;
        val = __Pyx_PyInt_As_enum__CUmemHandleType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUmemHandleType_enum");
    return (enum CUmemHandleType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUmemHandleType_enum");
    return (enum CUmemHandleType_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUmemLocationType_enum __Pyx_PyInt_As_enum__CUmemLocationType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemLocationType_enum neg_one = (enum CUmemLocationType_enum) -1, const_zero = (enum CUmemLocationType_enum) 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(enum CUmemLocationType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUmemLocationType_enum) 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 (enum CUmemLocationType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUmemLocationType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemLocationType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUmemLocationType_enum) (((((enum CUmemLocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemLocationType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemLocationType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUmemLocationType_enum) (((((((enum CUmemLocationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemLocationType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum, 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(enum CUmemLocationType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUmemLocationType_enum) (((((((((enum CUmemLocationType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)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 (enum CUmemLocationType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUmemLocationType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemLocationType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemLocationType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemLocationType_enum, 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 (enum CUmemLocationType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUmemLocationType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemLocationType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemLocationType_enum) (((enum CUmemLocationType_enum)-1)*(((((enum CUmemLocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUmemLocationType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemLocationType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemLocationType_enum) ((((((enum CUmemLocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUmemLocationType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemLocationType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemLocationType_enum) (((enum CUmemLocationType_enum)-1)*(((((((enum CUmemLocationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemLocationType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemLocationType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemLocationType_enum) ((((((((enum CUmemLocationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUmemLocationType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum, 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(enum CUmemLocationType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemLocationType_enum) (((enum CUmemLocationType_enum)-1)*(((((((((enum CUmemLocationType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemLocationType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemLocationType_enum, 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(enum CUmemLocationType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemLocationType_enum) ((((((((((enum CUmemLocationType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemLocationType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUmemLocationType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemLocationType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemLocationType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemLocationType_enum, 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
            enum CUmemLocationType_enum 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 (enum CUmemLocationType_enum) -1;
        }
    } else {
        enum CUmemLocationType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUmemLocationType_enum) -1;
        val = __Pyx_PyInt_As_enum__CUmemLocationType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUmemLocationType_enum");
    return (enum CUmemLocationType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUmemLocationType_enum");
    return (enum CUmemLocationType_enum) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned char) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned char) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned char) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned char) <= 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(unsigned char),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned short neg_one = (unsigned short) -1, const_zero = (unsigned short) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned short) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned short) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned short) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned short) <= 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(unsigned short),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE enum CUmemAllocationType_enum __Pyx_PyInt_As_enum__CUmemAllocationType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemAllocationType_enum neg_one = (enum CUmemAllocationType_enum) -1, const_zero = (enum CUmemAllocationType_enum) 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(enum CUmemAllocationType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUmemAllocationType_enum) 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 (enum CUmemAllocationType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUmemAllocationType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUmemAllocationType_enum) (((((enum CUmemAllocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemAllocationType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUmemAllocationType_enum) (((((((enum CUmemAllocationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemAllocationType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum, 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(enum CUmemAllocationType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUmemAllocationType_enum) (((((((((enum CUmemAllocationType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)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 (enum CUmemAllocationType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUmemAllocationType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemAllocationType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationType_enum, 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 (enum CUmemAllocationType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUmemAllocationType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemAllocationType_enum) (((enum CUmemAllocationType_enum)-1)*(((((enum CUmemAllocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUmemAllocationType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemAllocationType_enum) ((((((enum CUmemAllocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUmemAllocationType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemAllocationType_enum) (((enum CUmemAllocationType_enum)-1)*(((((((enum CUmemAllocationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemAllocationType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemAllocationType_enum) ((((((((enum CUmemAllocationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUmemAllocationType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum, 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(enum CUmemAllocationType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemAllocationType_enum) (((enum CUmemAllocationType_enum)-1)*(((((((((enum CUmemAllocationType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemAllocationType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationType_enum, 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(enum CUmemAllocationType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemAllocationType_enum) ((((((((((enum CUmemAllocationType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUmemAllocationType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemAllocationType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationType_enum, 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
            enum CUmemAllocationType_enum 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 (enum CUmemAllocationType_enum) -1;
        }
    } else {
        enum CUmemAllocationType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUmemAllocationType_enum) -1;
        val = __Pyx_PyInt_As_enum__CUmemAllocationType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUmemAllocationType_enum");
    return (enum CUmemAllocationType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUmemAllocationType_enum");
    return (enum CUmemAllocationType_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUmemAllocationHandleType_enum __Pyx_PyInt_As_enum__CUmemAllocationHandleType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemAllocationHandleType_enum neg_one = (enum CUmemAllocationHandleType_enum) -1, const_zero = (enum CUmemAllocationHandleType_enum) 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(enum CUmemAllocationHandleType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUmemAllocationHandleType_enum) 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 (enum CUmemAllocationHandleType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUmemAllocationHandleType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationHandleType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUmemAllocationHandleType_enum) (((((enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemAllocationHandleType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationHandleType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUmemAllocationHandleType_enum) (((((((enum CUmemAllocationHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemAllocationHandleType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, 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(enum CUmemAllocationHandleType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUmemAllocationHandleType_enum) (((((((((enum CUmemAllocationHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)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 (enum CUmemAllocationHandleType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationHandleType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationHandleType_enum, 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 (enum CUmemAllocationHandleType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemAllocationHandleType_enum) (((enum CUmemAllocationHandleType_enum)-1)*(((((enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUmemAllocationHandleType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemAllocationHandleType_enum) ((((((enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemAllocationHandleType_enum) (((enum CUmemAllocationHandleType_enum)-1)*(((((((enum CUmemAllocationHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemAllocationHandleType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemAllocationHandleType_enum) ((((((((enum CUmemAllocationHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, 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(enum CUmemAllocationHandleType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemAllocationHandleType_enum) (((enum CUmemAllocationHandleType_enum)-1)*(((((((((enum CUmemAllocationHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemAllocationHandleType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, 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(enum CUmemAllocationHandleType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemAllocationHandleType_enum) ((((((((((enum CUmemAllocationHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationHandleType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationHandleType_enum, 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
            enum CUmemAllocationHandleType_enum 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 (enum CUmemAllocationHandleType_enum) -1;
        }
    } else {
        enum CUmemAllocationHandleType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUmemAllocationHandleType_enum) -1;
        val = __Pyx_PyInt_As_enum__CUmemAllocationHandleType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUmemAllocationHandleType_enum");
    return (enum CUmemAllocationHandleType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUmemAllocationHandleType_enum");
    return (enum CUmemAllocationHandleType_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUmemAccess_flags_enum __Pyx_PyInt_As_enum__CUmemAccess_flags_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemAccess_flags_enum neg_one = (enum CUmemAccess_flags_enum) -1, const_zero = (enum CUmemAccess_flags_enum) 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(enum CUmemAccess_flags_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUmemAccess_flags_enum) 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 (enum CUmemAccess_flags_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUmemAccess_flags_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAccess_flags_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUmemAccess_flags_enum) (((((enum CUmemAccess_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemAccess_flags_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAccess_flags_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUmemAccess_flags_enum) (((((((enum CUmemAccess_flags_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemAccess_flags_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum, 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(enum CUmemAccess_flags_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUmemAccess_flags_enum) (((((((((enum CUmemAccess_flags_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)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 (enum CUmemAccess_flags_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUmemAccess_flags_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAccess_flags_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemAccess_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAccess_flags_enum, 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 (enum CUmemAccess_flags_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUmemAccess_flags_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAccess_flags_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemAccess_flags_enum) (((enum CUmemAccess_flags_enum)-1)*(((((enum CUmemAccess_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUmemAccess_flags_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAccess_flags_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemAccess_flags_enum) ((((((enum CUmemAccess_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUmemAccess_flags_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAccess_flags_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemAccess_flags_enum) (((enum CUmemAccess_flags_enum)-1)*(((((((enum CUmemAccess_flags_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemAccess_flags_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAccess_flags_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemAccess_flags_enum) ((((((((enum CUmemAccess_flags_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUmemAccess_flags_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum, 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(enum CUmemAccess_flags_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemAccess_flags_enum) (((enum CUmemAccess_flags_enum)-1)*(((((((((enum CUmemAccess_flags_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemAccess_flags_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAccess_flags_enum, 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(enum CUmemAccess_flags_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemAccess_flags_enum) ((((((((((enum CUmemAccess_flags_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAccess_flags_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUmemAccess_flags_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAccess_flags_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemAccess_flags_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAccess_flags_enum, 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
            enum CUmemAccess_flags_enum 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 (enum CUmemAccess_flags_enum) -1;
        }
    } else {
        enum CUmemAccess_flags_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUmemAccess_flags_enum) -1;
        val = __Pyx_PyInt_As_enum__CUmemAccess_flags_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUmemAccess_flags_enum");
    return (enum CUmemAccess_flags_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUmemAccess_flags_enum");
    return (enum CUmemAccess_flags_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum __Pyx_PyInt_As_enum____pyx_t_4cuda_5ccuda_CUeglFrameType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum neg_one = (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) -1, const_zero = (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) 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(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) 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 (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) (((((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) (((((((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, 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(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) (((((((((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)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 (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, 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 (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) (((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)-1)*(((((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) ((((((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) (((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)-1)*(((((((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) ((((((((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, 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(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) (((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)-1)*(((((((((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, 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(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) ((((((((((enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum, 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
            enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum 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 (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) -1;
        }
    } else {
        enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) -1;
        val = __Pyx_PyInt_As_enum____pyx_t_4cuda_5ccuda_CUeglFrameType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum");
    return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum");
    return (enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum __Pyx_PyInt_As_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum neg_one = (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) -1, const_zero = (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) 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(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) 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 (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) >= 2 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) (((((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) >= 3 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) (((((((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, 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(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) >= 4 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) (((((((((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)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 (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, 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 (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) (((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)-1)*(((((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) ((((((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) (((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)-1)*(((((((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) ((((((((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, 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(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) (((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)-1)*(((((((((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, 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(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) ((((((((((enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum, 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
            enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum 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 (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) -1;
        }
    } else {
        enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) -1;
        val = __Pyx_PyInt_As_enum____pyx_t_4cuda_5ccuda_CUeglColorFormat_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum");
    return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum");
    return (enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint32_t) <= 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(uint32_t),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE enum cudaError_enum __Pyx_PyInt_As_enum__cudaError_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum cudaError_enum neg_one = (enum cudaError_enum) -1, const_zero = (enum cudaError_enum) 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(enum cudaError_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum cudaError_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum cudaError_enum) 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 (enum cudaError_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum cudaError_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum cudaError_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum cudaError_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum cudaError_enum) >= 2 * PyLong_SHIFT) {
                            return (enum cudaError_enum) (((((enum cudaError_enum)digits[1]) << PyLong_SHIFT) | (enum cudaError_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum cudaError_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum cudaError_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum cudaError_enum) >= 3 * PyLong_SHIFT) {
                            return (enum cudaError_enum) (((((((enum cudaError_enum)digits[2]) << PyLong_SHIFT) | (enum cudaError_enum)digits[1]) << PyLong_SHIFT) | (enum cudaError_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum cudaError_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum cudaError_enum, 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(enum cudaError_enum) >= 4 * PyLong_SHIFT) {
                            return (enum cudaError_enum) (((((((((enum cudaError_enum)digits[3]) << PyLong_SHIFT) | (enum cudaError_enum)digits[2]) << PyLong_SHIFT) | (enum cudaError_enum)digits[1]) << PyLong_SHIFT) | (enum cudaError_enum)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 (enum cudaError_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum cudaError_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum cudaError_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum cudaError_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum cudaError_enum, 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 (enum cudaError_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum cudaError_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum cudaError_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum cudaError_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum cudaError_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum cudaError_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum cudaError_enum) (((enum cudaError_enum)-1)*(((((enum cudaError_enum)digits[1]) << PyLong_SHIFT) | (enum cudaError_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum cudaError_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum cudaError_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum cudaError_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum cudaError_enum) ((((((enum cudaError_enum)digits[1]) << PyLong_SHIFT) | (enum cudaError_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum cudaError_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum cudaError_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum cudaError_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum cudaError_enum) (((enum cudaError_enum)-1)*(((((((enum cudaError_enum)digits[2]) << PyLong_SHIFT) | (enum cudaError_enum)digits[1]) << PyLong_SHIFT) | (enum cudaError_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum cudaError_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum cudaError_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum cudaError_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum cudaError_enum) ((((((((enum cudaError_enum)digits[2]) << PyLong_SHIFT) | (enum cudaError_enum)digits[1]) << PyLong_SHIFT) | (enum cudaError_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum cudaError_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum cudaError_enum, 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(enum cudaError_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum cudaError_enum) (((enum cudaError_enum)-1)*(((((((((enum cudaError_enum)digits[3]) << PyLong_SHIFT) | (enum cudaError_enum)digits[2]) << PyLong_SHIFT) | (enum cudaError_enum)digits[1]) << PyLong_SHIFT) | (enum cudaError_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum cudaError_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum cudaError_enum, 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(enum cudaError_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum cudaError_enum) ((((((((((enum cudaError_enum)digits[3]) << PyLong_SHIFT) | (enum cudaError_enum)digits[2]) << PyLong_SHIFT) | (enum cudaError_enum)digits[1]) << PyLong_SHIFT) | (enum cudaError_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum cudaError_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum cudaError_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum cudaError_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum cudaError_enum, 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
            enum cudaError_enum 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 (enum cudaError_enum) -1;
        }
    } else {
        enum cudaError_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum cudaError_enum) -1;
        val = __Pyx_PyInt_As_enum__cudaError_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum cudaError_enum");
    return (enum cudaError_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum cudaError_enum");
    return (enum cudaError_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE CUdevice_v1 __Pyx_PyInt_As_CUdevice_v1(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CUdevice_v1 neg_one = (CUdevice_v1) -1, const_zero = (CUdevice_v1) 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(CUdevice_v1) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(CUdevice_v1, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (CUdevice_v1) 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 (CUdevice_v1) 0;
                case  1: __PYX_VERIFY_RETURN_INT(CUdevice_v1, digit, digits[0])
                case 2:
                    if (8 * sizeof(CUdevice_v1) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CUdevice_v1, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CUdevice_v1) >= 2 * PyLong_SHIFT) {
                            return (CUdevice_v1) (((((CUdevice_v1)digits[1]) << PyLong_SHIFT) | (CUdevice_v1)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(CUdevice_v1) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CUdevice_v1, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CUdevice_v1) >= 3 * PyLong_SHIFT) {
                            return (CUdevice_v1) (((((((CUdevice_v1)digits[2]) << PyLong_SHIFT) | (CUdevice_v1)digits[1]) << PyLong_SHIFT) | (CUdevice_v1)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(CUdevice_v1) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CUdevice_v1, 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(CUdevice_v1) >= 4 * PyLong_SHIFT) {
                            return (CUdevice_v1) (((((((((CUdevice_v1)digits[3]) << PyLong_SHIFT) | (CUdevice_v1)digits[2]) << PyLong_SHIFT) | (CUdevice_v1)digits[1]) << PyLong_SHIFT) | (CUdevice_v1)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 (CUdevice_v1) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(CUdevice_v1) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(CUdevice_v1, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(CUdevice_v1) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(CUdevice_v1, 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 (CUdevice_v1) 0;
                case -1: __PYX_VERIFY_RETURN_INT(CUdevice_v1, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(CUdevice_v1,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(CUdevice_v1) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CUdevice_v1, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CUdevice_v1) - 1 > 2 * PyLong_SHIFT) {
                            return (CUdevice_v1) (((CUdevice_v1)-1)*(((((CUdevice_v1)digits[1]) << PyLong_SHIFT) | (CUdevice_v1)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(CUdevice_v1) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CUdevice_v1, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CUdevice_v1) - 1 > 2 * PyLong_SHIFT) {
                            return (CUdevice_v1) ((((((CUdevice_v1)digits[1]) << PyLong_SHIFT) | (CUdevice_v1)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(CUdevice_v1) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CUdevice_v1, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CUdevice_v1) - 1 > 3 * PyLong_SHIFT) {
                            return (CUdevice_v1) (((CUdevice_v1)-1)*(((((((CUdevice_v1)digits[2]) << PyLong_SHIFT) | (CUdevice_v1)digits[1]) << PyLong_SHIFT) | (CUdevice_v1)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(CUdevice_v1) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CUdevice_v1, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CUdevice_v1) - 1 > 3 * PyLong_SHIFT) {
                            return (CUdevice_v1) ((((((((CUdevice_v1)digits[2]) << PyLong_SHIFT) | (CUdevice_v1)digits[1]) << PyLong_SHIFT) | (CUdevice_v1)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(CUdevice_v1) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CUdevice_v1, 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(CUdevice_v1) - 1 > 4 * PyLong_SHIFT) {
                            return (CUdevice_v1) (((CUdevice_v1)-1)*(((((((((CUdevice_v1)digits[3]) << PyLong_SHIFT) | (CUdevice_v1)digits[2]) << PyLong_SHIFT) | (CUdevice_v1)digits[1]) << PyLong_SHIFT) | (CUdevice_v1)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(CUdevice_v1) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CUdevice_v1, 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(CUdevice_v1) - 1 > 4 * PyLong_SHIFT) {
                            return (CUdevice_v1) ((((((((((CUdevice_v1)digits[3]) << PyLong_SHIFT) | (CUdevice_v1)digits[2]) << PyLong_SHIFT) | (CUdevice_v1)digits[1]) << PyLong_SHIFT) | (CUdevice_v1)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(CUdevice_v1) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(CUdevice_v1, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(CUdevice_v1) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(CUdevice_v1, 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
            CUdevice_v1 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 (CUdevice_v1) -1;
        }
    } else {
        CUdevice_v1 val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (CUdevice_v1) -1;
        val = __Pyx_PyInt_As_CUdevice_v1(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to CUdevice_v1");
    return (CUdevice_v1) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to CUdevice_v1");
    return (CUdevice_v1) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUdevice_attribute_enum __Pyx_PyInt_As_enum__CUdevice_attribute_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUdevice_attribute_enum neg_one = (enum CUdevice_attribute_enum) -1, const_zero = (enum CUdevice_attribute_enum) 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(enum CUdevice_attribute_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUdevice_attribute_enum) 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 (enum CUdevice_attribute_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUdevice_attribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUdevice_attribute_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUdevice_attribute_enum) (((((enum CUdevice_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUdevice_attribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUdevice_attribute_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUdevice_attribute_enum) (((((((enum CUdevice_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUdevice_attribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum, 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(enum CUdevice_attribute_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUdevice_attribute_enum) (((((((((enum CUdevice_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)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 (enum CUdevice_attribute_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUdevice_attribute_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUdevice_attribute_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUdevice_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUdevice_attribute_enum, 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 (enum CUdevice_attribute_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUdevice_attribute_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUdevice_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUdevice_attribute_enum) (((enum CUdevice_attribute_enum)-1)*(((((enum CUdevice_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUdevice_attribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUdevice_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUdevice_attribute_enum) ((((((enum CUdevice_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUdevice_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUdevice_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUdevice_attribute_enum) (((enum CUdevice_attribute_enum)-1)*(((((((enum CUdevice_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUdevice_attribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUdevice_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUdevice_attribute_enum) ((((((((enum CUdevice_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUdevice_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum, 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(enum CUdevice_attribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUdevice_attribute_enum) (((enum CUdevice_attribute_enum)-1)*(((((((((enum CUdevice_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUdevice_attribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_attribute_enum, 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(enum CUdevice_attribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUdevice_attribute_enum) ((((((((((enum CUdevice_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_attribute_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUdevice_attribute_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUdevice_attribute_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUdevice_attribute_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUdevice_attribute_enum, 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
            enum CUdevice_attribute_enum 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 (enum CUdevice_attribute_enum) -1;
        }
    } else {
        enum CUdevice_attribute_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUdevice_attribute_enum) -1;
        val = __Pyx_PyInt_As_enum__CUdevice_attribute_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUdevice_attribute_enum");
    return (enum CUdevice_attribute_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUdevice_attribute_enum");
    return (enum CUdevice_attribute_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUflushGPUDirectRDMAWritesTarget_enum __Pyx_PyInt_As_enum__CUflushGPUDirectRDMAWritesTarget_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUflushGPUDirectRDMAWritesTarget_enum neg_one = (enum CUflushGPUDirectRDMAWritesTarget_enum) -1, const_zero = (enum CUflushGPUDirectRDMAWritesTarget_enum) 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(enum CUflushGPUDirectRDMAWritesTarget_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUflushGPUDirectRDMAWritesTarget_enum) 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 (enum CUflushGPUDirectRDMAWritesTarget_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesTarget_enum) (((((enum CUflushGPUDirectRDMAWritesTarget_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesTarget_enum) (((((((enum CUflushGPUDirectRDMAWritesTarget_enum)digits[2]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum, 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(enum CUflushGPUDirectRDMAWritesTarget_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesTarget_enum) (((((((((enum CUflushGPUDirectRDMAWritesTarget_enum)digits[3]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[2]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)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 (enum CUflushGPUDirectRDMAWritesTarget_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUflushGPUDirectRDMAWritesTarget_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUflushGPUDirectRDMAWritesTarget_enum, 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 (enum CUflushGPUDirectRDMAWritesTarget_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesTarget_enum) (((enum CUflushGPUDirectRDMAWritesTarget_enum)-1)*(((((enum CUflushGPUDirectRDMAWritesTarget_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesTarget_enum) ((((((enum CUflushGPUDirectRDMAWritesTarget_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesTarget_enum) (((enum CUflushGPUDirectRDMAWritesTarget_enum)-1)*(((((((enum CUflushGPUDirectRDMAWritesTarget_enum)digits[2]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesTarget_enum) ((((((((enum CUflushGPUDirectRDMAWritesTarget_enum)digits[2]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum, 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(enum CUflushGPUDirectRDMAWritesTarget_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesTarget_enum) (((enum CUflushGPUDirectRDMAWritesTarget_enum)-1)*(((((((((enum CUflushGPUDirectRDMAWritesTarget_enum)digits[3]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[2]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesTarget_enum, 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(enum CUflushGPUDirectRDMAWritesTarget_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesTarget_enum) ((((((((((enum CUflushGPUDirectRDMAWritesTarget_enum)digits[3]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[2]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesTarget_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUflushGPUDirectRDMAWritesTarget_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUflushGPUDirectRDMAWritesTarget_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUflushGPUDirectRDMAWritesTarget_enum, 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
            enum CUflushGPUDirectRDMAWritesTarget_enum 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 (enum CUflushGPUDirectRDMAWritesTarget_enum) -1;
        }
    } else {
        enum CUflushGPUDirectRDMAWritesTarget_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUflushGPUDirectRDMAWritesTarget_enum) -1;
        val = __Pyx_PyInt_As_enum__CUflushGPUDirectRDMAWritesTarget_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUflushGPUDirectRDMAWritesTarget_enum");
    return (enum CUflushGPUDirectRDMAWritesTarget_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUflushGPUDirectRDMAWritesTarget_enum");
    return (enum CUflushGPUDirectRDMAWritesTarget_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUflushGPUDirectRDMAWritesScope_enum __Pyx_PyInt_As_enum__CUflushGPUDirectRDMAWritesScope_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUflushGPUDirectRDMAWritesScope_enum neg_one = (enum CUflushGPUDirectRDMAWritesScope_enum) -1, const_zero = (enum CUflushGPUDirectRDMAWritesScope_enum) 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(enum CUflushGPUDirectRDMAWritesScope_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUflushGPUDirectRDMAWritesScope_enum) 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 (enum CUflushGPUDirectRDMAWritesScope_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesScope_enum) (((((enum CUflushGPUDirectRDMAWritesScope_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesScope_enum) (((((((enum CUflushGPUDirectRDMAWritesScope_enum)digits[2]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum, 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(enum CUflushGPUDirectRDMAWritesScope_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesScope_enum) (((((((((enum CUflushGPUDirectRDMAWritesScope_enum)digits[3]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[2]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)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 (enum CUflushGPUDirectRDMAWritesScope_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUflushGPUDirectRDMAWritesScope_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUflushGPUDirectRDMAWritesScope_enum, 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 (enum CUflushGPUDirectRDMAWritesScope_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesScope_enum) (((enum CUflushGPUDirectRDMAWritesScope_enum)-1)*(((((enum CUflushGPUDirectRDMAWritesScope_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesScope_enum) ((((((enum CUflushGPUDirectRDMAWritesScope_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesScope_enum) (((enum CUflushGPUDirectRDMAWritesScope_enum)-1)*(((((((enum CUflushGPUDirectRDMAWritesScope_enum)digits[2]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesScope_enum) ((((((((enum CUflushGPUDirectRDMAWritesScope_enum)digits[2]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum, 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(enum CUflushGPUDirectRDMAWritesScope_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesScope_enum) (((enum CUflushGPUDirectRDMAWritesScope_enum)-1)*(((((((((enum CUflushGPUDirectRDMAWritesScope_enum)digits[3]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[2]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUflushGPUDirectRDMAWritesScope_enum, 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(enum CUflushGPUDirectRDMAWritesScope_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUflushGPUDirectRDMAWritesScope_enum) ((((((((((enum CUflushGPUDirectRDMAWritesScope_enum)digits[3]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[2]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[1]) << PyLong_SHIFT) | (enum CUflushGPUDirectRDMAWritesScope_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUflushGPUDirectRDMAWritesScope_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUflushGPUDirectRDMAWritesScope_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUflushGPUDirectRDMAWritesScope_enum, 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
            enum CUflushGPUDirectRDMAWritesScope_enum 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 (enum CUflushGPUDirectRDMAWritesScope_enum) -1;
        }
    } else {
        enum CUflushGPUDirectRDMAWritesScope_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUflushGPUDirectRDMAWritesScope_enum) -1;
        val = __Pyx_PyInt_As_enum__CUflushGPUDirectRDMAWritesScope_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUflushGPUDirectRDMAWritesScope_enum");
    return (enum CUflushGPUDirectRDMAWritesScope_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUflushGPUDirectRDMAWritesScope_enum");
    return (enum CUflushGPUDirectRDMAWritesScope_enum) -1;
}

/* 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);
    }
}

/* CIntFromPy */
static CYTHON_INLINE enum CUlimit_enum __Pyx_PyInt_As_enum__CUlimit_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUlimit_enum neg_one = (enum CUlimit_enum) -1, const_zero = (enum CUlimit_enum) 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(enum CUlimit_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUlimit_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUlimit_enum) 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 (enum CUlimit_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUlimit_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUlimit_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlimit_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUlimit_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUlimit_enum) (((((enum CUlimit_enum)digits[1]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUlimit_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlimit_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUlimit_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUlimit_enum) (((((((enum CUlimit_enum)digits[2]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[1]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUlimit_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlimit_enum, 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(enum CUlimit_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUlimit_enum) (((((((((enum CUlimit_enum)digits[3]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[2]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[1]) << PyLong_SHIFT) | (enum CUlimit_enum)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 (enum CUlimit_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUlimit_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUlimit_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUlimit_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUlimit_enum, 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 (enum CUlimit_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUlimit_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUlimit_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUlimit_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlimit_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUlimit_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUlimit_enum) (((enum CUlimit_enum)-1)*(((((enum CUlimit_enum)digits[1]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUlimit_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlimit_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUlimit_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUlimit_enum) ((((((enum CUlimit_enum)digits[1]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUlimit_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlimit_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUlimit_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUlimit_enum) (((enum CUlimit_enum)-1)*(((((((enum CUlimit_enum)digits[2]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[1]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUlimit_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlimit_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUlimit_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUlimit_enum) ((((((((enum CUlimit_enum)digits[2]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[1]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUlimit_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlimit_enum, 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(enum CUlimit_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUlimit_enum) (((enum CUlimit_enum)-1)*(((((((((enum CUlimit_enum)digits[3]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[2]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[1]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUlimit_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUlimit_enum, 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(enum CUlimit_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUlimit_enum) ((((((((((enum CUlimit_enum)digits[3]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[2]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[1]) << PyLong_SHIFT) | (enum CUlimit_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUlimit_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUlimit_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUlimit_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUlimit_enum, 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
            enum CUlimit_enum 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 (enum CUlimit_enum) -1;
        }
    } else {
        enum CUlimit_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUlimit_enum) -1;
        val = __Pyx_PyInt_As_enum__CUlimit_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUlimit_enum");
    return (enum CUlimit_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUlimit_enum");
    return (enum CUlimit_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUfunc_cache_enum __Pyx_PyInt_As_enum__CUfunc_cache_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUfunc_cache_enum neg_one = (enum CUfunc_cache_enum) -1, const_zero = (enum CUfunc_cache_enum) 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(enum CUfunc_cache_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUfunc_cache_enum) 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 (enum CUfunc_cache_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUfunc_cache_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfunc_cache_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUfunc_cache_enum) (((((enum CUfunc_cache_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUfunc_cache_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfunc_cache_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUfunc_cache_enum) (((((((enum CUfunc_cache_enum)digits[2]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUfunc_cache_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum, 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(enum CUfunc_cache_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUfunc_cache_enum) (((((((((enum CUfunc_cache_enum)digits[3]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[2]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)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 (enum CUfunc_cache_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUfunc_cache_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUfunc_cache_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUfunc_cache_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUfunc_cache_enum, 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 (enum CUfunc_cache_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUfunc_cache_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfunc_cache_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUfunc_cache_enum) (((enum CUfunc_cache_enum)-1)*(((((enum CUfunc_cache_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUfunc_cache_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfunc_cache_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUfunc_cache_enum) ((((((enum CUfunc_cache_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUfunc_cache_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfunc_cache_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUfunc_cache_enum) (((enum CUfunc_cache_enum)-1)*(((((((enum CUfunc_cache_enum)digits[2]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUfunc_cache_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfunc_cache_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUfunc_cache_enum) ((((((((enum CUfunc_cache_enum)digits[2]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUfunc_cache_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum, 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(enum CUfunc_cache_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUfunc_cache_enum) (((enum CUfunc_cache_enum)-1)*(((((((((enum CUfunc_cache_enum)digits[3]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[2]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUfunc_cache_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunc_cache_enum, 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(enum CUfunc_cache_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUfunc_cache_enum) ((((((((((enum CUfunc_cache_enum)digits[3]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[2]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunc_cache_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUfunc_cache_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUfunc_cache_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUfunc_cache_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUfunc_cache_enum, 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
            enum CUfunc_cache_enum 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 (enum CUfunc_cache_enum) -1;
        }
    } else {
        enum CUfunc_cache_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUfunc_cache_enum) -1;
        val = __Pyx_PyInt_As_enum__CUfunc_cache_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUfunc_cache_enum");
    return (enum CUfunc_cache_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUfunc_cache_enum");
    return (enum CUfunc_cache_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUsharedconfig_enum __Pyx_PyInt_As_enum__CUsharedconfig_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUsharedconfig_enum neg_one = (enum CUsharedconfig_enum) -1, const_zero = (enum CUsharedconfig_enum) 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(enum CUsharedconfig_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUsharedconfig_enum) 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 (enum CUsharedconfig_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUsharedconfig_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUsharedconfig_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUsharedconfig_enum) (((((enum CUsharedconfig_enum)digits[1]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUsharedconfig_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUsharedconfig_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUsharedconfig_enum) (((((((enum CUsharedconfig_enum)digits[2]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[1]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUsharedconfig_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum, 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(enum CUsharedconfig_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUsharedconfig_enum) (((((((((enum CUsharedconfig_enum)digits[3]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[2]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[1]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)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 (enum CUsharedconfig_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUsharedconfig_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUsharedconfig_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUsharedconfig_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUsharedconfig_enum, 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 (enum CUsharedconfig_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUsharedconfig_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUsharedconfig_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUsharedconfig_enum) (((enum CUsharedconfig_enum)-1)*(((((enum CUsharedconfig_enum)digits[1]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUsharedconfig_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUsharedconfig_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUsharedconfig_enum) ((((((enum CUsharedconfig_enum)digits[1]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUsharedconfig_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUsharedconfig_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUsharedconfig_enum) (((enum CUsharedconfig_enum)-1)*(((((((enum CUsharedconfig_enum)digits[2]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[1]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUsharedconfig_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUsharedconfig_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUsharedconfig_enum) ((((((((enum CUsharedconfig_enum)digits[2]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[1]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUsharedconfig_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum, 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(enum CUsharedconfig_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUsharedconfig_enum) (((enum CUsharedconfig_enum)-1)*(((((((((enum CUsharedconfig_enum)digits[3]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[2]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[1]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUsharedconfig_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUsharedconfig_enum, 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(enum CUsharedconfig_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUsharedconfig_enum) ((((((((((enum CUsharedconfig_enum)digits[3]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[2]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[1]) << PyLong_SHIFT) | (enum CUsharedconfig_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUsharedconfig_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUsharedconfig_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUsharedconfig_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUsharedconfig_enum, 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
            enum CUsharedconfig_enum 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 (enum CUsharedconfig_enum) -1;
        }
    } else {
        enum CUsharedconfig_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUsharedconfig_enum) -1;
        val = __Pyx_PyInt_As_enum__CUsharedconfig_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUsharedconfig_enum");
    return (enum CUsharedconfig_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUsharedconfig_enum");
    return (enum CUsharedconfig_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUjit_option_enum __Pyx_PyInt_As_enum__CUjit_option_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUjit_option_enum neg_one = (enum CUjit_option_enum) -1, const_zero = (enum CUjit_option_enum) 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(enum CUjit_option_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUjit_option_enum) 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 (enum CUjit_option_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUjit_option_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUjit_option_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUjit_option_enum) (((((enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUjit_option_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUjit_option_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUjit_option_enum) (((((((enum CUjit_option_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUjit_option_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, 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(enum CUjit_option_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUjit_option_enum) (((((((((enum CUjit_option_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)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 (enum CUjit_option_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUjit_option_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_option_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUjit_option_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_option_enum, 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 (enum CUjit_option_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUjit_option_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUjit_option_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUjit_option_enum) (((enum CUjit_option_enum)-1)*(((((enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUjit_option_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUjit_option_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUjit_option_enum) ((((((enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUjit_option_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUjit_option_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUjit_option_enum) (((enum CUjit_option_enum)-1)*(((((((enum CUjit_option_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUjit_option_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUjit_option_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUjit_option_enum) ((((((((enum CUjit_option_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUjit_option_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, 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(enum CUjit_option_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUjit_option_enum) (((enum CUjit_option_enum)-1)*(((((((((enum CUjit_option_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUjit_option_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, 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(enum CUjit_option_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUjit_option_enum) ((((((((((enum CUjit_option_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUjit_option_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_option_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUjit_option_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_option_enum, 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
            enum CUjit_option_enum 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 (enum CUjit_option_enum) -1;
        }
    } else {
        enum CUjit_option_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUjit_option_enum) -1;
        val = __Pyx_PyInt_As_enum__CUjit_option_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUjit_option_enum");
    return (enum CUjit_option_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUjit_option_enum");
    return (enum CUjit_option_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUjitInputType_enum __Pyx_PyInt_As_enum__CUjitInputType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUjitInputType_enum neg_one = (enum CUjitInputType_enum) -1, const_zero = (enum CUjitInputType_enum) 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(enum CUjitInputType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUjitInputType_enum) 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 (enum CUjitInputType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUjitInputType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUjitInputType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUjitInputType_enum) (((((enum CUjitInputType_enum)digits[1]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUjitInputType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUjitInputType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUjitInputType_enum) (((((((enum CUjitInputType_enum)digits[2]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[1]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUjitInputType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum, 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(enum CUjitInputType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUjitInputType_enum) (((((((((enum CUjitInputType_enum)digits[3]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[2]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[1]) << PyLong_SHIFT) | (enum CUjitInputType_enum)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 (enum CUjitInputType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUjitInputType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUjitInputType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUjitInputType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUjitInputType_enum, 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 (enum CUjitInputType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUjitInputType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUjitInputType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUjitInputType_enum) (((enum CUjitInputType_enum)-1)*(((((enum CUjitInputType_enum)digits[1]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUjitInputType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUjitInputType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUjitInputType_enum) ((((((enum CUjitInputType_enum)digits[1]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUjitInputType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUjitInputType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUjitInputType_enum) (((enum CUjitInputType_enum)-1)*(((((((enum CUjitInputType_enum)digits[2]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[1]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUjitInputType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUjitInputType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUjitInputType_enum) ((((((((enum CUjitInputType_enum)digits[2]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[1]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUjitInputType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum, 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(enum CUjitInputType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUjitInputType_enum) (((enum CUjitInputType_enum)-1)*(((((((((enum CUjitInputType_enum)digits[3]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[2]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[1]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUjitInputType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUjitInputType_enum, 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(enum CUjitInputType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUjitInputType_enum) ((((((((((enum CUjitInputType_enum)digits[3]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[2]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[1]) << PyLong_SHIFT) | (enum CUjitInputType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUjitInputType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUjitInputType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUjitInputType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUjitInputType_enum, 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
            enum CUjitInputType_enum 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 (enum CUjitInputType_enum) -1;
        }
    } else {
        enum CUjitInputType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUjitInputType_enum) -1;
        val = __Pyx_PyInt_As_enum__CUjitInputType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUjitInputType_enum");
    return (enum CUjitInputType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUjitInputType_enum");
    return (enum CUjitInputType_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUmemRangeHandleType_enum __Pyx_PyInt_As_enum__CUmemRangeHandleType_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemRangeHandleType_enum neg_one = (enum CUmemRangeHandleType_enum) -1, const_zero = (enum CUmemRangeHandleType_enum) 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(enum CUmemRangeHandleType_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUmemRangeHandleType_enum) 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 (enum CUmemRangeHandleType_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUmemRangeHandleType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemRangeHandleType_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUmemRangeHandleType_enum) (((((enum CUmemRangeHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemRangeHandleType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemRangeHandleType_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUmemRangeHandleType_enum) (((((((enum CUmemRangeHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemRangeHandleType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum, 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(enum CUmemRangeHandleType_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUmemRangeHandleType_enum) (((((((((enum CUmemRangeHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)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 (enum CUmemRangeHandleType_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUmemRangeHandleType_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemRangeHandleType_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemRangeHandleType_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemRangeHandleType_enum, 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 (enum CUmemRangeHandleType_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUmemRangeHandleType_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemRangeHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemRangeHandleType_enum) (((enum CUmemRangeHandleType_enum)-1)*(((((enum CUmemRangeHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUmemRangeHandleType_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemRangeHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemRangeHandleType_enum) ((((((enum CUmemRangeHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUmemRangeHandleType_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemRangeHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemRangeHandleType_enum) (((enum CUmemRangeHandleType_enum)-1)*(((((((enum CUmemRangeHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemRangeHandleType_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemRangeHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemRangeHandleType_enum) ((((((((enum CUmemRangeHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUmemRangeHandleType_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum, 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(enum CUmemRangeHandleType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemRangeHandleType_enum) (((enum CUmemRangeHandleType_enum)-1)*(((((((((enum CUmemRangeHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemRangeHandleType_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemRangeHandleType_enum, 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(enum CUmemRangeHandleType_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemRangeHandleType_enum) ((((((((((enum CUmemRangeHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemRangeHandleType_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUmemRangeHandleType_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemRangeHandleType_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemRangeHandleType_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemRangeHandleType_enum, 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
            enum CUmemRangeHandleType_enum 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 (enum CUmemRangeHandleType_enum) -1;
        }
    } else {
        enum CUmemRangeHandleType_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUmemRangeHandleType_enum) -1;
        val = __Pyx_PyInt_As_enum__CUmemRangeHandleType_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUmemRangeHandleType_enum");
    return (enum CUmemRangeHandleType_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUmemRangeHandleType_enum");
    return (enum CUmemRangeHandleType_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUmemAllocationGranularity_flags_enum __Pyx_PyInt_As_enum__CUmemAllocationGranularity_flags_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemAllocationGranularity_flags_enum neg_one = (enum CUmemAllocationGranularity_flags_enum) -1, const_zero = (enum CUmemAllocationGranularity_flags_enum) 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(enum CUmemAllocationGranularity_flags_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUmemAllocationGranularity_flags_enum) 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 (enum CUmemAllocationGranularity_flags_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUmemAllocationGranularity_flags_enum) (((((enum CUmemAllocationGranularity_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUmemAllocationGranularity_flags_enum) (((((((enum CUmemAllocationGranularity_flags_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum, 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(enum CUmemAllocationGranularity_flags_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUmemAllocationGranularity_flags_enum) (((((((((enum CUmemAllocationGranularity_flags_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)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 (enum CUmemAllocationGranularity_flags_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUmemAllocationGranularity_flags_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationGranularity_flags_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemAllocationGranularity_flags_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationGranularity_flags_enum, 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 (enum CUmemAllocationGranularity_flags_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemAllocationGranularity_flags_enum) (((enum CUmemAllocationGranularity_flags_enum)-1)*(((((enum CUmemAllocationGranularity_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemAllocationGranularity_flags_enum) ((((((enum CUmemAllocationGranularity_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemAllocationGranularity_flags_enum) (((enum CUmemAllocationGranularity_flags_enum)-1)*(((((((enum CUmemAllocationGranularity_flags_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemAllocationGranularity_flags_enum) ((((((((enum CUmemAllocationGranularity_flags_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum, 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(enum CUmemAllocationGranularity_flags_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemAllocationGranularity_flags_enum) (((enum CUmemAllocationGranularity_flags_enum)-1)*(((((((((enum CUmemAllocationGranularity_flags_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemAllocationGranularity_flags_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemAllocationGranularity_flags_enum, 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(enum CUmemAllocationGranularity_flags_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemAllocationGranularity_flags_enum) ((((((((((enum CUmemAllocationGranularity_flags_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationGranularity_flags_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUmemAllocationGranularity_flags_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationGranularity_flags_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemAllocationGranularity_flags_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationGranularity_flags_enum, 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
            enum CUmemAllocationGranularity_flags_enum 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 (enum CUmemAllocationGranularity_flags_enum) -1;
        }
    } else {
        enum CUmemAllocationGranularity_flags_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUmemAllocationGranularity_flags_enum) -1;
        val = __Pyx_PyInt_As_enum__CUmemAllocationGranularity_flags_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUmemAllocationGranularity_flags_enum");
    return (enum CUmemAllocationGranularity_flags_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUmemAllocationGranularity_flags_enum");
    return (enum CUmemAllocationGranularity_flags_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUmemPool_attribute_enum __Pyx_PyInt_As_enum__CUmemPool_attribute_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmemPool_attribute_enum neg_one = (enum CUmemPool_attribute_enum) -1, const_zero = (enum CUmemPool_attribute_enum) 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(enum CUmemPool_attribute_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUmemPool_attribute_enum) 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 (enum CUmemPool_attribute_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUmemPool_attribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemPool_attribute_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUmemPool_attribute_enum) (((((enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemPool_attribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemPool_attribute_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUmemPool_attribute_enum) (((((((enum CUmemPool_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemPool_attribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, 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(enum CUmemPool_attribute_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUmemPool_attribute_enum) (((((((((enum CUmemPool_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)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 (enum CUmemPool_attribute_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUmemPool_attribute_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemPool_attribute_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemPool_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemPool_attribute_enum, 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 (enum CUmemPool_attribute_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemPool_attribute_enum) (((enum CUmemPool_attribute_enum)-1)*(((((enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUmemPool_attribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmemPool_attribute_enum) ((((((enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemPool_attribute_enum) (((enum CUmemPool_attribute_enum)-1)*(((((((enum CUmemPool_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmemPool_attribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmemPool_attribute_enum) ((((((((enum CUmemPool_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, 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(enum CUmemPool_attribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemPool_attribute_enum) (((enum CUmemPool_attribute_enum)-1)*(((((((((enum CUmemPool_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmemPool_attribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, 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(enum CUmemPool_attribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmemPool_attribute_enum) ((((((((((enum CUmemPool_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUmemPool_attribute_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemPool_attribute_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmemPool_attribute_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmemPool_attribute_enum, 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
            enum CUmemPool_attribute_enum 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 (enum CUmemPool_attribute_enum) -1;
        }
    } else {
        enum CUmemPool_attribute_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUmemPool_attribute_enum) -1;
        val = __Pyx_PyInt_As_enum__CUmemPool_attribute_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUmemPool_attribute_enum");
    return (enum CUmemPool_attribute_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUmemPool_attribute_enum");
    return (enum CUmemPool_attribute_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUpointer_attribute_enum __Pyx_PyInt_As_enum__CUpointer_attribute_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUpointer_attribute_enum neg_one = (enum CUpointer_attribute_enum) -1, const_zero = (enum CUpointer_attribute_enum) 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(enum CUpointer_attribute_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUpointer_attribute_enum) 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 (enum CUpointer_attribute_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUpointer_attribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUpointer_attribute_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUpointer_attribute_enum) (((((enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUpointer_attribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUpointer_attribute_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUpointer_attribute_enum) (((((((enum CUpointer_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUpointer_attribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, 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(enum CUpointer_attribute_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUpointer_attribute_enum) (((((((((enum CUpointer_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)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 (enum CUpointer_attribute_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUpointer_attribute_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUpointer_attribute_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUpointer_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUpointer_attribute_enum, 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 (enum CUpointer_attribute_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUpointer_attribute_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUpointer_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUpointer_attribute_enum) (((enum CUpointer_attribute_enum)-1)*(((((enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUpointer_attribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUpointer_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUpointer_attribute_enum) ((((((enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUpointer_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUpointer_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUpointer_attribute_enum) (((enum CUpointer_attribute_enum)-1)*(((((((enum CUpointer_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUpointer_attribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUpointer_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUpointer_attribute_enum) ((((((((enum CUpointer_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUpointer_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, 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(enum CUpointer_attribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUpointer_attribute_enum) (((enum CUpointer_attribute_enum)-1)*(((((((((enum CUpointer_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUpointer_attribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, 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(enum CUpointer_attribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUpointer_attribute_enum) ((((((((((enum CUpointer_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUpointer_attribute_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUpointer_attribute_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUpointer_attribute_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUpointer_attribute_enum, 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
            enum CUpointer_attribute_enum 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 (enum CUpointer_attribute_enum) -1;
        }
    } else {
        enum CUpointer_attribute_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUpointer_attribute_enum) -1;
        val = __Pyx_PyInt_As_enum__CUpointer_attribute_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUpointer_attribute_enum");
    return (enum CUpointer_attribute_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUpointer_attribute_enum");
    return (enum CUpointer_attribute_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUmem_advise_enum __Pyx_PyInt_As_enum__CUmem_advise_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmem_advise_enum neg_one = (enum CUmem_advise_enum) -1, const_zero = (enum CUmem_advise_enum) 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(enum CUmem_advise_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUmem_advise_enum) 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 (enum CUmem_advise_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUmem_advise_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmem_advise_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUmem_advise_enum) (((((enum CUmem_advise_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmem_advise_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmem_advise_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUmem_advise_enum) (((((((enum CUmem_advise_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmem_advise_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum, 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(enum CUmem_advise_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUmem_advise_enum) (((((((((enum CUmem_advise_enum)digits[3]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_advise_enum)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 (enum CUmem_advise_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUmem_advise_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmem_advise_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmem_advise_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmem_advise_enum, 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 (enum CUmem_advise_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUmem_advise_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmem_advise_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmem_advise_enum) (((enum CUmem_advise_enum)-1)*(((((enum CUmem_advise_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUmem_advise_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmem_advise_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmem_advise_enum) ((((((enum CUmem_advise_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUmem_advise_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmem_advise_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmem_advise_enum) (((enum CUmem_advise_enum)-1)*(((((((enum CUmem_advise_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmem_advise_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmem_advise_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmem_advise_enum) ((((((((enum CUmem_advise_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUmem_advise_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum, 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(enum CUmem_advise_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmem_advise_enum) (((enum CUmem_advise_enum)-1)*(((((((((enum CUmem_advise_enum)digits[3]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmem_advise_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_advise_enum, 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(enum CUmem_advise_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmem_advise_enum) ((((((((((enum CUmem_advise_enum)digits[3]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_advise_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUmem_advise_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmem_advise_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmem_advise_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmem_advise_enum, 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
            enum CUmem_advise_enum 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 (enum CUmem_advise_enum) -1;
        }
    } else {
        enum CUmem_advise_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUmem_advise_enum) -1;
        val = __Pyx_PyInt_As_enum__CUmem_advise_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUmem_advise_enum");
    return (enum CUmem_advise_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUmem_advise_enum");
    return (enum CUmem_advise_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUmem_range_attribute_enum __Pyx_PyInt_As_enum__CUmem_range_attribute_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUmem_range_attribute_enum neg_one = (enum CUmem_range_attribute_enum) -1, const_zero = (enum CUmem_range_attribute_enum) 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(enum CUmem_range_attribute_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUmem_range_attribute_enum) 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 (enum CUmem_range_attribute_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUmem_range_attribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmem_range_attribute_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUmem_range_attribute_enum) (((((enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmem_range_attribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmem_range_attribute_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUmem_range_attribute_enum) (((((((enum CUmem_range_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmem_range_attribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, 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(enum CUmem_range_attribute_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUmem_range_attribute_enum) (((((((((enum CUmem_range_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)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 (enum CUmem_range_attribute_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUmem_range_attribute_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmem_range_attribute_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmem_range_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmem_range_attribute_enum, 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 (enum CUmem_range_attribute_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmem_range_attribute_enum) (((enum CUmem_range_attribute_enum)-1)*(((((enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUmem_range_attribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUmem_range_attribute_enum) ((((((enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmem_range_attribute_enum) (((enum CUmem_range_attribute_enum)-1)*(((((((enum CUmem_range_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUmem_range_attribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUmem_range_attribute_enum) ((((((((enum CUmem_range_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, 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(enum CUmem_range_attribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmem_range_attribute_enum) (((enum CUmem_range_attribute_enum)-1)*(((((((((enum CUmem_range_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUmem_range_attribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, 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(enum CUmem_range_attribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUmem_range_attribute_enum) ((((((((((enum CUmem_range_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUmem_range_attribute_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmem_range_attribute_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUmem_range_attribute_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUmem_range_attribute_enum, 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
            enum CUmem_range_attribute_enum 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 (enum CUmem_range_attribute_enum) -1;
        }
    } else {
        enum CUmem_range_attribute_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUmem_range_attribute_enum) -1;
        val = __Pyx_PyInt_As_enum__CUmem_range_attribute_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUmem_range_attribute_enum");
    return (enum CUmem_range_attribute_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUmem_range_attribute_enum");
    return (enum CUmem_range_attribute_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUstreamCaptureMode_enum __Pyx_PyInt_As_enum__CUstreamCaptureMode_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUstreamCaptureMode_enum neg_one = (enum CUstreamCaptureMode_enum) -1, const_zero = (enum CUstreamCaptureMode_enum) 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(enum CUstreamCaptureMode_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUstreamCaptureMode_enum) 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 (enum CUstreamCaptureMode_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUstreamCaptureMode_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUstreamCaptureMode_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUstreamCaptureMode_enum) (((((enum CUstreamCaptureMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUstreamCaptureMode_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUstreamCaptureMode_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUstreamCaptureMode_enum) (((((((enum CUstreamCaptureMode_enum)digits[2]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUstreamCaptureMode_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum, 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(enum CUstreamCaptureMode_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUstreamCaptureMode_enum) (((((((((enum CUstreamCaptureMode_enum)digits[3]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[2]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)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 (enum CUstreamCaptureMode_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUstreamCaptureMode_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUstreamCaptureMode_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUstreamCaptureMode_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUstreamCaptureMode_enum, 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 (enum CUstreamCaptureMode_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUstreamCaptureMode_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUstreamCaptureMode_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUstreamCaptureMode_enum) (((enum CUstreamCaptureMode_enum)-1)*(((((enum CUstreamCaptureMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUstreamCaptureMode_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUstreamCaptureMode_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUstreamCaptureMode_enum) ((((((enum CUstreamCaptureMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUstreamCaptureMode_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUstreamCaptureMode_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUstreamCaptureMode_enum) (((enum CUstreamCaptureMode_enum)-1)*(((((((enum CUstreamCaptureMode_enum)digits[2]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUstreamCaptureMode_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUstreamCaptureMode_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUstreamCaptureMode_enum) ((((((((enum CUstreamCaptureMode_enum)digits[2]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUstreamCaptureMode_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum, 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(enum CUstreamCaptureMode_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUstreamCaptureMode_enum) (((enum CUstreamCaptureMode_enum)-1)*(((((((((enum CUstreamCaptureMode_enum)digits[3]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[2]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUstreamCaptureMode_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUstreamCaptureMode_enum, 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(enum CUstreamCaptureMode_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUstreamCaptureMode_enum) ((((((((((enum CUstreamCaptureMode_enum)digits[3]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[2]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUstreamCaptureMode_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUstreamCaptureMode_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUstreamCaptureMode_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUstreamCaptureMode_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUstreamCaptureMode_enum, 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
            enum CUstreamCaptureMode_enum 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 (enum CUstreamCaptureMode_enum) -1;
        }
    } else {
        enum CUstreamCaptureMode_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUstreamCaptureMode_enum) -1;
        val = __Pyx_PyInt_As_enum__CUstreamCaptureMode_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUstreamCaptureMode_enum");
    return (enum CUstreamCaptureMode_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUstreamCaptureMode_enum");
    return (enum CUstreamCaptureMode_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUfunction_attribute_enum __Pyx_PyInt_As_enum__CUfunction_attribute_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUfunction_attribute_enum neg_one = (enum CUfunction_attribute_enum) -1, const_zero = (enum CUfunction_attribute_enum) 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(enum CUfunction_attribute_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUfunction_attribute_enum) 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 (enum CUfunction_attribute_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUfunction_attribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfunction_attribute_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUfunction_attribute_enum) (((((enum CUfunction_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUfunction_attribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfunction_attribute_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUfunction_attribute_enum) (((((((enum CUfunction_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUfunction_attribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum, 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(enum CUfunction_attribute_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUfunction_attribute_enum) (((((((((enum CUfunction_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)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 (enum CUfunction_attribute_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUfunction_attribute_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUfunction_attribute_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUfunction_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUfunction_attribute_enum, 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 (enum CUfunction_attribute_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUfunction_attribute_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfunction_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUfunction_attribute_enum) (((enum CUfunction_attribute_enum)-1)*(((((enum CUfunction_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUfunction_attribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfunction_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUfunction_attribute_enum) ((((((enum CUfunction_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUfunction_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfunction_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUfunction_attribute_enum) (((enum CUfunction_attribute_enum)-1)*(((((((enum CUfunction_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUfunction_attribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUfunction_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUfunction_attribute_enum) ((((((((enum CUfunction_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUfunction_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum, 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(enum CUfunction_attribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUfunction_attribute_enum) (((enum CUfunction_attribute_enum)-1)*(((((((((enum CUfunction_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUfunction_attribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUfunction_attribute_enum, 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(enum CUfunction_attribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUfunction_attribute_enum) ((((((((((enum CUfunction_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUfunction_attribute_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUfunction_attribute_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUfunction_attribute_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUfunction_attribute_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUfunction_attribute_enum, 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
            enum CUfunction_attribute_enum 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 (enum CUfunction_attribute_enum) -1;
        }
    } else {
        enum CUfunction_attribute_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUfunction_attribute_enum) -1;
        val = __Pyx_PyInt_As_enum__CUfunction_attribute_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUfunction_attribute_enum");
    return (enum CUfunction_attribute_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUfunction_attribute_enum");
    return (enum CUfunction_attribute_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUgraphMem_attribute_enum __Pyx_PyInt_As_enum__CUgraphMem_attribute_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUgraphMem_attribute_enum neg_one = (enum CUgraphMem_attribute_enum) -1, const_zero = (enum CUgraphMem_attribute_enum) 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(enum CUgraphMem_attribute_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUgraphMem_attribute_enum) 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 (enum CUgraphMem_attribute_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUgraphMem_attribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUgraphMem_attribute_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUgraphMem_attribute_enum) (((((enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUgraphMem_attribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUgraphMem_attribute_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUgraphMem_attribute_enum) (((((((enum CUgraphMem_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUgraphMem_attribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, 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(enum CUgraphMem_attribute_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUgraphMem_attribute_enum) (((((((((enum CUgraphMem_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)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 (enum CUgraphMem_attribute_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUgraphMem_attribute_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUgraphMem_attribute_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUgraphMem_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUgraphMem_attribute_enum, 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 (enum CUgraphMem_attribute_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUgraphMem_attribute_enum) (((enum CUgraphMem_attribute_enum)-1)*(((((enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUgraphMem_attribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUgraphMem_attribute_enum) ((((((enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUgraphMem_attribute_enum) (((enum CUgraphMem_attribute_enum)-1)*(((((((enum CUgraphMem_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUgraphMem_attribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUgraphMem_attribute_enum) ((((((((enum CUgraphMem_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, 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(enum CUgraphMem_attribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUgraphMem_attribute_enum) (((enum CUgraphMem_attribute_enum)-1)*(((((((((enum CUgraphMem_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUgraphMem_attribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, 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(enum CUgraphMem_attribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUgraphMem_attribute_enum) ((((((((((enum CUgraphMem_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUgraphMem_attribute_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUgraphMem_attribute_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUgraphMem_attribute_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUgraphMem_attribute_enum, 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
            enum CUgraphMem_attribute_enum 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 (enum CUgraphMem_attribute_enum) -1;
        }
    } else {
        enum CUgraphMem_attribute_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUgraphMem_attribute_enum) -1;
        val = __Pyx_PyInt_As_enum__CUgraphMem_attribute_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUgraphMem_attribute_enum");
    return (enum CUgraphMem_attribute_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUgraphMem_attribute_enum");
    return (enum CUgraphMem_attribute_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUdevice_P2PAttribute_enum __Pyx_PyInt_As_enum__CUdevice_P2PAttribute_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUdevice_P2PAttribute_enum neg_one = (enum CUdevice_P2PAttribute_enum) -1, const_zero = (enum CUdevice_P2PAttribute_enum) 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(enum CUdevice_P2PAttribute_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUdevice_P2PAttribute_enum) 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 (enum CUdevice_P2PAttribute_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUdevice_P2PAttribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUdevice_P2PAttribute_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUdevice_P2PAttribute_enum) (((((enum CUdevice_P2PAttribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUdevice_P2PAttribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUdevice_P2PAttribute_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUdevice_P2PAttribute_enum) (((((((enum CUdevice_P2PAttribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUdevice_P2PAttribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum, 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(enum CUdevice_P2PAttribute_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUdevice_P2PAttribute_enum) (((((((((enum CUdevice_P2PAttribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)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 (enum CUdevice_P2PAttribute_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUdevice_P2PAttribute_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUdevice_P2PAttribute_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUdevice_P2PAttribute_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUdevice_P2PAttribute_enum, 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 (enum CUdevice_P2PAttribute_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUdevice_P2PAttribute_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUdevice_P2PAttribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUdevice_P2PAttribute_enum) (((enum CUdevice_P2PAttribute_enum)-1)*(((((enum CUdevice_P2PAttribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUdevice_P2PAttribute_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUdevice_P2PAttribute_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUdevice_P2PAttribute_enum) ((((((enum CUdevice_P2PAttribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUdevice_P2PAttribute_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUdevice_P2PAttribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUdevice_P2PAttribute_enum) (((enum CUdevice_P2PAttribute_enum)-1)*(((((((enum CUdevice_P2PAttribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUdevice_P2PAttribute_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUdevice_P2PAttribute_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUdevice_P2PAttribute_enum) ((((((((enum CUdevice_P2PAttribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUdevice_P2PAttribute_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum, 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(enum CUdevice_P2PAttribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUdevice_P2PAttribute_enum) (((enum CUdevice_P2PAttribute_enum)-1)*(((((((((enum CUdevice_P2PAttribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUdevice_P2PAttribute_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUdevice_P2PAttribute_enum, 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(enum CUdevice_P2PAttribute_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUdevice_P2PAttribute_enum) ((((((((((enum CUdevice_P2PAttribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUdevice_P2PAttribute_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUdevice_P2PAttribute_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUdevice_P2PAttribute_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUdevice_P2PAttribute_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUdevice_P2PAttribute_enum, 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
            enum CUdevice_P2PAttribute_enum 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 (enum CUdevice_P2PAttribute_enum) -1;
        }
    } else {
        enum CUdevice_P2PAttribute_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUdevice_P2PAttribute_enum) -1;
        val = __Pyx_PyInt_As_enum__CUdevice_P2PAttribute_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUdevice_P2PAttribute_enum");
    return (enum CUdevice_P2PAttribute_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUdevice_P2PAttribute_enum");
    return (enum CUdevice_P2PAttribute_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum CUoutput_mode_enum __Pyx_PyInt_As_enum__CUoutput_mode_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum CUoutput_mode_enum neg_one = (enum CUoutput_mode_enum) -1, const_zero = (enum CUoutput_mode_enum) 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(enum CUoutput_mode_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum CUoutput_mode_enum) 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 (enum CUoutput_mode_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum CUoutput_mode_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUoutput_mode_enum) >= 2 * PyLong_SHIFT) {
                            return (enum CUoutput_mode_enum) (((((enum CUoutput_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUoutput_mode_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUoutput_mode_enum) >= 3 * PyLong_SHIFT) {
                            return (enum CUoutput_mode_enum) (((((((enum CUoutput_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUoutput_mode_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum, 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(enum CUoutput_mode_enum) >= 4 * PyLong_SHIFT) {
                            return (enum CUoutput_mode_enum) (((((((((enum CUoutput_mode_enum)digits[3]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)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 (enum CUoutput_mode_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum CUoutput_mode_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUoutput_mode_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUoutput_mode_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUoutput_mode_enum, 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 (enum CUoutput_mode_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum CUoutput_mode_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUoutput_mode_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUoutput_mode_enum) (((enum CUoutput_mode_enum)-1)*(((((enum CUoutput_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum CUoutput_mode_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUoutput_mode_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum CUoutput_mode_enum) ((((((enum CUoutput_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum CUoutput_mode_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUoutput_mode_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUoutput_mode_enum) (((enum CUoutput_mode_enum)-1)*(((((((enum CUoutput_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum CUoutput_mode_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum CUoutput_mode_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum CUoutput_mode_enum) ((((((((enum CUoutput_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum CUoutput_mode_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum, 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(enum CUoutput_mode_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUoutput_mode_enum) (((enum CUoutput_mode_enum)-1)*(((((((((enum CUoutput_mode_enum)digits[3]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum CUoutput_mode_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum CUoutput_mode_enum, 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(enum CUoutput_mode_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum CUoutput_mode_enum) ((((((((((enum CUoutput_mode_enum)digits[3]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[2]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[1]) << PyLong_SHIFT) | (enum CUoutput_mode_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum CUoutput_mode_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUoutput_mode_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum CUoutput_mode_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum CUoutput_mode_enum, 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
            enum CUoutput_mode_enum 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 (enum CUoutput_mode_enum) -1;
        }
    } else {
        enum CUoutput_mode_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum CUoutput_mode_enum) -1;
        val = __Pyx_PyInt_As_enum__CUoutput_mode_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum CUoutput_mode_enum");
    return (enum CUoutput_mode_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum CUoutput_mode_enum");
    return (enum CUoutput_mode_enum) -1;
}

/* CIntFromPy */
static CYTHON_INLINE enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum __Pyx_PyInt_As_enum____pyx_t_4cuda_5ccuda_CUGLDeviceList_enum(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum neg_one = (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) -1, const_zero = (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) 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(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) 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 (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) 0;
                case  1: __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, digit, digits[0])
                case 2:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) >= 2 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) (((((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) >= 3 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) (((((((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, 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(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) >= 4 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) (((((((((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)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 (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, 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 (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) 0;
                case -1: __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) (((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)-1)*(((((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) - 1 > 2 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) ((((((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) (((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)-1)*(((((((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) - 1 > 3 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) ((((((((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, 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(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) (((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)-1)*(((((((((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, 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(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) - 1 > 4 * PyLong_SHIFT) {
                            return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) ((((((((((enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[3]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[2]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[1]) << PyLong_SHIFT) | (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum, 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
            enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum 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 (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) -1;
        }
    } else {
        enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) -1;
        val = __Pyx_PyInt_As_enum____pyx_t_4cuda_5ccuda_CUGLDeviceList_enum(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum");
    return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum");
    return (enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum) -1;
}

/* 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;
}

/* 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

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* CoroutineBase */
#include <structmember.h>
#include <frameobject.h>
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_type) {
        #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
        #else
        if (exc_state->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            assert(f->f_back == NULL);
            #if PY_VERSION_HEX >= 0x030B00A1
            f->f_back = PyThreadState_GetFrame(tstate);
            #else
            Py_XINCREF(tstate->frame);
            f->f_back = tstate->frame;
            #endif
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *exc_tb = exc_state->exc_traceback;
    if (likely(exc_tb)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
static CYTHON_INLINE
PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
#if PY_VERSION_HEX <= 0x030A00A1
    return _PyGen_Send(gen, arg);
#else
    PyObject *result;
    if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
        if (PyAsyncGen_CheckExact(gen)) {
            assert(result == Py_None);
            PyErr_SetNone(PyExc_StopAsyncIteration);
        }
        else if (result == Py_None) {
            PyErr_SetNone(PyExc_StopIteration);
        }
        else {
            _PyGen_SetStopIterationValue(result);
        }
        Py_CLEAR(result);
    }
    return result;
#endif
}
#endif
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = PyObject_CallObject(meth, args);
            } else {
                ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_frame);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (Py_REFCNT(self) > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    __Pyx_SET_REFCNT(self, 1);
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(Py_REFCNT(self) > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = Py_REFCNT(self);
        _Py_NewReference(self);
        __Pyx_SET_REFCNT(self, refcnt);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(Py_TYPE(self)) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *frame = self->gi_frame;
    if (!frame) {
        if (unlikely(!self->gi_code)) {
            Py_RETURN_NONE;
        }
        frame = (PyObject *) PyFrame_New(
            PyThreadState_Get(),            /*PyThreadState *tstate,*/
            (PyCodeObject*) self->gi_code,  /*PyCodeObject *code,*/
            __pyx_d,                 /*PyObject *globals,*/
            0                               /*PyObject *locals*/
        );
        if (unlikely(!frame))
            return NULL;
        self->gi_frame = frame;
    }
    Py_INCREF(frame);
    return frame;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    gen->gi_frame = NULL;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
     (char*) PyDoc_STR("Frame of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
    0,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* 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;
}

/* 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 */
